@volverjs/ui-vue 0.0.10-beta.23 → 0.0.10-beta.25

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.
Files changed (90) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +119 -79
  2. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +18 -4
  4. package/dist/components/VvAccordion/index.d.ts +4 -8
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +282 -124
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +34 -7
  8. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  9. package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
  11. package/dist/components/VvButton/VvButton.es.js +92 -98
  12. package/dist/components/VvButton/VvButton.umd.js +1 -1
  13. package/dist/components/VvButton/VvButton.vue.d.ts +7 -7
  14. package/dist/components/VvButton/index.d.ts +11 -11
  15. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -13
  16. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  17. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +3 -3
  18. package/dist/components/VvCheckbox/VvCheckbox.es.js +81 -87
  19. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  20. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +6 -6
  21. package/dist/components/VvCheckbox/index.d.ts +2 -2
  22. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +15 -29
  23. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  24. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +5 -5
  25. package/dist/components/VvCombobox/VvCombobox.es.js +13 -16
  26. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  27. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +11 -11
  28. package/dist/components/VvCombobox/index.d.ts +1 -1
  29. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +5 -5
  30. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
  31. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
  32. package/dist/components/VvDropdown/index.d.ts +1 -1
  33. package/dist/components/VvInputFile/VvInputFile.es.js +183 -168
  34. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  35. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +16 -9
  36. package/dist/components/VvInputFile/index.d.ts +12 -3
  37. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  38. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  39. package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
  40. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  41. package/dist/components/VvRadio/VvRadio.es.js +64 -70
  42. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  43. package/dist/components/VvRadio/VvRadio.vue.d.ts +6 -6
  44. package/dist/components/VvRadio/index.d.ts +6 -6
  45. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +15 -29
  46. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  47. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +5 -5
  48. package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
  49. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +5 -5
  50. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
  51. package/dist/components/VvTooltip/index.d.ts +1 -1
  52. package/dist/components/index.es.js +494 -328
  53. package/dist/components/index.umd.js +1 -1
  54. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  55. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  56. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  57. package/dist/constants.d.ts +6 -10
  58. package/dist/icons.es.js +3 -3
  59. package/dist/icons.umd.js +1 -1
  60. package/dist/index.es.js +3 -2
  61. package/dist/index.umd.js +1 -1
  62. package/dist/props/index.d.ts +1 -1
  63. package/dist/resolvers/unplugin.es.js +3 -2
  64. package/dist/resolvers/unplugin.umd.js +1 -1
  65. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +58 -15
  66. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +381 -107
  67. package/dist/types/group.d.ts +37 -15
  68. package/package.json +37 -36
  69. package/src/assets/icons/detailed.json +1 -1
  70. package/src/assets/icons/normal.json +1 -1
  71. package/src/assets/icons/simple.json +1 -1
  72. package/src/components/VvAccordion/VvAccordion.vue +119 -56
  73. package/src/components/VvAccordion/index.ts +8 -23
  74. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -42
  75. package/src/components/VvAccordionGroup/index.ts +4 -1
  76. package/src/components/VvButton/index.ts +7 -12
  77. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  78. package/src/components/VvCheckbox/index.ts +2 -2
  79. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  80. package/src/components/VvInputFile/VvInputFile.vue +71 -47
  81. package/src/components/VvInputFile/index.ts +5 -4
  82. package/src/components/VvRadio/index.ts +5 -5
  83. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  84. package/src/composables/group/useInjectedGroupState.ts +20 -16
  85. package/src/composables/group/useProvideGroupState.ts +10 -15
  86. package/src/constants.ts +19 -14
  87. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  88. package/src/stories/AccordionGroup/AccordionGroup.test.ts +16 -10
  89. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  90. package/src/types/group.ts +22 -14
@@ -24,8 +24,7 @@ export declare const VvInputFileProps: {
24
24
  url: string;
25
25
  thumbnailUrl?: string | undefined;
26
26
  lastModified?: number | undefined;
27
- } | File)[] | undefined>;
28
- required: boolean;
27
+ } | File)[]>;
29
28
  };
30
29
  /**
31
30
  * Whether to show progress bar
@@ -82,6 +81,13 @@ export declare const VvInputFileProps: {
82
81
  type: BooleanConstructor;
83
82
  default: boolean;
84
83
  };
84
+ /**
85
+ * Enable sorting
86
+ */
87
+ sortable: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
85
91
  /**
86
92
  * Label for add button
87
93
  */
@@ -174,7 +180,10 @@ export declare const VvInputFileProps: {
174
180
  valid: {
175
181
  type: BooleanConstructor;
176
182
  default: boolean;
177
- };
183
+ }; /**
184
+ * Whether to allow multiple values
185
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
186
+ */
178
187
  validLabel: {
179
188
  type: (ArrayConstructor | StringConstructor)[];
180
189
  default: undefined;
@@ -31,8 +31,8 @@ declare const _default: import("vue").DefineComponent<{
31
31
  }>> & {
32
32
  onClear?: ((...args: any[]) => any) | undefined;
33
33
  }, {
34
- disabled: boolean;
35
34
  label: string;
35
+ disabled: boolean;
36
36
  icon: string | VvIconProps;
37
37
  }, {}>;
38
38
  export default _default;
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
31
31
  "onStep-up"?: ((...args: any[]) => any) | undefined;
32
32
  "onStep-down"?: ((...args: any[]) => any) | undefined;
33
33
  }, {
34
- disabled: boolean;
35
34
  mode: string;
35
+ disabled: boolean;
36
36
  }, {}>;
37
37
  export default _default;
@@ -341,22 +341,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
341
341
  };
342
342
  id: (StringConstructor | NumberConstructor)[];
343
343
  }>>, {
344
- readonly: boolean;
345
- disabled: boolean;
346
- valid: boolean;
347
- invalid: boolean;
348
- multiple: boolean;
349
- modifiers: string | string[];
350
344
  floating: boolean;
351
345
  label: string | number;
346
+ disabled: boolean;
347
+ modifiers: string | string[];
352
348
  type: import("../VvInputText").InputType;
353
349
  required: boolean;
354
350
  icon: string | import("../VvIcon").VvIconProps;
355
351
  iconPosition: "before" | "after";
356
352
  loading: boolean;
357
353
  loadingLabel: string;
354
+ multiple: boolean;
355
+ readonly: boolean;
358
356
  hintLabel: string;
357
+ invalid: boolean;
359
358
  invalidLabel: string | unknown[];
359
+ valid: boolean;
360
360
  validLabel: string | unknown[];
361
361
  tabindex: string | number;
362
362
  placeholder: string;
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
31
31
  default: undefined;
32
32
  };
33
33
  }>>, {
34
- modifiers: string | string[];
35
34
  value: string | number;
35
+ modifiers: string | string[];
36
36
  }, {}>;
37
37
  export default _default;
@@ -1,4 +1,4 @@
1
- import { unref, inject, computed, toRef, toRefs, isRef, defineComponent, h, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
1
+ import { inject, computed, toRef, toRefs, isRef, defineComponent, h, unref, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { uid } from "uid";
3
3
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
4
4
  Strategy2["absolute"] = "absolute";
@@ -49,7 +49,9 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
49
49
  return AnchorTarget2;
50
50
  })(AnchorTarget || {});
51
51
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
52
- const INJECTION_KEY_RADIO_GROUP = Symbol.for("radioGroup");
52
+ const INJECTION_KEY_RADIO_GROUP = Symbol.for(
53
+ "radioGroup"
54
+ );
53
55
  const LinkProps = {
54
56
  /**
55
57
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -375,6 +377,66 @@ const CheckboxRadioProps = {
375
377
  default: ActionTag.button
376
378
  }
377
379
  });
380
+ function useInjectedGroupState(groupKey) {
381
+ const group = inject(groupKey, void 0);
382
+ const isInGroup = computed(() => group !== void 0);
383
+ function getGroupOrLocalRef(propName, props, emit) {
384
+ const groupPropValue = group == null ? void 0 : group[propName];
385
+ if (groupPropValue) {
386
+ return computed({
387
+ get() {
388
+ return groupPropValue.value;
389
+ },
390
+ set(value) {
391
+ groupPropValue.value = value;
392
+ }
393
+ });
394
+ }
395
+ const propRef = toRef(props, propName);
396
+ return computed({
397
+ get() {
398
+ return propRef.value;
399
+ },
400
+ set(value) {
401
+ if (emit) {
402
+ emit(`update:${propName}`, value);
403
+ }
404
+ }
405
+ });
406
+ }
407
+ return {
408
+ group,
409
+ isInGroup,
410
+ getGroupOrLocalRef
411
+ };
412
+ }
413
+ const VvRadioProps = CheckboxRadioProps;
414
+ const VvRadioEvents = ["click", "update:modelValue", "change", "blur"];
415
+ function useGroupProps(props, emit) {
416
+ const { id } = toRefs(props);
417
+ const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_RADIO_GROUP);
418
+ const modelValue = getGroupOrLocalRef("modelValue", props, emit);
419
+ const valid = getGroupOrLocalRef("valid", props);
420
+ const invalid = getGroupOrLocalRef("invalid", props);
421
+ const readonly = computed(
422
+ () => Boolean(props.readonly || (group == null ? void 0 : group.readonly.value))
423
+ );
424
+ const disabled = computed(
425
+ () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
426
+ );
427
+ return {
428
+ // local props
429
+ id,
430
+ // global props
431
+ group,
432
+ isInGroup,
433
+ modelValue,
434
+ valid,
435
+ invalid,
436
+ readonly,
437
+ disabled
438
+ };
439
+ }
378
440
  function equals(obj1, obj2, field) {
379
441
  if (field) {
380
442
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
@@ -454,77 +516,9 @@ function contains(value, list) {
454
516
  }
455
517
  return false;
456
518
  }
457
- function isEmpty(value) {
458
- return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
459
- }
460
519
  function isString(value) {
461
520
  return typeof value === "string" || value instanceof String;
462
521
  }
463
- function useInjectedGroupState(groupKey) {
464
- const group = inject(groupKey, void 0);
465
- const isInGroup = computed(() => !isEmpty(group));
466
- function getGroupOrLocalRef(propName, props, emit) {
467
- if (group == null ? void 0 : group.value) {
468
- const groupPropValue = unref(group.value)[propName];
469
- return computed({
470
- get() {
471
- return groupPropValue == null ? void 0 : groupPropValue.value;
472
- },
473
- set(value) {
474
- groupPropValue.value = value;
475
- }
476
- });
477
- }
478
- const propRef = toRef(props, propName);
479
- return computed({
480
- get() {
481
- return propRef.value;
482
- },
483
- set(value) {
484
- if (emit)
485
- emit(`update:${propName}`, value);
486
- }
487
- });
488
- }
489
- return {
490
- group,
491
- isInGroup,
492
- getGroupOrLocalRef
493
- };
494
- }
495
- const VvRadioProps = CheckboxRadioProps;
496
- const VvRadioEvents = ["click", "update:modelValue", "change", "blur"];
497
- function useGroupProps(props, emit) {
498
- const { id } = toRefs(props);
499
- const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_RADIO_GROUP);
500
- const modelValue = getGroupOrLocalRef("modelValue", props, emit);
501
- const valid = getGroupOrLocalRef("valid", props);
502
- const invalid = getGroupOrLocalRef("invalid", props);
503
- const readonly = computed(
504
- () => {
505
- var _a;
506
- return Boolean(props.readonly || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.readonly.value));
507
- }
508
- );
509
- const disabled = computed(
510
- () => {
511
- var _a;
512
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
513
- }
514
- );
515
- return {
516
- // local props
517
- id,
518
- // global props
519
- group,
520
- isInGroup,
521
- modelValue,
522
- valid,
523
- invalid,
524
- readonly,
525
- disabled
526
- };
527
- }
528
522
  function joinLines(items) {
529
523
  if (Array.isArray(items)) {
530
524
  return items.filter((item) => isString(item)).join(" ");
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadio=t(e.vue,e.uid)}(this,(function(e,t){"use strict";var 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||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),o=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(o||{});const i=Symbol.for("volver"),r=Symbol.for("radioGroup"),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}},f=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),c={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const m={tabindex:{type:[String,Number],default:0}},g={id:[String,Number]};l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const h={...{...g,name:{type:String,required:!0}},...m,...u,...d,...b,...v,...c,...p,...f,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};function y(e,t,l){return l?L(e,l)===L(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),a=Array.isArray(t);let n,o,i;if(l&&a){if(o=e.length,o!=t.length)return!1;for(n=o;0!=n--;)if(!S(e[n],t[n]))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(o=v.length,o!==Object.keys(t).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,v[n]))return!1;for(n=o;0!=n--;)if(i=v[n],!S(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function L(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let a=e;for(let t=0,n=l.length;t<n;++t){if(null==e)return null;a=a[l[t]]}return a}}return null}function O(t){const l=e.inject(t,void 0),a=e.computed((()=>{return t=l,!(null==(a=e.unref(t))||""===a||Array.isArray(a)&&0===a.length||!(a instanceof Date)&&"object"==typeof a&&0===Object.keys(a).length);var t,a}));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,n){if(null==l?void 0:l.value){const a=e.unref(l.value)[t];return e.computed({get:()=>null==a?void 0:a.value,set(e){a.value=e}})}const o=e.toRef(a,t);return e.computed({get:()=>o.value,set(e){n&&n(`update:${t}`,e)}})}}}n.button,o.button;const B=h;function $(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function V(t,l,a){const n=e.inject(i),o=e.computed((()=>{var e;if(n&&(null==(e=n.defaults.value)?void 0:e[t]))return n.defaults.value[t]}));return e.computed((()=>{if(void 0===o.value)return a;const e=o.value,t=l,n=a;return Object.keys(t).reduce(((l,a)=>{const o=n[a];if(l[a]=o,a in e){if(Array.isArray(t[a])){const n=t[a];if(n.length){n[0]===o&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===o&&(l[a]=e[a])}if("object"==typeof t[a]){let n=t[a].default;"function"==typeof n&&(n=n()),"object"==typeof n?JSON.stringify(n)===JSON.stringify(o)&&(l[a]=e[a]):n===o&&(l[a]=e[a])}}return l}),{})}))}const A=["for"],k=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvRadio",props:B,emits:["click","update:modelValue","change","blur"],setup(l,{emit:a}){const n=l,o=a,i=e.useSlots(),u=V("VvRadio",B,n),{id:d,disabled:s,readonly:v,modelValue:f,valid:c,invalid:p}=function(t,l){const{id:a}=e.toRefs(t),{group:n,isInGroup:o,getGroupOrLocalRef:i}=O(r),u=i("modelValue",t,l),d=i("valid",t),s=i("invalid",t),v=e.computed((()=>{var e;return Boolean(t.readonly||(null==(e=null==n?void 0:n.value)?void 0:e.readonly.value))})),f=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==n?void 0:n.value)?void 0:e.disabled.value))}));return{id:a,group:n,isInGroup:o,modelValue:u,valid:d,invalid:s,readonly:v,disabled:f}}(n,o),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(d),m=e.computed((()=>`${b.value}-hint`)),g=e.computed((()=>S.value?-1:n.tabindex)),h=e.ref(),S=e.computed((()=>s.value||v.value)),L=e.computed((()=>!0===p.value||!0!==c.value&&void 0)),j=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(y(e,l))return!0;return!1}(n.value,f.value):y(n.value,f.value))),R=e.computed((()=>!["string","number","boolean"].includes(typeof n.value)||n.value)),x=e.computed({get:()=>j.value?R.value:null,set(e){Array.isArray(f.value)?f.value=[n.value]:f.value=n.value,o("change",e)}}),{modifiers:N}=e.toRefs(n),P=function(t,l,a){return e.computed((()=>{const n={[t]:!0},o="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return o&&Array.isArray(o)&&o.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{n[`${t}--${l}`]=e.unref(a.value[l])})),n}))}("vv-radio",N,e.computed((()=>({valid:c.value,invalid:p.value,disabled:s.value,readonly:v.value})))),{HintSlot:I,hasHintLabelOrSlot:C,hasInvalidLabelOrSlot:w,hintSlotScope:E}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),n=e.computed((()=>$(a.value.invalidLabel))),o=e.computed((()=>$(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||n.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||o.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),f=e.computed((()=>d.value||s.value||u.value||v.value)),c=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:f,invalidLabel:n,validLabel:o,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,n,o,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(n=(a=this.$slots).invalid)?void 0:n.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(o=this.$slots).valid)?void 0:i.call(o))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:c,HintSlot:p}}(u,i);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(P)),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(x)?x.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(S),value:e.unref(R),tabindex:e.unref(g),"aria-invalid":e.unref(L),"aria-describedby":e.unref(C)?e.unref(m):void 0,"aria-errormessage":e.unref(w)?e.unref(m):void 0},null,8,k),[[e.vModelRadio,e.unref(x)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(I),{id:e.unref(m),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(E))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"3"}:void 0]),1032,["id"])],10,A))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadio=t(e.vue,e.uid)}(this,(function(e,t){"use strict";var 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||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),i=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(i||{});const n=Symbol.for("volver"),r=Symbol.for("radioGroup"),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}},f=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),c={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const m={tabindex:{type:[String,Number],default:0}},g={id:[String,Number]};l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const h={...{...g,name:{type:String,required:!0}},...m,...u,...d,...b,...v,...c,...p,...f,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};o.button,i.button;const y=h;function S(t,l){const{id:a}=e.toRefs(t),{group:o,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,o){const i=null==l?void 0:l[t];if(i)return e.computed({get:()=>i.value,set(e){i.value=e}});const n=e.toRef(a,t);return e.computed({get:()=>n.value,set(e){o&&o(`update:${t}`,e)}})}}}(r),u=n("modelValue",t,l),d=n("valid",t),s=n("invalid",t),v=e.computed((()=>Boolean(t.readonly||(null==o?void 0:o.readonly.value)))),f=e.computed((()=>Boolean(t.disabled||(null==o?void 0:o.disabled.value))));return{id:a,group:o,isInGroup:i,modelValue:u,valid:d,invalid:s,readonly:v,disabled:f}}function L(e,t,l){return l?B(e,l)===B(t,l):O(e,t)}function O(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,i,n;if(l&&a){if(i=e.length,i!=t.length)return!1;for(o=i;0!=o--;)if(!O(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(i=v.length,i!==Object.keys(t).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,v[o]))return!1;for(o=i;0!=o--;)if(n=v[o],!O(e[n],t[n]))return!1;return!0}return e!=e&&t!=t}function B(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let a=e;for(let t=0,o=l.length;t<o;++t){if(null==e)return null;a=a[l[t]]}return a}}return null}function $(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function V(t,l,a){const o=e.inject(n),i=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===i.value)return a;const e=i.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const i=o[a];if(l[a]=i,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===i&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===i&&(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(i)&&(l[a]=e[a]):o===i&&(l[a]=e[a])}}return l}),{})}))}const k=["for"],A=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvRadio",props:y,emits:["click","update:modelValue","change","blur"],setup(l,{emit:a}){const o=l,i=a,n=e.useSlots(),r=V("VvRadio",y,o),{id:u,disabled:d,readonly:s,modelValue:v,valid:f,invalid:c}=S(o,i),p=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(u),b=e.computed((()=>`${p.value}-hint`)),m=e.computed((()=>h.value?-1:o.tabindex)),g=e.ref(),h=e.computed((()=>d.value||s.value)),O=e.computed((()=>!0===c.value||!0!==f.value&&void 0)),B=e.computed((()=>Array.isArray(v.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(L(e,l))return!0;return!1}(o.value,v.value):L(o.value,v.value))),R=e.computed((()=>!["string","number","boolean"].includes(typeof o.value)||o.value)),x=e.computed({get:()=>B.value?R.value:null,set(e){Array.isArray(v.value)?v.value=[o.value]:v.value=o.value,i("change",e)}}),{modifiers:j}=e.toRefs(o),N=function(t,l,a){return e.computed((()=>{const o={[t]:!0},i="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return i&&Array.isArray(i)&&i.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}("vv-radio",j,e.computed((()=>({valid:f.value,invalid:c.value,disabled:d.value,readonly:s.value})))),{HintSlot:P,hasHintLabelOrSlot:I,hasInvalidLabelOrSlot:C,hintSlotScope:w}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),o=e.computed((()=>$(a.value.invalidLabel))),i=e.computed((()=>$(a.value.validLabel))),n=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||n.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||i.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),f=e.computed((()=>d.value||s.value||u.value||v.value)),c=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:f,invalidLabel:o,validLabel:i,loadingLabel:n,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,o,i,n,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==(n=(i=this.$slots).valid)?void 0:n.call(i))??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:c,HintSlot:p}}(r,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(N)),for:e.unref(p)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(p),ref_key:"input",ref:g,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(x)?x.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(h),value:e.unref(R),tabindex:e.unref(m),"aria-invalid":e.unref(O),"aria-describedby":e.unref(I)?e.unref(b):void 0,"aria-errormessage":e.unref(C)?e.unref(b):void 0},null,8,A),[[e.vModelRadio,e.unref(x)]]),e.renderSlot(t.$slots,"default",{value:e.unref(v)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(P),{id:e.unref(b),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(w))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"3"}:void 0]),1032,["id"])],10,k))}})}));
@@ -125,23 +125,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
125
125
  };
126
126
  id: (StringConstructor | NumberConstructor)[];
127
127
  }>>, {
128
- readonly: boolean;
128
+ label: string | number;
129
+ value: string | number | boolean;
129
130
  disabled: boolean;
130
- valid: boolean;
131
- invalid: boolean;
132
131
  modelValue: string | number | boolean | Record<string, any>;
133
132
  modifiers: string | string[];
134
- label: string | number;
135
- value: string | number | boolean;
136
133
  loading: boolean;
137
134
  loadingLabel: string;
135
+ readonly: boolean;
138
136
  hintLabel: string;
137
+ invalid: boolean;
139
138
  invalidLabel: string | unknown[];
139
+ valid: boolean;
140
140
  validLabel: string | unknown[];
141
141
  tabindex: string | number;
142
142
  }, {}>, {
143
143
  default?(_: {
144
- value: any;
144
+ value: unknown;
145
145
  }): any;
146
146
  hint?(_: {
147
147
  modelValue: unknown;
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, Ref } from 'vue';
1
+ import type { ExtractPropTypes } from 'vue';
2
2
  import type { InputGroupState } from '../../types/group';
3
3
  export declare const VvRadioProps: {
4
4
  value: {
@@ -69,12 +69,12 @@ export type VvRadioPropsType = ExtractPropTypes<typeof VvRadioProps>;
69
69
  * Merges local and group props
70
70
  */
71
71
  export declare function useGroupProps(props: VvRadioPropsType, emit: (event: (typeof VvRadioEvents)[number], value: unknown) => void): {
72
- id: Ref<string | number | undefined> | undefined;
73
- group: Ref<InputGroupState> | undefined;
72
+ id: globalThis.Ref<string | number | undefined> | undefined;
73
+ group: InputGroupState | undefined;
74
74
  isInGroup: globalThis.ComputedRef<boolean>;
75
- modelValue: globalThis.WritableComputedRef<any>;
76
- valid: Ref<boolean>;
77
- invalid: Ref<boolean>;
75
+ modelValue: globalThis.Ref<unknown>;
76
+ valid: globalThis.Ref<boolean>;
77
+ invalid: globalThis.Ref<boolean>;
78
78
  readonly: globalThis.ComputedRef<boolean>;
79
79
  disabled: globalThis.ComputedRef<boolean>;
80
80
  };
@@ -1,4 +1,4 @@
1
- import { unref, computed, isRef, defineComponent, h, inject, toRef, toRefs, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
1
+ import { computed, isRef, defineComponent, h, inject, toRef, toRefs, unref, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
2
2
  import { uid } from "uid";
3
3
  import { useVModel } from "@vueuse/core";
4
4
  import { get } from "ts-dot-prop";
@@ -51,7 +51,9 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
51
51
  return AnchorTarget2;
52
52
  })(AnchorTarget || {});
53
53
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
54
- const INJECTION_KEY_RADIO_GROUP = Symbol.for("radioGroup");
54
+ const INJECTION_KEY_RADIO_GROUP = Symbol.for(
55
+ "radioGroup"
56
+ );
55
57
  function equals(obj1, obj2, field) {
56
58
  if (field) {
57
59
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
@@ -131,9 +133,6 @@ function contains(value, list) {
131
133
  }
132
134
  return false;
133
135
  }
134
- function isEmpty(value) {
135
- return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
136
- }
137
136
  function isString(value) {
138
137
  return typeof value === "string" || value instanceof String;
139
138
  }
@@ -632,13 +631,13 @@ const CheckboxRadioGroupProps = {
632
631
  });
633
632
  function useInjectedGroupState(groupKey) {
634
633
  const group = inject(groupKey, void 0);
635
- const isInGroup = computed(() => !isEmpty(group));
634
+ const isInGroup = computed(() => group !== void 0);
636
635
  function getGroupOrLocalRef(propName, props, emit) {
637
- if (group == null ? void 0 : group.value) {
638
- const groupPropValue = unref(group.value)[propName];
636
+ const groupPropValue = group == null ? void 0 : group[propName];
637
+ if (groupPropValue) {
639
638
  return computed({
640
639
  get() {
641
- return groupPropValue == null ? void 0 : groupPropValue.value;
640
+ return groupPropValue.value;
642
641
  },
643
642
  set(value) {
644
643
  groupPropValue.value = value;
@@ -651,8 +650,9 @@ function useInjectedGroupState(groupKey) {
651
650
  return propRef.value;
652
651
  },
653
652
  set(value) {
654
- if (emit)
653
+ if (emit) {
655
654
  emit(`update:${propName}`, value);
655
+ }
656
656
  }
657
657
  });
658
658
  }
@@ -671,16 +671,10 @@ function useGroupProps(props, emit) {
671
671
  const valid = getGroupOrLocalRef("valid", props);
672
672
  const invalid = getGroupOrLocalRef("invalid", props);
673
673
  const readonly = computed(
674
- () => {
675
- var _a;
676
- return Boolean(props.readonly || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.readonly.value));
677
- }
674
+ () => Boolean(props.readonly || (group == null ? void 0 : group.readonly.value))
678
675
  );
679
676
  const disabled = computed(
680
- () => {
681
- var _a;
682
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
683
- }
677
+ () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
684
678
  );
685
679
  return {
686
680
  // local props
@@ -915,15 +909,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
915
909
  });
916
910
  const VvRadioGroupProps = CheckboxRadioGroupProps;
917
911
  const VvRadioGroupEvents = ["update:modelValue", "change"];
918
- function useProvideGroupState(groupState) {
919
- if (Object.keys(groupState).some(
920
- (k) => k !== "key" && !isRef(groupState[k])
921
- ))
922
- throw Error("One or more groupState props aren't ref.");
923
- provide(
924
- groupState.key,
925
- computed(() => groupState)
926
- );
912
+ function useProvideGroupState(key, groupState) {
913
+ provide(key, groupState);
927
914
  }
928
915
  function useOptions(props) {
929
916
  const { options, labelKey, valueKey, disabledKey } = toRefs(props);
@@ -977,8 +964,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
977
964
  );
978
965
  const modelValue = useVModel(props, "modelValue", emit);
979
966
  const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
980
- useProvideGroupState({
981
- key: INJECTION_KEY_RADIO_GROUP,
967
+ useProvideGroupState(INJECTION_KEY_RADIO_GROUP, {
982
968
  modelValue,
983
969
  disabled,
984
970
  readonly,
@@ -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||{}),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("radioGroup");function s(e,t,l){return l?f(e,l)===f(t,l):v(e,t)}function v(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(!v(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,s=t instanceof RegExp;if(d!=s)return!1;if(d&&s)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],!v(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function f(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 c(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function p(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>c(o.value.invalidLabel))),n=e.computed((()=>c(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))),f=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:f,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 m={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},y={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},b={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},h=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),S={readonly:{type:Boolean,default:!1}},L={modifiers:{type:[String,Array],default:void 0}},k={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}},V={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const $={...{...V,name:{type:String,required:!0}},...B,...m,...y,...k,...g,...S,...L,...h,...b,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},R={...m,...y,...O,...k,...g,...S,...L,...h,...b,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}};function j(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,r.button;const x=$;function A(t,l,o){const a=e.inject(u),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 P(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 C=["for"],N=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],w=e.defineComponent({name:"VvRadio",props:x,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=o,i=e.useSlots(),r=A("VvRadio",x,a),{id:u,disabled:v,readonly:f,modelValue:c,valid:m,invalid:y}=function(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=j(d),r=i("modelValue",t,l),u=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:u,invalid:s,readonly:v,disabled:f}}(a,n),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(u),g=e.computed((()=>`${b.value}-hint`)),h=e.computed((()=>L.value?-1:a.tabindex)),S=e.ref(),L=e.computed((()=>v.value||f.value)),k=e.computed((()=>!0===y.value||!0!==m.value&&void 0)),O=e.computed((()=>Array.isArray(c.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(s(e,l))return!0;return!1}(a.value,c.value):s(a.value,c.value))),B=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),V=e.computed({get:()=>O.value?B.value:null,set(e){Array.isArray(c.value)?c.value=[a.value]:c.value=a.value,n("change",e)}}),{modifiers:$}=e.toRefs(a),R=P("vv-radio",$,e.computed((()=>({valid:m.value,invalid:y.value,disabled:v.value,readonly:f.value})))),{HintSlot:w,hasHintLabelOrSlot:_,hasInvalidLabelOrSlot:z,hintSlotScope:E}=p(r,i);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(R)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:S,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(V)?V.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(L),value:e.unref(B),tabindex:e.unref(h),"aria-invalid":e.unref(k),"aria-describedby":e.unref(_)?e.unref(g):void 0,"aria-errormessage":e.unref(z)?e.unref(g):void 0},null,8,N),[[e.vModelRadio,e.unref(V)]]),e.renderSlot(t.$slots,"default",{value:e.unref(c)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(w),{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(E))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(E))))])),key:"3"}:void 0]),1032,["id"])],10,C))}}),_=R;const z=["textContent"],E={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:_,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=a,r=e.useSlots(),u=A("VvRadioGroup",_,n),s=l.useVModel(n,"modelValue",i),{disabled:v,readonly:f,vertical:c,valid:m,invalid:y,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:d,modelValue:s,disabled:v,readonly:f,valid:m,invalid:y});const{getOptionLabel:g,getOptionValue:h}=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),S=P("vv-radio-group",b,e.computed((()=>({disabled:v.value,readonly:f.value,horizontal:!c.value,valid:m.value,invalid:y.value})))),{HintSlot:L,hintSlotScope:k}=p(u,r);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(S))},[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(w,e.mergeProps({key:l},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:h(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(L),{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(k))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),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||{}),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("radioGroup");function s(e,t,l){return l?f(e,l)===f(t,l):v(e,t)}function v(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(!v(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,s=t instanceof RegExp;if(d!=s)return!1;if(d&&s)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],!v(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function f(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 c(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function p(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>c(o.value.invalidLabel))),n=e.computed((()=>c(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))),f=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:f,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 m={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},b={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},y={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},h=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),S={readonly:{type:Boolean,default:!1}},L={modifiers:{type:[String,Array],default:void 0}},B={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 k={tabindex:{type:[String,Number],default:0}},V={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const $={...{...V,name:{type:String,required:!0}},...k,...m,...b,...B,...g,...S,...L,...h,...y,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},R={...m,...b,...O,...B,...g,...S,...L,...h,...y,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}};i.button,r.button;const x=$;function j(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>void 0!==l));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){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(o,t);return e.computed({get:()=>i.value,set(e){a&&a(`update:${t}`,e)}})}}}(d),r=i("modelValue",t,l),u=i("valid",t),s=i("invalid",t),v=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),f=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:o,group:a,isInGroup:n,modelValue:r,valid:u,invalid:s,readonly:v,disabled:f}}function A(t,l,o){const a=e.inject(u),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 P(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 C=["for"],N=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],_=e.defineComponent({name:"VvRadio",props:x,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=o,i=e.useSlots(),r=A("VvRadio",x,a),{id:u,disabled:d,readonly:v,modelValue:f,valid:c,invalid:m}=j(a,n),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(u),y=e.computed((()=>`${b.value}-hint`)),g=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),S=e.computed((()=>d.value||v.value)),L=e.computed((()=>!0===m.value||!0!==c.value&&void 0)),B=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(s(e,l))return!0;return!1}(a.value,f.value):s(a.value,f.value))),O=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),k=e.computed({get:()=>B.value?O.value:null,set(e){Array.isArray(f.value)?f.value=[a.value]:f.value=a.value,n("change",e)}}),{modifiers:V}=e.toRefs(a),$=P("vv-radio",V,e.computed((()=>({valid:c.value,invalid:m.value,disabled:d.value,readonly:v.value})))),{HintSlot:R,hasHintLabelOrSlot:_,hasInvalidLabelOrSlot:w,hintSlotScope:z}=p(r,i);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(O),tabindex:e.unref(g),"aria-invalid":e.unref(L),"aria-describedby":e.unref(_)?e.unref(y):void 0,"aria-errormessage":e.unref(w)?e.unref(y):void 0},null,8,N),[[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(R),{id:e.unref(y),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,C))}}),w=R;const z=["textContent"],E={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:w,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=a,r=e.useSlots(),u=A("VvRadioGroup",w,n),s=l.useVModel(n,"modelValue",i),{disabled:v,readonly:f,vertical:c,valid:m,invalid:b,modifiers:y}=e.toRefs(n);var g,h;g=d,h={modelValue:s,disabled:v,readonly:f,valid:m,invalid:b},e.provide(g,h);const{getOptionLabel:S,getOptionValue:L}=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),B=P("vv-radio-group",y,e.computed((()=>({disabled:v.value,readonly:f.value,horizontal:!c.value,valid:m.value,invalid:b.value})))),{HintSlot:O,hintSlotScope:k}=p(u,r);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(B))},[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},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:S(e),value:L(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(O),{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(k))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"3"}:void 0]),1024)],2))}})}));
@@ -148,18 +148,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
148
148
  default: undefined;
149
149
  };
150
150
  }>>, {
151
- readonly: boolean;
151
+ options: (string | Option)[];
152
+ label: string | number;
152
153
  disabled: boolean;
153
- valid: boolean;
154
- invalid: boolean;
155
154
  modelValue: string | number | boolean | symbol | unknown[];
156
155
  modifiers: string | string[];
157
- options: (string | Option)[];
158
- label: string | number;
159
156
  loading: boolean;
160
157
  loadingLabel: string;
158
+ readonly: boolean;
161
159
  hintLabel: string;
160
+ invalid: boolean;
162
161
  invalidLabel: string | unknown[];
162
+ valid: boolean;
163
163
  validLabel: string | unknown[];
164
164
  vertical: boolean;
165
165
  labelKey: string | Function;
@@ -208,24 +208,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
208
208
  };
209
209
  id: (StringConstructor | NumberConstructor)[];
210
210
  }>>, {
211
- readonly: boolean;
212
- disabled: boolean;
213
- valid: boolean;
214
- invalid: boolean;
215
- modelValue: string | number | boolean | unknown[] | Record<string, any>;
216
- multiple: boolean;
217
- unselectable: boolean;
218
- modifiers: string | string[];
219
211
  floating: boolean;
220
212
  options: (string | Option)[];
221
213
  label: string | number;
214
+ disabled: boolean;
215
+ modelValue: string | number | boolean | unknown[] | Record<string, any>;
216
+ modifiers: string | string[];
222
217
  required: boolean;
223
218
  icon: string | import("../VvIcon").VvIconProps;
224
219
  iconPosition: "before" | "after";
225
220
  loading: boolean;
226
221
  loadingLabel: string;
222
+ unselectable: boolean;
223
+ multiple: boolean;
224
+ readonly: boolean;
227
225
  hintLabel: string;
226
+ invalid: boolean;
228
227
  invalidLabel: string | unknown[];
228
+ valid: boolean;
229
229
  validLabel: string | unknown[];
230
230
  tabindex: string | number;
231
231
  labelKey: string | Function;
@@ -237,20 +237,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
237
237
  };
238
238
  id: (StringConstructor | NumberConstructor)[];
239
239
  }>>, {
240
- readonly: boolean;
241
- disabled: boolean;
242
- valid: boolean;
243
- invalid: boolean;
244
- modifiers: string | string[];
245
240
  floating: boolean;
246
241
  label: string | number;
242
+ disabled: boolean;
243
+ modifiers: string | string[];
247
244
  required: boolean;
248
245
  icon: string | import("../VvIcon").VvIconProps;
249
246
  iconPosition: "before" | "after";
250
247
  loading: boolean;
251
248
  loadingLabel: string;
249
+ readonly: boolean;
252
250
  hintLabel: string;
251
+ invalid: boolean;
253
252
  invalidLabel: string | unknown[];
253
+ valid: boolean;
254
254
  validLabel: string | unknown[];
255
255
  tabindex: string | number;
256
256
  placeholder: string;
@@ -1,6 +1,6 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  position: {
3
- type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
3
+ type: globalThis.PropType<"top" | "right" | "bottom" | "left">;
4
4
  default: import("../../constants").Side;
5
5
  };
6
6
  value: {
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
12
12
  };
13
13
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
14
14
  position: {
15
- type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
15
+ type: globalThis.PropType<"top" | "right" | "bottom" | "left">;
16
16
  default: import("../../constants").Side;
17
17
  };
18
18
  value: {
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
24
24
  };
25
25
  }>>, {
26
26
  modifiers: string | string[];
27
- position: "left" | "right" | "top" | "bottom";
27
+ position: "top" | "right" | "bottom" | "left";
28
28
  }, {}>, {
29
29
  default?(_: {}): any;
30
30
  }>;
@@ -6,7 +6,7 @@ export declare const VvTooltipProps: {
6
6
  * @default Side.bottom
7
7
  */
8
8
  position: {
9
- type: PropType<"left" | "right" | "top" | "bottom">;
9
+ type: PropType<"top" | "right" | "bottom" | "left">;
10
10
  default: Side;
11
11
  };
12
12
  value: {