@volverjs/ui-vue 0.0.10-beta.1 → 0.0.10-beta.10
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 +64 -1
- package/auto-imports.d.ts +1 -1
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +34 -19
- package/dist/components/VvAccordion/VvAccordion.es.js +33 -4
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
- package/dist/components/VvAccordion/index.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +75 -27
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +5 -5
- package/dist/components/VvAction/VvAction.es.js +26 -4
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +17 -4
- package/dist/components/VvAction/index.d.ts +5 -0
- package/dist/components/VvAlert/VvAlert.es.js +96 -45
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +136 -66
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
- package/dist/components/VvAvatar/VvAvatar.es.js +22 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +79 -28
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +39 -8
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +224 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +14 -3
- package/dist/components/VvBreadcrumb/index.d.ts +2 -9
- package/dist/components/VvButton/VvButton.es.js +67 -22
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +25 -9
- package/dist/components/VvButton/index.d.ts +5 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -6
- package/dist/components/VvCard/VvCard.es.js +47 -16
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +32 -4
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +8 -8
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +101 -46
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +625 -379
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +112 -112
- package/dist/components/VvCombobox/index.d.ts +32 -32
- package/dist/components/VvDialog/VvDialog.es.js +65 -27
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +87 -46
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +203 -189
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +12 -0
- package/dist/components/VvDropdown/index.d.ts +32 -32
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +46 -12
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +28 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +40 -8
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +149 -99
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/index.d.ts +8 -2
- package/dist/components/VvNav/VvNav.es.js +115 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +31 -12
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/index.d.ts +1 -12
- package/dist/components/VvNavItem/VvNavItem.es.js +413 -0
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.es.js +33 -6
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +32 -4
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +8 -8
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +101 -46
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +156 -96
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
- package/dist/components/VvSelect/index.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +214 -99
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +40 -11
- package/dist/components/VvTab/index.d.ts +9 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +123 -77
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
- package/dist/components/VvTooltip/VvTooltip.es.js +40 -9
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1583 -991
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +60 -23
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +58 -18
- 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/index.d.ts +3 -1
- package/dist/index.es.js +19 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +58 -34
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +50 -15
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +332 -83
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -37
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/floating-ui.d.ts +6 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +37 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/nav.d.ts +17 -0
- package/package.json +60 -51
- package/src/Volver.ts +22 -16
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +2 -2
- package/src/components/VvAction/VvAction.vue +5 -2
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvCombobox/VvCombobox.vue +19 -8
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvInputText/VvInputText.vue +2 -2
- package/src/components/VvNav/VvNav.vue +30 -50
- package/src/components/VvNav/VvNavItem.vue +18 -0
- package/src/components/VvNav/VvNavSeparator.vue +11 -0
- package/src/components/VvNav/index.ts +2 -15
- package/src/components/VvTab/VvTab.vue +63 -35
- package/src/components/VvTab/index.ts +10 -4
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/composables/useUniqueId.ts +2 -2
- package/src/directives/index.ts +1 -4
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +27 -3
- package/src/stories/Button/ButtonModifiers.stories.ts +4 -14
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Nav/Nav.settings.ts +3 -4
- package/src/stories/Nav/Nav.test.ts +4 -15
- package/src/stories/Tab/Tab.settings.ts +9 -9
- package/src/stories/Tab/Tab.stories.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +6 -14
- package/src/stories/argTypes.ts +1 -1
- package/src/types/generic.ts +6 -0
- package/src/types/index.ts +5 -0
- package/src/types/nav.ts +19 -0
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
- package/src/components/VvNav/VvNavItemTitle.vue +0 -11
- package/src/components/VvNav/VvNavSeparator.ts +0 -8
- package/src/types/generic.d.ts +0 -6
- /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
- /package/src/types/{alert.d.ts → alert.ts} +0 -0
- /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
- /package/src/types/{group.d.ts → group.ts} +0 -0
|
@@ -46,6 +46,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
46
46
|
type: StringConstructor;
|
|
47
47
|
default: undefined;
|
|
48
48
|
};
|
|
49
|
+
defaultTag: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: import("../../constants").ActionTag;
|
|
52
|
+
};
|
|
49
53
|
to: {
|
|
50
54
|
type: (ObjectConstructor | StringConstructor)[];
|
|
51
55
|
};
|
|
@@ -58,13 +62,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
58
62
|
type: StringConstructor;
|
|
59
63
|
default: string;
|
|
60
64
|
};
|
|
65
|
+
current: BooleanConstructor;
|
|
61
66
|
active: BooleanConstructor;
|
|
62
67
|
pressed: BooleanConstructor;
|
|
63
|
-
label: (StringConstructor | NumberConstructor)[];
|
|
68
|
+
label: (StringConstructor | NumberConstructor)[]; /**
|
|
69
|
+
* @description Catch click event
|
|
70
|
+
*/
|
|
64
71
|
disabled: BooleanConstructor;
|
|
65
72
|
}, {
|
|
66
73
|
$el: globalThis.ComputedRef<HTMLElement | undefined>;
|
|
67
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
74
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
75
|
+
[x: string]: (...args: any[]) => void;
|
|
76
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
68
77
|
icon: (ObjectConstructor | StringConstructor)[];
|
|
69
78
|
iconPosition: {
|
|
70
79
|
type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
|
|
@@ -111,6 +120,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
111
120
|
type: StringConstructor;
|
|
112
121
|
default: undefined;
|
|
113
122
|
};
|
|
123
|
+
defaultTag: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
default: import("../../constants").ActionTag;
|
|
126
|
+
};
|
|
114
127
|
to: {
|
|
115
128
|
type: (ObjectConstructor | StringConstructor)[];
|
|
116
129
|
};
|
|
@@ -123,25 +136,28 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
123
136
|
type: StringConstructor;
|
|
124
137
|
default: string;
|
|
125
138
|
};
|
|
139
|
+
current: BooleanConstructor;
|
|
126
140
|
active: BooleanConstructor;
|
|
127
141
|
pressed: BooleanConstructor;
|
|
128
|
-
label: (StringConstructor | NumberConstructor)[];
|
|
142
|
+
label: (StringConstructor | NumberConstructor)[]; /**
|
|
143
|
+
* @description Catch click event
|
|
144
|
+
*/
|
|
129
145
|
disabled: BooleanConstructor;
|
|
130
|
-
}
|
|
131
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
value: string | number | boolean;
|
|
146
|
+
}>>, {
|
|
134
147
|
disabled: boolean;
|
|
135
148
|
modelValue: string | number | boolean;
|
|
136
|
-
|
|
149
|
+
toggle: boolean;
|
|
137
150
|
unselectable: boolean;
|
|
151
|
+
value: string | number | boolean;
|
|
152
|
+
type: "button" | "submit" | "reset";
|
|
138
153
|
ariaLabel: string;
|
|
154
|
+
defaultTag: string;
|
|
139
155
|
rel: string;
|
|
156
|
+
current: boolean;
|
|
140
157
|
active: boolean;
|
|
141
158
|
pressed: boolean;
|
|
142
159
|
iconPosition: "left" | "right" | "top" | "bottom";
|
|
143
160
|
loadingIcon: string;
|
|
144
|
-
toggle: boolean;
|
|
145
161
|
uncheckedValue: string | number | boolean;
|
|
146
162
|
loading: boolean;
|
|
147
163
|
loadingLabel: string;
|
|
@@ -70,6 +70,10 @@ export declare const VvButtonProps: {
|
|
|
70
70
|
type: StringConstructor;
|
|
71
71
|
default: undefined;
|
|
72
72
|
};
|
|
73
|
+
defaultTag: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: import("../../constants").ActionTag;
|
|
76
|
+
};
|
|
73
77
|
to: {
|
|
74
78
|
type: (ObjectConstructor | StringConstructor)[];
|
|
75
79
|
};
|
|
@@ -82,6 +86,7 @@ export declare const VvButtonProps: {
|
|
|
82
86
|
type: StringConstructor;
|
|
83
87
|
default: string;
|
|
84
88
|
};
|
|
89
|
+
current: BooleanConstructor;
|
|
85
90
|
active: BooleanConstructor;
|
|
86
91
|
pressed: BooleanConstructor;
|
|
87
92
|
label: (StringConstructor | NumberConstructor)[];
|
|
@@ -33,6 +33,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
33
33
|
ButtonType2["reset"] = "reset";
|
|
34
34
|
return ButtonType2;
|
|
35
35
|
})(ButtonType || {});
|
|
36
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
37
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
38
|
+
ActionTag2["routerLink"] = "router-link";
|
|
39
|
+
ActionTag2["a"] = "a";
|
|
40
|
+
ActionTag2["button"] = "button";
|
|
41
|
+
return ActionTag2;
|
|
42
|
+
})(ActionTag || {});
|
|
36
43
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
37
44
|
AnchorTarget2["_blank"] = "_blank";
|
|
38
45
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -80,6 +87,12 @@ const ActiveProps = {
|
|
|
80
87
|
*/
|
|
81
88
|
active: Boolean
|
|
82
89
|
};
|
|
90
|
+
const CurrentProps = {
|
|
91
|
+
/**
|
|
92
|
+
* Whether the item is current
|
|
93
|
+
*/
|
|
94
|
+
current: Boolean
|
|
95
|
+
};
|
|
83
96
|
const PressedProps = {
|
|
84
97
|
/**
|
|
85
98
|
* Whether the item is pressed
|
|
@@ -216,6 +229,7 @@ const UnselectableProps = {
|
|
|
216
229
|
...LabelProps,
|
|
217
230
|
...PressedProps,
|
|
218
231
|
...ActiveProps,
|
|
232
|
+
...CurrentProps,
|
|
219
233
|
...LinkProps,
|
|
220
234
|
/**
|
|
221
235
|
* Button type
|
|
@@ -231,6 +245,13 @@ const UnselectableProps = {
|
|
|
231
245
|
ariaLabel: {
|
|
232
246
|
type: String,
|
|
233
247
|
default: void 0
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* Default tag for the action
|
|
251
|
+
*/
|
|
252
|
+
defaultTag: {
|
|
253
|
+
type: String,
|
|
254
|
+
default: ActionTag.button
|
|
234
255
|
}
|
|
235
256
|
});
|
|
236
257
|
const VvButtonGroupProps = {
|
|
@@ -334,12 +355,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
334
355
|
});
|
|
335
356
|
const bemCssClasses = useModifiers("vv-button-group", modifiers);
|
|
336
357
|
return (_ctx, _cache) => {
|
|
337
|
-
return openBlock(), createElementBlock(
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
358
|
+
return openBlock(), createElementBlock(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
362
|
+
role: "group"
|
|
363
|
+
},
|
|
364
|
+
[
|
|
365
|
+
renderSlot(_ctx.$slots, "default")
|
|
366
|
+
],
|
|
367
|
+
2
|
|
368
|
+
/* CLASS */
|
|
369
|
+
);
|
|
343
370
|
};
|
|
344
371
|
}
|
|
345
372
|
});
|
|
@@ -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).VvButtonGroup=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||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{});const
|
|
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).VvButtonGroup=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||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});const u=Symbol.for("buttonGroup"),n={disabled:Boolean},a=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});t.before;const i={unselectable:{type:Boolean,default:!0}};o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,l.button,r.button;const s={...a,...n,...i,itemModifiers:{type:[String,Array],default:""},toggle:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Array],default:void 0}};return e.defineComponent({name:"VvButtonGroup",props:s,emits:["update:modelValue"],setup(o,{emit:t}){const l=o,{disabled:r,toggle:n,modifiers:a,multiple:i,unselectable:s,itemModifiers:d}=e.toRefs(l);e.watchEffect((()=>{"string"==typeof l.modelValue&&i.value&&console.warn("[VvButtonGroup]: modelValue is a string but multiple is true.")}));const f=e.computed({get:()=>i.value?l.modelValue:Array.isArray(l.modelValue)?l.modelValue[0]:l.modelValue,set:e=>void 0===e||!Array.isArray(l.modelValue)&&!i.value||Array.isArray(e)?t("update:modelValue",e):t("update:modelValue",[e])});!function(o){if(Object.keys(o).some((t=>"key"!==t&&!e.isRef(o[t]))))throw Error("One or more groupState props aren't ref.");e.provide(o.key,e.computed((()=>o)))}({key:u,modelValue:f,disabled:r,toggle:n,multiple:i,unselectable:s,modifiers:d});const m=function(o,t,l){return e.computed((()=>{const r={[o]:!0},u="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return u&&Array.isArray(u)&&u.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((t=>{r[`${o}--${t}`]=e.unref(l.value[t])})),r}))}("vv-button-group",a);return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(m)),role:"group"},[e.renderSlot(o.$slots,"default")],2))}})}));
|
|
@@ -21,7 +21,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
21
21
|
};
|
|
22
22
|
disabled: BooleanConstructor;
|
|
23
23
|
modifiers: globalThis.PropType<string | string[]>;
|
|
24
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
24
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
[x: string]: (...args: any[]) => void;
|
|
26
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
27
|
itemModifiers: {
|
|
26
28
|
type: globalThis.PropType<string | string[]>;
|
|
27
29
|
default: string;
|
|
@@ -44,15 +46,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
44
46
|
};
|
|
45
47
|
disabled: BooleanConstructor;
|
|
46
48
|
modifiers: globalThis.PropType<string | string[]>;
|
|
47
|
-
}
|
|
48
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
49
|
-
}, {
|
|
49
|
+
}>>, {
|
|
50
50
|
disabled: boolean;
|
|
51
51
|
modelValue: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
52
|
-
unselectable: boolean;
|
|
53
|
-
itemModifiers: string | string[];
|
|
54
52
|
toggle: boolean;
|
|
55
53
|
multiple: boolean;
|
|
54
|
+
unselectable: boolean;
|
|
55
|
+
itemModifiers: string | string[];
|
|
56
56
|
}, {}>, {
|
|
57
57
|
default?(_: {}): any;
|
|
58
58
|
}>;
|
|
@@ -33,6 +33,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
33
33
|
ButtonType2["reset"] = "reset";
|
|
34
34
|
return ButtonType2;
|
|
35
35
|
})(ButtonType || {});
|
|
36
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
37
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
38
|
+
ActionTag2["routerLink"] = "router-link";
|
|
39
|
+
ActionTag2["a"] = "a";
|
|
40
|
+
ActionTag2["button"] = "button";
|
|
41
|
+
return ActionTag2;
|
|
42
|
+
})(ActionTag || {});
|
|
36
43
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
37
44
|
AnchorTarget2["_blank"] = "_blank";
|
|
38
45
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -79,6 +86,12 @@ const ActiveProps = {
|
|
|
79
86
|
*/
|
|
80
87
|
active: Boolean
|
|
81
88
|
};
|
|
89
|
+
const CurrentProps = {
|
|
90
|
+
/**
|
|
91
|
+
* Whether the item is current
|
|
92
|
+
*/
|
|
93
|
+
current: Boolean
|
|
94
|
+
};
|
|
82
95
|
const PressedProps = {
|
|
83
96
|
/**
|
|
84
97
|
* Whether the item is pressed
|
|
@@ -209,6 +222,7 @@ const ModifiersProps = {
|
|
|
209
222
|
...LabelProps,
|
|
210
223
|
...PressedProps,
|
|
211
224
|
...ActiveProps,
|
|
225
|
+
...CurrentProps,
|
|
212
226
|
...LinkProps,
|
|
213
227
|
/**
|
|
214
228
|
* Button type
|
|
@@ -224,6 +238,13 @@ const ModifiersProps = {
|
|
|
224
238
|
ariaLabel: {
|
|
225
239
|
type: String,
|
|
226
240
|
default: void 0
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* Default tag for the action
|
|
244
|
+
*/
|
|
245
|
+
defaultTag: {
|
|
246
|
+
type: String,
|
|
247
|
+
default: ActionTag.button
|
|
227
248
|
}
|
|
228
249
|
});
|
|
229
250
|
const VvCardProps = {
|
|
@@ -276,22 +297,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
276
297
|
const { modifiers } = toRefs(props);
|
|
277
298
|
const bemCssClasses = useModifiers("vv-card", modifiers);
|
|
278
299
|
return (_ctx, _cache) => {
|
|
279
|
-
return openBlock(), createElementBlock(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
300
|
+
return openBlock(), createElementBlock(
|
|
301
|
+
"article",
|
|
302
|
+
{
|
|
303
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
304
|
+
},
|
|
305
|
+
[
|
|
306
|
+
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1, [
|
|
307
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
308
|
+
createTextVNode(
|
|
309
|
+
toDisplayString(_ctx.title),
|
|
310
|
+
1
|
|
311
|
+
/* TEXT */
|
|
312
|
+
)
|
|
313
|
+
])
|
|
314
|
+
])) : createCommentVNode("v-if", true),
|
|
315
|
+
renderSlot(_ctx.$slots, "default"),
|
|
316
|
+
_ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
317
|
+
renderSlot(_ctx.$slots, "content")
|
|
318
|
+
])) : createCommentVNode("v-if", true),
|
|
319
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3, [
|
|
320
|
+
renderSlot(_ctx.$slots, "footer")
|
|
321
|
+
])) : createCommentVNode("v-if", true)
|
|
322
|
+
],
|
|
323
|
+
2
|
|
324
|
+
/* CLASS */
|
|
325
|
+
);
|
|
295
326
|
};
|
|
296
327
|
}
|
|
297
328
|
});
|
|
@@ -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).VvCard=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||{});Boolean,Boolean,Boolean;const
|
|
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).VvCard=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,title:String};const s={key:0,class:"vv-card__header"},i={key:1,class:"vv-card__content"},c={key:2,class:"vv-card__footer"};return e.defineComponent({name:"VvCard",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-card",n);return(o,t)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass(e.unref(r))},[o.$slots.header||o.title?(e.openBlock(),e.createElementBlock("header",s,[e.renderSlot(o.$slots,"header",{},(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default"),o.$slots.content?(e.openBlock(),e.createElementBlock("div",i,[e.renderSlot(o.$slots,"content")])):e.createCommentVNode("v-if",!0),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",c,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("v-if",!0)],2))}})}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unref, inject, computed, toRef, toRefs, isRef, defineComponent, h, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { uid } from "uid";
|
|
3
3
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
4
4
|
Strategy2["absolute"] = "absolute";
|
|
5
5
|
Strategy2["fixed"] = "fixed";
|
|
@@ -34,6 +34,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
34
34
|
ButtonType2["reset"] = "reset";
|
|
35
35
|
return ButtonType2;
|
|
36
36
|
})(ButtonType || {});
|
|
37
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
38
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
39
|
+
ActionTag2["routerLink"] = "router-link";
|
|
40
|
+
ActionTag2["a"] = "a";
|
|
41
|
+
ActionTag2["button"] = "button";
|
|
42
|
+
return ActionTag2;
|
|
43
|
+
})(ActionTag || {});
|
|
37
44
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
38
45
|
AnchorTarget2["_blank"] = "_blank";
|
|
39
46
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -115,6 +122,12 @@ const ActiveProps = {
|
|
|
115
122
|
*/
|
|
116
123
|
active: Boolean
|
|
117
124
|
};
|
|
125
|
+
const CurrentProps = {
|
|
126
|
+
/**
|
|
127
|
+
* Whether the item is current
|
|
128
|
+
*/
|
|
129
|
+
current: Boolean
|
|
130
|
+
};
|
|
118
131
|
const PressedProps = {
|
|
119
132
|
/**
|
|
120
133
|
* Whether the item is pressed
|
|
@@ -298,6 +311,7 @@ const CheckboxRadioProps = {
|
|
|
298
311
|
...LabelProps,
|
|
299
312
|
...PressedProps,
|
|
300
313
|
...ActiveProps,
|
|
314
|
+
...CurrentProps,
|
|
301
315
|
...LinkProps,
|
|
302
316
|
/**
|
|
303
317
|
* Button type
|
|
@@ -313,6 +327,13 @@ const CheckboxRadioProps = {
|
|
|
313
327
|
ariaLabel: {
|
|
314
328
|
type: String,
|
|
315
329
|
default: void 0
|
|
330
|
+
},
|
|
331
|
+
/**
|
|
332
|
+
* Default tag for the action
|
|
333
|
+
*/
|
|
334
|
+
defaultTag: {
|
|
335
|
+
type: String,
|
|
336
|
+
default: ActionTag.button
|
|
316
337
|
}
|
|
317
338
|
});
|
|
318
339
|
function equals(obj1, obj2, field) {
|
|
@@ -656,7 +677,7 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
656
677
|
}, {});
|
|
657
678
|
});
|
|
658
679
|
}
|
|
659
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
680
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
660
681
|
function useModifiers(prefix, modifiers, others) {
|
|
661
682
|
return computed(() => {
|
|
662
683
|
const toReturn = {
|
|
@@ -833,12 +854,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
833
854
|
[vModelCheckbox, unref(localModelValue)]
|
|
834
855
|
]),
|
|
835
856
|
renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
|
|
836
|
-
createTextVNode(
|
|
857
|
+
createTextVNode(
|
|
858
|
+
toDisplayString(_ctx.label),
|
|
859
|
+
1
|
|
860
|
+
/* TEXT */
|
|
861
|
+
)
|
|
837
862
|
]),
|
|
838
863
|
createVNode(unref(HintSlot), {
|
|
839
864
|
id: unref(hasHintId),
|
|
840
865
|
class: "vv-checkbox__hint"
|
|
841
|
-
}, createSlots({
|
|
866
|
+
}, createSlots({
|
|
867
|
+
_: 2
|
|
868
|
+
/* DYNAMIC */
|
|
869
|
+
}, [
|
|
842
870
|
_ctx.$slots.hint ? {
|
|
843
871
|
name: "hint",
|
|
844
872
|
fn: withCtx(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=l(e.vue,e.uid)}(this,(function(e,l){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),o=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(o||{});const i=Symbol.for("volver"),r=Symbol.for("checkGroup"),u={valid:Boolean,validLabel:[String,Array]},d={invalid:Boolean,invalidLabel:[String,Array]},s={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},v={disabled:Boolean},c=(Boolean,Boolean,Boolean,{label:[String,Number]}),f={readonly:Boolean},b={modifiers:[String,Array]},p={hintLabel:{type:String,default:""}};a.before;const h={tabindex:{type:[String,Number],default:0}},m={id:[String,Number]};t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const g={...{...m,name:{type:String,required:!0}},...h,...u,...d,...p,...v,...f,...b,...c,...s,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]};function y(e,l,t){return t?L(e,t)===L(l,t):S(e,l)}function S(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),a=Array.isArray(l);let n,o,i;if(t&&a){if(o=e.length,o!=l.length)return!1;for(n=o;0!=n--;)if(!S(e[n],l[n]))return!1;return!0}if(t!=a)return!1;const r=e instanceof Date,u=l instanceof Date;if(r!=u)return!1;if(r&&u)return e.getTime()==l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==l.toString();const v=Object.keys(e);if(o=v.length,o!==Object.keys(l).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(l,v[n]))return!1;for(n=o;0!=n--;)if(i=v[n],!S(e[i],l[i]))return!1;return!0}return e!=e&&l!=l}function L(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const t=l.split(".");let a=e;for(let l=0,n=t.length;l<n;++l){if(null==e)return null;a=a[t[l]]}return a}}return null}function k(l){const t=e.inject(l,void 0),a=e.computed((()=>{return l=t,!(null==(a=e.unref(l))||""===a||Array.isArray(a)&&0===a.length||!(a instanceof Date)&&"object"==typeof a&&0===Object.keys(a).length);var l,a}));return{group:t,isInGroup:a,getGroupOrLocalRef:function(l,a,n){if(null==t?void 0:t.value){const a=e.unref(t.value)[l];return e.computed({get:()=>null==a?void 0:a.value,set(e){a.value=e}})}const o=e.toRef(a,l);return e.computed({get:()=>o.value,set(e){n&&n(`update:${l}`,e)}})}}}n.button,o.button;const B={...g,...b,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function O(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}function x(l,t,a){const n=e.inject(i),o=e.computed((()=>{var e;if(n&&(null==(e=n.defaults.value)?void 0:e[l]))return n.defaults.value[l]}));return e.computed((()=>{if(void 0===o.value)return a;const e=o.value,l=t,n=a;return Object.keys(l).reduce(((t,a)=>{const o=n[a];if(t[a]=o,a in e){if(Array.isArray(l[a])){const n=l[a];if(n.length){n[0]===o&&(t[a]=e[a])}}if("function"==typeof l[a]){(0,l[a])()===o&&(t[a]=e[a])}if("object"==typeof l[a]){let n=l[a].default;"function"==typeof n&&(n=n()),"object"==typeof n?JSON.stringify(n)===JSON.stringify(o)&&(t[a]=e[a]):n===o&&(t[a]=e[a])}}return t}),{})}))}const V=["for"],A=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:B,emits:["click","update:modelValue","change","blur"],setup(t,{emit:a}){const n=t,o=e.useSlots(),i=x("VvCheckbox",B,n),{id:u,disabled:d,readonly:s,valid:v,invalid:c,propsSwitch:f,modelValue:b,indeterminate:p,isInGroup:h}=function(l,t){const{group:a,isInGroup:n,getGroupOrLocalRef:o}=k(r),{id:i,switch:u,indeterminate:d}=e.toRefs(l),s=o("modelValue",l,t),v=o("valid",l),c=o("invalid",l),f=e.computed((()=>{var e;return Boolean(l.readonly||(null==(e=null==a?void 0:a.value)?void 0:e.readonly.value))})),b=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:i,propsSwitch:u,indeterminate:d,group:a,isInGroup:n,modelValue:s,valid:v,invalid:c,readonly:f,disabled:b}}(n,a),m=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.uid()))))(u),g=e.computed((()=>`${m.value}-hint`)),S=e.computed((()=>j.value?-1:n.tabindex)),L=e.ref(),$=e.computed((()=>void 0!==n.uncheckedValue&&!h.value)),j=e.computed((()=>d.value||s.value)),w=e.computed((()=>!0===c.value||!0!==v.value&&void 0)),R=e.computed((()=>$.value?b.value===n.value:Array.isArray(b.value)?function(e,l){if(null!=e&&l&&l.length)for(const t of l)if(y(e,t))return!0;return!1}(n.value,b.value):y(n.value,b.value))),C=e.computed((()=>!!p.value||!(R.value||!$.value||n.uncheckedValue===b.value))),N=e.computed((()=>{if(!$.value)return!["string","number","boolean"].includes(typeof n.value)||n.value})),I=e.computed({get:()=>R.value,set(e){if($.value)b.value=e?n.value:n.uncheckedValue;else if(Array.isArray(b.value)||h.value){const l=new Set(Array.isArray(b.value)?b.value:void 0!==b.value?[b.value]:[]);e?l.add(n.value):l.delete(n.value),b.value=[...l]}else b.value=e?n.value:void 0;a("change",e)}}),{modifiers:P}=e.toRefs(n),E=function(l,t,a){return e.computed((()=>{const n={[l]:!0},o="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return o&&Array.isArray(o)&&o.forEach((e=>{e&&(n[`${l}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((t=>{n[`${l}--${t}`]=e.unref(a.value[t])})),n}))}("vv-checkbox",P,e.computed((()=>({switch:f.value,valid:v.value,invalid:c.value,disabled:d.value,readonly:s.value,indeterminate:p.value}))));e.watchEffect((()=>{$.value&&Array.isArray(b.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>C.value),(e=>{L.value.indeterminate=!!e})),e.onMounted((()=>{C.value&&(L.value.indeterminate=!0)}));const{HintSlot:G,hasHintLabelOrSlot:H,hasInvalidLabelOrSlot:T,hintSlotScope:_}=function(l,t){const a=e.computed((()=>e.isRef(l)?l.value:l)),n=e.computed((()=>O(a.value.invalidLabel))),o=e.computed((()=>O(a.value.validLabel))),i=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(t.invalid||n.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(t.valid||o.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),f=e.computed((()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading}))),b=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:n,validLabel:o,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var l,t,a,n,o,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(n=(a=this.$slots).invalid)?void 0:n.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(o=this.$slots).valid)?void 0:i.call(o))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:b}}(i,o);return(l,t)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(E)),for:e.unref(m)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(m),ref_key:"input",ref:L,"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(I)?I.value=l:null),type:"checkbox",class:"vv-checkbox__input",name:l.name,disabled:e.unref(j),value:e.unref(N),tabindex:e.unref(S),"aria-invalid":e.unref(w),"aria-describedby":e.unref(H)?e.unref(g):void 0,"aria-errormessage":e.unref(T)?e.unref(g):void 0},null,8,A),[[e.vModelCheckbox,e.unref(I)]]),e.renderSlot(l.$slots,"default",{value:e.unref(b)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(G),{id:e.unref(g),class:"vv-checkbox__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"3"}:void 0]),1032,["id"])],10,V))}})}));
|
|
@@ -30,7 +30,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
30
30
|
required: boolean;
|
|
31
31
|
};
|
|
32
32
|
id: (StringConstructor | NumberConstructor)[];
|
|
33
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
33
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
[x: string]: (...args: any[]) => void;
|
|
35
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
36
|
indeterminate: BooleanConstructor;
|
|
35
37
|
uncheckedValue: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
36
38
|
switch: BooleanConstructor;
|
|
@@ -62,19 +64,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
62
64
|
required: boolean;
|
|
63
65
|
};
|
|
64
66
|
id: (StringConstructor | NumberConstructor)[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}, {
|
|
67
|
+
}>>, {
|
|
68
|
+
readonly: boolean;
|
|
68
69
|
disabled: boolean;
|
|
70
|
+
valid: boolean;
|
|
71
|
+
invalid: boolean;
|
|
69
72
|
switch: boolean;
|
|
70
|
-
tabindex: string | number;
|
|
71
73
|
loading: boolean;
|
|
72
74
|
loadingLabel: string;
|
|
73
75
|
indeterminate: boolean;
|
|
74
|
-
readonly: boolean;
|
|
75
76
|
hintLabel: string;
|
|
76
|
-
|
|
77
|
-
valid: boolean;
|
|
77
|
+
tabindex: string | number;
|
|
78
78
|
}, {}>, {
|
|
79
79
|
default?(_: {
|
|
80
80
|
value: any;
|
|
@@ -53,7 +53,7 @@ export declare function useGroupProps(props: VvCheckboxPropsTypes, emit: (event:
|
|
|
53
53
|
indeterminate: Ref<boolean>;
|
|
54
54
|
group: Ref<InputGroupState> | undefined;
|
|
55
55
|
isInGroup: globalThis.ComputedRef<boolean>;
|
|
56
|
-
modelValue:
|
|
56
|
+
modelValue: globalThis.WritableComputedRef<any>;
|
|
57
57
|
valid: Ref<boolean>;
|
|
58
58
|
invalid: Ref<boolean>;
|
|
59
59
|
readonly: globalThis.ComputedRef<boolean>;
|