@volverjs/ui-vue 0.0.1-beta.8 → 0.0.2
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 +21 -0
- package/README.md +108 -56
- package/bin/icons.cjs +73 -0
- package/bin/icons.js +75 -0
- package/dist/{DesignSystem.d.ts → Volver.d.ts} +22 -18
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -0
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
- package/dist/components/VvAccordion/index.d.ts +46 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +77 -151
- package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +30 -13
- package/dist/components/VvBadge/VvBadge.es.js +62 -0
- package/dist/components/VvBadge/VvBadge.umd.js +1 -0
- package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -54
- package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +93 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +33 -107
- package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +2 -3
- package/dist/components/VvButton/VvButton.es.js +439 -0
- package/dist/components/VvButton/VvButton.umd.js +1 -0
- package/dist/components/VvButton/VvButton.vue.d.ts +100 -199
- package/dist/components/VvButton/index.d.ts +132 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +107 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +92 -186
- package/dist/components/VvButtonGroup/index.d.ts +54 -0
- package/dist/components/VvCard/VvCard.es.js +77 -0
- package/dist/components/VvCard/VvCard.umd.js +1 -0
- package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
- package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +357 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +74 -0
- package/dist/components/VvCheckbox/index.d.ts +54 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +435 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +82 -0
- package/dist/components/VvCheckboxGroup/index.d.ts +32 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +775 -0
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -0
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +175 -0
- package/dist/components/VvCombobox/index.d.ts +108 -0
- package/dist/components/VvDialog/VvDialog.es.js +200 -0
- package/dist/components/VvDialog/VvDialog.umd.js +1 -0
- package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
- package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
- package/dist/components/VvDropdown/VvDropdown.es.js +227 -0
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -0
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +59 -146
- package/dist/components/VvDropdown/index.d.ts +49 -0
- package/dist/components/VvIcon/VvIcon.es.js +124 -0
- package/dist/components/VvIcon/VvIcon.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
- package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
- package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
- package/dist/components/VvInputText/VvInputText.es.js +772 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +211 -288
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +182 -0
- package/dist/components/VvProgress/VvProgress.es.js +71 -0
- package/dist/components/VvProgress/VvProgress.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.vue.d.ts +20 -107
- package/dist/components/VvProgress/index.d.ts +30 -0
- package/dist/components/VvRadio/VvRadio.es.js +320 -0
- package/dist/components/VvRadio/VvRadio.umd.js +1 -0
- package/dist/components/VvRadio/VvRadio.vue.d.ts +55 -125
- package/dist/components/VvRadio/index.d.ts +40 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +398 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +56 -238
- package/dist/components/VvRadioGroup/index.d.ts +32 -0
- package/dist/components/VvSelect/VvSelect.es.js +434 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -0
- package/dist/components/VvSelect/VvSelect.vue.d.ts +125 -263
- package/dist/components/VvSelect/index.d.ts +89 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +471 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -0
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -321
- package/dist/components/VvTextarea/index.d.ts +102 -0
- package/dist/components/common/HintSlot.d.ts +12 -6
- package/dist/components/index.d.ts +19 -12
- package/dist/components/index.es.js +2379 -0
- package/dist/components/index.umd.js +1 -0
- package/dist/composables/group/types/IAccordionGroupState.d.ts +3 -4
- package/dist/composables/group/types/IButtonGroupState.d.ts +5 -11
- package/dist/composables/group/types/IGroupState.d.ts +3 -6
- package/dist/composables/group/types/IInputGroup.d.ts +1 -4
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +2 -2
- package/dist/composables/useComponentFocus.d.ts +4 -0
- package/dist/composables/{icons/useComponentIcons.d.ts → useComponentIcons.d.ts} +3 -2
- package/dist/composables/useDebouncedInput.d.ts +2 -0
- package/dist/composables/useOptions.d.ts +6 -0
- package/dist/composables/useTextCount.d.ts +10 -0
- package/dist/constants.d.ts +4 -4
- package/dist/icons.d.ts +1881 -0
- package/dist/icons.es.js +12 -14
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.es.js +2420 -0
- package/dist/index.umd.js +1 -0
- package/dist/props/index.d.ts +328 -30
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +42 -0
- package/dist/resolvers/unplugin.umd.js +1 -0
- package/dist/stories/Accordion/Accordion.settings.d.ts +63 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +58 -0
- package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/stories/Badge/Badge.settings.d.ts +32 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +29 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Button/Button.settings.d.ts +198 -0
- package/dist/stories/Button/Button.test.d.ts +1 -10
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +47 -0
- package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
- package/dist/stories/Card/Card.settings.d.ts +70 -0
- package/dist/stories/Card/Card.test.d.ts +2 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +165 -0
- package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +164 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +286 -0
- package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +55 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +85 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Icon/Icon.settings.d.ts +74 -0
- package/dist/stories/InputText/InputText.settings.d.ts +445 -0
- package/dist/stories/InputText/InputText.test.d.ts +2 -0
- package/dist/stories/Progress/Progress.settings.d.ts +38 -0
- package/dist/stories/Progress/Progress.test.d.ts +2 -0
- package/dist/stories/Radio/Radio.settings.d.ts +139 -0
- package/dist/stories/Radio/Radio.test.d.ts +2 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +164 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/dist/stories/Select/Select.settings.d.ts +284 -0
- package/dist/stories/Select/Select.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +336 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
- package/dist/stories/argTypes.d.ts +842 -0
- package/dist/test/expect.d.ts +3 -0
- package/dist/test/options.d.ts +1 -0
- package/dist/test/sleep.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +82 -95
- package/env.d.ts +1 -0
- package/package.json +199 -126
- package/src/{DesignSystem.ts → Volver.ts} +57 -29
- 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 +94 -78
- package/src/components/VvAccordion/index.ts +72 -0
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +93 -53
- package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +18 -14
- package/src/components/VvBadge/VvBadge.vue +17 -8
- package/src/components/VvBadge/index.ts +6 -0
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +26 -24
- package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -2
- package/src/components/VvButton/VvButton.vue +174 -153
- package/src/components/VvButton/index.ts +189 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +76 -48
- package/src/components/VvButtonGroup/index.ts +16 -0
- package/src/components/VvCard/VvCard.vue +20 -22
- package/src/components/VvCard/{VvCard.ts → index.ts} +1 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +172 -0
- package/src/components/VvCheckbox/index.ts +60 -0
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +85 -0
- package/src/components/VvCheckboxGroup/index.ts +5 -0
- package/src/components/VvCombobox/VvCombobox.vue +261 -0
- package/src/components/VvCombobox/index.ts +88 -0
- package/src/components/VvDialog/VvDialog.vue +69 -67
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +115 -114
- package/src/components/VvDropdown/index.ts +35 -0
- package/src/components/VvIcon/README.md +64 -0
- package/src/components/VvIcon/VvIcon.vue +122 -107
- package/src/components/VvIcon/{VvIcon.ts → index.ts} +17 -8
- package/src/components/VvInputText/VvInputClearAction.ts +53 -0
- package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
- package/src/components/VvInputText/VvInputStepAction.ts +49 -0
- package/src/components/VvInputText/VvInputText.vue +307 -238
- package/src/components/VvInputText/VvInputTextActions.ts +63 -114
- package/src/components/VvInputText/index.ts +140 -0
- package/src/components/VvProgress/VvProgress.vue +29 -29
- package/src/components/VvProgress/index.ts +32 -0
- package/src/components/VvRadio/VvRadio.vue +90 -119
- package/src/components/VvRadio/index.ts +40 -0
- package/src/components/VvRadioGroup/VvRadioGroup.vue +76 -69
- package/src/components/VvRadioGroup/index.ts +5 -0
- package/src/components/VvSelect/VvSelect.vue +187 -186
- package/src/components/VvSelect/index.ts +71 -0
- package/src/components/VvTextarea/VvTextarea.vue +188 -174
- package/src/components/VvTextarea/index.ts +50 -0
- package/src/components/common/HintSlot.ts +167 -137
- package/src/components/index.ts +19 -12
- package/src/composables/group/types/IAccordionGroupState.ts +3 -4
- package/src/composables/group/types/IButtonGroupState.ts +5 -11
- package/src/composables/group/types/IGroupState.ts +4 -6
- package/src/composables/group/types/IInputGroup.ts +1 -4
- package/src/composables/group/useInjectedGroupState.ts +23 -35
- package/src/composables/group/useProvideGroupState.ts +5 -7
- package/src/composables/useComponentFocus.ts +17 -0
- package/src/composables/{icons/useComponentIcons.ts → useComponentIcons.ts} +29 -20
- package/src/composables/useDebouncedInput.ts +25 -0
- package/src/composables/useModifiers.ts +18 -20
- package/src/composables/useOptions.ts +31 -0
- package/src/composables/useTextCount.ts +57 -0
- package/src/constants.ts +5 -7
- package/src/directives/{.README → .gitkeep} +0 -0
- package/src/icons.ts +7 -0
- package/src/index.ts +12 -5
- package/src/props/index.ts +204 -36
- package/src/resolvers/unplugin.ts +112 -0
- package/src/shims.d.ts +13 -0
- package/src/stories/Accordion/Accordion.settings.ts +46 -0
- package/src/stories/Accordion/Accordion.stories.mdx +21 -21
- package/src/stories/Accordion/Accordion.test.ts +61 -0
- package/src/stories/Accordion/AccordionSlots.stories.mdx +46 -70
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +55 -0
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +24 -27
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +50 -0
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +56 -0
- package/src/stories/Badge/Badge.settings.ts +26 -0
- package/src/stories/Badge/Badge.stories.mdx +36 -24
- package/src/stories/Badge/Badge.test.ts +12 -0
- package/src/stories/Badge/BadgeSlots.stories.mdx +20 -0
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +41 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +32 -29
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +50 -0
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +43 -0
- package/src/stories/Button/Button.settings.ts +145 -0
- package/src/stories/Button/Button.stories.mdx +20 -54
- package/src/stories/Button/Button.test.ts +35 -46
- package/src/stories/Button/ButtonIcon.stories.mdx +139 -29
- package/src/stories/Button/ButtonLink.stories.mdx +58 -111
- package/src/stories/Button/ButtonLoading.stories.mdx +89 -62
- package/src/stories/Button/ButtonModifiers.stories.mdx +198 -121
- package/src/stories/Button/ButtonSlots.stories.mdx +83 -95
- package/src/stories/Button/ButtonState.stories.mdx +75 -0
- package/src/stories/Button/ButtonToggle.stories.mdx +50 -0
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -0
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +16 -18
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +35 -0
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +52 -0
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +37 -0
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +52 -110
- package/src/stories/Card/Card.settings.ts +55 -0
- package/src/stories/Card/Card.stories.mdx +27 -11
- package/src/stories/Card/Card.test.ts +23 -0
- package/src/stories/Card/CardSlots.stories.mdx +80 -24
- package/src/stories/Checkbox/Checkbox.settings.ts +43 -0
- package/src/stories/Checkbox/Checkbox.stories.mdx +163 -0
- package/src/stories/Checkbox/Checkbox.test.ts +81 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +68 -0
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +46 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +15 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +134 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +83 -0
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +100 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +67 -0
- package/src/stories/Combobox/Combobox.settings.ts +127 -0
- package/src/stories/Combobox/Combobox.stories.mdx +204 -0
- package/src/stories/Combobox/Combobox.test.ts +103 -0
- package/src/stories/Combobox/ComboboxMultiple.stories.mdx +74 -0
- package/src/stories/Combobox/ComboboxOptions.stories.mdx +100 -0
- package/src/stories/Combobox/ComboboxSlots.stories.mdx +48 -0
- package/src/stories/Dialog/Dialog.settings.ts +45 -0
- package/src/stories/Dialog/Dialog.stories.mdx +42 -16
- package/src/stories/Dialog/Dialog.test.ts +69 -0
- package/src/stories/Dialog/DialogSlots.stories.mdx +63 -0
- package/src/stories/Dropdown/Dropdown.settings.ts +51 -0
- package/src/stories/Dropdown/Dropdown.stories.mdx +102 -29
- package/src/stories/Dropdown/Dropdown.test.ts +43 -0
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +87 -67
- package/src/stories/Icon/Icon.settings.ts +72 -0
- package/src/stories/Icon/Icon.stories.mdx +76 -59
- package/src/stories/Icon/IconsCollection.stories.mdx +68 -0
- package/src/stories/InputText/InputText.settings.ts +221 -0
- package/src/stories/InputText/InputText.stories.mdx +142 -69
- package/src/stories/InputText/InputText.test.ts +125 -0
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +63 -16
- package/src/stories/InputText/InputTextLength.stories.mdx +110 -0
- package/src/stories/InputText/InputTextMinMax.stories.mdx +112 -0
- package/src/stories/InputText/InputTextSlots.stories.mdx +61 -22
- package/src/stories/InputText/InputTextType.stories.mdx +207 -29
- package/src/stories/Progress/Progress.settings.ts +33 -0
- package/src/stories/Progress/Progress.stories.mdx +12 -14
- package/src/stories/Progress/Progress.test.ts +9 -0
- package/src/stories/Radio/Radio.settings.ts +15 -0
- package/src/stories/Radio/Radio.stories.mdx +102 -42
- package/src/stories/Radio/Radio.test.ts +70 -0
- package/src/stories/Radio/RadioSlots.stories.mdx +39 -22
- package/src/stories/RadioGroup/RadioGroup.settings.ts +15 -0
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +115 -54
- package/src/stories/RadioGroup/RadioGroup.test.ts +83 -0
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +83 -41
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +49 -144
- package/src/stories/Select/Select.settings.ts +86 -0
- package/src/stories/Select/Select.stories.mdx +173 -33
- package/src/stories/Select/Select.test.ts +82 -0
- package/src/stories/Select/SelectOptions.stories.mdx +91 -69
- package/src/stories/Select/SelectSlots.stories.mdx +48 -0
- package/src/stories/Textarea/Textarea.settings.ts +96 -0
- package/src/stories/Textarea/Textarea.stories.mdx +167 -47
- package/src/stories/Textarea/Textarea.test.ts +90 -0
- package/src/stories/Textarea/TextareaLength.stories.mdx +110 -0
- package/src/stories/Textarea/TextareaSlots.stories.mdx +61 -23
- package/src/stories/Textarea/TextareatIconPosition.stories.mdx +78 -0
- package/src/stories/argTypes.ts +457 -0
- package/src/test/expect.ts +27 -6
- package/src/test/options.ts +17 -0
- package/src/test/sleep.ts +2 -0
- package/src/test/types.d.ts +14 -0
- package/src/types/generic.d.ts +5 -0
- package/src/utils/ObjectUtilities.ts +253 -244
- package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
- package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
- package/dist/components/VvAccordion/vv-accordion.es.js +0 -262
- package/dist/components/VvAccordion/vv-accordion.umd.js +0 -1
- package/dist/components/VvAccordionGroup/vv-accordion-group.es.js +0 -315
- package/dist/components/VvAccordionGroup/vv-accordion-group.umd.js +0 -1
- package/dist/components/VvBadge/vv-badge.es.js +0 -18
- package/dist/components/VvBadge/vv-badge.umd.js +0 -1
- package/dist/components/VvBreadcrumb/vv-breadcrumb.es.js +0 -206
- package/dist/components/VvBreadcrumb/vv-breadcrumb.umd.js +0 -1
- package/dist/components/VvButton/VvButton.d.ts +0 -115
- package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -23
- package/dist/components/VvButton/vv-button.es.js +0 -422
- package/dist/components/VvButton/vv-button.umd.js +0 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.d.ts +0 -57
- package/dist/components/VvButtonGroup/vv-button-group.es.js +0 -210
- package/dist/components/VvButtonGroup/vv-button-group.umd.js +0 -1
- package/dist/components/VvCard/vv-card.es.js +0 -188
- package/dist/components/VvCard/vv-card.umd.js +0 -1
- package/dist/components/VvCheck/VvCheck.d.ts +0 -47
- package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
- package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
- package/dist/components/VvCheck/vv-check.es.js +0 -321
- package/dist/components/VvCheck/vv-check.umd.js +0 -1
- package/dist/components/VvCheckGroup/VvCheckGroup.d.ts +0 -65
- package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
- package/dist/components/VvCheckGroup/vv-check-group.es.js +0 -452
- package/dist/components/VvCheckGroup/vv-check-group.umd.js +0 -2
- package/dist/components/VvDialog/constants.d.ts +0 -5
- package/dist/components/VvDialog/vv-dialog.es.js +0 -315
- package/dist/components/VvDialog/vv-dialog.umd.js +0 -1
- package/dist/components/VvDropdown/VvDropdown.d.ts +0 -52
- package/dist/components/VvDropdown/vv-dropdown.es.js +0 -236
- package/dist/components/VvDropdown/vv-dropdown.umd.js +0 -1
- package/dist/components/VvIcon/vv-icon.es.js +0 -229
- package/dist/components/VvIcon/vv-icon.umd.js +0 -1
- package/dist/components/VvInputText/VvInputText.d.ts +0 -73
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvInputText/vv-input-text.es.js +0 -725
- package/dist/components/VvInputText/vv-input-text.umd.js +0 -2
- package/dist/components/VvNativeSelect/VvNativeSelect.d.ts +0 -70
- package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +0 -228
- package/dist/components/VvNativeSelect/vv-native-select.es.js +0 -414
- package/dist/components/VvNativeSelect/vv-native-select.umd.js +0 -2
- package/dist/components/VvProgress/VvProgress.d.ts +0 -29
- package/dist/components/VvProgress/vv-progress.es.js +0 -185
- package/dist/components/VvProgress/vv-progress.umd.js +0 -1
- package/dist/components/VvRadio/VvRadio.d.ts +0 -22
- package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
- package/dist/components/VvRadio/vv-radio.es.js +0 -309
- package/dist/components/VvRadio/vv-radio.umd.js +0 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.d.ts +0 -54
- package/dist/components/VvRadioGroup/vv-radio-group.es.js +0 -441
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +0 -2
- package/dist/components/VvSelect/VvSelect.d.ts +0 -99
- package/dist/components/VvSelect/vv-select.es.js +0 -445
- package/dist/components/VvSelect/vv-select.umd.js +0 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +0 -88
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/components/VvTextarea/vv-textarea.es.js +0 -548
- package/dist/components/VvTextarea/vv-textarea.umd.js +0 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +0 -2
- package/dist/composables/focus/useComponentFocus.d.ts +0 -7
- package/dist/composables/options/useOptions.d.ts +0 -5
- package/dist/composables/textLimit/useTextLimit.d.ts +0 -14
- package/dist/stories/Icon/IconList.vue.d.ts +0 -44
- package/dist/stories/utils.d.ts +0 -5
- package/dist/ui-vue.es.js +0 -3001
- package/dist/ui-vue.umd.js +0 -2
- package/src/assets/icons/index.js +0 -7
- package/src/components/VvAccordion/VvAccordion.ts +0 -34
- package/src/components/VvAccordion/useAccordionProps.ts +0 -45
- package/src/components/VvBadge/VvBadge.ts +0 -4
- package/src/components/VvButton/VvButton.ts +0 -117
- package/src/components/VvButton/useButtonGroupProps.ts +0 -51
- package/src/components/VvButtonGroup/VvButtonGroup.ts +0 -37
- package/src/components/VvCheck/VvCheck.ts +0 -48
- package/src/components/VvCheck/VvCheck.vue +0 -149
- package/src/components/VvCheck/useCheckProps.ts +0 -41
- package/src/components/VvCheckGroup/VvCheckGroup.ts +0 -34
- package/src/components/VvCheckGroup/VvCheckGroup.vue +0 -84
- package/src/components/VvDialog/VvDialog.ts +0 -17
- package/src/components/VvDialog/constants.ts +0 -5
- package/src/components/VvDropdown/VvDropdown.ts +0 -46
- package/src/components/VvInputText/VvInputText.ts +0 -66
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvNativeSelect/VvNativeSelect.ts +0 -70
- package/src/components/VvNativeSelect/VvNativeSelect.vue +0 -106
- package/src/components/VvProgress/VvProgress.ts +0 -28
- package/src/components/VvRadio/VvRadio.ts +0 -25
- package/src/components/VvRadio/useRadioProps.ts +0 -40
- package/src/components/VvRadioGroup/VvRadioGroup.ts +0 -25
- package/src/components/VvSelect/VvSelect.ts +0 -91
- package/src/components/VvTextarea/VvTextarea.ts +0 -64
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/composables/debouncedInput/useDebouncedInput.ts +0 -19
- package/src/composables/focus/useComponentFocus.ts +0 -22
- package/src/composables/options/useOptions.ts +0 -27
- package/src/composables/textLimit/useTextLimit.ts +0 -44
- package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
- package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
- package/src/stories/Accordion/accordionTest.js +0 -36
- package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
- package/src/stories/AccordionGroup/AccordionItems.stories.mdx +0 -51
- package/src/stories/AccordionGroup/accordionGroupTest.js +0 -51
- package/src/stories/Badge/BadgeColor.stories.mdx +0 -54
- package/src/stories/Badge/BadgeDot.stories.mdx +0 -20
- package/src/stories/Badge/BadgeTest.js +0 -21
- package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +0 -41
- package/src/stories/Button/ButtonBadge.stories.mdx +0 -34
- package/src/stories/Button/ButtonIconPosition.stories.mdx +0 -106
- package/src/stories/Button/ButtonVariant.stories.mdx +0 -205
- package/src/stories/Button/test.js +0 -41
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +0 -83
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +0 -50
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +0 -40
- package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +0 -38
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +0 -77
- package/src/stories/ButtonGroup/ButtonGroupTest.js +0 -61
- package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +0 -38
- package/src/stories/Card/CardVariant.stories.mdx +0 -37
- package/src/stories/Check/Check.stories.mdx +0 -62
- package/src/stories/Check/CheckBinary.stories.mdx +0 -80
- package/src/stories/Check/CheckDisabled.stories.mdx +0 -30
- package/src/stories/Check/CheckError.stories.mdx +0 -64
- package/src/stories/Check/CheckErrorTests.js +0 -72
- package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
- package/src/stories/Check/CheckPropertyTest.js +0 -101
- package/src/stories/Check/CheckReadonly.stories.mdx +0 -30
- package/src/stories/Check/CheckSlots.stories.mdx +0 -51
- package/src/stories/Check/CheckSwitch.stories.mdx +0 -30
- package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
- package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
- package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupOptionLabel.stories.mdx +0 -48
- package/src/stories/CheckGroup/CheckGroupOptionValue.stories.mdx +0 -48
- package/src/stories/CheckGroup/CheckGroupOptions.stories.mdx +0 -40
- package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
- package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
- package/src/stories/Dialog/DialogAutoClose.stories.mdx +0 -18
- package/src/stories/Dialog/DialogSize.stories.mdx +0 -36
- package/src/stories/Dropdown/DropdownDisabled.stories.mdx +0 -25
- package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +0 -25
- package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +0 -26
- package/src/stories/Dropdown/DropdownMultiple.stories.mdx +0 -56
- package/src/stories/Dropdown/DropdownUseObject.stories.mdx +0 -58
- package/src/stories/Icon/IconList.vue +0 -34
- package/src/stories/Icon/IconPrefix.stories.mdx +0 -79
- package/src/stories/Icon/IconRemote.stories.mdx +0 -39
- package/src/stories/Icon/IconTest.js +0 -27
- package/src/stories/Icon/IconsList.stories.mdx +0 -35
- package/src/stories/InputText/InputTextAutocomplete.stories.mdx +0 -15
- package/src/stories/InputText/InputTextAutofocus.stories.mdx +0 -20
- package/src/stories/InputText/InputTextDisabled.stories.mdx +0 -19
- package/src/stories/InputText/InputTextError.stories.mdx +0 -19
- package/src/stories/InputText/InputTextFloating.stories.mdx +0 -20
- package/src/stories/InputText/InputTextHintLabel.stories.mdx +0 -18
- package/src/stories/InputText/InputTextIcon.stories.mdx +0 -18
- package/src/stories/InputText/InputTextLabel.stories.mdx +0 -15
- package/src/stories/InputText/InputTextLoading.stories.mdx +0 -19
- package/src/stories/InputText/InputTextMax.stories.mdx +0 -31
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +0 -36
- package/src/stories/InputText/InputTextMin.stories.mdx +0 -31
- package/src/stories/InputText/InputTextMinLength.stories.mdx +0 -15
- package/src/stories/InputText/InputTextPlaceholder.stories.mdx +0 -15
- package/src/stories/InputText/InputTextReadonly.stories.mdx +0 -19
- package/src/stories/InputText/InputTextStep.stories.mdx +0 -31
- package/src/stories/InputText/InputTextValid.stories.mdx +0 -19
- package/src/stories/NativeSelect/NativeSelect.stories.mdx +0 -53
- package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +0 -32
- package/src/stories/NativeSelect/NativeSelectError.stories.mdx +0 -36
- package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +0 -34
- package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +0 -42
- package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +0 -27
- package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +0 -78
- package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +0 -34
- package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +0 -66
- package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +0 -36
- package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +0 -66
- package/src/stories/Progress/ProgressDeterminate.stories.mdx +0 -19
- package/src/stories/Radio/RadioDisabled.stories.mdx +0 -30
- package/src/stories/Radio/RadioError.stories.mdx +0 -64
- package/src/stories/Radio/RadioHintLabel.stories.mdx +0 -30
- package/src/stories/Radio/RadioTest.js +0 -89
- package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupError.stories.mdx +0 -31
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +0 -28
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +0 -65
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +0 -65
- package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +0 -31
- package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioOptionsTest.js +0 -78
- package/src/stories/RadioGroup/RadioPropertyTest.js +0 -131
- package/src/stories/RadioGroup/RadioSlotsTest.js +0 -20
- package/src/stories/Select/SelectDisabled.stories.mdx +0 -32
- package/src/stories/Select/SelectMaxValues.stories.mdx +0 -33
- package/src/stories/Select/SelectMultiple.stories.mdx +0 -64
- package/src/stories/Select/SelectSearchable.stories.mdx +0 -80
- package/src/stories/Select/SelectSeparator.stories.mdx +0 -64
- package/src/stories/Select/SelectUseObject.stories.mdx +0 -66
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +0 -24
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaError.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +0 -37
- package/src/stories/Textarea/TextareaFloating.stories.mdx +0 -25
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaIcon.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +0 -39
- package/src/stories/Textarea/TextareaId.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaLabel.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaLimit.stories.mdx +0 -50
- package/src/stories/Textarea/TextareaLoading.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +0 -24
- package/src/stories/Textarea/TextareaName.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +0 -23
- package/src/stories/Textarea/TextareaRequired.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaResizable.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +0 -39
- package/src/stories/Textarea/TextareaValid.stories.mdx +0 -22
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +0 -35
- package/src/stories/stories.scss +0 -35
- package/src/stories/utils.ts +0 -12
- package/src/stories/volver-ui-vue.stories.mdx +0 -77
- package/src/types/.README +0 -0
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import { isRef as z, provide as Z, computed as f, toRefs as j, unref as O, inject as M, toRef as T, watch as U, defineComponent as F, useAttrs as W, ref as J, openBlock as V, createElementBlock as E, mergeProps as S, createElementVNode as P, renderSlot as D, createTextVNode as K, toDisplayString as G, h as Q, useSlots as X, normalizeClass as Y, createCommentVNode as L, Fragment as ee, renderList as te, createBlock as re, createVNode as ne } from "vue";
|
|
2
|
-
import { useFocus as se, toReactive as oe, useVModel as ue } from "@vueuse/core";
|
|
3
|
-
const $ = {
|
|
4
|
-
valid: Boolean,
|
|
5
|
-
validLabel: [String, Array]
|
|
6
|
-
}, q = {
|
|
7
|
-
error: Boolean,
|
|
8
|
-
errorLabel: [String, Array]
|
|
9
|
-
}, ae = {
|
|
10
|
-
hintLabel: { type: String, default: "" }
|
|
11
|
-
}, le = {
|
|
12
|
-
options: { type: Array, default: () => [] },
|
|
13
|
-
optionLabel: { type: [String, Function], default: () => "label" },
|
|
14
|
-
optionValue: { type: [String, Function], default: () => "value" }
|
|
15
|
-
}, ie = ["update:modelValue"], ce = {
|
|
16
|
-
...$,
|
|
17
|
-
...q,
|
|
18
|
-
...le,
|
|
19
|
-
...ae,
|
|
20
|
-
modelValue: null,
|
|
21
|
-
label: { type: String, default: "" },
|
|
22
|
-
name: { type: String, default: "", required: !0 },
|
|
23
|
-
disabled: { type: Boolean, default: !1 },
|
|
24
|
-
readonly: { type: Boolean, default: !1 },
|
|
25
|
-
vertical: { type: Boolean, default: !1 }
|
|
26
|
-
};
|
|
27
|
-
function fe(e) {
|
|
28
|
-
if (Object.keys(e).some(
|
|
29
|
-
(t) => t !== "key" && !z(e[t])
|
|
30
|
-
))
|
|
31
|
-
throw Error("One or more groupState props aren't ref.");
|
|
32
|
-
console.log("PRovide - ", e), Z(
|
|
33
|
-
e.key,
|
|
34
|
-
f(() => e)
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
function de(e) {
|
|
38
|
-
const { options: t, optionLabel: r, optionValue: s } = j(e);
|
|
39
|
-
return {
|
|
40
|
-
options: t,
|
|
41
|
-
getOptionLabel: (o) => typeof o != "object" && o !== null ? o : typeof r.value == "function" ? r.value(o) : o[r.value],
|
|
42
|
-
getOptionValue: (o) => typeof o != "object" && o !== null ? o : typeof s.value == "function" ? s.value(o) : o[s.value]
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const h = {
|
|
46
|
-
equals(e, t, r) {
|
|
47
|
-
return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
|
|
48
|
-
},
|
|
49
|
-
deepEquals(e, t) {
|
|
50
|
-
if (e === t)
|
|
51
|
-
return !0;
|
|
52
|
-
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
53
|
-
const r = Array.isArray(e), s = Array.isArray(t);
|
|
54
|
-
let n, a, o;
|
|
55
|
-
if (r && s) {
|
|
56
|
-
if (a = e.length, a != t.length)
|
|
57
|
-
return !1;
|
|
58
|
-
for (n = a; n-- !== 0; )
|
|
59
|
-
if (!this.deepEquals(e[n], t[n]))
|
|
60
|
-
return !1;
|
|
61
|
-
return !0;
|
|
62
|
-
}
|
|
63
|
-
if (r != s)
|
|
64
|
-
return !1;
|
|
65
|
-
const l = e instanceof Date, u = t instanceof Date;
|
|
66
|
-
if (l != u)
|
|
67
|
-
return !1;
|
|
68
|
-
if (l && u)
|
|
69
|
-
return e.getTime() == t.getTime();
|
|
70
|
-
const p = e instanceof RegExp, y = t instanceof RegExp;
|
|
71
|
-
if (p != y)
|
|
72
|
-
return !1;
|
|
73
|
-
if (p && y)
|
|
74
|
-
return e.toString() == t.toString();
|
|
75
|
-
const c = Object.keys(e);
|
|
76
|
-
if (a = c.length, a !== Object.keys(t).length)
|
|
77
|
-
return !1;
|
|
78
|
-
for (n = a; n-- !== 0; )
|
|
79
|
-
if (!Object.prototype.hasOwnProperty.call(t, c[n]))
|
|
80
|
-
return !1;
|
|
81
|
-
for (n = a; n-- !== 0; )
|
|
82
|
-
if (o = c[n], !this.deepEquals(e[o], t[o]))
|
|
83
|
-
return !1;
|
|
84
|
-
return !0;
|
|
85
|
-
}
|
|
86
|
-
return e !== e && t !== t;
|
|
87
|
-
},
|
|
88
|
-
resolveFieldData(e, t) {
|
|
89
|
-
if (e && Object.keys(e).length && t) {
|
|
90
|
-
if (t.indexOf(".") === -1)
|
|
91
|
-
return e[t];
|
|
92
|
-
{
|
|
93
|
-
const r = t.split(".");
|
|
94
|
-
let s = e;
|
|
95
|
-
for (let n = 0, a = r.length; n < a; ++n) {
|
|
96
|
-
if (e == null)
|
|
97
|
-
return null;
|
|
98
|
-
s = s[r[n]];
|
|
99
|
-
}
|
|
100
|
-
return s;
|
|
101
|
-
}
|
|
102
|
-
} else
|
|
103
|
-
return null;
|
|
104
|
-
},
|
|
105
|
-
isFunction(e) {
|
|
106
|
-
return !!(e && e.constructor && e.call && e.apply);
|
|
107
|
-
},
|
|
108
|
-
findIndexInList(e, t) {
|
|
109
|
-
let r = -1;
|
|
110
|
-
if (t) {
|
|
111
|
-
for (let s = 0; s < t.length; s++)
|
|
112
|
-
if (this.equals(t[s], e)) {
|
|
113
|
-
r = s;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return r;
|
|
118
|
-
},
|
|
119
|
-
contains(e, t) {
|
|
120
|
-
if (e != null && t && t.length) {
|
|
121
|
-
for (const r of t)
|
|
122
|
-
if (this.equals(e, r))
|
|
123
|
-
return !0;
|
|
124
|
-
}
|
|
125
|
-
return !1;
|
|
126
|
-
},
|
|
127
|
-
isEmpty(e) {
|
|
128
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
|
129
|
-
},
|
|
130
|
-
isNotEmpty(e) {
|
|
131
|
-
return !this.isEmpty(e);
|
|
132
|
-
},
|
|
133
|
-
pickBy(e, t) {
|
|
134
|
-
return Object.fromEntries(
|
|
135
|
-
Object.entries(e).filter(([r]) => t(r))
|
|
136
|
-
);
|
|
137
|
-
},
|
|
138
|
-
removeFromList(e, t) {
|
|
139
|
-
const r = this.findIndexInList(e, t);
|
|
140
|
-
return r > -1 ? t.filter((s, n) => n !== r) : t;
|
|
141
|
-
},
|
|
142
|
-
isString(e) {
|
|
143
|
-
return typeof e == "string" || e instanceof String;
|
|
144
|
-
},
|
|
145
|
-
propsToObject(e) {
|
|
146
|
-
return Object.keys(e).reduce((t, r) => {
|
|
147
|
-
var s, n, a, o, l;
|
|
148
|
-
return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (s = e[r]) != null && s.type && (Array.isArray(e[r].type) ? t[r] = ((n = e[r]) == null ? void 0 : n.default) || ((a = e[r]) == null ? void 0 : a.type[0]()) : t[r] = ((o = e[r]) == null ? void 0 : o.default) || ((l = e[r]) == null ? void 0 : l.type())), t;
|
|
149
|
-
}, {});
|
|
150
|
-
},
|
|
151
|
-
filterArray(e, t, r) {
|
|
152
|
-
return e.filter((s) => t.some((n) => typeof n == "string" ? s[r] == n : this.equals(
|
|
153
|
-
s[r],
|
|
154
|
-
n[r]
|
|
155
|
-
)));
|
|
156
|
-
},
|
|
157
|
-
kebabCase(e) {
|
|
158
|
-
var t, r;
|
|
159
|
-
if (e)
|
|
160
|
-
return (r = (t = e.match(
|
|
161
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
162
|
-
)) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
function I(e, t) {
|
|
166
|
-
const r = { [`${e}`]: !0 };
|
|
167
|
-
return {
|
|
168
|
-
bemCssClasses: f(() => Object.keys(t).reduce((n, a) => {
|
|
169
|
-
const o = O(t[a]) || !1;
|
|
170
|
-
if (!o)
|
|
171
|
-
return n;
|
|
172
|
-
if (a === "modifiers") {
|
|
173
|
-
const l = Array.isArray(o) ? o : [o];
|
|
174
|
-
return {
|
|
175
|
-
...n,
|
|
176
|
-
...l.reduce(
|
|
177
|
-
(u, p) => ({
|
|
178
|
-
...u,
|
|
179
|
-
[`${e}--${h.kebabCase(
|
|
180
|
-
p
|
|
181
|
-
)}`]: !0
|
|
182
|
-
}),
|
|
183
|
-
{}
|
|
184
|
-
)
|
|
185
|
-
};
|
|
186
|
-
} else
|
|
187
|
-
return {
|
|
188
|
-
...n,
|
|
189
|
-
[`${e}--${h.kebabCase(a)}`]: o
|
|
190
|
-
};
|
|
191
|
-
}, r) || {})
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
const w = Symbol("VV_RADIO_GROUP"), pe = {
|
|
195
|
-
...$,
|
|
196
|
-
...q,
|
|
197
|
-
value: null,
|
|
198
|
-
modelValue: { type: [Object, Number, Boolean, String] },
|
|
199
|
-
label: { type: String, default: "" },
|
|
200
|
-
disabled: Boolean,
|
|
201
|
-
readonly: Boolean
|
|
202
|
-
}, ye = [
|
|
203
|
-
"click",
|
|
204
|
-
"update:modelValue",
|
|
205
|
-
"change",
|
|
206
|
-
"focus",
|
|
207
|
-
"blur"
|
|
208
|
-
];
|
|
209
|
-
function ve(e) {
|
|
210
|
-
const t = M(e, void 0);
|
|
211
|
-
console.log("Inject - ", t);
|
|
212
|
-
const r = f(() => h.isNotEmpty(t));
|
|
213
|
-
function s(n, a, o) {
|
|
214
|
-
if (t != null && t.value) {
|
|
215
|
-
const l = O(t.value)[n];
|
|
216
|
-
return f({
|
|
217
|
-
get() {
|
|
218
|
-
return l == null ? void 0 : l.value;
|
|
219
|
-
},
|
|
220
|
-
set(u) {
|
|
221
|
-
l.value = u;
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
} else {
|
|
225
|
-
const l = T(a, n);
|
|
226
|
-
return f({
|
|
227
|
-
get() {
|
|
228
|
-
return l.value;
|
|
229
|
-
},
|
|
230
|
-
set(u) {
|
|
231
|
-
o && o(`update:${n}`, u);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return {
|
|
237
|
-
group: t,
|
|
238
|
-
isInGroup: r,
|
|
239
|
-
getGroupOrLocalRef: s
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
function me(e, t) {
|
|
243
|
-
const { group: r, isInGroup: s, getGroupOrLocalRef: n } = ve(w), { valid: a, error: o } = j(e), l = n("modelValue", e, t), u = n("readonly", e), p = n("disabled", e);
|
|
244
|
-
return {
|
|
245
|
-
group: r,
|
|
246
|
-
isInGroup: s,
|
|
247
|
-
valid: a,
|
|
248
|
-
error: o,
|
|
249
|
-
modelValue: l,
|
|
250
|
-
readonly: u,
|
|
251
|
-
disabled: p
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
function ge(e, t) {
|
|
255
|
-
const { focused: r } = se(e);
|
|
256
|
-
return U(r, (s) => {
|
|
257
|
-
t(s ? "focus" : "blur", e.value);
|
|
258
|
-
}), {
|
|
259
|
-
focused: r
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
const he = {
|
|
263
|
-
inheritAttrs: !1
|
|
264
|
-
}, Ae = /* @__PURE__ */ F({
|
|
265
|
-
...he,
|
|
266
|
-
__name: "VvRadio",
|
|
267
|
-
props: pe,
|
|
268
|
-
emits: ye,
|
|
269
|
-
setup(e, { emit: t }) {
|
|
270
|
-
const r = e, s = W(), { disabled: n, readonly: a, modelValue: o, valid: l, error: u } = me(
|
|
271
|
-
r,
|
|
272
|
-
t
|
|
273
|
-
), p = J(), y = f(() => Array.isArray(o.value) ? h.contains(r.value, o.value) : h.equals(r.value, o.value)), { focused: c } = ge(p, t), { bemCssClasses: A } = I("vv-input-radio", {
|
|
274
|
-
valid: l,
|
|
275
|
-
invalid: u
|
|
276
|
-
}), { bemCssClasses: i } = I(
|
|
277
|
-
"vv-input-radio__input",
|
|
278
|
-
{
|
|
279
|
-
checked: y,
|
|
280
|
-
disabled: n,
|
|
281
|
-
readonly: a
|
|
282
|
-
}
|
|
283
|
-
), d = f(() => {
|
|
284
|
-
const { class: m } = s;
|
|
285
|
-
return {
|
|
286
|
-
class: m,
|
|
287
|
-
...A.value
|
|
288
|
-
};
|
|
289
|
-
}), g = f(() => ({
|
|
290
|
-
"focus-visible": c.value,
|
|
291
|
-
...i.value
|
|
292
|
-
})), v = f(() => {
|
|
293
|
-
const { id: m, name: k, style: B } = s, N = h.pickBy(
|
|
294
|
-
s,
|
|
295
|
-
(x) => x.startsWith("data-")
|
|
296
|
-
);
|
|
297
|
-
return {
|
|
298
|
-
for: m || k,
|
|
299
|
-
style: B,
|
|
300
|
-
...N
|
|
301
|
-
};
|
|
302
|
-
}), b = f(() => {
|
|
303
|
-
const { id: m = "", name: k = "" } = s;
|
|
304
|
-
return {
|
|
305
|
-
type: "radio",
|
|
306
|
-
id: m || k,
|
|
307
|
-
name: k,
|
|
308
|
-
value: r.value,
|
|
309
|
-
disabled: n.value,
|
|
310
|
-
readonly: a.value,
|
|
311
|
-
checked: y.value,
|
|
312
|
-
..._.value
|
|
313
|
-
};
|
|
314
|
-
}), _ = f(() => {
|
|
315
|
-
const { name: m } = s, k = h.pickBy(
|
|
316
|
-
s,
|
|
317
|
-
(B) => B.startsWith("aria-")
|
|
318
|
-
);
|
|
319
|
-
return {
|
|
320
|
-
"aria-label": m,
|
|
321
|
-
"aria-checked": y.value,
|
|
322
|
-
...k
|
|
323
|
-
};
|
|
324
|
-
});
|
|
325
|
-
function C() {
|
|
326
|
-
y.value || t("change", r.value), o.value = r.value;
|
|
327
|
-
}
|
|
328
|
-
function H(m) {
|
|
329
|
-
n.value || (t("click", m), c.value = !0);
|
|
330
|
-
}
|
|
331
|
-
return (m, k) => (V(), E("label", S({ class: O(d) }, O(v), { onClick: H }), [
|
|
332
|
-
P("input", S({
|
|
333
|
-
ref_key: "input",
|
|
334
|
-
ref: p,
|
|
335
|
-
class: O(g)
|
|
336
|
-
}, O(b), { onInput: C }), null, 16),
|
|
337
|
-
D(m.$slots, "default", { value: O(o) }, () => [
|
|
338
|
-
K(G(m.label), 1)
|
|
339
|
-
])
|
|
340
|
-
], 16));
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
function R(e) {
|
|
344
|
-
return Array.isArray(e) ? e.filter((t) => h.isString(t)).reduce((t, r) => t.length > 0 ? t + `
|
|
345
|
-
` + r : r, "") : e;
|
|
346
|
-
}
|
|
347
|
-
function Ce(e, t) {
|
|
348
|
-
return {
|
|
349
|
-
name: "HintSlot",
|
|
350
|
-
props: {
|
|
351
|
-
params: { type: Object, default: () => {
|
|
352
|
-
} }
|
|
353
|
-
},
|
|
354
|
-
setup(r) {
|
|
355
|
-
const s = j(e), {
|
|
356
|
-
error: n,
|
|
357
|
-
valid: a,
|
|
358
|
-
hint: o,
|
|
359
|
-
loading: l
|
|
360
|
-
} = t, {
|
|
361
|
-
hintLabel: u,
|
|
362
|
-
modelValue: p,
|
|
363
|
-
valid: y,
|
|
364
|
-
validLabel: c,
|
|
365
|
-
error: A,
|
|
366
|
-
errorLabel: i
|
|
367
|
-
} = s, d = h.resolveFieldData(s, "loading"), g = h.resolveFieldData(
|
|
368
|
-
s,
|
|
369
|
-
"loadingLabel"
|
|
370
|
-
), v = f(() => A.value ? !!(A.value && n || (i == null ? void 0 : i.value) && Array.isArray(i.value) && i.value.length > 0 || (i == null ? void 0 : i.value) && h.isNotEmpty(i.value)) : !1), b = f(() => !!(u && u.value || o || a || c && c.value || v.value || (d == null ? void 0 : d.value) && l || (d == null ? void 0 : d.value) && (g == null ? void 0 : g.value))), _ = f(() => {
|
|
371
|
-
const C = oe({
|
|
372
|
-
hintLabel: u,
|
|
373
|
-
modelValue: p,
|
|
374
|
-
valid: y,
|
|
375
|
-
validLabel: c,
|
|
376
|
-
error: A,
|
|
377
|
-
errorLabel: i,
|
|
378
|
-
loading: d,
|
|
379
|
-
loadingLabel: g,
|
|
380
|
-
...r.params
|
|
381
|
-
});
|
|
382
|
-
return A != null && A.value ? (n == null ? void 0 : n(C)) || R(i == null ? void 0 : i.value) || (u == null ? void 0 : u.value) : y != null && y.value ? (a == null ? void 0 : a(C)) || R(c == null ? void 0 : c.value) || (u == null ? void 0 : u.value) : d != null && d.value ? (l == null ? void 0 : l(C)) || R(g == null ? void 0 : g.value) || (u == null ? void 0 : u.value) : (o == null ? void 0 : o(C)) || R(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
383
|
-
});
|
|
384
|
-
return {
|
|
385
|
-
hasHint: b,
|
|
386
|
-
hintContent: _
|
|
387
|
-
};
|
|
388
|
-
},
|
|
389
|
-
render() {
|
|
390
|
-
if (this.hasHint)
|
|
391
|
-
return Q(
|
|
392
|
-
"pre",
|
|
393
|
-
{ style: { "white-space": "pre" } },
|
|
394
|
-
this.hintContent
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
const Oe = ["textContent"], ke = { class: "vv-input-radio-group__wrapper" }, Ve = /* @__PURE__ */ F({
|
|
400
|
-
__name: "VvRadioGroup",
|
|
401
|
-
props: ce,
|
|
402
|
-
emits: ie,
|
|
403
|
-
setup(e, { emit: t }) {
|
|
404
|
-
const r = e, s = X(), n = ue(r, "modelValue", t), { disabled: a, readonly: o, vertical: l, valid: u, error: p } = j(r);
|
|
405
|
-
fe({
|
|
406
|
-
key: w,
|
|
407
|
-
modelValue: n,
|
|
408
|
-
disabled: a,
|
|
409
|
-
readonly: o
|
|
410
|
-
});
|
|
411
|
-
const { getOptionLabel: c, getOptionValue: A } = de(r), { bemCssClasses: i } = I("vv-input-radio-group", {
|
|
412
|
-
horizontal: f(() => !l.value),
|
|
413
|
-
valid: u,
|
|
414
|
-
invalid: p
|
|
415
|
-
});
|
|
416
|
-
function d(v, b) {
|
|
417
|
-
return {
|
|
418
|
-
id: `${r.name}_opt${b}`,
|
|
419
|
-
name: r.name,
|
|
420
|
-
label: c(v),
|
|
421
|
-
value: A(v)
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
const g = Ce(r, s);
|
|
425
|
-
return (v, b) => (V(), E("fieldset", {
|
|
426
|
-
class: Y(O(i))
|
|
427
|
-
}, [
|
|
428
|
-
v.label ? (V(), E("legend", {
|
|
429
|
-
key: 0,
|
|
430
|
-
textContent: G(v.label)
|
|
431
|
-
}, null, 8, Oe)) : L("", !0),
|
|
432
|
-
P("div", ke, [
|
|
433
|
-
v.options.length > 0 ? (V(!0), E(ee, { key: 0 }, te(v.options, (_, C) => (V(), re(Ae, S({ key: C }, d(_, C)), null, 16))), 128)) : D(v.$slots, "default", { key: 1 })
|
|
434
|
-
]),
|
|
435
|
-
ne(O(g), { class: "vv-input-radio-group__hint" })
|
|
436
|
-
], 2));
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
export {
|
|
440
|
-
Ve as default
|
|
441
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(r,O){typeof exports=="object"&&typeof module<"u"?module.exports=O(require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core"],O):(r=typeof globalThis<"u"?globalThis:r||self,r.VvRadioGroup=O(r.vue,r.core))})(this,function(r,O){"use strict";const E={valid:Boolean,validLabel:[String,Array]},j={error:Boolean,errorLabel:[String,Array]},I={hintLabel:{type:String,default:""}},P={options:{type:Array,default:()=>[]},optionLabel:{type:[String,Function],default:()=>"label"},optionValue:{type:[String,Function],default:()=>"value"}},F=["update:modelValue"],q={...E,...j,...P,...I,modelValue:null,label:{type:String,default:""},name:{type:String,default:"",required:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}};function D(e){if(Object.keys(e).some(t=>t!=="key"&&!r.isRef(e[t])))throw Error("One or more groupState props aren't ref.");console.log("PRovide - ",e),r.provide(e.key,r.computed(()=>e))}function G(e){const{options:t,optionLabel:n,optionValue:o}=r.toRefs(e);return{options:t,getOptionLabel:l=>typeof l!="object"&&l!==null?l:typeof n.value=="function"?n.value(l):l[n.value],getOptionValue:l=>typeof l!="object"&&l!==null?l:typeof o.value=="function"?o.value(l):l[o.value]}}const h={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),o=Array.isArray(t);let s,i,l;if(n&&o){if(i=e.length,i!=t.length)return!1;for(s=i;s--!==0;)if(!this.deepEquals(e[s],t[s]))return!1;return!0}if(n!=o)return!1;const u=e instanceof Date,a=t instanceof Date;if(u!=a)return!1;if(u&&a)return e.getTime()==t.getTime();const p=e instanceof RegExp,y=t instanceof RegExp;if(p!=y)return!1;if(p&&y)return e.toString()==t.toString();const f=Object.keys(e);if(i=f.length,i!==Object.keys(t).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[s]))return!1;for(s=i;s--!==0;)if(l=f[s],!this.deepEquals(e[l],t[l]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let o=e;for(let s=0,i=n.length;s<i;++s){if(e==null)return null;o=o[n[s]]}return o}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let o=0;o<t.length;o++)if(this.equals(t[o],e)){n=o;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((o,s)=>s!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var o,s,i,l,u;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(o=e[n])!=null&&o.type&&(Array.isArray(e[n].type)?t[n]=((s=e[n])==null?void 0:s.default)||((i=e[n])==null?void 0:i.type[0]()):t[n]=((l=e[n])==null?void 0:l.default)||((u=e[n])==null?void 0:u.type())),t},{})},filterArray(e,t,n){return e.filter(o=>t.some(s=>typeof s=="string"?o[n]==s:this.equals(o[n],s[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:t.join("-"))==null?void 0:n.toLowerCase()}};function B(e,t){const n={[`${e}`]:!0};return{bemCssClasses:r.computed(()=>Object.keys(t).reduce((s,i)=>{const l=r.unref(t[i])||!1;if(!l)return s;if(i==="modifiers"){const u=Array.isArray(l)?l:[l];return{...s,...u.reduce((a,p)=>({...a,[`${e}--${h.kebabCase(p)}`]:!0}),{})}}else return{...s,[`${e}--${h.kebabCase(i)}`]:l}},n)||{})}}const S=Symbol("VV_RADIO_GROUP"),$={...E,...j,value:null,modelValue:{type:[Object,Number,Boolean,String]},label:{type:String,default:""},disabled:Boolean,readonly:Boolean},N=["click","update:modelValue","change","focus","blur"];function w(e){const t=r.inject(e,void 0);console.log("Inject - ",t);const n=r.computed(()=>h.isNotEmpty(t));function o(s,i,l){if(t!=null&&t.value){const u=r.unref(t.value)[s];return r.computed({get(){return u==null?void 0:u.value},set(a){u.value=a}})}else{const u=r.toRef(i,s);return r.computed({get(){return u.value},set(a){l&&l(`update:${s}`,a)}})}}return{group:t,isInGroup:n,getGroupOrLocalRef:o}}function x(e,t){const{group:n,isInGroup:o,getGroupOrLocalRef:s}=w(S),{valid:i,error:l}=r.toRefs(e),u=s("modelValue",e,t),a=s("readonly",e),p=s("disabled",e);return{group:n,isInGroup:o,valid:i,error:l,modelValue:u,readonly:a,disabled:p}}function H(e,t){const{focused:n}=O.useFocus(e);return r.watch(n,o=>{t(o?"focus":"blur",e.value)}),{focused:n}}const T={inheritAttrs:!1},z=r.defineComponent({...T,__name:"VvRadio",props:$,emits:N,setup(e,{emit:t}){const n=e,o=r.useAttrs(),{disabled:s,readonly:i,modelValue:l,valid:u,error:a}=x(n,t),p=r.ref(),y=r.computed(()=>Array.isArray(l.value)?h.contains(n.value,l.value):h.equals(n.value,l.value)),{focused:f}=H(p,t),{bemCssClasses:k}=B("vv-input-radio",{valid:u,invalid:a}),{bemCssClasses:c}=B("vv-input-radio__input",{checked:y,disabled:s,readonly:i}),d=r.computed(()=>{const{class:g}=o;return{class:g,...k.value}}),A=r.computed(()=>({"focus-visible":f.value,...c.value})),m=r.computed(()=>{const{id:g,name:_,style:v}=o,J=h.pickBy(o,K=>K.startsWith("data-"));return{for:g||_,style:v,...J}}),b=r.computed(()=>{const{id:g="",name:_=""}=o;return{type:"radio",id:g||_,name:_,value:n.value,disabled:s.value,readonly:i.value,checked:y.value,...R.value}}),R=r.computed(()=>{const{name:g}=o,_=h.pickBy(o,v=>v.startsWith("aria-"));return{"aria-label":g,"aria-checked":y.value,..._}});function C(){y.value||t("change",n.value),l.value=n.value}function W(g){s.value||(t("click",g),f.value=!0)}return(g,_)=>(r.openBlock(),r.createElementBlock("label",r.mergeProps({class:r.unref(d)},r.unref(m),{onClick:W}),[r.createElementVNode("input",r.mergeProps({ref_key:"input",ref:p,class:r.unref(A)},r.unref(b),{onInput:C}),null,16),r.renderSlot(g.$slots,"default",{value:r.unref(l)},()=>[r.createTextVNode(r.toDisplayString(g.label),1)])],16))}});function V(e){return Array.isArray(e)?e.filter(t=>h.isString(t)).reduce((t,n)=>t.length>0?t+`
|
|
2
|
-
`+n:n,""):e}function Z(e,t){return{name:"HintSlot",props:{params:{type:Object,default:()=>{}}},setup(n){const o=r.toRefs(e),{error:s,valid:i,hint:l,loading:u}=t,{hintLabel:a,modelValue:p,valid:y,validLabel:f,error:k,errorLabel:c}=o,d=h.resolveFieldData(o,"loading"),A=h.resolveFieldData(o,"loadingLabel"),m=r.computed(()=>k.value?!!(k.value&&s||(c==null?void 0:c.value)&&Array.isArray(c.value)&&c.value.length>0||(c==null?void 0:c.value)&&h.isNotEmpty(c.value)):!1),b=r.computed(()=>!!(a&&a.value||l||i||f&&f.value||m.value||(d==null?void 0:d.value)&&u||(d==null?void 0:d.value)&&(A==null?void 0:A.value))),R=r.computed(()=>{const C=O.toReactive({hintLabel:a,modelValue:p,valid:y,validLabel:f,error:k,errorLabel:c,loading:d,loadingLabel:A,...n.params});return k!=null&&k.value?(s==null?void 0:s(C))||V(c==null?void 0:c.value)||(a==null?void 0:a.value):y!=null&&y.value?(i==null?void 0:i(C))||V(f==null?void 0:f.value)||(a==null?void 0:a.value):d!=null&&d.value?(u==null?void 0:u(C))||V(A==null?void 0:A.value)||(a==null?void 0:a.value):(l==null?void 0:l(C))||V(a==null?void 0:a.value)||(a==null?void 0:a.value)});return{hasHint:b,hintContent:R}},render(){if(this.hasHint)return r.h("pre",{style:{"white-space":"pre"}},this.hintContent)}}}const M=["textContent"],U={class:"vv-input-radio-group__wrapper"};return r.defineComponent({__name:"VvRadioGroup",props:q,emits:F,setup(e,{emit:t}){const n=e,o=r.useSlots(),s=O.useVModel(n,"modelValue",t),{disabled:i,readonly:l,vertical:u,valid:a,error:p}=r.toRefs(n);D({key:S,modelValue:s,disabled:i,readonly:l});const{getOptionLabel:f,getOptionValue:k}=G(n),{bemCssClasses:c}=B("vv-input-radio-group",{horizontal:r.computed(()=>!u.value),valid:a,invalid:p});function d(m,b){return{id:`${n.name}_opt${b}`,name:n.name,label:f(m),value:k(m)}}const A=Z(n,o);return(m,b)=>(r.openBlock(),r.createElementBlock("fieldset",{class:r.normalizeClass(r.unref(c))},[m.label?(r.openBlock(),r.createElementBlock("legend",{key:0,textContent:r.toDisplayString(m.label)},null,8,M)):r.createCommentVNode("",!0),r.createElementVNode("div",U,[m.options.length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(m.options,(R,C)=>(r.openBlock(),r.createBlock(z,r.mergeProps({key:C},d(R,C)),null,16))),128)):r.renderSlot(m.$slots,"default",{key:1})]),r.createVNode(r.unref(A),{class:"vv-input-radio-group__hint"})],2))}})});
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
import type { Option } from '../VvDropdown/VvDropdown';
|
|
3
|
-
export declare const VvSelectProps: {
|
|
4
|
-
/**
|
|
5
|
-
* modelValue can be an Object, a String or an Array of Object/String
|
|
6
|
-
*/
|
|
7
|
-
modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
|
|
8
|
-
/**
|
|
9
|
-
* Select input label
|
|
10
|
-
*/
|
|
11
|
-
label: StringConstructor;
|
|
12
|
-
/**
|
|
13
|
-
* Label of "no results" options
|
|
14
|
-
*/
|
|
15
|
-
labelNoResult: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Select input placeholder
|
|
21
|
-
*/
|
|
22
|
-
placeholder: StringConstructor;
|
|
23
|
-
/**
|
|
24
|
-
* Use input text to search on options
|
|
25
|
-
*/
|
|
26
|
-
searchable: BooleanConstructor;
|
|
27
|
-
/**
|
|
28
|
-
* On searchable select is the input search placeholder
|
|
29
|
-
*/
|
|
30
|
-
searchPlaceholder: StringConstructor;
|
|
31
|
-
/**
|
|
32
|
-
* the input search debounce time in ms
|
|
33
|
-
*/
|
|
34
|
-
debounceSearch: {
|
|
35
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
36
|
-
default: number;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Select options, can be string[] or object[]
|
|
40
|
-
*/
|
|
41
|
-
options: {
|
|
42
|
-
type: PropType<(string | Option)[]>;
|
|
43
|
-
required: boolean;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Use objects as modelValue (object or object[])
|
|
47
|
-
*/
|
|
48
|
-
useObject: BooleanConstructor;
|
|
49
|
-
/**
|
|
50
|
-
* Manage modelValue as string[] or object[]
|
|
51
|
-
*/
|
|
52
|
-
multiple: BooleanConstructor;
|
|
53
|
-
/**
|
|
54
|
-
* The max number of selected values
|
|
55
|
-
*/
|
|
56
|
-
maxValues: (StringConstructor | NumberConstructor)[];
|
|
57
|
-
/**
|
|
58
|
-
* The select label separator visible to the user
|
|
59
|
-
*/
|
|
60
|
-
separator: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
default: string;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Used when options are objects: key to use for option label
|
|
66
|
-
*/
|
|
67
|
-
labelKey: {
|
|
68
|
-
type: StringConstructor;
|
|
69
|
-
default: string;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Used when options are objects: key to use for option label
|
|
73
|
-
*/
|
|
74
|
-
valueKey: {
|
|
75
|
-
type: StringConstructor;
|
|
76
|
-
default: string;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Icon name of icon in left position
|
|
80
|
-
*/
|
|
81
|
-
iconLeft: StringConstructor;
|
|
82
|
-
/**
|
|
83
|
-
* Icon name of icon in right position
|
|
84
|
-
*/
|
|
85
|
-
iconRight: StringConstructor;
|
|
86
|
-
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
87
|
-
readonly: BooleanConstructor;
|
|
88
|
-
disabled: BooleanConstructor;
|
|
89
|
-
loading: BooleanConstructor;
|
|
90
|
-
loadingLabel: StringConstructor;
|
|
91
|
-
hintLabel: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
error: BooleanConstructor;
|
|
96
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
97
|
-
valid: BooleanConstructor;
|
|
98
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
99
|
-
};
|