Skip to content

Commit

Permalink
fix(#190): fix import types
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Nov 13, 2023
1 parent 6a2d759 commit aa9d73a
Show file tree
Hide file tree
Showing 102 changed files with 138 additions and 116 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
*.config.*
.storybook
*.css
/starter
/starter
**/dist/**/**
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ module.exports = {
plugins: ['vue', '@typescript-eslint'],
rules: {
'vue/multi-word-component-names': 'off',
},
"@typescript-eslint/consistent-type-imports": "error",
"vue/no-reserved-component-names": "off",
"vue/no-mutating-props": "off",
"vue/valid-v-slot": "off",
"vue/no-dupe-keys": "off"
}
};
2 changes: 1 addition & 1 deletion packages/alert/src/VAlert.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import VAlert from './VAlert.vue';
import {themeColors} from '@morpheme/utils/colors';
import {Meta, Story, StoryFn} from '@storybook/vue3';
import type {Meta, Story, StoryFn} from '@storybook/vue3';
import Icon from '@morpheme/icon';
import AlertVModelStory from './stories/AlertVModelStory.vue';
import AlertTransitionStory from './stories/AlertTransitionStory.vue';
Expand Down
3 changes: 2 additions & 1 deletion packages/alert/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Ref, inject} from 'vue';
import type {Ref} from 'vue';
import { inject} from 'vue';

export const AlertSymbol = Symbol('VAlert');

Expand Down
2 changes: 1 addition & 1 deletion packages/app-bar/src/VAppBar.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VAppBar from './VAppBar.vue';
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import {defaultColors, defaultShadows} from '@morpheme/theme/defaultTheme';
import {ref} from 'vue';
import Icon from '@morpheme/icon';
Expand Down
2 changes: 1 addition & 1 deletion packages/app-shell/src/VAppShell.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useBreakpoints, breakpointsTailwind} from '@vueuse/core';
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import VAppShell from './VAppShell.vue';
import {NavDrawer as VNavDrawer} from '@morpheme/nav-drawer';
import VAppBar from '@morpheme/app-bar';
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete/src/Autocomplete.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import Autocomplete from './Autocomplete.vue';
import {ref} from 'vue';
import {ListboxButton} from '@headlessui/vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete/src/VAutocomplete.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ref} from 'vue';
import {object} from 'yup';
import VAutocomplete from './VAutocomplete.vue';
import VBtn from '@morpheme/button';
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';

const items = [
{value: 1, text: 'Wade Cooper'},
Expand Down
2 changes: 1 addition & 1 deletion packages/badge/src/VBadge.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { VBtn } from '@morpheme/button';
import VBadge from './VBadge.vue';
import type {VBadgeProps} from './types';
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import {defaultRounded, defaultColors} from '@morpheme/theme/defaultTheme';
import {List as VList, ListItem as VListItem} from '@morpheme/list'
import VBadgeGroup from './VBadgeGroup.vue';
Expand Down
5 changes: 3 additions & 2 deletions packages/badge/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DefaultColors } from '@morpheme/theme/defaultTheme';
import { Ref, inject } from 'vue';
import type { DefaultColors } from '@morpheme/theme/defaultTheme';
import type { Ref} from 'vue';
import { inject } from 'vue';

export interface VBadgeContextApi {
color?: Ref<DefaultColors>;
Expand Down
2 changes: 1 addition & 1 deletion packages/banner/src/VBanner.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {VBtn} from '@morpheme/button';
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import VBanner from './VBanner.vue';
import VBannerText from './VBannerText.vue';
import VText from '@morpheme/text';
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Auth/Login.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import LoginSnippet from './Login.vue';
import ForgotPasswordSnippet from './ForgotPassword.vue';

Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/CTA/CTA.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Cta from './Cta.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Contact/Contact.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import ContactFormSnippet from './ContactForm.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Feature/Feature.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import FeatureSnippet from './Feature.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Footer/Footer.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import FooterLight from './Light.vue';
import FooterDark from './Dark.vue';
import FooterAutoDarkMode from './AutoDarkMode.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Forms/Forms.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import DefaultForm from './DefaultForm.vue';
import InlineForm from './InlineForm.vue';
import DisabledForm from './DisabledForm.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Hero/Hero.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import HeroSnippet from './Hero.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Layouts/Layouts.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import SidebarLayoutSnippet from './SidebarLayout.vue';

export default {
Expand Down
3 changes: 2 additions & 1 deletion packages/blocks/src/Layouts/SidebarLayout.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import {List, ListItem, ListItemHeader} from '@morpheme/list';
import {Dropdown, DropdownItemProps} from '@morpheme/dropdown';
import type { DropdownItemProps} from '@morpheme/dropdown';
import {Dropdown} from '@morpheme/dropdown';
import Icon from '@morpheme/icon';
import {ref, watch} from 'vue';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/Navbar/Navbar.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Navbar from './Navbar.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/bottom-sheets/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Ref} from 'vue';
import type {Ref} from 'vue';

export type BottomSheetAction = {
text?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/breadcrumbs/src/VBreadcrumbs.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Dropdown, DropdownBtn, DropdownItem} from '@morpheme/dropdown';
import VBreadcrumbs from './VBreadcrumbs.vue';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Icon from '@morpheme/icon';
import type {VBreadcrumbItemProps} from './types';
import {ref} from 'vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/button/src/VBtn.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import VBtn from './VBtn.vue';
import type {Props as VBtnProps} from './VBtn.vue';
import VIcon from '@morpheme/icon';
Expand Down
2 changes: 1 addition & 1 deletion packages/card/src/VCard.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import VCard from './VCard.vue';
import VBtn from '@morpheme/button';
import {defaultColors} from '@morpheme/theme/defaultTheme';
Expand Down
2 changes: 1 addition & 1 deletion packages/collapsible/src/VCollapse.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import {ref} from 'vue';
import VCollapse from './VCollapse.vue';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/collapsible/src/VCollapsible.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import {ref} from 'vue';
import VCollapsible from './VCollapsible.vue';
import VCollapsibleGroup from './VCollapsibleGroup.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/container/src/VContainer.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { VBtn, VAppShell, VAppBar, VLogo, VList, VListItem } from '@morpheme/ui';
import {NavDrawer as VNavDrawer} from '@morpheme/nav-drawer'
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import VContainer from './VContainer.vue';
import { ref } from 'vue';

Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/VEditor.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import VEditor from './VEditor.vue';
import VBtn from '@morpheme/button';
import {object, string} from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/FormField.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ref } from 'vue';
import FormField from './FormField.vue';
import { Meta, StoryFn } from '@storybook/vue3';
import type { Meta, StoryFn } from '@storybook/vue3';

export default {
title: 'Experimental/Forms/Field',
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/checkbox/Checkbox.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import VCheckbox from './Checkbox.vue';
import { ref, computed } from 'vue';
import {themeColors} from '@morpheme/utils/colors';
import {sizes} from '@morpheme/utils/sizes';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {object, boolean} from 'yup';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/checkbox/VCheckbox.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import VCheckbox from './VCheckbox.vue';
import {ref} from 'vue';
import {themeColors} from '@morpheme/utils/colors';
import {sizes} from '@morpheme/utils/sizes';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {object, boolean, array} from 'yup';
import VBtn from '@morpheme/button';
Expand Down
3 changes: 2 additions & 1 deletion packages/forms/src/checkbox/VCheckbox.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import {computed, type PropType} from 'vue';
import {useFormValue, ValidationMode} from '../composables';
import type { ValidationMode} from '../composables';
import {useFormValue} from '../composables';
type CheckboxValue = any[] | boolean | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/file-input/FileInput.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import VBtn from '@morpheme/button'
import { Field, useForm } from 'vee-validate';
import { ref } from 'vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/file-input/VFileUpload.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {mixed, object} from 'yup';
import VInput from '../input/VInput.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/file-input/VFileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import VFileUploadDefaultTheme from './VFileUploadDefaultTheme.vue';
import VFileUploadButtonTheme from './VFileUploadButtonTheme.vue';
import VFileUploadImageTheme from './VFileUploadImageTheme.vue';
import VFileUploadDropzoneTheme from './VFileUploadDropzoneTheme.vue';
import {FileValue} from './types';
import type {FileValue} from './types';
const props = defineProps({
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/form-group/VFormGroup.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import VFormGroup from './VFormGroup.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/form-select/Select.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import {sizes} from '@morpheme/utils/sizes';
import {useForm} from 'vee-validate';
import {object, string} from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/form-select/VFormSelect.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story, Meta} from '@storybook/vue3';
import type {Story, Meta} from '@storybook/vue3';
import {sizes} from '@morpheme/utils/sizes';
import type {VFormSelectItem as VFormSelectProps} from './types';
import VFormSelect from './VFormSelect.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/input/Input.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VInput from './Input.vue';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Icon from '@morpheme/icon';
import {themeColors} from '@morpheme/utils';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/input/VInput.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VInput from './VInput.vue';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Icon from '@morpheme/icon';
import {themeColors} from '@morpheme/utils';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/input/VInputRange.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {ref} from 'vue';
import {object} from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/radio/Radio.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VRadio from './Radio.vue';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm, Field} from 'vee-validate';
import {object, string} from 'yup';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/radio/VRadio.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VRadio from './VRadio.vue';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {object, string} from 'yup';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/radio/VRadioGroup.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {useForm} from 'vee-validate';
import {object, number, string} from 'yup';
import VRadioGroup from './VRadioGroup.vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/stories/Forms.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import Forms from './Forms.story.vue';
import FormsWithValidation from './FormsWithValidation.story.vue';

Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/textarea/Textarea.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {sizes} from '@morpheme/utils';
import VTextarea from './Textarea.vue';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/textarea/TextareaInput.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {sizes} from '@morpheme/utils';
import VTextarea from './TextareaInput.vue';
import VBtn from '@morpheme/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/src/Icon.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import Icon from './Icon.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/iconsax/src/Iconsax.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Story} from '@storybook/vue3';
import type {Story} from '@storybook/vue3';
import Iconsax from './Iconsax.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/layouts/src/Grid.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {VSelect} from '@morpheme/select';
import {alignItems, flexWrap, justifyContent} from './grid';
import {VCard} from '@morpheme/card';
import {StoryFn} from '@storybook/vue3';
import type {StoryFn} from '@storybook/vue3';
import VRow from './VRow.vue';
import VCol from './VCol.vue';
import {reactive, ref} from 'vue';
Expand Down
2 changes: 1 addition & 1 deletion packages/list/src/List.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {VSelect} from '@morpheme/select';
import VAvatar from '@morpheme/avatar';
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import {Icon} from '@iconify/vue';
import List from './List.vue';
import ListItem from './ListItem.vue';
Expand Down
3 changes: 2 additions & 1 deletion packages/list/src/List.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, provide, toRefs } from "vue";
import { VListContextApi, VListInjectionKey } from "./api";
import type { VListContextApi} from "./api";
import { VListInjectionKey } from "./api";

type Props = {
hidePrepend?: boolean;
Expand Down
3 changes: 2 additions & 1 deletion packages/list/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Ref, inject } from 'vue';
import type { Ref} from 'vue';
import { inject } from 'vue';

export interface VListContextApi {
hidePrepend?: Ref<boolean>;
Expand Down
2 changes: 1 addition & 1 deletion packages/logo/src/VLogo.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import VLogo from './VLogo.vue';
import {sizes} from './types';

Expand Down
2 changes: 1 addition & 1 deletion packages/menu/src/VMenu.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from '@storybook/vue3';
import type {Meta, Story} from '@storybook/vue3';
import VMenu from './VMenu.vue';

export default {
Expand Down
Loading

0 comments on commit aa9d73a

Please sign in to comment.