@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +98 -3
- package/auto-imports.d.ts +6 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +23 -16
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
- package/dist/components/VvAccordion/index.d.ts +4 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
- package/dist/components/VvAccordionGroup/index.d.ts +4 -1
- package/dist/components/VvAction/VvAction.es.js +58 -13
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
- package/dist/components/VvAction/index.d.ts +25 -4
- package/dist/components/VvAlert/VvAlert.es.js +195 -152
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
- package/dist/components/VvAlert/index.d.ts +9 -5
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
- package/dist/components/VvAlertGroup/index.d.ts +6 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +73 -17
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +259 -49
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +187 -141
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
- package/dist/components/VvButton/index.d.ts +41 -14
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +84 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -22
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
- package/dist/components/VvCheckbox/index.d.ts +45 -12
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
- package/dist/components/VvCombobox/index.d.ts +53 -22
- package/dist/components/VvDialog/VvDialog.es.js +136 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
- package/dist/components/VvDropdown/index.d.ts +16 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
- package/dist/components/VvInputFile/index.d.ts +179 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +331 -293
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
- package/dist/components/VvInputText/index.d.ts +71 -29
- package/dist/components/VvNav/VvNav.es.js +151 -73
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
- package/dist/components/VvNav/index.d.ts +5 -13
- package/dist/components/VvNavItem/VvNavItem.es.js +436 -0
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.es.js +65 -14
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +89 -21
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
- package/dist/components/VvRadio/index.d.ts +44 -11
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +248 -226
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +256 -110
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
- package/dist/components/VvTab/index.d.ts +13 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
- package/dist/components/VvTooltip/index.d.ts +4 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +2902 -1329
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +37 -4
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +88 -1
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +92 -31
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +90 -26
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +81 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +287 -73
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +78 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -37
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +6 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +37 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +18 -0
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +97 -80
- package/src/Volver.ts +31 -20
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +2 -2
- package/src/components/VvAction/VvAction.vue +5 -2
- package/src/components/VvAlert/index.ts +1 -3
- package/src/components/VvAlertGroup/index.ts +2 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +6 -6
- package/src/components/VvButton/index.ts +2 -4
- package/src/components/VvCombobox/VvCombobox.vue +24 -16
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +365 -0
- package/src/components/VvInputFile/index.ts +116 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +17 -18
- package/src/components/VvInputText/index.ts +7 -15
- package/src/components/VvNav/VvNav.vue +30 -50
- package/src/components/VvNav/VvNavItem.vue +18 -0
- package/src/components/VvNav/VvNavSeparator.vue +11 -0
- package/src/components/VvNav/index.ts +2 -15
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +63 -35
- package/src/components/VvTab/index.ts +10 -4
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/useUniqueId.ts +2 -2
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +115 -27
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/Nav/Nav.settings.ts +3 -4
- package/src/stories/Nav/Nav.test.ts +4 -15
- package/src/stories/Tab/Tab.settings.ts +9 -9
- package/src/stories/Tab/Tab.stories.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +6 -14
- package/src/stories/argTypes.ts +1 -1
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +6 -0
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +20 -0
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
- package/src/components/VvNav/VvNavItemTitle.vue +0 -11
- package/src/components/VvNav/VvNavSeparator.ts +0 -8
- package/src/types/generic.d.ts +0 -6
- /package/src/types/{alert.d.ts → alert.ts} +0 -0
- /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
- /package/src/types/{group.d.ts → group.ts} +0 -0
|
@@ -3,4 +3,4 @@ import VvAlertGroup from '@/components/VvAlertGroup/VvAlertGroup.vue';
|
|
|
3
3
|
import { type Story } from './AlertGroup.stories';
|
|
4
4
|
declare const meta: Meta<typeof VvAlertGroup>;
|
|
5
5
|
export default meta;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -332,6 +332,14 @@ export declare const argTypes: {
|
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
334
|
};
|
|
335
|
+
'update:search': {
|
|
336
|
+
table: {
|
|
337
|
+
category: string;
|
|
338
|
+
type: {
|
|
339
|
+
summary: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
335
343
|
placement: {
|
|
336
344
|
description: string;
|
|
337
345
|
options: (import("../../constants").Side | import("../../constants").Placement)[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const defaultArgs: {
|
|
2
|
+
name: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const argTypes: {
|
|
6
|
+
modifiers: {
|
|
7
|
+
options: string[];
|
|
8
|
+
description: string;
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
'drop-area': {
|
|
14
|
+
description: string;
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
table: {
|
|
19
|
+
category: string;
|
|
20
|
+
type: {
|
|
21
|
+
summary: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
'update:model-value': {
|
|
26
|
+
table: {
|
|
27
|
+
category: string;
|
|
28
|
+
type: {
|
|
29
|
+
summary: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
hintLabel: {
|
|
34
|
+
description: string;
|
|
35
|
+
control: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
table: {
|
|
39
|
+
type: {
|
|
40
|
+
summary: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
hint: {
|
|
45
|
+
description: string;
|
|
46
|
+
control: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
table: {
|
|
50
|
+
category: string;
|
|
51
|
+
type: {
|
|
52
|
+
summary: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Readonly: Story;
|
|
8
|
+
export declare const Valid: Story;
|
|
9
|
+
export declare const Invalid: Story;
|
|
10
|
+
export declare const Hint: Story;
|
|
11
|
+
export declare const Loading: Story;
|
|
12
|
+
export declare const Progress: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
3
|
+
declare const meta: Meta<typeof VvInputFile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const InputHidden: Story;
|
|
8
|
+
export declare const Square: Story;
|
|
9
|
+
export declare const Circle: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
3
|
+
declare const meta: Meta<typeof VvInputFile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
+
export declare const DefaultPosition: Story;
|
|
7
|
+
export declare const After: Story;
|
|
8
|
+
export declare const Src: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
3
|
+
declare const meta: Meta<typeof VvInputFile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
+
export declare const DropArea: Story;
|
|
7
|
+
export declare const Hint: Story;
|
|
@@ -1,37 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
to?: undefined;
|
|
6
|
-
id?: undefined;
|
|
7
|
-
on?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
title: string;
|
|
10
|
-
to: string;
|
|
11
|
-
href?: undefined;
|
|
12
|
-
id?: undefined;
|
|
13
|
-
on?: undefined;
|
|
14
|
-
} | {
|
|
15
|
-
id: string;
|
|
16
|
-
title: string;
|
|
17
|
-
to: string;
|
|
18
|
-
on: {
|
|
19
|
-
click: () => void;
|
|
20
|
-
};
|
|
21
|
-
href?: undefined;
|
|
22
|
-
})[];
|
|
23
|
-
};
|
|
24
|
-
export declare const defaultArgTypes: {
|
|
25
|
-
tabId: {
|
|
26
|
-
description: string;
|
|
27
|
-
control: {
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
table: {
|
|
31
|
-
category: string;
|
|
32
|
-
type: {
|
|
33
|
-
summary: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
1
|
+
import type { ArgTypes, Meta } from '@storybook/vue3';
|
|
2
|
+
import type { VvTab } from '@/components';
|
|
3
|
+
export declare const defaultArgs: Meta<typeof VvTab>['args'];
|
|
4
|
+
export declare const defaultArgTypes: ArgTypes;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type AlertModifiers = 'success' | 'info' | 'warning' | 'danger' | 'brand' | 'accent';
|
|
2
|
+
export type Alert = {
|
|
3
|
+
id: string | number;
|
|
4
|
+
group: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
icon: string | Record<string, unknown>;
|
|
7
|
+
content?: string;
|
|
8
|
+
footer?: string;
|
|
9
|
+
modifiers: AlertModifiers;
|
|
10
|
+
dismissable: boolean;
|
|
11
|
+
autoClose: number;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare class ValidationError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export type BlurhashWorkerType = {
|
|
4
|
+
encode: (pixels: Uint8ClampedArray, width: number, height: number, componentX: number, componentY: number) => string;
|
|
5
|
+
decode: (blurhash: string, width: number, height: number, punch?: number) => Uint8ClampedArray;
|
|
6
|
+
isBlurhashValid: (blurhash: string) => {
|
|
7
|
+
result: boolean;
|
|
8
|
+
errorReason?: string;
|
|
9
|
+
};
|
|
10
|
+
ValidationError: ValidationError;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { flip, autoPlacement, shift, offset, size } from '@floating-ui/vue';
|
|
2
|
+
export type AutoPlacementOptions = Parameters<typeof autoPlacement>[0];
|
|
3
|
+
export type FlipOptions = Parameters<typeof flip>[0];
|
|
4
|
+
export type ShiftOptions = Parameters<typeof shift>[0];
|
|
5
|
+
export type OffsetOptions = Parameters<typeof offset>[0];
|
|
6
|
+
export type SizeOptions = Parameters<typeof size>[0];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* State shared for a group of elements
|
|
4
|
+
*/
|
|
5
|
+
export default interface GroupState {
|
|
6
|
+
[itemKey: string]: Ref<unknown> | unknown | undefined;
|
|
7
|
+
key: string | number | symbol;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* State shared in a group of inputs
|
|
11
|
+
*/
|
|
12
|
+
export interface InputGroupState extends GroupState {
|
|
13
|
+
readonly: Ref<boolean>;
|
|
14
|
+
disabled: Ref<boolean>;
|
|
15
|
+
valid: Ref<boolean>;
|
|
16
|
+
invalid: Ref<boolean>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* State shared in a group of buttons
|
|
20
|
+
*/
|
|
21
|
+
export interface ButtonGroupState extends GroupState {
|
|
22
|
+
modelValue: Ref<string | number | boolean | (string | number | boolean)[] | undefined>;
|
|
23
|
+
disabled: Ref<boolean>;
|
|
24
|
+
toggle: Ref<boolean>;
|
|
25
|
+
multiple: Ref<boolean>;
|
|
26
|
+
unselectable: Ref<boolean>;
|
|
27
|
+
modifiers: Ref<string | string[] | undefined>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* State shared in a group of accordions
|
|
31
|
+
*/
|
|
32
|
+
export interface AccordionGroupState extends GroupState {
|
|
33
|
+
collapse: Ref<boolean>;
|
|
34
|
+
disabled: Ref<boolean>;
|
|
35
|
+
modifiers: Ref<string[] | string | undefined>;
|
|
36
|
+
not: Ref<boolean>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type UploadedFile<Source = undefined> = Source extends undefined ? {
|
|
2
|
+
name: string;
|
|
3
|
+
size: number;
|
|
4
|
+
type: string;
|
|
5
|
+
url: string;
|
|
6
|
+
thumbnailUrl?: string;
|
|
7
|
+
lastModified?: number;
|
|
8
|
+
} : {
|
|
9
|
+
name: string;
|
|
10
|
+
size: number;
|
|
11
|
+
type: string;
|
|
12
|
+
url: string;
|
|
13
|
+
thumbnailUrl?: string;
|
|
14
|
+
lastModified?: number;
|
|
15
|
+
source: Source;
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AnchorTarget } from '@/constants';
|
|
2
|
+
export type NavItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
to?: string | Record<string, unknown>;
|
|
7
|
+
href?: string;
|
|
8
|
+
target?: `${AnchorTarget}`;
|
|
9
|
+
rel?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
current?: boolean;
|
|
12
|
+
class?: string | string[];
|
|
13
|
+
on?: Record<'click' | string, () => void>;
|
|
14
|
+
data?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export type NavItemTab = NavItem & {
|
|
17
|
+
tab?: string;
|
|
18
|
+
};
|
|
@@ -80,4 +80,3 @@ export declare function propsToObject(props: any): Record<string, unknown>;
|
|
|
80
80
|
* @return {object[]}
|
|
81
81
|
*/
|
|
82
82
|
export declare function filterArray<T = Record<string, unknown>>(list: T[], filter: T[] | string[], key: string): T[];
|
|
83
|
-
export declare function kebabCase(value: string): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volverjs/ui-vue",
|
|
3
3
|
"description": "@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.",
|
|
4
|
-
"author": "
|
|
4
|
+
"author": "8 Wave",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vue",
|
|
@@ -19,10 +19,7 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/volverjs/ui-vue/issues"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.0.10-beta.
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">= 16.x"
|
|
25
|
-
},
|
|
22
|
+
"version": "0.0.10-beta.21",
|
|
26
23
|
"packageManager": "pnpm@8.7.0",
|
|
27
24
|
"type": "module",
|
|
28
25
|
"main": "./dist/Volver.umd.js",
|
|
@@ -39,93 +36,97 @@
|
|
|
39
36
|
],
|
|
40
37
|
"dependencies": {
|
|
41
38
|
"@floating-ui/vue": "^1.0.2",
|
|
42
|
-
"@iconify/tools": "^
|
|
39
|
+
"@iconify/tools": "^4.0.0",
|
|
43
40
|
"@iconify/vue": "^4.1.1",
|
|
44
|
-
"@vueuse/core": "^10.
|
|
45
|
-
"
|
|
41
|
+
"@vueuse/core": "^10.7.1",
|
|
42
|
+
"blurhash": "^2.0.5",
|
|
43
|
+
"comlink": "^4.4.1",
|
|
44
|
+
"jsdom": "^23.0.1",
|
|
46
45
|
"mitt": "^3.0.1",
|
|
47
|
-
"
|
|
46
|
+
"pica": "^9.0.1",
|
|
48
47
|
"ts-dot-prop": "^2.1.3",
|
|
49
|
-
"
|
|
50
|
-
"vue
|
|
48
|
+
"uid": "^2.0.2",
|
|
49
|
+
"vue": "^3.4.0",
|
|
50
|
+
"vue-imask": "^7.3.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@volverjs/style": "0.*"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
58
|
-
"@babel/preset-typescript": "^7.
|
|
56
|
+
"@babel/core": "^7.23.6",
|
|
57
|
+
"@babel/preset-env": "^7.23.6",
|
|
58
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
59
59
|
"@iconify/types": "^2.0.0",
|
|
60
|
-
"@iconify/utils": "^2.1.
|
|
61
|
-
"@mdx-js/react": "^
|
|
62
|
-
"@rushstack/eslint-patch": "^1.
|
|
63
|
-
"@storybook/addon-a11y": "^7.
|
|
64
|
-
"@storybook/addon-actions": "^7.
|
|
65
|
-
"@storybook/addon-docs": "^7.
|
|
66
|
-
"@storybook/addon-essentials": "^7.
|
|
67
|
-
"@storybook/addon-interactions": "^7.
|
|
68
|
-
"@storybook/addon-links": "^7.
|
|
69
|
-
"@storybook/channel-postmessage": "^7.
|
|
70
|
-
"@storybook/channel-websocket": "^7.
|
|
71
|
-
"@storybook/cli": "^7.
|
|
72
|
-
"@storybook/client-api": "^7.
|
|
73
|
-
"@storybook/client-logger": "^7.
|
|
74
|
-
"@storybook/core-common": "^7.
|
|
75
|
-
"@storybook/jest": "^0.2.
|
|
76
|
-
"@storybook/preview-api": "^7.
|
|
77
|
-
"@storybook/preview-web": "^7.
|
|
78
|
-
"@storybook/test-runner": "^0.
|
|
79
|
-
"@storybook/testing-library": "^0.2.
|
|
80
|
-
"@storybook/vue3": "^7.
|
|
81
|
-
"@storybook/vue3-vite": "^7.
|
|
82
|
-
"@tsconfig/node18": "^18.2.
|
|
83
|
-
"@types/jest-axe": "^3.5.
|
|
84
|
-
"@types/jsdom": "^21.1.
|
|
85
|
-
"@types/node": "^20.5
|
|
86
|
-
"@types/
|
|
87
|
-
"@types/
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@vue/
|
|
92
|
-
"@vue/eslint-config-
|
|
93
|
-
"@vue/
|
|
94
|
-
"@vue/
|
|
95
|
-
"
|
|
60
|
+
"@iconify/utils": "^2.1.14",
|
|
61
|
+
"@mdx-js/react": "^3.0.0",
|
|
62
|
+
"@rushstack/eslint-patch": "^1.6.1",
|
|
63
|
+
"@storybook/addon-a11y": "^7.6.6",
|
|
64
|
+
"@storybook/addon-actions": "^7.6.6",
|
|
65
|
+
"@storybook/addon-docs": "^7.6.6",
|
|
66
|
+
"@storybook/addon-essentials": "^7.6.6",
|
|
67
|
+
"@storybook/addon-interactions": "^7.6.6",
|
|
68
|
+
"@storybook/addon-links": "^7.6.6",
|
|
69
|
+
"@storybook/channel-postmessage": "^7.6.6",
|
|
70
|
+
"@storybook/channel-websocket": "^7.6.6",
|
|
71
|
+
"@storybook/cli": "^7.6.6",
|
|
72
|
+
"@storybook/client-api": "^7.6.6",
|
|
73
|
+
"@storybook/client-logger": "^7.6.6",
|
|
74
|
+
"@storybook/core-common": "^7.6.6",
|
|
75
|
+
"@storybook/jest": "^0.2.3",
|
|
76
|
+
"@storybook/preview-api": "^7.6.6",
|
|
77
|
+
"@storybook/preview-web": "^7.6.6",
|
|
78
|
+
"@storybook/test-runner": "^0.16.0",
|
|
79
|
+
"@storybook/testing-library": "^0.2.2",
|
|
80
|
+
"@storybook/vue3": "^7.6.6",
|
|
81
|
+
"@storybook/vue3-vite": "^7.6.6",
|
|
82
|
+
"@tsconfig/node18": "^18.2.2",
|
|
83
|
+
"@types/jest-axe": "^3.5.9",
|
|
84
|
+
"@types/jsdom": "^21.1.6",
|
|
85
|
+
"@types/node": "^20.10.5",
|
|
86
|
+
"@types/pica": "^9.0.4",
|
|
87
|
+
"@types/react": "^18.2.46",
|
|
88
|
+
"@types/yargs": "^17.0.32",
|
|
89
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
90
|
+
"@volverjs/style": "0.1.12-beta.15",
|
|
91
|
+
"@vue/compiler-sfc": "^3.4.0",
|
|
92
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
93
|
+
"@vue/eslint-config-typescript": "^12.0.0",
|
|
94
|
+
"@vue/test-utils": "^2.4.3",
|
|
95
|
+
"@vue/tsconfig": "^0.5.1",
|
|
96
|
+
"change-case": "^5.3.0",
|
|
96
97
|
"chokidar": "^3.5.3",
|
|
97
|
-
"eslint": "^8.
|
|
98
|
-
"eslint-config-prettier": "^9.
|
|
99
|
-
"eslint-mdx": "^
|
|
100
|
-
"eslint-plugin-mdx": "^
|
|
101
|
-
"eslint-plugin-prettier": "^5.
|
|
102
|
-
"eslint-plugin-storybook": "^0.6.
|
|
103
|
-
"eslint-plugin-vue": "^9.
|
|
98
|
+
"eslint": "^8.56.0",
|
|
99
|
+
"eslint-config-prettier": "^9.1.0",
|
|
100
|
+
"eslint-mdx": "^3.1.1",
|
|
101
|
+
"eslint-plugin-mdx": "^3.1.1",
|
|
102
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
103
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
104
|
+
"eslint-plugin-vue": "^9.19.2",
|
|
104
105
|
"glob": "7.2.3",
|
|
105
106
|
"jest-axe": "^8.0.0",
|
|
106
|
-
"jest-diff": "^29.
|
|
107
|
+
"jest-diff": "^29.7.0",
|
|
107
108
|
"jest-get-type": "^29.6.3",
|
|
108
|
-
"jsdom": "^
|
|
109
|
+
"jsdom": "^23.0.1",
|
|
109
110
|
"npm-run-all": "^4.1.5",
|
|
110
|
-
"prettier": "^3.
|
|
111
|
-
"pretty-format": "^29.
|
|
111
|
+
"prettier": "^3.1.1",
|
|
112
|
+
"pretty-format": "^29.7.0",
|
|
112
113
|
"react": "^18.2.0",
|
|
113
114
|
"react-dom": "^18.2.0",
|
|
114
|
-
"remark": "^
|
|
115
|
-
"sass": "^1.
|
|
116
|
-
"storybook": "^7.
|
|
115
|
+
"remark": "^15.0.1",
|
|
116
|
+
"sass": "^1.69.6",
|
|
117
|
+
"storybook": "^7.6.6",
|
|
117
118
|
"storybook-addon-markdown-docs": "^2.0.0",
|
|
118
|
-
"storybook-dark-mode": "^3.0.
|
|
119
|
+
"storybook-dark-mode": "^3.0.3",
|
|
119
120
|
"storybook-version": "^0.1.1",
|
|
120
|
-
"terser": "^5.
|
|
121
|
-
"ts-node": "^10.9.
|
|
122
|
-
"typescript": "~5.
|
|
123
|
-
"unplugin-auto-import": "^0.
|
|
124
|
-
"unplugin-vue-components": "^0.
|
|
125
|
-
"vite": "^
|
|
121
|
+
"terser": "^5.26.0",
|
|
122
|
+
"ts-node": "^10.9.2",
|
|
123
|
+
"typescript": "~5.3.3",
|
|
124
|
+
"unplugin-auto-import": "^0.17.3",
|
|
125
|
+
"unplugin-vue-components": "^0.26.0",
|
|
126
|
+
"vite": "^5.0.10",
|
|
126
127
|
"vite-plugin-eslint": "^1.8.1",
|
|
127
|
-
"vite-plugin-externalize-deps": "^0.
|
|
128
|
-
"vue-tsc": "^1.8.
|
|
128
|
+
"vite-plugin-externalize-deps": "^0.8.0",
|
|
129
|
+
"vue-tsc": "^1.8.27",
|
|
129
130
|
"yargs": "^17.7.2"
|
|
130
131
|
},
|
|
131
132
|
"typesVersions": {
|
|
@@ -220,14 +221,20 @@
|
|
|
220
221
|
"vv-icon": [
|
|
221
222
|
"dist/components/VvIcon/VvIcon.vue.d.ts"
|
|
222
223
|
],
|
|
224
|
+
"vv-input-file": [
|
|
225
|
+
"dist/components/VvInputFile/VvInputFile.vue.d.ts"
|
|
226
|
+
],
|
|
223
227
|
"vv-input-text": [
|
|
224
228
|
"dist/components/VvInputText/VvInputText.vue.d.ts"
|
|
225
229
|
],
|
|
226
230
|
"vv-nav": [
|
|
227
231
|
"dist/components/VvNav/VvNav.vue.d.ts"
|
|
228
232
|
],
|
|
229
|
-
"vv-nav-item
|
|
230
|
-
"dist/components/
|
|
233
|
+
"vv-nav-item": [
|
|
234
|
+
"dist/components/VvNavItem/VvNavItem.vue.d.ts"
|
|
235
|
+
],
|
|
236
|
+
"vv-nav-separator": [
|
|
237
|
+
"dist/components/VvNavSeparator/VvNavSeparator.vue.d.ts"
|
|
231
238
|
],
|
|
232
239
|
"vv-progress": [
|
|
233
240
|
"dist/components/VvProgress/VvProgress.vue.d.ts"
|
|
@@ -405,6 +412,11 @@
|
|
|
405
412
|
"import": "./dist/components/VvIcon/VvIcon.es.js",
|
|
406
413
|
"default": "./dist/components/VvIcon/VvIcon.umd.js"
|
|
407
414
|
},
|
|
415
|
+
"./vv-input-file": {
|
|
416
|
+
"types": "./dist/components/VvInputFile/VvInputFile.vue.d.ts",
|
|
417
|
+
"import": "./dist/components/VvInputFile/VvInputFile.es.js",
|
|
418
|
+
"default": "./dist/components/VvInputFile/VvInputFile.umd.js"
|
|
419
|
+
},
|
|
408
420
|
"./vv-input-text": {
|
|
409
421
|
"types": "./dist/components/VvInputText/VvInputText.vue.d.ts",
|
|
410
422
|
"import": "./dist/components/VvInputText/VvInputText.es.js",
|
|
@@ -415,10 +427,15 @@
|
|
|
415
427
|
"import": "./dist/components/VvNav/VvNav.es.js",
|
|
416
428
|
"default": "./dist/components/VvNav/VvNav.umd.js"
|
|
417
429
|
},
|
|
418
|
-
"./vv-nav-item
|
|
419
|
-
"types": "./dist/components/
|
|
420
|
-
"import": "./dist/components/
|
|
421
|
-
"default": "./dist/components/
|
|
430
|
+
"./vv-nav-item": {
|
|
431
|
+
"types": "./dist/components/VvNavItem/VvNavItem.vue.d.ts",
|
|
432
|
+
"import": "./dist/components/VvNavItem/VvNavItem.es.js",
|
|
433
|
+
"default": "./dist/components/VvNavItem/VvNavItem.umd.js"
|
|
434
|
+
},
|
|
435
|
+
"./vv-nav-separator": {
|
|
436
|
+
"types": "./dist/components/VvNavSeparator/VvNavSeparator.vue.d.ts",
|
|
437
|
+
"import": "./dist/components/VvNavSeparator/VvNavSeparator.es.js",
|
|
438
|
+
"default": "./dist/components/VvNavSeparator/VvNavSeparator.umd.js"
|
|
422
439
|
},
|
|
423
440
|
"./vv-progress": {
|
|
424
441
|
"types": "./dist/components/VvProgress/VvProgress.vue.d.ts",
|
|
@@ -463,7 +480,7 @@
|
|
|
463
480
|
"hot": "node ./scripts/build.js --hot",
|
|
464
481
|
"type-check": "vue-tsc --noEmit",
|
|
465
482
|
"lint": "eslint . --ext .vue,.js,.ts,.mdx --fix",
|
|
466
|
-
"generate-icons": "ts-node
|
|
483
|
+
"generate-icons": "node --loader ts-node/esm ./scripts/icons.ts --srcPath=src/assets/icons",
|
|
467
484
|
"generate-tsd": "vue-tsc --declaration --emitDeclarationOnly",
|
|
468
485
|
"test-local": "test-storybook --stories-json",
|
|
469
486
|
"test-remote": "test-storybook --stories-json --url https://volver-ui-vue.vercel.app",
|
package/src/Volver.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { App, Component, Directive, Plugin, Ref } from 'vue'
|
|
1
2
|
import {
|
|
2
|
-
addCollection,
|
|
3
|
-
addIcon,
|
|
4
|
-
addAPIProvider,
|
|
5
3
|
type IconifyIcon,
|
|
6
4
|
type IconifyJSON,
|
|
7
5
|
type PartialIconifyAPIConfig,
|
|
6
|
+
addCollection,
|
|
7
|
+
addIcon,
|
|
8
|
+
addAPIProvider,
|
|
8
9
|
} from '@iconify/vue'
|
|
9
|
-
import
|
|
10
|
+
import { kebabCase } from 'change-case'
|
|
10
11
|
import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from './constants'
|
|
11
12
|
|
|
12
13
|
export function useDefaultProps(
|
|
@@ -36,25 +37,31 @@ export function useDefaultProps(
|
|
|
36
37
|
return {
|
|
37
38
|
...component,
|
|
38
39
|
name: componentName,
|
|
39
|
-
props: Object.keys(props).reduce(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
props: Object.keys(props).reduce(
|
|
41
|
+
(acc, key) => {
|
|
42
|
+
if (!(key in componentDefaults)) {
|
|
43
|
+
acc[key] = props[key]
|
|
44
|
+
return acc
|
|
45
|
+
}
|
|
46
|
+
const customDefault = componentDefaults[key]
|
|
47
|
+
if (
|
|
48
|
+
typeof props[key] === 'function' ||
|
|
49
|
+
Array.isArray(props[key])
|
|
50
|
+
) {
|
|
51
|
+
acc[key] = {
|
|
52
|
+
type: props[key],
|
|
53
|
+
default: customDefault,
|
|
54
|
+
}
|
|
55
|
+
return acc
|
|
56
|
+
}
|
|
46
57
|
acc[key] = {
|
|
47
|
-
|
|
58
|
+
...(props[key] as Record<string, unknown>),
|
|
48
59
|
default: customDefault,
|
|
49
60
|
}
|
|
50
61
|
return acc
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
default: customDefault,
|
|
55
|
-
}
|
|
56
|
-
return acc
|
|
57
|
-
}, {} as Record<string, unknown>),
|
|
62
|
+
},
|
|
63
|
+
{} as Record<string, unknown>,
|
|
64
|
+
),
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
|
|
@@ -248,7 +255,7 @@ const VolverPlugin: Plugin = {
|
|
|
248
255
|
* @param {App} Vue
|
|
249
256
|
* @param {Object} options
|
|
250
257
|
*/
|
|
251
|
-
install(app: App, options: VolverOptions) {
|
|
258
|
+
install(app: App, options: VolverOptions = {}) {
|
|
252
259
|
const volver = new Volver(options)
|
|
253
260
|
|
|
254
261
|
// register global methods
|
|
@@ -277,6 +284,10 @@ const VolverPlugin: Plugin = {
|
|
|
277
284
|
// register directives
|
|
278
285
|
if (options.directives) {
|
|
279
286
|
Object.entries(options.directives).forEach(([name, directive]) => {
|
|
287
|
+
const kebabName = kebabCase(name)
|
|
288
|
+
if (kebabName.startsWith('v-')) {
|
|
289
|
+
name = kebabName.substring(2).toLocaleLowerCase()
|
|
290
|
+
}
|
|
280
291
|
app.directive(name, directive)
|
|
281
292
|
})
|
|
282
293
|
}
|