@volverjs/ui-vue 0.0.4 → 0.0.5-beta.2
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/README.md +2 -2
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +19 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
- package/dist/components/VvAccordion/index.d.ts +8 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
- package/dist/components/VvAccordionGroup/index.d.ts +8 -0
- package/dist/components/VvAction/VvAction.es.js +276 -98
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
- package/dist/components/VvAction/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +213 -44
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +247 -75
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +646 -360
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
- package/dist/components/VvButton/index.d.ts +13 -13
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +261 -79
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +57 -38
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +562 -274
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +5 -5
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +661 -340
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +1546 -983
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +138 -51
- package/dist/components/VvCombobox/index.d.ts +41 -10
- package/dist/components/VvDialog/VvDialog.es.js +387 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
- package/dist/components/VvDialog/index.d.ts +4 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +452 -244
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +130 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +40 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +373 -160
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +285 -90
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +113 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +986 -462
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +100 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +66 -13
- package/dist/components/VvProgress/VvProgress.es.js +216 -45
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +499 -238
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +598 -304
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +631 -324
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
- package/dist/components/VvSelect/index.d.ts +3 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +676 -355
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +20 -20
- package/dist/components/VvTextarea/index.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +215 -47
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
- package/dist/components/VvTooltip/index.d.ts +2 -2
- package/dist/components/index.es.js +3522 -2231
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcon.d.ts +7 -7
- package/dist/composables/useDebouncedInput.d.ts +4 -1
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useTextCount.d.ts +3 -3
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.es.js +264 -55
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +42 -0
- package/dist/directives/v-contextmenu.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +222 -53
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.es.js +40 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +112 -3607
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +50 -18
- package/dist/resolvers/unplugin.d.ts +7 -1
- package/dist/resolvers/unplugin.es.js +77 -37
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +12 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +12 -0
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +13 -1
- package/package.json +126 -40
- package/src/Volver.ts +49 -22
- 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 +19 -22
- package/src/components/VvAccordion/index.ts +12 -4
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
- package/src/components/VvAccordionGroup/index.ts +8 -0
- package/src/components/VvAction/VvAction.vue +7 -7
- package/src/components/VvAction/index.ts +1 -1
- package/src/components/VvBadge/VvBadge.vue +2 -2
- package/src/components/VvBadge/index.ts +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
- package/src/components/VvButton/VvButton.vue +11 -11
- package/src/components/VvButton/index.ts +10 -9
- package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
- package/src/components/VvButtonGroup/index.ts +1 -1
- package/src/components/VvCard/VvCard.vue +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
- package/src/components/VvCheckbox/index.ts +11 -7
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
- package/src/components/VvCheckboxGroup/index.ts +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +44 -26
- package/src/components/VvCombobox/index.ts +1 -1
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +7 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
- package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
- package/src/components/VvDropdown/index.ts +3 -3
- package/src/components/VvIcon/VvIcon.vue +3 -3
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputClearAction.ts +2 -2
- package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
- package/src/components/VvInputText/VvInputStepAction.ts +3 -2
- package/src/components/VvInputText/VvInputText.vue +130 -37
- package/src/components/VvInputText/VvInputTextActions.ts +5 -8
- package/src/components/VvInputText/index.ts +62 -1
- package/src/components/VvProgress/VvProgress.vue +2 -2
- package/src/components/VvProgress/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +3 -7
- package/src/components/VvRadio/index.ts +11 -7
- package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
- package/src/components/VvRadioGroup/index.ts +1 -1
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvSelect/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -6
- package/src/components/VvTextarea/index.ts +1 -1
- package/src/components/VvTooltip/VvTooltip.vue +2 -2
- package/src/components/VvTooltip/index.ts +3 -3
- package/src/composables/dropdown/useInjectDropdown.ts +2 -2
- package/src/composables/dropdown/useProvideDropdown.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +1 -1
- package/src/composables/group/useProvideGroupState.ts +1 -1
- package/src/composables/useComponentIcon.ts +1 -1
- package/src/composables/useDebouncedInput.ts +10 -3
- package/src/composables/useDefaults.ts +89 -0
- package/src/composables/useModifiers.ts +4 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/directives/index.ts +3 -1
- package/src/directives/v-contextmenu.ts +40 -0
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +1 -1
- package/src/index.ts +0 -2
- package/src/props/index.ts +20 -10
- package/src/resolvers/unplugin.ts +15 -1
- package/src/stories/Accordion/Accordion.stories.mdx +8 -2
- package/src/stories/Accordion/Accordion.test.ts +21 -15
- package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +41 -0
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +40 -0
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +1 -1
- package/src/stories/argTypes.ts +12 -2
- package/src/types/group.d.ts +5 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Placement, Position, Side } from '
|
|
1
|
+
import { Placement, Position, Side } from '../constants';
|
|
2
2
|
export declare const ValidArgTypes: {
|
|
3
3
|
valid: {
|
|
4
4
|
type: string;
|
|
@@ -285,6 +285,18 @@ export declare const DropdownArgTypes: {
|
|
|
285
285
|
};
|
|
286
286
|
};
|
|
287
287
|
};
|
|
288
|
+
strategy: {
|
|
289
|
+
description: string;
|
|
290
|
+
options: string[];
|
|
291
|
+
control: {
|
|
292
|
+
type: string;
|
|
293
|
+
};
|
|
294
|
+
table: {
|
|
295
|
+
defaultValue: {
|
|
296
|
+
summary: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
288
300
|
transitionName: {
|
|
289
301
|
description: string;
|
|
290
302
|
control: {
|
package/package.json
CHANGED
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/volverjs/ui-vue/issues"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.0.
|
|
22
|
+
"version": "0.0.5-beta.2",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">= 16.x"
|
|
25
25
|
},
|
|
26
|
-
"packageManager": "pnpm@7.
|
|
26
|
+
"packageManager": "pnpm@7.29.0",
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./dist/Volver.umd.js",
|
|
29
29
|
"module": "./dist/Volver.es.js",
|
|
@@ -38,23 +38,24 @@
|
|
|
38
38
|
"*.d.ts"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@iconify/tools": "^2.2.2",
|
|
41
|
+
"@floating-ui/vue": "^0.2.1",
|
|
42
|
+
"@iconify/tools": "^2.2.6",
|
|
44
43
|
"@iconify/vue": "^4.1.0",
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
44
|
+
"@volverjs/style": "0.1.9-beta.4",
|
|
45
|
+
"@vueuse/core": "^9.13.0",
|
|
46
|
+
"jsdom": "^21.1.1",
|
|
47
|
+
"maska": "^2.1.7",
|
|
47
48
|
"mitt": "^3.0.0",
|
|
48
|
-
"nanoid": "^4.0.
|
|
49
|
+
"nanoid": "^4.0.1",
|
|
49
50
|
"vue": "^3.2.47"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@babel/core": "^7.
|
|
53
|
+
"@babel/core": "^7.21.3",
|
|
53
54
|
"@babel/preset-env": "^7.20.2",
|
|
54
|
-
"@babel/preset-typescript": "^7.
|
|
55
|
+
"@babel/preset-typescript": "^7.21.0",
|
|
55
56
|
"@iconify/types": "^2.0.0",
|
|
56
|
-
"@iconify/utils": "^2.1.
|
|
57
|
-
"@mdx-js/react": "^2.
|
|
57
|
+
"@iconify/utils": "^2.1.5",
|
|
58
|
+
"@mdx-js/react": "^2.3.0",
|
|
58
59
|
"@rushstack/eslint-patch": "^1.2.0",
|
|
59
60
|
"@storybook/addon-a11y": "7.0.0-beta.40",
|
|
60
61
|
"@storybook/addon-actions": "7.0.0-beta.40",
|
|
@@ -62,7 +63,6 @@
|
|
|
62
63
|
"@storybook/addon-essentials": "7.0.0-beta.40",
|
|
63
64
|
"@storybook/addon-interactions": "7.0.0-beta.40",
|
|
64
65
|
"@storybook/addon-links": "7.0.0-beta.40",
|
|
65
|
-
"@storybook/addons": "7.0.0-beta.40",
|
|
66
66
|
"@storybook/builder-vite": "7.0.0-beta.40",
|
|
67
67
|
"@storybook/channel-postmessage": "7.0.0-beta.40",
|
|
68
68
|
"@storybook/channel-websocket": "7.0.0-beta.40",
|
|
@@ -75,55 +75,52 @@
|
|
|
75
75
|
"@storybook/preview-web": "7.0.0-beta.40",
|
|
76
76
|
"@storybook/test-runner": "^0.10.0-next.8",
|
|
77
77
|
"@storybook/testing-library": "^0.0.14-next.1",
|
|
78
|
-
"@storybook/theming": "7.0.0-beta.40",
|
|
79
78
|
"@storybook/vue3": "7.0.0-beta.40",
|
|
80
79
|
"@storybook/vue3-vite": "7.0.0-beta.40",
|
|
81
80
|
"@types/jest-axe": "^3.5.5",
|
|
82
|
-
"@types/jsdom": "^
|
|
83
|
-
"@types/node": "18.
|
|
84
|
-
"@types/react": "^18.0.
|
|
85
|
-
"@types/yargs": "^17.0.
|
|
86
|
-
"@vitejs/plugin-vue": "^4.
|
|
81
|
+
"@types/jsdom": "^21.1.0",
|
|
82
|
+
"@types/node": "18.15.5",
|
|
83
|
+
"@types/react": "^18.0.28",
|
|
84
|
+
"@types/yargs": "^17.0.23",
|
|
85
|
+
"@vitejs/plugin-vue": "^4.1.0",
|
|
87
86
|
"@vue/compiler-sfc": "^3.2.47",
|
|
88
|
-
"@vue/eslint-config-prettier": "^7.
|
|
87
|
+
"@vue/eslint-config-prettier": "^7.1.0",
|
|
89
88
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
90
|
-
"@vue/test-utils": "^2.2
|
|
89
|
+
"@vue/test-utils": "^2.3.2",
|
|
91
90
|
"@vue/tsconfig": "^0.1.3",
|
|
92
91
|
"change-case": "^4.1.2",
|
|
93
|
-
"eslint": "^8.
|
|
94
|
-
"eslint-config-prettier": "^8.
|
|
92
|
+
"eslint": "^8.36.0",
|
|
93
|
+
"eslint-config-prettier": "^8.8.0",
|
|
95
94
|
"eslint-mdx": "^2.0.5",
|
|
96
95
|
"eslint-plugin-mdx": "^2.0.5",
|
|
97
|
-
"eslint-plugin-storybook": "^0.6.
|
|
96
|
+
"eslint-plugin-storybook": "^0.6.11",
|
|
98
97
|
"eslint-plugin-vue": "^9.9.0",
|
|
99
|
-
"glob": "^
|
|
98
|
+
"glob": "^7.1.6",
|
|
100
99
|
"jest-axe": "^7.0.0",
|
|
101
|
-
"jest-diff": "^29.
|
|
102
|
-
"jest-get-type": "^29.
|
|
103
|
-
"jsdom": "^21.1.
|
|
100
|
+
"jest-diff": "^29.5.0",
|
|
101
|
+
"jest-get-type": "^29.4.3",
|
|
102
|
+
"jsdom": "^21.1.1",
|
|
104
103
|
"npm-run-all": "^4.1.5",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"pretty-format": "^29.4.1",
|
|
104
|
+
"prettier": "^2.8.6",
|
|
105
|
+
"pretty-format": "^29.5.0",
|
|
108
106
|
"react": "^18.2.0",
|
|
109
107
|
"react-dom": "^18.2.0",
|
|
110
108
|
"remark": "^14.0.2",
|
|
111
|
-
"sass": "^1.
|
|
112
|
-
"sass-loader": "^13.2.0",
|
|
109
|
+
"sass": "^1.59.3",
|
|
113
110
|
"storybook": "7.0.0-beta.40",
|
|
114
111
|
"storybook-addon-markdown-docs": "^1.0.5",
|
|
115
|
-
"storybook-dark-mode": "^2.
|
|
112
|
+
"storybook-dark-mode": "^2.1.1",
|
|
116
113
|
"storybook-version": "^0.1.1",
|
|
114
|
+
"terser": "^5.16.6",
|
|
117
115
|
"ts-node": "^10.9.1",
|
|
118
116
|
"typescript": "~4.9.5",
|
|
119
|
-
"unplugin-auto-import": "^0.
|
|
120
|
-
"unplugin-vue-components": "^0.
|
|
121
|
-
"vite": "^4.
|
|
117
|
+
"unplugin-auto-import": "^0.15.1",
|
|
118
|
+
"unplugin-vue-components": "^0.24.1",
|
|
119
|
+
"vite": "^4.2.1",
|
|
122
120
|
"vite-plugin-eslint": "^1.8.1",
|
|
123
121
|
"vite-plugin-externalize-deps": "^0.5.0",
|
|
124
|
-
"vue-
|
|
125
|
-
"
|
|
126
|
-
"yargs": "^17.6.2"
|
|
122
|
+
"vue-tsc": "^1.2.0",
|
|
123
|
+
"yargs": "^17.7.1"
|
|
127
124
|
},
|
|
128
125
|
"typesVersions": {
|
|
129
126
|
"*": {
|
|
@@ -135,6 +132,90 @@
|
|
|
135
132
|
],
|
|
136
133
|
"icons": [
|
|
137
134
|
"dist/icons.d.ts"
|
|
135
|
+
],
|
|
136
|
+
"directives": [
|
|
137
|
+
"dist/directives/index.d.ts"
|
|
138
|
+
],
|
|
139
|
+
"v-contextmenu": [
|
|
140
|
+
"dist/directives/v-contextmenu.d.ts"
|
|
141
|
+
],
|
|
142
|
+
"v-tooltip": [
|
|
143
|
+
"dist/directives/v-tooltip.d.ts"
|
|
144
|
+
],
|
|
145
|
+
"components": [
|
|
146
|
+
"dist/components/index.d.ts"
|
|
147
|
+
],
|
|
148
|
+
"vv-accordion": [
|
|
149
|
+
"dist/components/VvAccordion/VvAccordion.vue.d.ts"
|
|
150
|
+
],
|
|
151
|
+
"vv-accordion-group": [
|
|
152
|
+
"dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts"
|
|
153
|
+
],
|
|
154
|
+
"vv-action": [
|
|
155
|
+
"dist/components/VvAction/VvAction.vue.d.ts"
|
|
156
|
+
],
|
|
157
|
+
"vv-badge": [
|
|
158
|
+
"dist/components/VvBadge/VvBadge.vue.d.ts"
|
|
159
|
+
],
|
|
160
|
+
"vv-breadcrumb": [
|
|
161
|
+
"dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts"
|
|
162
|
+
],
|
|
163
|
+
"vv-button": [
|
|
164
|
+
"dist/components/VvButton/VvButton.vue.d.ts"
|
|
165
|
+
],
|
|
166
|
+
"vv-button-group": [
|
|
167
|
+
"dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts"
|
|
168
|
+
],
|
|
169
|
+
"vv-card": [
|
|
170
|
+
"dist/components/VvCard/VvCard.vue.d.ts"
|
|
171
|
+
],
|
|
172
|
+
"vv-checkbox": [
|
|
173
|
+
"dist/components/VvCheckbox/VvCheckbox.vue.d.ts"
|
|
174
|
+
],
|
|
175
|
+
"vv-checkbox-group": [
|
|
176
|
+
"dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts"
|
|
177
|
+
],
|
|
178
|
+
"vv-combobox": [
|
|
179
|
+
"dist/components/VvCombobox/VvCombobox.vue.d.ts"
|
|
180
|
+
],
|
|
181
|
+
"vv-dialog": [
|
|
182
|
+
"dist/components/VvDialog/VvDialog.vue.d.ts"
|
|
183
|
+
],
|
|
184
|
+
"vv-dropdown": [
|
|
185
|
+
"dist/components/VvDropdown/VvDropdown.vue.d.ts"
|
|
186
|
+
],
|
|
187
|
+
"vv-dropdown-action": [
|
|
188
|
+
"dist/components/VvDropdownAction/VvDropdownAction.vue.d.ts"
|
|
189
|
+
],
|
|
190
|
+
"vv-dropdown-item": [
|
|
191
|
+
"dist/components/VvDropdownItem/VvDropdownItem.vue.d.ts"
|
|
192
|
+
],
|
|
193
|
+
"vv-dropdown-option": [
|
|
194
|
+
"dist/components/VvDropdownOption/VvDropdownOption.vue.d.ts"
|
|
195
|
+
],
|
|
196
|
+
"vv-icon": [
|
|
197
|
+
"dist/components/VvIcon/VvIcon.vue.d.ts"
|
|
198
|
+
],
|
|
199
|
+
"vv-input-text": [
|
|
200
|
+
"dist/components/VvInputText/VvInputText.vue.d.ts"
|
|
201
|
+
],
|
|
202
|
+
"vv-progress": [
|
|
203
|
+
"dist/components/VvProgress/VvProgress.vue.d.ts"
|
|
204
|
+
],
|
|
205
|
+
"vv-radio": [
|
|
206
|
+
"dist/components/VvRadio/VvRadio.vue.d.ts"
|
|
207
|
+
],
|
|
208
|
+
"vv-radio-group": [
|
|
209
|
+
"dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts"
|
|
210
|
+
],
|
|
211
|
+
"vv-select": [
|
|
212
|
+
"dist/components/VvSelect/VvSelect.vue.d.ts"
|
|
213
|
+
],
|
|
214
|
+
"vv-textarea": [
|
|
215
|
+
"dist/components/VvTextarea/VvTextarea.vue.d.ts"
|
|
216
|
+
],
|
|
217
|
+
"vv-tooltip": [
|
|
218
|
+
"dist/components/VvTooltip/VvTooltip.vue.d.ts"
|
|
138
219
|
]
|
|
139
220
|
}
|
|
140
221
|
},
|
|
@@ -161,6 +242,11 @@
|
|
|
161
242
|
"import": "./dist/directives/index.es.js",
|
|
162
243
|
"default": "./dist/directives/index.umd.js"
|
|
163
244
|
},
|
|
245
|
+
"./v-contextmenu": {
|
|
246
|
+
"types": "./dist/directives/v-contextmenu.d.ts",
|
|
247
|
+
"import": "./dist/directives/v-contextmenu.es.js",
|
|
248
|
+
"default": "./dist/directives/v-contextmenu.umd.js"
|
|
249
|
+
},
|
|
164
250
|
"./v-tooltip": {
|
|
165
251
|
"types": "./dist/directives/v-tooltip.d.ts",
|
|
166
252
|
"import": "./dist/directives/v-tooltip.es.js",
|
package/src/Volver.ts
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
type IconifyJSON,
|
|
7
7
|
type PartialIconifyAPIConfig,
|
|
8
8
|
} from '@iconify/vue'
|
|
9
|
-
import type { App, Component, Directive, Plugin } from 'vue'
|
|
10
|
-
import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from '
|
|
9
|
+
import type { App, Component, Directive, Plugin, Ref } from 'vue'
|
|
10
|
+
import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from './constants'
|
|
11
11
|
|
|
12
12
|
export function useDefaultProps(
|
|
13
13
|
component: Component,
|
|
@@ -83,7 +83,7 @@ export type VolverOptions = {
|
|
|
83
83
|
* @see https://docs.iconify.design/icon-components/vue/add-collection.html
|
|
84
84
|
* @default 'vv'
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
iconsProvider?: string
|
|
87
87
|
/**
|
|
88
88
|
* Components to install
|
|
89
89
|
*/
|
|
@@ -125,19 +125,19 @@ export interface VolverInterface {
|
|
|
125
125
|
*/
|
|
126
126
|
addIcon(name: string, data: IconifyIcon): boolean
|
|
127
127
|
/**
|
|
128
|
-
* Add custom config for provider
|
|
128
|
+
* Add custom config for icons provider
|
|
129
129
|
* @param {String} provider
|
|
130
130
|
* @param {PartialIconifyAPIConfig} customConfig
|
|
131
131
|
* @returns {Boolean} true on success, false if something is wrong with data
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
addIconsAPIProvider(
|
|
134
134
|
provider: string,
|
|
135
135
|
customConfig: PartialIconifyAPIConfig,
|
|
136
136
|
): boolean
|
|
137
137
|
/**
|
|
138
138
|
* Current provider
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
iconsProvider: string
|
|
141
141
|
/**
|
|
142
142
|
* Array of installed iconify collections
|
|
143
143
|
* @see https://docs.iconify.design/types/iconify-json.html
|
|
@@ -147,55 +147,82 @@ export interface VolverInterface {
|
|
|
147
147
|
* Set true inside nuxt
|
|
148
148
|
*/
|
|
149
149
|
nuxt: boolean
|
|
150
|
+
/**
|
|
151
|
+
* Components defaults options
|
|
152
|
+
*/
|
|
153
|
+
defaults: Ref<DefaultOptions>
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
export class Volver implements VolverInterface {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
+
private _fetchOptions: RequestInit = {}
|
|
158
|
+
private _iconsCollections: IconifyJSON[] = []
|
|
159
|
+
private _iconsProvider = DEFAULT_ICONIFY_PROVIDER
|
|
160
|
+
private _nuxt = false
|
|
161
|
+
defaults: Ref<DefaultOptions> = ref({})
|
|
157
162
|
|
|
158
163
|
constructor({
|
|
159
164
|
fetchWithCredentials,
|
|
160
165
|
fetchOptions,
|
|
161
|
-
|
|
166
|
+
iconsProvider,
|
|
162
167
|
nuxt,
|
|
163
168
|
iconsCollections,
|
|
169
|
+
defaults,
|
|
164
170
|
}: VolverOptions = {}) {
|
|
165
171
|
// fetch options
|
|
166
172
|
if (fetchOptions) {
|
|
167
|
-
this.
|
|
173
|
+
this._fetchOptions = fetchOptions
|
|
168
174
|
}
|
|
169
175
|
// fetch with credentials sugar syntax
|
|
170
176
|
if (fetchWithCredentials) {
|
|
171
|
-
this.
|
|
177
|
+
this._fetchOptions = {
|
|
178
|
+
...this._fetchOptions,
|
|
179
|
+
credentials: 'include',
|
|
180
|
+
}
|
|
172
181
|
}
|
|
173
182
|
// default iconify provider
|
|
174
|
-
if (
|
|
175
|
-
this.
|
|
183
|
+
if (iconsProvider) {
|
|
184
|
+
this._iconsProvider = iconsProvider
|
|
176
185
|
}
|
|
177
186
|
// enable nuxt mode
|
|
178
187
|
if (nuxt) {
|
|
179
|
-
this.
|
|
188
|
+
this._nuxt = nuxt
|
|
180
189
|
}
|
|
181
190
|
// add iconify collections
|
|
182
191
|
if (iconsCollections && Array.isArray(iconsCollections)) {
|
|
183
192
|
iconsCollections.forEach((iconsCollection) => {
|
|
184
|
-
this.addCollection(iconsCollection, this.
|
|
193
|
+
this.addCollection(iconsCollection, this._iconsProvider)
|
|
185
194
|
})
|
|
186
195
|
}
|
|
196
|
+
if (defaults) {
|
|
197
|
+
this.defaults.value = defaults
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
get nuxt(): boolean {
|
|
202
|
+
return this._nuxt
|
|
187
203
|
}
|
|
188
204
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
205
|
+
get iconsProvider(): string {
|
|
206
|
+
return this._iconsProvider
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
get iconsCollections(): IconifyJSON[] {
|
|
210
|
+
return this._iconsCollections
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
addCollection(
|
|
214
|
+
collection: IconifyJSON,
|
|
215
|
+
providerName: string = this._iconsProvider,
|
|
216
|
+
): boolean {
|
|
217
|
+
this._iconsCollections.push(collection)
|
|
218
|
+
return addCollection(collection, providerName)
|
|
192
219
|
}
|
|
193
220
|
|
|
194
221
|
addIcon(name: string, data: IconifyIcon): boolean {
|
|
195
222
|
return addIcon(name, data)
|
|
196
223
|
}
|
|
197
224
|
|
|
198
|
-
|
|
225
|
+
addIconsAPIProvider(
|
|
199
226
|
provider: string,
|
|
200
227
|
customConfig: PartialIconifyAPIConfig,
|
|
201
228
|
): boolean {
|
|
@@ -207,7 +234,7 @@ export class Volver implements VolverInterface {
|
|
|
207
234
|
options: RequestInit = { cache: 'force-cache' },
|
|
208
235
|
): Promise<string | undefined> {
|
|
209
236
|
return new Promise((resolve, reject) => {
|
|
210
|
-
fetch(src, { ...this.
|
|
237
|
+
fetch(src, { ...this._fetchOptions, ...options })
|
|
211
238
|
.catch((e) => reject(e))
|
|
212
239
|
.then((response) => response?.text())
|
|
213
240
|
.then((svg?: string) => resolve(svg))
|