@volverjs/ui-vue 0.0.9-beta.8 → 0.0.9
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/auto-imports.d.ts +2 -2
- package/dist/components/VvAccordion/VvAccordion.es.js +8 -7
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +8 -7
- package/dist/components/VvAction/VvAction.es.js +8 -7
- package/dist/components/VvAlert/VvAlert.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +7 -7
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +8 -7
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +8 -7
- package/dist/components/VvBadge/VvBadge.es.js +8 -7
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +8 -7
- package/dist/components/VvButton/VvButton.es.js +8 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +8 -7
- package/dist/components/VvCard/VvCard.es.js +8 -7
- package/dist/components/VvCheckbox/VvCheckbox.es.js +28 -20
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +28 -20
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +165 -129
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +306 -90
- package/dist/components/VvCombobox/index.d.ts +108 -31
- package/dist/components/VvDialog/VvDialog.es.js +37 -31
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +19 -16
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +301 -93
- package/dist/components/VvDropdown/index.d.ts +99 -30
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +8 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +8 -7
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +8 -7
- package/dist/components/VvInputText/VvInputText.es.js +212 -115
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +19 -37
- package/dist/components/VvInputText/index.d.ts +15 -33
- package/dist/components/VvNav/VvNav.es.js +8 -7
- package/dist/components/VvProgress/VvProgress.es.js +8 -7
- package/dist/components/VvRadio/VvRadio.es.js +28 -20
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +28 -20
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +28 -20
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +8 -7
- package/dist/components/VvTextarea/VvTextarea.es.js +36 -25
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +8 -7
- package/dist/components/index.es.js +390 -257
- package/dist/components/index.umd.js +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/directives/index.es.js +8 -7
- package/dist/directives/v-tooltip.es.js +8 -7
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +100 -31
- package/dist/resolvers/unplugin.es.js +3 -0
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +11 -11
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/InputText/InputText.settings.d.ts +31 -9
- package/dist/stories/InputText/InputText.stories.d.ts +0 -1
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/package.json +63 -62
- 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/VvAlertGroup/VvAlertGroup.vue +2 -0
- package/src/components/VvCombobox/VvCombobox.vue +40 -19
- package/src/components/VvCombobox/index.ts +13 -0
- package/src/components/VvDialog/VvDialog.vue +16 -13
- package/src/components/VvDropdown/VvDropdown.vue +18 -16
- package/src/components/VvInputText/VvInputText.vue +170 -55
- package/src/components/VvInputText/index.ts +32 -34
- package/src/components/VvTextarea/VvTextarea.vue +8 -5
- package/src/components/common/HintSlot.ts +20 -12
- package/src/constants.ts +5 -0
- package/src/props/index.ts +7 -11
- package/src/resolvers/unplugin.ts +3 -0
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/InputText/InputText.settings.ts +36 -15
- package/src/stories/InputText/InputText.stories.ts +4 -12
- package/src/stories/InputText/InputText.test.ts +31 -15
- package/src/stories/InputText/InputTextMask.stories.ts +122 -0
package/auto-imports.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
/* prettier-ignore */
|
|
3
3
|
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
4
5
|
// Generated by unplugin-auto-import
|
|
5
6
|
export {}
|
|
6
7
|
declare global {
|
|
7
8
|
const EffectScope: typeof import('vue')['EffectScope']
|
|
8
9
|
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
|
9
10
|
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
|
10
|
-
const composables: typeof import('./src/composables/index')['default']
|
|
11
11
|
const computed: typeof import('vue')['computed']
|
|
12
12
|
const computedAsync: typeof import('@vueuse/core')['computedAsync']
|
|
13
13
|
const computedEager: typeof import('@vueuse/core')['computedEager']
|
|
@@ -116,7 +116,7 @@ declare global {
|
|
|
116
116
|
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
|
117
117
|
const until: typeof import('@vueuse/core')['until']
|
|
118
118
|
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
|
119
|
-
const useAlert: typeof import('./src/composables/
|
|
119
|
+
const useAlert: typeof import('./src/composables/alert/useAlert')['useAlert']
|
|
120
120
|
const useAnimate: typeof import('@vueuse/core')['useAnimate']
|
|
121
121
|
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
|
|
122
122
|
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
3
|
import { useToggle } from "@vueuse/core";
|
|
4
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
5
|
+
Strategy2["absolute"] = "absolute";
|
|
6
|
+
Strategy2["fixed"] = "fixed";
|
|
7
|
+
return Strategy2;
|
|
8
|
+
})(Strategy || {});
|
|
4
9
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
5
10
|
Side2["left"] = "left";
|
|
6
11
|
Side2["right"] = "right";
|
|
@@ -117,19 +122,15 @@ const ModifiersProps = {
|
|
|
117
122
|
placement: {
|
|
118
123
|
type: String,
|
|
119
124
|
default: Side.bottom,
|
|
120
|
-
validator: (value) =>
|
|
121
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
122
|
-
}
|
|
125
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
123
126
|
},
|
|
124
127
|
/**
|
|
125
128
|
* Dropdown strategy
|
|
126
129
|
*/
|
|
127
130
|
strategy: {
|
|
128
131
|
type: String,
|
|
129
|
-
default:
|
|
130
|
-
validator: (value) =>
|
|
131
|
-
return ["fixed", "absolute"].includes(value);
|
|
132
|
-
}
|
|
132
|
+
default: void 0,
|
|
133
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
133
134
|
},
|
|
134
135
|
/**
|
|
135
136
|
* Dropdown show / hide transition name
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx } from "vue";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
3
|
import { useToggle, useStorage } from "@vueuse/core";
|
|
4
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
5
|
+
Strategy2["absolute"] = "absolute";
|
|
6
|
+
Strategy2["fixed"] = "fixed";
|
|
7
|
+
return Strategy2;
|
|
8
|
+
})(Strategy || {});
|
|
4
9
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
5
10
|
Side2["left"] = "left";
|
|
6
11
|
Side2["right"] = "right";
|
|
@@ -117,19 +122,15 @@ const ModifiersProps = {
|
|
|
117
122
|
placement: {
|
|
118
123
|
type: String,
|
|
119
124
|
default: Side.bottom,
|
|
120
|
-
validator: (value) =>
|
|
121
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
122
|
-
}
|
|
125
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
123
126
|
},
|
|
124
127
|
/**
|
|
125
128
|
* Dropdown strategy
|
|
126
129
|
*/
|
|
127
130
|
strategy: {
|
|
128
131
|
type: String,
|
|
129
|
-
default:
|
|
130
|
-
validator: (value) =>
|
|
131
|
-
return ["fixed", "absolute"].includes(value);
|
|
132
|
-
}
|
|
132
|
+
default: void 0,
|
|
133
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
133
134
|
},
|
|
134
135
|
/**
|
|
135
136
|
* Dropdown show / hide transition name
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { inject, defineComponent, ref, watch, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
2
7
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
8
|
Side2["left"] = "left";
|
|
4
9
|
Side2["right"] = "right";
|
|
@@ -122,19 +127,15 @@ const LabelProps = {
|
|
|
122
127
|
placement: {
|
|
123
128
|
type: String,
|
|
124
129
|
default: Side.bottom,
|
|
125
|
-
validator: (value) =>
|
|
126
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
127
|
-
}
|
|
130
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
128
131
|
},
|
|
129
132
|
/**
|
|
130
133
|
* Dropdown strategy
|
|
131
134
|
*/
|
|
132
135
|
strategy: {
|
|
133
136
|
type: String,
|
|
134
|
-
default:
|
|
135
|
-
validator: (value) =>
|
|
136
|
-
return ["fixed", "absolute"].includes(value);
|
|
137
|
-
}
|
|
137
|
+
default: void 0,
|
|
138
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
138
139
|
},
|
|
139
140
|
/**
|
|
140
141
|
* Dropdown show / hide transition name
|
|
@@ -95,6 +95,11 @@ const VvIconProps = {
|
|
|
95
95
|
type: [String, Array]
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
99
|
+
Strategy2["absolute"] = "absolute";
|
|
100
|
+
Strategy2["fixed"] = "fixed";
|
|
101
|
+
return Strategy2;
|
|
102
|
+
})(Strategy || {});
|
|
98
103
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
99
104
|
Side2["left"] = "left";
|
|
100
105
|
Side2["right"] = "right";
|
|
@@ -343,19 +348,15 @@ const IdProps = {
|
|
|
343
348
|
placement: {
|
|
344
349
|
type: String,
|
|
345
350
|
default: Side.bottom,
|
|
346
|
-
validator: (value) =>
|
|
347
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
348
|
-
}
|
|
351
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
349
352
|
},
|
|
350
353
|
/**
|
|
351
354
|
* Dropdown strategy
|
|
352
355
|
*/
|
|
353
356
|
strategy: {
|
|
354
357
|
type: String,
|
|
355
|
-
default:
|
|
356
|
-
validator: (value) =>
|
|
357
|
-
return ["fixed", "absolute"].includes(value);
|
|
358
|
-
}
|
|
358
|
+
default: void 0,
|
|
359
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
359
360
|
},
|
|
360
361
|
/**
|
|
361
362
|
* Dropdown show / hide transition name
|
|
@@ -2,6 +2,11 @@ import { provide, computed, unref, inject, defineComponent, ref, toRefs, openBlo
|
|
|
2
2
|
import mitt from "mitt";
|
|
3
3
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
4
4
|
import { nanoid } from "nanoid";
|
|
5
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
6
|
+
Strategy2["absolute"] = "absolute";
|
|
7
|
+
Strategy2["fixed"] = "fixed";
|
|
8
|
+
return Strategy2;
|
|
9
|
+
})(Strategy || {});
|
|
5
10
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
6
11
|
Side2["left"] = "left";
|
|
7
12
|
Side2["right"] = "right";
|
|
@@ -128,19 +133,15 @@ const IdProps = {
|
|
|
128
133
|
placement: {
|
|
129
134
|
type: String,
|
|
130
135
|
default: Side.bottom,
|
|
131
|
-
validator: (value) =>
|
|
132
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
133
|
-
}
|
|
136
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
134
137
|
},
|
|
135
138
|
/**
|
|
136
139
|
* Dropdown strategy
|
|
137
140
|
*/
|
|
138
141
|
strategy: {
|
|
139
142
|
type: String,
|
|
140
|
-
default:
|
|
141
|
-
validator: (value) =>
|
|
142
|
-
return ["fixed", "absolute"].includes(value);
|
|
143
|
-
}
|
|
143
|
+
default: void 0,
|
|
144
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
144
145
|
},
|
|
145
146
|
/**
|
|
146
147
|
* Dropdown show / hide transition name
|
|
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
18
|
inline: {
|
|
19
|
-
type: globalThis.PropType<"start" | "
|
|
19
|
+
type: globalThis.PropType<"start" | "end" | "middle">;
|
|
20
20
|
default: undefined;
|
|
21
21
|
};
|
|
22
22
|
block: {
|
|
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
24
24
|
default: undefined;
|
|
25
25
|
};
|
|
26
26
|
position: {
|
|
27
|
-
type: globalThis.PropType<"
|
|
27
|
+
type: globalThis.PropType<"absolute" | "fixed">;
|
|
28
28
|
default: undefined;
|
|
29
29
|
};
|
|
30
30
|
transition: {
|
|
@@ -50,7 +50,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
52
|
inline: {
|
|
53
|
-
type: globalThis.PropType<"start" | "
|
|
53
|
+
type: globalThis.PropType<"start" | "end" | "middle">;
|
|
54
54
|
default: undefined;
|
|
55
55
|
};
|
|
56
56
|
block: {
|
|
@@ -58,7 +58,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
58
58
|
default: undefined;
|
|
59
59
|
};
|
|
60
60
|
position: {
|
|
61
|
-
type: globalThis.PropType<"
|
|
61
|
+
type: globalThis.PropType<"absolute" | "fixed">;
|
|
62
62
|
default: undefined;
|
|
63
63
|
};
|
|
64
64
|
transition: {
|
|
@@ -71,11 +71,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
71
|
}, {
|
|
72
72
|
reverse: boolean;
|
|
73
73
|
items: import(".").AlertItem[];
|
|
74
|
-
|
|
74
|
+
transition: string;
|
|
75
|
+
inline: "start" | "end" | "middle";
|
|
75
76
|
stack: boolean;
|
|
76
77
|
block: "top" | "bottom" | "center";
|
|
77
|
-
position: "
|
|
78
|
-
transition: string;
|
|
78
|
+
position: "absolute" | "fixed";
|
|
79
79
|
}, {}>, {
|
|
80
80
|
before?(_: {}): any;
|
|
81
81
|
default?(_: {}): any;
|
|
@@ -29,7 +29,7 @@ export declare const VvAlertGroupProps: {
|
|
|
29
29
|
default: boolean;
|
|
30
30
|
};
|
|
31
31
|
inline: {
|
|
32
|
-
type: globalThis.PropType<"start" | "
|
|
32
|
+
type: globalThis.PropType<"start" | "end" | "middle">;
|
|
33
33
|
default: undefined;
|
|
34
34
|
};
|
|
35
35
|
block: {
|
|
@@ -37,7 +37,7 @@ export declare const VvAlertGroupProps: {
|
|
|
37
37
|
default: undefined;
|
|
38
38
|
};
|
|
39
39
|
position: {
|
|
40
|
-
type: globalThis.PropType<"
|
|
40
|
+
type: globalThis.PropType<"absolute" | "fixed">;
|
|
41
41
|
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
transition: {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
2
7
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
8
|
Side2["left"] = "left";
|
|
4
9
|
Side2["right"] = "right";
|
|
@@ -114,19 +119,15 @@ const ModifiersProps = {
|
|
|
114
119
|
placement: {
|
|
115
120
|
type: String,
|
|
116
121
|
default: Side.bottom,
|
|
117
|
-
validator: (value) =>
|
|
118
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
119
|
-
}
|
|
122
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
120
123
|
},
|
|
121
124
|
/**
|
|
122
125
|
* Dropdown strategy
|
|
123
126
|
*/
|
|
124
127
|
strategy: {
|
|
125
128
|
type: String,
|
|
126
|
-
default:
|
|
127
|
-
validator: (value) =>
|
|
128
|
-
return ["fixed", "absolute"].includes(value);
|
|
129
|
-
}
|
|
129
|
+
default: void 0,
|
|
130
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
130
131
|
},
|
|
131
132
|
/**
|
|
132
133
|
* Dropdown show / hide transition name
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, createBlock, mergeProps, withCtx, toDisplayString, createTextVNode } from "vue";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
4
|
+
Strategy2["absolute"] = "absolute";
|
|
5
|
+
Strategy2["fixed"] = "fixed";
|
|
6
|
+
return Strategy2;
|
|
7
|
+
})(Strategy || {});
|
|
3
8
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
4
9
|
Side2["left"] = "left";
|
|
5
10
|
Side2["right"] = "right";
|
|
@@ -115,19 +120,15 @@ const ModifiersProps = {
|
|
|
115
120
|
placement: {
|
|
116
121
|
type: String,
|
|
117
122
|
default: Side.bottom,
|
|
118
|
-
validator: (value) =>
|
|
119
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
120
|
-
}
|
|
123
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
121
124
|
},
|
|
122
125
|
/**
|
|
123
126
|
* Dropdown strategy
|
|
124
127
|
*/
|
|
125
128
|
strategy: {
|
|
126
129
|
type: String,
|
|
127
|
-
default:
|
|
128
|
-
validator: (value) =>
|
|
129
|
-
return ["fixed", "absolute"].includes(value);
|
|
130
|
-
}
|
|
130
|
+
default: void 0,
|
|
131
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
131
132
|
},
|
|
132
133
|
/**
|
|
133
134
|
* Dropdown show / hide transition name
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
2
7
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
8
|
Side2["left"] = "left";
|
|
4
9
|
Side2["right"] = "right";
|
|
@@ -114,19 +119,15 @@ const ModifiersProps = {
|
|
|
114
119
|
placement: {
|
|
115
120
|
type: String,
|
|
116
121
|
default: Side.bottom,
|
|
117
|
-
validator: (value) =>
|
|
118
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
119
|
-
}
|
|
122
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
120
123
|
},
|
|
121
124
|
/**
|
|
122
125
|
* Dropdown strategy
|
|
123
126
|
*/
|
|
124
127
|
strategy: {
|
|
125
128
|
type: String,
|
|
126
|
-
default:
|
|
127
|
-
validator: (value) =>
|
|
128
|
-
return ["fixed", "absolute"].includes(value);
|
|
129
|
-
}
|
|
129
|
+
default: void 0,
|
|
130
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
130
131
|
},
|
|
131
132
|
/**
|
|
132
133
|
* Dropdown show / hide transition name
|
|
@@ -22,6 +22,11 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
22
22
|
return toReturn;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
26
|
+
Strategy2["absolute"] = "absolute";
|
|
27
|
+
Strategy2["fixed"] = "fixed";
|
|
28
|
+
return Strategy2;
|
|
29
|
+
})(Strategy || {});
|
|
25
30
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
26
31
|
Side2["left"] = "left";
|
|
27
32
|
Side2["right"] = "right";
|
|
@@ -137,19 +142,15 @@ const ModifiersProps = {
|
|
|
137
142
|
placement: {
|
|
138
143
|
type: String,
|
|
139
144
|
default: Side.bottom,
|
|
140
|
-
validator: (value) =>
|
|
141
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
142
|
-
}
|
|
145
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
143
146
|
},
|
|
144
147
|
/**
|
|
145
148
|
* Dropdown strategy
|
|
146
149
|
*/
|
|
147
150
|
strategy: {
|
|
148
151
|
type: String,
|
|
149
|
-
default:
|
|
150
|
-
validator: (value) =>
|
|
151
|
-
return ["fixed", "absolute"].includes(value);
|
|
152
|
-
}
|
|
152
|
+
default: void 0,
|
|
153
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
153
154
|
},
|
|
154
155
|
/**
|
|
155
156
|
* Dropdown show / hide transition name
|
|
@@ -95,6 +95,11 @@ const VvIconProps = {
|
|
|
95
95
|
type: [String, Array]
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
99
|
+
Strategy2["absolute"] = "absolute";
|
|
100
|
+
Strategy2["fixed"] = "fixed";
|
|
101
|
+
return Strategy2;
|
|
102
|
+
})(Strategy || {});
|
|
98
103
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
99
104
|
Side2["left"] = "left";
|
|
100
105
|
Side2["right"] = "right";
|
|
@@ -373,19 +378,15 @@ const IdProps = {
|
|
|
373
378
|
placement: {
|
|
374
379
|
type: String,
|
|
375
380
|
default: Side.bottom,
|
|
376
|
-
validator: (value) =>
|
|
377
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
378
|
-
}
|
|
381
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
379
382
|
},
|
|
380
383
|
/**
|
|
381
384
|
* Dropdown strategy
|
|
382
385
|
*/
|
|
383
386
|
strategy: {
|
|
384
387
|
type: String,
|
|
385
|
-
default:
|
|
386
|
-
validator: (value) =>
|
|
387
|
-
return ["fixed", "absolute"].includes(value);
|
|
388
|
-
}
|
|
388
|
+
default: void 0,
|
|
389
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
389
390
|
},
|
|
390
391
|
/**
|
|
391
392
|
* Dropdown show / hide transition name
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { isRef, provide, computed, unref, defineComponent, toRefs, watchEffect, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
2
7
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
8
|
Side2["left"] = "left";
|
|
4
9
|
Side2["right"] = "right";
|
|
@@ -121,19 +126,15 @@ const UnselectableProps = {
|
|
|
121
126
|
placement: {
|
|
122
127
|
type: String,
|
|
123
128
|
default: Side.bottom,
|
|
124
|
-
validator: (value) =>
|
|
125
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
126
|
-
}
|
|
129
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
127
130
|
},
|
|
128
131
|
/**
|
|
129
132
|
* Dropdown strategy
|
|
130
133
|
*/
|
|
131
134
|
strategy: {
|
|
132
135
|
type: String,
|
|
133
|
-
default:
|
|
134
|
-
validator: (value) =>
|
|
135
|
-
return ["fixed", "absolute"].includes(value);
|
|
136
|
-
}
|
|
136
|
+
default: void 0,
|
|
137
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
137
138
|
},
|
|
138
139
|
/**
|
|
139
140
|
* Dropdown show / hide transition name
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
2
7
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
8
|
Side2["left"] = "left";
|
|
4
9
|
Side2["right"] = "right";
|
|
@@ -114,19 +119,15 @@ const ModifiersProps = {
|
|
|
114
119
|
placement: {
|
|
115
120
|
type: String,
|
|
116
121
|
default: Side.bottom,
|
|
117
|
-
validator: (value) =>
|
|
118
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
119
|
-
}
|
|
122
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
120
123
|
},
|
|
121
124
|
/**
|
|
122
125
|
* Dropdown strategy
|
|
123
126
|
*/
|
|
124
127
|
strategy: {
|
|
125
128
|
type: String,
|
|
126
|
-
default:
|
|
127
|
-
validator: (value) =>
|
|
128
|
-
return ["fixed", "absolute"].includes(value);
|
|
129
|
-
}
|
|
129
|
+
default: void 0,
|
|
130
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
130
131
|
},
|
|
131
132
|
/**
|
|
132
133
|
* Dropdown show / hide transition name
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { unref, inject, computed, toRef, toRefs, defineComponent, h, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode,
|
|
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
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
4
|
+
Strategy2["absolute"] = "absolute";
|
|
5
|
+
Strategy2["fixed"] = "fixed";
|
|
6
|
+
return Strategy2;
|
|
7
|
+
})(Strategy || {});
|
|
3
8
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
4
9
|
Side2["left"] = "left";
|
|
5
10
|
Side2["right"] = "right";
|
|
@@ -173,19 +178,15 @@ const IdProps = {
|
|
|
173
178
|
placement: {
|
|
174
179
|
type: String,
|
|
175
180
|
default: Side.bottom,
|
|
176
|
-
validator: (value) =>
|
|
177
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
178
|
-
}
|
|
181
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
179
182
|
},
|
|
180
183
|
/**
|
|
181
184
|
* Dropdown strategy
|
|
182
185
|
*/
|
|
183
186
|
strategy: {
|
|
184
187
|
type: String,
|
|
185
|
-
default:
|
|
186
|
-
validator: (value) =>
|
|
187
|
-
return ["fixed", "absolute"].includes(value);
|
|
188
|
-
}
|
|
188
|
+
default: void 0,
|
|
189
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
189
190
|
},
|
|
190
191
|
/**
|
|
191
192
|
* Dropdown show / hide transition name
|
|
@@ -488,19 +489,26 @@ function joinLines(items) {
|
|
|
488
489
|
return items;
|
|
489
490
|
}
|
|
490
491
|
function HintSlotFactory(propsOrRef, slots) {
|
|
491
|
-
const props =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
const props = computed(() => {
|
|
493
|
+
if (isRef(propsOrRef)) {
|
|
494
|
+
return propsOrRef.value;
|
|
495
|
+
}
|
|
496
|
+
return propsOrRef;
|
|
497
|
+
});
|
|
498
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
499
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
500
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
501
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
496
502
|
const hasLoadingLabelOrSlot = computed(
|
|
497
|
-
() => Boolean(props.loading && (slots.loading || loadingLabel.value))
|
|
503
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
498
504
|
);
|
|
499
505
|
const hasInvalidLabelOrSlot = computed(
|
|
500
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
506
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
507
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
508
|
+
)
|
|
501
509
|
);
|
|
502
510
|
const hasValidLabelOrSlot = computed(
|
|
503
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
|
|
511
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
504
512
|
);
|
|
505
513
|
const hasHintLabelOrSlot = computed(
|
|
506
514
|
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
@@ -509,10 +517,10 @@ function HintSlotFactory(propsOrRef, slots) {
|
|
|
509
517
|
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
510
518
|
);
|
|
511
519
|
const hintSlotScope = computed(() => ({
|
|
512
|
-
modelValue: props.modelValue,
|
|
513
|
-
valid: props.valid,
|
|
514
|
-
invalid: props.invalid,
|
|
515
|
-
loading: props.loading
|
|
520
|
+
modelValue: props.value.modelValue,
|
|
521
|
+
valid: props.value.valid,
|
|
522
|
+
invalid: props.value.invalid,
|
|
523
|
+
loading: props.value.loading
|
|
516
524
|
}));
|
|
517
525
|
const HintSlot = defineComponent({
|
|
518
526
|
name: "HintSlot",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=l(e.vue,e.nanoid)}(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||{});const o=Symbol.for("volver"),i=Symbol.for("checkGroup"),r={valid:Boolean,validLabel:[String,Array]},u={invalid:Boolean,invalidLabel:[String,Array]},d={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},s={disabled:Boolean},v=(Boolean,Boolean,{label:[String,Number]}),c={readonly:Boolean},f={modifiers:[String,Array]},
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=l(e.vue,e.nanoid)}(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||{});const o=Symbol.for("volver"),i=Symbol.for("checkGroup"),r={valid:Boolean,validLabel:[String,Array]},u={invalid:Boolean,invalidLabel:[String,Array]},d={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},s={disabled:Boolean},v=(Boolean,Boolean,{label:[String,Number]}),c={readonly:Boolean},f={modifiers:[String,Array]},p={hintLabel:{type:String,default:""}};a.before;const b={tabindex:{type:[String,Number],default:0}},h={id:[String,Number]};t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const m={...{...h,name:{type:String,required:!0}},...b,...r,...u,...p,...s,...c,...f,...v,...d,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]};function g(e,l,t){return t?S(e,t)===S(l,t):y(e,l)}function y(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(!y(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],!y(e[i],l[i]))return!1;return!0}return e!=e&&l!=l}function S(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 L(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;const O={...m,...f,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function k(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}function B(l,t,a){const n=e.inject(o),i=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===i.value)return a;const e=i.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"],x=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:O,emits:["click","update:modelValue","change","blur"],setup(t,{emit:a}){const n=t,o=e.useSlots(),r=B("VvCheckbox",O,n),{id:u,disabled:d,readonly:s,valid:v,invalid:c,propsSwitch:f,modelValue:p,indeterminate:b,isInGroup:h}=function(l,t){const{group:a,isInGroup:n,getGroupOrLocalRef:o}=L(i),{id:r,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))})),p=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:r,propsSwitch:u,indeterminate:d,group:a,isInGroup:n,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}(n,a),m=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.nanoid()))))(u),y=e.computed((()=>`${m.value}-hint`)),S=e.computed((()=>j.value?-1:n.tabindex)),A=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?p.value===n.value:Array.isArray(p.value)?function(e,l){if(null!=e&&l&&l.length)for(const t of l)if(g(e,t))return!0;return!1}(n.value,p.value):g(n.value,p.value))),C=e.computed((()=>!!b.value||!(R.value||!$.value||n.uncheckedValue===p.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)p.value=e?n.value:n.uncheckedValue;else if(Array.isArray(p.value)||h.value){const l=new Set(Array.isArray(p.value)?p.value:void 0!==p.value?[p.value]:[]);e?l.add(n.value):l.delete(n.value),p.value=[...l]}else p.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:b.value}))));e.watchEffect((()=>{$.value&&Array.isArray(p.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>C.value),(e=>{A.value.indeterminate=!!e})),e.onMounted((()=>{C.value&&(A.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((()=>k(a.value.invalidLabel))),o=e.computed((()=>k(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}))),p=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:p}}(r,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:A,"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(y):void 0,"aria-errormessage":e.unref(T)?e.unref(y):void 0},null,8,x),[[e.vModelCheckbox,e.unref(I)]]),e.renderSlot(l.$slots,"default",{value:e.unref(p)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(G),{id:e.unref(y),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))}})}));
|