@volverjs/ui-vue 0.0.6-beta.3 → 0.0.6-beta.5
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 +1 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +18 -1
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -2
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +22 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +6 -58
- package/dist/components/VvAccordionGroup/index.d.ts +3 -29
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -28
- package/dist/components/VvAvatarGroup/index.d.ts +1 -14
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -28
- package/dist/components/VvBreadcrumb/index.d.ts +1 -14
- package/dist/components/VvButton/VvButton.es.js +51 -20
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +27 -2
- package/dist/components/VvButton/index.d.ts +25 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +10 -4
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +7 -59
- package/dist/components/VvButtonGroup/index.d.ts +3 -29
- package/dist/components/VvCard/VvCard.vue.d.ts +2 -2
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +1 -1
- package/dist/components/VvDialog/VvDialog.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/index.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +1 -1
- package/dist/components/VvNav/VvNav.es.js +15 -7
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +2 -28
- package/dist/components/VvNav/index.d.ts +2 -14
- package/dist/components/VvSelect/VvSelect.es.js +1 -1
- package/dist/components/VvTab/VvTab.es.js +505 -0
- package/dist/components/VvTab/VvTab.umd.js +1 -0
- package/dist/components/VvTab/VvTab.vue.d.ts +26 -0
- package/dist/components/VvTab/index.d.ts +10 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +1 -1
- package/dist/components/index.es.js +83 -26
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/stories/Button/Button.settings.d.ts +25 -0
- package/dist/stories/Tab/Tab.settings.d.ts +37 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/package.json +12 -4
- 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/index.ts +21 -4
- package/src/components/VvAccordionGroup/index.ts +6 -3
- package/src/components/VvAvatarGroup/index.ts +2 -2
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +9 -6
- package/src/components/VvButton/index.ts +44 -21
- package/src/components/VvButtonGroup/VvButtonGroup.vue +2 -2
- package/src/components/VvButtonGroup/index.ts +14 -2
- package/src/components/VvCard/index.ts +1 -1
- package/src/components/VvCombobox/index.ts +2 -2
- package/src/components/VvIcon/index.ts +1 -1
- package/src/components/VvNav/VvNav.vue +18 -8
- package/src/components/VvNav/index.ts +2 -1
- package/src/components/VvTab/VvTab.vue +53 -0
- package/src/components/VvTab/index.ts +13 -0
- package/src/components/common/HintSlot.ts +3 -3
- package/src/props/index.ts +2 -2
- package/src/stories/Button/Button.settings.ts +21 -0
- package/src/stories/Button/Button.stories.mdx +3 -3
- package/src/stories/Button/ButtonToggle.stories.mdx +62 -0
- package/src/stories/Tab/Tab.settings.ts +41 -0
- package/src/stories/Tab/Tab.stories.mdx +65 -0
- package/src/stories/Tab/Tab.test.ts +37 -0
- package/src/types/group.d.ts +5 -3
package/README.md
CHANGED
|
@@ -167,6 +167,7 @@ The following features are planned for the next releases:
|
|
|
167
167
|
- [x] `VvAvatar` component;
|
|
168
168
|
- [x] `VvAvatarGroup` component;
|
|
169
169
|
- [x] Menus, navigation and tabs with `VvNav`;
|
|
170
|
+
- [x] `VvTab` component;
|
|
170
171
|
- [ ] Alerts, notifications and toasts with `VvAlert` and `VvToast` component;
|
|
171
172
|
- [ ] Loaders with `VvLoader` and `VvSkeleton`;
|
|
172
173
|
- [ ] `VvTable` component with sort, filters, pagination and cell editing;
|
|
@@ -79,13 +79,30 @@ function useGroupProps(props, emit) {
|
|
|
79
79
|
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
80
80
|
const not = getGroupOrLocalRef("not", props);
|
|
81
81
|
const collapse = getGroupOrLocalRef("collapse", props);
|
|
82
|
-
const modifiers = getGroupOrLocalRef("modifiers", props);
|
|
83
82
|
const disabled = computed(
|
|
84
83
|
() => {
|
|
85
84
|
var _a;
|
|
86
85
|
return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
|
|
87
86
|
}
|
|
88
87
|
);
|
|
88
|
+
const modifiers = computed(() => {
|
|
89
|
+
let localModifiers = props.modifiers;
|
|
90
|
+
let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
|
|
91
|
+
const toReturn = /* @__PURE__ */ new Set();
|
|
92
|
+
if (localModifiers) {
|
|
93
|
+
if (!Array.isArray(localModifiers)) {
|
|
94
|
+
localModifiers = localModifiers.split(" ");
|
|
95
|
+
}
|
|
96
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
97
|
+
}
|
|
98
|
+
if (groupModifiers) {
|
|
99
|
+
if (!Array.isArray(groupModifiers)) {
|
|
100
|
+
groupModifiers = groupModifiers.split(" ");
|
|
101
|
+
}
|
|
102
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
103
|
+
}
|
|
104
|
+
return Array.from(toReturn);
|
|
105
|
+
});
|
|
89
106
|
return {
|
|
90
107
|
// group props
|
|
91
108
|
modelValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordion=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordion=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";const n=Symbol.for("accordionGroup");function t(o){const r=e.inject(o,void 0),n=e.computed((()=>{return o=r,!(null==(n=e.unref(o))||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length);var o,n}));return{group:r,isInGroup:n,getGroupOrLocalRef:function(o,n,t){if(null==r?void 0:r.value){const n=e.unref(r.value)[o];return e.computed({get:()=>null==n?void 0:n.value,set(e){n.value=e}})}const a=e.toRef(n,o);return e.computed({get:()=>a.value,set(e){t&&t(`update:${o}`,e)}})}}}const a={name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},modifiers:[String,Array],disabled:Boolean,not:Boolean};const u=["id","open"],l=["aria-controls","aria-expanded"],i=["aria-hidden"];return e.defineComponent({name:"VvAccordion",props:a,emits:["update:modelValue"],setup(a,{emit:d}){const s=a,c=e.useAttrs(),v=e.computed((()=>s.name||(null==c?void 0:c.id)||o.nanoid())),{modifiers:f,title:p,content:m,disabled:y,collapse:g,modelValue:A,isInGroup:b,not:h}=function(o,r){const{group:a,isInGroup:u,getGroupOrLocalRef:l}=t(n),{title:i,content:d}=e.toRefs(o),s=l("modelValue",o,r),c=l("not",o),v=l("collapse",o),f=e.computed((()=>{var e;return Boolean(o.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))})),p=e.computed((()=>{let e=o.modifiers,r=null==a?void 0:a.value.modifiers.value;const n=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>n.add(e)))),r&&(Array.isArray(r)||(r=r.split(" ")),r.forEach((e=>n.add(e)))),Array.from(n)}));return{modelValue:s,not:c,isInGroup:u,group:a,collapse:v,modifiers:p,disabled:f,title:i,content:d}}(s,d),V=e.ref(!1),S=e.computed({get:()=>{let e=A.value;return b.value?e=g.value&&Array.isArray(A.value)?A.value.includes(v.value):A.value===v.value:void 0===A.value&&(e=V.value),h.value?!e:e},set:e=>{if(h.value&&(e=!e),b.value)return g.value&&Array.isArray(A.value)?e?void A.value.push(v.value):void(A.value=A.value.filter((e=>e!==v.value))):void(A.value=e?v.value:null);void 0!==A.value||"boolean"!=typeof e?A.value=e:V.value=e}}),E=function(o,r,n){return e.computed((()=>{const t={[o]:!0},a="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(t[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((r=>{t[`${o}--${r}`]=e.unref(n.value[r])})),t}))}("vv-accordion",f,e.computed((()=>({disabled:y.value})))),G=r.useToggle(S);return(o,r)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(v),class:e.normalizeClass(e.unref(E)),open:e.unref(S)},[e.createElementVNode("summary",{"aria-controls":e.unref(v),"aria-expanded":e.unref(S),class:"vv-accordion__summary",onClick:r[0]||(r[0]=e.withModifiers((o=>e.unref(G)()),["prevent"]))},[e.renderSlot(o.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(S)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)]))],8,l),e.createElementVNode("div",{"aria-hidden":!e.unref(S),class:"vv-accordion__content"},[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({open:e.unref(S)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)),1)]))],8,i)],10,u))}})}));
|
|
@@ -6,7 +6,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
6
6
|
type: BooleanConstructor;
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
|
-
modifiers:
|
|
9
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
10
10
|
disabled: BooleanConstructor;
|
|
11
11
|
not: BooleanConstructor;
|
|
12
12
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -17,7 +17,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
17
17
|
type: BooleanConstructor;
|
|
18
18
|
default: undefined;
|
|
19
19
|
};
|
|
20
|
-
modifiers:
|
|
20
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
21
21
|
disabled: BooleanConstructor;
|
|
22
22
|
not: BooleanConstructor;
|
|
23
23
|
}>> & {
|
|
@@ -23,7 +23,7 @@ export declare const VvAccordionProps: {
|
|
|
23
23
|
/**
|
|
24
24
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
25
25
|
*/
|
|
26
|
-
modifiers:
|
|
26
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
27
27
|
/**
|
|
28
28
|
* If true, the accordion will be disabled
|
|
29
29
|
*/
|
|
@@ -44,7 +44,7 @@ export declare function useGroupProps(props: VvAccordionPropsTypes, emit: (event
|
|
|
44
44
|
isInGroup: globalThis.ComputedRef<boolean>;
|
|
45
45
|
group: Ref<AccordionGroupState> | undefined;
|
|
46
46
|
collapse: Ref<boolean>;
|
|
47
|
-
modifiers:
|
|
47
|
+
modifiers: globalThis.ComputedRef<string[]>;
|
|
48
48
|
disabled: globalThis.ComputedRef<boolean>;
|
|
49
49
|
title: Ref<string | undefined> | undefined;
|
|
50
50
|
content: Ref<string | undefined> | undefined;
|
|
@@ -79,13 +79,30 @@ function useGroupProps(props, emit) {
|
|
|
79
79
|
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
80
80
|
const not = getGroupOrLocalRef("not", props);
|
|
81
81
|
const collapse = getGroupOrLocalRef("collapse", props);
|
|
82
|
-
const modifiers = getGroupOrLocalRef("modifiers", props);
|
|
83
82
|
const disabled = computed(
|
|
84
83
|
() => {
|
|
85
84
|
var _a;
|
|
86
85
|
return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
|
|
87
86
|
}
|
|
88
87
|
);
|
|
88
|
+
const modifiers = computed(() => {
|
|
89
|
+
let localModifiers = props.modifiers;
|
|
90
|
+
let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
|
|
91
|
+
const toReturn = /* @__PURE__ */ new Set();
|
|
92
|
+
if (localModifiers) {
|
|
93
|
+
if (!Array.isArray(localModifiers)) {
|
|
94
|
+
localModifiers = localModifiers.split(" ");
|
|
95
|
+
}
|
|
96
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
97
|
+
}
|
|
98
|
+
if (groupModifiers) {
|
|
99
|
+
if (!Array.isArray(groupModifiers)) {
|
|
100
|
+
groupModifiers = groupModifiers.split(" ");
|
|
101
|
+
}
|
|
102
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
103
|
+
}
|
|
104
|
+
return Array.from(toReturn);
|
|
105
|
+
});
|
|
89
106
|
return {
|
|
90
107
|
// group props
|
|
91
108
|
modelValue,
|
|
@@ -234,7 +251,10 @@ const VvAccordionGroupProps = {
|
|
|
234
251
|
* Accordion items
|
|
235
252
|
* @type VvAccordionGroupItem
|
|
236
253
|
*/
|
|
237
|
-
items: {
|
|
254
|
+
items: {
|
|
255
|
+
type: Array,
|
|
256
|
+
default: () => []
|
|
257
|
+
},
|
|
238
258
|
/**
|
|
239
259
|
* If true, accordion items stay open when another item is opened
|
|
240
260
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordionGroup=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";const t=Symbol.for("accordionGroup");function
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordionGroup=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";const t=Symbol.for("accordionGroup");function a(o){const r=e.inject(o,void 0),t=e.computed((()=>{return o=r,!(null==(t=e.unref(o))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var o,t}));return{group:r,isInGroup:t,getGroupOrLocalRef:function(o,t,a){if(null==r?void 0:r.value){const t=e.unref(r.value)[o];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const l=e.toRef(t,o);return e.computed({get:()=>l.value,set(e){a&&a(`update:${o}`,e)}})}}}const l={name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},modifiers:[String,Array],disabled:Boolean,not:Boolean};function n(o,r,t){return e.computed((()=>{const a={[o]:!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[`${o}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((r=>{a[`${o}--${r}`]=e.unref(t.value[r])})),a}))}const u=["id","open"],i=["aria-controls","aria-expanded"],d=["aria-hidden"],s=e.defineComponent({name:"VvAccordion",props:l,emits:["update:modelValue"],setup(l,{emit:s}){const c=l,v=e.useAttrs(),p=e.computed((()=>c.name||(null==v?void 0:v.id)||o.nanoid())),{modifiers:m,title:f,content:y,disabled:g,collapse:A,modelValue:V,isInGroup:b,not:h}=function(o,r){const{group:l,isInGroup:n,getGroupOrLocalRef:u}=a(t),{title:i,content:d}=e.toRefs(o),s=u("modelValue",o,r),c=u("not",o),v=u("collapse",o),p=e.computed((()=>{var e;return Boolean(o.disabled||(null==(e=null==l?void 0:l.value)?void 0:e.disabled.value))})),m=e.computed((()=>{let e=o.modifiers,r=null==l?void 0:l.value.modifiers.value;const t=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>t.add(e)))),r&&(Array.isArray(r)||(r=r.split(" ")),r.forEach((e=>t.add(e)))),Array.from(t)}));return{modelValue:s,not:c,isInGroup:n,group:l,collapse:v,modifiers:m,disabled:p,title:i,content:d}}(c,s),S=e.ref(!1),k=e.computed({get:()=>{let e=V.value;return b.value?e=A.value&&Array.isArray(V.value)?V.value.includes(p.value):V.value===p.value:void 0===V.value&&(e=S.value),h.value?!e:e},set:e=>{if(h.value&&(e=!e),b.value)return A.value&&Array.isArray(V.value)?e?void V.value.push(p.value):void(V.value=V.value.filter((e=>e!==p.value))):void(V.value=e?p.value:null);void 0!==V.value||"boolean"!=typeof e?V.value=e:S.value=e}}),B=n("vv-accordion",m,e.computed((()=>({disabled:g.value})))),$=r.useToggle(k);return(o,r)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(p),class:e.normalizeClass(e.unref(B)),open:e.unref(k)},[e.createElementVNode("summary",{"aria-controls":e.unref(p),"aria-expanded":e.unref(k),class:"vv-accordion__summary",onClick:r[0]||(r[0]=e.withModifiers((o=>e.unref($)()),["prevent"]))},[e.renderSlot(o.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(k)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))],8,i),e.createElementVNode("div",{"aria-hidden":!e.unref(k),class:"vv-accordion__content"},[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({open:e.unref(k)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]))],8,d)],10,u))}}),c={modelValue:[String,Array],items:{type:Array,default:()=>[]},collapse:Boolean,modifiers:[String,Array],itemModifiers:{type:[String,Array],default:""},disabled:Boolean,not:Boolean,storeKey:String};return e.defineComponent({name:"VvAccordionGroup",props:c,emits:["update:modelValue"],setup(o,{emit:a}){const l=o,{disabled:u,collapse:i,modifiers:d,itemModifiers:c,items:v,not:p}=e.toRefs(l);e.watchEffect((()=>{"string"==typeof l.modelValue&&i.value&&console.warn("[VvAccordionGroup]: modelValue is a string but collapse is true.")}));let m=e.ref([]);e.watch((()=>l.storeKey),(o=>{m=o?r.useStorage(o,m.value):e.ref([])}),{immediate:!0});const f=e.computed({get:()=>{var e;return void 0!==l.modelValue?i.value?l.modelValue:Array.isArray(l.modelValue)?l.modelValue[0]:l.modelValue:i.value?m.value:null==(e=m.value)?void 0:e[0]},set:e=>{if(void 0!==l.modelValue)return!Array.isArray(l.modelValue)&&!i.value||Array.isArray(e)||(e=[e]),a("update:modelValue",e);m.value=Array.isArray(e)?e:[e]}});!function(o){if(Object.keys(o).some((r=>"key"!==r&&!e.isRef(o[r]))))throw Error("One or more groupState props aren't ref.");e.provide(o.key,e.computed((()=>o)))}({key:t,modelValue:f,disabled:u,collapse:i,modifiers:c,not:p});const y=n("vv-accordion-group",d,e.computed((()=>({disabled:u.value}))));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(y))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(r=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:r.title},{name:r.name,title:r.title,content:r.content}),{header:e.withCtx((t=>[e.renderSlot(o.$slots,`header::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),details:e.withCtx((t=>[e.renderSlot(o.$slots,`details::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),_:2},1040)))),128))]))],2))}})}));
|
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
3
3
|
items: {
|
|
4
|
-
type:
|
|
5
|
-
(arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
6
|
-
(...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
7
|
-
new (arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
8
|
-
new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
9
|
-
isArray(arg: any): arg is any[];
|
|
10
|
-
readonly prototype: any[];
|
|
11
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
12
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
13
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
14
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
15
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
16
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
17
|
-
};
|
|
4
|
+
type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
|
|
18
5
|
default: () => never[];
|
|
19
6
|
};
|
|
20
7
|
collapse: BooleanConstructor;
|
|
21
|
-
modifiers:
|
|
8
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
22
9
|
itemModifiers: {
|
|
23
|
-
type:
|
|
24
|
-
(arrayLength: number): string[];
|
|
25
|
-
(...items: string[]): string[];
|
|
26
|
-
new (arrayLength: number): string[];
|
|
27
|
-
new (...items: string[]): string[];
|
|
28
|
-
isArray(arg: any): arg is any[];
|
|
29
|
-
readonly prototype: any[];
|
|
30
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
31
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
32
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
33
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
34
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
35
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
36
|
-
})[];
|
|
10
|
+
type: globalThis.PropType<string | string[]>;
|
|
37
11
|
default: string;
|
|
38
12
|
};
|
|
39
13
|
disabled: BooleanConstructor;
|
|
@@ -42,39 +16,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
42
16
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
17
|
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
44
18
|
items: {
|
|
45
|
-
type:
|
|
46
|
-
(arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
47
|
-
(...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
48
|
-
new (arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
49
|
-
new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
50
|
-
isArray(arg: any): arg is any[];
|
|
51
|
-
readonly prototype: any[];
|
|
52
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
53
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
54
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
55
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
56
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
57
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
58
|
-
};
|
|
19
|
+
type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
|
|
59
20
|
default: () => never[];
|
|
60
21
|
};
|
|
61
22
|
collapse: BooleanConstructor;
|
|
62
|
-
modifiers:
|
|
23
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
63
24
|
itemModifiers: {
|
|
64
|
-
type:
|
|
65
|
-
(arrayLength: number): string[];
|
|
66
|
-
(...items: string[]): string[];
|
|
67
|
-
new (arrayLength: number): string[];
|
|
68
|
-
new (...items: string[]): string[];
|
|
69
|
-
isArray(arg: any): arg is any[];
|
|
70
|
-
readonly prototype: any[];
|
|
71
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
72
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
73
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
74
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
75
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
76
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
77
|
-
})[];
|
|
25
|
+
type: globalThis.PropType<string | string[]>;
|
|
78
26
|
default: string;
|
|
79
27
|
};
|
|
80
28
|
disabled: BooleanConstructor;
|
|
@@ -15,20 +15,7 @@ export declare const VvAccordionGroupProps: {
|
|
|
15
15
|
* @type VvAccordionGroupItem
|
|
16
16
|
*/
|
|
17
17
|
items: {
|
|
18
|
-
type:
|
|
19
|
-
(arrayLength: number): VvAccordionGroupItem[];
|
|
20
|
-
(...items: VvAccordionGroupItem[]): VvAccordionGroupItem[];
|
|
21
|
-
new (arrayLength: number): VvAccordionGroupItem[];
|
|
22
|
-
new (...items: VvAccordionGroupItem[]): VvAccordionGroupItem[];
|
|
23
|
-
isArray(arg: any): arg is any[];
|
|
24
|
-
readonly prototype: any[];
|
|
25
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
26
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
27
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
28
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
29
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
30
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
31
|
-
};
|
|
18
|
+
type: globalThis.PropType<VvAccordionGroupItem[]>;
|
|
32
19
|
default: () => never[];
|
|
33
20
|
};
|
|
34
21
|
/**
|
|
@@ -38,25 +25,12 @@ export declare const VvAccordionGroupProps: {
|
|
|
38
25
|
/**
|
|
39
26
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
40
27
|
*/
|
|
41
|
-
modifiers:
|
|
28
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
42
29
|
/**
|
|
43
30
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
44
31
|
*/
|
|
45
32
|
itemModifiers: {
|
|
46
|
-
type:
|
|
47
|
-
(arrayLength: number): string[];
|
|
48
|
-
(...items: string[]): string[];
|
|
49
|
-
new (arrayLength: number): string[];
|
|
50
|
-
new (...items: string[]): string[];
|
|
51
|
-
isArray(arg: any): arg is any[];
|
|
52
|
-
readonly prototype: any[];
|
|
53
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
54
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
55
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
56
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
57
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
58
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
59
|
-
})[];
|
|
33
|
+
type: globalThis.PropType<string | string[]>;
|
|
60
34
|
default: string;
|
|
61
35
|
};
|
|
62
36
|
/**
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
items: {
|
|
3
|
-
type:
|
|
4
|
-
(arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
5
|
-
(...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
6
|
-
new (arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
7
|
-
new (...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
8
|
-
isArray(arg: any): arg is any[];
|
|
9
|
-
readonly prototype: any[];
|
|
10
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
11
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
12
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
13
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
14
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
15
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
16
|
-
};
|
|
3
|
+
type: globalThis.PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
|
|
17
4
|
default: () => never[];
|
|
18
5
|
required: boolean;
|
|
19
6
|
};
|
|
@@ -28,20 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
15
|
modifiers: globalThis.PropType<string | string[]>;
|
|
29
16
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
17
|
items: {
|
|
31
|
-
type:
|
|
32
|
-
(arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
33
|
-
(...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
34
|
-
new (arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
35
|
-
new (...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
36
|
-
isArray(arg: any): arg is any[];
|
|
37
|
-
readonly prototype: any[];
|
|
38
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
39
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
40
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
41
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
42
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
43
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
44
|
-
};
|
|
18
|
+
type: globalThis.PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
|
|
45
19
|
default: () => never[];
|
|
46
20
|
required: boolean;
|
|
47
21
|
};
|
|
@@ -9,20 +9,7 @@ export declare const VvAvatarGroupProps: {
|
|
|
9
9
|
* avatar items
|
|
10
10
|
*/
|
|
11
11
|
items: {
|
|
12
|
-
type:
|
|
13
|
-
(arrayLength: number): AvatarItem[];
|
|
14
|
-
(...items: AvatarItem[]): AvatarItem[];
|
|
15
|
-
new (arrayLength: number): AvatarItem[];
|
|
16
|
-
new (...items: AvatarItem[]): AvatarItem[];
|
|
17
|
-
isArray(arg: any): arg is any[];
|
|
18
|
-
readonly prototype: any[];
|
|
19
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
20
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
21
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
22
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
23
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
24
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
25
|
-
};
|
|
12
|
+
type: globalThis.PropType<AvatarItem[]>;
|
|
26
13
|
default: () => never[];
|
|
27
14
|
required: boolean;
|
|
28
15
|
};
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
routes:
|
|
3
|
-
(arrayLength: number): import(".").Route[];
|
|
4
|
-
(...items: import(".").Route[]): import(".").Route[];
|
|
5
|
-
new (arrayLength: number): import(".").Route[];
|
|
6
|
-
new (...items: import(".").Route[]): import(".").Route[];
|
|
7
|
-
isArray(arg: any): arg is any[];
|
|
8
|
-
readonly prototype: any[];
|
|
9
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
10
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
11
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
12
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
13
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
14
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
15
|
-
};
|
|
2
|
+
routes: globalThis.PropType<import(".").Route[]>;
|
|
16
3
|
modifiers: globalThis.PropType<string | string[]>;
|
|
17
4
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
-
routes:
|
|
19
|
-
(arrayLength: number): import(".").Route[];
|
|
20
|
-
(...items: import(".").Route[]): import(".").Route[];
|
|
21
|
-
new (arrayLength: number): import(".").Route[];
|
|
22
|
-
new (...items: import(".").Route[]): import(".").Route[];
|
|
23
|
-
isArray(arg: any): arg is any[];
|
|
24
|
-
readonly prototype: any[];
|
|
25
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
26
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
27
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
28
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
29
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
30
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
31
|
-
};
|
|
5
|
+
routes: globalThis.PropType<import(".").Route[]>;
|
|
32
6
|
modifiers: globalThis.PropType<string | string[]>;
|
|
33
7
|
}>>, {}>, {
|
|
34
8
|
label: (_: {
|
|
@@ -7,19 +7,6 @@ export interface Route {
|
|
|
7
7
|
href?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const VvBreadcrumbProps: {
|
|
10
|
-
routes:
|
|
11
|
-
(arrayLength: number): Route[];
|
|
12
|
-
(...items: Route[]): Route[];
|
|
13
|
-
new (arrayLength: number): Route[];
|
|
14
|
-
new (...items: Route[]): Route[];
|
|
15
|
-
isArray(arg: any): arg is any[];
|
|
16
|
-
readonly prototype: any[];
|
|
17
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
18
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
19
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
20
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
21
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
22
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
23
|
-
};
|
|
10
|
+
routes: globalThis.PropType<Route[]>;
|
|
24
11
|
modifiers: globalThis.PropType<string | string[]>;
|
|
25
12
|
};
|
|
@@ -89,7 +89,7 @@ const VvIconProps = {
|
|
|
89
89
|
svg: String,
|
|
90
90
|
/**
|
|
91
91
|
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
92
|
-
* @values string |
|
|
92
|
+
* @values string | string[]
|
|
93
93
|
*/
|
|
94
94
|
modifiers: {
|
|
95
95
|
type: [String, Array]
|
|
@@ -722,22 +722,38 @@ const VvButtonProps = {
|
|
|
722
722
|
* Loading icon
|
|
723
723
|
*/
|
|
724
724
|
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
725
|
+
/**
|
|
726
|
+
* Enable button toggle
|
|
727
|
+
*/
|
|
725
728
|
toggle: {
|
|
726
729
|
type: Boolean,
|
|
727
730
|
default: false
|
|
728
731
|
},
|
|
729
|
-
|
|
732
|
+
/**
|
|
733
|
+
* Button toggle value
|
|
734
|
+
*/
|
|
735
|
+
value: {
|
|
736
|
+
type: [String, Number, Boolean],
|
|
737
|
+
default: void 0
|
|
738
|
+
},
|
|
739
|
+
/**
|
|
740
|
+
* Value associated with the unchecked state
|
|
741
|
+
*/
|
|
742
|
+
uncheckedValue: {
|
|
743
|
+
type: [String, Number, Boolean],
|
|
744
|
+
default: void 0
|
|
745
|
+
},
|
|
746
|
+
/**
|
|
747
|
+
* Button toggle model value
|
|
748
|
+
*/
|
|
749
|
+
modelValue: {
|
|
750
|
+
type: [String, Number, Boolean],
|
|
751
|
+
default: void 0
|
|
752
|
+
}
|
|
730
753
|
};
|
|
731
754
|
function useGroupProps(props, emit) {
|
|
732
755
|
const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_BUTTON_GROUP);
|
|
733
|
-
const {
|
|
734
|
-
id,
|
|
735
|
-
iconPosition,
|
|
736
|
-
icon,
|
|
737
|
-
label,
|
|
738
|
-
pressed,
|
|
739
|
-
modifiers: localModifiers
|
|
740
|
-
} = toRefs(props);
|
|
756
|
+
const { id, iconPosition, icon, label, pressed } = toRefs(props);
|
|
741
757
|
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
742
758
|
const toggle = getGroupOrLocalRef("toggle", props);
|
|
743
759
|
const unselectable = getGroupOrLocalRef(
|
|
@@ -746,10 +762,22 @@ function useGroupProps(props, emit) {
|
|
|
746
762
|
);
|
|
747
763
|
const multiple = computed(() => (group == null ? void 0 : group.value.multiple.value) ?? false);
|
|
748
764
|
const modifiers = computed(() => {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
const
|
|
752
|
-
|
|
765
|
+
let localModifiers = props.modifiers;
|
|
766
|
+
let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
|
|
767
|
+
const toReturn = /* @__PURE__ */ new Set();
|
|
768
|
+
if (localModifiers) {
|
|
769
|
+
if (!Array.isArray(localModifiers)) {
|
|
770
|
+
localModifiers = localModifiers.split(" ");
|
|
771
|
+
}
|
|
772
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
773
|
+
}
|
|
774
|
+
if (groupModifiers) {
|
|
775
|
+
if (!Array.isArray(groupModifiers)) {
|
|
776
|
+
groupModifiers = groupModifiers.split(" ");
|
|
777
|
+
}
|
|
778
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
779
|
+
}
|
|
780
|
+
return Array.from(toReturn);
|
|
753
781
|
});
|
|
754
782
|
const disabled = computed(
|
|
755
783
|
() => {
|
|
@@ -841,25 +869,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
841
869
|
const hasIconProps = computed(
|
|
842
870
|
() => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
|
|
843
871
|
);
|
|
872
|
+
const toggleValue = computed(() => {
|
|
873
|
+
return props.value !== void 0 ? props.value : name.value;
|
|
874
|
+
});
|
|
844
875
|
const onClick = () => {
|
|
845
876
|
if (toggle.value) {
|
|
846
877
|
if (Array.isArray(modelValue.value)) {
|
|
847
|
-
if (contains(
|
|
878
|
+
if (contains(toggleValue.value, modelValue.value)) {
|
|
848
879
|
if (unselectable.value) {
|
|
849
880
|
modelValue.value = modelValue.value.filter(
|
|
850
|
-
(n) => n !==
|
|
881
|
+
(n) => n !== toggleValue.value
|
|
851
882
|
);
|
|
852
883
|
}
|
|
853
884
|
return;
|
|
854
885
|
}
|
|
855
|
-
modelValue.value.push(
|
|
886
|
+
modelValue.value.push(toggleValue.value);
|
|
856
887
|
return;
|
|
857
888
|
}
|
|
858
|
-
if (
|
|
859
|
-
modelValue.value =
|
|
889
|
+
if (toggleValue.value === modelValue.value && unselectable.value) {
|
|
890
|
+
modelValue.value = props.uncheckedValue;
|
|
860
891
|
return;
|
|
861
892
|
}
|
|
862
|
-
modelValue.value =
|
|
893
|
+
modelValue.value = toggleValue.value;
|
|
863
894
|
}
|
|
864
895
|
};
|
|
865
896
|
return (_ctx, _cache) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvButton=t(e.vue,e.vue$1,e.nanoid)}(this,(function(e,t,o){"use strict";const n={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]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{}),a=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(a||{});const s=Symbol.for("volver"),c=Symbol.for("buttonGroup"),d=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownAction");function f(){return e.inject(s)}function p(t,o,n){return e.computed((()=>{const r={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{r[`${t}--${o}`]=e.unref(n.value[o])})),r}))}const m=e.defineComponent({name:"VvIcon",props:n,setup(o){const n=o,r=e.ref(!0),l=f(),{modifiers:i}=e.toRefs(n),u=p("vv-icon",i),a=e.computed((()=>n.provider||(null==l?void 0:l.iconsProvider))),s=e.computed((()=>{const e=n.name??"",o=`@${a.value}:${n.prefix}:${n.name}`;return t.iconExists(e)?e:t.iconExists(o)?o:(null==l?void 0:l.iconsCollections.find((o=>{const n=`@${a.value}:${o.prefix}:${e}`;if(t.iconExists(n))return n})))||e}));function c(e){const o=function(e){let t=null;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),r=(null==o?void 0:o.innerHTML.trim())||"";o&&r&&t.addIcon(`@${a.value}:${n.prefix}:${n.name}`,{body:r,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return l&&(n.src&&!t.iconExists(`@${a.value}:${n.prefix}:${n.name}`)?(r.value=!1,l.fetchIcon(n.src).then((e=>{e&&(c(e),r.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):n.svg&&c(n.svg)),(o,n)=>e.unref(r)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:o.rotate,color:o.color,onLoad:o.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("",!0)}}),g={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(a).includes(e)},rel:{type:String,default:"noopener noreferrer"}},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},y={disabled:Boolean},h={active:Boolean},k={pressed:Boolean},S={label:[String,Number]},B={modifiers:[String,Array]};l.before;const x={unselectable:{type:Boolean,default:!0}},$={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const w={...y,...S,...k,...h,...g,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)}},A=w;const j=e.defineComponent({name:"VvAction",props:A,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=f(),i=e.ref(null);o({$el:i});const{reference:a,bus:s,aria:c,expanded:p}=e.inject(d,{});e.watch((()=>i.value),(e=>{a&&(a.value=e)}));const m=e.computed((()=>r.pressed||(null==p?void 0:p.value))),{role:g}=e.inject(v,{}),b=e.computed((()=>{switch(!0){case r.disabled:return u.button;case void 0!==r.to:return(null==l?void 0:l.nuxt)?u.nuxtLink:u.routerLink;case void 0!==r.href:return u.a;default:return u.button}})),y=e.computed((()=>{const e={...null==c?void 0:c.value,"aria-pressed":!!m.value||void 0,role:g};switch(b.value){case u.a:return{...e,href:r.href,target:r.target,rel:r.rel};case u.routerLink:case u.nuxtLink:return{...e,to:r.to,target:r.target};default:return{...e,type:r.type,disabled:r.disabled}}})),h=e=>{r.disabled?e.preventDefault():(null==s||s.emit("click",e),n("click",e))},k=e=>{null==s||s.emit("mouseover",e),n("mouseover",e)},S=e=>{null==s||s.emit("mouseleave",e),n("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),e.mergeProps(e.unref(y),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled},onClickPassive:h,onMouseoverPassive:k,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function _(e,t,o){return o?V(e,o)===V(t,o):O(e,t)}function O(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const o=Array.isArray(e),n=Array.isArray(t);let r,l,i;if(o&&n){if(l=e.length,l!=t.length)return!1;for(r=l;0!=r--;)if(!O(e[r],t[r]))return!1;return!0}if(o!=n)return!1;const u=e instanceof Date,a=t instanceof Date;if(u!=a)return!1;if(u&&a)return e.getTime()==t.getTime();const s=e instanceof RegExp,c=t instanceof RegExp;if(s!=c)return!1;if(s&&c)return e.toString()==t.toString();const d=Object.keys(e);if(l=d.length,l!==Object.keys(t).length)return!1;for(r=l;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,d[r]))return!1;for(r=l;0!=r--;)if(i=d[r],!O(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function V(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const o=t.split(".");let n=e;for(let t=0,r=o.length;t<r;++t){if(null==e)return null;n=n[o[t]]}return n}}return null}function L(e,t){if(null!=e&&t&&t.length)for(const o of t)if(_(e,o))return!0;return!1}function P(t){const o=e.inject(t,void 0),n=e.computed((()=>{return t=o,!(null==(n=e.unref(t))||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length);var t,n}));return{group:o,isInGroup:n,getGroupOrLocalRef:function(t,n,r){if(null==o?void 0:o.value){const n=e.unref(o.value)[t];return e.computed({get:()=>null==n?void 0:n.value,set(e){n.value=e}})}const l=e.toRef(n,t);return e.computed({get:()=>l.value,set(e){r&&r(`update:${t}`,e)}})}}}const C={...w,...$,...B,...x,...b,icon:[String,Object],iconPosition:{type:String,default:r.left,validator:e=>Object.values(r).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},modelValue:String};const D={key:1,class:"vv-button__label"},E={key:1,class:"vv-button__label"};return e.defineComponent({name:"VvButton",props:C,emits:["update:modelValue"],setup(t,{expose:n,emit:l}){const i=t,u=e.useAttrs(),a=e.useSlots(),{id:s,modifiers:d,iconPosition:v,icon:f,label:g,modelValue:b,disabled:y,toggle:h,unselectable:k}=function(t,o){const{group:n,isInGroup:r,getGroupOrLocalRef:l}=P(c),{id:i,iconPosition:u,icon:a,label:s,pressed:d,modifiers:v}=e.toRefs(t),f=l("modelValue",t,o),p=l("toggle",t),m=l("unselectable",t),g=e.computed((()=>(null==n?void 0:n.value.multiple.value)??!1)),b=e.computed((()=>{var e;return[...(null==v?void 0:v.value)?Array.isArray(v.value)?v.value:v.value.split(" "):[],...(null==(e=null==n?void 0:n.value.itemModifiers)?void 0:e.value)?Array.isArray(n.value.itemModifiers.value)?n.value.itemModifiers.value:n.value.itemModifiers.value.split(" "):[]]})),y=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==n?void 0:n.value)?void 0:e.disabled.value))}));return{group:n,isInGroup:r,modelValue:f,toggle:p,unselectable:m,multiple:g,modifiers:b,disabled:y,id:i,pressed:d,iconPosition:u,icon:a,label:s}}(i,l),S=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(s),B=e.computed((()=>(null==u?void 0:u.name)||S.value)),x=e.ref(null);n({$el:e.computed((()=>{var e;return null==(e=x.value)?void 0:e.$el}))});const $=e.computed((()=>h.value?Array.isArray(b.value)?L(B.value,b.value):_(B.value,b.value):i.pressed)),w=p("vv-button",d,e.computed((()=>({reverse:[r.right,r.bottom].includes(v.value),column:[r.top,r.bottom].includes(v.value),"icon-only":Boolean((null==f?void 0:f.value)&&!(null==g?void 0:g.value)&&!a.default)})))),A=e.computed((()=>"string"==typeof(null==f?void 0:f.value)?{name:null==f?void 0:f.value}:null==f?void 0:f.value)),O=()=>{if(h.value){if(Array.isArray(b.value))return L(B.value,b.value)?void(k.value&&(b.value=b.value.filter((e=>e!==B.value)))):void b.value.push(B.value);if(_(B.value,b.value)&&k.value)return void(b.value=void 0);b.value=B.value}};return(t,o)=>(e.openBlock(),e.createBlock(j,e.mergeProps({disabled:e.unref(y),pressed:e.unref($),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{id:e.unref(S),ref_key:"element",ref:x,class:e.unref(w),onClick:O}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(m,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",D,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(f)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-button__icon"},e.unref(A)),null,16)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("span",E,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)),1)]))])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvButton=t(e.vue,e.vue$1,e.nanoid)}(this,(function(e,t,o){"use strict";const n={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]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{}),a=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(a||{});const s=Symbol.for("volver"),c=Symbol.for("buttonGroup"),d=Symbol.for("dropdownTrigger"),f=Symbol.for("dropdownAction");function v(){return e.inject(s)}function p(t,o,n){return e.computed((()=>{const r={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{r[`${t}--${o}`]=e.unref(n.value[o])})),r}))}const m=e.defineComponent({name:"VvIcon",props:n,setup(o){const n=o,r=e.ref(!0),l=v(),{modifiers:i}=e.toRefs(n),u=p("vv-icon",i),a=e.computed((()=>n.provider||(null==l?void 0:l.iconsProvider))),s=e.computed((()=>{const e=n.name??"",o=`@${a.value}:${n.prefix}:${n.name}`;return t.iconExists(e)?e:t.iconExists(o)?o:(null==l?void 0:l.iconsCollections.find((o=>{const n=`@${a.value}:${o.prefix}:${e}`;if(t.iconExists(n))return n})))||e}));function c(e){const o=function(e){let t=null;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),r=(null==o?void 0:o.innerHTML.trim())||"";o&&r&&t.addIcon(`@${a.value}:${n.prefix}:${n.name}`,{body:r,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return l&&(n.src&&!t.iconExists(`@${a.value}:${n.prefix}:${n.name}`)?(r.value=!1,l.fetchIcon(n.src).then((e=>{e&&(c(e),r.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):n.svg&&c(n.svg)),(o,n)=>e.unref(r)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:o.rotate,color:o.color,onLoad:o.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("",!0)}}),g={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(a).includes(e)},rel:{type:String,default:"noopener noreferrer"}},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},y={disabled:Boolean},h={active:Boolean},S={pressed:Boolean},k={label:[String,Number]},B={modifiers:[String,Array]};l.before;const x={unselectable:{type:Boolean,default:!0}},$={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const w={...y,...k,...S,...h,...g,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)}},A=w;const j=e.defineComponent({name:"VvAction",props:A,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=v(),i=e.ref(null);o({$el:i});const{reference:a,bus:s,aria:c,expanded:p}=e.inject(d,{});e.watch((()=>i.value),(e=>{a&&(a.value=e)}));const m=e.computed((()=>r.pressed||(null==p?void 0:p.value))),{role:g}=e.inject(f,{}),b=e.computed((()=>{switch(!0){case r.disabled:return u.button;case void 0!==r.to:return(null==l?void 0:l.nuxt)?u.nuxtLink:u.routerLink;case void 0!==r.href:return u.a;default:return u.button}})),y=e.computed((()=>{const e={...null==c?void 0:c.value,"aria-pressed":!!m.value||void 0,role:g};switch(b.value){case u.a:return{...e,href:r.href,target:r.target,rel:r.rel};case u.routerLink:case u.nuxtLink:return{...e,to:r.to,target:r.target};default:return{...e,type:r.type,disabled:r.disabled}}})),h=e=>{r.disabled?e.preventDefault():(null==s||s.emit("click",e),n("click",e))},S=e=>{null==s||s.emit("mouseover",e),n("mouseover",e)},k=e=>{null==s||s.emit("mouseleave",e),n("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),e.mergeProps(e.unref(y),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled},onClickPassive:h,onMouseoverPassive:S,onMouseleavePassive:k}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function V(e,t,o){return o?O(e,o)===O(t,o):_(e,t)}function _(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const o=Array.isArray(e),n=Array.isArray(t);let r,l,i;if(o&&n){if(l=e.length,l!=t.length)return!1;for(r=l;0!=r--;)if(!_(e[r],t[r]))return!1;return!0}if(o!=n)return!1;const u=e instanceof Date,a=t instanceof Date;if(u!=a)return!1;if(u&&a)return e.getTime()==t.getTime();const s=e instanceof RegExp,c=t instanceof RegExp;if(s!=c)return!1;if(s&&c)return e.toString()==t.toString();const d=Object.keys(e);if(l=d.length,l!==Object.keys(t).length)return!1;for(r=l;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,d[r]))return!1;for(r=l;0!=r--;)if(i=d[r],!_(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function O(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const o=t.split(".");let n=e;for(let t=0,r=o.length;t<r;++t){if(null==e)return null;n=n[o[t]]}return n}}return null}function L(e,t){if(null!=e&&t&&t.length)for(const o of t)if(V(e,o))return!0;return!1}function N(t){const o=e.inject(t,void 0),n=e.computed((()=>{return t=o,!(null==(n=e.unref(t))||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length);var t,n}));return{group:o,isInGroup:n,getGroupOrLocalRef:function(t,n,r){if(null==o?void 0:o.value){const n=e.unref(o.value)[t];return e.computed({get:()=>null==n?void 0:n.value,set(e){n.value=e}})}const l=e.toRef(n,t);return e.computed({get:()=>l.value,set(e){r&&r(`update:${t}`,e)}})}}}const P={...w,...$,...B,...x,...b,icon:[String,Object],iconPosition:{type:String,default:r.left,validator:e=>Object.values(r).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};const C={key:1,class:"vv-button__label"},E={key:1,class:"vv-button__label"};return e.defineComponent({name:"VvButton",props:P,emits:["update:modelValue"],setup(t,{expose:n,emit:l}){const i=t,u=e.useAttrs(),a=e.useSlots(),{id:s,modifiers:d,iconPosition:f,icon:v,label:g,modelValue:b,disabled:y,toggle:h,unselectable:S}=function(t,o){const{group:n,isInGroup:r,getGroupOrLocalRef:l}=N(c),{id:i,iconPosition:u,icon:a,label:s,pressed:d}=e.toRefs(t),f=l("modelValue",t,o),v=l("toggle",t),p=l("unselectable",t),m=e.computed((()=>(null==n?void 0:n.value.multiple.value)??!1)),g=e.computed((()=>{let e=t.modifiers,o=null==n?void 0:n.value.modifiers.value;const r=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>r.add(e)))),o&&(Array.isArray(o)||(o=o.split(" ")),o.forEach((e=>r.add(e)))),Array.from(r)})),b=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==n?void 0:n.value)?void 0:e.disabled.value))}));return{group:n,isInGroup:r,modelValue:f,toggle:v,unselectable:p,multiple:m,modifiers:g,disabled:b,id:i,pressed:d,iconPosition:u,icon:a,label:s}}(i,l),k=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(s),B=e.computed((()=>(null==u?void 0:u.name)||k.value)),x=e.ref(null);n({$el:e.computed((()=>{var e;return null==(e=x.value)?void 0:e.$el}))});const $=e.computed((()=>h.value?Array.isArray(b.value)?L(B.value,b.value):V(B.value,b.value):i.pressed)),w=p("vv-button",d,e.computed((()=>({reverse:[r.right,r.bottom].includes(f.value),column:[r.top,r.bottom].includes(f.value),"icon-only":Boolean((null==v?void 0:v.value)&&!(null==g?void 0:g.value)&&!a.default)})))),A=e.computed((()=>"string"==typeof(null==v?void 0:v.value)?{name:null==v?void 0:v.value}:null==v?void 0:v.value)),_=e.computed((()=>void 0!==i.value?i.value:B.value)),O=()=>{if(h.value){if(Array.isArray(b.value))return L(_.value,b.value)?void(S.value&&(b.value=b.value.filter((e=>e!==_.value)))):void b.value.push(_.value);if(_.value===b.value&&S.value)return void(b.value=i.uncheckedValue);b.value=_.value}};return(t,o)=>(e.openBlock(),e.createBlock(j,e.mergeProps({disabled:e.unref(y),pressed:e.unref($),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{id:e.unref(k),ref_key:"element",ref:x,class:e.unref(w),onClick:O}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(m,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",C,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(v)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-button__icon"},e.unref(A)),null,16)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("span",E,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)),1)]))])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}})}));
|