@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
|
@@ -29,14 +29,21 @@ export declare const VvSelectProps: {
|
|
|
29
29
|
* Select placeholder
|
|
30
30
|
*/
|
|
31
31
|
placeholder: StringConstructor;
|
|
32
|
-
label:
|
|
32
|
+
label: {
|
|
33
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
33
36
|
unselectable: {
|
|
34
37
|
type: BooleanConstructor;
|
|
35
38
|
default: boolean;
|
|
36
39
|
};
|
|
37
|
-
floating:
|
|
40
|
+
floating: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
38
44
|
icon: {
|
|
39
|
-
type:
|
|
45
|
+
type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
|
|
46
|
+
default: undefined;
|
|
40
47
|
};
|
|
41
48
|
iconPosition: {
|
|
42
49
|
type: globalThis.PropType<"before" | "after">;
|
|
@@ -59,10 +66,22 @@ export declare const VvSelectProps: {
|
|
|
59
66
|
type: (StringConstructor | FunctionConstructor)[];
|
|
60
67
|
default: string;
|
|
61
68
|
};
|
|
62
|
-
modifiers:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
modifiers: {
|
|
70
|
+
type: globalThis.PropType<string | string[]>;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
73
|
+
readonly: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
disabled: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
loading: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
66
85
|
loadingLabel: {
|
|
67
86
|
type: StringConstructor;
|
|
68
87
|
default: string;
|
|
@@ -71,10 +90,22 @@ export declare const VvSelectProps: {
|
|
|
71
90
|
type: StringConstructor;
|
|
72
91
|
default: string;
|
|
73
92
|
};
|
|
74
|
-
invalid:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
93
|
+
invalid: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
invalidLabel: {
|
|
98
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
99
|
+
default: undefined;
|
|
100
|
+
};
|
|
101
|
+
valid: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
validLabel: {
|
|
106
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
107
|
+
default: undefined;
|
|
108
|
+
};
|
|
78
109
|
tabindex: {
|
|
79
110
|
type: (StringConstructor | NumberConstructor)[];
|
|
80
111
|
default: number;
|
|
@@ -83,7 +114,10 @@ export declare const VvSelectProps: {
|
|
|
83
114
|
type: StringConstructor;
|
|
84
115
|
default: string;
|
|
85
116
|
};
|
|
86
|
-
autofocus:
|
|
117
|
+
autofocus: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
87
121
|
name: {
|
|
88
122
|
type: StringConstructor;
|
|
89
123
|
required: boolean;
|
|
@@ -71,6 +71,7 @@ const LinkProps = {
|
|
|
71
71
|
*/
|
|
72
72
|
target: {
|
|
73
73
|
type: String,
|
|
74
|
+
default: void 0,
|
|
74
75
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
75
76
|
},
|
|
76
77
|
/**
|
|
@@ -85,44 +86,65 @@ const DisabledProps = {
|
|
|
85
86
|
/**
|
|
86
87
|
* Whether the form control is disabled
|
|
87
88
|
*/
|
|
88
|
-
disabled:
|
|
89
|
+
disabled: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
}
|
|
89
93
|
};
|
|
90
94
|
const ActiveProps = {
|
|
91
95
|
/**
|
|
92
96
|
* Whether the item is active
|
|
93
97
|
*/
|
|
94
|
-
active:
|
|
98
|
+
active: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
}
|
|
95
102
|
};
|
|
96
103
|
const CurrentProps = {
|
|
97
104
|
/**
|
|
98
105
|
* Whether the item is current
|
|
99
106
|
*/
|
|
100
|
-
current:
|
|
107
|
+
current: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: false
|
|
110
|
+
}
|
|
101
111
|
};
|
|
102
112
|
const PressedProps = {
|
|
103
113
|
/**
|
|
104
114
|
* Whether the item is pressed
|
|
105
115
|
*/
|
|
106
|
-
pressed:
|
|
116
|
+
pressed: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false
|
|
119
|
+
}
|
|
107
120
|
};
|
|
108
121
|
const LabelProps = {
|
|
109
122
|
/**
|
|
110
123
|
* The item label
|
|
111
124
|
*/
|
|
112
|
-
label:
|
|
125
|
+
label: {
|
|
126
|
+
type: [String, Number],
|
|
127
|
+
default: void 0
|
|
128
|
+
}
|
|
113
129
|
};
|
|
114
130
|
const ModifiersProps = {
|
|
115
131
|
/**
|
|
116
132
|
* Component BEM modifiers
|
|
117
133
|
*/
|
|
118
|
-
modifiers:
|
|
134
|
+
modifiers: {
|
|
135
|
+
type: [String, Array],
|
|
136
|
+
default: void 0
|
|
137
|
+
}
|
|
119
138
|
};
|
|
120
139
|
({
|
|
121
140
|
/**
|
|
122
141
|
* VvIcon name or props
|
|
123
142
|
* @see VVIcon
|
|
124
143
|
*/
|
|
125
|
-
icon: {
|
|
144
|
+
icon: {
|
|
145
|
+
type: [String, Object],
|
|
146
|
+
default: void 0
|
|
147
|
+
},
|
|
126
148
|
/**
|
|
127
149
|
* VvIcon position
|
|
128
150
|
*/
|
|
@@ -153,7 +175,8 @@ const ModifiersProps = {
|
|
|
153
175
|
* Dropdown show / hide transition name
|
|
154
176
|
*/
|
|
155
177
|
transitionName: {
|
|
156
|
-
type: String
|
|
178
|
+
type: String,
|
|
179
|
+
default: void 0
|
|
157
180
|
},
|
|
158
181
|
/**
|
|
159
182
|
* Offset of the dropdown from the trigger
|
|
@@ -221,7 +244,8 @@ const ModifiersProps = {
|
|
|
221
244
|
* Set dropdown width to the same as the trigger
|
|
222
245
|
*/
|
|
223
246
|
triggerWidth: {
|
|
224
|
-
type: Boolean
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: false
|
|
225
249
|
}
|
|
226
250
|
});
|
|
227
251
|
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).VvTab=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||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),
|
|
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).VvTab=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||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{}),n=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(n||{});const l=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(n).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},m={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}},f={modifiers:{type:[String,Array],default:void 0}};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...p,...m,...c,...v,...u,type:{type:String,default:a.button,validator:e=>Object.values(a).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:r.button}},y={items:{type:Array,default:()=>[]}},k={...f,navModifiers:{type:[String,Array]},modelValue:{type:String,default:""},items:{type:Array,default:()=>[]}},g={...f,...y},B=b;const _=e.defineComponent({name:"VvAction",props:B,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:a}){const n=t,u=e.inject(l),d=e.ref(null);o({$el:d});const{reference:c,bus:v,aria:m,expanded:p}=e.inject(i,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const f=e.computed((()=>n.pressed||(null==p?void 0:p.value))),{role:b}=e.inject(s,{}),y=e.computed((()=>{switch(!0){case n.disabled:return r.button;case void 0!==n.to:return(null==u?void 0:u.nuxt)?r.nuxtLink:r.routerLink;case void 0!==n.href:return r.a;default:return n.defaultTag}})),k=e.computed((()=>{const e={...null==m?void 0:m.value,ariaPressed:!!f.value||void 0,ariaLabel:n.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case r.a:return{...e,href:n.href,target:n.target,rel:n.rel};case r.routerLink:case r.nuxtLink:return{...e,to:n.to,target:n.target};case r.button:return{...e,type:n.type,disabled:n.disabled};default:return e}})),g=e=>{n.disabled?e.preventDefault():(null==v||v.emit("click",e),a("click",e))},B=e=>{null==v||v.emit("mouseover",e),a("mouseover",e)},_=e=>{null==v||v.emit("mouseleave",e),a("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(k),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(f),disabled:t.disabled,current:t.current},onClickPassive:g,onMouseoverPassive:B,onMouseleavePassive:_}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),h={class:"vv-nav__item",role:"presentation"},x=e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",h,[e.createVNode(_,e.mergeProps(t.$attrs,{class:"vv-nav__item-label"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))});function S(t,o,a){return e.computed((()=>{const r={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((o=>{r[`${t}--${o}`]=e.unref(a.value[o])})),r}))}const C=["onClick"],V=e.defineComponent({__name:"VvNav",props:g,emits:["click"],setup(t,{emit:o}){const a=t,{modifiers:r}=e.toRefs(a),n=e=>{var t;const r=e.target;if(null==r?void 0:r.dataset.index){const e=parseInt(r.dataset.index),n=null==(t=a.items)?void 0:t[e];if(!n||(null==n?void 0:n.disabled))return;o("click",n)}},l=S("vv-nav",r);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(l))},[e.createElementVNode("ul",{class:"vv-nav__menu",role:"menu","aria-busy":"true",onClick:e.withModifiers(n,["stop"])},[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(({on:o={},data:a,...r},n)=>(e.openBlock(),e.createBlock(x,e.mergeProps({key:n,"data-index":n},r,e.toHandlers(o)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"item",e.normalizeProps(e.guardReactiveProps({item:r,data:a,index:n})))])),_:2},1040,["data-index"])))),128))]))],8,C)],2))}});return e.defineComponent({__name:"VvTab",props:k,emits:["update:modelValue"],setup(t,{emit:o}){const a=t,{modifiers:r,items:n}=e.toRefs(a),l=e.computed((()=>n.value.reduce(((e,t)=>(t.tab&&e.push(t.tab),e)),[]))),i=e.ref(),s=e.computed({get:()=>{var e;return a.modelValue||i.value||(null==(e=l.value)?void 0:e[0])},set:e=>{i.value=e,o("update:modelValue",e)}}),u=e.computed((()=>{var e;return["tabs",...Array.isArray(a.navModifiers)?a.navModifiers:(null==(e=a.navModifiers)?void 0:e.split(" "))??[]]})),d=e=>{e.tab&&(s.value=e.tab)},c=e.computed((()=>a.items.map((e=>({current:e.tab===s.value,...e}))))),v=S("vv-tab",r);return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v))},[e.createVNode(V,e.mergeProps({items:e.unref(c),modifiers:e.unref(u)},{onClick:d}),{item:e.withCtx((({item:o,data:a,index:r})=>[e.renderSlot(t.$slots,"nav-item",e.normalizeProps(e.guardReactiveProps({item:o,data:a,index:r})))])),_:3},16),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),((o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[o.tab?(e.openBlock(),e.createElementBlock("article",{key:0,class:e.normalizeClass([{target:e.unref(s)===o.tab},"vv-tab__panel"])},[e.renderSlot(t.$slots,`panel::${o.tab}`)],2)):e.createCommentVNode("v-if",!0)],64)))),128))],2))}})}));
|
|
@@ -11,7 +11,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
11
11
|
type: globalThis.PropType<NavItemTab[]>;
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
|
-
modifiers:
|
|
14
|
+
modifiers: {
|
|
15
|
+
type: globalThis.PropType<string | string[]>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
15
18
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
19
|
[x: string]: (...args: any[]) => void;
|
|
17
20
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,9 +29,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
26
29
|
type: globalThis.PropType<NavItemTab[]>;
|
|
27
30
|
default: () => never[];
|
|
28
31
|
};
|
|
29
|
-
modifiers:
|
|
32
|
+
modifiers: {
|
|
33
|
+
type: globalThis.PropType<string | string[]>;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
30
36
|
}>>, {
|
|
31
37
|
modelValue: string;
|
|
38
|
+
modifiers: string | string[];
|
|
32
39
|
items: NavItemTab[];
|
|
33
40
|
}, {}>, Partial<Record<string, (_: {}) => any>> & {
|
|
34
41
|
"nav-item"?(_: {
|
|
@@ -11,6 +11,9 @@ export declare const VvTabProps: {
|
|
|
11
11
|
type: globalThis.PropType<NavItemTab[]>;
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
|
-
modifiers:
|
|
14
|
+
modifiers: {
|
|
15
|
+
type: globalThis.PropType<string | string[]>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
15
18
|
};
|
|
16
19
|
export declare const VvTabEvents: string[];
|