@volverjs/ui-vue 0.0.10-beta.65 → 0.0.10-beta.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/Volver.d.ts +13 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +1 -3
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +1 -180
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -3
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +6 -5
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +1 -4
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +1 -5
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +3 -3
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -3
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +1 -3
- package/dist/components/VvInputText/VvInputText.es.js +14 -13
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +1 -710
- package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +1 -1
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +1 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +2 -2
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +3 -2
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -709
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
- package/dist/components/index.es.js +21 -18
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +9 -1
- package/dist/index.umd.js +1 -1
- package/dist/resolvers/unplugin.d.ts +1 -1
- package/dist/resolvers/unplugin.es.js +4 -4
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +28 -28
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -1
- package/dist/stories/Radio/Radio.settings.d.ts +1 -1
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -1
- package/dist/utils/ObjectUtilities.d.ts +1 -1
- package/package.json +240 -240
package/README.md
CHANGED
|
@@ -246,8 +246,7 @@ watch(
|
|
|
246
246
|
this.imageUrl = URL.createObjectURL(newValue)
|
|
247
247
|
this.image = await this.loadImage(this.imageUrl)
|
|
248
248
|
this.blurhash = await this.encode(newValue)
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
249
|
+
} else {
|
|
251
250
|
this.image = null
|
|
252
251
|
this.imageUrl = ''
|
|
253
252
|
this.blurhash = ''
|
package/dist/Volver.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import type { IconifyIcon, IconifyJSON, PartialIconifyAPIConfig } from '@iconify
|
|
|
2
2
|
import type { Component, Directive, Plugin, Ref } from 'vue';
|
|
3
3
|
export declare function useDefaultProps(component: Component, defaults?: Record<string, unknown>, name?: string): Component;
|
|
4
4
|
export type DefaultOptions = Record<string, Record<string, unknown>>;
|
|
5
|
+
export type VolverExperimentalFeatures = {
|
|
6
|
+
/**
|
|
7
|
+
* Force suggestions in `VvInputText` and `VvTextarea` component
|
|
8
|
+
*/
|
|
9
|
+
forceInputSuggestions?: boolean;
|
|
10
|
+
};
|
|
5
11
|
export type VolverOptions = {
|
|
6
12
|
/**
|
|
7
13
|
* If true set "fetchOptions" with credentials: 'include'
|
|
@@ -42,6 +48,10 @@ export type VolverOptions = {
|
|
|
42
48
|
* Default props for components
|
|
43
49
|
*/
|
|
44
50
|
defaults?: DefaultOptions;
|
|
51
|
+
/**
|
|
52
|
+
* Experimental features
|
|
53
|
+
*/
|
|
54
|
+
experimentalFeatures?: VolverExperimentalFeatures;
|
|
45
55
|
};
|
|
46
56
|
export interface VolverInterface {
|
|
47
57
|
/**
|
|
@@ -95,11 +105,13 @@ export declare class Volver implements VolverInterface {
|
|
|
95
105
|
private _iconsCollections;
|
|
96
106
|
private _iconsProvider;
|
|
97
107
|
private _nuxt;
|
|
108
|
+
private _experimentalFeatures;
|
|
98
109
|
defaults: Ref<DefaultOptions>;
|
|
99
|
-
constructor({ fetchWithCredentials, fetchOptions, iconsProvider, nuxt, iconsCollections, defaults, }?: VolverOptions);
|
|
110
|
+
constructor({ fetchWithCredentials, fetchOptions, iconsProvider, nuxt, iconsCollections, defaults, experimentalFeatures, }?: VolverOptions);
|
|
100
111
|
get nuxt(): boolean;
|
|
101
112
|
get iconsProvider(): string;
|
|
102
113
|
get iconsCollections(): IconifyJSON[];
|
|
114
|
+
get experimentalFeatures(): VolverExperimentalFeatures;
|
|
103
115
|
addCollection(collection: IconifyJSON, providerName?: string): boolean;
|
|
104
116
|
addIcon(name: string, data: IconifyIcon): boolean;
|
|
105
117
|
addIconsAPIProvider(provider: string, customConfig: PartialIconifyAPIConfig): boolean;
|
|
@@ -37,7 +37,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
37
37
|
modelValue: boolean;
|
|
38
38
|
not: boolean;
|
|
39
39
|
modifiers: string | string[];
|
|
40
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
41
41
|
summary?: ((props: {
|
|
42
42
|
isExpanded: boolean;
|
|
43
43
|
expand: () => void;
|
|
@@ -63,7 +63,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
63
63
|
items: import(".").VvAccordionGroupItem[];
|
|
64
64
|
itemModifiers: string | string[];
|
|
65
65
|
storageType: "local" | "session";
|
|
66
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
67
67
|
[x: `summary::${string}`]: ((props: {
|
|
68
68
|
isExpanded: boolean;
|
|
69
69
|
expand: () => void;
|
|
@@ -97,9 +97,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
97
97
|
current: boolean;
|
|
98
98
|
active: boolean;
|
|
99
99
|
pressed: boolean;
|
|
100
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
|
|
101
|
-
element: unknown;
|
|
102
|
-
}, any>, {
|
|
100
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
103
101
|
default?: ((props: {}) => any) | undefined;
|
|
104
102
|
}>;
|
|
105
103
|
export default _default;
|
|
@@ -97,7 +97,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
97
97
|
closeLabel: string;
|
|
98
98
|
icon: string | import("../VvIcon").VvIconProps;
|
|
99
99
|
iconPosition: "before" | "after";
|
|
100
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
100
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
101
101
|
header?: ((props: {}) => any) | undefined;
|
|
102
102
|
'title::before'?: ((props: {}) => any) | undefined;
|
|
103
103
|
title?: ((props: {}) => any) | undefined;
|
|
@@ -81,7 +81,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
81
81
|
stack: boolean;
|
|
82
82
|
block: "top" | "bottom" | "center";
|
|
83
83
|
position: "absolute" | "fixed";
|
|
84
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
84
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
85
85
|
before?: ((props: {}) => any) | undefined;
|
|
86
86
|
default?: ((props: {}) => any) | undefined;
|
|
87
87
|
after?: ((props: {}) => any) | undefined;
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
12
12
|
};
|
|
13
13
|
}>> & Readonly<{}>, {
|
|
14
14
|
modifiers: string | string[];
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
default?: ((props: {}) => any) | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export default _default;
|
|
@@ -38,7 +38,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
38
38
|
modifiers: string | string[];
|
|
39
39
|
items: import("@/components/VvAvatarGroup").AvatarItem[];
|
|
40
40
|
toShow: number;
|
|
41
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
42
42
|
default?: ((props: {}) => any) | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
export default _default;
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
12
12
|
};
|
|
13
13
|
}>> & Readonly<{}>, {
|
|
14
14
|
modifiers: string | string[];
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
default?: ((props: {}) => any) | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export default _default;
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
12
12
|
};
|
|
13
13
|
}>> & Readonly<{}>, {
|
|
14
14
|
modifiers: string | string[];
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
label?: ((props: {
|
|
17
17
|
index: number;
|
|
18
18
|
label: string;
|
|
@@ -200,186 +200,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
200
200
|
loading: boolean;
|
|
201
201
|
loadingLabel: string;
|
|
202
202
|
unselectable: boolean;
|
|
203
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
|
|
204
|
-
element: ({
|
|
205
|
-
$: import("vue").ComponentInternalInstance;
|
|
206
|
-
$data: {};
|
|
207
|
-
$props: Partial<{
|
|
208
|
-
label: string | number;
|
|
209
|
-
disabled: boolean;
|
|
210
|
-
type: "button" | "submit" | "reset";
|
|
211
|
-
ariaLabel: string;
|
|
212
|
-
defaultTag: string;
|
|
213
|
-
rel: string;
|
|
214
|
-
current: boolean;
|
|
215
|
-
active: boolean;
|
|
216
|
-
pressed: boolean;
|
|
217
|
-
}> & Omit<{
|
|
218
|
-
readonly disabled: boolean;
|
|
219
|
-
readonly type: "button" | "submit" | "reset";
|
|
220
|
-
readonly defaultTag: string;
|
|
221
|
-
readonly rel: string;
|
|
222
|
-
readonly current: boolean;
|
|
223
|
-
readonly active: boolean;
|
|
224
|
-
readonly pressed: boolean;
|
|
225
|
-
readonly label?: string | number | undefined;
|
|
226
|
-
readonly target?: string | undefined;
|
|
227
|
-
readonly ariaLabel?: string | undefined;
|
|
228
|
-
readonly to?: string | Record<string, any> | undefined;
|
|
229
|
-
readonly href?: string | undefined;
|
|
230
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "type" | "ariaLabel" | "defaultTag" | "rel" | "current" | "active" | "pressed">;
|
|
231
|
-
$attrs: {
|
|
232
|
-
[x: string]: unknown;
|
|
233
|
-
};
|
|
234
|
-
$refs: {
|
|
235
|
-
[x: string]: unknown;
|
|
236
|
-
} & {
|
|
237
|
-
element: unknown;
|
|
238
|
-
};
|
|
239
|
-
$slots: Readonly<{
|
|
240
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
241
|
-
}>;
|
|
242
|
-
$root: ComponentPublicInstance | null;
|
|
243
|
-
$parent: ComponentPublicInstance | null;
|
|
244
|
-
$host: Element | null;
|
|
245
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
246
|
-
$el: any;
|
|
247
|
-
$options: import("vue").ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
|
|
248
|
-
type: {
|
|
249
|
-
type: PropType<`${import("../../constants").ButtonType}`>;
|
|
250
|
-
default: import("../../constants").ButtonType;
|
|
251
|
-
validator: (value: import("../../constants").ButtonType) => boolean;
|
|
252
|
-
};
|
|
253
|
-
ariaLabel: {
|
|
254
|
-
type: StringConstructor;
|
|
255
|
-
default: undefined;
|
|
256
|
-
};
|
|
257
|
-
defaultTag: {
|
|
258
|
-
type: StringConstructor;
|
|
259
|
-
default: import("../../constants").ActionTag;
|
|
260
|
-
};
|
|
261
|
-
to: {
|
|
262
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
263
|
-
};
|
|
264
|
-
href: StringConstructor;
|
|
265
|
-
target: StringConstructor;
|
|
266
|
-
rel: {
|
|
267
|
-
type: StringConstructor;
|
|
268
|
-
default: string;
|
|
269
|
-
};
|
|
270
|
-
current: {
|
|
271
|
-
type: BooleanConstructor;
|
|
272
|
-
default: boolean;
|
|
273
|
-
};
|
|
274
|
-
active: {
|
|
275
|
-
type: BooleanConstructor;
|
|
276
|
-
default: boolean;
|
|
277
|
-
};
|
|
278
|
-
pressed: {
|
|
279
|
-
type: BooleanConstructor;
|
|
280
|
-
default: boolean;
|
|
281
|
-
};
|
|
282
|
-
label: {
|
|
283
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
284
|
-
default: undefined;
|
|
285
|
-
};
|
|
286
|
-
disabled: {
|
|
287
|
-
type: BooleanConstructor;
|
|
288
|
-
default: boolean;
|
|
289
|
-
};
|
|
290
|
-
}>> & Readonly<{}>, {
|
|
291
|
-
$el: globalThis.Ref<HTMLElement | null, HTMLElement | null>;
|
|
292
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
293
|
-
label: string | number;
|
|
294
|
-
disabled: boolean;
|
|
295
|
-
type: "button" | "submit" | "reset";
|
|
296
|
-
ariaLabel: string;
|
|
297
|
-
defaultTag: string;
|
|
298
|
-
rel: string;
|
|
299
|
-
current: boolean;
|
|
300
|
-
active: boolean;
|
|
301
|
-
pressed: boolean;
|
|
302
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
303
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
304
|
-
created?: (() => void) | (() => void)[];
|
|
305
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
306
|
-
mounted?: (() => void) | (() => void)[];
|
|
307
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
308
|
-
updated?: (() => void) | (() => void)[];
|
|
309
|
-
activated?: (() => void) | (() => void)[];
|
|
310
|
-
deactivated?: (() => void) | (() => void)[];
|
|
311
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
312
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
313
|
-
destroyed?: (() => void) | (() => void)[];
|
|
314
|
-
unmounted?: (() => void) | (() => void)[];
|
|
315
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
316
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
317
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
318
|
-
};
|
|
319
|
-
$forceUpdate: () => void;
|
|
320
|
-
$nextTick: typeof import("vue").nextTick;
|
|
321
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
322
|
-
} & Readonly<{
|
|
323
|
-
label: string | number;
|
|
324
|
-
disabled: boolean;
|
|
325
|
-
type: "button" | "submit" | "reset";
|
|
326
|
-
ariaLabel: string;
|
|
327
|
-
defaultTag: string;
|
|
328
|
-
rel: string;
|
|
329
|
-
current: boolean;
|
|
330
|
-
active: boolean;
|
|
331
|
-
pressed: boolean;
|
|
332
|
-
}> & Omit<Readonly<globalThis.ExtractPropTypes<{
|
|
333
|
-
type: {
|
|
334
|
-
type: PropType<`${import("../../constants").ButtonType}`>;
|
|
335
|
-
default: import("../../constants").ButtonType;
|
|
336
|
-
validator: (value: import("../../constants").ButtonType) => boolean;
|
|
337
|
-
};
|
|
338
|
-
ariaLabel: {
|
|
339
|
-
type: StringConstructor;
|
|
340
|
-
default: undefined;
|
|
341
|
-
};
|
|
342
|
-
defaultTag: {
|
|
343
|
-
type: StringConstructor;
|
|
344
|
-
default: import("../../constants").ActionTag;
|
|
345
|
-
};
|
|
346
|
-
to: {
|
|
347
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
348
|
-
};
|
|
349
|
-
href: StringConstructor;
|
|
350
|
-
target: StringConstructor;
|
|
351
|
-
rel: {
|
|
352
|
-
type: StringConstructor;
|
|
353
|
-
default: string;
|
|
354
|
-
};
|
|
355
|
-
current: {
|
|
356
|
-
type: BooleanConstructor;
|
|
357
|
-
default: boolean;
|
|
358
|
-
};
|
|
359
|
-
active: {
|
|
360
|
-
type: BooleanConstructor;
|
|
361
|
-
default: boolean;
|
|
362
|
-
};
|
|
363
|
-
pressed: {
|
|
364
|
-
type: BooleanConstructor;
|
|
365
|
-
default: boolean;
|
|
366
|
-
};
|
|
367
|
-
label: {
|
|
368
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
369
|
-
default: undefined;
|
|
370
|
-
};
|
|
371
|
-
disabled: {
|
|
372
|
-
type: BooleanConstructor;
|
|
373
|
-
default: boolean;
|
|
374
|
-
};
|
|
375
|
-
}>> & Readonly<{}>, "$el" | ("label" | "disabled" | "type" | "ariaLabel" | "defaultTag" | "rel" | "current" | "active" | "pressed")> & import("vue").ShallowUnwrapRef<{
|
|
376
|
-
$el: globalThis.Ref<HTMLElement | null, HTMLElement | null>;
|
|
377
|
-
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
378
|
-
$slots: {
|
|
379
|
-
default?: ((props: {}) => any) | undefined;
|
|
380
|
-
};
|
|
381
|
-
}) | null;
|
|
382
|
-
}, any>, {
|
|
203
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
383
204
|
default?: ((props: {}) => any) | undefined;
|
|
384
205
|
loading?: ((props: {}) => any) | undefined;
|
|
385
206
|
before?: ((props: {}) => any) | undefined;
|
|
@@ -70,7 +70,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
70
70
|
itemModifiers: string | string[];
|
|
71
71
|
unselectable: boolean;
|
|
72
72
|
multiple: boolean;
|
|
73
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
73
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
74
74
|
legend?: ((props: {}) => any) | undefined;
|
|
75
75
|
default?: ((props: {}) => any) | undefined;
|
|
76
76
|
}>;
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
12
12
|
};
|
|
13
13
|
}>> & Readonly<{}>, {
|
|
14
14
|
modifiers: string | string[];
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
header?: ((props: {}) => any) | undefined;
|
|
17
17
|
default?: ((props: {}) => any) | undefined;
|
|
18
18
|
content?: ((props: {}) => any) | undefined;
|
|
@@ -335,7 +335,7 @@ function contains(value, list) {
|
|
|
335
335
|
return false;
|
|
336
336
|
}
|
|
337
337
|
function isString(value) {
|
|
338
|
-
return typeof value === "string"
|
|
338
|
+
return typeof value === "string";
|
|
339
339
|
}
|
|
340
340
|
function joinLines(items) {
|
|
341
341
|
if (Array.isArray(items)) {
|
|
@@ -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).VvCheckbox=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const o=Symbol.for("volver"),r=Symbol.for("checkGroup"),u={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},d={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},s={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},v={disabled:{type:Boolean,default:!1}},c={label:{type:[String,Number],default:void 0}},f={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const h={tabindex:{type:[String,Number],default:0}},m={id:[String,Number]};l.bottom;const y={...{...m,name:{type:String,required:!0}},...h,...u,...d,...b,...v,...f,...p,...c,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};i.button,n.button,t.local;const g={...y,...p,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function S(t,l){const{group:a,isInGroup:i,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,i){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const o=e.toRef(a,t);return e.computed({get:()=>o.value,set(e){i&&i(`update:${t}`,e)}})}}}(r),{id:o,switch:u,indeterminate:d}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:o,propsSwitch:u,indeterminate:d,group:a,isInGroup:i,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function L(e,t,l){return k(e,t)}function k(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let i,n,o;if(l&&a){if(n=e.length,n!==t.length)return!1;for(i=n;0!=i--;)if(!k(e[i],t[i]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,v[i]))return!1;for(i=n;0!=i--;)if(o=v[i],!k(e[o],t[o]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function O(e){return Array.isArray(e)?e.filter((e=>
|
|
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).VvCheckbox=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const o=Symbol.for("volver"),r=Symbol.for("checkGroup"),u={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},d={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},s={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},v={disabled:{type:Boolean,default:!1}},c={label:{type:[String,Number],default:void 0}},f={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const h={tabindex:{type:[String,Number],default:0}},m={id:[String,Number]};l.bottom;const y={...{...m,name:{type:String,required:!0}},...h,...u,...d,...b,...v,...f,...p,...c,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};i.button,n.button,t.local;const g={...y,...p,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function S(t,l){const{group:a,isInGroup:i,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,i){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const o=e.toRef(a,t);return e.computed({get:()=>o.value,set(e){i&&i(`update:${t}`,e)}})}}}(r),{id:o,switch:u,indeterminate:d}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:o,propsSwitch:u,indeterminate:d,group:a,isInGroup:i,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function L(e,t,l){return k(e,t)}function k(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let i,n,o;if(l&&a){if(n=e.length,n!==t.length)return!1;for(i=n;0!=i--;)if(!k(e[i],t[i]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,v[i]))return!1;for(i=n;0!=i--;)if(o=v[i],!k(e[o],t[o]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function O(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).join(" "):e}function V(t,l,a){const i=e.inject(o,void 0),n=e.computed((()=>{var e;if(i&&(null==(e=i.defaults.value)?void 0:e[t]))return i.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,i=a;return Object.keys(t).reduce(((l,a)=>{const n=i[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const i=t[a];if(i.length){i[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let i=t[a].default;"function"==typeof i&&(i=i()),"object"==typeof i?JSON.stringify(i)===JSON.stringify(n)&&(l[a]=e[a]):i===n&&(l[a]=e[a])}}return l}),{})}))}const x=["for"],A=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:g,emits:["click","update:modelValue","change","blur"],setup(t,{emit:l}){const a=t,i=l,n=e.useSlots(),o=V("VvCheckbox",g,a),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:p,isInGroup:b}=S(a,i),h=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(r),m=e.computed((()=>`${h.value}-hint`)),y=e.computed((()=>B.value?-1:a.tabindex)),k=e.ref(),$=e.computed((()=>void 0!==a.uncheckedValue&&!b.value)),B=e.computed((()=>u.value||d.value)),N=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),w=e.computed((()=>$.value?f.value===a.value:Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(L(e,l))return!0;return!1}(a.value,f.value):L(a.value,f.value))),j=e.computed((()=>!!p.value||!(w.value||!$.value||a.uncheckedValue===f.value))),R=e.computed((()=>{if(!$.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),C=e.computed({get:()=>w.value,set(e){if($.value)f.value=e?a.value:a.uncheckedValue;else if(Array.isArray(f.value)||b.value){const t=f.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(a.value):l.delete(a.value),f.value=[...l]}else f.value=e?a.value:void 0;i("change",e)}}),{modifiers:I}=e.toRefs(a),P=function(t,l,a){return e.computed((()=>{const i={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(i[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{i[`${t}--${l}`]=e.unref(a.value[l])})),i}))}("vv-checkbox",I,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:p.value}))));e.watchEffect((()=>{$.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>j.value),(e=>{k.value.indeterminate=!!e})),e.onMounted((()=>{j.value&&(k.value.indeterminate=!0)}));const{HintSlot:E,hasHintLabelOrSlot:G,hasInvalidLabelOrSlot:H,hintSlotScope:T}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),i=e.computed((()=>O(a.value.invalidLabel))),n=e.computed((()=>O(a.value.validLabel))),o=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||o.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(l.invalid||i.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.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:i,validLabel:n,loadingLabel:o,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,i,n,o,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(a=this.$slots).invalid)?void 0:i.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(n=this.$slots).valid)?void 0:o.call(n))??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}}(o,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(P)),for:e.unref(h)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(h),ref_key:"input",ref:k,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(C)?C.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref(B),value:e.unref(R),tabindex:e.unref(y),"aria-invalid":e.unref(N),"aria-describedby":e.unref(G)?e.unref(m):void 0,"aria-errormessage":e.unref(H)?e.unref(m):void 0},null,8,A),[[e.vModelCheckbox,e.unref(C)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(E),{id:e.unref(m),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"3"}:void 0]),1032,["id"])],10,x))}})}));
|
|
@@ -145,9 +145,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
145
145
|
valid: boolean;
|
|
146
146
|
validLabel: string | unknown[];
|
|
147
147
|
tabindex: string | number;
|
|
148
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
|
|
149
|
-
input: (typeof __VLS_nativeElements)["input"];
|
|
150
|
-
}, HTMLLabelElement>, {
|
|
148
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
151
149
|
default?: ((props: {
|
|
152
150
|
value: string | number | boolean | Record<string, any>;
|
|
153
151
|
}) => any) | undefined;
|
|
@@ -322,7 +322,7 @@ function contains(value, list) {
|
|
|
322
322
|
return false;
|
|
323
323
|
}
|
|
324
324
|
function isString(value) {
|
|
325
|
-
return typeof value === "string"
|
|
325
|
+
return typeof value === "string";
|
|
326
326
|
}
|
|
327
327
|
function joinLines(items) {
|
|
328
328
|
if (Array.isArray(items)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckboxGroup=t(e.vue,e.core,e.tsDotProp)}(this,(function(e,t,l){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});const u=Symbol.for("volver"),d=Symbol.for("checkGroup"),s={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},v={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},c={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},f={disabled:{type:Boolean,default:!1}},p={required:{type:Boolean,default:!1}},m={label:{type:[String,Number],default:void 0}},b={readonly:{type:Boolean,default:!1}},h={modifiers:{type:[String,Array],default:void 0}},y={hintLabel:{type:String,default:""}},g={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};n.before;const S={tabindex:{type:[String,Number],default:0}},k={id:[String,Number]};o.bottom;const L={...{...k,name:{type:String,required:!0}},...S,...s,...v,...y,...f,...b,...h,...m,...c,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},V={...s,...v,...g,...y,...f,...b,...h,...m,...c,...p,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}};i.button,r.button,a.local;const x=V;function O(e,t,l){return $(e,t)}function $(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let o,n,i;if(l&&a){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!$(e[o],t[o]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,v[o]))return!1;for(o=n;0!=o--;)if(i=v[o],!$(e[i],t[i]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function B(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function A(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),o=e.computed((()=>B(a.value.invalidLabel))),n=e.computed((()=>B(a.value.validLabel))),i=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(l.invalid||o.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.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:o,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,o,n,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(a=this.$slots).invalid)?void 0:o.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??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}}const C={...L,...h,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function N(t,l){const{group:a,isInGroup:o,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,o){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(a,t);return e.computed({get:()=>i.value,set(e){o&&o(`update:${t}`,e)}})}}}(d),{id:i,switch:r,indeterminate:u}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:i,propsSwitch:r,indeterminate:u,group:a,isInGroup:o,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function w(t,l,a){const o=e.inject(u,void 0),n=e.computed((()=>{var e;if(o&&(null==(e=o.defaults.value)?void 0:e[t]))return o.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const n=o[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let o=t[a].default;"function"==typeof o&&(o=o()),"object"==typeof o?JSON.stringify(o)===JSON.stringify(n)&&(l[a]=e[a]):o===n&&(l[a]=e[a])}}return l}),{})}))}function P(t,l,a){return e.computed((()=>{const o={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}const R=["for"],j=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],_=e.defineComponent({name:"VvCheckbox",props:C,emits:["click","update:modelValue","change","blur"],setup(t,{emit:l}){const a=t,o=l,n=e.useSlots(),i=w("VvCheckbox",C,a),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:p,isInGroup:m}=N(a,o),b=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(r),h=e.computed((()=>`${b.value}-hint`)),y=e.computed((()=>k.value?-1:a.tabindex)),g=e.ref(),S=e.computed((()=>void 0!==a.uncheckedValue&&!m.value)),k=e.computed((()=>u.value||d.value)),L=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),V=e.computed((()=>S.value?f.value===a.value:Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(O(e,l))return!0;return!1}(a.value,f.value):O(a.value,f.value))),x=e.computed((()=>!!p.value||!(V.value||!S.value||a.uncheckedValue===f.value))),$=e.computed((()=>{if(!S.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),B=e.computed({get:()=>V.value,set(e){if(S.value)f.value=e?a.value:a.uncheckedValue;else if(Array.isArray(f.value)||m.value){const t=f.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(a.value):l.delete(a.value),f.value=[...l]}else f.value=e?a.value:void 0;o("change",e)}}),{modifiers:_}=e.toRefs(a),z=P("vv-checkbox",_,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:p.value}))));e.watchEffect((()=>{S.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>x.value),(e=>{g.value.indeterminate=!!e})),e.onMounted((()=>{x.value&&(g.value.indeterminate=!0)}));const{HintSlot:E,hasHintLabelOrSlot:G,hasInvalidLabelOrSlot:q,hintSlotScope:I}=A(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(z)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:g,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(B)?B.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref(k),value:e.unref($),tabindex:e.unref(y),"aria-invalid":e.unref(L),"aria-describedby":e.unref(G)?e.unref(h):void 0,"aria-errormessage":e.unref(q)?e.unref(h):void 0},null,8,j),[[e.vModelCheckbox,e.unref(B)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(E),{id:e.unref(h),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"3"}:void 0]),1032,["id"])],10,R))}});const z=["textContent"],E={class:"vv-checkbox-group__wrapper"};return e.defineComponent({name:"VvCheckboxGroup",props:x,emits:["update:modelValue","change"],setup(a,{emit:o}){const n=a,i=o,r=e.useSlots(),u=w("VvCheckboxGroup",x,n),s=t.useVModel(n,"modelValue",i),{disabled:v,readonly:c,vertical:f,valid:p,invalid:m,modifiers:b}=e.toRefs(n);var h,y;h=d,y={modelValue:s,disabled:v,readonly:c,valid:p,invalid:m},e.provide(h,y);const{getOptionLabel:g,getOptionValue:S}=function(t){const{options:a,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:a,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof o.value?o.value(e):String(o.value?l.get(e,o.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof n.value?n.value(e):n.value?l.get(e,n.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof i.value?i.value(e):!!i.value&&l.get(e,i.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}(n),k=P("vv-checkbox-group",b,e.computed((()=>({disabled:v.value,readonly:c.value,required:n.required,horizontal:!f.value,valid:p.value,invalid:m.value}))));const{HintSlot:L,hintSlotScope:V}=A(u,r);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(k))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,z)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(_,e.mergeProps({key:l,ref_for:!0},function(e,t){return{id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:S(e),required:n.required}}(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(L),{class:"vv-checkbox-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"3"}:void 0]),1024)],2))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckboxGroup=t(e.vue,e.core,e.tsDotProp)}(this,(function(e,t,l){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});const u=Symbol.for("volver"),d=Symbol.for("checkGroup"),s={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},v={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},c={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},f={disabled:{type:Boolean,default:!1}},p={required:{type:Boolean,default:!1}},m={label:{type:[String,Number],default:void 0}},b={readonly:{type:Boolean,default:!1}},h={modifiers:{type:[String,Array],default:void 0}},y={hintLabel:{type:String,default:""}},g={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};n.before;const S={tabindex:{type:[String,Number],default:0}},k={id:[String,Number]};o.bottom;const L={...{...k,name:{type:String,required:!0}},...S,...s,...v,...y,...f,...b,...h,...m,...c,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},V={...s,...v,...g,...y,...f,...b,...h,...m,...c,...p,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}};i.button,r.button,a.local;const x=V;function O(e,t,l){return $(e,t)}function $(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let o,n,i;if(l&&a){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!$(e[o],t[o]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,v[o]))return!1;for(o=n;0!=o--;)if(i=v[o],!$(e[i],t[i]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function B(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).join(" "):e}function A(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),o=e.computed((()=>B(a.value.invalidLabel))),n=e.computed((()=>B(a.value.validLabel))),i=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(l.invalid||o.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.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:o,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,o,n,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(a=this.$slots).invalid)?void 0:o.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??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}}const C={...L,...h,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function N(t,l){const{group:a,isInGroup:o,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,o){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(a,t);return e.computed({get:()=>i.value,set(e){o&&o(`update:${t}`,e)}})}}}(d),{id:i,switch:r,indeterminate:u}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:i,propsSwitch:r,indeterminate:u,group:a,isInGroup:o,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function w(t,l,a){const o=e.inject(u,void 0),n=e.computed((()=>{var e;if(o&&(null==(e=o.defaults.value)?void 0:e[t]))return o.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const n=o[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let o=t[a].default;"function"==typeof o&&(o=o()),"object"==typeof o?JSON.stringify(o)===JSON.stringify(n)&&(l[a]=e[a]):o===n&&(l[a]=e[a])}}return l}),{})}))}function P(t,l,a){return e.computed((()=>{const o={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}const R=["for"],j=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],_=e.defineComponent({name:"VvCheckbox",props:C,emits:["click","update:modelValue","change","blur"],setup(t,{emit:l}){const a=t,o=l,n=e.useSlots(),i=w("VvCheckbox",C,a),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:p,isInGroup:m}=N(a,o),b=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(r),h=e.computed((()=>`${b.value}-hint`)),y=e.computed((()=>k.value?-1:a.tabindex)),g=e.ref(),S=e.computed((()=>void 0!==a.uncheckedValue&&!m.value)),k=e.computed((()=>u.value||d.value)),L=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),V=e.computed((()=>S.value?f.value===a.value:Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(O(e,l))return!0;return!1}(a.value,f.value):O(a.value,f.value))),x=e.computed((()=>!!p.value||!(V.value||!S.value||a.uncheckedValue===f.value))),$=e.computed((()=>{if(!S.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),B=e.computed({get:()=>V.value,set(e){if(S.value)f.value=e?a.value:a.uncheckedValue;else if(Array.isArray(f.value)||m.value){const t=f.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(a.value):l.delete(a.value),f.value=[...l]}else f.value=e?a.value:void 0;o("change",e)}}),{modifiers:_}=e.toRefs(a),z=P("vv-checkbox",_,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:p.value}))));e.watchEffect((()=>{S.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>x.value),(e=>{g.value.indeterminate=!!e})),e.onMounted((()=>{x.value&&(g.value.indeterminate=!0)}));const{HintSlot:E,hasHintLabelOrSlot:G,hasInvalidLabelOrSlot:q,hintSlotScope:I}=A(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(z)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:g,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(B)?B.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref(k),value:e.unref($),tabindex:e.unref(y),"aria-invalid":e.unref(L),"aria-describedby":e.unref(G)?e.unref(h):void 0,"aria-errormessage":e.unref(q)?e.unref(h):void 0},null,8,j),[[e.vModelCheckbox,e.unref(B)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(E),{id:e.unref(h),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(I))))])),key:"3"}:void 0]),1032,["id"])],10,R))}});const z=["textContent"],E={class:"vv-checkbox-group__wrapper"};return e.defineComponent({name:"VvCheckboxGroup",props:x,emits:["update:modelValue","change"],setup(a,{emit:o}){const n=a,i=o,r=e.useSlots(),u=w("VvCheckboxGroup",x,n),s=t.useVModel(n,"modelValue",i),{disabled:v,readonly:c,vertical:f,valid:p,invalid:m,modifiers:b}=e.toRefs(n);var h,y;h=d,y={modelValue:s,disabled:v,readonly:c,valid:p,invalid:m},e.provide(h,y);const{getOptionLabel:g,getOptionValue:S}=function(t){const{options:a,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:a,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof o.value?o.value(e):String(o.value?l.get(e,o.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof n.value?n.value(e):n.value?l.get(e,n.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof i.value?i.value(e):!!i.value&&l.get(e,i.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}(n),k=P("vv-checkbox-group",b,e.computed((()=>({disabled:v.value,readonly:c.value,required:n.required,horizontal:!f.value,valid:p.value,invalid:m.value}))));const{HintSlot:L,hintSlotScope:V}=A(u,r);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(k))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,z)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(_,e.mergeProps({key:l,ref_for:!0},function(e,t){return{id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:S(e),required:n.required}}(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(L),{class:"vv-checkbox-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(V))))])),key:"3"}:void 0]),1024)],2))}})}));
|
|
@@ -172,7 +172,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
172
172
|
labelKey: string | Function;
|
|
173
173
|
valueKey: string | Function;
|
|
174
174
|
disabledKey: string | Function;
|
|
175
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
175
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
176
176
|
default?: ((props: {}) => any) | undefined;
|
|
177
177
|
hint?: ((props: {
|
|
178
178
|
modelValue: unknown;
|
|
@@ -693,7 +693,7 @@ function contains(value, list) {
|
|
|
693
693
|
return false;
|
|
694
694
|
}
|
|
695
695
|
function isString(value) {
|
|
696
|
-
return typeof value === "string"
|
|
696
|
+
return typeof value === "string";
|
|
697
697
|
}
|
|
698
698
|
function joinLines(items) {
|
|
699
699
|
if (Array.isArray(items)) {
|
|
@@ -2413,7 +2413,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2413
2413
|
"icon-before": hasIconBefore.value !== void 0,
|
|
2414
2414
|
"icon-after": hasIconAfter.value !== void 0,
|
|
2415
2415
|
"dirty": isDirty.value,
|
|
2416
|
-
"focus": focused.value,
|
|
2416
|
+
"focus": focused.value && !isDisabledOrReadonly.value,
|
|
2417
2417
|
"floating": floating.value,
|
|
2418
2418
|
"multiple": multiple.value
|
|
2419
2419
|
}))
|
|
@@ -2780,7 +2780,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2780
2780
|
"valid": valid.value,
|
|
2781
2781
|
"invalid": invalid.value,
|
|
2782
2782
|
"dirty": isDirty.value,
|
|
2783
|
-
"focus": focused.value || focusedWithin.value || expanded.value,
|
|
2783
|
+
"focus": (focused.value || focusedWithin.value || expanded.value) && !isDisabledOrReadonly.value,
|
|
2784
2784
|
"floating": floating.value,
|
|
2785
2785
|
"badges": props.badges
|
|
2786
2786
|
}))
|
|
@@ -2855,9 +2855,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2855
2855
|
});
|
|
2856
2856
|
} else if (!isSelected && isSelectable.value) {
|
|
2857
2857
|
if (!props.multiple) {
|
|
2858
|
-
localModelValue.value = [];
|
|
2858
|
+
localModelValue.value = [optionValue];
|
|
2859
|
+
} else {
|
|
2860
|
+
localModelValue.value = [...localModelValue.value, optionValue];
|
|
2859
2861
|
}
|
|
2860
|
-
localModelValue.value = [...localModelValue.value, optionValue];
|
|
2861
2862
|
}
|
|
2862
2863
|
if (!props.multiple && !props.keepOpen) {
|
|
2863
2864
|
collapse();
|