@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,6 +1,6 @@
|
|
|
1
|
-
import { inject
|
|
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 C = {
|
|
|
24
24
|
*/
|
|
25
25
|
name: {
|
|
26
26
|
type: String,
|
|
27
|
-
required:
|
|
27
|
+
required: true
|
|
28
28
|
},
|
|
29
29
|
/**
|
|
30
30
|
* By default 'vv'
|
|
@@ -93,76 +93,124 @@ const C = {
|
|
|
93
93
|
modifiers: {
|
|
94
94
|
type: [String, Array]
|
|
95
95
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
};
|
|
97
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
98
|
+
function useVolver() {
|
|
99
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const
|
|
103
|
-
[
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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;
|
|
110
122
|
});
|
|
111
123
|
}
|
|
112
|
-
const
|
|
124
|
+
const __default__ = {
|
|
113
125
|
name: "VvIcon"
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
)) || 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);
|
|
127
138
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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;
|
|
133
155
|
}
|
|
134
|
-
|
|
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;
|
|
135
167
|
}
|
|
136
|
-
function
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
+
}
|
|
144
194
|
}
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
icon: l(m)
|
|
163
|
-
}), null, 16, ["class"])) : E("", !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
|
+
};
|
|
164
212
|
}
|
|
165
213
|
});
|
|
166
214
|
export {
|
|
167
|
-
|
|
215
|
+
_sfc_main as default
|
|
168
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: {
|