@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.20
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 +67 -13
- 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 +111 -37
- 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 +56 -12
- 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 +188 -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 +230 -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 +71 -16
- 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 +257 -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 +165 -137
- 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 +67 -15
- 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 +79 -24
- 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 +89 -21
- 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 +168 -66
- 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 +721 -527
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +145 -72
- package/dist/components/VvCombobox/index.d.ts +53 -22
- package/dist/components/VvDialog/VvDialog.es.js +133 -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 +61 -35
- 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 +80 -21
- 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 +21 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1558 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +190 -0
- package/dist/components/VvInputFile/index.d.ts +74 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +266 -242
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +153 -46
- package/dist/components/VvInputText/index.d.ts +69 -18
- package/dist/components/VvNav/VvNav.es.js +150 -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.d.ts → VvNavSeparator.vue.d.ts} +1 -1
- package/dist/components/VvNav/index.d.ts +5 -13
- package/dist/components/VvNavItem/VvNavItem.es.js +435 -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 +168 -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 +244 -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 +251 -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 +225 -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/index.d.ts +10 -0
- package/dist/components/index.es.js +2635 -1301
- 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 +6 -6
- 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 +13 -0
- package/dist/stories/InputFile/InputFileModifiers.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +6 -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 +14 -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 +91 -74
- 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 +22 -48
- package/src/components/VvInputFile/VvInputFile.vue +302 -0
- package/src/components/VvInputFile/index.ts +38 -0
- package/src/components/VvInputText/VvInputText.vue +13 -14
- 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 +98 -0
- package/src/stories/InputFile/InputFileModifiers.stories.ts +51 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +25 -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 +16 -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/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
|
@@ -1,98 +1,8 @@
|
|
|
1
|
-
import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
|
|
1
|
+
import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
color: String,
|
|
8
|
-
/**
|
|
9
|
-
* Width
|
|
10
|
-
*/
|
|
11
|
-
width: {
|
|
12
|
-
type: [String, Number]
|
|
13
|
-
},
|
|
14
|
-
/**
|
|
15
|
-
* Height
|
|
16
|
-
*/
|
|
17
|
-
height: {
|
|
18
|
-
type: [String, Number]
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* Icon name
|
|
22
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
23
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
24
|
-
*/
|
|
25
|
-
name: {
|
|
26
|
-
type: String,
|
|
27
|
-
required: true
|
|
28
|
-
},
|
|
29
|
-
/**
|
|
30
|
-
* By default 'vv'
|
|
31
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
32
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
33
|
-
*/
|
|
34
|
-
provider: {
|
|
35
|
-
type: String
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* The name of icon set.
|
|
39
|
-
* Icon default options prefix: simple | normal | detailed
|
|
40
|
-
*/
|
|
41
|
-
prefix: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "normal"
|
|
44
|
-
},
|
|
45
|
-
/**
|
|
46
|
-
* Url remote SVG icon
|
|
47
|
-
*/
|
|
48
|
-
src: String,
|
|
49
|
-
/**
|
|
50
|
-
* Horizontal flip
|
|
51
|
-
*/
|
|
52
|
-
horizontalFlip: Boolean,
|
|
53
|
-
/**
|
|
54
|
-
* Vertical flip
|
|
55
|
-
*/
|
|
56
|
-
verticalFlip: Boolean,
|
|
57
|
-
/**
|
|
58
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
59
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
60
|
-
*/
|
|
61
|
-
flip: String,
|
|
62
|
-
/**
|
|
63
|
-
* Icon render mode
|
|
64
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
65
|
-
* 'bg' = span with style using `background`
|
|
66
|
-
* 'mask' = span with style using `mask`
|
|
67
|
-
* 'svg' = svg
|
|
68
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
69
|
-
*/
|
|
70
|
-
mode: String,
|
|
71
|
-
/**
|
|
72
|
-
* Toggles inline or block mode
|
|
73
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
74
|
-
*/
|
|
75
|
-
inline: Boolean,
|
|
76
|
-
/**
|
|
77
|
-
* rotates icon
|
|
78
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
79
|
-
*/
|
|
80
|
-
rotate: [Number, String],
|
|
81
|
-
/**
|
|
82
|
-
* A callback that is called when icon data has been loaded
|
|
83
|
-
*/
|
|
84
|
-
onLoad: Function,
|
|
85
|
-
/**
|
|
86
|
-
* SVG icon string
|
|
87
|
-
*/
|
|
88
|
-
svg: String,
|
|
89
|
-
/**
|
|
90
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
91
|
-
* @values string | string[]
|
|
92
|
-
*/
|
|
93
|
-
modifiers: {
|
|
94
|
-
type: [String, Array]
|
|
95
|
-
}
|
|
3
|
+
const VvIconPropsDefaults = {
|
|
4
|
+
prefix: "normal"
|
|
5
|
+
/* normal */
|
|
96
6
|
};
|
|
97
7
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
98
8
|
function useVolver() {
|
|
@@ -126,7 +36,24 @@ const __default__ = {
|
|
|
126
36
|
};
|
|
127
37
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
38
|
...__default__,
|
|
129
|
-
props:
|
|
39
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
40
|
+
name: {},
|
|
41
|
+
color: {},
|
|
42
|
+
width: {},
|
|
43
|
+
height: {},
|
|
44
|
+
provider: {},
|
|
45
|
+
prefix: {},
|
|
46
|
+
src: {},
|
|
47
|
+
horizontalFlip: { type: Boolean },
|
|
48
|
+
verticalFlip: { type: Boolean },
|
|
49
|
+
flip: {},
|
|
50
|
+
mode: {},
|
|
51
|
+
inline: { type: Boolean },
|
|
52
|
+
rotate: {},
|
|
53
|
+
onLoad: { type: Function },
|
|
54
|
+
svg: {},
|
|
55
|
+
modifiers: {}
|
|
56
|
+
}, VvIconPropsDefaults),
|
|
130
57
|
setup(__props) {
|
|
131
58
|
const props = __props;
|
|
132
59
|
const hasRotate = computed(() => {
|
|
@@ -213,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
213
140
|
color: _ctx.color,
|
|
214
141
|
onLoad: _ctx.onLoad,
|
|
215
142
|
icon: unref(icon)
|
|
216
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
143
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
217
144
|
};
|
|
218
145
|
}
|
|
219
146
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(o,n,i){return e.computed((()=>{const r={[o]:!0},t="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return t&&Array.isArray(t)&&t.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),i&&Object.keys(i.value).forEach((n=>{r[`${o}--${n}`]=e.unref(i.value[n])})),r}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${s.value}:${r.prefix}:${e}`;if(o.iconExists(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${s.value}:${n.prefix}:${e}`;return o.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,onLoad:n.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
|
|
@@ -1,69 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
-
};
|
|
9
|
-
name: {
|
|
10
|
-
type: StringConstructor;
|
|
11
|
-
required: boolean;
|
|
12
|
-
};
|
|
13
|
-
provider: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
};
|
|
16
|
-
prefix: {
|
|
17
|
-
type: globalThis.PropType<string>;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
src: StringConstructor;
|
|
21
|
-
horizontalFlip: BooleanConstructor;
|
|
22
|
-
verticalFlip: BooleanConstructor;
|
|
23
|
-
flip: StringConstructor;
|
|
24
|
-
mode: globalThis.PropType<import("@iconify/vue").IconifyRenderMode>;
|
|
25
|
-
inline: BooleanConstructor;
|
|
26
|
-
rotate: (StringConstructor | NumberConstructor)[];
|
|
27
|
-
onLoad: globalThis.PropType<import("@iconify/vue").IconifyIconOnLoad>;
|
|
28
|
-
svg: StringConstructor;
|
|
29
|
-
modifiers: {
|
|
30
|
-
type: globalThis.PropType<string | string[]>;
|
|
31
|
-
};
|
|
32
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
-
color: StringConstructor;
|
|
34
|
-
width: {
|
|
35
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
36
|
-
};
|
|
37
|
-
height: {
|
|
38
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
39
|
-
};
|
|
40
|
-
name: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
required: boolean;
|
|
43
|
-
};
|
|
44
|
-
provider: {
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
};
|
|
47
|
-
prefix: {
|
|
48
|
-
type: globalThis.PropType<string>;
|
|
49
|
-
default: string;
|
|
50
|
-
};
|
|
51
|
-
src: StringConstructor;
|
|
52
|
-
horizontalFlip: BooleanConstructor;
|
|
53
|
-
verticalFlip: BooleanConstructor;
|
|
54
|
-
flip: StringConstructor;
|
|
55
|
-
mode: globalThis.PropType<import("@iconify/vue").IconifyRenderMode>;
|
|
56
|
-
inline: BooleanConstructor;
|
|
57
|
-
rotate: (StringConstructor | NumberConstructor)[];
|
|
58
|
-
onLoad: globalThis.PropType<import("@iconify/vue").IconifyIconOnLoad>;
|
|
59
|
-
svg: StringConstructor;
|
|
60
|
-
modifiers: {
|
|
61
|
-
type: globalThis.PropType<string | string[]>;
|
|
62
|
-
};
|
|
63
|
-
}>>, {
|
|
1
|
+
import { type VvIconProps } from '.';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VvIconProps>, {
|
|
3
|
+
prefix: import(".").IconPrefix;
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VvIconProps>, {
|
|
5
|
+
prefix: import(".").IconPrefix;
|
|
6
|
+
}>>>, {
|
|
64
7
|
prefix: string;
|
|
65
|
-
horizontalFlip: boolean;
|
|
66
|
-
verticalFlip: boolean;
|
|
67
|
-
inline: boolean;
|
|
68
8
|
}, {}>;
|
|
69
9
|
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type __VLS_WithDefaults<P, D> = {
|
|
20
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
21
|
+
default: D[K];
|
|
22
|
+
}> : P[K];
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Prettify<T> = {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} & {};
|
|
@@ -1,69 +1,41 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
1
|
import type { IconifyIconOnLoad, IconifyRenderMode } from '@iconify/vue';
|
|
3
2
|
export declare enum IconPrefix {
|
|
4
3
|
simple = "simple",
|
|
5
4
|
normal = "normal",
|
|
6
5
|
detailed = "detailed"
|
|
7
6
|
}
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
* Color
|
|
11
|
-
*/
|
|
12
|
-
color: StringConstructor;
|
|
13
|
-
/**
|
|
14
|
-
* Width
|
|
15
|
-
*/
|
|
16
|
-
width: {
|
|
17
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Height
|
|
21
|
-
*/
|
|
22
|
-
height: {
|
|
23
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
24
|
-
};
|
|
7
|
+
export type VvIconProps = {
|
|
25
8
|
/**
|
|
26
9
|
* Icon name
|
|
27
10
|
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
28
11
|
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
29
12
|
*/
|
|
30
|
-
name:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
name: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
height?: string | number;
|
|
34
17
|
/**
|
|
35
|
-
* By default 'vv'
|
|
36
18
|
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
37
19
|
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
38
20
|
*/
|
|
39
|
-
provider
|
|
40
|
-
type: StringConstructor;
|
|
41
|
-
};
|
|
21
|
+
provider?: string;
|
|
42
22
|
/**
|
|
23
|
+
* @default 'normal'
|
|
43
24
|
* The name of icon set.
|
|
44
25
|
* Icon default options prefix: simple | normal | detailed
|
|
45
26
|
*/
|
|
46
|
-
prefix
|
|
47
|
-
type: PropType<string>;
|
|
48
|
-
default: string;
|
|
49
|
-
};
|
|
27
|
+
prefix?: IconPrefix | string;
|
|
50
28
|
/**
|
|
51
29
|
* Url remote SVG icon
|
|
52
30
|
*/
|
|
53
|
-
src
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*/
|
|
57
|
-
horizontalFlip: BooleanConstructor;
|
|
58
|
-
/**
|
|
59
|
-
* Vertical flip
|
|
60
|
-
*/
|
|
61
|
-
verticalFlip: BooleanConstructor;
|
|
31
|
+
src?: string;
|
|
32
|
+
horizontalFlip?: boolean;
|
|
33
|
+
verticalFlip?: boolean;
|
|
62
34
|
/**
|
|
63
35
|
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
64
36
|
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
65
37
|
*/
|
|
66
|
-
flip
|
|
38
|
+
flip?: string;
|
|
67
39
|
/**
|
|
68
40
|
* Icon render mode
|
|
69
41
|
* 'style' = 'bg' or 'mask', depending on icon content
|
|
@@ -72,30 +44,31 @@ export declare const VvIconProps: {
|
|
|
72
44
|
* 'svg' = svg
|
|
73
45
|
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
74
46
|
*/
|
|
75
|
-
mode
|
|
47
|
+
mode?: IconifyRenderMode;
|
|
76
48
|
/**
|
|
77
49
|
* Toggles inline or block mode
|
|
78
50
|
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
79
51
|
*/
|
|
80
|
-
inline
|
|
52
|
+
inline?: boolean;
|
|
81
53
|
/**
|
|
82
54
|
* rotates icon
|
|
83
55
|
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
84
56
|
*/
|
|
85
|
-
rotate
|
|
57
|
+
rotate?: number | string;
|
|
86
58
|
/**
|
|
87
59
|
* A callback that is called when icon data has been loaded
|
|
88
60
|
*/
|
|
89
|
-
onLoad
|
|
61
|
+
onLoad?: IconifyIconOnLoad;
|
|
90
62
|
/**
|
|
91
63
|
* SVG icon string
|
|
92
64
|
*/
|
|
93
|
-
svg
|
|
65
|
+
svg?: string;
|
|
94
66
|
/**
|
|
95
67
|
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
96
68
|
* @values string | string[]
|
|
97
69
|
*/
|
|
98
|
-
modifiers
|
|
99
|
-
|
|
100
|
-
|
|
70
|
+
modifiers?: string | string[];
|
|
71
|
+
};
|
|
72
|
+
export declare const VvIconPropsDefaults: {
|
|
73
|
+
prefix: IconPrefix;
|
|
101
74
|
};
|