@volverjs/ui-vue 0.0.10-beta.7 → 0.0.10-beta.8
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/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +0 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +10 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +52 -25
- package/dist/components/VvAction/VvAction.es.js +6 -1
- package/dist/components/VvAlert/VvAlert.es.js +73 -43
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +113 -64
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +56 -26
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +18 -8
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +61 -38
- package/dist/components/VvButton/VvButton.es.js +45 -17
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +3 -3
- package/dist/components/VvButton/index.d.ts +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +12 -6
- package/dist/components/VvCard/VvCard.es.js +26 -16
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +9 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +78 -44
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +587 -368
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +3 -3
- package/dist/components/VvCombobox/index.d.ts +1 -1
- package/dist/components/VvDialog/VvDialog.es.js +44 -27
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +64 -44
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +3 -3
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +26 -9
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +19 -8
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +126 -97
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvNav/VvNav.es.js +50 -26
- package/dist/components/VvNav/VvNav.vue.d.ts +3 -3
- package/dist/components/VvNav/index.d.ts +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +19 -7
- package/dist/components/VvProgress/VvProgress.es.js +12 -6
- package/dist/components/VvRadio/VvRadio.es.js +9 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +78 -44
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +133 -94
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/index.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +98 -44
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +99 -74
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +19 -9
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
- package/dist/components/VvTooltip/index.d.ts +1 -1
- package/dist/components/index.es.js +1355 -836
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +39 -23
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +37 -18
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/props/index.d.ts +1 -1
- package/dist/types/generic.d.ts +1 -1
- package/package.json +31 -31
- package/src/Volver.ts +0 -1
- 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/VvInputText/VvInputText.vue +2 -2
- package/src/directives/index.ts +1 -4
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/types/generic.ts +2 -1
|
@@ -373,10 +373,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
373
373
|
}), {
|
|
374
374
|
default: withCtx(() => [
|
|
375
375
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
376
|
-
createTextVNode(
|
|
376
|
+
createTextVNode(
|
|
377
|
+
toDisplayString(_ctx.label),
|
|
378
|
+
1
|
|
379
|
+
/* TEXT */
|
|
380
|
+
)
|
|
377
381
|
])
|
|
378
382
|
]),
|
|
379
383
|
_: 3
|
|
384
|
+
/* FORWARDED */
|
|
380
385
|
}, 16, ["class"]);
|
|
381
386
|
};
|
|
382
387
|
}
|
|
@@ -394,12 +399,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
394
399
|
setup(__props) {
|
|
395
400
|
return (_ctx, _cache) => {
|
|
396
401
|
return openBlock(), createElementBlock("li", _hoisted_1$1, [
|
|
397
|
-
createVNode(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
402
|
+
createVNode(
|
|
403
|
+
_sfc_main$2,
|
|
404
|
+
mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }),
|
|
405
|
+
{
|
|
406
|
+
default: withCtx(() => [
|
|
407
|
+
renderSlot(_ctx.$slots, "default")
|
|
408
|
+
]),
|
|
409
|
+
_: 3
|
|
410
|
+
/* FORWARDED */
|
|
411
|
+
},
|
|
412
|
+
16
|
|
413
|
+
/* FULL_PROPS */
|
|
414
|
+
)
|
|
403
415
|
]);
|
|
404
416
|
};
|
|
405
417
|
}
|
|
@@ -449,25 +461,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
449
461
|
};
|
|
450
462
|
const bemCssClasses = useModifiers("vv-nav", modifiers);
|
|
451
463
|
return (_ctx, _cache) => {
|
|
452
|
-
return openBlock(), createElementBlock(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
"
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
464
|
+
return openBlock(), createElementBlock(
|
|
465
|
+
"nav",
|
|
466
|
+
{
|
|
467
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
468
|
+
},
|
|
469
|
+
[
|
|
470
|
+
createElementVNode("ul", {
|
|
471
|
+
class: "vv-nav__menu",
|
|
472
|
+
role: "menu",
|
|
473
|
+
"aria-busy": "true",
|
|
474
|
+
onClick: withModifiers(onClick, ["stop"])
|
|
475
|
+
}, [
|
|
476
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
477
|
+
(openBlock(true), createElementBlock(
|
|
478
|
+
Fragment,
|
|
479
|
+
null,
|
|
480
|
+
renderList(_ctx.items, ({ on = {}, ...item }, index) => {
|
|
481
|
+
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
482
|
+
key: index,
|
|
483
|
+
"data-index": index
|
|
484
|
+
}, item, toHandlers(on)), null, 16, ["data-index"]);
|
|
485
|
+
}),
|
|
486
|
+
128
|
|
487
|
+
/* KEYED_FRAGMENT */
|
|
488
|
+
))
|
|
489
|
+
])
|
|
490
|
+
], 8, _hoisted_1)
|
|
491
|
+
],
|
|
492
|
+
2
|
|
493
|
+
/* CLASS */
|
|
494
|
+
);
|
|
471
495
|
};
|
|
472
496
|
}
|
|
473
497
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
items: {
|
|
3
|
-
type: globalThis.PropType<import("
|
|
3
|
+
type: globalThis.PropType<import("../..").NavItem[]>;
|
|
4
4
|
default: () => never[];
|
|
5
5
|
};
|
|
6
6
|
modifiers: globalThis.PropType<string | string[]>;
|
|
@@ -8,12 +8,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
8
8
|
[x: string]: (...args: any[]) => void;
|
|
9
9
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
10
|
items: {
|
|
11
|
-
type: globalThis.PropType<import("
|
|
11
|
+
type: globalThis.PropType<import("../..").NavItem[]>;
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
14
|
modifiers: globalThis.PropType<string | string[]>;
|
|
15
15
|
}>>, {
|
|
16
|
-
items: import("
|
|
16
|
+
items: import("../..").NavItem[];
|
|
17
17
|
}, {}>, {
|
|
18
18
|
default?(_: {}): any;
|
|
19
19
|
}>;
|
|
@@ -356,10 +356,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
356
356
|
}), {
|
|
357
357
|
default: withCtx(() => [
|
|
358
358
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
359
|
-
createTextVNode(
|
|
359
|
+
createTextVNode(
|
|
360
|
+
toDisplayString(_ctx.label),
|
|
361
|
+
1
|
|
362
|
+
/* TEXT */
|
|
363
|
+
)
|
|
360
364
|
])
|
|
361
365
|
]),
|
|
362
366
|
_: 3
|
|
367
|
+
/* FORWARDED */
|
|
363
368
|
}, 16, ["class"]);
|
|
364
369
|
};
|
|
365
370
|
}
|
|
@@ -377,12 +382,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
377
382
|
setup(__props) {
|
|
378
383
|
return (_ctx, _cache) => {
|
|
379
384
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
380
|
-
createVNode(
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
385
|
+
createVNode(
|
|
386
|
+
_sfc_main$1,
|
|
387
|
+
mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }),
|
|
388
|
+
{
|
|
389
|
+
default: withCtx(() => [
|
|
390
|
+
renderSlot(_ctx.$slots, "default")
|
|
391
|
+
]),
|
|
392
|
+
_: 3
|
|
393
|
+
/* FORWARDED */
|
|
394
|
+
},
|
|
395
|
+
16
|
|
396
|
+
/* FULL_PROPS */
|
|
397
|
+
)
|
|
386
398
|
]);
|
|
387
399
|
};
|
|
388
400
|
}
|
|
@@ -303,12 +303,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
303
303
|
computed(() => ({ indeterminate: indeterminate.value }))
|
|
304
304
|
);
|
|
305
305
|
return (_ctx, _cache) => {
|
|
306
|
-
return openBlock(), createElementBlock(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
return openBlock(), createElementBlock(
|
|
307
|
+
"progress",
|
|
308
|
+
mergeProps({ role: "progressbar" }, {
|
|
309
|
+
class: unref(bemCssClasses),
|
|
310
|
+
ariaLabel: unref(ariaLabel),
|
|
311
|
+
max: unref(max),
|
|
312
|
+
value: unref(value)
|
|
313
|
+
}),
|
|
314
|
+
null,
|
|
315
|
+
16
|
|
316
|
+
/* FULL_PROPS */
|
|
317
|
+
);
|
|
312
318
|
};
|
|
313
319
|
}
|
|
314
320
|
});
|
|
@@ -761,12 +761,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
761
761
|
[vModelRadio, unref(localModelValue)]
|
|
762
762
|
]),
|
|
763
763
|
renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
|
|
764
|
-
createTextVNode(
|
|
764
|
+
createTextVNode(
|
|
765
|
+
toDisplayString(_ctx.label),
|
|
766
|
+
1
|
|
767
|
+
/* TEXT */
|
|
768
|
+
)
|
|
765
769
|
]),
|
|
766
770
|
createVNode(unref(HintSlot), {
|
|
767
771
|
id: unref(hasHintId),
|
|
768
772
|
class: "vv-radio__hint"
|
|
769
|
-
}, createSlots({
|
|
773
|
+
}, createSlots({
|
|
774
|
+
_: 2
|
|
775
|
+
/* DYNAMIC */
|
|
776
|
+
}, [
|
|
770
777
|
_ctx.$slots.hint ? {
|
|
771
778
|
name: "hint",
|
|
772
779
|
fn: withCtx(() => [
|
|
@@ -807,12 +807,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
807
807
|
[vModelRadio, unref(localModelValue)]
|
|
808
808
|
]),
|
|
809
809
|
renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
|
|
810
|
-
createTextVNode(
|
|
810
|
+
createTextVNode(
|
|
811
|
+
toDisplayString(_ctx.label),
|
|
812
|
+
1
|
|
813
|
+
/* TEXT */
|
|
814
|
+
)
|
|
811
815
|
]),
|
|
812
816
|
createVNode(unref(HintSlot), {
|
|
813
817
|
id: unref(hasHintId),
|
|
814
818
|
class: "vv-radio__hint"
|
|
815
|
-
}, createSlots({
|
|
819
|
+
}, createSlots({
|
|
820
|
+
_: 2
|
|
821
|
+
/* DYNAMIC */
|
|
822
|
+
}, [
|
|
816
823
|
_ctx.$slots.hint ? {
|
|
817
824
|
name: "hint",
|
|
818
825
|
fn: withCtx(() => [
|
|
@@ -939,49 +946,76 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
939
946
|
};
|
|
940
947
|
const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
|
|
941
948
|
return (_ctx, _cache) => {
|
|
942
|
-
return openBlock(), createElementBlock(
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
key:
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
949
|
+
return openBlock(), createElementBlock(
|
|
950
|
+
"fieldset",
|
|
951
|
+
{
|
|
952
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
953
|
+
},
|
|
954
|
+
[
|
|
955
|
+
_ctx.label ? (openBlock(), createElementBlock("legend", {
|
|
956
|
+
key: 0,
|
|
957
|
+
textContent: toDisplayString(_ctx.label)
|
|
958
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
959
|
+
createElementVNode("div", _hoisted_2, [
|
|
960
|
+
_ctx.options.length > 0 ? (openBlock(true), createElementBlock(
|
|
961
|
+
Fragment,
|
|
962
|
+
{ key: 0 },
|
|
963
|
+
renderList(_ctx.options, (option, index) => {
|
|
964
|
+
return openBlock(), createBlock(
|
|
965
|
+
_sfc_main$1,
|
|
966
|
+
mergeProps({ key: index }, getOptionProps(option, index)),
|
|
967
|
+
null,
|
|
968
|
+
16
|
|
969
|
+
/* FULL_PROPS */
|
|
970
|
+
);
|
|
971
|
+
}),
|
|
972
|
+
128
|
|
973
|
+
/* KEYED_FRAGMENT */
|
|
974
|
+
)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
975
|
+
]),
|
|
976
|
+
createVNode(
|
|
977
|
+
unref(HintSlot),
|
|
978
|
+
{ class: "vv-radio-group__hint" },
|
|
979
|
+
createSlots({
|
|
980
|
+
_: 2
|
|
981
|
+
/* DYNAMIC */
|
|
982
|
+
}, [
|
|
983
|
+
_ctx.$slots.hint ? {
|
|
984
|
+
name: "hint",
|
|
985
|
+
fn: withCtx(() => [
|
|
986
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
987
|
+
]),
|
|
988
|
+
key: "0"
|
|
989
|
+
} : void 0,
|
|
990
|
+
_ctx.$slots.loading ? {
|
|
991
|
+
name: "loading",
|
|
992
|
+
fn: withCtx(() => [
|
|
993
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
994
|
+
]),
|
|
995
|
+
key: "1"
|
|
996
|
+
} : void 0,
|
|
997
|
+
_ctx.$slots.valid ? {
|
|
998
|
+
name: "valid",
|
|
999
|
+
fn: withCtx(() => [
|
|
1000
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1001
|
+
]),
|
|
1002
|
+
key: "2"
|
|
1003
|
+
} : void 0,
|
|
1004
|
+
_ctx.$slots.invalid ? {
|
|
1005
|
+
name: "invalid",
|
|
1006
|
+
fn: withCtx(() => [
|
|
1007
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1008
|
+
]),
|
|
1009
|
+
key: "3"
|
|
1010
|
+
} : void 0
|
|
980
1011
|
]),
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1012
|
+
1024
|
|
1013
|
+
/* DYNAMIC_SLOTS */
|
|
1014
|
+
)
|
|
1015
|
+
],
|
|
1016
|
+
2
|
|
1017
|
+
/* CLASS */
|
|
1018
|
+
);
|
|
985
1019
|
};
|
|
986
1020
|
}
|
|
987
1021
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","uid","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=t(e.vue,e.uid,e.core,e.tsDotProp)}(this,(function(e,t,l,o){"use strict";var a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{});const r=Symbol.for("volver"),u=Symbol.for("radioGroup");function d(e,t,l){return l?v(e,l)===v(t,l):s(e,t)}function s(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,i;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!s(e[a],t[a]))return!1;return!0}if(l!=o)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,v=t instanceof RegExp;if(d!=v)return!1;if(d&&v)return e.toString()==t.toString();const f=Object.keys(e);if(n=f.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,f[a]))return!1;for(a=n;0!=a--;)if(i=f[a],!s(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function v(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function f(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function c(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>f(o.value.invalidLabel))),n=e.computed((()=>f(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.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)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,o,a,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==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:p,HintSlot:m}}const p={valid:Boolean,validLabel:[String,Array]},m={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},y=(Boolean,Boolean,Boolean,{label:[String,Number]}),h={readonly:Boolean},S={modifiers:[String,Array]},L={hintLabel:{type:String,default:""}},O={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 B={tabindex:{type:[String,Number],default:0}},k={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const V={...{...k,name:{type:String,required:!0}},...B,...p,...m,...L,...g,...h,...S,...y,...b,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},$={...p,...m,...O,...L,...g,...h,...S,...y,...b,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};function R(t){const l=e.inject(t,void 0),o=e.computed((()=>{return t=l,!(null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var t,o}));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}i.button;const j=V;function A(t,l,o){const a=e.inject(r),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function x(t,l,o){return e.computed((()=>{const a={[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&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const P=["for"],C=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],N=e.defineComponent({name:"VvRadio",props:j,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=e.useSlots(),i=A("VvRadio",j,a),{id:r,disabled:s,readonly:v,modelValue:f,valid:p,invalid:m}=function(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=R(u),r=i("modelValue",t,l),d=i("valid",t),s=i("invalid",t),v=e.computed((()=>{var e;return Boolean(t.readonly||(null==(e=null==a?void 0:a.value)?void 0:e.readonly.value))})),f=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:o,group:a,isInGroup:n,modelValue:r,valid:d,invalid:s,readonly:v,disabled:f}}(a,o),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(r),g=e.computed((()=>`${b.value}-hint`)),y=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),S=e.computed((()=>s.value||v.value)),L=e.computed((()=>!0===m.value||!0!==p.value&&void 0)),O=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(d(e,l))return!0;return!1}(a.value,f.value):d(a.value,f.value))),B=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),k=e.computed({get:()=>O.value?B.value:null,set(e){Array.isArray(f.value)?f.value=[a.value]:f.value=a.value,o("change",e)}}),{modifiers:V}=e.toRefs(a),$=x("vv-radio",V,e.computed((()=>({valid:p.value,invalid:m.value,disabled:s.value,readonly:v.value})))),{HintSlot:N,hasHintLabelOrSlot:w,hasInvalidLabelOrSlot:_,hintSlotScope:z}=c(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref($)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(k)?k.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(S),value:e.unref(B),tabindex:e.unref(y),"aria-invalid":e.unref(L),"aria-describedby":e.unref(w)?e.unref(g):void 0,"aria-errormessage":e.unref(_)?e.unref(g):void 0},null,8,C),[[e.vModelRadio,e.unref(k)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(N),{id:e.unref(g),class:"vv-radio__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"3"}:void 0]),1032,["id"])],10,P))}}),w=$;const _=["textContent"],z={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:w,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=e.useSlots(),r=A("VvRadioGroup",w,n),d=l.useVModel(n,"modelValue",a),{disabled:s,readonly:v,vertical:f,valid:p,invalid:m,modifiers:b}=e.toRefs(n);!function(t){if(Object.keys(t).some((l=>"key"!==l&&!e.isRef(t[l]))))throw Error("One or more groupState props aren't ref.");e.provide(t.key,e.computed((()=>t)))}({key:u,modelValue:d,disabled:s,readonly:v,valid:p,invalid:m});const{getOptionLabel:g,getOptionValue:y}=function(t){const{options:l,labelKey:a,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof a.value?a.value(e):o.get(e,a.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):o.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):o.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(n),h=x("vv-radio-group",b,e.computed((()=>({disabled:s.value,readonly:v.value,horizontal:!f.value,valid:p.value,invalid:m.value})))),{HintSlot:S,hintSlotScope:L}=c(r,i);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(h))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,_)):e.createCommentVNode("",!0),e.createElementVNode("div",z,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(N,e.mergeProps({key:l},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:y(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(S),{class:"vv-radio-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"3"}:void 0]),1024)],2))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","uid","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=t(e.vue,e.uid,e.core,e.tsDotProp)}(this,(function(e,t,l,o){"use strict";var a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{});const r=Symbol.for("volver"),u=Symbol.for("radioGroup");function d(e,t,l){return l?v(e,l)===v(t,l):s(e,t)}function s(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,i;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!s(e[a],t[a]))return!1;return!0}if(l!=o)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,v=t instanceof RegExp;if(d!=v)return!1;if(d&&v)return e.toString()==t.toString();const f=Object.keys(e);if(n=f.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,f[a]))return!1;for(a=n;0!=a--;)if(i=f[a],!s(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function v(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function f(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function c(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>f(o.value.invalidLabel))),n=e.computed((()=>f(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.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)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,o,a,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==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:p,HintSlot:m}}const p={valid:Boolean,validLabel:[String,Array]},m={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},y=(Boolean,Boolean,Boolean,{label:[String,Number]}),h={readonly:Boolean},S={modifiers:[String,Array]},L={hintLabel:{type:String,default:""}},O={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 B={tabindex:{type:[String,Number],default:0}},k={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const V={...{...k,name:{type:String,required:!0}},...B,...p,...m,...L,...g,...h,...S,...y,...b,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},$={...p,...m,...O,...L,...g,...h,...S,...y,...b,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};function R(t){const l=e.inject(t,void 0),o=e.computed((()=>{return t=l,!(null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var t,o}));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}i.button;const j=V;function A(t,l,o){const a=e.inject(r),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function x(t,l,o){return e.computed((()=>{const a={[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&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const P=["for"],C=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],N=e.defineComponent({name:"VvRadio",props:j,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=e.useSlots(),i=A("VvRadio",j,a),{id:r,disabled:s,readonly:v,modelValue:f,valid:p,invalid:m}=function(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=R(u),r=i("modelValue",t,l),d=i("valid",t),s=i("invalid",t),v=e.computed((()=>{var e;return Boolean(t.readonly||(null==(e=null==a?void 0:a.value)?void 0:e.readonly.value))})),f=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:o,group:a,isInGroup:n,modelValue:r,valid:d,invalid:s,readonly:v,disabled:f}}(a,o),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(r),g=e.computed((()=>`${b.value}-hint`)),y=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),S=e.computed((()=>s.value||v.value)),L=e.computed((()=>!0===m.value||!0!==p.value&&void 0)),O=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(d(e,l))return!0;return!1}(a.value,f.value):d(a.value,f.value))),B=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),k=e.computed({get:()=>O.value?B.value:null,set(e){Array.isArray(f.value)?f.value=[a.value]:f.value=a.value,o("change",e)}}),{modifiers:V}=e.toRefs(a),$=x("vv-radio",V,e.computed((()=>({valid:p.value,invalid:m.value,disabled:s.value,readonly:v.value})))),{HintSlot:N,hasHintLabelOrSlot:w,hasInvalidLabelOrSlot:_,hintSlotScope:z}=c(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref($)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(k)?k.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(S),value:e.unref(B),tabindex:e.unref(y),"aria-invalid":e.unref(L),"aria-describedby":e.unref(w)?e.unref(g):void 0,"aria-errormessage":e.unref(_)?e.unref(g):void 0},null,8,C),[[e.vModelRadio,e.unref(k)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(N),{id:e.unref(g),class:"vv-radio__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"3"}:void 0]),1032,["id"])],10,P))}}),w=$;const _=["textContent"],z={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:w,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=e.useSlots(),r=A("VvRadioGroup",w,n),d=l.useVModel(n,"modelValue",a),{disabled:s,readonly:v,vertical:f,valid:p,invalid:m,modifiers:b}=e.toRefs(n);!function(t){if(Object.keys(t).some((l=>"key"!==l&&!e.isRef(t[l]))))throw Error("One or more groupState props aren't ref.");e.provide(t.key,e.computed((()=>t)))}({key:u,modelValue:d,disabled:s,readonly:v,valid:p,invalid:m});const{getOptionLabel:g,getOptionValue:y}=function(t){const{options:l,labelKey:a,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof a.value?a.value(e):o.get(e,a.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):o.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):o.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(n),h=x("vv-radio-group",b,e.computed((()=>({disabled:s.value,readonly:v.value,horizontal:!f.value,valid:p.value,invalid:m.value})))),{HintSlot:S,hintSlotScope:L}=c(r,i);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(h))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,_)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",z,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(N,e.mergeProps({key:l},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:y(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(S),{class:"vv-radio-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"3"}:void 0]),1024)],2))}})}));
|
|
@@ -19,7 +19,7 @@ export declare const VvRadioGroupProps: {
|
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
21
|
options: {
|
|
22
|
-
type: globalThis.PropType<(string | import("
|
|
22
|
+
type: globalThis.PropType<(string | import("../..").Option)[]>;
|
|
23
23
|
default: () => never[];
|
|
24
24
|
};
|
|
25
25
|
labelKey: {
|