@volverjs/ui-vue 0.0.6-beta.1 → 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 +3 -3
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -2
- 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 +2 -33
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -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/package.json +104 -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/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 +8 -15
- package/src/stories/Avatar/Avatar.stories.ts +42 -0
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- 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/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/Avatar/Avatar.stories.mdx +0 -40
- package/src/stories/Avatar/AvatarBadge.stories.mdx +0 -41
- package/src/stories/Avatar/AvatarModifiers.stories.mdx +0 -87
- package/src/stories/Avatar/AvatarSlotDefault.stories.mdx +0 -29
- 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
|
@@ -1,7 +1,226 @@
|
|
|
1
1
|
import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx } from "vue";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
3
|
import { useToggle, useStorage } from "@vueuse/core";
|
|
4
|
+
var Side = /* @__PURE__ */ ((Side2) => {
|
|
5
|
+
Side2["left"] = "left";
|
|
6
|
+
Side2["right"] = "right";
|
|
7
|
+
Side2["top"] = "top";
|
|
8
|
+
Side2["bottom"] = "bottom";
|
|
9
|
+
return Side2;
|
|
10
|
+
})(Side || {});
|
|
11
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
12
|
+
Placement2["topStart"] = "top-start";
|
|
13
|
+
Placement2["topEnd"] = "top-end";
|
|
14
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
15
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
16
|
+
Placement2["leftStart"] = "left-start";
|
|
17
|
+
Placement2["leftEnd"] = "left-end";
|
|
18
|
+
Placement2["rightStart"] = "right-start";
|
|
19
|
+
Placement2["rightEnd"] = "right-end";
|
|
20
|
+
return Placement2;
|
|
21
|
+
})(Placement || {});
|
|
22
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
23
|
+
Position2["before"] = "before";
|
|
24
|
+
Position2["after"] = "after";
|
|
25
|
+
return Position2;
|
|
26
|
+
})(Position || {});
|
|
27
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
28
|
+
ButtonType2["button"] = "button";
|
|
29
|
+
ButtonType2["submit"] = "submit";
|
|
30
|
+
ButtonType2["reset"] = "reset";
|
|
31
|
+
return ButtonType2;
|
|
32
|
+
})(ButtonType || {});
|
|
33
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
34
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
35
|
+
AnchorTarget2["_self"] = "_self";
|
|
36
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
37
|
+
AnchorTarget2["_top"] = "_top";
|
|
38
|
+
return AnchorTarget2;
|
|
39
|
+
})(AnchorTarget || {});
|
|
4
40
|
const INJECTION_KEY_ACCORDION_GROUP = Symbol.for("accordionGroup");
|
|
41
|
+
const LinkProps = {
|
|
42
|
+
/**
|
|
43
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
44
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
45
|
+
*/
|
|
46
|
+
to: {
|
|
47
|
+
type: [String, Object]
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Anchor href
|
|
51
|
+
*/
|
|
52
|
+
href: String,
|
|
53
|
+
/**
|
|
54
|
+
* Anchor target
|
|
55
|
+
*/
|
|
56
|
+
target: {
|
|
57
|
+
type: String,
|
|
58
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Anchor rel
|
|
62
|
+
*/
|
|
63
|
+
rel: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "noopener noreferrer"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const DisabledProps = {
|
|
69
|
+
/**
|
|
70
|
+
* Whether the form control is disabled
|
|
71
|
+
*/
|
|
72
|
+
disabled: Boolean
|
|
73
|
+
};
|
|
74
|
+
const ActiveProps = {
|
|
75
|
+
/**
|
|
76
|
+
* Whether the item is active
|
|
77
|
+
*/
|
|
78
|
+
active: Boolean
|
|
79
|
+
};
|
|
80
|
+
const PressedProps = {
|
|
81
|
+
/**
|
|
82
|
+
* Whether the item is pressed
|
|
83
|
+
*/
|
|
84
|
+
pressed: Boolean
|
|
85
|
+
};
|
|
86
|
+
const LabelProps = {
|
|
87
|
+
/**
|
|
88
|
+
* The item label
|
|
89
|
+
*/
|
|
90
|
+
label: [String, Number]
|
|
91
|
+
};
|
|
92
|
+
const ModifiersProps = {
|
|
93
|
+
/**
|
|
94
|
+
* Component BEM modifiers
|
|
95
|
+
*/
|
|
96
|
+
modifiers: [String, Array]
|
|
97
|
+
};
|
|
98
|
+
({
|
|
99
|
+
/**
|
|
100
|
+
* VvIcon name or props
|
|
101
|
+
* @see VVIcon
|
|
102
|
+
*/
|
|
103
|
+
icon: { type: [String, Object] },
|
|
104
|
+
/**
|
|
105
|
+
* VvIcon position
|
|
106
|
+
*/
|
|
107
|
+
iconPosition: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: Position.before,
|
|
110
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
({
|
|
114
|
+
/**
|
|
115
|
+
* Dropdown placement
|
|
116
|
+
*/
|
|
117
|
+
placement: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: Side.bottom,
|
|
120
|
+
validator: (value) => {
|
|
121
|
+
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Dropdown strategy
|
|
126
|
+
*/
|
|
127
|
+
strategy: {
|
|
128
|
+
type: String,
|
|
129
|
+
default: "absolute",
|
|
130
|
+
validator: (value) => {
|
|
131
|
+
return ["fixed", "absolute"].includes(value);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* Dropdown show / hide transition name
|
|
136
|
+
*/
|
|
137
|
+
transitionName: {
|
|
138
|
+
type: String
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* Offset of the dropdown from the trigger
|
|
142
|
+
* @see https://floating-ui.com/docs/offset
|
|
143
|
+
*/
|
|
144
|
+
offset: {
|
|
145
|
+
type: [Number, String, Object],
|
|
146
|
+
default: 0
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Move dropdown to the side if there is no space in the default position
|
|
150
|
+
* @see https://floating-ui.com/docs/shift
|
|
151
|
+
*/
|
|
152
|
+
shift: {
|
|
153
|
+
type: [Boolean, Object],
|
|
154
|
+
default: false
|
|
155
|
+
},
|
|
156
|
+
/**
|
|
157
|
+
* Flip dropdown position if there is no space in the default position
|
|
158
|
+
* @see https://floating-ui.com/docs/flip
|
|
159
|
+
*/
|
|
160
|
+
flip: {
|
|
161
|
+
type: [Boolean, Object],
|
|
162
|
+
default: true
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Size of the dropdown
|
|
166
|
+
* @see https://floating-ui.com/docs/size
|
|
167
|
+
*/
|
|
168
|
+
size: {
|
|
169
|
+
type: [Boolean, Object],
|
|
170
|
+
default: () => ({ padding: 10 })
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Automatically change the position of the dropdown
|
|
174
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
175
|
+
*/
|
|
176
|
+
autoPlacement: {
|
|
177
|
+
type: [Boolean, Object],
|
|
178
|
+
default: false
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* Add arrow to the dropdown
|
|
182
|
+
* @see https://floating-ui.com/docs/arrow
|
|
183
|
+
*/
|
|
184
|
+
arrow: {
|
|
185
|
+
type: Boolean,
|
|
186
|
+
default: false
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* Keep open dropdown on click outside
|
|
190
|
+
*/
|
|
191
|
+
keepOpen: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
default: false
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* Autofocus first item on dropdown open
|
|
197
|
+
*/
|
|
198
|
+
autofocusFirst: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: true
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* Set dropdown width to the same as the trigger
|
|
204
|
+
*/
|
|
205
|
+
triggerWidth: {
|
|
206
|
+
type: Boolean
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
({
|
|
210
|
+
...DisabledProps,
|
|
211
|
+
...LabelProps,
|
|
212
|
+
...PressedProps,
|
|
213
|
+
...ActiveProps,
|
|
214
|
+
...LinkProps,
|
|
215
|
+
/**
|
|
216
|
+
* Button type
|
|
217
|
+
*/
|
|
218
|
+
type: {
|
|
219
|
+
type: String,
|
|
220
|
+
default: ButtonType.button,
|
|
221
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
222
|
+
}
|
|
223
|
+
});
|
|
5
224
|
function isEmpty(value) {
|
|
6
225
|
return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
|
|
7
226
|
}
|
|
@@ -38,6 +257,7 @@ function useInjectedGroupState(groupKey) {
|
|
|
38
257
|
};
|
|
39
258
|
}
|
|
40
259
|
const VvAccordionProps = {
|
|
260
|
+
...ModifiersProps,
|
|
41
261
|
/**
|
|
42
262
|
* Accordion name
|
|
43
263
|
*/
|
|
@@ -57,10 +277,6 @@ const VvAccordionProps = {
|
|
|
57
277
|
type: Boolean,
|
|
58
278
|
default: void 0
|
|
59
279
|
},
|
|
60
|
-
/**
|
|
61
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
62
|
-
*/
|
|
63
|
-
modifiers: [String, Array],
|
|
64
280
|
/**
|
|
65
281
|
* If true, the accordion will be disabled
|
|
66
282
|
*/
|
|
@@ -79,13 +295,30 @@ function useGroupProps(props, emit) {
|
|
|
79
295
|
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
80
296
|
const not = getGroupOrLocalRef("not", props);
|
|
81
297
|
const collapse = getGroupOrLocalRef("collapse", props);
|
|
82
|
-
const modifiers = getGroupOrLocalRef("modifiers", props);
|
|
83
298
|
const disabled = computed(
|
|
84
299
|
() => {
|
|
85
300
|
var _a;
|
|
86
301
|
return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
|
|
87
302
|
}
|
|
88
303
|
);
|
|
304
|
+
const modifiers = computed(() => {
|
|
305
|
+
let localModifiers = props.modifiers;
|
|
306
|
+
let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
|
|
307
|
+
const toReturn = /* @__PURE__ */ new Set();
|
|
308
|
+
if (localModifiers) {
|
|
309
|
+
if (!Array.isArray(localModifiers)) {
|
|
310
|
+
localModifiers = localModifiers.split(" ");
|
|
311
|
+
}
|
|
312
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
313
|
+
}
|
|
314
|
+
if (groupModifiers) {
|
|
315
|
+
if (!Array.isArray(groupModifiers)) {
|
|
316
|
+
groupModifiers = groupModifiers.split(" ");
|
|
317
|
+
}
|
|
318
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
319
|
+
}
|
|
320
|
+
return Array.from(toReturn);
|
|
321
|
+
});
|
|
89
322
|
return {
|
|
90
323
|
// group props
|
|
91
324
|
modelValue,
|
|
@@ -226,6 +459,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
226
459
|
}
|
|
227
460
|
});
|
|
228
461
|
const VvAccordionGroupProps = {
|
|
462
|
+
...ModifiersProps,
|
|
229
463
|
/**
|
|
230
464
|
* VModel
|
|
231
465
|
*/
|
|
@@ -234,15 +468,14 @@ const VvAccordionGroupProps = {
|
|
|
234
468
|
* Accordion items
|
|
235
469
|
* @type VvAccordionGroupItem
|
|
236
470
|
*/
|
|
237
|
-
items: {
|
|
471
|
+
items: {
|
|
472
|
+
type: Array,
|
|
473
|
+
default: () => []
|
|
474
|
+
},
|
|
238
475
|
/**
|
|
239
476
|
* If true, accordion items stay open when another item is opened
|
|
240
477
|
*/
|
|
241
478
|
collapse: Boolean,
|
|
242
|
-
/**
|
|
243
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
244
|
-
*/
|
|
245
|
-
modifiers: [String, Array],
|
|
246
479
|
/**
|
|
247
480
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
248
481
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordionGroup=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordionGroup=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{});const n=Symbol.for("accordionGroup"),u=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});function i(o){const r=e.inject(o,void 0),t=e.computed((()=>{return o=r,!(null==(t=e.unref(o))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var o,t}));return{group:r,isInGroup:t,getGroupOrLocalRef:function(o,t,a){if(null==r?void 0:r.value){const t=e.unref(r.value)[o];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const l=e.toRef(t,o);return e.computed({get:()=>l.value,set(e){a&&a(`update:${o}`,e)}})}}}a.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,l.button;const d={...u,name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},disabled:Boolean,not:Boolean};function s(o,r,t){return e.computed((()=>{const a={[o]:!0},l="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(a[`${o}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((r=>{a[`${o}--${r}`]=e.unref(t.value[r])})),a}))}const c=["id","open"],v=["aria-controls","aria-expanded"],p=["aria-hidden"],m=e.defineComponent({name:"VvAccordion",props:d,emits:["update:modelValue"],setup(t,{emit:a}){const l=t,u=e.useAttrs(),d=e.computed((()=>l.name||(null==u?void 0:u.id)||o.nanoid())),{modifiers:m,title:f,content:y,disabled:g,collapse:b,modelValue:A,isInGroup:B,not:V}=function(o,r){const{group:t,isInGroup:a,getGroupOrLocalRef:l}=i(n),{title:u,content:d}=e.toRefs(o),s=l("modelValue",o,r),c=l("not",o),v=l("collapse",o),p=e.computed((()=>{var e;return Boolean(o.disabled||(null==(e=null==t?void 0:t.value)?void 0:e.disabled.value))})),m=e.computed((()=>{let e=o.modifiers,r=null==t?void 0:t.value.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),r&&(Array.isArray(r)||(r=r.split(" ")),r.forEach((e=>a.add(e)))),Array.from(a)}));return{modelValue:s,not:c,isInGroup:a,group:t,collapse:v,modifiers:m,disabled:p,title:u,content:d}}(l,a),h=e.ref(!1),S=e.computed({get:()=>{let e=A.value;return B.value?e=b.value&&Array.isArray(A.value)?A.value.includes(d.value):A.value===d.value:void 0===A.value&&(e=h.value),V.value?!e:e},set:e=>{if(V.value&&(e=!e),B.value)return b.value&&Array.isArray(A.value)?e?void A.value.push(d.value):void(A.value=A.value.filter((e=>e!==d.value))):void(A.value=e?d.value:null);void 0!==A.value||"boolean"!=typeof e?A.value=e:h.value=e}}),k=s("vv-accordion",m,e.computed((()=>({disabled:g.value})))),$=r.useToggle(S);return(o,r)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(d),class:e.normalizeClass(e.unref(k)),open:e.unref(S)},[e.createElementVNode("summary",{"aria-controls":e.unref(d),"aria-expanded":e.unref(S),class:"vv-accordion__summary",onClick:r[0]||(r[0]=e.withModifiers((o=>e.unref($)()),["prevent"]))},[e.renderSlot(o.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(S)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))],8,v),e.createElementVNode("div",{"aria-hidden":!e.unref(S),class:"vv-accordion__content"},[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({open:e.unref(S)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]))],8,p)],10,c))}}),f={...u,modelValue:[String,Array],items:{type:Array,default:()=>[]},collapse:Boolean,itemModifiers:{type:[String,Array],default:""},disabled:Boolean,not:Boolean,storeKey:String};return e.defineComponent({name:"VvAccordionGroup",props:f,emits:["update:modelValue"],setup(o,{emit:t}){const a=o,{disabled:l,collapse:u,modifiers:i,itemModifiers:d,items:c,not:v}=e.toRefs(a);e.watchEffect((()=>{"string"==typeof a.modelValue&&u.value&&console.warn("[VvAccordionGroup]: modelValue is a string but collapse is true.")}));let p=e.ref([]);e.watch((()=>a.storeKey),(o=>{p=o?r.useStorage(o,p.value):e.ref([])}),{immediate:!0});const f=e.computed({get:()=>{var e;return void 0!==a.modelValue?u.value?a.modelValue:Array.isArray(a.modelValue)?a.modelValue[0]:a.modelValue:u.value?p.value:null==(e=p.value)?void 0:e[0]},set:e=>{if(void 0!==a.modelValue)return!Array.isArray(a.modelValue)&&!u.value||Array.isArray(e)||(e=[e]),t("update:modelValue",e);p.value=Array.isArray(e)?e:[e]}});!function(o){if(Object.keys(o).some((r=>"key"!==r&&!e.isRef(o[r]))))throw Error("One or more groupState props aren't ref.");e.provide(o.key,e.computed((()=>o)))}({key:n,modelValue:f,disabled:l,collapse:u,modifiers:d,not:v});const y=s("vv-accordion-group",i,e.computed((()=>({disabled:l.value}))));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(y))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(r=>(e.openBlock(),e.createBlock(m,e.mergeProps({key:r.title},{name:r.name,title:r.title,content:r.content}),{header:e.withCtx((t=>[e.renderSlot(o.$slots,`header::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),details:e.withCtx((t=>[e.renderSlot(o.$slots,`details::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),_:2},1040)))),128))]))],2))}})}));
|
|
@@ -1,85 +1,33 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
modelValue: (
|
|
2
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
3
3
|
items: {
|
|
4
|
-
type:
|
|
5
|
-
(arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
6
|
-
(...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
7
|
-
new (arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
8
|
-
new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
9
|
-
isArray(arg: any): arg is any[];
|
|
10
|
-
readonly prototype: any[];
|
|
11
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
12
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
13
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
14
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
15
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
16
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
17
|
-
};
|
|
4
|
+
type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
|
|
18
5
|
default: () => never[];
|
|
19
6
|
};
|
|
20
7
|
collapse: BooleanConstructor;
|
|
21
|
-
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
22
8
|
itemModifiers: {
|
|
23
|
-
type:
|
|
24
|
-
(arrayLength: number): string[];
|
|
25
|
-
(...items: string[]): string[];
|
|
26
|
-
new (arrayLength: number): string[];
|
|
27
|
-
new (...items: string[]): string[];
|
|
28
|
-
isArray(arg: any): arg is any[];
|
|
29
|
-
readonly prototype: any[];
|
|
30
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
31
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
32
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
33
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
34
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
35
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
36
|
-
})[];
|
|
9
|
+
type: globalThis.PropType<string | string[]>;
|
|
37
10
|
default: string;
|
|
38
11
|
};
|
|
39
12
|
disabled: BooleanConstructor;
|
|
40
13
|
not: BooleanConstructor;
|
|
41
14
|
storeKey: StringConstructor;
|
|
15
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
42
16
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
-
modelValue: (
|
|
17
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
44
18
|
items: {
|
|
45
|
-
type:
|
|
46
|
-
(arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
47
|
-
(...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
48
|
-
new (arrayLength: number): import(".").VvAccordionGroupItem[];
|
|
49
|
-
new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
|
|
50
|
-
isArray(arg: any): arg is any[];
|
|
51
|
-
readonly prototype: any[];
|
|
52
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
53
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
54
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
55
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
56
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
57
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
58
|
-
};
|
|
19
|
+
type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
|
|
59
20
|
default: () => never[];
|
|
60
21
|
};
|
|
61
22
|
collapse: BooleanConstructor;
|
|
62
|
-
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
63
23
|
itemModifiers: {
|
|
64
|
-
type:
|
|
65
|
-
(arrayLength: number): string[];
|
|
66
|
-
(...items: string[]): string[];
|
|
67
|
-
new (arrayLength: number): string[];
|
|
68
|
-
new (...items: string[]): string[];
|
|
69
|
-
isArray(arg: any): arg is any[];
|
|
70
|
-
readonly prototype: any[];
|
|
71
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
72
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
73
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
74
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
75
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
76
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
77
|
-
})[];
|
|
24
|
+
type: globalThis.PropType<string | string[]>;
|
|
78
25
|
default: string;
|
|
79
26
|
};
|
|
80
27
|
disabled: BooleanConstructor;
|
|
81
28
|
not: BooleanConstructor;
|
|
82
29
|
storeKey: StringConstructor;
|
|
30
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
83
31
|
}>> & {
|
|
84
32
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
85
33
|
}, {
|
|
@@ -88,8 +36,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
88
36
|
collapse: boolean;
|
|
89
37
|
items: import(".").VvAccordionGroupItem[];
|
|
90
38
|
itemModifiers: string | string[];
|
|
91
|
-
}>, Record<string, (_: any) => any
|
|
92
|
-
default
|
|
39
|
+
}, {}>, Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
|
|
40
|
+
default?(_: {}): any;
|
|
93
41
|
}>;
|
|
94
42
|
export default _default;
|
|
95
43
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -9,54 +9,24 @@ export declare const VvAccordionGroupProps: {
|
|
|
9
9
|
/**
|
|
10
10
|
* VModel
|
|
11
11
|
*/
|
|
12
|
-
modelValue: (
|
|
12
|
+
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
13
13
|
/**
|
|
14
14
|
* Accordion items
|
|
15
15
|
* @type VvAccordionGroupItem
|
|
16
16
|
*/
|
|
17
17
|
items: {
|
|
18
|
-
type:
|
|
19
|
-
(arrayLength: number): VvAccordionGroupItem[];
|
|
20
|
-
(...items: VvAccordionGroupItem[]): VvAccordionGroupItem[];
|
|
21
|
-
new (arrayLength: number): VvAccordionGroupItem[];
|
|
22
|
-
new (...items: VvAccordionGroupItem[]): VvAccordionGroupItem[];
|
|
23
|
-
isArray(arg: any): arg is any[];
|
|
24
|
-
readonly prototype: any[];
|
|
25
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
26
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
27
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
28
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
29
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
30
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
31
|
-
};
|
|
18
|
+
type: globalThis.PropType<VvAccordionGroupItem[]>;
|
|
32
19
|
default: () => never[];
|
|
33
20
|
};
|
|
34
21
|
/**
|
|
35
22
|
* If true, accordion items stay open when another item is opened
|
|
36
23
|
*/
|
|
37
24
|
collapse: BooleanConstructor;
|
|
38
|
-
/**
|
|
39
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
40
|
-
*/
|
|
41
|
-
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
42
25
|
/**
|
|
43
26
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
44
27
|
*/
|
|
45
28
|
itemModifiers: {
|
|
46
|
-
type:
|
|
47
|
-
(arrayLength: number): string[];
|
|
48
|
-
(...items: string[]): string[];
|
|
49
|
-
new (arrayLength: number): string[];
|
|
50
|
-
new (...items: string[]): string[];
|
|
51
|
-
isArray(arg: any): arg is any[];
|
|
52
|
-
readonly prototype: any[];
|
|
53
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
54
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
55
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
56
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
57
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
58
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
59
|
-
})[];
|
|
29
|
+
type: globalThis.PropType<string | string[]>;
|
|
60
30
|
default: string;
|
|
61
31
|
};
|
|
62
32
|
/**
|
|
@@ -71,5 +41,6 @@ export declare const VvAccordionGroupProps: {
|
|
|
71
41
|
* Enable local storage persistence
|
|
72
42
|
*/
|
|
73
43
|
storeKey: StringConstructor;
|
|
44
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
74
45
|
};
|
|
75
46
|
export declare const VvAccordionGroupEvents: string[];
|
|
@@ -43,8 +43,12 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
|
43
43
|
return AnchorTarget2;
|
|
44
44
|
})(AnchorTarget || {});
|
|
45
45
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
46
|
-
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
47
|
-
|
|
46
|
+
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
47
|
+
"dropdownTrigger"
|
|
48
|
+
);
|
|
49
|
+
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
50
|
+
"dropdownAction"
|
|
51
|
+
);
|
|
48
52
|
const LinkProps = {
|
|
49
53
|
/**
|
|
50
54
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -187,11 +191,11 @@ const LabelProps = {
|
|
|
187
191
|
default: false
|
|
188
192
|
},
|
|
189
193
|
/**
|
|
190
|
-
*
|
|
194
|
+
* Keep open dropdown on click outside
|
|
191
195
|
*/
|
|
192
|
-
|
|
196
|
+
keepOpen: {
|
|
193
197
|
type: Boolean,
|
|
194
|
-
default:
|
|
198
|
+
default: false
|
|
195
199
|
},
|
|
196
200
|
/**
|
|
197
201
|
* Autofocus first item on dropdown open
|
|
@@ -240,11 +244,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
244
|
...__default__,
|
|
241
245
|
props: VvActionProps,
|
|
242
246
|
emits: VvActionEvents,
|
|
243
|
-
setup(__props, { expose, emit }) {
|
|
247
|
+
setup(__props, { expose: __expose, emit }) {
|
|
244
248
|
const props = __props;
|
|
245
249
|
const volver = useVolver();
|
|
246
250
|
const element = ref(null);
|
|
247
|
-
|
|
251
|
+
__expose({ $el: element });
|
|
248
252
|
const {
|
|
249
253
|
reference: dropdownTriggerReference,
|
|
250
254
|
bus: dropdownEventBus,
|
|
@@ -279,7 +283,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
279
283
|
const toReturn = {
|
|
280
284
|
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
281
285
|
"aria-pressed": pressed.value ? true : void 0,
|
|
282
|
-
role
|
|
286
|
+
role: role == null ? void 0 : role.value
|
|
283
287
|
};
|
|
284
288
|
switch (hasTag.value) {
|
|
285
289
|
case ActionTag.a:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAction=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const a=Symbol.for("volver"),u=Symbol.for("dropdownTrigger"),i=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:Boolean},c={active:Boolean},f={pressed:Boolean},
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAction=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const a=Symbol.for("volver"),u=Symbol.for("dropdownTrigger"),i=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:Boolean},c={active:Boolean},f={pressed:Boolean},v={label:[String,Number]};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const p={...d,...v,...f,...c,...s,type:{type:String,default:n.button,validator:e=>Object.values(n).includes(e)}};return e.defineComponent({name:"VvAction",props:p,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const l=t,s=e.inject(a),d=e.ref(null);o({$el:d});const{reference:c,bus:f,aria:v,expanded:p}=e.inject(u,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const b=e.computed((()=>l.pressed||(null==p?void 0:p.value))),{role:m}=e.inject(i,{}),g=e.computed((()=>{switch(!0){case l.disabled:return r.button;case void 0!==l.to:return(null==s?void 0:s.nuxt)?r.nuxtLink:r.routerLink;case void 0!==l.href:return r.a;default:return r.button}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,"aria-pressed":!!b.value||void 0,role:null==m?void 0:m.value};switch(g.value){case r.a:return{...e,href:l.href,target:l.target,rel:l.rel};case r.routerLink:case r.nuxtLink:return{...e,to:l.to,target:l.target};default:return{...e,type:l.type,disabled:l.disabled}}})),y=e=>{l.disabled?e.preventDefault():(null==f||f.emit("click",e),n("click",e))},h=e=>{null==f||f.emit("mouseover",e),n("mouseover",e)},B=e=>{null==f||f.emit("mouseleave",e),n("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(k),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(b),disabled:t.disabled},onClickPassive:y,onMouseoverPassive:h,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}})}));
|
|
@@ -5,7 +5,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
5
5
|
validator: (value: import("../../constants").ButtonType) => boolean;
|
|
6
6
|
};
|
|
7
7
|
to: {
|
|
8
|
-
type: (
|
|
8
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
9
9
|
};
|
|
10
10
|
href: StringConstructor;
|
|
11
11
|
target: {
|
|
@@ -29,7 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
29
29
|
validator: (value: import("../../constants").ButtonType) => boolean;
|
|
30
30
|
};
|
|
31
31
|
to: {
|
|
32
|
-
type: (
|
|
32
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
33
33
|
};
|
|
34
34
|
href: StringConstructor;
|
|
35
35
|
target: {
|
|
@@ -52,8 +52,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
52
52
|
rel: string;
|
|
53
53
|
active: boolean;
|
|
54
54
|
pressed: boolean;
|
|
55
|
-
}>, {
|
|
56
|
-
default
|
|
55
|
+
}, {}>, {
|
|
56
|
+
default?(_: {}): any;
|
|
57
57
|
}>;
|
|
58
58
|
export default _default;
|
|
59
59
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -6,7 +6,7 @@ export declare const VvActionProps: {
|
|
|
6
6
|
validator: (value: import("../../constants").ButtonType) => boolean;
|
|
7
7
|
};
|
|
8
8
|
to: {
|
|
9
|
-
type: (
|
|
9
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
10
10
|
};
|
|
11
11
|
href: StringConstructor;
|
|
12
12
|
target: {
|