@volverjs/ui-vue 0.0.1-beta.6 → 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 +101 -7
- 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 +214 -256
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- 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 +147 -273
- 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} +8 -1
- package/dist/composables/useDebouncedInput.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- 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 +322 -13
- 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 -124
- 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 -154
- 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 +293 -252
- package/src/components/VvInputText/VvInputTextActions.ts +100 -0
- 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 +188 -180
- package/src/components/VvTextarea/index.ts +50 -0
- package/src/components/common/HintSlot.ts +169 -121
- 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/useComponentIcons.ts +96 -0
- package/src/composables/useDebouncedInput.ts +25 -0
- package/src/composables/useModifiers.ts +58 -14
- 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 -15
- 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 +160 -58
- 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 -424
- 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 -434
- 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 -59
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/dist/components/VvInputText/vv-input-text.es.js +0 -596
- 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 -395
- 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 -423
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +0 -2
- package/dist/components/VvSelect/vv-select.es.js +0 -427
- package/dist/components/VvSelect/vv-select.umd.js +0 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +0 -67
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/components/VvTextarea/vv-textarea.es.js +0 -472
- package/dist/components/VvTextarea/vv-textarea.umd.js +0 -2
- package/dist/composables/focus/useComponentFocus.d.ts +0 -7
- package/dist/composables/options/useOptions.d.ts +0 -5
- package/dist/stories/Icon/IconList.vue.d.ts +0 -44
- package/dist/ui-vue.es.js +0 -2985
- 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 -49
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- package/src/components/VvInputText/useInputPassword.ts +0 -38
- 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 -55
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/composables/focus/useComponentFocus.ts +0 -22
- package/src/composables/icons/useComponentIcons.ts +0 -52
- package/src/composables/options/useOptions.ts +0 -27
- 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 -15
- 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/TextareaAutocomplete.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaError.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaFloating.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIcon.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaLabel.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaLoading.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaValid.stories.mdx +0 -19
- package/src/stories/stories.scss +0 -24
- package/src/stories/volver-ui-vue.stories.mdx +0 -71
- package/src/types/.README +0 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { unref as v, computed as g, defineComponent as I, ref as G, toRefs as M, inject as P, openBlock as b, createBlock as A, mergeProps as C, createCommentVNode as $, toRef as T, useAttrs as X, useSlots as K, resolveDynamicComponent as Q, withCtx as W, renderSlot as _, createElementBlock as O, toDisplayString as j, Fragment as Y, createTextVNode as ee } from "vue";
|
|
2
|
+
import { nanoid as te } from "nanoid";
|
|
3
|
+
import { iconExists as w, Icon as ne, addIcon as re } from "@iconify/vue";
|
|
4
|
+
function V(e, t, r) {
|
|
5
|
+
return r ? B(e, r) === B(t, r) : L(e, t);
|
|
6
|
+
}
|
|
7
|
+
function L(e, t) {
|
|
8
|
+
if (e === t)
|
|
9
|
+
return !0;
|
|
10
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
11
|
+
const r = Array.isArray(e), u = Array.isArray(t);
|
|
12
|
+
let o, i, a;
|
|
13
|
+
if (r && u) {
|
|
14
|
+
if (i = e.length, i != t.length)
|
|
15
|
+
return !1;
|
|
16
|
+
for (o = i; o-- !== 0; )
|
|
17
|
+
if (!L(e[o], t[o]))
|
|
18
|
+
return !1;
|
|
19
|
+
return !0;
|
|
20
|
+
}
|
|
21
|
+
if (r != u)
|
|
22
|
+
return !1;
|
|
23
|
+
const d = e instanceof Date, s = t instanceof Date;
|
|
24
|
+
if (d != s)
|
|
25
|
+
return !1;
|
|
26
|
+
if (d && s)
|
|
27
|
+
return e.getTime() == t.getTime();
|
|
28
|
+
const c = e instanceof RegExp, n = t instanceof RegExp;
|
|
29
|
+
if (c != n)
|
|
30
|
+
return !1;
|
|
31
|
+
if (c && n)
|
|
32
|
+
return e.toString() == t.toString();
|
|
33
|
+
const l = Object.keys(e);
|
|
34
|
+
if (i = l.length, i !== Object.keys(t).length)
|
|
35
|
+
return !1;
|
|
36
|
+
for (o = i; o-- !== 0; )
|
|
37
|
+
if (!Object.prototype.hasOwnProperty.call(t, l[o]))
|
|
38
|
+
return !1;
|
|
39
|
+
for (o = i; o-- !== 0; )
|
|
40
|
+
if (a = l[o], !L(e[a], t[a]))
|
|
41
|
+
return !1;
|
|
42
|
+
return !0;
|
|
43
|
+
}
|
|
44
|
+
return e !== e && t !== t;
|
|
45
|
+
}
|
|
46
|
+
function B(e, t) {
|
|
47
|
+
if (e && Object.keys(e).length && t) {
|
|
48
|
+
if (t.indexOf(".") === -1)
|
|
49
|
+
return e[t];
|
|
50
|
+
{
|
|
51
|
+
const r = t.split(".");
|
|
52
|
+
let u = e;
|
|
53
|
+
for (let o = 0, i = r.length; o < i; ++o) {
|
|
54
|
+
if (e == null)
|
|
55
|
+
return null;
|
|
56
|
+
u = u[r[o]];
|
|
57
|
+
}
|
|
58
|
+
return u;
|
|
59
|
+
}
|
|
60
|
+
} else
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function F(e, t) {
|
|
64
|
+
if (e != null && t && t.length) {
|
|
65
|
+
for (const r of t)
|
|
66
|
+
if (V(e, r))
|
|
67
|
+
return !0;
|
|
68
|
+
}
|
|
69
|
+
return !1;
|
|
70
|
+
}
|
|
71
|
+
function oe(e) {
|
|
72
|
+
return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(v(e));
|
|
73
|
+
}
|
|
74
|
+
function R(e) {
|
|
75
|
+
var t, r;
|
|
76
|
+
if (e)
|
|
77
|
+
return (r = (t = e.match(
|
|
78
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
79
|
+
)) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
|
|
80
|
+
}
|
|
81
|
+
const N = "ds";
|
|
82
|
+
function q(e, t) {
|
|
83
|
+
const r = { [`${e}`]: !0 };
|
|
84
|
+
return {
|
|
85
|
+
bemCssClasses: g(() => Object.keys(t).reduce((o, i) => {
|
|
86
|
+
const a = v(t[i]) || !1;
|
|
87
|
+
if (!a)
|
|
88
|
+
return o;
|
|
89
|
+
if (i === "modifiers") {
|
|
90
|
+
const d = Array.isArray(a) ? a : a.split(" ");
|
|
91
|
+
return {
|
|
92
|
+
...o,
|
|
93
|
+
...d.reduce(
|
|
94
|
+
(s, c) => ({
|
|
95
|
+
...s,
|
|
96
|
+
[`${e}--${R(c)}`]: !0
|
|
97
|
+
}),
|
|
98
|
+
{}
|
|
99
|
+
)
|
|
100
|
+
};
|
|
101
|
+
} else
|
|
102
|
+
return {
|
|
103
|
+
...o,
|
|
104
|
+
[`${e}--${R(i)}`]: a
|
|
105
|
+
};
|
|
106
|
+
}, r) || {})
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const se = {
|
|
110
|
+
color: String,
|
|
111
|
+
width: {
|
|
112
|
+
type: [String, Number]
|
|
113
|
+
},
|
|
114
|
+
height: {
|
|
115
|
+
type: [String, Number]
|
|
116
|
+
},
|
|
117
|
+
name: {
|
|
118
|
+
type: String,
|
|
119
|
+
required: !0
|
|
120
|
+
},
|
|
121
|
+
provider: {
|
|
122
|
+
type: String
|
|
123
|
+
},
|
|
124
|
+
prefix: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: "normal"
|
|
127
|
+
},
|
|
128
|
+
src: String,
|
|
129
|
+
horizontalFlip: Boolean,
|
|
130
|
+
verticalFlip: Boolean,
|
|
131
|
+
flip: String,
|
|
132
|
+
mode: String,
|
|
133
|
+
inline: Boolean,
|
|
134
|
+
rotate: [Number, String],
|
|
135
|
+
onLoad: Function,
|
|
136
|
+
svg: String,
|
|
137
|
+
modifiers: {
|
|
138
|
+
type: [String, Array]
|
|
139
|
+
}
|
|
140
|
+
}, ie = {
|
|
141
|
+
name: "VvIcon"
|
|
142
|
+
}, E = /* @__PURE__ */ I({
|
|
143
|
+
...ie,
|
|
144
|
+
props: se,
|
|
145
|
+
setup(e) {
|
|
146
|
+
const t = e, r = G(!0), { modifiers: u } = M(t), o = P(N), { bemCssClasses: i } = q("vv-icon", {
|
|
147
|
+
modifiers: u
|
|
148
|
+
}), a = g(() => t.provider || (o == null ? void 0 : o.provider)), d = g(() => {
|
|
149
|
+
const n = t.name ?? "", l = `@${a.value}:${t.prefix}:${t.name}`;
|
|
150
|
+
return w(n) ? n : w(l) ? l : (o == null ? void 0 : o.iconsCollections.find((p) => {
|
|
151
|
+
const y = `@${a.value}:${p.prefix}:${n}`;
|
|
152
|
+
if (w(y))
|
|
153
|
+
return y;
|
|
154
|
+
})) || n;
|
|
155
|
+
});
|
|
156
|
+
function s(n) {
|
|
157
|
+
let l = null;
|
|
158
|
+
if (typeof window > "u") {
|
|
159
|
+
const { JSDOM: h } = require("jsdom");
|
|
160
|
+
l = new h().window;
|
|
161
|
+
}
|
|
162
|
+
return (l ? new l.DOMParser() : new window.DOMParser()).parseFromString(n, "text/html").querySelector("svg");
|
|
163
|
+
}
|
|
164
|
+
function c(n) {
|
|
165
|
+
const l = s(n), p = (l == null ? void 0 : l.innerHTML.trim()) || "";
|
|
166
|
+
l && p && re(`@${a.value}:${t.prefix}:${t.name}`, {
|
|
167
|
+
body: p,
|
|
168
|
+
height: l.viewBox.baseVal.height,
|
|
169
|
+
width: l.viewBox.baseVal.width
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return o && (t.src && !w(`@${a.value}:${t.prefix}:${t.name}`) ? (r.value = !1, o.fetchIcon(t.src).then((n) => {
|
|
173
|
+
n && (c(n), r.value = !0);
|
|
174
|
+
}).catch((n) => {
|
|
175
|
+
throw new Error(`During fetch icon: ${n == null ? void 0 : n.message}`);
|
|
176
|
+
})) : t.svg && c(t.svg)), (n, l) => r.value ? (b(), A(v(ne), C({
|
|
177
|
+
key: 0,
|
|
178
|
+
class: v(i)
|
|
179
|
+
}, {
|
|
180
|
+
inline: n.inline,
|
|
181
|
+
width: n.width,
|
|
182
|
+
height: n.height,
|
|
183
|
+
horizontalFlip: n.horizontalFlip,
|
|
184
|
+
verticalFlip: n.verticalFlip,
|
|
185
|
+
flip: n.flip,
|
|
186
|
+
rotate: n.rotate,
|
|
187
|
+
color: n.color,
|
|
188
|
+
onLoad: n.onLoad,
|
|
189
|
+
icon: v(d)
|
|
190
|
+
}), null, 16, ["class"])) : $("", !0);
|
|
191
|
+
}
|
|
192
|
+
}), le = {
|
|
193
|
+
disabled: Boolean
|
|
194
|
+
}, ae = {
|
|
195
|
+
modifiers: [String, Array]
|
|
196
|
+
};
|
|
197
|
+
function ue(e) {
|
|
198
|
+
const t = P(e, void 0), r = g(() => !oe(t));
|
|
199
|
+
function u(o, i, a) {
|
|
200
|
+
if (t != null && t.value) {
|
|
201
|
+
const s = v(t.value)[o];
|
|
202
|
+
return g({
|
|
203
|
+
get() {
|
|
204
|
+
return s == null ? void 0 : s.value;
|
|
205
|
+
},
|
|
206
|
+
set(c) {
|
|
207
|
+
s.value = c;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
const d = T(i, o);
|
|
212
|
+
return g({
|
|
213
|
+
get() {
|
|
214
|
+
return d.value;
|
|
215
|
+
},
|
|
216
|
+
set(s) {
|
|
217
|
+
a && a(`update:${o}`, s);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return {
|
|
222
|
+
group: t,
|
|
223
|
+
isInGroup: r,
|
|
224
|
+
getGroupOrLocalRef: u
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const ce = "VV_BUTTON_GROUP";
|
|
228
|
+
var k = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(k || {}), z = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(z || {}), m = /* @__PURE__ */ ((e) => (e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e))(m || {}), U = /* @__PURE__ */ ((e) => (e._blank = "_blank", e._self = "_self", e._parent = "_parent", e._top = "_top", e))(U || {});
|
|
229
|
+
const fe = ["update:modelValue"], de = {
|
|
230
|
+
...ae,
|
|
231
|
+
...le,
|
|
232
|
+
icon: {
|
|
233
|
+
type: [String, Object],
|
|
234
|
+
default: ""
|
|
235
|
+
},
|
|
236
|
+
iconPosition: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: "left",
|
|
239
|
+
validator: (e) => e in k
|
|
240
|
+
},
|
|
241
|
+
label: [String, Number],
|
|
242
|
+
loading: Boolean,
|
|
243
|
+
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
244
|
+
loadingLabel: {
|
|
245
|
+
type: String,
|
|
246
|
+
default: "Loading..."
|
|
247
|
+
},
|
|
248
|
+
to: {
|
|
249
|
+
type: [String, Object]
|
|
250
|
+
},
|
|
251
|
+
href: String,
|
|
252
|
+
target: {
|
|
253
|
+
type: String,
|
|
254
|
+
validator: (e) => e in U
|
|
255
|
+
},
|
|
256
|
+
active: Boolean,
|
|
257
|
+
pressed: Boolean,
|
|
258
|
+
rel: {
|
|
259
|
+
type: String,
|
|
260
|
+
default: "noopener noreferrer"
|
|
261
|
+
},
|
|
262
|
+
type: {
|
|
263
|
+
type: String,
|
|
264
|
+
default: "button",
|
|
265
|
+
validator: (e) => e in z
|
|
266
|
+
},
|
|
267
|
+
toggle: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
default: !1
|
|
270
|
+
},
|
|
271
|
+
modelValue: String,
|
|
272
|
+
unselectable: { type: Boolean, default: !0 }
|
|
273
|
+
};
|
|
274
|
+
function ge(e, t) {
|
|
275
|
+
var h;
|
|
276
|
+
const { group: r, isInGroup: u, getGroupOrLocalRef: o } = ue(ce), { iconPosition: i, icon: a, label: d, pressed: s } = M(e), c = o("modelValue", e, t), n = o("disabled", e), l = o("toggle", e), p = o(
|
|
277
|
+
"unselectable",
|
|
278
|
+
e
|
|
279
|
+
), y = o("modifiers", e), S = ((h = r == null ? void 0 : r.value) == null ? void 0 : h.multiple) ?? G(!1);
|
|
280
|
+
return {
|
|
281
|
+
modelValue: c,
|
|
282
|
+
disabled: n,
|
|
283
|
+
toggle: l,
|
|
284
|
+
isInGroup: u,
|
|
285
|
+
group: r,
|
|
286
|
+
modifiers: y,
|
|
287
|
+
multiple: S,
|
|
288
|
+
unselectable: p,
|
|
289
|
+
pressed: s,
|
|
290
|
+
iconPosition: i,
|
|
291
|
+
icon: a,
|
|
292
|
+
label: d
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
const ve = {
|
|
296
|
+
key: 1,
|
|
297
|
+
class: "vv-button__label"
|
|
298
|
+
}, pe = {
|
|
299
|
+
key: 1,
|
|
300
|
+
class: "vv-button__label"
|
|
301
|
+
}, me = {
|
|
302
|
+
name: "VvButton"
|
|
303
|
+
}, ke = /* @__PURE__ */ I({
|
|
304
|
+
...me,
|
|
305
|
+
props: de,
|
|
306
|
+
emits: fe,
|
|
307
|
+
setup(e, { emit: t }) {
|
|
308
|
+
const r = e, u = X(), o = K(), i = (u == null ? void 0 : u.name) || te(), {
|
|
309
|
+
modifiers: a,
|
|
310
|
+
iconPosition: d,
|
|
311
|
+
icon: s,
|
|
312
|
+
label: c,
|
|
313
|
+
modelValue: n,
|
|
314
|
+
disabled: l,
|
|
315
|
+
toggle: p,
|
|
316
|
+
unselectable: y
|
|
317
|
+
} = ge(r, t), S = P(N), h = g(() => {
|
|
318
|
+
switch (!0) {
|
|
319
|
+
case l.value:
|
|
320
|
+
return m.button;
|
|
321
|
+
case r.to !== void 0:
|
|
322
|
+
return S != null && S.nuxt ? m.nuxtLink : m.routerLink;
|
|
323
|
+
case r.href !== void 0:
|
|
324
|
+
return m.a;
|
|
325
|
+
default:
|
|
326
|
+
return m.button;
|
|
327
|
+
}
|
|
328
|
+
}), D = g(() => p.value ? Array.isArray(n.value) ? F(i, n.value) : V(i, n.value) : r.pressed), { bemCssClasses: Z } = q("vv-button", {
|
|
329
|
+
modifiers: a,
|
|
330
|
+
active: r.active,
|
|
331
|
+
pressed: D,
|
|
332
|
+
disabled: l,
|
|
333
|
+
reverse: g(
|
|
334
|
+
() => [k.right, k.bottom].includes(
|
|
335
|
+
d.value
|
|
336
|
+
)
|
|
337
|
+
),
|
|
338
|
+
column: g(
|
|
339
|
+
() => [k.top, k.bottom].includes(
|
|
340
|
+
d.value
|
|
341
|
+
)
|
|
342
|
+
),
|
|
343
|
+
iconOnly: g(
|
|
344
|
+
() => (s == null ? void 0 : s.value) && !(c != null && c.value) && !o.default
|
|
345
|
+
)
|
|
346
|
+
}), x = g(
|
|
347
|
+
() => typeof (s == null ? void 0 : s.value) == "string" ? { name: s == null ? void 0 : s.value } : s == null ? void 0 : s.value
|
|
348
|
+
), H = g(() => {
|
|
349
|
+
const f = {
|
|
350
|
+
class: Z.value,
|
|
351
|
+
"aria-pressed": D.value ? !0 : void 0
|
|
352
|
+
};
|
|
353
|
+
switch (h.value) {
|
|
354
|
+
case m.a:
|
|
355
|
+
return {
|
|
356
|
+
...f,
|
|
357
|
+
role: "button",
|
|
358
|
+
href: r.href,
|
|
359
|
+
target: r.target,
|
|
360
|
+
rel: r.rel
|
|
361
|
+
};
|
|
362
|
+
case m.routerLink:
|
|
363
|
+
case m.nuxtLink:
|
|
364
|
+
return {
|
|
365
|
+
...f,
|
|
366
|
+
role: "button",
|
|
367
|
+
to: r.to,
|
|
368
|
+
target: r.target
|
|
369
|
+
};
|
|
370
|
+
default:
|
|
371
|
+
return {
|
|
372
|
+
...f,
|
|
373
|
+
type: r.type,
|
|
374
|
+
disabled: l.value
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}), J = () => {
|
|
378
|
+
if (p.value) {
|
|
379
|
+
if (Array.isArray(n.value)) {
|
|
380
|
+
if (F(i, n.value)) {
|
|
381
|
+
y.value && (n.value = n.value.filter(
|
|
382
|
+
(f) => f !== i
|
|
383
|
+
));
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
n.value.push(i);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (V(i, n.value) && y.value) {
|
|
390
|
+
n.value = void 0;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
n.value = i;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
return (f, ye) => (b(), A(Q(v(h)), C(v(H), { onClickPassive: J }), {
|
|
397
|
+
default: W(() => [
|
|
398
|
+
_(f.$slots, "default", {}, () => [
|
|
399
|
+
f.loading ? _(f.$slots, "loading", { key: 0 }, () => [
|
|
400
|
+
f.loadingIcon ? (b(), A(E, {
|
|
401
|
+
key: 0,
|
|
402
|
+
class: "vv-button__loading-icon",
|
|
403
|
+
name: f.loadingIcon
|
|
404
|
+
}, null, 8, ["name"])) : $("", !0),
|
|
405
|
+
f.loadingLabel ? (b(), O("span", ve, j(f.loadingLabel), 1)) : $("", !0)
|
|
406
|
+
]) : (b(), O(Y, { key: 1 }, [
|
|
407
|
+
_(f.$slots, "before"),
|
|
408
|
+
v(s) ? (b(), A(E, C({
|
|
409
|
+
key: 0,
|
|
410
|
+
class: "vv-button__icon"
|
|
411
|
+
}, v(x)), null, 16)) : $("", !0),
|
|
412
|
+
v(c) ? (b(), O("span", pe, [
|
|
413
|
+
_(f.$slots, "label", {}, () => [
|
|
414
|
+
ee(j(v(c)), 1)
|
|
415
|
+
])
|
|
416
|
+
])) : $("", !0),
|
|
417
|
+
_(f.$slots, "after")
|
|
418
|
+
], 64))
|
|
419
|
+
])
|
|
420
|
+
]),
|
|
421
|
+
_: 3
|
|
422
|
+
}, 16));
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
export {
|
|
426
|
+
ke as default
|
|
427
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,_){typeof exports=="object"&&typeof module<"u"?module.exports=_(require("vue"),require("nanoid"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","nanoid","@iconify/vue"],_):(e=typeof globalThis<"u"?globalThis:e||self,e.VvButton=_(e.vue,e.nanoid,e.vue$1))})(this,function(e,_,b){"use strict";function C(t,n,o){return o?B(t,o)===B(n,o):w(t,n)}function w(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){const o=Array.isArray(t),u=Array.isArray(n);let s,l,c;if(o&&u){if(l=t.length,l!=n.length)return!1;for(s=l;s--!==0;)if(!w(t[s],n[s]))return!1;return!0}if(o!=u)return!1;const p=t instanceof Date,i=n instanceof Date;if(p!=i)return!1;if(p&&i)return t.getTime()==n.getTime();const f=t instanceof RegExp,r=n instanceof RegExp;if(f!=r)return!1;if(f&&r)return t.toString()==n.toString();const a=Object.keys(t);if(l=a.length,l!==Object.keys(n).length)return!1;for(s=l;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[s]))return!1;for(s=l;s--!==0;)if(c=a[s],!w(t[c],n[c]))return!1;return!0}return t!==t&&n!==n}function B(t,n){if(t&&Object.keys(t).length&&n){if(n.indexOf(".")===-1)return t[n];{const o=n.split(".");let u=t;for(let s=0,l=o.length;s<l;++s){if(t==null)return null;u=u[o[s]]}return u}}else return null}function V(t,n){if(t!=null&&n&&n.length){for(const o of n)if(C(t,o))return!0}return!1}function E(t){return(n=>n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&typeof n=="object"&&Object.keys(n).length===0)(e.unref(t))}function v(t){var n,o;if(t)return(o=(n=t.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:n.join("-"))==null?void 0:o.toLowerCase()}const A="ds";function $(t,n){const o={[`${t}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(n).reduce((s,l)=>{const c=e.unref(n[l])||!1;if(!c)return s;if(l==="modifiers"){const p=Array.isArray(c)?c:c.split(" ");return{...s,...p.reduce((i,f)=>({...i,[`${t}--${v(f)}`]:!0}),{})}}else return{...s,[`${t}--${v(l)}`]:c}},o)||{})}}const D={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]}},R={name:"VvIcon"},O=e.defineComponent({...R,props:D,setup(t){const n=t,o=e.ref(!0),{modifiers:u}=e.toRefs(n),s=e.inject(A),{bemCssClasses:l}=$("vv-icon",{modifiers:u}),c=e.computed(()=>n.provider||(s==null?void 0:s.provider)),p=e.computed(()=>{const r=n.name??"",a=`@${c.value}:${n.prefix}:${n.name}`;return b.iconExists(r)?r:b.iconExists(a)?a:(s==null?void 0:s.iconsCollections.find(m=>{const y=`@${c.value}:${m.prefix}:${r}`;if(b.iconExists(y))return y}))||r});function i(r){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(r,"text/html").querySelector("svg")}function f(r){const a=i(r),m=(a==null?void 0:a.innerHTML.trim())||"";a&&m&&b.addIcon(`@${c.value}:${n.prefix}:${n.name}`,{body:m,height:a.viewBox.baseVal.height,width:a.viewBox.baseVal.width})}return s&&(n.src&&!b.iconExists(`@${c.value}:${n.prefix}:${n.name}`)?(o.value=!1,s.fetchIcon(n.src).then(r=>{r&&(f(r),o.value=!0)}).catch(r=>{throw new Error(`During fetch icon: ${r==null?void 0:r.message}`)})):n.svg&&f(n.svg)),(r,a)=>o.value?(e.openBlock(),e.createBlock(e.unref(b.Icon),e.mergeProps({key:0,class:e.unref(l)},{inline:r.inline,width:r.width,height:r.height,horizontalFlip:r.horizontalFlip,verticalFlip:r.verticalFlip,flip:r.flip,rotate:r.rotate,color:r.color,onLoad:r.onLoad,icon:e.unref(p)}),null,16,["class"])):e.createCommentVNode("",!0)}}),F={disabled:Boolean},I={modifiers:[String,Array]};function N(t){const n=e.inject(t,void 0),o=e.computed(()=>!E(n));function u(s,l,c){if(n!=null&&n.value){const i=e.unref(n.value)[s];return e.computed({get(){return i==null?void 0:i.value},set(f){i.value=f}})}const p=e.toRef(l,s);return e.computed({get(){return p.value},set(i){c&&c(`update:${s}`,i)}})}return{group:n,isInGroup:o,getGroupOrLocalRef:u}}const q="VV_BUTTON_GROUP";var S=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(S||{}),P=(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(P||{}),g=(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(g||{}),L=(t=>(t._blank="_blank",t._self="_self",t._parent="_parent",t._top="_top",t))(L||{});const G=["update:modelValue"],x={...I,...F,icon:{type:[String,Object],default:""},iconPosition:{type:String,default:"left",validator:t=>t in S},label:[String,Number],loading:Boolean,loadingIcon:{type:String,default:"eos-icons:bubble-loading"},loadingLabel:{type:String,default:"Loading..."},to:{type:[String,Object]},href:String,target:{type:String,validator:t=>t in L},active:Boolean,pressed:Boolean,rel:{type:String,default:"noopener noreferrer"},type:{type:String,default:"button",validator:t=>t in P},toggle:{type:Boolean,default:!1},modelValue:String,unselectable:{type:Boolean,default:!0}};function M(t,n){var h;const{group:o,isInGroup:u,getGroupOrLocalRef:s}=N(q),{iconPosition:l,icon:c,label:p,pressed:i}=e.toRefs(t),f=s("modelValue",t,n),r=s("disabled",t),a=s("toggle",t),m=s("unselectable",t),y=s("modifiers",t),k=((h=o==null?void 0:o.value)==null?void 0:h.multiple)??e.ref(!1);return{modelValue:f,disabled:r,toggle:a,isInGroup:u,group:o,modifiers:y,multiple:k,unselectable:m,pressed:i,iconPosition:l,icon:c,label:p}}const z={key:1,class:"vv-button__label"},U={key:1,class:"vv-button__label"},Z={name:"VvButton"};return e.defineComponent({...Z,props:x,emits:G,setup(t,{emit:n}){const o=t,u=e.useAttrs(),s=e.useSlots(),l=(u==null?void 0:u.name)||_.nanoid(),{modifiers:c,iconPosition:p,icon:i,label:f,modelValue:r,disabled:a,toggle:m,unselectable:y}=M(o,n),k=e.inject(A),h=e.computed(()=>{switch(!0){case a.value:return g.button;case o.to!==void 0:return k!=null&&k.nuxt?g.nuxtLink:g.routerLink;case o.href!==void 0:return g.a;default:return g.button}}),j=e.computed(()=>m.value?Array.isArray(r.value)?V(l,r.value):C(l,r.value):o.pressed),{bemCssClasses:T}=$("vv-button",{modifiers:c,active:o.active,pressed:j,disabled:a,reverse:e.computed(()=>[S.right,S.bottom].includes(p.value)),column:e.computed(()=>[S.top,S.bottom].includes(p.value)),iconOnly:e.computed(()=>(i==null?void 0:i.value)&&!(f!=null&&f.value)&&!s.default)}),H=e.computed(()=>typeof(i==null?void 0:i.value)=="string"?{name:i==null?void 0:i.value}:i==null?void 0:i.value),J=e.computed(()=>{const d={class:T.value,"aria-pressed":j.value?!0:void 0};switch(h.value){case g.a:return{...d,role:"button",href:o.href,target:o.target,rel:o.rel};case g.routerLink:case g.nuxtLink:return{...d,role:"button",to:o.to,target:o.target};default:return{...d,type:o.type,disabled:a.value}}}),X=()=>{if(m.value){if(Array.isArray(r.value)){if(V(l,r.value)){y.value&&(r.value=r.value.filter(d=>d!==l));return}r.value.push(l);return}if(C(l,r.value)&&y.value){r.value=void 0;return}r.value=l}};return(d,Q)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(J),{onClickPassive:X}),{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},()=>[d.loading?e.renderSlot(d.$slots,"loading",{key:0},()=>[d.loadingIcon?(e.openBlock(),e.createBlock(O,{key:0,class:"vv-button__loading-icon",name:d.loadingIcon},null,8,["name"])):e.createCommentVNode("",!0),d.loadingLabel?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(d.loadingLabel),1)):e.createCommentVNode("",!0)]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(d.$slots,"before"),e.unref(i)?(e.openBlock(),e.createBlock(O,e.mergeProps({key:0,class:"vv-button__icon"},e.unref(H)),null,16)):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",U,[e.renderSlot(d.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)])])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"after")],64))])]),_:3},16))}})});
|