@volverjs/ui-vue 0.0.10-beta.14 → 0.0.10-beta.16
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 +96 -2
- package/auto-imports.d.ts +2 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +33 -9
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +9 -2
- package/dist/components/VvAccordion/index.d.ts +4 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +33 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +9 -2
- package/dist/components/VvAccordionGroup/index.d.ts +4 -1
- package/dist/components/VvAction/VvAction.es.js +29 -8
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +44 -10
- package/dist/components/VvAction/index.d.ts +21 -5
- package/dist/components/VvAlert/VvAlert.es.js +91 -107
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +14 -4
- package/dist/components/VvAlert/index.d.ts +7 -3
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +91 -107
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -2
- package/dist/components/VvAlertGroup/index.d.ts +6 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +33 -9
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +11 -3
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +33 -9
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +9 -2
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +33 -9
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +11 -3
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +33 -9
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -3
- package/dist/components/VvBreadcrumb/index.d.ts +4 -1
- package/dist/components/VvButton/VvButton.es.js +100 -119
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +78 -20
- package/dist/components/VvButton/index.d.ts +34 -12
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +17 -4
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +33 -9
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +11 -3
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +56 -17
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +94 -22
- package/dist/components/VvCheckbox/index.d.ts +44 -11
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +64 -19
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +93 -22
- package/dist/components/VvCheckboxGroup/index.d.ts +44 -11
- package/dist/components/VvCombobox/VvCombobox.es.js +108 -165
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +97 -24
- package/dist/components/VvCombobox/index.d.ts +42 -11
- package/dist/components/VvDialog/VvDialog.es.js +51 -103
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +33 -9
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +14 -2
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -12
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +11 -3
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +25 -6
- package/dist/components/VvDropdown/index.d.ts +6 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +33 -9
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +29 -8
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +37 -10
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +22 -95
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +81 -44
- package/dist/components/VvIcon/index.d.ts +21 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +108 -124
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +52 -12
- package/dist/components/VvInputFile/index.d.ts +24 -6
- package/dist/components/VvInputText/VvInputText.es.js +115 -147
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +141 -34
- package/dist/components/VvInputText/index.d.ts +71 -26
- package/dist/components/VvNav/VvNav.es.js +33 -9
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +9 -2
- package/dist/components/VvNav/index.d.ts +4 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +29 -8
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +33 -9
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +9 -2
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +56 -17
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +94 -22
- package/dist/components/VvRadio/index.d.ts +44 -11
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +64 -19
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +93 -22
- package/dist/components/VvRadioGroup/index.d.ts +44 -11
- package/dist/components/VvSelect/VvSelect.es.js +95 -138
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +97 -24
- package/dist/components/VvSelect/index.d.ts +46 -12
- package/dist/components/VvTab/VvTab.es.js +33 -9
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +9 -2
- package/dist/components/VvTab/index.d.ts +4 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +109 -143
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +141 -34
- package/dist/components/VvTextarea/index.d.ts +66 -17
- package/dist/components/VvTooltip/VvTooltip.es.js +33 -9
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +9 -2
- package/dist/components/VvTooltip/index.d.ts +4 -1
- package/dist/components/index.es.js +179 -233
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/directives/index.es.js +33 -9
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +33 -9
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +251 -61
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +15 -4
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +77 -22
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/package.json +33 -33
- 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/VvAlert/index.ts +1 -3
- package/src/components/VvAlertGroup/index.ts +2 -1
- package/src/components/VvButton/VvButton.vue +6 -6
- package/src/components/VvButton/index.ts +2 -4
- package/src/components/VvCombobox/VvCombobox.vue +5 -8
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +22 -48
- package/src/components/VvInputFile/VvInputFile.vue +1 -1
- package/src/components/VvInputText/VvInputText.vue +11 -12
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTextarea/VvTextarea.vue +5 -8
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/props/index.ts +89 -25
- package/src/stories/Icon/Icon.settings.ts +3 -3
|
@@ -12,7 +12,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
12
12
|
type: NumberConstructor;
|
|
13
13
|
};
|
|
14
14
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
15
|
-
modifiers:
|
|
15
|
+
modifiers: {
|
|
16
|
+
type: globalThis.PropType<string | string[]>;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
16
19
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
20
|
items: {
|
|
18
21
|
type: globalThis.PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
|
|
@@ -27,8 +30,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
30
|
type: NumberConstructor;
|
|
28
31
|
};
|
|
29
32
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
30
|
-
modifiers:
|
|
33
|
+
modifiers: {
|
|
34
|
+
type: globalThis.PropType<string | string[]>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
31
37
|
}>>, {
|
|
38
|
+
modifiers: string | string[];
|
|
32
39
|
items: import("@/components/VvAvatarGroup").AvatarItem[];
|
|
33
40
|
toShow: number;
|
|
34
41
|
}, {}>, {
|
|
@@ -21,5 +21,8 @@ export declare const VvAvatarGroupProps: {
|
|
|
21
21
|
type: NumberConstructor;
|
|
22
22
|
};
|
|
23
23
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
24
|
-
modifiers:
|
|
24
|
+
modifiers: {
|
|
25
|
+
type: globalThis.PropType<string | string[]>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
@@ -64,6 +64,7 @@ const LinkProps = {
|
|
|
64
64
|
*/
|
|
65
65
|
target: {
|
|
66
66
|
type: String,
|
|
67
|
+
default: void 0,
|
|
67
68
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
68
69
|
},
|
|
69
70
|
/**
|
|
@@ -78,44 +79,65 @@ const DisabledProps = {
|
|
|
78
79
|
/**
|
|
79
80
|
* Whether the form control is disabled
|
|
80
81
|
*/
|
|
81
|
-
disabled:
|
|
82
|
+
disabled: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
}
|
|
82
86
|
};
|
|
83
87
|
const ActiveProps = {
|
|
84
88
|
/**
|
|
85
89
|
* Whether the item is active
|
|
86
90
|
*/
|
|
87
|
-
active:
|
|
91
|
+
active: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
}
|
|
88
95
|
};
|
|
89
96
|
const CurrentProps = {
|
|
90
97
|
/**
|
|
91
98
|
* Whether the item is current
|
|
92
99
|
*/
|
|
93
|
-
current:
|
|
100
|
+
current: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
}
|
|
94
104
|
};
|
|
95
105
|
const PressedProps = {
|
|
96
106
|
/**
|
|
97
107
|
* Whether the item is pressed
|
|
98
108
|
*/
|
|
99
|
-
pressed:
|
|
109
|
+
pressed: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
}
|
|
100
113
|
};
|
|
101
114
|
const LabelProps = {
|
|
102
115
|
/**
|
|
103
116
|
* The item label
|
|
104
117
|
*/
|
|
105
|
-
label:
|
|
118
|
+
label: {
|
|
119
|
+
type: [String, Number],
|
|
120
|
+
default: void 0
|
|
121
|
+
}
|
|
106
122
|
};
|
|
107
123
|
const ModifiersProps = {
|
|
108
124
|
/**
|
|
109
125
|
* Component BEM modifiers
|
|
110
126
|
*/
|
|
111
|
-
modifiers:
|
|
127
|
+
modifiers: {
|
|
128
|
+
type: [String, Array],
|
|
129
|
+
default: void 0
|
|
130
|
+
}
|
|
112
131
|
};
|
|
113
132
|
({
|
|
114
133
|
/**
|
|
115
134
|
* VvIcon name or props
|
|
116
135
|
* @see VVIcon
|
|
117
136
|
*/
|
|
118
|
-
icon: {
|
|
137
|
+
icon: {
|
|
138
|
+
type: [String, Object],
|
|
139
|
+
default: void 0
|
|
140
|
+
},
|
|
119
141
|
/**
|
|
120
142
|
* VvIcon position
|
|
121
143
|
*/
|
|
@@ -146,7 +168,8 @@ const ModifiersProps = {
|
|
|
146
168
|
* Dropdown show / hide transition name
|
|
147
169
|
*/
|
|
148
170
|
transitionName: {
|
|
149
|
-
type: String
|
|
171
|
+
type: String,
|
|
172
|
+
default: void 0
|
|
150
173
|
},
|
|
151
174
|
/**
|
|
152
175
|
* Offset of the dropdown from the trigger
|
|
@@ -214,7 +237,8 @@ const ModifiersProps = {
|
|
|
214
237
|
* Set dropdown width to the same as the trigger
|
|
215
238
|
*/
|
|
216
239
|
triggerWidth: {
|
|
217
|
-
type: Boolean
|
|
240
|
+
type: Boolean,
|
|
241
|
+
default: false
|
|
218
242
|
}
|
|
219
243
|
});
|
|
220
244
|
({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBadge=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});Boolean,Boolean,Boolean,Boolean;const l={modifiers:[String,Array]};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const a={...l,value:[String,Number]};return e.defineComponent({name:"VvBadge",props:a,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-badge",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:"status"},[e.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value),1)]))],2))}})}));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBadge=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});Boolean,Boolean,Boolean,Boolean;const l={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const a={...l,value:[String,Number]};return e.defineComponent({name:"VvBadge",props:a,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-badge",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:"status"},[e.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value),1)]))],2))}})}));
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
value: (StringConstructor | NumberConstructor)[];
|
|
3
|
-
modifiers:
|
|
3
|
+
modifiers: {
|
|
4
|
+
type: globalThis.PropType<string | string[]>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
4
7
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
8
|
value: (StringConstructor | NumberConstructor)[];
|
|
6
|
-
modifiers:
|
|
7
|
-
|
|
9
|
+
modifiers: {
|
|
10
|
+
type: globalThis.PropType<string | string[]>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>>, {
|
|
14
|
+
modifiers: string | string[];
|
|
15
|
+
}, {}>, {
|
|
8
16
|
default?(_: {}): any;
|
|
9
17
|
}>;
|
|
10
18
|
export default _default;
|
|
@@ -94,6 +94,7 @@ const LinkProps = {
|
|
|
94
94
|
*/
|
|
95
95
|
target: {
|
|
96
96
|
type: String,
|
|
97
|
+
default: void 0,
|
|
97
98
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
98
99
|
},
|
|
99
100
|
/**
|
|
@@ -108,44 +109,65 @@ const DisabledProps = {
|
|
|
108
109
|
/**
|
|
109
110
|
* Whether the form control is disabled
|
|
110
111
|
*/
|
|
111
|
-
disabled:
|
|
112
|
+
disabled: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: false
|
|
115
|
+
}
|
|
112
116
|
};
|
|
113
117
|
const ActiveProps = {
|
|
114
118
|
/**
|
|
115
119
|
* Whether the item is active
|
|
116
120
|
*/
|
|
117
|
-
active:
|
|
121
|
+
active: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
}
|
|
118
125
|
};
|
|
119
126
|
const CurrentProps = {
|
|
120
127
|
/**
|
|
121
128
|
* Whether the item is current
|
|
122
129
|
*/
|
|
123
|
-
current:
|
|
130
|
+
current: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: false
|
|
133
|
+
}
|
|
124
134
|
};
|
|
125
135
|
const PressedProps = {
|
|
126
136
|
/**
|
|
127
137
|
* Whether the item is pressed
|
|
128
138
|
*/
|
|
129
|
-
pressed:
|
|
139
|
+
pressed: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false
|
|
142
|
+
}
|
|
130
143
|
};
|
|
131
144
|
const LabelProps = {
|
|
132
145
|
/**
|
|
133
146
|
* The item label
|
|
134
147
|
*/
|
|
135
|
-
label:
|
|
148
|
+
label: {
|
|
149
|
+
type: [String, Number],
|
|
150
|
+
default: void 0
|
|
151
|
+
}
|
|
136
152
|
};
|
|
137
153
|
const ModifiersProps = {
|
|
138
154
|
/**
|
|
139
155
|
* Component BEM modifiers
|
|
140
156
|
*/
|
|
141
|
-
modifiers:
|
|
157
|
+
modifiers: {
|
|
158
|
+
type: [String, Array],
|
|
159
|
+
default: void 0
|
|
160
|
+
}
|
|
142
161
|
};
|
|
143
162
|
({
|
|
144
163
|
/**
|
|
145
164
|
* VvIcon name or props
|
|
146
165
|
* @see VVIcon
|
|
147
166
|
*/
|
|
148
|
-
icon: {
|
|
167
|
+
icon: {
|
|
168
|
+
type: [String, Object],
|
|
169
|
+
default: void 0
|
|
170
|
+
},
|
|
149
171
|
/**
|
|
150
172
|
* VvIcon position
|
|
151
173
|
*/
|
|
@@ -176,7 +198,8 @@ const ModifiersProps = {
|
|
|
176
198
|
* Dropdown show / hide transition name
|
|
177
199
|
*/
|
|
178
200
|
transitionName: {
|
|
179
|
-
type: String
|
|
201
|
+
type: String,
|
|
202
|
+
default: void 0
|
|
180
203
|
},
|
|
181
204
|
/**
|
|
182
205
|
* Offset of the dropdown from the trigger
|
|
@@ -244,7 +267,8 @@ const ModifiersProps = {
|
|
|
244
267
|
* Set dropdown width to the same as the trigger
|
|
245
268
|
*/
|
|
246
269
|
triggerWidth: {
|
|
247
|
-
type: Boolean
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: false
|
|
248
272
|
}
|
|
249
273
|
});
|
|
250
274
|
const ActionProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBreadcrumb=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBreadcrumb=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const n=Symbol.for("volver"),u=Symbol.for("dropdownTrigger"),i=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},p={current:{type:Boolean,default:!1}},v={pressed:{type:Boolean,default:!1}},m={label:{type:[String,Number],default:void 0}},f={modifiers:{type:[String,Array],default:void 0}};r.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...m,...v,...c,...p,...s,type:{type:String,default:o.button,validator:e=>Object.values(o).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}},y={...f,routes:Array},g=b;const k=e.defineComponent({name:"VvAction",props:g,emits:["click","mouseover","mouseleave"],setup(t,{expose:r,emit:o}){const l=t,s=e.inject(n),d=e.ref(null);r({$el:d});const{reference:c,bus:p,aria:v,expanded:m}=e.inject(u,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const f=e.computed((()=>l.pressed||(null==m?void 0:m.value))),{role:b}=e.inject(i,{}),y=e.computed((()=>{switch(!0){case l.disabled:return a.button;case void 0!==l.to:return(null==s?void 0:s.nuxt)?a.nuxtLink:a.routerLink;case void 0!==l.href:return a.a;default:return l.defaultTag}})),g=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!f.value||void 0,ariaLabel:l.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case a.a:return{...e,href:l.href,target:l.target,rel:l.rel};case a.routerLink:case a.nuxtLink:return{...e,to:l.to,target:l.target};case a.button:return{...e,type:l.type,disabled:l.disabled};default:return e}})),k=e=>{l.disabled?e.preventDefault():(null==p||p.emit("click",e),o("click",e))},B=e=>{null==p||p.emit("mouseover",e),o("mouseover",e)},_=e=>{null==p||p.emit("mouseleave",e),o("mouseleave",e)};return(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(g),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(f),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:B,onMouseleavePassive:_}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),B={class:"vv-breadcrumb__list"},_=["content"];return e.defineComponent({name:"VvBreadcrumb",props:y,setup(t){const r=t,{modifiers:o}=e.toRefs(r),a=function(t,r,o){return e.computed((()=>{const a={[t]:!0},l="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((r=>{a[`${t}--${r}`]=e.unref(o.value[r])})),a}))}("vv-breadcrumb",o),l=e.computed((()=>{var e;return(null==(e=r.routes)?void 0:e.length)??0})),n=e=>e===l.value-1;return(t,r)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(a)),"aria-label":"breadcrumbs"},[e.createElementVNode("ol",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.routes,(({label:r,...o},a)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-${a}`,class:e.normalizeClass(n(a)?"vv-breadcrumb__item-active":"vv-breadcrumb__item"),itemprop:"itemListElement",itemtype:"https://schema.org/ListItem",itemscope:""},[e.createVNode(k,e.mergeProps(o,{class:n(a)?"vv-breadcrumb__label":"vv-breadcrumb__link","aria-current":n(a)?"page":void 0,itemprop:"item","default-tag":"span"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"label",e.normalizeProps(e.guardReactiveProps({route:o,index:a})),(()=>[e.createTextVNode(e.toDisplayString(r),1)]))])),_:2},1040,["class","aria-current"]),e.createElementVNode("meta",{itemprop:"position",content:`${a+1}`},null,8,_)],2)))),128))])],2))}})}));
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
routes: globalThis.PropType<import("../..").NavItem[]>;
|
|
3
|
-
modifiers:
|
|
3
|
+
modifiers: {
|
|
4
|
+
type: globalThis.PropType<string | string[]>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
4
7
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
8
|
routes: globalThis.PropType<import("../..").NavItem[]>;
|
|
6
|
-
modifiers:
|
|
7
|
-
|
|
9
|
+
modifiers: {
|
|
10
|
+
type: globalThis.PropType<string | string[]>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>>, {
|
|
14
|
+
modifiers: string | string[];
|
|
15
|
+
}, {}>, {
|
|
8
16
|
label?(_: {
|
|
9
17
|
route: {
|
|
10
18
|
ariaLabel?: string | undefined;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { NavItem } from '../../types';
|
|
2
2
|
export declare const VvBreadcrumbProps: {
|
|
3
3
|
routes: globalThis.PropType<NavItem[]>;
|
|
4
|
-
modifiers:
|
|
4
|
+
modifiers: {
|
|
5
|
+
type: globalThis.PropType<string | string[]>;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
5
8
|
};
|
|
@@ -1,99 +1,9 @@
|
|
|
1
|
-
import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, toRef, useAttrs, useSlots, createElementBlock, Fragment } from "vue";
|
|
1
|
+
import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, toRef, useAttrs, useSlots, createElementBlock, Fragment } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
import { uid } from "uid";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
color: String,
|
|
9
|
-
/**
|
|
10
|
-
* Width
|
|
11
|
-
*/
|
|
12
|
-
width: {
|
|
13
|
-
type: [String, Number]
|
|
14
|
-
},
|
|
15
|
-
/**
|
|
16
|
-
* Height
|
|
17
|
-
*/
|
|
18
|
-
height: {
|
|
19
|
-
type: [String, Number]
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* Icon name
|
|
23
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
24
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
25
|
-
*/
|
|
26
|
-
name: {
|
|
27
|
-
type: String,
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* By default 'vv'
|
|
32
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
33
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
34
|
-
*/
|
|
35
|
-
provider: {
|
|
36
|
-
type: String
|
|
37
|
-
},
|
|
38
|
-
/**
|
|
39
|
-
* The name of icon set.
|
|
40
|
-
* Icon default options prefix: simple | normal | detailed
|
|
41
|
-
*/
|
|
42
|
-
prefix: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "normal"
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* Url remote SVG icon
|
|
48
|
-
*/
|
|
49
|
-
src: String,
|
|
50
|
-
/**
|
|
51
|
-
* Horizontal flip
|
|
52
|
-
*/
|
|
53
|
-
horizontalFlip: Boolean,
|
|
54
|
-
/**
|
|
55
|
-
* Vertical flip
|
|
56
|
-
*/
|
|
57
|
-
verticalFlip: Boolean,
|
|
58
|
-
/**
|
|
59
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
60
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
61
|
-
*/
|
|
62
|
-
flip: String,
|
|
63
|
-
/**
|
|
64
|
-
* Icon render mode
|
|
65
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
66
|
-
* 'bg' = span with style using `background`
|
|
67
|
-
* 'mask' = span with style using `mask`
|
|
68
|
-
* 'svg' = svg
|
|
69
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
70
|
-
*/
|
|
71
|
-
mode: String,
|
|
72
|
-
/**
|
|
73
|
-
* Toggles inline or block mode
|
|
74
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
75
|
-
*/
|
|
76
|
-
inline: Boolean,
|
|
77
|
-
/**
|
|
78
|
-
* rotates icon
|
|
79
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
80
|
-
*/
|
|
81
|
-
rotate: [Number, String],
|
|
82
|
-
/**
|
|
83
|
-
* A callback that is called when icon data has been loaded
|
|
84
|
-
*/
|
|
85
|
-
onLoad: Function,
|
|
86
|
-
/**
|
|
87
|
-
* SVG icon string
|
|
88
|
-
*/
|
|
89
|
-
svg: String,
|
|
90
|
-
/**
|
|
91
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
92
|
-
* @values string | string[]
|
|
93
|
-
*/
|
|
94
|
-
modifiers: {
|
|
95
|
-
type: [String, Array]
|
|
96
|
-
}
|
|
4
|
+
const VvIconPropsDefaults = {
|
|
5
|
+
prefix: "normal"
|
|
6
|
+
/* normal */
|
|
97
7
|
};
|
|
98
8
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
99
9
|
Strategy2["absolute"] = "absolute";
|
|
@@ -182,7 +92,24 @@ const __default__$2 = {
|
|
|
182
92
|
};
|
|
183
93
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
184
94
|
...__default__$2,
|
|
185
|
-
props:
|
|
95
|
+
props: mergeDefaults({
|
|
96
|
+
name: {},
|
|
97
|
+
color: {},
|
|
98
|
+
width: {},
|
|
99
|
+
height: {},
|
|
100
|
+
provider: {},
|
|
101
|
+
prefix: {},
|
|
102
|
+
src: {},
|
|
103
|
+
horizontalFlip: { type: Boolean },
|
|
104
|
+
verticalFlip: { type: Boolean },
|
|
105
|
+
flip: {},
|
|
106
|
+
mode: {},
|
|
107
|
+
inline: { type: Boolean },
|
|
108
|
+
rotate: {},
|
|
109
|
+
onLoad: { type: Function },
|
|
110
|
+
svg: {},
|
|
111
|
+
modifiers: {}
|
|
112
|
+
}, VvIconPropsDefaults),
|
|
186
113
|
setup(__props) {
|
|
187
114
|
const props = __props;
|
|
188
115
|
const hasRotate = computed(() => {
|
|
@@ -290,6 +217,7 @@ const LinkProps = {
|
|
|
290
217
|
*/
|
|
291
218
|
target: {
|
|
292
219
|
type: String,
|
|
220
|
+
default: void 0,
|
|
293
221
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
294
222
|
},
|
|
295
223
|
/**
|
|
@@ -304,7 +232,10 @@ const LoadingProps = {
|
|
|
304
232
|
/**
|
|
305
233
|
* Loading status
|
|
306
234
|
*/
|
|
307
|
-
loading:
|
|
235
|
+
loading: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
default: false
|
|
238
|
+
},
|
|
308
239
|
/**
|
|
309
240
|
* Loading label
|
|
310
241
|
*/
|
|
@@ -317,44 +248,65 @@ const DisabledProps = {
|
|
|
317
248
|
/**
|
|
318
249
|
* Whether the form control is disabled
|
|
319
250
|
*/
|
|
320
|
-
disabled:
|
|
251
|
+
disabled: {
|
|
252
|
+
type: Boolean,
|
|
253
|
+
default: false
|
|
254
|
+
}
|
|
321
255
|
};
|
|
322
256
|
const ActiveProps = {
|
|
323
257
|
/**
|
|
324
258
|
* Whether the item is active
|
|
325
259
|
*/
|
|
326
|
-
active:
|
|
260
|
+
active: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
default: false
|
|
263
|
+
}
|
|
327
264
|
};
|
|
328
265
|
const CurrentProps = {
|
|
329
266
|
/**
|
|
330
267
|
* Whether the item is current
|
|
331
268
|
*/
|
|
332
|
-
current:
|
|
269
|
+
current: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: false
|
|
272
|
+
}
|
|
333
273
|
};
|
|
334
274
|
const PressedProps = {
|
|
335
275
|
/**
|
|
336
276
|
* Whether the item is pressed
|
|
337
277
|
*/
|
|
338
|
-
pressed:
|
|
278
|
+
pressed: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
default: false
|
|
281
|
+
}
|
|
339
282
|
};
|
|
340
283
|
const LabelProps = {
|
|
341
284
|
/**
|
|
342
285
|
* The item label
|
|
343
286
|
*/
|
|
344
|
-
label:
|
|
287
|
+
label: {
|
|
288
|
+
type: [String, Number],
|
|
289
|
+
default: void 0
|
|
290
|
+
}
|
|
345
291
|
};
|
|
346
292
|
const ModifiersProps = {
|
|
347
293
|
/**
|
|
348
294
|
* Component BEM modifiers
|
|
349
295
|
*/
|
|
350
|
-
modifiers:
|
|
296
|
+
modifiers: {
|
|
297
|
+
type: [String, Array],
|
|
298
|
+
default: void 0
|
|
299
|
+
}
|
|
351
300
|
};
|
|
352
|
-
|
|
301
|
+
const IconProps = {
|
|
353
302
|
/**
|
|
354
303
|
* VvIcon name or props
|
|
355
304
|
* @see VVIcon
|
|
356
305
|
*/
|
|
357
|
-
icon: {
|
|
306
|
+
icon: {
|
|
307
|
+
type: [String, Object],
|
|
308
|
+
default: void 0
|
|
309
|
+
},
|
|
358
310
|
/**
|
|
359
311
|
* VvIcon position
|
|
360
312
|
*/
|
|
@@ -363,7 +315,7 @@ const ModifiersProps = {
|
|
|
363
315
|
default: Position.before,
|
|
364
316
|
validation: (value) => Object.values(Position).includes(value)
|
|
365
317
|
}
|
|
366
|
-
}
|
|
318
|
+
};
|
|
367
319
|
const UnselectableProps = {
|
|
368
320
|
/**
|
|
369
321
|
* If true the input will be unselectable
|
|
@@ -398,7 +350,8 @@ const IdProps = {
|
|
|
398
350
|
* Dropdown show / hide transition name
|
|
399
351
|
*/
|
|
400
352
|
transitionName: {
|
|
401
|
-
type: String
|
|
353
|
+
type: String,
|
|
354
|
+
default: void 0
|
|
402
355
|
},
|
|
403
356
|
/**
|
|
404
357
|
* Offset of the dropdown from the trigger
|
|
@@ -466,7 +419,8 @@ const IdProps = {
|
|
|
466
419
|
* Set dropdown width to the same as the trigger
|
|
467
420
|
*/
|
|
468
421
|
triggerWidth: {
|
|
469
|
-
type: Boolean
|
|
422
|
+
type: Boolean,
|
|
423
|
+
default: false
|
|
470
424
|
}
|
|
471
425
|
});
|
|
472
426
|
const ActionProps = {
|
|
@@ -747,10 +701,7 @@ const VvButtonProps = {
|
|
|
747
701
|
...ModifiersProps,
|
|
748
702
|
...UnselectableProps,
|
|
749
703
|
...LoadingProps,
|
|
750
|
-
|
|
751
|
-
* Button icon
|
|
752
|
-
*/
|
|
753
|
-
icon: [String, Object],
|
|
704
|
+
...IconProps,
|
|
754
705
|
/**
|
|
755
706
|
* Button icon position
|
|
756
707
|
*/
|
|
@@ -845,6 +796,41 @@ function useGroupProps(props, emit) {
|
|
|
845
796
|
};
|
|
846
797
|
}
|
|
847
798
|
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
799
|
+
function useComponentIcon(icon, iconPosition) {
|
|
800
|
+
const hasIcon = computed(() => {
|
|
801
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
802
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
803
|
+
}
|
|
804
|
+
return icon == null ? void 0 : icon.value;
|
|
805
|
+
});
|
|
806
|
+
const hasIconBefore = computed(
|
|
807
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
808
|
+
);
|
|
809
|
+
const hasIconAfter = computed(
|
|
810
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
811
|
+
);
|
|
812
|
+
const hasIconLeft = computed(
|
|
813
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
814
|
+
);
|
|
815
|
+
const hasIconRight = computed(
|
|
816
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
817
|
+
);
|
|
818
|
+
const hasIconTop = computed(
|
|
819
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
820
|
+
);
|
|
821
|
+
const hasIconBottom = computed(
|
|
822
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
823
|
+
);
|
|
824
|
+
return {
|
|
825
|
+
hasIcon,
|
|
826
|
+
hasIconLeft,
|
|
827
|
+
hasIconRight,
|
|
828
|
+
hasIconTop,
|
|
829
|
+
hasIconBottom,
|
|
830
|
+
hasIconBefore,
|
|
831
|
+
hasIconAfter
|
|
832
|
+
};
|
|
833
|
+
}
|
|
848
834
|
const _hoisted_1 = {
|
|
849
835
|
key: 1,
|
|
850
836
|
class: "vv-button__label"
|
|
@@ -907,9 +893,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
907
893
|
)
|
|
908
894
|
}))
|
|
909
895
|
);
|
|
910
|
-
const
|
|
911
|
-
() => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
|
|
912
|
-
);
|
|
896
|
+
const { hasIcon } = useComponentIcon(icon);
|
|
913
897
|
const toggleValue = computed(() => {
|
|
914
898
|
return props.value !== void 0 ? props.value : name.value;
|
|
915
899
|
});
|
|
@@ -972,12 +956,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
972
956
|
{ key: 1 },
|
|
973
957
|
[
|
|
974
958
|
renderSlot(_ctx.$slots, "before"),
|
|
975
|
-
unref(
|
|
959
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
976
960
|
_sfc_main$2,
|
|
977
|
-
mergeProps({
|
|
978
|
-
key: 0,
|
|
979
|
-
class: "vv-button__icon"
|
|
980
|
-
}, unref(hasIconProps)),
|
|
961
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
|
|
981
962
|
null,
|
|
982
963
|
16
|
|
983
964
|
/* FULL_PROPS */
|