@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +106 -10
- package/auto-imports.d.ts +7 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
- package/dist/components/VvAccordionGroup/index.d.ts +14 -6
- package/dist/components/VvAction/VvAction.es.js +78 -27
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
- package/dist/components/VvAction/index.d.ts +25 -9
- package/dist/components/VvAlert/VvAlert.es.js +204 -171
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
- package/dist/components/VvAlert/index.d.ts +17 -9
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
- package/dist/components/VvAlertGroup/index.d.ts +6 -14
- package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +78 -28
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +291 -252
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
- package/dist/components/VvButton/index.d.ts +51 -29
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +86 -36
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
- package/dist/components/VvCheckbox/index.d.ts +47 -14
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
- package/dist/components/VvCombobox/index.d.ts +62 -26
- package/dist/components/VvDialog/VvDialog.es.js +140 -153
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
- package/dist/components/VvDropdown/index.d.ts +52 -10
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
- package/dist/components/VvInputFile/index.d.ts +200 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputText.es.js +1237 -324
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
- package/dist/components/VvInputText/index.d.ts +99 -29
- package/dist/components/VvNav/VvNav.es.js +135 -56
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +72 -26
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +160 -103
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +251 -238
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +191 -75
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
- package/dist/components/VvTab/index.d.ts +4 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +3534 -1650
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +99 -4
- package/dist/composables/alert/useInjectAlert.d.ts +1 -6
- package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
- package/dist/composables/group/useProvideGroupState.d.ts +3 -3
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +92 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/usePersistence.d.ts +2 -0
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +34 -32
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +99 -43
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +97 -38
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +267 -267
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +90 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +272 -81
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Button/Button.settings.d.ts +0 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/test/expect.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/generic.d.ts +1 -2
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +78 -78
- package/src/Volver.ts +31 -20
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +121 -58
- package/src/components/VvAccordion/index.ts +8 -23
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
- package/src/components/VvAccordionGroup/index.ts +6 -6
- package/src/components/VvAction/VvAction.vue +17 -5
- package/src/components/VvAlert/index.ts +14 -9
- package/src/components/VvAlertGroup/index.ts +3 -15
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +17 -7
- package/src/components/VvButton/index.ts +9 -16
- package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
- package/src/components/VvCombobox/VvCombobox.vue +15 -12
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvDropdown/VvDropdown.vue +11 -2
- package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
- package/src/components/VvDropdown/index.ts +35 -1
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +395 -0
- package/src/components/VvInputFile/index.ts +135 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +141 -33
- package/src/components/VvInputText/index.ts +31 -16
- package/src/components/VvNav/VvNav.vue +4 -2
- package/src/components/VvRadio/index.ts +5 -5
- package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +5 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/alert/useAlert.ts +12 -9
- package/src/composables/dropdown/useProvideDropdown.ts +4 -4
- package/src/composables/group/useInjectedGroupState.ts +20 -16
- package/src/composables/group/useProvideGroupState.ts +10 -15
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/usePersistence.ts +76 -0
- package/src/composables/useUniqueId.ts +2 -2
- package/src/constants.ts +47 -32
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +108 -31
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Button/Button.settings.ts +1 -4
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/InputText/InputText.test.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Progress/Progress.test.ts +1 -1
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/argTypes.ts +1 -1
- package/src/test/expect.ts +2 -4
- package/src/types/alert.ts +11 -7
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +3 -3
- package/src/types/group.ts +22 -14
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +2 -3
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
+
import { uid } from "uid";
|
|
3
|
+
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
4
|
+
StorageType2["local"] = "local";
|
|
5
|
+
StorageType2["session"] = "session";
|
|
6
|
+
return StorageType2;
|
|
7
|
+
})(StorageType || {});
|
|
3
8
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
4
9
|
Strategy2["absolute"] = "absolute";
|
|
5
10
|
Strategy2["fixed"] = "fixed";
|
|
@@ -34,15 +39,17 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
34
39
|
ButtonType2["reset"] = "reset";
|
|
35
40
|
return ButtonType2;
|
|
36
41
|
})(ButtonType || {});
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
-
})(
|
|
42
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
43
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
44
|
+
ActionTag2["routerLink"] = "router-link";
|
|
45
|
+
ActionTag2["a"] = "a";
|
|
46
|
+
ActionTag2["button"] = "button";
|
|
47
|
+
return ActionTag2;
|
|
48
|
+
})(ActionTag || {});
|
|
44
49
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
45
|
-
const INJECTION_KEY_RADIO_GROUP = Symbol.for(
|
|
50
|
+
const INJECTION_KEY_RADIO_GROUP = Symbol.for(
|
|
51
|
+
"radioGroup"
|
|
52
|
+
);
|
|
46
53
|
const LinkProps = {
|
|
47
54
|
/**
|
|
48
55
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -58,10 +65,7 @@ const LinkProps = {
|
|
|
58
65
|
/**
|
|
59
66
|
* Anchor target
|
|
60
67
|
*/
|
|
61
|
-
target:
|
|
62
|
-
type: String,
|
|
63
|
-
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
64
|
-
},
|
|
68
|
+
target: String,
|
|
65
69
|
/**
|
|
66
70
|
* Anchor rel
|
|
67
71
|
*/
|
|
@@ -74,27 +78,33 @@ const ValidProps = {
|
|
|
74
78
|
/**
|
|
75
79
|
* Valid status
|
|
76
80
|
*/
|
|
77
|
-
valid: Boolean,
|
|
81
|
+
valid: { type: Boolean, default: false },
|
|
78
82
|
/**
|
|
79
83
|
* Valid label
|
|
80
84
|
*/
|
|
81
|
-
validLabel: [String, Array]
|
|
85
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
82
86
|
};
|
|
83
87
|
const InvalidProps = {
|
|
84
88
|
/**
|
|
85
89
|
* Invalid status
|
|
86
90
|
*/
|
|
87
|
-
invalid:
|
|
91
|
+
invalid: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
},
|
|
88
95
|
/**
|
|
89
96
|
* Invalid label
|
|
90
97
|
*/
|
|
91
|
-
invalidLabel: [String, Array]
|
|
98
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
92
99
|
};
|
|
93
100
|
const LoadingProps = {
|
|
94
101
|
/**
|
|
95
102
|
* Loading status
|
|
96
103
|
*/
|
|
97
|
-
loading:
|
|
104
|
+
loading: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
98
108
|
/**
|
|
99
109
|
* Loading label
|
|
100
110
|
*/
|
|
@@ -107,43 +117,64 @@ const DisabledProps = {
|
|
|
107
117
|
/**
|
|
108
118
|
* Whether the form control is disabled
|
|
109
119
|
*/
|
|
110
|
-
disabled:
|
|
120
|
+
disabled: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false
|
|
123
|
+
}
|
|
111
124
|
};
|
|
112
125
|
const ActiveProps = {
|
|
113
126
|
/**
|
|
114
127
|
* Whether the item is active
|
|
115
128
|
*/
|
|
116
|
-
active:
|
|
129
|
+
active: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false
|
|
132
|
+
}
|
|
117
133
|
};
|
|
118
134
|
const CurrentProps = {
|
|
119
135
|
/**
|
|
120
136
|
* Whether the item is current
|
|
121
137
|
*/
|
|
122
|
-
current:
|
|
138
|
+
current: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: false
|
|
141
|
+
}
|
|
123
142
|
};
|
|
124
143
|
const PressedProps = {
|
|
125
144
|
/**
|
|
126
145
|
* Whether the item is pressed
|
|
127
146
|
*/
|
|
128
|
-
pressed:
|
|
147
|
+
pressed: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: false
|
|
150
|
+
}
|
|
129
151
|
};
|
|
130
152
|
const LabelProps = {
|
|
131
153
|
/**
|
|
132
154
|
* The item label
|
|
133
155
|
*/
|
|
134
|
-
label:
|
|
156
|
+
label: {
|
|
157
|
+
type: [String, Number],
|
|
158
|
+
default: void 0
|
|
159
|
+
}
|
|
135
160
|
};
|
|
136
161
|
const ReadonlyProps = {
|
|
137
162
|
/**
|
|
138
163
|
* The value is not editable
|
|
139
164
|
*/
|
|
140
|
-
readonly:
|
|
165
|
+
readonly: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false
|
|
168
|
+
}
|
|
141
169
|
};
|
|
142
170
|
const ModifiersProps = {
|
|
143
171
|
/**
|
|
144
172
|
* Component BEM modifiers
|
|
145
173
|
*/
|
|
146
|
-
modifiers:
|
|
174
|
+
modifiers: {
|
|
175
|
+
type: [String, Array],
|
|
176
|
+
default: void 0
|
|
177
|
+
}
|
|
147
178
|
};
|
|
148
179
|
const HintProps = {
|
|
149
180
|
hintLabel: { type: String, default: "" }
|
|
@@ -153,7 +184,10 @@ const HintProps = {
|
|
|
153
184
|
* VvIcon name or props
|
|
154
185
|
* @see VVIcon
|
|
155
186
|
*/
|
|
156
|
-
icon: {
|
|
187
|
+
icon: {
|
|
188
|
+
type: [String, Object],
|
|
189
|
+
default: void 0
|
|
190
|
+
},
|
|
157
191
|
/**
|
|
158
192
|
* VvIcon position
|
|
159
193
|
*/
|
|
@@ -198,7 +232,8 @@ const IdProps = {
|
|
|
198
232
|
* Dropdown show / hide transition name
|
|
199
233
|
*/
|
|
200
234
|
transitionName: {
|
|
201
|
-
type: String
|
|
235
|
+
type: String,
|
|
236
|
+
default: void 0
|
|
202
237
|
},
|
|
203
238
|
/**
|
|
204
239
|
* Offset of the dropdown from the trigger
|
|
@@ -266,7 +301,8 @@ const IdProps = {
|
|
|
266
301
|
* Set dropdown width to the same as the trigger
|
|
267
302
|
*/
|
|
268
303
|
triggerWidth: {
|
|
269
|
-
type: Boolean
|
|
304
|
+
type: Boolean,
|
|
305
|
+
default: false
|
|
270
306
|
}
|
|
271
307
|
});
|
|
272
308
|
const IdNameProps = {
|
|
@@ -293,11 +329,17 @@ const CheckboxRadioProps = {
|
|
|
293
329
|
* Input value
|
|
294
330
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
295
331
|
*/
|
|
296
|
-
value:
|
|
332
|
+
value: {
|
|
333
|
+
type: [String, Number, Boolean],
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
297
336
|
/**
|
|
298
337
|
* Input value
|
|
299
338
|
*/
|
|
300
|
-
modelValue:
|
|
339
|
+
modelValue: {
|
|
340
|
+
type: [Object, Number, Boolean, String],
|
|
341
|
+
default: void 0
|
|
342
|
+
}
|
|
301
343
|
};
|
|
302
344
|
({
|
|
303
345
|
...DisabledProps,
|
|
@@ -320,8 +362,83 @@ const CheckboxRadioProps = {
|
|
|
320
362
|
ariaLabel: {
|
|
321
363
|
type: String,
|
|
322
364
|
default: void 0
|
|
365
|
+
},
|
|
366
|
+
/**
|
|
367
|
+
* Default tag for the action
|
|
368
|
+
*/
|
|
369
|
+
defaultTag: {
|
|
370
|
+
type: String,
|
|
371
|
+
default: ActionTag.button
|
|
323
372
|
}
|
|
324
373
|
});
|
|
374
|
+
({
|
|
375
|
+
storageType: {
|
|
376
|
+
type: String,
|
|
377
|
+
default: StorageType.local,
|
|
378
|
+
validator: (value) => Object.values(StorageType).includes(value)
|
|
379
|
+
},
|
|
380
|
+
storageKey: String
|
|
381
|
+
});
|
|
382
|
+
function useInjectedGroupState(groupKey) {
|
|
383
|
+
const group = inject(groupKey, void 0);
|
|
384
|
+
const isInGroup = computed(() => group !== void 0);
|
|
385
|
+
function getGroupOrLocalRef(propName, props, emit) {
|
|
386
|
+
const groupPropValue = group == null ? void 0 : group[propName];
|
|
387
|
+
if (groupPropValue) {
|
|
388
|
+
return computed({
|
|
389
|
+
get() {
|
|
390
|
+
return groupPropValue.value;
|
|
391
|
+
},
|
|
392
|
+
set(value) {
|
|
393
|
+
groupPropValue.value = value;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
const propRef = toRef(props, propName);
|
|
398
|
+
return computed({
|
|
399
|
+
get() {
|
|
400
|
+
return propRef.value;
|
|
401
|
+
},
|
|
402
|
+
set(value) {
|
|
403
|
+
if (emit) {
|
|
404
|
+
emit(`update:${propName}`, value);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
group,
|
|
411
|
+
isInGroup,
|
|
412
|
+
getGroupOrLocalRef
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
const VvRadioProps = CheckboxRadioProps;
|
|
416
|
+
const VvRadioEvents = ["click", "update:modelValue", "change", "blur"];
|
|
417
|
+
function useGroupProps(props, emit) {
|
|
418
|
+
const { id } = toRefs(props);
|
|
419
|
+
const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_RADIO_GROUP);
|
|
420
|
+
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
421
|
+
const valid = getGroupOrLocalRef("valid", props);
|
|
422
|
+
const invalid = getGroupOrLocalRef("invalid", props);
|
|
423
|
+
const readonly = computed(
|
|
424
|
+
() => Boolean(props.readonly || (group == null ? void 0 : group.readonly.value))
|
|
425
|
+
);
|
|
426
|
+
const disabled = computed(
|
|
427
|
+
() => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
|
|
428
|
+
);
|
|
429
|
+
return {
|
|
430
|
+
// local props
|
|
431
|
+
id,
|
|
432
|
+
// global props
|
|
433
|
+
group,
|
|
434
|
+
isInGroup,
|
|
435
|
+
modelValue,
|
|
436
|
+
valid,
|
|
437
|
+
invalid,
|
|
438
|
+
readonly,
|
|
439
|
+
disabled
|
|
440
|
+
};
|
|
441
|
+
}
|
|
325
442
|
function equals(obj1, obj2, field) {
|
|
326
443
|
if (field) {
|
|
327
444
|
return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
|
|
@@ -401,77 +518,9 @@ function contains(value, list) {
|
|
|
401
518
|
}
|
|
402
519
|
return false;
|
|
403
520
|
}
|
|
404
|
-
function isEmpty(value) {
|
|
405
|
-
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));
|
|
406
|
-
}
|
|
407
521
|
function isString(value) {
|
|
408
522
|
return typeof value === "string" || value instanceof String;
|
|
409
523
|
}
|
|
410
|
-
function useInjectedGroupState(groupKey) {
|
|
411
|
-
const group = inject(groupKey, void 0);
|
|
412
|
-
const isInGroup = computed(() => !isEmpty(group));
|
|
413
|
-
function getGroupOrLocalRef(propName, props, emit) {
|
|
414
|
-
if (group == null ? void 0 : group.value) {
|
|
415
|
-
const groupPropValue = unref(group.value)[propName];
|
|
416
|
-
return computed({
|
|
417
|
-
get() {
|
|
418
|
-
return groupPropValue == null ? void 0 : groupPropValue.value;
|
|
419
|
-
},
|
|
420
|
-
set(value) {
|
|
421
|
-
groupPropValue.value = value;
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
const propRef = toRef(props, propName);
|
|
426
|
-
return computed({
|
|
427
|
-
get() {
|
|
428
|
-
return propRef.value;
|
|
429
|
-
},
|
|
430
|
-
set(value) {
|
|
431
|
-
if (emit)
|
|
432
|
-
emit(`update:${propName}`, value);
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
return {
|
|
437
|
-
group,
|
|
438
|
-
isInGroup,
|
|
439
|
-
getGroupOrLocalRef
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
const VvRadioProps = CheckboxRadioProps;
|
|
443
|
-
const VvRadioEvents = ["click", "update:modelValue", "change", "blur"];
|
|
444
|
-
function useGroupProps(props, emit) {
|
|
445
|
-
const { id } = toRefs(props);
|
|
446
|
-
const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_RADIO_GROUP);
|
|
447
|
-
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
448
|
-
const valid = getGroupOrLocalRef("valid", props);
|
|
449
|
-
const invalid = getGroupOrLocalRef("invalid", props);
|
|
450
|
-
const readonly = computed(
|
|
451
|
-
() => {
|
|
452
|
-
var _a;
|
|
453
|
-
return Boolean(props.readonly || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.readonly.value));
|
|
454
|
-
}
|
|
455
|
-
);
|
|
456
|
-
const disabled = computed(
|
|
457
|
-
() => {
|
|
458
|
-
var _a;
|
|
459
|
-
return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
|
|
460
|
-
}
|
|
461
|
-
);
|
|
462
|
-
return {
|
|
463
|
-
// local props
|
|
464
|
-
id,
|
|
465
|
-
// global props
|
|
466
|
-
group,
|
|
467
|
-
isInGroup,
|
|
468
|
-
modelValue,
|
|
469
|
-
valid,
|
|
470
|
-
invalid,
|
|
471
|
-
readonly,
|
|
472
|
-
disabled
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
524
|
function joinLines(items) {
|
|
476
525
|
if (Array.isArray(items)) {
|
|
477
526
|
return items.filter((item) => isString(item)).join(" ");
|
|
@@ -646,7 +695,7 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
646
695
|
}, {});
|
|
647
696
|
});
|
|
648
697
|
}
|
|
649
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
698
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
650
699
|
function useModifiers(prefix, modifiers, others) {
|
|
651
700
|
return computed(() => {
|
|
652
701
|
const toReturn = {
|
|
@@ -679,8 +728,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
679
728
|
...__default__,
|
|
680
729
|
props: VvRadioProps,
|
|
681
730
|
emits: VvRadioEvents,
|
|
682
|
-
setup(__props, { emit }) {
|
|
731
|
+
setup(__props, { emit: __emit }) {
|
|
683
732
|
const props = __props;
|
|
733
|
+
const emit = __emit;
|
|
684
734
|
const slots = useSlots();
|
|
685
735
|
const propsDefaults = useDefaults(
|
|
686
736
|
"VvRadio",
|
|
@@ -761,12 +811,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
761
811
|
[vModelRadio, unref(localModelValue)]
|
|
762
812
|
]),
|
|
763
813
|
renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
|
|
764
|
-
createTextVNode(
|
|
814
|
+
createTextVNode(
|
|
815
|
+
toDisplayString(_ctx.label),
|
|
816
|
+
1
|
|
817
|
+
/* TEXT */
|
|
818
|
+
)
|
|
765
819
|
]),
|
|
766
820
|
createVNode(unref(HintSlot), {
|
|
767
821
|
id: unref(hasHintId),
|
|
768
822
|
class: "vv-radio__hint"
|
|
769
|
-
}, createSlots({
|
|
823
|
+
}, createSlots({
|
|
824
|
+
_: 2
|
|
825
|
+
/* DYNAMIC */
|
|
826
|
+
}, [
|
|
770
827
|
_ctx.$slots.hint ? {
|
|
771
828
|
name: "hint",
|
|
772
829
|
fn: withCtx(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
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.local="local",e.session="session",e))(l||{}),a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const r=Symbol.for("volver"),u=Symbol.for("radioGroup"),d={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},s={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},v={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},f={disabled:{type:Boolean,default:!1}},c=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),p={readonly:{type:Boolean,default:!1}},b={modifiers:{type:[String,Array],default:void 0}},m={hintLabel:{type:String,default:""}};o.before;const g={tabindex:{type:[String,Number],default:0}},h={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const y={...{...h,name:{type:String,required:!0}},...g,...d,...s,...m,...f,...p,...b,...c,...v,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};i.button,n.button,l.local;const S=y;function L(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)}})}}}(u),r=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:r,valid:d,invalid:s,readonly:v,disabled:f}}function O(e,t,l){return l?$(e,l)===$(t,l):B(e,t)}function B(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(!B(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],!B(e[n],t[n]))return!1;return!0}return e!=e&&t!=t}function $(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 V(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function k(t,l,a){const o=e.inject(r),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 A=["for"],R=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvRadio",props:S,emits:["click","update:modelValue","change","blur"],setup(l,{emit:a}){const o=l,i=a,n=e.useSlots(),r=k("VvRadio",S,o),{id:u,disabled:d,readonly:s,modelValue:v,valid:f,invalid:c}=L(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)),y=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(O(e,l))return!0;return!1}(o.value,v.value):O(o.value,v.value))),$=e.computed((()=>!["string","number","boolean"].includes(typeof o.value)||o.value)),x=e.computed({get:()=>B.value?$.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((()=>V(a.value.invalidLabel))),i=e.computed((()=>V(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($),tabindex:e.unref(m),"aria-invalid":e.unref(y),"aria-describedby":e.unref(I)?e.unref(b):void 0,"aria-errormessage":e.unref(C)?e.unref(b):void 0},null,8,R),[[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,A))}})}));
|
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
value:
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
value: {
|
|
3
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: (ObjectConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
loading: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
5
14
|
loadingLabel: {
|
|
6
15
|
type: StringConstructor;
|
|
7
16
|
default: string;
|
|
8
17
|
};
|
|
9
|
-
label:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
label: {
|
|
19
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
modifiers: {
|
|
23
|
+
type: globalThis.PropType<string | string[]>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
readonly: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
13
34
|
hintLabel: {
|
|
14
35
|
type: StringConstructor;
|
|
15
36
|
default: string;
|
|
16
37
|
};
|
|
17
|
-
invalid:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
38
|
+
invalid: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
invalidLabel: {
|
|
43
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
valid: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
validLabel: {
|
|
51
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
21
54
|
tabindex: {
|
|
22
55
|
type: (StringConstructor | NumberConstructor)[];
|
|
23
56
|
default: number;
|
|
@@ -27,26 +60,61 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
60
|
required: boolean;
|
|
28
61
|
};
|
|
29
62
|
id: (StringConstructor | NumberConstructor)[];
|
|
30
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
63
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
64
|
+
[x: string]: (...args: any[]) => void;
|
|
65
|
+
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
66
|
+
value: {
|
|
67
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
modelValue: {
|
|
71
|
+
type: (ObjectConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
loading: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
34
78
|
loadingLabel: {
|
|
35
79
|
type: StringConstructor;
|
|
36
80
|
default: string;
|
|
37
81
|
};
|
|
38
|
-
label:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
82
|
+
label: {
|
|
83
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
modifiers: {
|
|
87
|
+
type: globalThis.PropType<string | string[]>;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
readonly: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
94
|
+
disabled: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
42
98
|
hintLabel: {
|
|
43
99
|
type: StringConstructor;
|
|
44
100
|
default: string;
|
|
45
101
|
};
|
|
46
|
-
invalid:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
102
|
+
invalid: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
invalidLabel: {
|
|
107
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
108
|
+
default: undefined;
|
|
109
|
+
};
|
|
110
|
+
valid: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
validLabel: {
|
|
115
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
50
118
|
tabindex: {
|
|
51
119
|
type: (StringConstructor | NumberConstructor)[];
|
|
52
120
|
default: number;
|
|
@@ -56,20 +124,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
56
124
|
required: boolean;
|
|
57
125
|
};
|
|
58
126
|
id: (StringConstructor | NumberConstructor)[];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly: boolean;
|
|
127
|
+
}>>, {
|
|
128
|
+
label: string | number;
|
|
129
|
+
value: string | number | boolean;
|
|
63
130
|
disabled: boolean;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
131
|
+
modelValue: string | number | boolean | Record<string, any>;
|
|
132
|
+
modifiers: string | string[];
|
|
133
|
+
readonly: boolean;
|
|
67
134
|
loading: boolean;
|
|
68
135
|
loadingLabel: string;
|
|
69
136
|
hintLabel: string;
|
|
137
|
+
invalid: boolean;
|
|
138
|
+
invalidLabel: string | unknown[];
|
|
139
|
+
valid: boolean;
|
|
140
|
+
validLabel: string | unknown[];
|
|
141
|
+
tabindex: string | number;
|
|
70
142
|
}, {}>, {
|
|
71
143
|
default?(_: {
|
|
72
|
-
value:
|
|
144
|
+
value: unknown;
|
|
73
145
|
}): any;
|
|
74
146
|
hint?(_: {
|
|
75
147
|
modelValue: unknown;
|