@volverjs/ui-vue 0.0.5 → 0.0.6-beta.15
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/README.md +3 -4
- package/auto-imports.d.ts +11 -0
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +238 -5
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
- package/dist/components/VvAccordion/index.d.ts +3 -6
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -10
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +10 -62
- package/dist/components/VvAccordionGroup/index.d.ts +4 -33
- package/dist/components/VvAction/VvAction.es.js +12 -8
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +661 -0
- package/dist/components/VvAlert/VvAlert.umd.js +1 -0
- package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
- package/dist/components/VvAlert/index.d.ts +95 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
- package/dist/components/VvAlertGroup/index.d.ts +55 -0
- package/dist/components/VvAvatar/VvAvatar.es.js +279 -0
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -0
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +15 -0
- package/dist/components/VvAvatar/index.d.ts +7 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +363 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +42 -0
- package/dist/components/VvAvatarGroup/index.d.ts +25 -0
- package/dist/components/VvBadge/VvBadge.es.js +3 -3
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +5 -31
- package/dist/components/VvBreadcrumb/index.d.ts +1 -14
- package/dist/components/VvButton/VvButton.es.js +90 -49
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +38 -13
- package/dist/components/VvButton/index.d.ts +27 -4
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +13 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +10 -62
- package/dist/components/VvButtonGroup/index.d.ts +3 -29
- package/dist/components/VvCard/VvCard.es.js +221 -2
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +7 -7
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +154 -101
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +47 -11
- package/dist/components/VvCheckbox/index.d.ts +9 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -104
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +44 -8
- package/dist/components/VvCheckboxGroup/index.d.ts +8 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +272 -175
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +73 -37
- package/dist/components/VvCombobox/index.d.ts +13 -7
- package/dist/components/VvDialog/VvDialog.es.js +45 -34
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
- package/dist/components/VvDialog/index.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdown.es.js +39 -25
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +24 -20
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
- package/dist/components/VvDropdown/index.d.ts +2 -2
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +26 -20
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +3 -3
- package/dist/components/VvIcon/index.d.ts +3 -3
- package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +166 -142
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +46 -22
- package/dist/components/VvInputText/index.d.ts +5 -5
- package/dist/components/VvNav/VvNav.es.js +454 -0
- package/dist/components/VvNav/VvNav.umd.js +1 -0
- package/dist/components/VvNav/VvNav.vue.d.ts +21 -0
- package/dist/components/VvNav/index.d.ts +19 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +19 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +1 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +6 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +2 -0
- package/dist/components/VvProgress/VvProgress.es.js +3 -3
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +154 -101
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +47 -11
- package/dist/components/VvRadio/index.d.ts +9 -4
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -104
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +44 -8
- package/dist/components/VvRadioGroup/index.d.ts +8 -3
- package/dist/components/VvSelect/VvSelect.es.js +167 -141
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +42 -18
- package/dist/components/VvSelect/index.d.ts +4 -4
- package/dist/components/VvTab/VvTab.es.js +509 -0
- package/dist/components/VvTab/VvTab.umd.js +1 -0
- package/dist/components/VvTab/VvTab.vue.d.ts +26 -0
- package/dist/components/VvTab/index.d.ts +10 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +164 -140
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +40 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
- package/dist/components/common/HintSlot.d.ts +38 -12
- package/dist/components/index.es.js +1336 -981
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useInjectAlert.d.ts +9 -0
- package/dist/composables/alert/useProvideAlert.d.ts +10 -0
- package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
- package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useVolver.d.ts +1 -2
- package/dist/constants.d.ts +33 -4
- package/dist/directives/index.d.ts +2 -2
- package/dist/directives/index.es.js +3 -3
- package/dist/directives/v-tooltip.es.js +3 -3
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +38 -16
- package/dist/resolvers/unplugin.es.js +6 -3
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
- package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
- package/dist/stories/Alert/Alert.settings.d.ts +105 -0
- package/dist/stories/Alert/Alert.stories.d.ts +9 -0
- package/dist/stories/Alert/Alert.test.d.ts +2 -0
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
- package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +97 -0
- package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
- package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
- package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
- package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
- package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +50 -0
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
- package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
- package/dist/stories/Badge/Badge.settings.d.ts +0 -3
- package/dist/stories/Badge/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
- package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +17 -9
- package/dist/stories/Button/Button.stories.d.ts +6 -0
- package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
- package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
- package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
- package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
- package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +0 -4
- package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
- package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
- package/dist/stories/Card/Card.settings.d.ts +0 -3
- package/dist/stories/Card/Card.stories.d.ts +6 -0
- package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
- package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
- package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -27
- package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -54
- package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
- package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
- package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
- package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
- package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
- package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -3
- package/dist/stories/Icon/Icon.stories.d.ts +8 -0
- package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
- package/dist/stories/InputText/InputText.settings.d.ts +1 -74
- package/dist/stories/InputText/InputText.stories.d.ts +15 -0
- package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
- package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
- package/dist/stories/Nav/Nav.settings.d.ts +30 -0
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/Nav.test.d.ts +2 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +0 -6
- package/dist/stories/Progress/Progress.stories.d.ts +7 -0
- package/dist/stories/Radio/Radio.settings.d.ts +1 -19
- package/dist/stories/Radio/Radio.stories.d.ts +11 -0
- package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
- package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
- package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Select/Select.settings.d.ts +1 -47
- package/dist/stories/Select/Select.stories.d.ts +15 -0
- package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
- package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
- package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +37 -0
- package/dist/stories/Tab/Tab.stories.d.ts +6 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
- package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
- package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
- package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
- package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +2 -39
- package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
- package/dist/stories/argTypes.d.ts +5 -125
- package/dist/test/expect.d.ts +3 -0
- package/package.json +112 -56
- 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/index.ts +22 -7
- package/src/components/VvAccordionGroup/index.ts +8 -6
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +54 -0
- package/src/components/VvAlert/index.ts +162 -0
- package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
- package/src/components/VvAlertGroup/index.ts +122 -0
- package/src/components/VvAvatar/VvAvatar.vue +21 -0
- package/src/components/VvAvatar/index.ts +9 -0
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +65 -0
- package/src/components/VvAvatarGroup/index.ts +28 -0
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +9 -6
- package/src/components/VvButton/index.ts +44 -21
- package/src/components/VvButtonGroup/VvButtonGroup.vue +2 -2
- package/src/components/VvButtonGroup/index.ts +14 -2
- package/src/components/VvCard/index.ts +3 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
- package/src/components/VvCombobox/VvCombobox.vue +41 -24
- package/src/components/VvCombobox/index.ts +11 -5
- package/src/components/VvDialog/VvDialog.vue +11 -7
- package/src/components/VvDialog/index.ts +2 -2
- package/src/components/VvDropdown/VvDropdown.vue +23 -5
- package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
- package/src/components/VvIcon/VvIcon.vue +37 -34
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputText.vue +26 -9
- package/src/components/VvNav/VvNav.vue +66 -0
- package/src/components/VvNav/index.ts +21 -0
- package/src/components/VvNavItemTitle/VvNavItemTitle.vue +11 -0
- package/src/components/VvNavSeparator/VvNavSeparator.ts +8 -0
- package/src/components/VvRadio/VvRadio.vue +23 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
- package/src/components/VvSelect/VvSelect.vue +26 -9
- package/src/components/VvTab/VvTab.vue +53 -0
- package/src/components/VvTab/index.ts +13 -0
- package/src/components/VvTextarea/VvTextarea.vue +26 -9
- package/src/components/common/HintSlot.ts +129 -170
- package/src/composables/alert/useInjectAlert.ts +8 -0
- package/src/composables/alert/useProvideAlert.ts +23 -0
- package/src/composables/dropdown/useInjectDropdown.ts +3 -28
- package/src/composables/dropdown/useProvideDropdown.ts +14 -15
- package/src/composables/useOptions.ts +9 -7
- package/src/composables/useVolver.ts +1 -2
- package/src/constants.ts +42 -4
- package/src/props/index.ts +7 -5
- package/src/resolvers/unplugin.ts +6 -3
- package/src/stories/Accordion/Accordion.settings.ts +18 -7
- package/src/stories/Accordion/Accordion.stories.ts +45 -0
- package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
- package/src/stories/Alert/Alert.settings.ts +110 -0
- package/src/stories/Alert/Alert.stories.ts +60 -0
- package/src/stories/Alert/Alert.test.ts +95 -0
- package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
- package/src/stories/Alert/AlertSlots.stories.ts +74 -0
- package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
- package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
- package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
- package/src/stories/Avatar/Avatar.settings.ts +37 -0
- package/src/stories/Avatar/Avatar.stories.ts +42 -0
- package/src/stories/Avatar/Avatar.test.ts +34 -0
- package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
- package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
- package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +60 -0
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +36 -0
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +39 -0
- package/src/stories/Badge/Badge.stories.ts +43 -0
- package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
- package/src/stories/Button/Button.settings.ts +14 -2
- package/src/stories/Button/Button.stories.ts +38 -0
- package/src/stories/Button/ButtonIcon.stories.ts +67 -0
- package/src/stories/Button/ButtonLink.stories.ts +40 -0
- package/src/stories/Button/ButtonLoading.stories.ts +41 -0
- package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
- package/src/stories/Button/ButtonSlots.stories.ts +87 -0
- package/src/stories/Button/ButtonState.stories.ts +42 -0
- package/src/stories/Button/ButtonToggle.stories.ts +52 -0
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
- package/src/stories/Card/Card.stories.ts +46 -0
- package/src/stories/Card/CardSlots.stories.ts +81 -0
- package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
- package/src/stories/Combobox/Combobox.settings.ts +3 -23
- package/src/stories/Combobox/Combobox.stories.ts +176 -0
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
- package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
- package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
- package/src/stories/Dialog/Dialog.settings.ts +1 -1
- package/src/stories/Dialog/Dialog.stories.ts +51 -0
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
- package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
- package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
- package/src/stories/Icon/Icon.settings.ts +1 -0
- package/src/stories/Icon/Icon.stories.ts +48 -0
- package/src/stories/Icon/IconsCollection.stories.ts +53 -0
- package/src/stories/InputText/InputText.settings.ts +3 -39
- package/src/stories/InputText/InputText.stories.ts +121 -0
- package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
- package/src/stories/InputText/InputTextLength.stories.ts +58 -0
- package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
- package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
- package/src/stories/InputText/InputTextType.stories.ts +119 -0
- package/src/stories/Nav/Nav.settings.ts +34 -0
- package/src/stories/Nav/Nav.stories.ts +33 -0
- package/src/stories/Nav/Nav.test.ts +32 -0
- package/src/stories/Nav/NavModifiers.stories.ts +47 -0
- package/src/stories/Progress/Progress.settings.ts +0 -3
- package/src/stories/Progress/Progress.stories.ts +41 -0
- package/src/stories/Radio/Radio.stories.ts +81 -0
- package/src/stories/Radio/RadioSlots.stories.ts +31 -0
- package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
- package/src/stories/Select/Select.settings.ts +0 -5
- package/src/stories/Select/Select.stories.ts +113 -0
- package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
- package/src/stories/Select/SelectOptions.stories.ts +77 -0
- package/src/stories/Select/SelectSlots.stories.ts +39 -0
- package/src/stories/Tab/Tab.settings.ts +41 -0
- package/src/stories/Tab/Tab.stories.ts +70 -0
- package/src/stories/Tab/Tab.test.ts +37 -0
- package/src/stories/Textarea/Textarea.settings.ts +0 -8
- package/src/stories/Textarea/Textarea.stories.ts +107 -0
- package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
- package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
- package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
- package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
- package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
- package/src/stories/argTypes.ts +5 -59
- package/src/test/expect.ts +15 -0
- package/src/types/group.d.ts +5 -3
- package/src/stories/Accordion/Accordion.stories.mdx +0 -45
- package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
- package/src/stories/Badge/Badge.stories.mdx +0 -51
- package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
- package/src/stories/Button/Button.stories.mdx +0 -35
- package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
- package/src/stories/Button/ButtonLink.stories.mdx +0 -72
- package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
- package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
- package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
- package/src/stories/Button/ButtonState.stories.mdx +0 -66
- package/src/stories/Button/ButtonToggle.stories.mdx +0 -50
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
- package/src/stories/Card/Card.stories.mdx +0 -40
- package/src/stories/Card/CardSlots.stories.mdx +0 -98
- package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
- package/src/stories/Combobox/Combobox.stories.mdx +0 -324
- package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
- package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
- package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
- package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
- package/src/stories/Dialog/Dialog.stories.mdx +0 -56
- package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
- package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
- package/src/stories/Icon/Icon.stories.mdx +0 -91
- package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
- package/src/stories/InputText/InputText.stories.mdx +0 -211
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
- package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
- package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
- package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
- package/src/stories/InputText/InputTextType.stories.mdx +0 -259
- package/src/stories/Progress/Progress.stories.mdx +0 -30
- package/src/stories/Radio/Radio.stories.mdx +0 -128
- package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
- package/src/stories/Select/Select.stories.mdx +0 -196
- package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
- package/src/stories/Select/SelectOptions.stories.mdx +0 -135
- package/src/stories/Select/SelectSlots.stories.mdx +0 -48
- package/src/stories/Textarea/Textarea.stories.mdx +0 -187
- package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
- package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
- package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
- package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
|
@@ -33,11 +33,34 @@ export const VvButtonProps = {
|
|
|
33
33
|
* Loading icon
|
|
34
34
|
*/
|
|
35
35
|
loadingIcon: { type: String, default: 'eos-icons:bubble-loading' },
|
|
36
|
+
/**
|
|
37
|
+
* Enable button toggle
|
|
38
|
+
*/
|
|
36
39
|
toggle: {
|
|
37
40
|
type: Boolean,
|
|
38
41
|
default: false,
|
|
39
42
|
},
|
|
40
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Button toggle value
|
|
45
|
+
*/
|
|
46
|
+
value: {
|
|
47
|
+
type: [String, Number, Boolean],
|
|
48
|
+
default: undefined,
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Value associated with the unchecked state
|
|
52
|
+
*/
|
|
53
|
+
uncheckedValue: {
|
|
54
|
+
type: [String, Number, Boolean],
|
|
55
|
+
default: undefined,
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Button toggle model value
|
|
59
|
+
*/
|
|
60
|
+
modelValue: {
|
|
61
|
+
type: [String, Number, Boolean],
|
|
62
|
+
default: undefined,
|
|
63
|
+
},
|
|
41
64
|
}
|
|
42
65
|
|
|
43
66
|
export type VvButtonPropsTypes = ExtractPropTypes<typeof VvButtonProps>
|
|
@@ -53,18 +76,11 @@ export function useGroupProps(
|
|
|
53
76
|
useInjectedGroupState<ButtonGroupState>(INJECTION_KEY_BUTTON_GROUP)
|
|
54
77
|
|
|
55
78
|
// local props
|
|
56
|
-
const {
|
|
57
|
-
id,
|
|
58
|
-
iconPosition,
|
|
59
|
-
icon,
|
|
60
|
-
label,
|
|
61
|
-
pressed,
|
|
62
|
-
modifiers: localModifiers,
|
|
63
|
-
} = toRefs(props)
|
|
79
|
+
const { id, iconPosition, icon, label, pressed } = toRefs(props)
|
|
64
80
|
|
|
65
81
|
// group props
|
|
66
82
|
const modelValue = getGroupOrLocalRef('modelValue', props, emit) as Ref<
|
|
67
|
-
string |
|
|
83
|
+
string | number | boolean | (string | number | boolean)[] | undefined
|
|
68
84
|
>
|
|
69
85
|
const toggle = getGroupOrLocalRef('toggle', props) as Ref<boolean>
|
|
70
86
|
const unselectable = getGroupOrLocalRef(
|
|
@@ -72,18 +88,25 @@ export function useGroupProps(
|
|
|
72
88
|
props,
|
|
73
89
|
) as Ref<boolean>
|
|
74
90
|
const multiple = computed(() => group?.value.multiple.value ?? false)
|
|
91
|
+
// merge local and group modifiers
|
|
75
92
|
const modifiers = computed(() => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
let localModifiers = props.modifiers
|
|
94
|
+
let groupModifiers = group?.value.modifiers.value
|
|
95
|
+
|
|
96
|
+
const toReturn = new Set<string>()
|
|
97
|
+
if (localModifiers) {
|
|
98
|
+
if (!Array.isArray(localModifiers)) {
|
|
99
|
+
localModifiers = localModifiers.split(' ')
|
|
100
|
+
}
|
|
101
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier))
|
|
102
|
+
}
|
|
103
|
+
if (groupModifiers) {
|
|
104
|
+
if (!Array.isArray(groupModifiers)) {
|
|
105
|
+
groupModifiers = groupModifiers.split(' ')
|
|
106
|
+
}
|
|
107
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier))
|
|
108
|
+
}
|
|
109
|
+
return Array.from(toReturn)
|
|
87
110
|
})
|
|
88
111
|
const disabled = computed(() =>
|
|
89
112
|
Boolean(props.disabled || group?.value?.disabled.value),
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
(Array.isArray(props.modelValue) || multiple.value) &&
|
|
46
46
|
!Array.isArray(newValue)
|
|
47
47
|
) {
|
|
48
|
-
|
|
48
|
+
return emit('update:modelValue', [newValue])
|
|
49
49
|
}
|
|
50
50
|
return emit('update:modelValue', newValue)
|
|
51
51
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
toggle,
|
|
60
60
|
multiple,
|
|
61
61
|
unselectable,
|
|
62
|
-
itemModifiers,
|
|
62
|
+
modifiers: itemModifiers,
|
|
63
63
|
})
|
|
64
64
|
|
|
65
65
|
// style
|
|
@@ -7,10 +7,22 @@ export const VvButtonGroupProps = {
|
|
|
7
7
|
/**
|
|
8
8
|
* String or String[] of css classes (modifiers) that will be provided to each button'
|
|
9
9
|
*/
|
|
10
|
-
itemModifiers: {
|
|
10
|
+
itemModifiers: {
|
|
11
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
11
14
|
toggle: { type: Boolean, default: false },
|
|
12
15
|
multiple: { type: Boolean, default: false },
|
|
13
|
-
modelValue: {
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: [String, Number, Boolean, Array] as PropType<
|
|
18
|
+
| string
|
|
19
|
+
| number
|
|
20
|
+
| boolean
|
|
21
|
+
| (string | number | boolean)[]
|
|
22
|
+
| undefined
|
|
23
|
+
>,
|
|
24
|
+
default: undefined,
|
|
25
|
+
},
|
|
14
26
|
}
|
|
15
27
|
|
|
16
28
|
export const VvButtonGroupEvents = ['update:modelValue']
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
isInGroup,
|
|
27
27
|
} = useGroupProps(props, emit)
|
|
28
28
|
const hasId = useUniqueId(id)
|
|
29
|
+
const hasHintId = computed(() => `${hasId.value}-hint`)
|
|
29
30
|
const tabindex = computed(() => (isDisabled.value ? -1 : props.tabindex))
|
|
30
31
|
|
|
31
32
|
// template ref
|
|
@@ -144,7 +145,12 @@
|
|
|
144
145
|
})
|
|
145
146
|
|
|
146
147
|
// hint
|
|
147
|
-
const {
|
|
148
|
+
const {
|
|
149
|
+
HintSlot,
|
|
150
|
+
hasHintLabelOrSlot,
|
|
151
|
+
hasInvalidLabelOrSlot,
|
|
152
|
+
hintSlotScope,
|
|
153
|
+
} = HintSlotFactory(props, slots)
|
|
148
154
|
</script>
|
|
149
155
|
|
|
150
156
|
<template>
|
|
@@ -160,11 +166,26 @@
|
|
|
160
166
|
:value="hasValue"
|
|
161
167
|
:tabindex="tabindex"
|
|
162
168
|
:aria-invalid="isInvalid"
|
|
169
|
+
:aria-describedby="hasHintLabelOrSlot ? hasHintId : undefined"
|
|
170
|
+
:aria-errormessage="hasInvalidLabelOrSlot ? hasHintId : undefined"
|
|
163
171
|
/>
|
|
164
172
|
<!-- @slot Use this slot for check label -->
|
|
165
173
|
<slot :value="modelValue">
|
|
166
174
|
{{ label }}
|
|
167
175
|
</slot>
|
|
168
|
-
<HintSlot class="vv-checkbox__hint"
|
|
176
|
+
<HintSlot :id="hasHintId" class="vv-checkbox__hint">
|
|
177
|
+
<template v-if="$slots.hint" #hint>
|
|
178
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
179
|
+
</template>
|
|
180
|
+
<template v-if="$slots.loading" #loading>
|
|
181
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
182
|
+
</template>
|
|
183
|
+
<template v-if="$slots.valid" #valid>
|
|
184
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
185
|
+
</template>
|
|
186
|
+
<template v-if="$slots.invalid" #invalid>
|
|
187
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
188
|
+
</template>
|
|
189
|
+
</HintSlot>
|
|
169
190
|
</label>
|
|
170
191
|
</template>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
value: getOptionValue(option),
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const { HintSlot } = HintSlotFactory(props, slots)
|
|
59
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots)
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
62
|
<template>
|
|
@@ -74,6 +74,19 @@
|
|
|
74
74
|
<!-- #endregion -->
|
|
75
75
|
<slot v-else />
|
|
76
76
|
</div>
|
|
77
|
-
<HintSlot class="vv-checkbox-group__hint"
|
|
77
|
+
<HintSlot class="vv-checkbox-group__hint">
|
|
78
|
+
<template v-if="$slots.hint" #hint>
|
|
79
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
80
|
+
</template>
|
|
81
|
+
<template v-if="$slots.loading" #loading>
|
|
82
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
83
|
+
</template>
|
|
84
|
+
<template v-if="$slots.valid" #valid>
|
|
85
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
86
|
+
</template>
|
|
87
|
+
<template v-if="$slots.invalid" #invalid>
|
|
88
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
89
|
+
</template>
|
|
90
|
+
</HintSlot>
|
|
78
91
|
</fieldset>
|
|
79
92
|
</template>
|
|
@@ -39,7 +39,12 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// hint slot
|
|
42
|
-
const {
|
|
42
|
+
const {
|
|
43
|
+
HintSlot,
|
|
44
|
+
hasHintLabelOrSlot,
|
|
45
|
+
hasInvalidLabelOrSlot,
|
|
46
|
+
hintSlotScope,
|
|
47
|
+
} = HintSlotFactory(props, slots)
|
|
43
48
|
|
|
44
49
|
// template ref
|
|
45
50
|
const inputEl: Ref<HTMLElement | null> = ref(null)
|
|
@@ -93,19 +98,18 @@
|
|
|
93
98
|
if (props.disabled || props.readonly || !expanded.value) return
|
|
94
99
|
expanded.value = false
|
|
95
100
|
}
|
|
96
|
-
|
|
101
|
+
const onAfterExpand = () => {
|
|
97
102
|
if (searchable.value) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
inputSearchEl.value.focus()
|
|
102
|
-
}
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
searchText.value = ''
|
|
106
|
-
})
|
|
103
|
+
if (inputSearchEl.value) {
|
|
104
|
+
inputSearchEl.value.focus()
|
|
105
|
+
}
|
|
107
106
|
}
|
|
108
|
-
}
|
|
107
|
+
}
|
|
108
|
+
const onAfterCollapse = () => {
|
|
109
|
+
if (searchable.value) {
|
|
110
|
+
searchText.value = ''
|
|
111
|
+
}
|
|
112
|
+
}
|
|
109
113
|
|
|
110
114
|
// data
|
|
111
115
|
const {
|
|
@@ -233,12 +237,6 @@
|
|
|
233
237
|
.join(props.separator)
|
|
234
238
|
})
|
|
235
239
|
|
|
236
|
-
watch(selectedOptions, () => {
|
|
237
|
-
if (!props.multiple && props.autoClose) {
|
|
238
|
-
collapse()
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
|
|
242
240
|
/**
|
|
243
241
|
* Function triggered on click on input
|
|
244
242
|
*/
|
|
@@ -280,7 +278,7 @@
|
|
|
280
278
|
toReturn = [value as Option]
|
|
281
279
|
}
|
|
282
280
|
} else {
|
|
283
|
-
if (props.
|
|
281
|
+
if (!props.keepOpen) {
|
|
284
282
|
collapse()
|
|
285
283
|
}
|
|
286
284
|
if (props.unselectable && value === props.modelValue) {
|
|
@@ -328,7 +326,6 @@
|
|
|
328
326
|
flip: props.flip,
|
|
329
327
|
autoPlacement: props.autoPlacement,
|
|
330
328
|
arrow: props.arrow,
|
|
331
|
-
autoClose: props.autoClose,
|
|
332
329
|
autofocusFirst: searchable.value ? false : props.autofocusFirst,
|
|
333
330
|
triggerWidth: props.triggerWidth,
|
|
334
331
|
modifiers: props.dropdownModifiers,
|
|
@@ -368,6 +365,8 @@
|
|
|
368
365
|
v-model="expanded"
|
|
369
366
|
v-bind="dropdownProps"
|
|
370
367
|
:role="DropdownRole.listbox"
|
|
368
|
+
@after-expand="onAfterExpand"
|
|
369
|
+
@after-collapse="onAfterCollapse"
|
|
371
370
|
>
|
|
372
371
|
<template
|
|
373
372
|
v-if="searchable || $slots['dropdown::before']"
|
|
@@ -383,8 +382,6 @@
|
|
|
383
382
|
v-model="searchText"
|
|
384
383
|
aria-autocomplete="list"
|
|
385
384
|
:aria-controls="hasDropdownId"
|
|
386
|
-
:aria-labelledby="hasLabelId"
|
|
387
|
-
:aria-describedby="hasHintId"
|
|
388
385
|
autocomplete="off"
|
|
389
386
|
spellcheck="false"
|
|
390
387
|
type="search"
|
|
@@ -406,9 +403,16 @@
|
|
|
406
403
|
<div
|
|
407
404
|
ref="inputEl"
|
|
408
405
|
v-bind="aria"
|
|
409
|
-
:aria-labelledby="hasLabelId"
|
|
410
406
|
class="vv-select__input"
|
|
411
407
|
role="combobox"
|
|
408
|
+
:aria-expanded="expanded"
|
|
409
|
+
:aria-labelledby="hasLabelId"
|
|
410
|
+
:aria-describedby="
|
|
411
|
+
hasHintLabelOrSlot ? hasHintId : undefined
|
|
412
|
+
"
|
|
413
|
+
:aria-errormessage="
|
|
414
|
+
hasInvalidLabelOrSlot ? hasHintId : undefined
|
|
415
|
+
"
|
|
412
416
|
:tabindex="hasTabindex"
|
|
413
417
|
@click.passive="onClickInput"
|
|
414
418
|
>
|
|
@@ -558,7 +562,20 @@
|
|
|
558
562
|
</template>
|
|
559
563
|
</VvDropdown>
|
|
560
564
|
</div>
|
|
561
|
-
<HintSlot :id="hasHintId" class="vv-select__hint"
|
|
565
|
+
<HintSlot :id="hasHintId" class="vv-select__hint">
|
|
566
|
+
<template v-if="$slots.hint" #hint>
|
|
567
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
568
|
+
</template>
|
|
569
|
+
<template v-if="$slots.loading" #loading>
|
|
570
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
571
|
+
</template>
|
|
572
|
+
<template v-if="$slots.valid" #valid>
|
|
573
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
574
|
+
</template>
|
|
575
|
+
<template v-if="$slots.invalid" #invalid>
|
|
576
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
577
|
+
</template>
|
|
578
|
+
</HintSlot>
|
|
562
579
|
</div>
|
|
563
580
|
<VvSelect
|
|
564
581
|
v-else
|
|
@@ -117,7 +117,7 @@ export const VvComboboxProps = {
|
|
|
117
117
|
* Badge modifiers
|
|
118
118
|
*/
|
|
119
119
|
badgeModifiers: {
|
|
120
|
-
type: [String, Array] as PropType<string |
|
|
120
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
121
121
|
default: 'action sm',
|
|
122
122
|
},
|
|
123
123
|
/**
|
|
@@ -131,14 +131,20 @@ export const VvComboboxProps = {
|
|
|
131
131
|
* Dropdown modifiers
|
|
132
132
|
*/
|
|
133
133
|
dropdownModifiers: {
|
|
134
|
-
type: [String, Array] as PropType<string |
|
|
134
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
135
135
|
},
|
|
136
136
|
/**
|
|
137
137
|
* Open dropdown on focus
|
|
138
138
|
*/
|
|
139
|
-
autoOpen:
|
|
139
|
+
autoOpen: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false,
|
|
142
|
+
},
|
|
140
143
|
/**
|
|
141
|
-
*
|
|
144
|
+
* Keep open dropdown on single select
|
|
142
145
|
*/
|
|
143
|
-
|
|
146
|
+
keepOpen: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: false,
|
|
149
|
+
},
|
|
144
150
|
}
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
10
10
|
import { VvDialogEvents, VvDialogProps } from '.'
|
|
11
11
|
|
|
12
|
-
// props and
|
|
12
|
+
// props, emit and template refs
|
|
13
13
|
const props = defineProps(VvDialogProps)
|
|
14
14
|
const emit = defineEmits(VvDialogEvents)
|
|
15
|
+
const dialogEl: Ref<HTMLDialogElement | undefined> = ref()
|
|
15
16
|
|
|
16
17
|
// data
|
|
17
18
|
const localModelValue = ref(false)
|
|
@@ -26,7 +27,6 @@
|
|
|
26
27
|
emit('update:modelValue', value)
|
|
27
28
|
},
|
|
28
29
|
})
|
|
29
|
-
const htmlAttrIsOpen = ref(true)
|
|
30
30
|
|
|
31
31
|
// template ref
|
|
32
32
|
const modalWrapper = ref(null)
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
const { id } = props
|
|
37
37
|
return {
|
|
38
38
|
id,
|
|
39
|
-
open: htmlAttrIsOpen.value,
|
|
40
39
|
} as DialogHTMLAttributes
|
|
41
40
|
})
|
|
42
41
|
const dialogClass = computed(() => {
|
|
@@ -50,18 +49,18 @@
|
|
|
50
49
|
const transitioName = computed(() => `vv-dialog--${props.transition}`)
|
|
51
50
|
const dialogTransitionHandlers = {
|
|
52
51
|
'before-enter': () => {
|
|
53
|
-
|
|
52
|
+
dialogEl.value?.showModal()
|
|
54
53
|
emit('open')
|
|
55
54
|
},
|
|
56
55
|
'after-leave': () => {
|
|
57
|
-
|
|
56
|
+
dialogEl.value?.close()
|
|
58
57
|
emit('close')
|
|
59
58
|
},
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
// methods
|
|
63
62
|
onClickOutside(modalWrapper, () => {
|
|
64
|
-
if (props.
|
|
63
|
+
if (!props.keepOpen) {
|
|
65
64
|
modelValue.value = false
|
|
66
65
|
}
|
|
67
66
|
})
|
|
@@ -87,7 +86,12 @@
|
|
|
87
86
|
|
|
88
87
|
<template>
|
|
89
88
|
<Transition :name="transitioName" v-on="dialogTransitionHandlers">
|
|
90
|
-
<dialog
|
|
89
|
+
<dialog
|
|
90
|
+
v-show="modelValue"
|
|
91
|
+
v-bind="dialogAttrs"
|
|
92
|
+
ref="dialogEl"
|
|
93
|
+
:class="dialogClass"
|
|
94
|
+
>
|
|
91
95
|
<article ref="modalWrapper" class="vv-dialog__wrapper">
|
|
92
96
|
<header v-if="$slots.header || title" class="vv-dialog__header">
|
|
93
97
|
<!-- @slot Header slot -->
|
|
@@ -28,7 +28,13 @@
|
|
|
28
28
|
|
|
29
29
|
// props, emit and attrs
|
|
30
30
|
const props = defineProps(VvDropdownProps)
|
|
31
|
-
const emit = defineEmits([
|
|
31
|
+
const emit = defineEmits([
|
|
32
|
+
'update:modelValue',
|
|
33
|
+
'beforeExpand',
|
|
34
|
+
'beforeCollapse',
|
|
35
|
+
'afterExpand',
|
|
36
|
+
'afterCollapse',
|
|
37
|
+
])
|
|
32
38
|
const { id } = toRefs(props)
|
|
33
39
|
const hasId = useUniqueId(id)
|
|
34
40
|
const attrs = useAttrs()
|
|
@@ -212,7 +218,7 @@
|
|
|
212
218
|
onClickOutside(
|
|
213
219
|
floatingEl,
|
|
214
220
|
() => {
|
|
215
|
-
if (props.
|
|
221
|
+
if (!props.keepOpen) {
|
|
216
222
|
expanded.value = false
|
|
217
223
|
}
|
|
218
224
|
},
|
|
@@ -334,6 +340,12 @@
|
|
|
334
340
|
activeElement.click()
|
|
335
341
|
}
|
|
336
342
|
})
|
|
343
|
+
const onTransitionBeforeEnter = () => {
|
|
344
|
+
emit(expanded.value ? 'beforeExpand' : 'beforeCollapse')
|
|
345
|
+
}
|
|
346
|
+
const onTransitionAfterLeave = () => {
|
|
347
|
+
emit(expanded.value ? 'afterExpand' : 'afterCollapse')
|
|
348
|
+
}
|
|
337
349
|
</script>
|
|
338
350
|
|
|
339
351
|
<template>
|
|
@@ -342,7 +354,13 @@
|
|
|
342
354
|
v-bind="{ init, show, hide, toggle, expanded, aria: referenceAria }"
|
|
343
355
|
/>
|
|
344
356
|
</VvDropdownTriggerProvider>
|
|
345
|
-
<Transition
|
|
357
|
+
<Transition
|
|
358
|
+
:name="transitionName"
|
|
359
|
+
v-on="{
|
|
360
|
+
beforeEnter: onTransitionBeforeEnter,
|
|
361
|
+
onAfterLeave: onTransitionAfterLeave,
|
|
362
|
+
}"
|
|
363
|
+
>
|
|
346
364
|
<div
|
|
347
365
|
v-show="expanded"
|
|
348
366
|
ref="floatingEl"
|
|
@@ -356,7 +374,7 @@
|
|
|
356
374
|
class="vv-dropdown__arrow"
|
|
357
375
|
></div>
|
|
358
376
|
<slot name="before" v-bind="{ expanded }" />
|
|
359
|
-
<
|
|
377
|
+
<div
|
|
360
378
|
v-bind="attrs"
|
|
361
379
|
:id="hasId"
|
|
362
380
|
ref="listEl"
|
|
@@ -371,7 +389,7 @@
|
|
|
371
389
|
role: itemRole,
|
|
372
390
|
}"
|
|
373
391
|
/>
|
|
374
|
-
</
|
|
392
|
+
</div>
|
|
375
393
|
<slot name="after" v-bind="{ expanded }" />
|
|
376
394
|
</div>
|
|
377
395
|
</Transition>
|
|
@@ -5,12 +5,19 @@
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
|
-
import { Icon, addIcon, iconExists
|
|
8
|
+
import { Icon, addIcon, iconExists } from '@iconify/vue'
|
|
9
9
|
import { VvIconProps } from '.'
|
|
10
10
|
|
|
11
11
|
// props
|
|
12
12
|
const props = defineProps(VvIconProps)
|
|
13
13
|
|
|
14
|
+
const hasRotate = computed(() => {
|
|
15
|
+
if (typeof props.rotate === 'string') {
|
|
16
|
+
return parseFloat(props.rotate)
|
|
17
|
+
}
|
|
18
|
+
return props.rotate
|
|
19
|
+
})
|
|
20
|
+
|
|
14
21
|
// data
|
|
15
22
|
const show = ref(true)
|
|
16
23
|
|
|
@@ -21,49 +28,43 @@
|
|
|
21
28
|
const { modifiers } = toRefs(props)
|
|
22
29
|
const bemCssClasses = useModifiers('vv-icon', modifiers)
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
* Provider name
|
|
26
|
-
*/
|
|
31
|
+
// provider name
|
|
27
32
|
const provider = computed(() => {
|
|
28
33
|
return props.provider || volver?.iconsProvider
|
|
29
34
|
})
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
* Icon name
|
|
33
|
-
*/
|
|
36
|
+
// icon name
|
|
34
37
|
const icon = computed(() => {
|
|
35
|
-
const
|
|
38
|
+
const name = props.name ?? ''
|
|
36
39
|
// compose Iconify icon name format
|
|
37
|
-
const iconName = `@${provider.value}:${props.prefix}:${
|
|
40
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`
|
|
38
41
|
|
|
39
|
-
// Check
|
|
40
|
-
if (iconExists(
|
|
41
|
-
return _name
|
|
42
|
-
} else if (iconExists(iconName)) {
|
|
43
|
-
// Check and return composed icon name if exist
|
|
42
|
+
// Check if icon with prefix and provider exist
|
|
43
|
+
if (iconExists(iconName)) {
|
|
44
44
|
return iconName
|
|
45
|
-
} else {
|
|
46
|
-
// Check into all collections and set "iconName" data
|
|
47
|
-
return (
|
|
48
|
-
volver?.iconsCollections.find(
|
|
49
|
-
(iconsCollection: IconifyJSON) => {
|
|
50
|
-
const icon = `@${provider.value}:${iconsCollection.prefix}:${_name}`
|
|
51
|
-
if (iconExists(icon)) {
|
|
52
|
-
return icon
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
) || _name
|
|
56
|
-
)
|
|
57
45
|
}
|
|
46
|
+
|
|
47
|
+
// Check if icon exist into any collection
|
|
48
|
+
const iconsCollection = volver?.iconsCollections.find(
|
|
49
|
+
(iconsCollection) => {
|
|
50
|
+
const icon = `@${provider.value}:${iconsCollection.prefix}:${name}`
|
|
51
|
+
return iconExists(icon)
|
|
52
|
+
},
|
|
53
|
+
)
|
|
54
|
+
if (iconsCollection) {
|
|
55
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return name
|
|
58
59
|
})
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
62
|
* Get SVG content from SVG string
|
|
62
63
|
* @param {string} svg
|
|
63
|
-
* @return {SVGSVGElement |
|
|
64
|
+
* @return {SVGSVGElement | undefined} https://developer.mozilla.org/en-US/docs/Web/API/SVGSVGElement
|
|
64
65
|
*/
|
|
65
|
-
function getSvgContent(svg: string): SVGSVGElement |
|
|
66
|
-
let dom
|
|
66
|
+
function getSvgContent(svg: string): SVGSVGElement | undefined {
|
|
67
|
+
let dom
|
|
67
68
|
if (typeof window === 'undefined') {
|
|
68
69
|
// SSR
|
|
69
70
|
// eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
* @param {string} svg
|
|
82
83
|
*/
|
|
83
84
|
function addIconFromSvg(svg: string) {
|
|
84
|
-
const svgContentEl
|
|
85
|
+
const svgContentEl = getSvgContent(svg)
|
|
85
86
|
const svgContent = svgContentEl?.innerHTML.trim() || ''
|
|
86
87
|
if (svgContentEl && svgContent) {
|
|
87
88
|
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
@@ -108,12 +109,14 @@
|
|
|
108
109
|
}
|
|
109
110
|
})
|
|
110
111
|
.catch((e) => {
|
|
111
|
-
throw new Error(`
|
|
112
|
+
throw new Error(`Error during fetch icon: ${e?.message}`)
|
|
112
113
|
})
|
|
113
|
-
} else if (props.svg) {
|
|
114
|
-
addIconFromSvg(props.svg)
|
|
115
114
|
}
|
|
116
115
|
}
|
|
116
|
+
|
|
117
|
+
if (props.svg) {
|
|
118
|
+
addIconFromSvg(props.svg)
|
|
119
|
+
}
|
|
117
120
|
</script>
|
|
118
121
|
|
|
119
122
|
<template>
|
|
@@ -127,7 +130,7 @@
|
|
|
127
130
|
horizontalFlip,
|
|
128
131
|
verticalFlip,
|
|
129
132
|
flip,
|
|
130
|
-
rotate,
|
|
133
|
+
rotate: hasRotate,
|
|
131
134
|
color,
|
|
132
135
|
onLoad,
|
|
133
136
|
icon,
|