@volverjs/ui-vue 0.0.1-beta.8 → 0.0.1
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 +91 -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 +427 -0
- package/dist/components/VvButton/VvButton.umd.js +1 -0
- package/dist/components/VvButton/VvButton.vue.d.ts +108 -199
- package/dist/components/VvButton/index.d.ts +132 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +108 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +89 -183
- 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 +594 -0
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -0
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +153 -0
- package/dist/components/{VvSelect/VvSelect.d.ts → VvCombobox/index.d.ts} +33 -36
- 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 +218 -0
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -0
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +41 -147
- package/dist/components/VvDropdown/index.d.ts +37 -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 +764 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +210 -287
- 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 +415 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -0
- package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -262
- package/dist/components/VvSelect/index.d.ts +96 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +463 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -0
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +139 -320
- 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 +2309 -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 +2350 -0
- package/dist/index.umd.js +1 -0
- package/dist/props/index.d.ts +297 -30
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +40 -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 +200 -0
- package/dist/stories/Button/Button.test.d.ts +1 -10
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +38 -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 +267 -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 +75 -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 +265 -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 +793 -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 +198 -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 +171 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +76 -48
- package/src/components/VvButtonGroup/index.ts +19 -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 +227 -0
- package/src/components/VvCombobox/index.ts +82 -0
- package/src/components/VvDialog/VvDialog.vue +69 -67
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +112 -114
- package/src/components/VvDropdown/index.ts +25 -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 +305 -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 +165 -186
- package/src/components/VvSelect/index.ts +74 -0
- package/src/components/VvTextarea/VvTextarea.vue +185 -173
- 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 +21 -33
- 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 +186 -36
- package/src/resolvers/unplugin.ts +103 -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 +150 -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 +28 -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/ButtonGroupToggle.stories.mdx +45 -114
- 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 +122 -0
- package/src/stories/Combobox/Combobox.stories.mdx +153 -0
- package/src/stories/Combobox/Combobox.test.ts +96 -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 +42 -0
- package/src/stories/Dropdown/Dropdown.stories.mdx +85 -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 +100 -0
- package/src/stories/Select/Select.stories.mdx +113 -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 +433 -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/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,594 @@
|
|
|
1
|
+
import { unref as c, computed as m, toRefs as _, watch as W, defineComponent as M, openBlock as V, createElementBlock as w, normalizeClass as Y, createElementVNode as I, toDisplayString as x, createCommentVNode as A, Fragment as ee, renderList as be, withModifiers as Ve, createTextVNode as te, ref as k, inject as Se, createBlock as L, mergeProps as R, h as we, useSlots as $e, withKeys as Z, renderSlot as G, withDirectives as Ce, vModelText as Oe, createVNode as U } from "vue";
|
|
2
|
+
import { nanoid as re } from "nanoid";
|
|
3
|
+
import { useFocus as Ae, toReactive as ke, refDebounced as Ie, onClickOutside as _e } from "@vueuse/core";
|
|
4
|
+
import { iconExists as D, Icon as Be, addIcon as Pe } from "@iconify/vue";
|
|
5
|
+
function T(t, r, e) {
|
|
6
|
+
return e ? E(t, e) === E(r, e) : H(t, r);
|
|
7
|
+
}
|
|
8
|
+
function H(t, r) {
|
|
9
|
+
if (t === r)
|
|
10
|
+
return !0;
|
|
11
|
+
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
12
|
+
const e = Array.isArray(t), u = Array.isArray(r);
|
|
13
|
+
let o, a, n;
|
|
14
|
+
if (e && u) {
|
|
15
|
+
if (a = t.length, a != r.length)
|
|
16
|
+
return !1;
|
|
17
|
+
for (o = a; o-- !== 0; )
|
|
18
|
+
if (!H(t[o], r[o]))
|
|
19
|
+
return !1;
|
|
20
|
+
return !0;
|
|
21
|
+
}
|
|
22
|
+
if (e != u)
|
|
23
|
+
return !1;
|
|
24
|
+
const g = t instanceof Date, v = r instanceof Date;
|
|
25
|
+
if (g != v)
|
|
26
|
+
return !1;
|
|
27
|
+
if (g && v)
|
|
28
|
+
return t.getTime() == r.getTime();
|
|
29
|
+
const f = t instanceof RegExp, l = r instanceof RegExp;
|
|
30
|
+
if (f != l)
|
|
31
|
+
return !1;
|
|
32
|
+
if (f && l)
|
|
33
|
+
return t.toString() == r.toString();
|
|
34
|
+
const s = Object.keys(t);
|
|
35
|
+
if (a = s.length, a !== Object.keys(r).length)
|
|
36
|
+
return !1;
|
|
37
|
+
for (o = a; o-- !== 0; )
|
|
38
|
+
if (!Object.prototype.hasOwnProperty.call(r, s[o]))
|
|
39
|
+
return !1;
|
|
40
|
+
for (o = a; o-- !== 0; )
|
|
41
|
+
if (n = s[o], !H(t[n], r[n]))
|
|
42
|
+
return !1;
|
|
43
|
+
return !0;
|
|
44
|
+
}
|
|
45
|
+
return t !== t && r !== r;
|
|
46
|
+
}
|
|
47
|
+
function E(t, r) {
|
|
48
|
+
if (t && Object.keys(t).length && r) {
|
|
49
|
+
if (r.indexOf(".") === -1)
|
|
50
|
+
return t[r];
|
|
51
|
+
{
|
|
52
|
+
const e = r.split(".");
|
|
53
|
+
let u = t;
|
|
54
|
+
for (let o = 0, a = e.length; o < a; ++o) {
|
|
55
|
+
if (t == null)
|
|
56
|
+
return null;
|
|
57
|
+
u = u[e[o]];
|
|
58
|
+
}
|
|
59
|
+
return u;
|
|
60
|
+
}
|
|
61
|
+
} else
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function Ne(t, r) {
|
|
65
|
+
let e = -1;
|
|
66
|
+
if (r) {
|
|
67
|
+
for (let u = 0; u < r.length; u++)
|
|
68
|
+
if (T(r[u], t)) {
|
|
69
|
+
e = u;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return e;
|
|
74
|
+
}
|
|
75
|
+
function j(t, r) {
|
|
76
|
+
if (t != null && r && r.length) {
|
|
77
|
+
for (const e of r)
|
|
78
|
+
if (T(t, e))
|
|
79
|
+
return !0;
|
|
80
|
+
}
|
|
81
|
+
return !1;
|
|
82
|
+
}
|
|
83
|
+
function ne(t) {
|
|
84
|
+
return ((r) => r == null || r === "" || Array.isArray(r) && r.length === 0 || !(r instanceof Date) && typeof r == "object" && Object.keys(r).length === 0)(c(t));
|
|
85
|
+
}
|
|
86
|
+
function De(t, r) {
|
|
87
|
+
const e = Ne(t, r);
|
|
88
|
+
return e > -1 ? r.filter((u, o) => o !== e) : r;
|
|
89
|
+
}
|
|
90
|
+
function je(t) {
|
|
91
|
+
return typeof t == "string" || t instanceof String;
|
|
92
|
+
}
|
|
93
|
+
function J(t) {
|
|
94
|
+
var r, e;
|
|
95
|
+
if (t)
|
|
96
|
+
return (e = (r = t.match(
|
|
97
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
98
|
+
)) == null ? void 0 : r.join("-")) == null ? void 0 : e.toLowerCase();
|
|
99
|
+
}
|
|
100
|
+
function z(t, r) {
|
|
101
|
+
const e = { [`${t}`]: !0 };
|
|
102
|
+
return {
|
|
103
|
+
bemCssClasses: m(() => Object.keys(r).reduce((o, a) => {
|
|
104
|
+
const n = c(r[a]) || !1;
|
|
105
|
+
if (!n)
|
|
106
|
+
return o;
|
|
107
|
+
if (a === "modifiers") {
|
|
108
|
+
const g = Array.isArray(n) ? n : n.split(" ");
|
|
109
|
+
return {
|
|
110
|
+
...o,
|
|
111
|
+
...g.reduce(
|
|
112
|
+
(v, f) => ({
|
|
113
|
+
...v,
|
|
114
|
+
[`${t}--${J(f)}`]: !0
|
|
115
|
+
}),
|
|
116
|
+
{}
|
|
117
|
+
)
|
|
118
|
+
};
|
|
119
|
+
} else
|
|
120
|
+
return {
|
|
121
|
+
...o,
|
|
122
|
+
[`${t}--${J(a)}`]: n
|
|
123
|
+
};
|
|
124
|
+
}, e) || {})
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function Fe(t, r, e) {
|
|
128
|
+
const u = m(
|
|
129
|
+
() => !!(t != null && t.value && r.value === "left" || e != null && e.iconLeft)
|
|
130
|
+
), o = m(
|
|
131
|
+
() => !!(t != null && t.value && r.value === "right" || e != null && e.iconRight)
|
|
132
|
+
), a = m(
|
|
133
|
+
() => !!(t != null && t.value && r.value === "top" || e != null && e.iconTop)
|
|
134
|
+
), n = m(
|
|
135
|
+
() => !!(t != null && t.value && r.value === "bottom" || e != null && e.iconBottom)
|
|
136
|
+
);
|
|
137
|
+
return {
|
|
138
|
+
hasIcon: m(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
|
|
139
|
+
hasIconLeft: u,
|
|
140
|
+
hasIconRight: o,
|
|
141
|
+
hasIconTop: a,
|
|
142
|
+
hasIconBottom: n
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function oe(t) {
|
|
146
|
+
const { options: r, labelKey: e, valueKey: u } = _(t);
|
|
147
|
+
return {
|
|
148
|
+
options: r,
|
|
149
|
+
getOptionLabel: (n) => typeof n != "object" && n !== null ? n : typeof e.value == "function" ? e.value(n) : n[e.value],
|
|
150
|
+
getOptionValue: (n) => typeof n != "object" && n !== null ? n : typeof u.value == "function" ? u.value(n) : n[u.value]
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function Re(t, r) {
|
|
154
|
+
const { focused: e } = Ae(t);
|
|
155
|
+
return W(e, (u) => {
|
|
156
|
+
r(u ? "focus" : "blur", c(t));
|
|
157
|
+
}), {
|
|
158
|
+
focused: e
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
const xe = {
|
|
162
|
+
valid: Boolean,
|
|
163
|
+
validLabel: [String, Array]
|
|
164
|
+
}, Te = {
|
|
165
|
+
invalid: Boolean,
|
|
166
|
+
invalidLabel: [String, Array]
|
|
167
|
+
}, Ee = {
|
|
168
|
+
loading: Boolean,
|
|
169
|
+
loadingLabel: String
|
|
170
|
+
}, le = {
|
|
171
|
+
disabled: Boolean
|
|
172
|
+
}, Ke = {
|
|
173
|
+
readonly: Boolean
|
|
174
|
+
}, se = {
|
|
175
|
+
modifiers: [String, Array]
|
|
176
|
+
}, Le = {
|
|
177
|
+
hintLabel: { type: String, default: "" }
|
|
178
|
+
}, ae = {
|
|
179
|
+
options: {
|
|
180
|
+
type: Array,
|
|
181
|
+
default: () => []
|
|
182
|
+
},
|
|
183
|
+
labelKey: { type: [String, Function], default: "label" },
|
|
184
|
+
valueKey: { type: [String, Function], default: "value" }
|
|
185
|
+
}, X = {
|
|
186
|
+
LEFT: "left",
|
|
187
|
+
RIGHT: "right"
|
|
188
|
+
}, He = {
|
|
189
|
+
icon: { type: [String, Object] },
|
|
190
|
+
iconPosition: {
|
|
191
|
+
type: String,
|
|
192
|
+
validation: (t) => Object.values(X).includes(t),
|
|
193
|
+
default: X.RIGHT
|
|
194
|
+
}
|
|
195
|
+
}, Me = {
|
|
196
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
197
|
+
}, ze = {
|
|
198
|
+
...ae,
|
|
199
|
+
...le,
|
|
200
|
+
...se,
|
|
201
|
+
modelValue: {
|
|
202
|
+
type: [String, Number, Boolean, Object, Array]
|
|
203
|
+
},
|
|
204
|
+
labelNoResults: { type: String, default: "No results" },
|
|
205
|
+
multiple: Boolean,
|
|
206
|
+
maxValues: [Number, String]
|
|
207
|
+
}, qe = {
|
|
208
|
+
key: 0,
|
|
209
|
+
role: "option"
|
|
210
|
+
}, Ze = ["aria-selected"], Ge = ["for", "onClick"], Ue = ["id", "type", "value", "checked", "disabled"], Je = {
|
|
211
|
+
name: "VvDropdown"
|
|
212
|
+
}, Xe = /* @__PURE__ */ M({
|
|
213
|
+
...Je,
|
|
214
|
+
props: ze,
|
|
215
|
+
emits: ["update:modelValue"],
|
|
216
|
+
setup(t, { emit: r }) {
|
|
217
|
+
const e = t, u = re(), { modifiers: o, disabled: a } = _(e), { getOptionLabel: n, getOptionValue: g } = oe(e), { bemCssClasses: v } = z("vv-dropdown", {
|
|
218
|
+
modifiers: o,
|
|
219
|
+
disabled: a
|
|
220
|
+
});
|
|
221
|
+
function f(i) {
|
|
222
|
+
return Array.isArray(e.modelValue) ? j(i, e.modelValue) || j(g(i), e.modelValue) : T(i, e.modelValue) || T(g(i), e.modelValue);
|
|
223
|
+
}
|
|
224
|
+
function l(i) {
|
|
225
|
+
return typeof i == "string" || i.disabled === void 0 ? a.value : i.disabled;
|
|
226
|
+
}
|
|
227
|
+
function s(i) {
|
|
228
|
+
var h;
|
|
229
|
+
if (e.disabled)
|
|
230
|
+
return;
|
|
231
|
+
let p = i;
|
|
232
|
+
if (e.multiple)
|
|
233
|
+
if (Array.isArray(e.modelValue)) {
|
|
234
|
+
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((h = e.modelValue) == null ? void 0 : h.length) >= e.maxValues && !j(i, e.modelValue))
|
|
235
|
+
return;
|
|
236
|
+
p = j(i, e.modelValue) ? De(i, e.modelValue) : [...e.modelValue, i];
|
|
237
|
+
} else
|
|
238
|
+
p = [i];
|
|
239
|
+
r("update:modelValue", p);
|
|
240
|
+
}
|
|
241
|
+
return (i, p) => {
|
|
242
|
+
var h;
|
|
243
|
+
return V(), w("ul", {
|
|
244
|
+
class: Y(c(v)),
|
|
245
|
+
role: "listbox"
|
|
246
|
+
}, [
|
|
247
|
+
(h = i.options) != null && h.length ? A("", !0) : (V(), w("li", qe, [
|
|
248
|
+
I("label", null, x(i.labelNoResults), 1)
|
|
249
|
+
])),
|
|
250
|
+
(V(!0), w(ee, null, be(i.options, (y, S) => (V(), w("li", {
|
|
251
|
+
key: S,
|
|
252
|
+
role: "option",
|
|
253
|
+
"aria-selected": f(y)
|
|
254
|
+
}, [
|
|
255
|
+
I("label", {
|
|
256
|
+
for: `dropdown-${S}-${c(u)}`,
|
|
257
|
+
onClick: Ve((C) => s(c(g)(y)), ["prevent"])
|
|
258
|
+
}, [
|
|
259
|
+
I("input", {
|
|
260
|
+
id: `dropdown-${S}-${c(u)}`,
|
|
261
|
+
type: i.multiple ? "checkbox" : "radio",
|
|
262
|
+
value: c(g)(y),
|
|
263
|
+
checked: f(y),
|
|
264
|
+
disabled: l(y),
|
|
265
|
+
tabindex: "-1",
|
|
266
|
+
"aria-hidden": "true"
|
|
267
|
+
}, null, 8, Ue),
|
|
268
|
+
te(" " + x(c(n)(y)), 1)
|
|
269
|
+
], 8, Ge)
|
|
270
|
+
], 8, Ze))), 128))
|
|
271
|
+
], 2);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}), Qe = "ds", We = {
|
|
275
|
+
color: String,
|
|
276
|
+
width: {
|
|
277
|
+
type: [String, Number]
|
|
278
|
+
},
|
|
279
|
+
height: {
|
|
280
|
+
type: [String, Number]
|
|
281
|
+
},
|
|
282
|
+
name: {
|
|
283
|
+
type: String,
|
|
284
|
+
required: !0
|
|
285
|
+
},
|
|
286
|
+
provider: {
|
|
287
|
+
type: String
|
|
288
|
+
},
|
|
289
|
+
prefix: {
|
|
290
|
+
type: String,
|
|
291
|
+
default: "normal"
|
|
292
|
+
},
|
|
293
|
+
src: String,
|
|
294
|
+
horizontalFlip: Boolean,
|
|
295
|
+
verticalFlip: Boolean,
|
|
296
|
+
flip: String,
|
|
297
|
+
mode: String,
|
|
298
|
+
inline: Boolean,
|
|
299
|
+
rotate: [Number, String],
|
|
300
|
+
onLoad: Function,
|
|
301
|
+
svg: String,
|
|
302
|
+
modifiers: {
|
|
303
|
+
type: [String, Array]
|
|
304
|
+
}
|
|
305
|
+
}, Ye = {
|
|
306
|
+
name: "VvIcon"
|
|
307
|
+
}, Q = /* @__PURE__ */ M({
|
|
308
|
+
...Ye,
|
|
309
|
+
props: We,
|
|
310
|
+
setup(t) {
|
|
311
|
+
const r = t, e = k(!0), { modifiers: u } = _(r), o = Se(Qe), { bemCssClasses: a } = z("vv-icon", {
|
|
312
|
+
modifiers: u
|
|
313
|
+
}), n = m(() => r.provider || (o == null ? void 0 : o.provider)), g = m(() => {
|
|
314
|
+
const l = r.name ?? "", s = `@${n.value}:${r.prefix}:${r.name}`;
|
|
315
|
+
return D(l) ? l : D(s) ? s : (o == null ? void 0 : o.iconsCollections.find((i) => {
|
|
316
|
+
const p = `@${n.value}:${i.prefix}:${l}`;
|
|
317
|
+
if (D(p))
|
|
318
|
+
return p;
|
|
319
|
+
})) || l;
|
|
320
|
+
});
|
|
321
|
+
function v(l) {
|
|
322
|
+
let s = null;
|
|
323
|
+
if (typeof window > "u") {
|
|
324
|
+
const { JSDOM: y } = require("jsdom");
|
|
325
|
+
s = new y().window;
|
|
326
|
+
}
|
|
327
|
+
return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
|
|
328
|
+
}
|
|
329
|
+
function f(l) {
|
|
330
|
+
const s = v(l), i = (s == null ? void 0 : s.innerHTML.trim()) || "";
|
|
331
|
+
s && i && Pe(`@${n.value}:${r.prefix}:${r.name}`, {
|
|
332
|
+
body: i,
|
|
333
|
+
height: s.viewBox.baseVal.height,
|
|
334
|
+
width: s.viewBox.baseVal.width
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
return o && (r.src && !D(`@${n.value}:${r.prefix}:${r.name}`) ? (e.value = !1, o.fetchIcon(r.src).then((l) => {
|
|
338
|
+
l && (f(l), e.value = !0);
|
|
339
|
+
}).catch((l) => {
|
|
340
|
+
throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
|
|
341
|
+
})) : r.svg && f(r.svg)), (l, s) => e.value ? (V(), L(c(Be), R({
|
|
342
|
+
key: 0,
|
|
343
|
+
class: c(a)
|
|
344
|
+
}, {
|
|
345
|
+
inline: l.inline,
|
|
346
|
+
width: l.width,
|
|
347
|
+
height: l.height,
|
|
348
|
+
horizontalFlip: l.horizontalFlip,
|
|
349
|
+
verticalFlip: l.verticalFlip,
|
|
350
|
+
flip: l.flip,
|
|
351
|
+
rotate: l.rotate,
|
|
352
|
+
color: l.color,
|
|
353
|
+
onLoad: l.onLoad,
|
|
354
|
+
icon: c(g)
|
|
355
|
+
}), null, 16, ["class"])) : A("", !0);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
function F(t) {
|
|
359
|
+
return Array.isArray(t) ? t.filter((r) => je(r)).join(" ") : t;
|
|
360
|
+
}
|
|
361
|
+
function et(t, r) {
|
|
362
|
+
const {
|
|
363
|
+
invalid: e,
|
|
364
|
+
valid: u,
|
|
365
|
+
hint: o,
|
|
366
|
+
loading: a
|
|
367
|
+
} = r, {
|
|
368
|
+
hintLabel: n,
|
|
369
|
+
modelValue: g,
|
|
370
|
+
valid: v,
|
|
371
|
+
validLabel: f,
|
|
372
|
+
invalid: l,
|
|
373
|
+
invalidLabel: s,
|
|
374
|
+
...i
|
|
375
|
+
} = _(t), p = E(i, "loading"), h = E(i, "loadingLabel"), y = m(() => l.value ? !!(l.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !ne(s)) : !1), S = m(
|
|
376
|
+
() => !!(n && n.value || o)
|
|
377
|
+
), C = m(
|
|
378
|
+
() => !!(f && f.value || u)
|
|
379
|
+
), B = m(
|
|
380
|
+
() => !!(p != null && p.value && a || p != null && p.value && (h != null && h.value))
|
|
381
|
+
), K = m(
|
|
382
|
+
() => S.value || C.value || y.value || B.value
|
|
383
|
+
);
|
|
384
|
+
return {
|
|
385
|
+
hasInvalid: y,
|
|
386
|
+
hasHint: S,
|
|
387
|
+
hasValid: C,
|
|
388
|
+
hasLoading: B,
|
|
389
|
+
HintSlot: {
|
|
390
|
+
name: "HintSlot",
|
|
391
|
+
props: {
|
|
392
|
+
params: {
|
|
393
|
+
type: Object,
|
|
394
|
+
default: () => ({})
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
setup(P) {
|
|
398
|
+
const N = m(() => {
|
|
399
|
+
const $ = ke({
|
|
400
|
+
hintLabel: n,
|
|
401
|
+
modelValue: g,
|
|
402
|
+
valid: v,
|
|
403
|
+
validLabel: f,
|
|
404
|
+
invalid: l,
|
|
405
|
+
invalidLabel: s,
|
|
406
|
+
loading: p,
|
|
407
|
+
loadingLabel: h,
|
|
408
|
+
...P.params
|
|
409
|
+
});
|
|
410
|
+
return l != null && l.value ? (e == null ? void 0 : e($)) || F(s == null ? void 0 : s.value) || (n == null ? void 0 : n.value) : v != null && v.value ? (u == null ? void 0 : u($)) || F(f == null ? void 0 : f.value) || (n == null ? void 0 : n.value) : p != null && p.value ? (a == null ? void 0 : a($)) || F(h == null ? void 0 : h.value) || (n == null ? void 0 : n.value) : (o == null ? void 0 : o($)) || F(n == null ? void 0 : n.value) || (n == null ? void 0 : n.value);
|
|
411
|
+
});
|
|
412
|
+
return {
|
|
413
|
+
isVisible: K,
|
|
414
|
+
hasInvalid: y,
|
|
415
|
+
hasValid: C,
|
|
416
|
+
hintContent: N
|
|
417
|
+
};
|
|
418
|
+
},
|
|
419
|
+
render() {
|
|
420
|
+
if (this.isVisible)
|
|
421
|
+
return we(
|
|
422
|
+
"small",
|
|
423
|
+
{
|
|
424
|
+
role: this.hasInvalid || this.hasValid ? "alert" : void 0
|
|
425
|
+
},
|
|
426
|
+
this.hintContent
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
const tt = [
|
|
433
|
+
"update:modelValue",
|
|
434
|
+
"change:search",
|
|
435
|
+
"focus",
|
|
436
|
+
"blur"
|
|
437
|
+
], rt = {
|
|
438
|
+
...Me,
|
|
439
|
+
...xe,
|
|
440
|
+
...Te,
|
|
441
|
+
...Le,
|
|
442
|
+
...Ee,
|
|
443
|
+
...le,
|
|
444
|
+
...Ke,
|
|
445
|
+
...se,
|
|
446
|
+
...ae,
|
|
447
|
+
...He,
|
|
448
|
+
modelValue: {
|
|
449
|
+
type: [String, Number, Boolean, Object, Array],
|
|
450
|
+
default: void 0
|
|
451
|
+
},
|
|
452
|
+
label: String,
|
|
453
|
+
labelNoResults: { type: String, default: "No results" },
|
|
454
|
+
placeholder: String,
|
|
455
|
+
searchable: Boolean,
|
|
456
|
+
searchPlaceholder: String,
|
|
457
|
+
debounceSearch: {
|
|
458
|
+
type: [Number, String],
|
|
459
|
+
default: 0
|
|
460
|
+
},
|
|
461
|
+
multiple: Boolean,
|
|
462
|
+
maxValues: [Number, String],
|
|
463
|
+
separator: { type: String, default: ", " },
|
|
464
|
+
native: Boolean
|
|
465
|
+
}, nt = ["id"], ot = ["id", "for"], lt = ["tabindex"], st = ["id", "placeholder"], at = {
|
|
466
|
+
name: "VvCombobox"
|
|
467
|
+
}, ft = /* @__PURE__ */ M({
|
|
468
|
+
...at,
|
|
469
|
+
props: rt,
|
|
470
|
+
emits: tt,
|
|
471
|
+
setup(t, { emit: r }) {
|
|
472
|
+
const e = t, u = $e(), { HintSlot: o } = et(e, u), a = k(), n = k(), { focused: g } = Re(a, r), v = re(), f = k(""), l = Ie(
|
|
473
|
+
f,
|
|
474
|
+
Number(e.debounceSearch)
|
|
475
|
+
), s = k(!1), {
|
|
476
|
+
icon: i,
|
|
477
|
+
iconPosition: p,
|
|
478
|
+
modifiers: h,
|
|
479
|
+
disabled: y,
|
|
480
|
+
readonly: S,
|
|
481
|
+
loading: C,
|
|
482
|
+
valid: B,
|
|
483
|
+
invalid: K
|
|
484
|
+
} = _(e);
|
|
485
|
+
W(
|
|
486
|
+
l,
|
|
487
|
+
() => r("change:search", l.value)
|
|
488
|
+
);
|
|
489
|
+
const { hasIcon: P, hasIconLeft: N, hasIconRight: $ } = Fe(
|
|
490
|
+
i,
|
|
491
|
+
p
|
|
492
|
+
), ue = m(() => !ne(e.modelValue)), ie = m(() => y.value || S.value ? -1 : e.tabindex), { bemCssClasses: ce } = z("vv-select", {
|
|
493
|
+
modifiers: h,
|
|
494
|
+
disabled: y,
|
|
495
|
+
loading: C,
|
|
496
|
+
readonly: S,
|
|
497
|
+
iconLeft: N,
|
|
498
|
+
iconRight: $,
|
|
499
|
+
valid: B,
|
|
500
|
+
invalid: K,
|
|
501
|
+
dirty: ue,
|
|
502
|
+
focus: g
|
|
503
|
+
}), de = m(
|
|
504
|
+
() => e.searchable ? pe.value : e.options
|
|
505
|
+
), { getOptionLabel: fe, getOptionValue: q } = oe(e), pe = m(() => {
|
|
506
|
+
var d;
|
|
507
|
+
return (d = e.options) == null ? void 0 : d.filter((b) => fe(b).toLowerCase().includes(l.value.toLowerCase().trim()));
|
|
508
|
+
}), me = m(() => {
|
|
509
|
+
let d = [];
|
|
510
|
+
return Array.isArray(e.modelValue) ? d = e.modelValue : e.modelValue && (d = [e.modelValue]), e.options.filter(
|
|
511
|
+
(b) => d.includes(q(b))
|
|
512
|
+
);
|
|
513
|
+
}), ve = m(() => me.value.map((d) => q(d)).join(e.separator));
|
|
514
|
+
_e(a, () => {
|
|
515
|
+
a.value.open = !1;
|
|
516
|
+
});
|
|
517
|
+
function ge(d) {
|
|
518
|
+
const b = d.target;
|
|
519
|
+
s.value = b.open;
|
|
520
|
+
}
|
|
521
|
+
function he(d) {
|
|
522
|
+
a.value && !e.multiple && (a.value.open = !1), r("update:modelValue", d);
|
|
523
|
+
}
|
|
524
|
+
const ye = m(() => ({
|
|
525
|
+
options: de.value,
|
|
526
|
+
labelKey: e.labelKey,
|
|
527
|
+
valueKey: e.valueKey,
|
|
528
|
+
disabled: e.disabled,
|
|
529
|
+
labelNoResults: e.labelNoResults,
|
|
530
|
+
multiple: e.multiple,
|
|
531
|
+
maxValues: e.maxValues,
|
|
532
|
+
modelValue: e.modelValue
|
|
533
|
+
}));
|
|
534
|
+
return (d, b) => d.native ? A("", !0) : (V(), w("div", {
|
|
535
|
+
key: 0,
|
|
536
|
+
id: c(v),
|
|
537
|
+
class: Y(c(ce))
|
|
538
|
+
}, [
|
|
539
|
+
d.label ? (V(), w("label", {
|
|
540
|
+
key: 0,
|
|
541
|
+
id: `${c(v)}-label`,
|
|
542
|
+
for: d.searchable && s.value ? `${c(v)}-input` : void 0
|
|
543
|
+
}, x(d.label), 9, ot)) : A("", !0),
|
|
544
|
+
I("details", {
|
|
545
|
+
ref_key: "dropdown",
|
|
546
|
+
ref: a,
|
|
547
|
+
class: "vv-select__wrapper",
|
|
548
|
+
onClick: b[2] || (b[2] = (O) => c(y) || c(S) ? O.preventDefault() : null),
|
|
549
|
+
onKeyup: b[3] || (b[3] = Z((O) => a.value.open = !1, ["esc"])),
|
|
550
|
+
onToggle: ge
|
|
551
|
+
}, [
|
|
552
|
+
I("summary", {
|
|
553
|
+
class: "vv-select__input",
|
|
554
|
+
tabindex: c(ie),
|
|
555
|
+
onKeyup: b[1] || (b[1] = Z((O) => d.searchable ? O.preventDefault() : null, ["space"]))
|
|
556
|
+
}, [
|
|
557
|
+
G(d.$slots, "before", {}, () => [
|
|
558
|
+
c(N) ? (V(), L(Q, R({
|
|
559
|
+
key: 0,
|
|
560
|
+
class: "vv-select__icon-left"
|
|
561
|
+
}, c(P)), null, 16)) : A("", !0)
|
|
562
|
+
]),
|
|
563
|
+
d.searchable && s.value ? Ce((V(), w("input", {
|
|
564
|
+
key: 0,
|
|
565
|
+
id: `${c(v)}-input`,
|
|
566
|
+
ref_key: "inputSearch",
|
|
567
|
+
ref: n,
|
|
568
|
+
"onUpdate:modelValue": b[0] || (b[0] = (O) => f.value = O),
|
|
569
|
+
role: "combobox",
|
|
570
|
+
type: "search",
|
|
571
|
+
placeholder: d.searchPlaceholder
|
|
572
|
+
}, null, 8, st)), [
|
|
573
|
+
[Oe, f.value]
|
|
574
|
+
]) : (V(), w(ee, { key: 1 }, [
|
|
575
|
+
te(x(c(ve) || d.placeholder), 1)
|
|
576
|
+
], 64)),
|
|
577
|
+
G(d.$slots, "after", {}, () => [
|
|
578
|
+
c($) ? (V(), L(Q, R({
|
|
579
|
+
key: 0,
|
|
580
|
+
class: "vv-select__icon-right"
|
|
581
|
+
}, c(P)), null, 16)) : A("", !0)
|
|
582
|
+
])
|
|
583
|
+
], 40, lt),
|
|
584
|
+
U(Xe, R({
|
|
585
|
+
id: `${c(v)}-dropdown`
|
|
586
|
+
}, c(ye), { "onUpdate:modelValue": he }), null, 16, ["id"])
|
|
587
|
+
], 544),
|
|
588
|
+
U(c(o), { class: "vv-select__hint" })
|
|
589
|
+
], 10, nt));
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
export {
|
|
593
|
+
ft as default
|
|
594
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,k){typeof exports=="object"&&typeof module<"u"?module.exports=k(require("vue"),require("nanoid"),require("@vueuse/core"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","nanoid","@vueuse/core","@iconify/vue"],k):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCombobox=k(e.vue,e.nanoid,e.core,e.vue$1))})(this,function(e,k,N,B){"use strict";function O(n,r,t){return t?$(n,t)===$(r,t):x(n,r)}function x(n,r){if(n===r)return!0;if(n&&r&&typeof n=="object"&&typeof r=="object"){const t=Array.isArray(n),c=Array.isArray(r);let l,i,o;if(t&&c){if(i=n.length,i!=r.length)return!1;for(l=i;l--!==0;)if(!x(n[l],r[l]))return!1;return!0}if(t!=c)return!1;const g=n instanceof Date,m=r instanceof Date;if(g!=m)return!1;if(g&&m)return n.getTime()==r.getTime();const f=n instanceof RegExp,s=r instanceof RegExp;if(f!=s)return!1;if(f&&s)return n.toString()==r.toString();const a=Object.keys(n);if(i=a.length,i!==Object.keys(r).length)return!1;for(l=i;l--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[l]))return!1;for(l=i;l--!==0;)if(o=a[l],!x(n[o],r[o]))return!1;return!0}return n!==n&&r!==r}function $(n,r){if(n&&Object.keys(n).length&&r){if(r.indexOf(".")===-1)return n[r];{const t=r.split(".");let c=n;for(let l=0,i=t.length;l<i;++l){if(n==null)return null;c=c[t[l]]}return c}}else return null}function z(n,r){let t=-1;if(r){for(let c=0;c<r.length;c++)if(O(r[c],n)){t=c;break}}return t}function A(n,r){if(n!=null&&r&&r.length){for(const t of r)if(O(n,t))return!0}return!1}function j(n){return(r=>r==null||r===""||Array.isArray(r)&&r.length===0||!(r instanceof Date)&&typeof r=="object"&&Object.keys(r).length===0)(e.unref(n))}function Z(n,r){const t=z(n,r);return t>-1?r.filter((c,l)=>l!==t):r}function G(n){return typeof n=="string"||n instanceof String}function F(n){var r,t;if(n)return(t=(r=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:r.join("-"))==null?void 0:t.toLowerCase()}function D(n,r){const t={[`${n}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(r).reduce((l,i)=>{const o=e.unref(r[i])||!1;if(!o)return l;if(i==="modifiers"){const g=Array.isArray(o)?o:o.split(" ");return{...l,...g.reduce((m,f)=>({...m,[`${n}--${F(f)}`]:!0}),{})}}else return{...l,[`${n}--${F(i)}`]:o}},t)||{})}}function U(n,r,t){const c=e.computed(()=>!!(n!=null&&n.value&&r.value==="left"||t!=null&&t.iconLeft)),l=e.computed(()=>!!(n!=null&&n.value&&r.value==="right"||t!=null&&t.iconRight)),i=e.computed(()=>!!(n!=null&&n.value&&r.value==="top"||t!=null&&t.iconTop)),o=e.computed(()=>!!(n!=null&&n.value&&r.value==="bottom"||t!=null&&t.iconBottom));return{hasIcon:e.computed(()=>typeof(n==null?void 0:n.value)=="string"?{name:n==null?void 0:n.value}:n==null?void 0:n.value),hasIconLeft:c,hasIconRight:l,hasIconTop:i,hasIconBottom:o}}function T(n){const{options:r,labelKey:t,valueKey:c}=e.toRefs(n);return{options:r,getOptionLabel:o=>typeof o!="object"&&o!==null?o:typeof t.value=="function"?t.value(o):o[t.value],getOptionValue:o=>typeof o!="object"&&o!==null?o:typeof c.value=="function"?c.value(o):o[c.value]}}function J(n,r){const{focused:t}=N.useFocus(n);return e.watch(t,c=>{r(c?"focus":"blur",e.unref(n))}),{focused:t}}const X={valid:Boolean,validLabel:[String,Array]},Q={invalid:Boolean,invalidLabel:[String,Array]},W={loading:Boolean,loadingLabel:String},K={disabled:Boolean},Y={readonly:Boolean},L={modifiers:[String,Array]},ee={hintLabel:{type:String,default:""}},q={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"}},H={LEFT:"left",RIGHT:"right"},te={icon:{type:[String,Object]},iconPosition:{type:String,validation:n=>Object.values(H).includes(n),default:H.RIGHT}},ne={tabindex:{type:[String,Number],default:0}},re={...q,...K,...L,modelValue:{type:[String,Number,Boolean,Object,Array]},labelNoResults:{type:String,default:"No results"},multiple:Boolean,maxValues:[Number,String]},oe={key:0,role:"option"},le=["aria-selected"],se=["for","onClick"],ae=["id","type","value","checked","disabled"],ie={name:"VvDropdown"},ce=e.defineComponent({...ie,props:re,emits:["update:modelValue"],setup(n,{emit:r}){const t=n,c=k.nanoid(),{modifiers:l,disabled:i}=e.toRefs(t),{getOptionLabel:o,getOptionValue:g}=T(t),{bemCssClasses:m}=D("vv-dropdown",{modifiers:l,disabled:i});function f(u){return Array.isArray(t.modelValue)?A(u,t.modelValue)||A(g(u),t.modelValue):O(u,t.modelValue)||O(g(u),t.modelValue)}function s(u){return typeof u=="string"||u.disabled===void 0?i.value:u.disabled}function a(u){var y;if(t.disabled)return;let p=u;if(t.multiple)if(Array.isArray(t.modelValue)){if(t.maxValues!==void 0&&t.maxValues>=0&&((y=t.modelValue)==null?void 0:y.length)>=t.maxValues&&!A(u,t.modelValue))return;p=A(u,t.modelValue)?Z(u,t.modelValue):[...t.modelValue,u]}else p=[u];r("update:modelValue",p)}return(u,p)=>{var y;return e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(m)),role:"listbox"},[(y=u.options)!=null&&y.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",oe,[e.createElementVNode("label",null,e.toDisplayString(u.labelNoResults),1)])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.options,(h,V)=>(e.openBlock(),e.createElementBlock("li",{key:V,role:"option","aria-selected":f(h)},[e.createElementVNode("label",{for:`dropdown-${V}-${e.unref(c)}`,onClick:e.withModifiers(C=>a(e.unref(g)(h)),["prevent"])},[e.createElementVNode("input",{id:`dropdown-${V}-${e.unref(c)}`,type:u.multiple?"checkbox":"radio",value:e.unref(g)(h),checked:f(h),disabled:s(h),tabindex:"-1","aria-hidden":"true"},null,8,ae),e.createTextVNode(" "+e.toDisplayString(e.unref(o)(h)),1)],8,se)],8,le))),128))],2)}}}),ue="ds",de={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},fe={name:"VvIcon"},M=e.defineComponent({...fe,props:de,setup(n){const r=n,t=e.ref(!0),{modifiers:c}=e.toRefs(r),l=e.inject(ue),{bemCssClasses:i}=D("vv-icon",{modifiers:c}),o=e.computed(()=>r.provider||(l==null?void 0:l.provider)),g=e.computed(()=>{const s=r.name??"",a=`@${o.value}:${r.prefix}:${r.name}`;return B.iconExists(s)?s:B.iconExists(a)?a:(l==null?void 0:l.iconsCollections.find(u=>{const p=`@${o.value}:${u.prefix}:${s}`;if(B.iconExists(p))return p}))||s});function m(s){let a=null;if(typeof window>"u"){const{JSDOM:h}=require("jsdom");a=new h().window}return(a?new a.DOMParser:new window.DOMParser).parseFromString(s,"text/html").querySelector("svg")}function f(s){const a=m(s),u=(a==null?void 0:a.innerHTML.trim())||"";a&&u&&B.addIcon(`@${o.value}:${r.prefix}:${r.name}`,{body:u,height:a.viewBox.baseVal.height,width:a.viewBox.baseVal.width})}return l&&(r.src&&!B.iconExists(`@${o.value}:${r.prefix}:${r.name}`)?(t.value=!1,l.fetchIcon(r.src).then(s=>{s&&(f(s),t.value=!0)}).catch(s=>{throw new Error(`During fetch icon: ${s==null?void 0:s.message}`)})):r.svg&&f(r.svg)),(s,a)=>t.value?(e.openBlock(),e.createBlock(e.unref(B.Icon),e.mergeProps({key:0,class:e.unref(i)},{inline:s.inline,width:s.width,height:s.height,horizontalFlip:s.horizontalFlip,verticalFlip:s.verticalFlip,flip:s.flip,rotate:s.rotate,color:s.color,onLoad:s.onLoad,icon:e.unref(g)}),null,16,["class"])):e.createCommentVNode("",!0)}});function I(n){return Array.isArray(n)?n.filter(r=>G(r)).join(" "):n}function pe(n,r){const{invalid:t,valid:c,hint:l,loading:i}=r,{hintLabel:o,modelValue:g,valid:m,validLabel:f,invalid:s,invalidLabel:a,...u}=e.toRefs(n),p=$(u,"loading"),y=$(u,"loadingLabel"),h=e.computed(()=>s.value?!!(s.value&&t||a!=null&&a.value&&Array.isArray(a.value)&&a.value.length>0||a!=null&&a.value&&!j(a)):!1),V=e.computed(()=>!!(o&&o.value||l)),C=e.computed(()=>!!(f&&f.value||c)),E=e.computed(()=>!!(p!=null&&p.value&&i||p!=null&&p.value&&(y!=null&&y.value))),R=e.computed(()=>V.value||C.value||h.value||E.value);return{hasInvalid:h,hasHint:V,hasValid:C,hasLoading:E,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(P){const _=e.computed(()=>{const S=N.toReactive({hintLabel:o,modelValue:g,valid:m,validLabel:f,invalid:s,invalidLabel:a,loading:p,loadingLabel:y,...P.params});return s!=null&&s.value?(t==null?void 0:t(S))||I(a==null?void 0:a.value)||(o==null?void 0:o.value):m!=null&&m.value?(c==null?void 0:c(S))||I(f==null?void 0:f.value)||(o==null?void 0:o.value):p!=null&&p.value?(i==null?void 0:i(S))||I(y==null?void 0:y.value)||(o==null?void 0:o.value):(l==null?void 0:l(S))||I(o==null?void 0:o.value)||(o==null?void 0:o.value)});return{isVisible:R,hasInvalid:h,hasValid:C,hintContent:_}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid||this.hasValid?"alert":void 0},this.hintContent)}}}}const me=["update:modelValue","change:search","focus","blur"],ge={...ne,...X,...Q,...ee,...W,...K,...Y,...L,...q,...te,modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},label:String,labelNoResults:{type:String,default:"No results"},placeholder:String,searchable:Boolean,searchPlaceholder:String,debounceSearch:{type:[Number,String],default:0},multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},native:Boolean},ye=["id"],he=["id","for"],be=["tabindex"],Ve=["id","placeholder"],Se={name:"VvCombobox"};return e.defineComponent({...Se,props:ge,emits:me,setup(n,{emit:r}){const t=n,c=e.useSlots(),{HintSlot:l}=pe(t,c),i=e.ref(),o=e.ref(),{focused:g}=J(i,r),m=k.nanoid(),f=e.ref(""),s=N.refDebounced(f,Number(t.debounceSearch)),a=e.ref(!1),{icon:u,iconPosition:p,modifiers:y,disabled:h,readonly:V,loading:C,valid:E,invalid:R}=e.toRefs(t);e.watch(s,()=>r("change:search",s.value));const{hasIcon:P,hasIconLeft:_,hasIconRight:S}=U(u,p),ke=e.computed(()=>!j(t.modelValue)),Be=e.computed(()=>h.value||V.value?-1:t.tabindex),{bemCssClasses:Ce}=D("vv-select",{modifiers:y,disabled:h,loading:C,readonly:V,iconLeft:_,iconRight:S,valid:E,invalid:R,dirty:ke,focus:g}),we=e.computed(()=>t.searchable?Oe.value:t.options),{getOptionLabel:Ne,getOptionValue:v}=T(t),Oe=e.computed(()=>{var d;return(d=t.options)==null?void 0:d.filter(b=>Ne(b).toLowerCase().includes(s.value.toLowerCase().trim()))}),$e=e.computed(()=>{let d=[];return Array.isArray(t.modelValue)?d=t.modelValue:t.modelValue&&(d=[t.modelValue]),t.options.filter(b=>d.includes(v(b)))}),Ae=e.computed(()=>$e.value.map(d=>v(d)).join(t.separator));N.onClickOutside(i,()=>{i.value.open=!1});function Ie(d){const b=d.target;a.value=b.open}function Ee(d){i.value&&!t.multiple&&(i.value.open=!1),r("update:modelValue",d)}const Pe=e.computed(()=>({options:we.value,labelKey:t.labelKey,valueKey:t.valueKey,disabled:t.disabled,labelNoResults:t.labelNoResults,multiple:t.multiple,maxValues:t.maxValues,modelValue:t.modelValue}));return(d,b)=>d.native?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(Ce))},[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:`${e.unref(m)}-label`,for:d.searchable&&a.value?`${e.unref(m)}-input`:void 0},e.toDisplayString(d.label),9,he)):e.createCommentVNode("",!0),e.createElementVNode("details",{ref_key:"dropdown",ref:i,class:"vv-select__wrapper",onClick:b[2]||(b[2]=w=>e.unref(h)||e.unref(V)?w.preventDefault():null),onKeyup:b[3]||(b[3]=e.withKeys(w=>i.value.open=!1,["esc"])),onToggle:Ie},[e.createElementVNode("summary",{class:"vv-select__input",tabindex:e.unref(Be),onKeyup:b[1]||(b[1]=e.withKeys(w=>d.searchable?w.preventDefault():null,["space"]))},[e.renderSlot(d.$slots,"before",{},()=>[e.unref(_)?(e.openBlock(),e.createBlock(M,e.mergeProps({key:0,class:"vv-select__icon-left"},e.unref(P)),null,16)):e.createCommentVNode("",!0)]),d.searchable&&a.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:`${e.unref(m)}-input`,ref_key:"inputSearch",ref:o,"onUpdate:modelValue":b[0]||(b[0]=w=>f.value=w),role:"combobox",type:"search",placeholder:d.searchPlaceholder},null,8,Ve)),[[e.vModelText,f.value]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(Ae)||d.placeholder),1)],64)),e.renderSlot(d.$slots,"after",{},()=>[e.unref(S)?(e.openBlock(),e.createBlock(M,e.mergeProps({key:0,class:"vv-select__icon-right"},e.unref(P)),null,16)):e.createCommentVNode("",!0)])],40,be),e.createVNode(ce,e.mergeProps({id:`${e.unref(m)}-dropdown`},e.unref(Pe),{"onUpdate:modelValue":Ee}),null,16,["id"])],544),e.createVNode(e.unref(l),{class:"vv-select__hint"})],10,ye))}})});
|