@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
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { isRef as E, provide as ee, computed as c, toRefs as j, unref as f, h as te, inject as ne, toRef as re, defineComponent as w, useSlots as I, ref as oe, watchEffect as se, watch as ue, onMounted as ae, openBlock as O, createElementBlock as P, normalizeClass as H, withDirectives as le, createElementVNode as D, vModelCheckbox as ie, renderSlot as N, createTextVNode as ce, toDisplayString as K, createVNode as M, createCommentVNode as fe, Fragment as ve, renderList as de, createBlock as pe, mergeProps as ye } from "vue";
|
|
2
|
+
import { toReactive as me, useVModel as he } from "@vueuse/core";
|
|
3
|
+
import { nanoid as ge } from "nanoid";
|
|
4
|
+
const F = "VV_CHECK_GROUP";
|
|
5
|
+
function be(t) {
|
|
6
|
+
if (Object.keys(t).some(
|
|
7
|
+
(e) => e !== "key" && !E(t[e])
|
|
8
|
+
))
|
|
9
|
+
throw Error("One or more groupState props aren't ref.");
|
|
10
|
+
ee(
|
|
11
|
+
t.key,
|
|
12
|
+
c(() => t)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function ke(t) {
|
|
16
|
+
const { options: e, labelKey: n, valueKey: a } = j(t);
|
|
17
|
+
return {
|
|
18
|
+
options: e,
|
|
19
|
+
getOptionLabel: (r) => typeof r != "object" && r !== null ? r : typeof n.value == "function" ? n.value(r) : r[n.value],
|
|
20
|
+
getOptionValue: (r) => typeof r != "object" && r !== null ? r : typeof a.value == "function" ? a.value(r) : r[a.value]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function T(t, e, n) {
|
|
24
|
+
return n ? B(t, n) === B(e, n) : G(t, e);
|
|
25
|
+
}
|
|
26
|
+
function G(t, e) {
|
|
27
|
+
if (t === e)
|
|
28
|
+
return !0;
|
|
29
|
+
if (t && e && typeof t == "object" && typeof e == "object") {
|
|
30
|
+
const n = Array.isArray(t), a = Array.isArray(e);
|
|
31
|
+
let o, u, r;
|
|
32
|
+
if (n && a) {
|
|
33
|
+
if (u = t.length, u != e.length)
|
|
34
|
+
return !1;
|
|
35
|
+
for (o = u; o-- !== 0; )
|
|
36
|
+
if (!G(t[o], e[o]))
|
|
37
|
+
return !1;
|
|
38
|
+
return !0;
|
|
39
|
+
}
|
|
40
|
+
if (n != a)
|
|
41
|
+
return !1;
|
|
42
|
+
const v = t instanceof Date, i = e instanceof Date;
|
|
43
|
+
if (v != i)
|
|
44
|
+
return !1;
|
|
45
|
+
if (v && i)
|
|
46
|
+
return t.getTime() == e.getTime();
|
|
47
|
+
const s = t instanceof RegExp, d = e instanceof RegExp;
|
|
48
|
+
if (s != d)
|
|
49
|
+
return !1;
|
|
50
|
+
if (s && d)
|
|
51
|
+
return t.toString() == e.toString();
|
|
52
|
+
const l = Object.keys(t);
|
|
53
|
+
if (u = l.length, u !== Object.keys(e).length)
|
|
54
|
+
return !1;
|
|
55
|
+
for (o = u; o-- !== 0; )
|
|
56
|
+
if (!Object.prototype.hasOwnProperty.call(e, l[o]))
|
|
57
|
+
return !1;
|
|
58
|
+
for (o = u; o-- !== 0; )
|
|
59
|
+
if (r = l[o], !G(t[r], e[r]))
|
|
60
|
+
return !1;
|
|
61
|
+
return !0;
|
|
62
|
+
}
|
|
63
|
+
return t !== t && e !== e;
|
|
64
|
+
}
|
|
65
|
+
function B(t, e) {
|
|
66
|
+
if (t && Object.keys(t).length && e) {
|
|
67
|
+
if (e.indexOf(".") === -1)
|
|
68
|
+
return t[e];
|
|
69
|
+
{
|
|
70
|
+
const n = e.split(".");
|
|
71
|
+
let a = t;
|
|
72
|
+
for (let o = 0, u = n.length; o < u; ++o) {
|
|
73
|
+
if (t == null)
|
|
74
|
+
return null;
|
|
75
|
+
a = a[n[o]];
|
|
76
|
+
}
|
|
77
|
+
return a;
|
|
78
|
+
}
|
|
79
|
+
} else
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
function Ve(t, e) {
|
|
83
|
+
if (t != null && e && e.length) {
|
|
84
|
+
for (const n of e)
|
|
85
|
+
if (T(t, n))
|
|
86
|
+
return !0;
|
|
87
|
+
}
|
|
88
|
+
return !1;
|
|
89
|
+
}
|
|
90
|
+
function q(t) {
|
|
91
|
+
return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(f(t));
|
|
92
|
+
}
|
|
93
|
+
function Ce(t) {
|
|
94
|
+
return typeof t == "string" || t instanceof String;
|
|
95
|
+
}
|
|
96
|
+
function $(t) {
|
|
97
|
+
var e, n;
|
|
98
|
+
if (t)
|
|
99
|
+
return (n = (e = t.match(
|
|
100
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
101
|
+
)) == null ? void 0 : e.join("-")) == null ? void 0 : n.toLowerCase();
|
|
102
|
+
}
|
|
103
|
+
function z(t, e) {
|
|
104
|
+
const n = { [`${t}`]: !0 };
|
|
105
|
+
return {
|
|
106
|
+
bemCssClasses: c(() => Object.keys(e).reduce((o, u) => {
|
|
107
|
+
const r = f(e[u]) || !1;
|
|
108
|
+
if (!r)
|
|
109
|
+
return o;
|
|
110
|
+
if (u === "modifiers") {
|
|
111
|
+
const v = Array.isArray(r) ? r : r.split(" ");
|
|
112
|
+
return {
|
|
113
|
+
...o,
|
|
114
|
+
...v.reduce(
|
|
115
|
+
(i, s) => ({
|
|
116
|
+
...i,
|
|
117
|
+
[`${t}--${$(s)}`]: !0
|
|
118
|
+
}),
|
|
119
|
+
{}
|
|
120
|
+
)
|
|
121
|
+
};
|
|
122
|
+
} else
|
|
123
|
+
return {
|
|
124
|
+
...o,
|
|
125
|
+
[`${t}--${$(u)}`]: r
|
|
126
|
+
};
|
|
127
|
+
}, n) || {})
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function x(t) {
|
|
131
|
+
return Array.isArray(t) ? t.filter((e) => Ce(e)).join(" ") : t;
|
|
132
|
+
}
|
|
133
|
+
function Z(t, e) {
|
|
134
|
+
const {
|
|
135
|
+
invalid: n,
|
|
136
|
+
valid: a,
|
|
137
|
+
hint: o,
|
|
138
|
+
loading: u
|
|
139
|
+
} = e, {
|
|
140
|
+
hintLabel: r,
|
|
141
|
+
modelValue: v,
|
|
142
|
+
valid: i,
|
|
143
|
+
validLabel: s,
|
|
144
|
+
invalid: d,
|
|
145
|
+
invalidLabel: l,
|
|
146
|
+
...k
|
|
147
|
+
} = j(t), p = B(k, "loading"), y = B(k, "loadingLabel"), h = c(() => d.value ? !!(d.value && n || l != null && l.value && Array.isArray(l.value) && l.value.length > 0 || l != null && l.value && !q(l)) : !1), m = c(
|
|
148
|
+
() => !!(r && r.value || o)
|
|
149
|
+
), b = c(
|
|
150
|
+
() => !!(s && s.value || a)
|
|
151
|
+
), V = c(
|
|
152
|
+
() => !!(p != null && p.value && u || p != null && p.value && (y != null && y.value))
|
|
153
|
+
), C = c(
|
|
154
|
+
() => m.value || b.value || h.value || V.value
|
|
155
|
+
);
|
|
156
|
+
return {
|
|
157
|
+
hasInvalid: h,
|
|
158
|
+
hasHint: m,
|
|
159
|
+
hasValid: b,
|
|
160
|
+
hasLoading: V,
|
|
161
|
+
HintSlot: {
|
|
162
|
+
name: "HintSlot",
|
|
163
|
+
props: {
|
|
164
|
+
params: {
|
|
165
|
+
type: Object,
|
|
166
|
+
default: () => ({})
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
setup(R) {
|
|
170
|
+
const S = c(() => {
|
|
171
|
+
const A = me({
|
|
172
|
+
hintLabel: r,
|
|
173
|
+
modelValue: v,
|
|
174
|
+
valid: i,
|
|
175
|
+
validLabel: s,
|
|
176
|
+
invalid: d,
|
|
177
|
+
invalidLabel: l,
|
|
178
|
+
loading: p,
|
|
179
|
+
loadingLabel: y,
|
|
180
|
+
...R.params
|
|
181
|
+
});
|
|
182
|
+
return d != null && d.value ? (n == null ? void 0 : n(A)) || x(l == null ? void 0 : l.value) || (r == null ? void 0 : r.value) : i != null && i.value ? (a == null ? void 0 : a(A)) || x(s == null ? void 0 : s.value) || (r == null ? void 0 : r.value) : p != null && p.value ? (u == null ? void 0 : u(A)) || x(y == null ? void 0 : y.value) || (r == null ? void 0 : r.value) : (o == null ? void 0 : o(A)) || x(r == null ? void 0 : r.value) || (r == null ? void 0 : r.value);
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
isVisible: C,
|
|
186
|
+
hasInvalid: h,
|
|
187
|
+
hasValid: b,
|
|
188
|
+
hintContent: S
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
render() {
|
|
192
|
+
if (this.isVisible)
|
|
193
|
+
return te(
|
|
194
|
+
"small",
|
|
195
|
+
{
|
|
196
|
+
role: this.hasInvalid || this.hasValid ? "alert" : void 0
|
|
197
|
+
},
|
|
198
|
+
this.hintContent
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function Ae(t) {
|
|
205
|
+
const e = ne(t, void 0), n = c(() => !q(e));
|
|
206
|
+
function a(o, u, r) {
|
|
207
|
+
if (e != null && e.value) {
|
|
208
|
+
const i = f(e.value)[o];
|
|
209
|
+
return c({
|
|
210
|
+
get() {
|
|
211
|
+
return i == null ? void 0 : i.value;
|
|
212
|
+
},
|
|
213
|
+
set(s) {
|
|
214
|
+
i.value = s;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
const v = re(u, o);
|
|
219
|
+
return c({
|
|
220
|
+
get() {
|
|
221
|
+
return v.value;
|
|
222
|
+
},
|
|
223
|
+
set(i) {
|
|
224
|
+
r && r(`update:${o}`, i);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
group: e,
|
|
230
|
+
isInGroup: n,
|
|
231
|
+
getGroupOrLocalRef: a
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const U = {
|
|
235
|
+
valid: Boolean,
|
|
236
|
+
validLabel: [String, Array]
|
|
237
|
+
}, J = {
|
|
238
|
+
invalid: Boolean,
|
|
239
|
+
invalidLabel: [String, Array]
|
|
240
|
+
}, Q = {
|
|
241
|
+
disabled: Boolean
|
|
242
|
+
}, W = {
|
|
243
|
+
readonly: Boolean
|
|
244
|
+
}, X = {
|
|
245
|
+
hintLabel: { type: String, default: "" }
|
|
246
|
+
}, _e = {
|
|
247
|
+
options: {
|
|
248
|
+
type: Array,
|
|
249
|
+
default: () => []
|
|
250
|
+
},
|
|
251
|
+
labelKey: { type: [String, Function], default: "label" },
|
|
252
|
+
valueKey: { type: [String, Function], default: "value" }
|
|
253
|
+
}, Se = {
|
|
254
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
255
|
+
}, Oe = {
|
|
256
|
+
id: [String, Number],
|
|
257
|
+
name: { type: String, required: !0 }
|
|
258
|
+
}, xe = {
|
|
259
|
+
...Oe,
|
|
260
|
+
...Se,
|
|
261
|
+
...U,
|
|
262
|
+
...J,
|
|
263
|
+
...X,
|
|
264
|
+
...Q,
|
|
265
|
+
...W,
|
|
266
|
+
value: [String, Number, Boolean],
|
|
267
|
+
modelValue: [Object, Number, Boolean, String],
|
|
268
|
+
label: String
|
|
269
|
+
}, Pe = {
|
|
270
|
+
...U,
|
|
271
|
+
...J,
|
|
272
|
+
..._e,
|
|
273
|
+
...X,
|
|
274
|
+
...Q,
|
|
275
|
+
...W,
|
|
276
|
+
modelValue: [String, Array],
|
|
277
|
+
label: String,
|
|
278
|
+
name: { type: String, required: !0 },
|
|
279
|
+
vertical: Boolean
|
|
280
|
+
}, Be = {
|
|
281
|
+
...xe,
|
|
282
|
+
indeterminate: Boolean,
|
|
283
|
+
uncheckedValue: [String, Number, Boolean],
|
|
284
|
+
switch: Boolean
|
|
285
|
+
}, je = ["click", "update:modelValue", "change", "blur"];
|
|
286
|
+
function Re(t, e) {
|
|
287
|
+
const { group: n, isInGroup: a, getGroupOrLocalRef: o } = Ae(F), { switch: u, indeterminate: r } = j(t), v = o("modelValue", t, e), i = o("readonly", t), s = o("disabled", t), d = o("valid", t), l = o("invalid", t);
|
|
288
|
+
return {
|
|
289
|
+
propsSwitch: u,
|
|
290
|
+
indeterminate: r,
|
|
291
|
+
group: n,
|
|
292
|
+
isInGroup: a,
|
|
293
|
+
modelValue: v,
|
|
294
|
+
readonly: i,
|
|
295
|
+
disabled: s,
|
|
296
|
+
valid: d,
|
|
297
|
+
invalid: l
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
const Ge = ["for"], $e = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ee = {
|
|
301
|
+
name: "VvCheckbox"
|
|
302
|
+
}, we = /* @__PURE__ */ w({
|
|
303
|
+
...Ee,
|
|
304
|
+
props: Be,
|
|
305
|
+
emits: je,
|
|
306
|
+
setup(t, { emit: e }) {
|
|
307
|
+
const n = t, a = I(), {
|
|
308
|
+
disabled: o,
|
|
309
|
+
readonly: u,
|
|
310
|
+
valid: r,
|
|
311
|
+
invalid: v,
|
|
312
|
+
propsSwitch: i,
|
|
313
|
+
modelValue: s,
|
|
314
|
+
indeterminate: d,
|
|
315
|
+
isInGroup: l
|
|
316
|
+
} = Re(n, e), k = c(() => String(n.id || ge())), p = c(() => m.value ? -1 : n.tabindex), y = oe(), h = c(
|
|
317
|
+
() => n.uncheckedValue !== void 0 && !l.value
|
|
318
|
+
), m = c(() => o.value || u.value), b = c(() => {
|
|
319
|
+
if (v.value === !0)
|
|
320
|
+
return !0;
|
|
321
|
+
if (r.value === !0)
|
|
322
|
+
return !1;
|
|
323
|
+
}), V = c(() => h.value ? s.value === n.value : Array.isArray(s.value) ? Ve(n.value, s.value) : T(n.value, s.value)), C = c(() => !!(d.value || !V.value && h.value && n.uncheckedValue !== s.value)), R = c(() => {
|
|
324
|
+
if (!h.value)
|
|
325
|
+
return ["string", "number", "boolean"].includes(typeof n.value) ? n.value : !0;
|
|
326
|
+
}), S = c({
|
|
327
|
+
get() {
|
|
328
|
+
return V.value;
|
|
329
|
+
},
|
|
330
|
+
set(g) {
|
|
331
|
+
if (h.value)
|
|
332
|
+
s.value = g ? n.value : n.uncheckedValue;
|
|
333
|
+
else if (Array.isArray(s.value) || l.value) {
|
|
334
|
+
const _ = new Set(
|
|
335
|
+
Array.isArray(s.value) ? s.value : s.value !== void 0 ? [s.value] : []
|
|
336
|
+
);
|
|
337
|
+
g ? _.add(n.value) : _.delete(n.value), s.value = [..._];
|
|
338
|
+
} else
|
|
339
|
+
s.value = g ? n.value : void 0;
|
|
340
|
+
e("change", g);
|
|
341
|
+
}
|
|
342
|
+
}), { bemCssClasses: A } = z("vv-checkbox", {
|
|
343
|
+
switch: i,
|
|
344
|
+
valid: r,
|
|
345
|
+
invalid: v,
|
|
346
|
+
disabled: o,
|
|
347
|
+
readonly: u,
|
|
348
|
+
indeterminate: d
|
|
349
|
+
});
|
|
350
|
+
se(() => {
|
|
351
|
+
h.value && Array.isArray(s.value) && console.warn(
|
|
352
|
+
"[VvCheckbox] The model value is an array but the component is in binary mode."
|
|
353
|
+
);
|
|
354
|
+
}), ue(
|
|
355
|
+
() => C.value,
|
|
356
|
+
(g) => {
|
|
357
|
+
g ? y.value.indeterminate = !0 : y.value.indeterminate = !1;
|
|
358
|
+
}
|
|
359
|
+
), ae(() => {
|
|
360
|
+
C.value && (y.value.indeterminate = !0);
|
|
361
|
+
});
|
|
362
|
+
const { HintSlot: Y } = Z(n, a);
|
|
363
|
+
return (g, _) => (O(), P("label", {
|
|
364
|
+
class: H(f(A)),
|
|
365
|
+
for: f(k)
|
|
366
|
+
}, [
|
|
367
|
+
le(D("input", {
|
|
368
|
+
id: f(k),
|
|
369
|
+
ref_key: "input",
|
|
370
|
+
ref: y,
|
|
371
|
+
"onUpdate:modelValue": _[0] || (_[0] = (L) => E(S) ? S.value = L : null),
|
|
372
|
+
type: "checkbox",
|
|
373
|
+
class: "vv-checkbox__input",
|
|
374
|
+
name: g.name,
|
|
375
|
+
disabled: f(m),
|
|
376
|
+
value: f(R),
|
|
377
|
+
tabindex: f(p),
|
|
378
|
+
"aria-invalid": f(b)
|
|
379
|
+
}, null, 8, $e), [
|
|
380
|
+
[ie, f(S)]
|
|
381
|
+
]),
|
|
382
|
+
N(g.$slots, "default", { value: f(s) }, () => [
|
|
383
|
+
ce(K(g.label), 1)
|
|
384
|
+
]),
|
|
385
|
+
M(f(Y), {
|
|
386
|
+
class: "vv-checkbox__hint",
|
|
387
|
+
params: { value: f(s) }
|
|
388
|
+
}, null, 8, ["params"])
|
|
389
|
+
], 10, Ge));
|
|
390
|
+
}
|
|
391
|
+
}), Ie = Pe, He = ["update:modelValue", "change"], De = ["textContent"], Ne = { class: "vv-checkbox-group__wrapper" }, Ke = {
|
|
392
|
+
name: "VvCheckboxGroup"
|
|
393
|
+
}, qe = /* @__PURE__ */ w({
|
|
394
|
+
...Ke,
|
|
395
|
+
props: Ie,
|
|
396
|
+
emits: He,
|
|
397
|
+
setup(t, { emit: e }) {
|
|
398
|
+
const n = t, a = I(), o = he(n, "modelValue", e), { disabled: u, readonly: r, vertical: v, valid: i, invalid: s } = j(n);
|
|
399
|
+
be({
|
|
400
|
+
key: F,
|
|
401
|
+
modelValue: o,
|
|
402
|
+
disabled: u,
|
|
403
|
+
readonly: r,
|
|
404
|
+
valid: i,
|
|
405
|
+
invalid: s
|
|
406
|
+
});
|
|
407
|
+
const { getOptionLabel: l, getOptionValue: k } = ke(n), { bemCssClasses: p } = z("vv-checkbox-group", {
|
|
408
|
+
disabled: u,
|
|
409
|
+
readonly: r,
|
|
410
|
+
horizontal: c(() => !v.value),
|
|
411
|
+
valid: i,
|
|
412
|
+
invalid: s
|
|
413
|
+
}), y = (m, b) => ({
|
|
414
|
+
id: `${n.name}_opt${b}`,
|
|
415
|
+
name: n.name,
|
|
416
|
+
label: l(m),
|
|
417
|
+
value: k(m)
|
|
418
|
+
}), { HintSlot: h } = Z(n, a);
|
|
419
|
+
return (m, b) => (O(), P("fieldset", {
|
|
420
|
+
class: H(f(p))
|
|
421
|
+
}, [
|
|
422
|
+
m.label ? (O(), P("legend", {
|
|
423
|
+
key: 0,
|
|
424
|
+
textContent: K(m.label)
|
|
425
|
+
}, null, 8, De)) : fe("", !0),
|
|
426
|
+
D("div", Ne, [
|
|
427
|
+
m.options.length > 0 ? (O(!0), P(ve, { key: 0 }, de(m.options, (V, C) => (O(), pe(we, ye({ key: C }, y(V, C)), null, 16))), 128)) : N(m.$slots, "default", { key: 1 })
|
|
428
|
+
]),
|
|
429
|
+
M(f(h), { class: "vv-checkbox-group__hint" })
|
|
430
|
+
], 2));
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
export {
|
|
434
|
+
qe as default
|
|
435
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,C){typeof exports=="object"&&typeof module<"u"?module.exports=C(require("vue"),require("@vueuse/core"),require("nanoid")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core","nanoid"],C):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCheckboxGroup=C(e.vue,e.core,e.nanoid))})(this,function(e,C,q){"use strict";const R="VV_CHECK_GROUP";function K(n){if(Object.keys(n).some(t=>t!=="key"&&!e.isRef(n[t])))throw Error("One or more groupState props aren't ref.");e.provide(n.key,e.computed(()=>n))}function M(n){const{options:t,labelKey:r,valueKey:i}=e.toRefs(n);return{options:t,getOptionLabel:o=>typeof o!="object"&&o!==null?o:typeof r.value=="function"?r.value(o):o[r.value],getOptionValue:o=>typeof o!="object"&&o!==null?o:typeof i.value=="function"?i.value(o):o[i.value]}}function j(n,t,r){return r?x(n,r)===x(t,r):O(n,t)}function O(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){const r=Array.isArray(n),i=Array.isArray(t);let s,l,o;if(r&&i){if(l=n.length,l!=t.length)return!1;for(s=l;s--!==0;)if(!O(n[s],t[s]))return!1;return!0}if(r!=i)return!1;const d=n instanceof Date,c=t instanceof Date;if(d!=c)return!1;if(d&&c)return n.getTime()==t.getTime();const a=n instanceof RegExp,f=t instanceof RegExp;if(a!=f)return!1;if(a&&f)return n.toString()==t.toString();const u=Object.keys(n);if(l=u.length,l!==Object.keys(t).length)return!1;for(s=l;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;for(s=l;s--!==0;)if(o=u[s],!O(n[o],t[o]))return!1;return!0}return n!==n&&t!==t}function x(n,t){if(n&&Object.keys(n).length&&t){if(t.indexOf(".")===-1)return n[t];{const r=t.split(".");let i=n;for(let s=0,l=r.length;s<l;++s){if(n==null)return null;i=i[r[s]]}return i}}else return null}function z(n,t){if(n!=null&&t&&t.length){for(const r of t)if(j(n,r))return!0}return!1}function E(n){return(t=>t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0)(e.unref(n))}function F(n){return typeof n=="string"||n instanceof String}function G(n){var t,r;if(n)return(r=(t=n.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:r.toLowerCase()}function $(n,t){const r={[`${n}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(t).reduce((s,l)=>{const o=e.unref(t[l])||!1;if(!o)return s;if(l==="modifiers"){const d=Array.isArray(o)?o:o.split(" ");return{...s,...d.reduce((c,a)=>({...c,[`${n}--${G(a)}`]:!0}),{})}}else return{...s,[`${n}--${G(l)}`]:o}},r)||{})}}function B(n){return Array.isArray(n)?n.filter(t=>F(t)).join(" "):n}function w(n,t){const{invalid:r,valid:i,hint:s,loading:l}=t,{hintLabel:o,modelValue:d,valid:c,validLabel:a,invalid:f,invalidLabel:u,...k}=e.toRefs(n),p=x(k,"loading"),m=x(k,"loadingLabel"),h=e.computed(()=>f.value?!!(f.value&&r||u!=null&&u.value&&Array.isArray(u.value)&&u.value.length>0||u!=null&&u.value&&!E(u)):!1),y=e.computed(()=>!!(o&&o.value||s)),g=e.computed(()=>!!(a&&a.value||i)),b=e.computed(()=>!!(p!=null&&p.value&&l||p!=null&&p.value&&(m!=null&&m.value))),V=e.computed(()=>y.value||g.value||h.value||b.value);return{hasInvalid:h,hasHint:y,hasValid:g,hasLoading:b,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(P){const A=e.computed(()=>{const S=C.toReactive({hintLabel:o,modelValue:d,valid:c,validLabel:a,invalid:f,invalidLabel:u,loading:p,loadingLabel:m,...P.params});return f!=null&&f.value?(r==null?void 0:r(S))||B(u==null?void 0:u.value)||(o==null?void 0:o.value):c!=null&&c.value?(i==null?void 0:i(S))||B(a==null?void 0:a.value)||(o==null?void 0:o.value):p!=null&&p.value?(l==null?void 0:l(S))||B(m==null?void 0:m.value)||(o==null?void 0:o.value):(s==null?void 0:s(S))||B(o==null?void 0:o.value)||(o==null?void 0:o.value)});return{isVisible:V,hasInvalid:h,hasValid:g,hintContent:A}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid||this.hasValid?"alert":void 0},this.hintContent)}}}}function Z(n){const t=e.inject(n,void 0),r=e.computed(()=>!E(t));function i(s,l,o){if(t!=null&&t.value){const c=e.unref(t.value)[s];return e.computed({get(){return c==null?void 0:c.value},set(a){c.value=a}})}const d=e.toRef(l,s);return e.computed({get(){return d.value},set(c){o&&o(`update:${s}`,c)}})}return{group:t,isInGroup:r,getGroupOrLocalRef:i}}const I={valid:Boolean,validLabel:[String,Array]},N={invalid:Boolean,invalidLabel:[String,Array]},D={disabled:Boolean},H={readonly:Boolean},T={hintLabel:{type:String,default:""}},U={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"}},J={...{id:[String,Number],name:{type:String,required:!0}},...{tabindex:{type:[String,Number],default:0}},...I,...N,...T,...D,...H,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String],label:String},Q={...I,...N,...U,...T,...D,...H,modelValue:[String,Array],label:String,name:{type:String,required:!0},vertical:Boolean},W={...J,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean},X=["click","update:modelValue","change","blur"];function Y(n,t){const{group:r,isInGroup:i,getGroupOrLocalRef:s}=Z(R),{switch:l,indeterminate:o}=e.toRefs(n),d=s("modelValue",n,t),c=s("readonly",n),a=s("disabled",n),f=s("valid",n),u=s("invalid",n);return{propsSwitch:l,indeterminate:o,group:r,isInGroup:i,modelValue:d,readonly:c,disabled:a,valid:f,invalid:u}}const L=["for"],ee=["id","name","disabled","value","tabindex","aria-invalid"],te={name:"VvCheckbox"},ne=e.defineComponent({...te,props:W,emits:X,setup(n,{emit:t}){const r=n,i=e.useSlots(),{disabled:s,readonly:l,valid:o,invalid:d,propsSwitch:c,modelValue:a,indeterminate:f,isInGroup:u}=Y(r,t),k=e.computed(()=>String(r.id||q.nanoid())),p=e.computed(()=>y.value?-1:r.tabindex),m=e.ref(),h=e.computed(()=>r.uncheckedValue!==void 0&&!u.value),y=e.computed(()=>s.value||l.value),g=e.computed(()=>{if(d.value===!0)return!0;if(o.value===!0)return!1}),b=e.computed(()=>h.value?a.value===r.value:Array.isArray(a.value)?z(r.value,a.value):j(r.value,a.value)),V=e.computed(()=>!!(f.value||!b.value&&h.value&&r.uncheckedValue!==a.value)),P=e.computed(()=>{if(!h.value)return["string","number","boolean"].includes(typeof r.value)?r.value:!0}),A=e.computed({get(){return b.value},set(v){if(h.value)a.value=v?r.value:r.uncheckedValue;else if(Array.isArray(a.value)||u.value){const _=new Set(Array.isArray(a.value)?a.value:a.value!==void 0?[a.value]:[]);v?_.add(r.value):_.delete(r.value),a.value=[..._]}else a.value=v?r.value:void 0;t("change",v)}}),{bemCssClasses:S}=$("vv-checkbox",{switch:c,valid:o,invalid:d,disabled:s,readonly:l,indeterminate:f});e.watchEffect(()=>{h.value&&Array.isArray(a.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")}),e.watch(()=>V.value,v=>{v?m.value.indeterminate=!0:m.value.indeterminate=!1}),e.onMounted(()=>{V.value&&(m.value.indeterminate=!0)});const{HintSlot:ie}=w(r,i);return(v,_)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(S)),for:e.unref(k)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(k),ref_key:"input",ref:m,"onUpdate:modelValue":_[0]||(_[0]=ue=>e.isRef(A)?A.value=ue:null),type:"checkbox",class:"vv-checkbox__input",name:v.name,disabled:e.unref(y),value:e.unref(P),tabindex:e.unref(p),"aria-invalid":e.unref(g)},null,8,ee),[[e.vModelCheckbox,e.unref(A)]]),e.renderSlot(v.$slots,"default",{value:e.unref(a)},()=>[e.createTextVNode(e.toDisplayString(v.label),1)]),e.createVNode(e.unref(ie),{class:"vv-checkbox__hint",params:{value:e.unref(a)}},null,8,["params"])],10,L))}}),re=Q,oe=["update:modelValue","change"],se=["textContent"],ae={class:"vv-checkbox-group__wrapper"},le={name:"VvCheckboxGroup"};return e.defineComponent({...le,props:re,emits:oe,setup(n,{emit:t}){const r=n,i=e.useSlots(),s=C.useVModel(r,"modelValue",t),{disabled:l,readonly:o,vertical:d,valid:c,invalid:a}=e.toRefs(r);K({key:R,modelValue:s,disabled:l,readonly:o,valid:c,invalid:a});const{getOptionLabel:u,getOptionValue:k}=M(r),{bemCssClasses:p}=$("vv-checkbox-group",{disabled:l,readonly:o,horizontal:e.computed(()=>!d.value),valid:c,invalid:a}),m=(y,g)=>({id:`${r.name}_opt${g}`,name:r.name,label:u(y),value:k(y)}),{HintSlot:h}=w(r,i);return(y,g)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(p))},[y.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(y.label)},null,8,se)):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[y.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.options,(b,V)=>(e.openBlock(),e.createBlock(ne,e.mergeProps({key:V},m(b,V)),null,16))),128)):e.renderSlot(y.$slots,"default",{key:1})]),e.createVNode(e.unref(h),{class:"vv-checkbox-group__hint"})],2))}})});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Option } from '@/types/generic';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
4
|
+
label: StringConstructor;
|
|
5
|
+
name: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
vertical: BooleanConstructor;
|
|
10
|
+
readonly: BooleanConstructor;
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
hintLabel: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
options: {
|
|
17
|
+
type: import("vue").PropType<(string | Option)[]>;
|
|
18
|
+
default: () => never[];
|
|
19
|
+
};
|
|
20
|
+
labelKey: {
|
|
21
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
valueKey: {
|
|
25
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
invalid: BooleanConstructor;
|
|
29
|
+
invalidLabel: (ArrayConstructor | StringConstructor)[];
|
|
30
|
+
valid: BooleanConstructor;
|
|
31
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
32
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
34
|
+
label: StringConstructor;
|
|
35
|
+
name: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
required: boolean;
|
|
38
|
+
};
|
|
39
|
+
vertical: BooleanConstructor;
|
|
40
|
+
readonly: BooleanConstructor;
|
|
41
|
+
disabled: BooleanConstructor;
|
|
42
|
+
hintLabel: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
options: {
|
|
47
|
+
type: import("vue").PropType<(string | Option)[]>;
|
|
48
|
+
default: () => never[];
|
|
49
|
+
};
|
|
50
|
+
labelKey: {
|
|
51
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
valueKey: {
|
|
55
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
invalid: BooleanConstructor;
|
|
59
|
+
invalidLabel: (ArrayConstructor | StringConstructor)[];
|
|
60
|
+
valid: BooleanConstructor;
|
|
61
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
62
|
+
}>> & {
|
|
63
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
readonly: boolean;
|
|
67
|
+
hintLabel: string;
|
|
68
|
+
invalid: boolean;
|
|
69
|
+
valid: boolean;
|
|
70
|
+
options: (string | Option)[];
|
|
71
|
+
labelKey: string | Function;
|
|
72
|
+
valueKey: string | Function;
|
|
73
|
+
vertical: boolean;
|
|
74
|
+
}>, {
|
|
75
|
+
default: (_: {}) => any;
|
|
76
|
+
}>;
|
|
77
|
+
export default _default;
|
|
78
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
79
|
+
new (): {
|
|
80
|
+
$slots: S;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const VvCheckboxGroupProps: {
|
|
2
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
3
|
+
label: StringConstructor;
|
|
4
|
+
name: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: boolean;
|
|
7
|
+
};
|
|
8
|
+
vertical: BooleanConstructor;
|
|
9
|
+
readonly: BooleanConstructor;
|
|
10
|
+
disabled: BooleanConstructor;
|
|
11
|
+
hintLabel: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
options: {
|
|
16
|
+
type: import("vue").PropType<(string | import("../../types/generic").Option)[]>;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
labelKey: {
|
|
20
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
valueKey: {
|
|
24
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
invalid: BooleanConstructor;
|
|
28
|
+
invalidLabel: (ArrayConstructor | StringConstructor)[];
|
|
29
|
+
valid: BooleanConstructor;
|
|
30
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
31
|
+
};
|
|
32
|
+
export declare const VvCheckboxGroupEvents: string[];
|