@volverjs/ui-vue 0.0.6-beta.6 → 0.0.6-beta.7

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 (65) hide show
  1. package/auto-imports.d.ts +9 -0
  2. package/dist/components/VvButton/VvButton.es.js +25 -19
  3. package/dist/components/VvButton/VvButton.umd.js +1 -1
  4. package/dist/components/VvCheckbox/VvCheckbox.es.js +151 -98
  5. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  6. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +36 -0
  7. package/dist/components/VvCheckbox/index.d.ts +5 -0
  8. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +187 -101
  9. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  10. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +36 -0
  11. package/dist/components/VvCheckboxGroup/index.d.ts +5 -0
  12. package/dist/components/VvCombobox/VvCombobox.es.js +236 -140
  13. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  14. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +25 -1
  15. package/dist/components/VvDialog/VvDialog.es.js +25 -19
  16. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  17. package/dist/components/VvDropdown/VvDropdown.es.js +19 -4
  18. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  19. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +5 -1
  20. package/dist/components/VvIcon/VvIcon.es.js +25 -19
  21. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  22. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -2
  23. package/dist/components/VvIcon/index.d.ts +2 -2
  24. package/dist/components/VvInputText/VvInputText.es.js +160 -136
  25. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  26. package/dist/components/VvInputText/VvInputText.vue.d.ts +24 -0
  27. package/dist/components/VvRadio/VvRadio.es.js +151 -98
  28. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  29. package/dist/components/VvRadio/VvRadio.vue.d.ts +36 -0
  30. package/dist/components/VvRadio/index.d.ts +5 -0
  31. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +187 -101
  32. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  33. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +36 -0
  34. package/dist/components/VvRadioGroup/index.d.ts +5 -0
  35. package/dist/components/VvSelect/VvSelect.es.js +163 -137
  36. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  37. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -0
  38. package/dist/components/VvTextarea/VvTextarea.es.js +160 -136
  39. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  40. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +24 -0
  41. package/dist/components/common/HintSlot.d.ts +38 -12
  42. package/dist/components/index.es.js +466 -168
  43. package/dist/components/index.umd.js +1 -1
  44. package/dist/composables/useOptions.d.ts +2 -2
  45. package/dist/icons.es.js +3 -3
  46. package/dist/icons.umd.js +1 -1
  47. package/dist/props/index.d.ts +22 -0
  48. package/package.json +29 -29
  49. package/src/assets/icons/detailed.json +1 -1
  50. package/src/assets/icons/normal.json +1 -1
  51. package/src/assets/icons/simple.json +1 -1
  52. package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
  53. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
  54. package/src/components/VvCombobox/VvCombobox.vue +40 -16
  55. package/src/components/VvDropdown/VvDropdown.vue +20 -2
  56. package/src/components/VvIcon/VvIcon.vue +37 -34
  57. package/src/components/VvIcon/index.ts +2 -2
  58. package/src/components/VvInputText/VvInputText.vue +26 -9
  59. package/src/components/VvRadio/VvRadio.vue +23 -2
  60. package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
  61. package/src/components/VvSelect/VvSelect.vue +26 -9
  62. package/src/components/VvTextarea/VvTextarea.vue +26 -9
  63. package/src/components/common/HintSlot.ts +129 -170
  64. package/src/composables/useOptions.ts +9 -7
  65. package/src/props/index.ts +2 -0
@@ -1,6 +1,6 @@
1
- import { unref, toRefs, computed, h, inject, toRef, defineComponent, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, isRef, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
2
- import { toReactive, useVModel } from "@vueuse/core";
1
+ import { unref, computed, defineComponent, h, inject, toRef, toRefs, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, isRef, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
3
2
  import { nanoid } from "nanoid";
3
+ import { useVModel } from "@vueuse/core";
4
4
  var Side = /* @__PURE__ */ ((Side2) => {
5
5
  Side2["left"] = "left";
6
6
  Side2["right"] = "right";
@@ -123,111 +123,114 @@ function isEmpty(value) {
123
123
  function isString(value) {
124
124
  return typeof value === "string" || value instanceof String;
125
125
  }
126
- function joinLines(errors) {
127
- if (Array.isArray(errors)) {
128
- return errors.filter((e) => isString(e)).join(" ");
126
+ function joinLines(items) {
127
+ if (Array.isArray(items)) {
128
+ return items.filter((item) => isString(item)).join(" ");
129
129
  }
130
- return errors;
130
+ return items;
131
131
  }
132
- function HintSlotFactory(parentProps, parentSlots) {
133
- const {
134
- invalid: invalidSlot,
135
- valid: validSlot,
136
- hint: hintSlot,
137
- loading: loadingSlot
138
- } = parentSlots;
139
- const {
140
- hintLabel,
141
- modelValue,
142
- valid,
143
- validLabel,
144
- invalid,
145
- invalidLabel,
146
- ...otherProps
147
- } = toRefs(parentProps);
148
- const loading = resolveFieldData(otherProps, "loading");
149
- const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
150
- const hasInvalid = computed(() => {
151
- if (!invalid.value) {
152
- return false;
153
- }
154
- if (invalid.value && invalidSlot) {
155
- return true;
156
- }
157
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
158
- return true;
159
- }
160
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
161
- return true;
162
- }
163
- return false;
164
- });
165
- const hasHint = computed(
166
- () => !!(hintLabel && hintLabel.value || hintSlot)
132
+ function HintSlotFactory(props, slots) {
133
+ const invalidLabel = computed(() => joinLines(props.invalidLabel));
134
+ const validLabel = computed(() => joinLines(props.validLabel));
135
+ const loadingLabel = computed(() => props.loadingLabel);
136
+ const hintLabel = computed(() => props.hintLabel);
137
+ const hasLoadingLabelOrSlot = computed(
138
+ () => Boolean(props.loading && (slots.loading || loadingLabel.value))
139
+ );
140
+ const hasInvalidLabelOrSlot = computed(
141
+ () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
167
142
  );
168
- const hasValid = computed(
169
- () => !!(validLabel && validLabel.value || validSlot)
143
+ const hasValidLabelOrSlot = computed(
144
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
170
145
  );
171
- const hasLoading = computed(
172
- () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
146
+ const hasHintLabelOrSlot = computed(
147
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
173
148
  );
174
149
  const isVisible = computed(
175
- () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
150
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
176
151
  );
177
- return {
178
- hasInvalid,
179
- hasHint,
180
- hasValid,
181
- hasLoading,
182
- HintSlot: {
183
- name: "HintSlot",
184
- props: {
185
- params: {
186
- type: Object,
187
- default: () => ({})
152
+ const hintSlotScope = computed(() => ({
153
+ modelValue: props.modelValue,
154
+ valid: props.valid,
155
+ invalid: props.invalid,
156
+ loading: props.loading
157
+ }));
158
+ const HintSlot = defineComponent({
159
+ name: "HintSlot",
160
+ props: {
161
+ tag: {
162
+ type: String,
163
+ default: "small"
164
+ }
165
+ },
166
+ setup() {
167
+ return {
168
+ isVisible,
169
+ invalidLabel,
170
+ validLabel,
171
+ loadingLabel,
172
+ hintLabel,
173
+ hasInvalidLabelOrSlot,
174
+ hasValidLabelOrSlot,
175
+ hasLoadingLabelOrSlot,
176
+ hasHintLabelOrSlot
177
+ };
178
+ },
179
+ render() {
180
+ var _a, _b, _c, _d, _e, _f, _g, _h;
181
+ if (this.isVisible) {
182
+ let role;
183
+ if (this.hasInvalidLabelOrSlot) {
184
+ role = "alert";
188
185
  }
189
- },
190
- setup(props) {
191
- const hintContent = computed(() => {
192
- const slotProps = toReactive({
193
- hintLabel,
194
- modelValue,
195
- valid,
196
- validLabel,
197
- invalid,
198
- invalidLabel,
199
- loading,
200
- loadingLabel,
201
- ...props.params
202
- });
203
- if (invalid == null ? void 0 : invalid.value) {
204
- return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
205
- }
206
- if (valid == null ? void 0 : valid.value)
207
- return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
208
- if (loading == null ? void 0 : loading.value)
209
- return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
210
- return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
211
- });
212
- return {
213
- isVisible,
214
- hasInvalid,
215
- hasValid,
216
- hintContent
217
- };
218
- },
219
- render() {
220
- if (this.isVisible) {
186
+ if (this.hasValidLabelOrSlot) {
187
+ role = "status";
188
+ }
189
+ if (this.hasLoadingLabelOrSlot) {
190
+ return h(
191
+ this.tag,
192
+ {
193
+ role
194
+ },
195
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
196
+ );
197
+ }
198
+ if (this.hasInvalidLabelOrSlot) {
199
+ return h(
200
+ this.tag,
201
+ {
202
+ role
203
+ },
204
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
205
+ );
206
+ }
207
+ if (this.hasValidLabelOrSlot) {
221
208
  return h(
222
- "small",
209
+ this.tag,
223
210
  {
224
- role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
211
+ role
225
212
  },
226
- this.hintContent
213
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
227
214
  );
228
215
  }
216
+ return h(
217
+ this.tag,
218
+ {
219
+ role
220
+ },
221
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
222
+ );
229
223
  }
224
+ return null;
230
225
  }
226
+ });
227
+ return {
228
+ hasInvalidLabelOrSlot,
229
+ hasHintLabelOrSlot,
230
+ hasValidLabelOrSlot,
231
+ hasLoadingLabelOrSlot,
232
+ hintSlotScope,
233
+ HintSlot
231
234
  };
232
235
  }
233
236
  const LinkProps = {
@@ -277,6 +280,19 @@ const InvalidProps = {
277
280
  */
278
281
  invalidLabel: [String, Array]
279
282
  };
283
+ const LoadingProps = {
284
+ /**
285
+ * Loading status
286
+ */
287
+ loading: Boolean,
288
+ /**
289
+ * Loading label
290
+ */
291
+ loadingLabel: {
292
+ type: String,
293
+ default: "Loading..."
294
+ }
295
+ };
280
296
  const DisabledProps = {
281
297
  /**
282
298
  * Whether the form control is disabled
@@ -481,6 +497,7 @@ const CheckboxRadioProps = {
481
497
  ...ReadonlyProps,
482
498
  ...ModifiersProps,
483
499
  ...LabelProps,
500
+ ...LoadingProps,
484
501
  /**
485
502
  * Input value
486
503
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
@@ -500,6 +517,7 @@ const CheckboxRadioGroupProps = {
500
517
  ...ReadonlyProps,
501
518
  ...ModifiersProps,
502
519
  ...LabelProps,
520
+ ...LoadingProps,
503
521
  /**
504
522
  * Input value
505
523
  */
@@ -618,7 +636,7 @@ function useModifiers(prefix, modifiers, others) {
618
636
  });
619
637
  }
620
638
  const _hoisted_1$1 = ["for"];
621
- const _hoisted_2$1 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"];
639
+ const _hoisted_2$1 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
622
640
  const __default__$1 = {
623
641
  name: "VvRadio"
624
642
  };
@@ -631,6 +649,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
631
649
  const slots = useSlots();
632
650
  const { id, disabled, readonly, modelValue, valid, invalid } = useGroupProps(props, emit);
633
651
  const hasId = useUniqueId(id);
652
+ const hasHintId = computed(() => `${hasId.value}-hint`);
634
653
  const tabindex = computed(() => isDisabled.value ? -1 : props.tabindex);
635
654
  const input = ref();
636
655
  const isDisabled = computed(() => disabled.value || readonly.value);
@@ -673,7 +692,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
673
692
  readonly: readonly.value
674
693
  }))
675
694
  );
676
- const { HintSlot } = HintSlotFactory(props, slots);
695
+ const {
696
+ HintSlot,
697
+ hasHintLabelOrSlot,
698
+ hasInvalidLabelOrSlot,
699
+ hintSlotScope
700
+ } = HintSlotFactory(props, slots);
677
701
  return (_ctx, _cache) => {
678
702
  return openBlock(), createElementBlock("label", {
679
703
  class: normalizeClass(unref(bemCssClasses)),
@@ -690,7 +714,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
690
714
  disabled: unref(isDisabled),
691
715
  value: unref(hasValue),
692
716
  tabindex: unref(tabindex),
693
- "aria-invalid": unref(isInvalid)
717
+ "aria-invalid": unref(isInvalid),
718
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
719
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
694
720
  }, null, 8, _hoisted_2$1), [
695
721
  [vModelRadio, unref(localModelValue)]
696
722
  ]),
@@ -698,9 +724,38 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
698
724
  createTextVNode(toDisplayString(_ctx.label), 1)
699
725
  ]),
700
726
  createVNode(unref(HintSlot), {
701
- class: "vv-radio__hint",
702
- params: { value: unref(modelValue) }
703
- }, null, 8, ["params"])
727
+ id: unref(hasHintId),
728
+ class: "vv-radio__hint"
729
+ }, createSlots({ _: 2 }, [
730
+ _ctx.$slots.hint ? {
731
+ name: "hint",
732
+ fn: withCtx(() => [
733
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
734
+ ]),
735
+ key: "0"
736
+ } : void 0,
737
+ _ctx.$slots.loading ? {
738
+ name: "loading",
739
+ fn: withCtx(() => [
740
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
741
+ ]),
742
+ key: "1"
743
+ } : void 0,
744
+ _ctx.$slots.valid ? {
745
+ name: "valid",
746
+ fn: withCtx(() => [
747
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
748
+ ]),
749
+ key: "2"
750
+ } : void 0,
751
+ _ctx.$slots.invalid ? {
752
+ name: "invalid",
753
+ fn: withCtx(() => [
754
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
755
+ ]),
756
+ key: "3"
757
+ } : void 0
758
+ ]), 1032, ["id"])
704
759
  ], 10, _hoisted_1$1);
705
760
  };
706
761
  }
@@ -722,7 +777,9 @@ function useOptions(props) {
722
777
  const getOptionLabel = (option) => {
723
778
  if (typeof option !== "object" && option !== null)
724
779
  return option;
725
- return typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value];
780
+ return String(
781
+ typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value]
782
+ );
726
783
  };
727
784
  const getOptionValue = (option) => {
728
785
  if (typeof option !== "object" && option !== null)
@@ -789,7 +846,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
789
846
  value: getOptionValue(option)
790
847
  };
791
848
  };
792
- const { HintSlot } = HintSlotFactory(props, slots);
849
+ const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots);
793
850
  return (_ctx, _cache) => {
794
851
  return openBlock(), createElementBlock("fieldset", {
795
852
  class: normalizeClass(unref(bemCssClasses))
@@ -803,7 +860,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
803
860
  return openBlock(), createBlock(_sfc_main$1, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
804
861
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
805
862
  ]),
806
- createVNode(unref(HintSlot), { class: "vv-radio-group__hint" })
863
+ createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
864
+ _ctx.$slots.hint ? {
865
+ name: "hint",
866
+ fn: withCtx(() => [
867
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
868
+ ]),
869
+ key: "0"
870
+ } : void 0,
871
+ _ctx.$slots.loading ? {
872
+ name: "loading",
873
+ fn: withCtx(() => [
874
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
875
+ ]),
876
+ key: "1"
877
+ } : void 0,
878
+ _ctx.$slots.valid ? {
879
+ name: "valid",
880
+ fn: withCtx(() => [
881
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
882
+ ]),
883
+ key: "2"
884
+ } : void 0,
885
+ _ctx.$slots.invalid ? {
886
+ name: "invalid",
887
+ fn: withCtx(() => [
888
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
889
+ ]),
890
+ key: "3"
891
+ } : void 0
892
+ ]), 1024)
807
893
  ], 2);
808
894
  };
809
895
  }
@@ -1 +1 @@
1
- !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=l(e.vue,e.core,e.nanoid)}(this,(function(e,l,n){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{});const u=Symbol.for("radioGroup");function i(e,l,n){return n?d(e,n)===d(l,n):r(e,l)}function r(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const n=Array.isArray(e),t=Array.isArray(l);let o,a,u;if(n&&t){if(a=e.length,a!=l.length)return!1;for(o=a;0!=o--;)if(!r(e[o],l[o]))return!1;return!0}if(n!=t)return!1;const i=e instanceof Date,d=l instanceof Date;if(i!=d)return!1;if(i&&d)return e.getTime()==l.getTime();const v=e instanceof RegExp,s=l instanceof RegExp;if(v!=s)return!1;if(v&&s)return e.toString()==l.toString();const c=Object.keys(e);if(a=c.length,a!==Object.keys(l).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(l,c[o]))return!1;for(o=a;0!=o--;)if(u=c[o],!r(e[u],l[u]))return!1;return!0}return e!=e&&l!=l}function d(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const n=l.split(".");let t=e;for(let l=0,o=n.length;l<o;++l){if(null==e)return null;t=t[n[l]]}return t}}return null}function v(l){return null==(n=e.unref(l))||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length;var n}function s(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}function c(n,t){const{invalid:o,valid:a,hint:u,loading:i}=t,{hintLabel:r,modelValue:c,valid:f,validLabel:p,invalid:m,invalidLabel:b,...y}=e.toRefs(n),g=d(y,"loading"),h=d(y,"loadingLabel"),S=e.computed((()=>!!m.value&&(!(!m.value||!o)||(!!((null==b?void 0:b.value)&&Array.isArray(b.value)&&b.value.length>0)||!(!(null==b?void 0:b.value)||v(b)))))),B=e.computed((()=>!!(r&&r.value||u))),V=e.computed((()=>!!(p&&p.value||a))),k=e.computed((()=>!!((null==g?void 0:g.value)&&i||(null==g?void 0:g.value)&&(null==h?void 0:h.value)))),A=e.computed((()=>B.value||V.value||S.value||k.value));return{hasInvalid:S,hasHint:B,hasValid:V,hasLoading:k,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(n){const t=e.computed((()=>{const e=l.toReactive({hintLabel:r,modelValue:c,valid:f,validLabel:p,invalid:m,invalidLabel:b,loading:g,loadingLabel:h,...n.params});return(null==m?void 0:m.value)?(null==o?void 0:o(e))||s(null==b?void 0:b.value)||(null==r?void 0:r.value):(null==f?void 0:f.value)?(null==a?void 0:a(e))||s(null==p?void 0:p.value)||(null==r?void 0:r.value):(null==g?void 0:g.value)?(null==i?void 0:i(e))||s(null==h?void 0:h.value)||(null==r?void 0:r.value):(null==u?void 0:u(e))||s(null==r?void 0:r.value)||(null==r?void 0:r.value)}));return{isVisible:A,hasInvalid:S,hasValid:V,hintContent:t}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}const f={valid:Boolean,validLabel:[String,Array]},p={invalid:Boolean,invalidLabel:[String,Array]},m={disabled:Boolean},b=(Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},g={modifiers:[String,Array]},h={hintLabel:{type:String,default:""}},S={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};o.before;const B={tabindex:{type:[String,Number],default:0}},V={id:[String,Number]};t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const k={...{...V,name:{type:String,required:!0}},...B,...f,...p,...h,...m,...y,...g,...b,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},A={...f,...p,...S,...h,...m,...y,...g,...b,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};a.button;const O=k;function j(l,n){const{id:t}=e.toRefs(l),{group:o,isInGroup:a,getGroupOrLocalRef:i}=function(l){const n=e.inject(l,void 0),t=e.computed((()=>!v(n)));return{group:n,isInGroup:t,getGroupOrLocalRef:function(l,t,o){if(null==n?void 0:n.value){const t=e.unref(n.value)[l];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const a=e.toRef(t,l);return e.computed({get:()=>a.value,set(e){o&&o(`update:${l}`,e)}})}}}(u),r=i("modelValue",l,n),d=i("valid",l),s=i("invalid",l),c=e.computed((()=>{var e;return Boolean(l.readonly||(null==(e=null==o?void 0:o.value)?void 0:e.readonly.value))})),f=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==o?void 0:o.value)?void 0:e.disabled.value))}));return{id:t,group:o,isInGroup:a,modelValue:r,valid:d,invalid:s,readonly:c,disabled:f}}function L(l,n,t){return e.computed((()=>{const o={[l]:!0},a="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(o[`${l}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((n=>{o[`${l}--${n}`]=e.unref(t.value[n])})),o}))}const R=["for"],x=["id","name","disabled","value","tabindex","aria-invalid"],N=e.defineComponent({name:"VvRadio",props:O,emits:["click","update:modelValue","change","blur"],setup(l,{emit:t}){const o=l,a=e.useSlots(),{id:u,disabled:r,readonly:d,modelValue:v,valid:s,invalid:f}=j(o,t),p=(l=>e.computed((()=>String((null==l?void 0:l.value)||n.nanoid()))))(u),m=e.computed((()=>y.value?-1:o.tabindex)),b=e.ref(),y=e.computed((()=>r.value||d.value)),g=e.computed((()=>!0===f.value||!0!==s.value&&void 0)),h=e.computed((()=>Array.isArray(v.value)?function(e,l){if(null!=e&&l&&l.length)for(const n of l)if(i(e,n))return!0;return!1}(o.value,v.value):i(o.value,v.value))),S=e.computed((()=>!["string","number","boolean"].includes(typeof o.value)||o.value)),B=e.computed({get:()=>h.value?S.value:null,set(e){Array.isArray(v.value)?v.value=[o.value]:v.value=o.value,t("change",e)}}),{modifiers:V}=e.toRefs(o),k=L("vv-radio",V,e.computed((()=>({valid:s.value,invalid:f.value,disabled:r.value,readonly:d.value})))),{HintSlot:A}=c(o,a);return(l,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(k)),for:e.unref(p)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(p),ref_key:"input",ref:b,"onUpdate:modelValue":n[0]||(n[0]=l=>e.isRef(B)?B.value=l:null),type:"radio",class:"vv-radio__input",name:l.name,disabled:e.unref(y),value:e.unref(S),tabindex:e.unref(m),"aria-invalid":e.unref(g)},null,8,x),[[e.vModelRadio,e.unref(B)]]),e.renderSlot(l.$slots,"default",{value:e.unref(v)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(A),{class:"vv-radio__hint",params:{value:e.unref(v)}},null,8,["params"])],10,R))}}),E=A;const _=["textContent"],C={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:E,emits:["update:modelValue","change"],setup(n,{emit:t}){const o=n,a=e.useSlots(),i=l.useVModel(o,"modelValue",t),{disabled:r,readonly:d,vertical:v,valid:s,invalid:f,modifiers:p}=e.toRefs(o);!function(l){if(Object.keys(l).some((n=>"key"!==n&&!e.isRef(l[n]))))throw Error("One or more groupState props aren't ref.");e.provide(l.key,e.computed((()=>l)))}({key:u,modelValue:i,disabled:r,readonly:d,valid:s,invalid:f});const{getOptionLabel:m,getOptionValue:b}=function(l){const{options:n,labelKey:t,valueKey:o,disabledKey:a}=e.toRefs(l);return{options:n,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:"function"==typeof t.value?t.value(e):e[t.value],getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof o.value?o.value(e):e[o.value],getOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof a.value?a.value(e):e[a.value]),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(o),y=L("vv-radio-group",p,e.computed((()=>({disabled:r.value,readonly:d.value,horizontal:!v.value,valid:s.value,invalid:f.value})))),{HintSlot:g}=c(o,a);return(l,n)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(y))},[l.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(l.label)},null,8,_)):e.createCommentVNode("",!0),e.createElementVNode("div",C,[l.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.options,((l,n)=>(e.openBlock(),e.createBlock(N,e.mergeProps({key:n},((e,l)=>({id:`${o.name}_opt${l}`,name:o.name,label:m(e),value:b(e)}))(l,n)),null,16)))),128)):e.renderSlot(l.$slots,"default",{key:1})]),e.createVNode(e.unref(g),{class:"vv-radio-group__hint"})],2))}})}));
1
+ !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=l(e.vue,e.nanoid,e.core)}(this,(function(e,l,t){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});const i=Symbol.for("radioGroup");function r(e,l,t){return t?d(e,t)===d(l,t):u(e,l)}function u(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),o=Array.isArray(l);let a,n,i;if(t&&o){if(n=e.length,n!=l.length)return!1;for(a=n;0!=a--;)if(!u(e[a],l[a]))return!1;return!0}if(t!=o)return!1;const r=e instanceof Date,d=l instanceof Date;if(r!=d)return!1;if(r&&d)return e.getTime()==l.getTime();const s=e instanceof RegExp,v=l instanceof RegExp;if(s!=v)return!1;if(s&&v)return e.toString()==l.toString();const c=Object.keys(e);if(n=c.length,n!==Object.keys(l).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,c[a]))return!1;for(a=n;0!=a--;)if(i=c[a],!u(e[i],l[i]))return!1;return!0}return e!=e&&l!=l}function d(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const t=l.split(".");let o=e;for(let l=0,a=t.length;l<a;++l){if(null==e)return null;o=o[t[l]]}return o}}return null}function s(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}function v(l,t){const o=e.computed((()=>s(l.invalidLabel))),a=e.computed((()=>s(l.validLabel))),n=e.computed((()=>l.loadingLabel)),i=e.computed((()=>l.hintLabel)),r=e.computed((()=>Boolean(l.loading&&(t.loading||n.value)))),u=e.computed((()=>!r.value&&Boolean(l.invalid&&(t.invalid||o.value)))),d=e.computed((()=>!r.value&&!u.value&&Boolean(l.valid&&(t.valid||a.value)))),v=e.computed((()=>!r.value&&!u.value&&!d.value&&Boolean(t.hint||i.value))),c=e.computed((()=>u.value||d.value||r.value||v.value)),f=e.computed((()=>({modelValue:l.modelValue,valid:l.valid,invalid:l.invalid,loading:l.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:o,validLabel:a,loadingLabel:n,hintLabel:i,hasInvalidLabelOrSlot:u,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:r,hasHintLabelOrSlot:v}),render(){var l,t,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==(t=(l=this.$slots).loading)?void 0:t.call(l))??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:u,hasHintLabelOrSlot:v,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:r,hintSlotScope:f,HintSlot:p}}const c={valid:Boolean,validLabel:[String,Array]},f={invalid:Boolean,invalidLabel:[String,Array]},p={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},m={disabled:Boolean},b=(Boolean,Boolean,{label:[String,Number]}),g={readonly:Boolean},y={modifiers:[String,Array]},h={hintLabel:{type:String,default:""}},S={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};a.before;const L={tabindex:{type:[String,Number],default:0}},B={id:[String,Number]};o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const O={...{...B,name:{type:String,required:!0}},...L,...c,...f,...h,...m,...g,...y,...b,...p,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},k={...c,...f,...S,...h,...m,...g,...y,...b,...p,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};function $(l){const t=e.inject(l,void 0),o=e.computed((()=>{return l=t,!(null==(o=e.unref(l))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var l,o}));return{group:t,isInGroup:o,getGroupOrLocalRef:function(l,o,a){if(null==t?void 0:t.value){const o=e.unref(t.value)[l];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,l);return e.computed({get:()=>n.value,set(e){a&&a(`update:${l}`,e)}})}}}n.button;const V=O;function R(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const x=["for"],A=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],j=e.defineComponent({name:"VvRadio",props:V,emits:["click","update:modelValue","change","blur"],setup(t,{emit:o}){const a=t,n=e.useSlots(),{id:u,disabled:d,readonly:s,modelValue:c,valid:f,invalid:p}=function(l,t){const{id:o}=e.toRefs(l),{group:a,isInGroup:n,getGroupOrLocalRef:r}=$(i),u=r("modelValue",l,t),d=r("valid",l),s=r("invalid",l),v=e.computed((()=>{var e;return Boolean(l.readonly||(null==(e=null==a?void 0:a.value)?void 0:e.readonly.value))})),c=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:o,group:a,isInGroup:n,modelValue:u,valid:d,invalid:s,readonly:v,disabled:c}}(a,o),m=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.nanoid()))))(u),b=e.computed((()=>`${m.value}-hint`)),g=e.computed((()=>h.value?-1:a.tabindex)),y=e.ref(),h=e.computed((()=>d.value||s.value)),S=e.computed((()=>!0===p.value||!0!==f.value&&void 0)),L=e.computed((()=>Array.isArray(c.value)?function(e,l){if(null!=e&&l&&l.length)for(const t of l)if(r(e,t))return!0;return!1}(a.value,c.value):r(a.value,c.value))),B=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),O=e.computed({get:()=>L.value?B.value:null,set(e){Array.isArray(c.value)?c.value=[a.value]:c.value=a.value,o("change",e)}}),{modifiers:k}=e.toRefs(a),V=R("vv-radio",k,e.computed((()=>({valid:f.value,invalid:p.value,disabled:d.value,readonly:s.value})))),{HintSlot:j,hasHintLabelOrSlot:P,hasInvalidLabelOrSlot:C,hintSlotScope:w}=v(a,n);return(l,t)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(V)),for:e.unref(m)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(m),ref_key:"input",ref:y,"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(O)?O.value=l:null),type:"radio",class:"vv-radio__input",name:l.name,disabled:e.unref(h),value:e.unref(B),tabindex:e.unref(g),"aria-invalid":e.unref(S),"aria-describedby":e.unref(P)?e.unref(b):void 0,"aria-errormessage":e.unref(C)?e.unref(b):void 0},null,8,A),[[e.vModelRadio,e.unref(O)]]),e.renderSlot(l.$slots,"default",{value:e.unref(c)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(j),{id:e.unref(b),class:"vv-radio__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(w))))])),key:"3"}:void 0]),1032,["id"])],10,x))}}),P=k;const C=["textContent"],w={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:P,emits:["update:modelValue","change"],setup(l,{emit:o}){const a=l,n=e.useSlots(),r=t.useVModel(a,"modelValue",o),{disabled:u,readonly:d,vertical:s,valid:c,invalid:f,modifiers:p}=e.toRefs(a);!function(l){if(Object.keys(l).some((t=>"key"!==t&&!e.isRef(l[t]))))throw Error("One or more groupState props aren't ref.");e.provide(l.key,e.computed((()=>l)))}({key:i,modelValue:r,disabled:u,readonly:d,valid:c,invalid:f});const{getOptionLabel:m,getOptionValue:b}=function(l){const{options:t,labelKey:o,valueKey:a,disabledKey:n}=e.toRefs(l);return{options:t,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):e[o.value]),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof a.value?a.value(e):e[a.value],getOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof n.value?n.value(e):e[n.value]),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(a),g=R("vv-radio-group",p,e.computed((()=>({disabled:u.value,readonly:d.value,horizontal:!s.value,valid:c.value,invalid:f.value})))),{HintSlot:y,hintSlotScope:h}=v(a,n);return(l,t)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(g))},[l.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(l.label)},null,8,C)):e.createCommentVNode("",!0),e.createElementVNode("div",w,[l.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.options,((l,t)=>(e.openBlock(),e.createBlock(j,e.mergeProps({key:t},((e,l)=>({id:`${a.name}_opt${l}`,name:a.name,label:m(e),value:b(e)}))(l,t)),null,16)))),128)):e.renderSlot(l.$slots,"default",{key:1})]),e.createVNode(e.unref(y),{class:"vv-radio-group__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(h))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(h))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(h))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(h))))])),key:"3"}:void 0]),1024)],2))}})}));
@@ -6,6 +6,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
6
6
  required: boolean;
7
7
  };
8
8
  vertical: BooleanConstructor;
9
+ loading: BooleanConstructor;
10
+ loadingLabel: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
9
14
  label: (StringConstructor | NumberConstructor)[];
10
15
  modifiers: globalThis.PropType<string | string[]>;
11
16
  readonly: BooleanConstructor;
@@ -41,6 +46,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
41
46
  required: boolean;
42
47
  };
43
48
  vertical: BooleanConstructor;
49
+ loading: BooleanConstructor;
50
+ loadingLabel: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
44
54
  label: (StringConstructor | NumberConstructor)[];
45
55
  modifiers: globalThis.PropType<string | string[]>;
46
56
  readonly: BooleanConstructor;
@@ -74,6 +84,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
74
84
  }, {
75
85
  disabled: boolean;
76
86
  options: (string | Option)[];
87
+ loading: boolean;
88
+ loadingLabel: string;
77
89
  readonly: boolean;
78
90
  hintLabel: string;
79
91
  invalid: boolean;
@@ -84,6 +96,30 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
84
96
  disabledKey: string | Function;
85
97
  }>, {
86
98
  default: (_: {}) => any;
99
+ hint: (_: {
100
+ modelValue: any;
101
+ valid: boolean;
102
+ invalid: boolean;
103
+ loading: boolean;
104
+ }) => any;
105
+ loading: (_: {
106
+ modelValue: any;
107
+ valid: boolean;
108
+ invalid: boolean;
109
+ loading: boolean;
110
+ }) => any;
111
+ valid: (_: {
112
+ modelValue: any;
113
+ valid: boolean;
114
+ invalid: boolean;
115
+ loading: boolean;
116
+ }) => any;
117
+ invalid: (_: {
118
+ modelValue: any;
119
+ valid: boolean;
120
+ invalid: boolean;
121
+ loading: boolean;
122
+ }) => any;
87
123
  }>;
88
124
  export default _default;
89
125
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -5,6 +5,11 @@ export declare const VvRadioGroupProps: {
5
5
  required: boolean;
6
6
  };
7
7
  vertical: BooleanConstructor;
8
+ loading: BooleanConstructor;
9
+ loadingLabel: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
8
13
  label: (StringConstructor | NumberConstructor)[];
9
14
  modifiers: globalThis.PropType<string | string[]>;
10
15
  readonly: BooleanConstructor;