@volverjs/ui-vue 0.0.3 → 0.0.5-beta.1
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 +54 -15
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +23 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
- 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 +280 -122
- 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 +338 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +251 -22
- 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 +280 -62
- 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 +720 -261
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
- package/dist/components/VvButton/index.d.ts +30 -75
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
- 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 +60 -28
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckbox/index.d.ts +6 -6
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
- package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
- package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
- package/dist/components/VvCombobox/index.d.ts +54 -23
- package/dist/components/VvDialog/VvDialog.es.js +426 -115
- 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 +504 -190
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +35 -14
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +116 -52
- 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 +1054 -376
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +67 -3
- package/dist/components/VvProgress/VvProgress.es.js +254 -23
- 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 +568 -137
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadio/index.d.ts +6 -6
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
- package/dist/components/VvRadioGroup/index.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.es.js +703 -251
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
- package/dist/components/VvSelect/index.d.ts +8 -8
- package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
- package/dist/components/VvTextarea/index.d.ts +7 -7
- package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
- 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 +3676 -2007
- 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/constants.d.ts +30 -0
- package/dist/directives/index.es.js +288 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +285 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +38 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +115 -3269
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +215 -23
- package/dist/resolvers/unplugin.d.ts +14 -8
- package/dist/resolvers/unplugin.es.js +94 -33
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +1 -1
- package/package.json +167 -63
- package/src/Volver.ts +60 -26
- 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 +144 -0
- package/src/components/VvAction/index.ts +5 -0
- 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 +41 -124
- package/src/components/VvButton/index.ts +16 -88
- 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 +85 -57
- package/src/components/VvCombobox/index.ts +12 -10
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +6 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
- package/src/components/VvDropdown/index.ts +6 -11
- 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 +128 -35
- 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 +3 -5
- package/src/components/VvTextarea/VvTextarea.vue +4 -4
- 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 +9 -11
- 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 +8 -9
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/constants.ts +36 -0
- package/src/directives/index.ts +1 -1
- package/src/directives/v-tooltip.ts +2 -2
- package/src/index.ts +0 -2
- package/src/props/index.ts +111 -19
- package/src/resolvers/unplugin.ts +96 -49
- 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 +3 -2
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +42 -1
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
- package/src/stories/argTypes.ts +2 -2
- package/src/types/group.d.ts +5 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { inject, provide, defineComponent, ref, watch, openBlock, createElementBlock, mergeProps, unref, renderSlot, computed, toRefs, createBlock, normalizeClass, withCtx, createElementVNode, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import "mitt";
|
|
3
|
+
import { useElementHover, useFocus, useFocusWithin } from "@vueuse/core";
|
|
4
|
+
var Side = /* @__PURE__ */ ((Side2) => {
|
|
5
|
+
Side2["left"] = "left";
|
|
6
|
+
Side2["right"] = "right";
|
|
7
|
+
Side2["top"] = "top";
|
|
8
|
+
Side2["bottom"] = "bottom";
|
|
9
|
+
return Side2;
|
|
10
|
+
})(Side || {});
|
|
11
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
12
|
+
Placement2["topStart"] = "top-start";
|
|
13
|
+
Placement2["topEnd"] = "top-end";
|
|
14
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
15
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
16
|
+
Placement2["leftStart"] = "left-start";
|
|
17
|
+
Placement2["leftEnd"] = "left-end";
|
|
18
|
+
Placement2["rightStart"] = "right-start";
|
|
19
|
+
Placement2["rightEnd"] = "right-end";
|
|
20
|
+
return Placement2;
|
|
21
|
+
})(Placement || {});
|
|
22
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
23
|
+
Position2["before"] = "before";
|
|
24
|
+
Position2["after"] = "after";
|
|
25
|
+
return Position2;
|
|
26
|
+
})(Position || {});
|
|
27
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
28
|
+
ButtonType2["button"] = "button";
|
|
29
|
+
ButtonType2["submit"] = "submit";
|
|
30
|
+
ButtonType2["reset"] = "reset";
|
|
31
|
+
return ButtonType2;
|
|
32
|
+
})(ButtonType || {});
|
|
33
|
+
var ActionRoles = /* @__PURE__ */ ((ActionRoles2) => {
|
|
34
|
+
ActionRoles2["button"] = "button";
|
|
35
|
+
ActionRoles2["link"] = "link";
|
|
36
|
+
ActionRoles2["menuitem"] = "menuitem";
|
|
37
|
+
return ActionRoles2;
|
|
38
|
+
})(ActionRoles || {});
|
|
39
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
40
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
41
|
+
AnchorTarget2["_self"] = "_self";
|
|
42
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
43
|
+
AnchorTarget2["_top"] = "_top";
|
|
44
|
+
return AnchorTarget2;
|
|
45
|
+
})(AnchorTarget || {});
|
|
46
|
+
const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for("dropdownItem");
|
|
47
|
+
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for("dropdownAction");
|
|
48
|
+
function useInjectedDropdownItem() {
|
|
49
|
+
return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
|
|
50
|
+
}
|
|
51
|
+
function useProvideDropdownAction({
|
|
52
|
+
expanded
|
|
53
|
+
}) {
|
|
54
|
+
provide(INJECTION_KEY_DROPDOWN_ACTION, {
|
|
55
|
+
role: ActionRoles.menuitem,
|
|
56
|
+
expanded
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const __default__$1 = {
|
|
60
|
+
name: "VvDropdownItem"
|
|
61
|
+
};
|
|
62
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
63
|
+
...__default__$1,
|
|
64
|
+
setup(__props) {
|
|
65
|
+
const { role, expanded } = useInjectedDropdownItem();
|
|
66
|
+
const element = ref(null);
|
|
67
|
+
useProvideDropdownAction({ expanded });
|
|
68
|
+
const hovered = useElementHover(element);
|
|
69
|
+
const { focused } = useFocus(element);
|
|
70
|
+
const { focused: focusedWithin } = useFocusWithin(element);
|
|
71
|
+
watch(hovered, (newValue) => {
|
|
72
|
+
if (newValue) {
|
|
73
|
+
focused.value = true;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return (_ctx, _cache) => {
|
|
77
|
+
return openBlock(), createElementBlock("li", mergeProps({ role: unref(role) }, {
|
|
78
|
+
ref_key: "element",
|
|
79
|
+
ref: element,
|
|
80
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
81
|
+
}), [
|
|
82
|
+
renderSlot(_ctx.$slots, "default")
|
|
83
|
+
], 16);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const LinkProps = {
|
|
88
|
+
/**
|
|
89
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
90
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
91
|
+
*/
|
|
92
|
+
to: {
|
|
93
|
+
type: [String, Object]
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Anchor href
|
|
97
|
+
*/
|
|
98
|
+
href: String,
|
|
99
|
+
/**
|
|
100
|
+
* Anchor target
|
|
101
|
+
*/
|
|
102
|
+
target: {
|
|
103
|
+
type: String,
|
|
104
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Anchor rel
|
|
108
|
+
*/
|
|
109
|
+
rel: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: "noopener noreferrer"
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const DisabledProps = {
|
|
115
|
+
/**
|
|
116
|
+
* Whether the form control is disabled
|
|
117
|
+
*/
|
|
118
|
+
disabled: Boolean
|
|
119
|
+
};
|
|
120
|
+
const SelectedProps = {
|
|
121
|
+
/**
|
|
122
|
+
* Whether the item is selected
|
|
123
|
+
*/
|
|
124
|
+
selected: Boolean
|
|
125
|
+
};
|
|
126
|
+
const ActiveProps = {
|
|
127
|
+
/**
|
|
128
|
+
* Whether the item is active
|
|
129
|
+
*/
|
|
130
|
+
active: Boolean
|
|
131
|
+
};
|
|
132
|
+
const PressedProps = {
|
|
133
|
+
/**
|
|
134
|
+
* Whether the item is pressed
|
|
135
|
+
*/
|
|
136
|
+
pressed: Boolean
|
|
137
|
+
};
|
|
138
|
+
const LabelProps = {
|
|
139
|
+
/**
|
|
140
|
+
* The item label
|
|
141
|
+
*/
|
|
142
|
+
label: [String, Number]
|
|
143
|
+
};
|
|
144
|
+
const ModifiersProps = {
|
|
145
|
+
/**
|
|
146
|
+
* Component BEM modifiers
|
|
147
|
+
*/
|
|
148
|
+
modifiers: [String, Array]
|
|
149
|
+
};
|
|
150
|
+
({
|
|
151
|
+
/**
|
|
152
|
+
* VvIcon name or props
|
|
153
|
+
* @see VVIcon
|
|
154
|
+
*/
|
|
155
|
+
icon: { type: [String, Object] },
|
|
156
|
+
/**
|
|
157
|
+
* VvIcon position
|
|
158
|
+
*/
|
|
159
|
+
iconPosition: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: Position.before,
|
|
162
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const UnselectableProps = {
|
|
166
|
+
/**
|
|
167
|
+
* If true the input will be unselectable
|
|
168
|
+
*/
|
|
169
|
+
unselectable: { type: Boolean, default: true }
|
|
170
|
+
};
|
|
171
|
+
({
|
|
172
|
+
/**
|
|
173
|
+
* Dropdown placement
|
|
174
|
+
*/
|
|
175
|
+
placement: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: Side.bottom,
|
|
178
|
+
validator: (value) => {
|
|
179
|
+
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
/**
|
|
183
|
+
* Dropdown show / hide transition name
|
|
184
|
+
*/
|
|
185
|
+
transitionName: {
|
|
186
|
+
type: String
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* Offset of the dropdown from the trigger
|
|
190
|
+
* @see https://floating-ui.com/docs/offset
|
|
191
|
+
*/
|
|
192
|
+
offset: {
|
|
193
|
+
type: [Number, String, Object],
|
|
194
|
+
default: 0
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Move dropdown to the side if there is no space in the default position
|
|
198
|
+
* @see https://floating-ui.com/docs/shift
|
|
199
|
+
*/
|
|
200
|
+
shift: {
|
|
201
|
+
type: [Boolean, Object],
|
|
202
|
+
default: false
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Flip dropdown position if there is no space in the default position
|
|
206
|
+
* @see https://floating-ui.com/docs/flip
|
|
207
|
+
*/
|
|
208
|
+
flip: {
|
|
209
|
+
type: [Boolean, Object],
|
|
210
|
+
default: true
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
* Size of the dropdown
|
|
214
|
+
* @see https://floating-ui.com/docs/size
|
|
215
|
+
*/
|
|
216
|
+
size: {
|
|
217
|
+
type: [Boolean, Object],
|
|
218
|
+
default: () => ({ padding: 10 })
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* Automatically change the position of the dropdown
|
|
222
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
223
|
+
*/
|
|
224
|
+
autoPlacement: {
|
|
225
|
+
type: [Boolean, Object],
|
|
226
|
+
default: false
|
|
227
|
+
},
|
|
228
|
+
/**
|
|
229
|
+
* Add arrow to the dropdown
|
|
230
|
+
* @see https://floating-ui.com/docs/arrow
|
|
231
|
+
*/
|
|
232
|
+
arrow: {
|
|
233
|
+
type: Boolean,
|
|
234
|
+
default: false
|
|
235
|
+
},
|
|
236
|
+
/**
|
|
237
|
+
* Close dropdown on click outside
|
|
238
|
+
*/
|
|
239
|
+
autoClose: {
|
|
240
|
+
type: Boolean,
|
|
241
|
+
default: true
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* Autofocus first item on dropdown open
|
|
245
|
+
*/
|
|
246
|
+
autofocusFirst: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: true
|
|
249
|
+
},
|
|
250
|
+
/**
|
|
251
|
+
* Set dropdown width to the same as the trigger
|
|
252
|
+
*/
|
|
253
|
+
triggerWidth: {
|
|
254
|
+
type: Boolean
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
({
|
|
258
|
+
...DisabledProps,
|
|
259
|
+
...LabelProps,
|
|
260
|
+
...PressedProps,
|
|
261
|
+
...ActiveProps,
|
|
262
|
+
...LinkProps,
|
|
263
|
+
/**
|
|
264
|
+
* Button type
|
|
265
|
+
*/
|
|
266
|
+
type: {
|
|
267
|
+
type: String,
|
|
268
|
+
default: ButtonType.button,
|
|
269
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
function useModifiers(prefix, modifiers, others) {
|
|
273
|
+
return computed(() => {
|
|
274
|
+
const toReturn = {
|
|
275
|
+
[prefix]: true
|
|
276
|
+
};
|
|
277
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
278
|
+
if (modifiersArray) {
|
|
279
|
+
if (Array.isArray(modifiersArray)) {
|
|
280
|
+
modifiersArray.forEach((modifier) => {
|
|
281
|
+
if (modifier) {
|
|
282
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (others) {
|
|
288
|
+
Object.keys(others.value).forEach((key) => {
|
|
289
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return toReturn;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
const _hoisted_1 = ["title"];
|
|
296
|
+
const __default__ = {
|
|
297
|
+
name: "VvDropdownOption"
|
|
298
|
+
};
|
|
299
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
300
|
+
...__default__,
|
|
301
|
+
props: {
|
|
302
|
+
...DisabledProps,
|
|
303
|
+
...SelectedProps,
|
|
304
|
+
...UnselectableProps,
|
|
305
|
+
...ModifiersProps,
|
|
306
|
+
deselectHintLabel: {
|
|
307
|
+
type: String
|
|
308
|
+
},
|
|
309
|
+
selectHintLabel: {
|
|
310
|
+
type: String
|
|
311
|
+
},
|
|
312
|
+
selectedHintLabel: {
|
|
313
|
+
type: String
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
setup(__props) {
|
|
317
|
+
const props = __props;
|
|
318
|
+
const { modifiers } = toRefs(props);
|
|
319
|
+
const bemCssClasses = useModifiers(
|
|
320
|
+
"vv-dropdown-option",
|
|
321
|
+
modifiers,
|
|
322
|
+
computed(() => ({
|
|
323
|
+
disabled: props.disabled,
|
|
324
|
+
selected: props.selected,
|
|
325
|
+
unselectable: props.unselectable && props.selected
|
|
326
|
+
}))
|
|
327
|
+
);
|
|
328
|
+
const hintLabel = computed(() => {
|
|
329
|
+
if (props.selected) {
|
|
330
|
+
return props.unselectable ? props.deselectHintLabel : props.selectedHintLabel;
|
|
331
|
+
}
|
|
332
|
+
if (!props.disabled) {
|
|
333
|
+
return props.selectHintLabel;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
return (_ctx, _cache) => {
|
|
337
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
338
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
339
|
+
tabindex: _ctx.disabled ? -1 : 0,
|
|
340
|
+
"aria-selected": _ctx.selected,
|
|
341
|
+
"aria-disabled": _ctx.disabled
|
|
342
|
+
}, {
|
|
343
|
+
default: withCtx(() => [
|
|
344
|
+
renderSlot(_ctx.$slots, "default"),
|
|
345
|
+
createElementVNode("span", {
|
|
346
|
+
class: "vv-dropdown-option__hint",
|
|
347
|
+
title: unref(hintLabel)
|
|
348
|
+
}, [
|
|
349
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
350
|
+
createTextVNode(toDisplayString(unref(hintLabel)), 1)
|
|
351
|
+
])
|
|
352
|
+
], 8, _hoisted_1)
|
|
353
|
+
]),
|
|
354
|
+
_: 3
|
|
355
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
export {
|
|
360
|
+
_sfc_main as default
|
|
361
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownOption=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),s=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(s||{});const d=Symbol.for("dropdownItem"),i=Symbol.for("dropdownAction");const a=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:n,expanded:l}=e.inject(d,{}),r=e.ref(null);!function({expanded:t}){e.provide(i,{role:s.menuitem,expanded:t})}({expanded:l});const a=o.useElementHover(r),{focused:u}=o.useFocus(r),{focused:c}=o.useFocusWithin(r);return e.watch(a,(e=>{e&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:e.unref(n)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(c)}]}),[e.renderSlot(t.$slots,"default")],16))}}),u={disabled:Boolean},c={selected:Boolean},f=(Boolean,Boolean,{modifiers:[String,Array]});l.before;const p={unselectable:{type:Boolean,default:!0}};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button;const b=["title"];return e.defineComponent({name:"VvDropdownOption",props:{...u,...c,...p,...f,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const o=t,{modifiers:n}=e.toRefs(o),l=function(t,o,n){return e.computed((()=>{const l={[t]:!0},r="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{l[`${t}--${o}`]=e.unref(n.value[o])})),l}))}("vv-dropdown-option",n,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),r=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?void 0:o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(a,{class:e.normalizeClass(e.unref(l)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(r)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)]))],8,b)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}})}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iconExists
|
|
3
|
-
const
|
|
1
|
+
import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
|
|
2
|
+
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
+
const VvIconProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Color
|
|
6
6
|
*/
|
|
@@ -24,7 +24,7 @@ const b = {
|
|
|
24
24
|
*/
|
|
25
25
|
name: {
|
|
26
26
|
type: String,
|
|
27
|
-
required:
|
|
27
|
+
required: true
|
|
28
28
|
},
|
|
29
29
|
/**
|
|
30
30
|
* By default 'vv'
|
|
@@ -93,60 +93,124 @@ const b = {
|
|
|
93
93
|
modifiers: {
|
|
94
94
|
type: [String, Array]
|
|
95
95
|
}
|
|
96
|
-
}
|
|
96
|
+
};
|
|
97
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
98
|
+
function useVolver() {
|
|
99
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
100
|
+
}
|
|
101
|
+
function useModifiers(prefix, modifiers, others) {
|
|
102
|
+
return computed(() => {
|
|
103
|
+
const toReturn = {
|
|
104
|
+
[prefix]: true
|
|
105
|
+
};
|
|
106
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
107
|
+
if (modifiersArray) {
|
|
108
|
+
if (Array.isArray(modifiersArray)) {
|
|
109
|
+
modifiersArray.forEach((modifier) => {
|
|
110
|
+
if (modifier) {
|
|
111
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (others) {
|
|
117
|
+
Object.keys(others.value).forEach((key) => {
|
|
118
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return toReturn;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
const __default__ = {
|
|
97
125
|
name: "VvIcon"
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)) || e;
|
|
126
|
+
};
|
|
127
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
|
+
...__default__,
|
|
129
|
+
props: VvIconProps,
|
|
130
|
+
setup(__props) {
|
|
131
|
+
const props = __props;
|
|
132
|
+
const show = ref(true);
|
|
133
|
+
const volver = useVolver();
|
|
134
|
+
const { modifiers } = toRefs(props);
|
|
135
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
136
|
+
const provider = computed(() => {
|
|
137
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
111
138
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
139
|
+
const icon = computed(() => {
|
|
140
|
+
const _name = props.name ?? "";
|
|
141
|
+
const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
|
|
142
|
+
if (iconExists(_name)) {
|
|
143
|
+
return _name;
|
|
144
|
+
} else if (iconExists(iconName)) {
|
|
145
|
+
return iconName;
|
|
146
|
+
} else {
|
|
147
|
+
return (volver == null ? void 0 : volver.iconsCollections.find(
|
|
148
|
+
(iconsCollection) => {
|
|
149
|
+
const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
|
|
150
|
+
if (iconExists(icon2)) {
|
|
151
|
+
return icon2;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
)) || _name;
|
|
117
155
|
}
|
|
118
|
-
|
|
156
|
+
});
|
|
157
|
+
function getSvgContent(svg) {
|
|
158
|
+
let dom = null;
|
|
159
|
+
if (typeof window === "undefined") {
|
|
160
|
+
const { JSDOM } = require("jsdom");
|
|
161
|
+
dom = new JSDOM().window;
|
|
162
|
+
}
|
|
163
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
164
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
165
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
166
|
+
return svgEl;
|
|
119
167
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
168
|
+
function addIconFromSvg(svg) {
|
|
169
|
+
const svgContentEl = getSvgContent(svg);
|
|
170
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
171
|
+
if (svgContentEl && svgContent) {
|
|
172
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
173
|
+
body: svgContent,
|
|
174
|
+
// Set height and width from svg content
|
|
175
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
176
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (volver) {
|
|
181
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
182
|
+
show.value = false;
|
|
183
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
184
|
+
if (svg) {
|
|
185
|
+
addIconFromSvg(svg);
|
|
186
|
+
show.value = true;
|
|
187
|
+
}
|
|
188
|
+
}).catch((e) => {
|
|
189
|
+
throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
|
|
190
|
+
});
|
|
191
|
+
} else if (props.svg) {
|
|
192
|
+
addIconFromSvg(props.svg);
|
|
193
|
+
}
|
|
128
194
|
}
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
icon: s(m)
|
|
147
|
-
}), null, 16, ["class"])) : y("", !0);
|
|
195
|
+
return (_ctx, _cache) => {
|
|
196
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
197
|
+
key: 0,
|
|
198
|
+
class: unref(bemCssClasses)
|
|
199
|
+
}, {
|
|
200
|
+
inline: _ctx.inline,
|
|
201
|
+
width: _ctx.width,
|
|
202
|
+
height: _ctx.height,
|
|
203
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
204
|
+
verticalFlip: _ctx.verticalFlip,
|
|
205
|
+
flip: _ctx.flip,
|
|
206
|
+
rotate: _ctx.rotate,
|
|
207
|
+
color: _ctx.color,
|
|
208
|
+
onLoad: _ctx.onLoad,
|
|
209
|
+
icon: unref(icon)
|
|
210
|
+
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
211
|
+
};
|
|
148
212
|
}
|
|
149
213
|
});
|
|
150
214
|
export {
|
|
151
|
-
|
|
215
|
+
_sfc_main as default
|
|
152
216
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=n(e.vue,e.vue$1)}(this,(function(e,n){"use strict";const i={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},o=Symbol.for("volver");return e.defineComponent({name:"VvIcon",props:i,setup(i){const r=i,t=e.ref(!0),l=e.inject(o),{modifiers:u}=e.toRefs(r),c=function(n,i,o){return e.computed((()=>{const r={[n]:!0},t="string"==typeof(null==i?void 0:i.value)?i.value.split(" "):null==i?void 0:i.value;return t&&Array.isArray(t)&&t.forEach((e=>{e&&(r[`${n}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((i=>{r[`${n}--${i}`]=e.unref(o.value[i])})),r}))}("vv-icon",u),a=e.computed((()=>r.provider||(null==l?void 0:l.iconsProvider))),s=e.computed((()=>{const e=r.name??"",i=`@${a.value}:${r.prefix}:${r.name}`;return n.iconExists(e)?e:n.iconExists(i)?i:(null==l?void 0:l.iconsCollections.find((i=>{const o=`@${a.value}:${i.prefix}:${e}`;if(n.iconExists(o))return o})))||e}));function f(e){const i=function(e){let n=null;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");n=(new e).window}return(n?new n.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),o=(null==i?void 0:i.innerHTML.trim())||"";i&&o&&n.addIcon(`@${a.value}:${r.prefix}:${r.name}`,{body:o,height:i.viewBox.baseVal.height,width:i.viewBox.baseVal.width})}return l&&(r.src&&!n.iconExists(`@${a.value}:${r.prefix}:${r.name}`)?(t.value=!1,l.fetchIcon(r.src).then((e=>{e&&(f(e),t.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):r.svg&&f(r.svg)),(i,o)=>e.unref(t)?(e.openBlock(),e.createBlock(e.unref(n.Icon),e.mergeProps({key:0,class:e.unref(c)},{inline:i.inline,width:i.width,height:i.height,horizontalFlip:i.horizontalFlip,verticalFlip:i.verticalFlip,flip:i.flip,rotate:i.rotate,color:i.color,onLoad:i.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("",!0)}})}));
|
|
@@ -14,20 +14,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
};
|
|
16
16
|
prefix: {
|
|
17
|
-
type:
|
|
17
|
+
type: globalThis.PropType<string>;
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
20
|
src: StringConstructor;
|
|
21
21
|
horizontalFlip: BooleanConstructor;
|
|
22
22
|
verticalFlip: BooleanConstructor;
|
|
23
23
|
flip: StringConstructor;
|
|
24
|
-
mode:
|
|
24
|
+
mode: globalThis.PropType<import("@iconify/vue").IconifyRenderMode>;
|
|
25
25
|
inline: BooleanConstructor;
|
|
26
26
|
rotate: (StringConstructor | NumberConstructor)[];
|
|
27
27
|
onLoad: FunctionConstructor;
|
|
28
28
|
svg: StringConstructor;
|
|
29
29
|
modifiers: {
|
|
30
|
-
type:
|
|
30
|
+
type: globalThis.PropType<string | string[]>;
|
|
31
31
|
};
|
|
32
32
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
33
|
color: StringConstructor;
|
|
@@ -45,23 +45,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
type: StringConstructor;
|
|
46
46
|
};
|
|
47
47
|
prefix: {
|
|
48
|
-
type:
|
|
48
|
+
type: globalThis.PropType<string>;
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
src: StringConstructor;
|
|
52
52
|
horizontalFlip: BooleanConstructor;
|
|
53
53
|
verticalFlip: BooleanConstructor;
|
|
54
54
|
flip: StringConstructor;
|
|
55
|
-
mode:
|
|
55
|
+
mode: globalThis.PropType<import("@iconify/vue").IconifyRenderMode>;
|
|
56
56
|
inline: BooleanConstructor;
|
|
57
57
|
rotate: (StringConstructor | NumberConstructor)[];
|
|
58
58
|
onLoad: FunctionConstructor;
|
|
59
59
|
svg: StringConstructor;
|
|
60
60
|
modifiers: {
|
|
61
|
-
type:
|
|
61
|
+
type: globalThis.PropType<string | string[]>;
|
|
62
62
|
};
|
|
63
63
|
}>>, {
|
|
64
|
-
prefix:
|
|
64
|
+
prefix: string;
|
|
65
65
|
horizontalFlip: boolean;
|
|
66
66
|
verticalFlip: boolean;
|
|
67
67
|
inline: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { IconifyRenderMode } from '@iconify/vue';
|
|
3
|
-
export declare enum
|
|
3
|
+
export declare enum IconPrefix {
|
|
4
4
|
simple = "simple",
|
|
5
5
|
normal = "normal",
|
|
6
6
|
detailed = "detailed"
|
|
@@ -44,7 +44,7 @@ export declare const VvIconProps: {
|
|
|
44
44
|
* Icon default options prefix: simple | normal | detailed
|
|
45
45
|
*/
|
|
46
46
|
prefix: {
|
|
47
|
-
type: PropType<
|
|
47
|
+
type: PropType<string>;
|
|
48
48
|
default: string;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
@@ -20,8 +20,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
default: "eye-off";
|
|
21
21
|
};
|
|
22
22
|
}, {
|
|
23
|
-
active:
|
|
24
|
-
activeIcon:
|
|
23
|
+
active: globalThis.Ref<boolean>;
|
|
24
|
+
activeIcon: globalThis.ComputedRef<string>;
|
|
25
25
|
onClick: (e: Event) => void;
|
|
26
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle-password"[], "toggle-password", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
27
|
disabled: {
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
default: string;
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
|
-
isUp:
|
|
15
|
+
isUp: globalThis.ComputedRef<boolean>;
|
|
16
16
|
onClick: (e: Event) => void;
|
|
17
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("step-up" | "step-down")[], "step-up" | "step-down", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
disabled: {
|