@volverjs/ui-vue 0.0.10-beta.7 → 0.0.10-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +150 -54
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +39 -28
- package/dist/Volver.d.ts +24 -13
- package/dist/components/VvAccordion/VvAccordion.es.js +159 -271
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +35 -15
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +448 -364
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +66 -19
- package/dist/components/VvAccordionGroup/index.d.ts +16 -8
- package/dist/components/VvAction/VvAction.es.js +77 -141
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -30
- package/dist/components/VvAction/index.d.ts +26 -10
- package/dist/components/VvAlert/VvAlert.es.js +321 -480
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +40 -26
- package/dist/components/VvAlert/index.d.ts +20 -11
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +361 -491
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +28 -21
- package/dist/components/VvAlertGroup/index.d.ts +10 -18
- package/dist/components/VvAvatar/VvAvatar.es.js +33 -195
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +15 -7
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +115 -242
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +19 -12
- package/dist/components/VvAvatarGroup/index.d.ts +6 -3
- package/dist/components/VvBadge/VvBadge.es.js +45 -201
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +15 -7
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +285 -189
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +31 -11
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +466 -550
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +106 -56
- package/dist/components/VvButton/index.d.ts +52 -30
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +66 -207
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +38 -19
- package/dist/components/VvButtonGroup/index.d.ts +13 -4
- package/dist/components/VvCard/VvCard.es.js +54 -209
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +21 -10
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +152 -293
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +119 -45
- package/dist/components/VvCheckbox/index.d.ts +52 -19
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +390 -474
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +126 -44
- package/dist/components/VvCheckboxGroup/index.d.ts +49 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +2432 -1986
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +277 -672
- package/dist/components/VvCombobox/index.d.ts +429 -138
- package/dist/components/VvDialog/VvDialog.es.js +140 -460
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +29 -11
- package/dist/components/VvDialog/index.d.ts +12 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +142 -170
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -330
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +73 -29
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +15 -3
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +13 -5
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +43 -14
- package/dist/components/VvDropdown/index.d.ts +52 -118
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +130 -166
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +103 -11
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +35 -183
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +128 -237
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +29 -108
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +4 -68
- package/dist/components/VvIcon/index.d.ts +34 -49
- package/dist/components/VvInputFile/VvInputFile.es.js +1716 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +330 -0
- package/dist/components/VvInputFile/index.d.ts +197 -0
- package/dist/components/VvInputText/VvInputText.es.js +1660 -643
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +255 -90
- package/dist/components/VvInputText/VvInputTextActions.d.ts +4 -3
- package/dist/components/VvInputText/index.d.ts +113 -35
- package/dist/components/VvNav/VvNav.es.js +148 -183
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +35 -13
- package/dist/components/VvNav/VvNavItem.vue.d.ts +3 -3
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +93 -147
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +40 -194
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +13 -6
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +150 -292
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +117 -43
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +388 -473
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +126 -44
- package/dist/components/VvRadioGroup/index.d.ts +49 -12
- package/dist/components/VvSelect/VvSelect.es.js +749 -762
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +115 -199
- package/dist/components/VvSelect/index.d.ts +228 -16
- package/dist/components/VvTab/VvTab.es.js +224 -219
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +37 -13
- package/dist/components/VvTab/index.d.ts +6 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +1512 -672
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +230 -66
- package/dist/components/VvTextarea/index.d.ts +105 -20
- package/dist/components/VvTooltip/VvTooltip.es.js +51 -198
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +17 -10
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +8 -9
- package/dist/components/common/VvInputClearAction.d.ts +52 -0
- package/dist/components/common/VvInputPasswordAction.d.ts +71 -0
- package/dist/components/common/VvInputStepAction.d.ts +50 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +4614 -2137
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +71 -6
- package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +8 -8
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/useGroupStateInject.d.ts +9 -0
- package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.es.js +177 -6
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +2 -2
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useOptions.d.ts +5 -5
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +4 -1
- package/dist/constants.d.ts +35 -33
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +210 -246
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +136 -31
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.d.ts +1 -1
- package/dist/directives/v-tooltip.es.js +69 -207
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +14 -1884
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +83 -7
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +297 -200
- package/dist/resolvers/unplugin.d.ts +7 -2
- package/dist/resolvers/unplugin.es.js +91 -14
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -162
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1625 -790
- package/dist/stories/Alert/Alert.settings.d.ts +2 -109
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +2 -2
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
- package/dist/stories/Badge/Badge.settings.d.ts +2 -26
- package/dist/stories/Badge/Badge.test.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +2 -194
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
- package/dist/stories/Card/Card.settings.d.ts +2 -63
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -617
- package/dist/stories/Combobox/Combobox.stories.d.ts +1 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +1 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
- package/dist/stories/Icon/Icon.settings.d.ts +3 -68
- package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/InputText/InputText.settings.d.ts +2 -438
- package/dist/stories/InputText/InputText.stories.d.ts +2 -0
- package/dist/stories/InputText/InputText.test.d.ts +3 -0
- package/dist/stories/InputText/InputTextIso.stories.d.ts +10 -0
- package/dist/stories/Nav/Nav.settings.d.ts +2 -10
- package/dist/stories/Progress/Progress.settings.d.ts +2 -27
- package/dist/stories/Radio/Radio.settings.d.ts +1 -110
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
- package/dist/stories/Select/Select.settings.d.ts +2 -246
- package/dist/stories/Select/Select.stories.d.ts +1 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
- package/dist/stories/argTypes.d.ts +27 -866
- package/dist/test/expect.d.ts +1 -2
- package/dist/test/options.d.ts +1 -1
- package/dist/test/sleep.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/generic.d.ts +1 -1
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +2 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/DateUtilities.d.ts +31 -0
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/FileUtilities.d.ts +14 -0
- package/dist/utils/ObjectUtilities.d.ts +8 -9
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +370 -380
- package/auto-imports.d.ts +0 -316
- package/dist/components/VvInputText/VvInputClearAction.d.ts +0 -36
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +0 -56
- package/dist/components/VvInputText/VvInputStepAction.d.ts +0 -37
- package/dist/composables/alert/useInjectAlert.d.ts +0 -9
- package/dist/composables/dropdown/useInjectDropdown.d.ts +0 -32
- package/dist/composables/group/useInjectedGroupState.d.ts +0 -10
- package/dist/composables/group/useProvideGroupState.d.ts +0 -6
- package/env.d.ts +0 -1
- package/src/Volver.ts +0 -296
- package/src/assets/icons/detailed/add-circle.svg +0 -12
- package/src/assets/icons/detailed/add.svg +0 -8
- package/src/assets/icons/detailed/align-center.svg +0 -12
- package/src/assets/icons/detailed/align-justify.svg +0 -12
- package/src/assets/icons/detailed/align-left.svg +0 -12
- package/src/assets/icons/detailed/align-right.svg +0 -12
- package/src/assets/icons/detailed/analysis-2.svg +0 -20
- package/src/assets/icons/detailed/analysis-3.svg +0 -8
- package/src/assets/icons/detailed/analysis.svg +0 -16
- package/src/assets/icons/detailed/apple.svg +0 -16
- package/src/assets/icons/detailed/arrow-down.svg +0 -8
- package/src/assets/icons/detailed/arrow-left.svg +0 -8
- package/src/assets/icons/detailed/arrow-right.svg +0 -8
- package/src/assets/icons/detailed/arrow-up.svg +0 -8
- package/src/assets/icons/detailed/attachment.svg +0 -8
- package/src/assets/icons/detailed/back-to-front.svg +0 -17
- package/src/assets/icons/detailed/bell-active.svg +0 -14
- package/src/assets/icons/detailed/bell.svg +0 -14
- package/src/assets/icons/detailed/bold.svg +0 -8
- package/src/assets/icons/detailed/bookmark-active.svg +0 -12
- package/src/assets/icons/detailed/bookmark.svg +0 -12
- package/src/assets/icons/detailed/building.svg +0 -26
- package/src/assets/icons/detailed/bullet-list.svg +0 -22
- package/src/assets/icons/detailed/calendar.svg +0 -26
- package/src/assets/icons/detailed/camera-off.svg +0 -12
- package/src/assets/icons/detailed/camera-on.svg +0 -17
- package/src/assets/icons/detailed/catalog.svg +0 -15
- package/src/assets/icons/detailed/certificate.svg +0 -10
- package/src/assets/icons/detailed/chat.svg +0 -6
- package/src/assets/icons/detailed/check-badge.svg +0 -9
- package/src/assets/icons/detailed/check-circle.svg +0 -10
- package/src/assets/icons/detailed/check.svg +0 -6
- package/src/assets/icons/detailed/checkbox.svg +0 -8
- package/src/assets/icons/detailed/chevron-down-circle.svg +0 -10
- package/src/assets/icons/detailed/chevron-down.svg +0 -6
- package/src/assets/icons/detailed/chevron-left-circle.svg +0 -10
- package/src/assets/icons/detailed/chevron-left.svg +0 -6
- package/src/assets/icons/detailed/chevron-right-circle.svg +0 -7
- package/src/assets/icons/detailed/chevron-up-circle.svg +0 -10
- package/src/assets/icons/detailed/chevron-up.svg +0 -6
- package/src/assets/icons/detailed/circle.svg +0 -8
- package/src/assets/icons/detailed/classroom.svg +0 -38
- package/src/assets/icons/detailed/clear-field.svg +0 -14
- package/src/assets/icons/detailed/clear-style.svg +0 -9
- package/src/assets/icons/detailed/close-circle.svg +0 -14
- package/src/assets/icons/detailed/close-loader.svg +0 -6
- package/src/assets/icons/detailed/close.svg +0 -8
- package/src/assets/icons/detailed/coffee.svg +0 -21
- package/src/assets/icons/detailed/color.svg +0 -20
- package/src/assets/icons/detailed/contact-us.svg +0 -27
- package/src/assets/icons/detailed/copy.svg +0 -10
- package/src/assets/icons/detailed/courses.svg +0 -22
- package/src/assets/icons/detailed/dashboard.svg +0 -20
- package/src/assets/icons/detailed/download.svg +0 -10
- package/src/assets/icons/detailed/drag.svg +0 -10
- package/src/assets/icons/detailed/duplicate.svg +0 -23
- package/src/assets/icons/detailed/edit.svg +0 -16
- package/src/assets/icons/detailed/elearning.svg +0 -13
- package/src/assets/icons/detailed/email.svg +0 -11
- package/src/assets/icons/detailed/error-2.svg +0 -8
- package/src/assets/icons/detailed/error.svg +0 -12
- package/src/assets/icons/detailed/exercise.svg +0 -26
- package/src/assets/icons/detailed/external-link.svg +0 -11
- package/src/assets/icons/detailed/extract.svg +0 -20
- package/src/assets/icons/detailed/eye-off.svg +0 -15
- package/src/assets/icons/detailed/eye-on.svg +0 -8
- package/src/assets/icons/detailed/fail.svg +0 -11
- package/src/assets/icons/detailed/fast-back.svg +0 -20
- package/src/assets/icons/detailed/fast-forward.svg +0 -20
- package/src/assets/icons/detailed/file-add.svg +0 -19
- package/src/assets/icons/detailed/file-duplicate.svg +0 -16
- package/src/assets/icons/detailed/file-remove.svg +0 -17
- package/src/assets/icons/detailed/file-required.svg +0 -23
- package/src/assets/icons/detailed/file.svg +0 -13
- package/src/assets/icons/detailed/filter-2.svg +0 -22
- package/src/assets/icons/detailed/filter-active.svg +0 -12
- package/src/assets/icons/detailed/filter.svg +0 -12
- package/src/assets/icons/detailed/flag.svg +0 -11
- package/src/assets/icons/detailed/folder.svg +0 -14
- package/src/assets/icons/detailed/full-width.svg +0 -11
- package/src/assets/icons/detailed/go-to-back.svg +0 -19
- package/src/assets/icons/detailed/grid.svg +0 -20
- package/src/assets/icons/detailed/group-add.svg +0 -24
- package/src/assets/icons/detailed/group.svg +0 -16
- package/src/assets/icons/detailed/heart-active.svg +0 -12
- package/src/assets/icons/detailed/heart.svg +0 -12
- package/src/assets/icons/detailed/highlighter.svg +0 -10
- package/src/assets/icons/detailed/home.svg +0 -12
- package/src/assets/icons/detailed/hourglass.svg +0 -12
- package/src/assets/icons/detailed/image.svg +0 -15
- package/src/assets/icons/detailed/info-badge.svg +0 -9
- package/src/assets/icons/detailed/information.svg +0 -12
- package/src/assets/icons/detailed/italic.svg +0 -10
- package/src/assets/icons/detailed/key.svg +0 -5
- package/src/assets/icons/detailed/language.svg +0 -14
- package/src/assets/icons/detailed/learning-path.svg +0 -7
- package/src/assets/icons/detailed/light-off.svg +0 -10
- package/src/assets/icons/detailed/light-on.svg +0 -18
- package/src/assets/icons/detailed/link.svg +0 -12
- package/src/assets/icons/detailed/lock.svg +0 -13
- package/src/assets/icons/detailed/login.svg +0 -11
- package/src/assets/icons/detailed/logout.svg +0 -11
- package/src/assets/icons/detailed/maximaze.svg +0 -12
- package/src/assets/icons/detailed/menu.svg +0 -9
- package/src/assets/icons/detailed/merge.svg +0 -20
- package/src/assets/icons/detailed/minimize.svg +0 -14
- package/src/assets/icons/detailed/mixed-class.svg +0 -40
- package/src/assets/icons/detailed/more-horizontal.svg +0 -7
- package/src/assets/icons/detailed/more-vertical.svg +0 -7
- package/src/assets/icons/detailed/news.svg +0 -12
- package/src/assets/icons/detailed/no-prerequisites.svg +0 -13
- package/src/assets/icons/detailed/notes.svg +0 -14
- package/src/assets/icons/detailed/number-code.svg +0 -34
- package/src/assets/icons/detailed/numbered-list.svg +0 -18
- package/src/assets/icons/detailed/on-site.svg +0 -22
- package/src/assets/icons/detailed/order-down.svg +0 -12
- package/src/assets/icons/detailed/order-up.svg +0 -12
- package/src/assets/icons/detailed/paste.svg +0 -14
- package/src/assets/icons/detailed/pausa.svg +0 -8
- package/src/assets/icons/detailed/pdf.svg +0 -12
- package/src/assets/icons/detailed/phone.svg +0 -10
- package/src/assets/icons/detailed/pin-map.svg +0 -12
- package/src/assets/icons/detailed/pin.svg +0 -15
- package/src/assets/icons/detailed/pizza.svg +0 -17
- package/src/assets/icons/detailed/play.svg +0 -11
- package/src/assets/icons/detailed/plug-in.svg +0 -10
- package/src/assets/icons/detailed/pointer.svg +0 -12
- package/src/assets/icons/detailed/printer.svg +0 -26
- package/src/assets/icons/detailed/profile-add.svg +0 -20
- package/src/assets/icons/detailed/profile.svg +0 -10
- package/src/assets/icons/detailed/push-pin-off.svg +0 -11
- package/src/assets/icons/detailed/push-pin-on.svg +0 -9
- package/src/assets/icons/detailed/qrcode.svg +0 -28
- package/src/assets/icons/detailed/question-badge.svg +0 -10
- package/src/assets/icons/detailed/radio.svg +0 -8
- package/src/assets/icons/detailed/redo.svg +0 -9
- package/src/assets/icons/detailed/relations.svg +0 -32
- package/src/assets/icons/detailed/reload.svg +0 -13
- package/src/assets/icons/detailed/remove-circle.svg +0 -10
- package/src/assets/icons/detailed/remove.svg +0 -5
- package/src/assets/icons/detailed/reorder.svg +0 -12
- package/src/assets/icons/detailed/repeat.svg +0 -12
- package/src/assets/icons/detailed/repository.svg +0 -18
- package/src/assets/icons/detailed/request-form.svg +0 -18
- package/src/assets/icons/detailed/resize-100%.svg +0 -15
- package/src/assets/icons/detailed/resize-height.svg +0 -12
- package/src/assets/icons/detailed/resize-width.svg +0 -12
- package/src/assets/icons/detailed/search.svg +0 -12
- package/src/assets/icons/detailed/sequential-prerequisites.svg +0 -20
- package/src/assets/icons/detailed/settings.svg +0 -14
- package/src/assets/icons/detailed/share.svg +0 -20
- package/src/assets/icons/detailed/sketch.svg +0 -12
- package/src/assets/icons/detailed/skills.svg +0 -20
- package/src/assets/icons/detailed/skip-back.svg +0 -12
- package/src/assets/icons/detailed/skip-forward.svg +0 -13
- package/src/assets/icons/detailed/sms.svg +0 -18
- package/src/assets/icons/detailed/sso-access.svg +0 -18
- package/src/assets/icons/detailed/star-active.svg +0 -6
- package/src/assets/icons/detailed/star.svg +0 -6
- package/src/assets/icons/detailed/success.svg +0 -10
- package/src/assets/icons/detailed/sun.svg +0 -24
- package/src/assets/icons/detailed/sunrise.svg +0 -18
- package/src/assets/icons/detailed/support.svg +0 -18
- package/src/assets/icons/detailed/survey.svg +0 -24
- package/src/assets/icons/detailed/table.svg +0 -11
- package/src/assets/icons/detailed/tematic-channels.svg +0 -12
- package/src/assets/icons/detailed/test.svg +0 -14
- package/src/assets/icons/detailed/text-body.svg +0 -8
- package/src/assets/icons/detailed/text-edit.svg +0 -11
- package/src/assets/icons/detailed/text-style.svg +0 -10
- package/src/assets/icons/detailed/time.svg +0 -10
- package/src/assets/icons/detailed/toilet-piper.svg +0 -15
- package/src/assets/icons/detailed/training-points.svg +0 -16
- package/src/assets/icons/detailed/trash.svg +0 -19
- package/src/assets/icons/detailed/underline.svg +0 -8
- package/src/assets/icons/detailed/undo.svg +0 -9
- package/src/assets/icons/detailed/unlock.svg +0 -13
- package/src/assets/icons/detailed/upload.svg +0 -10
- package/src/assets/icons/detailed/user-add.svg +0 -16
- package/src/assets/icons/detailed/user-badge.svg +0 -11
- package/src/assets/icons/detailed/user.svg +0 -8
- package/src/assets/icons/detailed/video-off.svg +0 -17
- package/src/assets/icons/detailed/video-on.svg +0 -16
- package/src/assets/icons/detailed/video-rec.svg +0 -19
- package/src/assets/icons/detailed/view-card.svg +0 -12
- package/src/assets/icons/detailed/view-list.svg +0 -20
- package/src/assets/icons/detailed/view.svg +0 -7
- package/src/assets/icons/detailed/voice-off.svg +0 -14
- package/src/assets/icons/detailed/voice-on.svg +0 -16
- package/src/assets/icons/detailed/volume-down.svg +0 -14
- package/src/assets/icons/detailed/volume-off.svg +0 -19
- package/src/assets/icons/detailed/volume-up.svg +0 -16
- package/src/assets/icons/detailed/warning.svg +0 -16
- package/src/assets/icons/detailed/webinar.svg +0 -57
- package/src/assets/icons/detailed/whiteboard.svg +0 -16
- package/src/assets/icons/detailed/wine.svg +0 -22
- package/src/assets/icons/detailed/zip.svg +0 -17
- package/src/assets/icons/detailed/zoom-in.svg +0 -18
- package/src/assets/icons/detailed/zoom-out.svg +0 -16
- package/src/assets/icons/detailed.json +0 -1
- package/src/assets/icons/normal/add-circle.svg +0 -12
- package/src/assets/icons/normal/add.svg +0 -4
- package/src/assets/icons/normal/align-center.svg +0 -11
- package/src/assets/icons/normal/align-justify.svg +0 -11
- package/src/assets/icons/normal/align-left.svg +0 -11
- package/src/assets/icons/normal/align-right.svg +0 -11
- package/src/assets/icons/normal/analysis-2.svg +0 -18
- package/src/assets/icons/normal/analysis-3.svg +0 -8
- package/src/assets/icons/normal/analysis.svg +0 -14
- package/src/assets/icons/normal/apple.svg +0 -16
- package/src/assets/icons/normal/arrow-down.svg +0 -8
- package/src/assets/icons/normal/arrow-left.svg +0 -8
- package/src/assets/icons/normal/arrow-right.svg +0 -8
- package/src/assets/icons/normal/arrow-up.svg +0 -8
- package/src/assets/icons/normal/attachment.svg +0 -6
- package/src/assets/icons/normal/back-to-front.svg +0 -15
- package/src/assets/icons/normal/bell-active.svg +0 -14
- package/src/assets/icons/normal/bell.svg +0 -14
- package/src/assets/icons/normal/bold.svg +0 -8
- package/src/assets/icons/normal/bookmark active.svg +0 -12
- package/src/assets/icons/normal/bookmark.svg +0 -10
- package/src/assets/icons/normal/building.svg +0 -21
- package/src/assets/icons/normal/bulleted-list.svg +0 -23
- package/src/assets/icons/normal/calendar.svg +0 -20
- package/src/assets/icons/normal/camera-off.svg +0 -17
- package/src/assets/icons/normal/camera-on.svg +0 -16
- package/src/assets/icons/normal/catalog.svg +0 -13
- package/src/assets/icons/normal/certificate.svg +0 -12
- package/src/assets/icons/normal/chat.svg +0 -6
- package/src/assets/icons/normal/check-badge.svg +0 -9
- package/src/assets/icons/normal/check-circle.svg +0 -10
- package/src/assets/icons/normal/check.svg +0 -4
- package/src/assets/icons/normal/checkbox.svg +0 -8
- package/src/assets/icons/normal/chevron-down-circle.svg +0 -10
- package/src/assets/icons/normal/chevron-down.svg +0 -6
- package/src/assets/icons/normal/chevron-left-circle.svg +0 -10
- package/src/assets/icons/normal/chevron-left.svg +0 -6
- package/src/assets/icons/normal/chevron-right-circle.svg +0 -10
- package/src/assets/icons/normal/chevron-right.svg +0 -7
- package/src/assets/icons/normal/chevron-up-circle.svg +0 -10
- package/src/assets/icons/normal/chevron-up.svg +0 -6
- package/src/assets/icons/normal/circle.svg +0 -8
- package/src/assets/icons/normal/classroom.svg +0 -36
- package/src/assets/icons/normal/clear-field.svg +0 -14
- package/src/assets/icons/normal/clear-style.svg +0 -18
- package/src/assets/icons/normal/close-circle.svg +0 -14
- package/src/assets/icons/normal/close-loader.svg +0 -6
- package/src/assets/icons/normal/close.svg +0 -8
- package/src/assets/icons/normal/coffee.svg +0 -26
- package/src/assets/icons/normal/color.svg +0 -18
- package/src/assets/icons/normal/contact-us.svg +0 -29
- package/src/assets/icons/normal/copy.svg +0 -10
- package/src/assets/icons/normal/courses.svg +0 -22
- package/src/assets/icons/normal/dashboard.svg +0 -18
- package/src/assets/icons/normal/download.svg +0 -10
- package/src/assets/icons/normal/drag.svg +0 -5
- package/src/assets/icons/normal/dulicate.svg +0 -22
- package/src/assets/icons/normal/edit.svg +0 -16
- package/src/assets/icons/normal/elearning.svg +0 -16
- package/src/assets/icons/normal/email.svg +0 -11
- package/src/assets/icons/normal/error-2.svg +0 -8
- package/src/assets/icons/normal/error.svg +0 -12
- package/src/assets/icons/normal/exercise.svg +0 -26
- package/src/assets/icons/normal/external-link.svg +0 -11
- package/src/assets/icons/normal/extract.svg +0 -14
- package/src/assets/icons/normal/eye-off.svg +0 -14
- package/src/assets/icons/normal/eye-on.svg +0 -16
- package/src/assets/icons/normal/fail.svg +0 -11
- package/src/assets/icons/normal/fast-back.svg +0 -19
- package/src/assets/icons/normal/fast-forward.svg +0 -17
- package/src/assets/icons/normal/file-add.svg +0 -16
- package/src/assets/icons/normal/file-duplicate.svg +0 -22
- package/src/assets/icons/normal/file-remove.svg +0 -14
- package/src/assets/icons/normal/file-required.svg +0 -24
- package/src/assets/icons/normal/file.svg +0 -13
- package/src/assets/icons/normal/filter-2.svg +0 -20
- package/src/assets/icons/normal/filter-active.svg +0 -12
- package/src/assets/icons/normal/filter.svg +0 -12
- package/src/assets/icons/normal/flag.svg +0 -10
- package/src/assets/icons/normal/folder.svg +0 -12
- package/src/assets/icons/normal/full-width.svg +0 -9
- package/src/assets/icons/normal/go-to-back.svg +0 -19
- package/src/assets/icons/normal/grid.svg +0 -20
- package/src/assets/icons/normal/group-add.svg +0 -18
- package/src/assets/icons/normal/group.svg +0 -14
- package/src/assets/icons/normal/heart-active.svg +0 -10
- package/src/assets/icons/normal/heart.svg +0 -10
- package/src/assets/icons/normal/highlighter.svg +0 -11
- package/src/assets/icons/normal/home.svg +0 -12
- package/src/assets/icons/normal/hourglass.svg +0 -8
- package/src/assets/icons/normal/image.svg +0 -15
- package/src/assets/icons/normal/info-badge.svg +0 -9
- package/src/assets/icons/normal/information.svg +0 -12
- package/src/assets/icons/normal/italic.svg +0 -10
- package/src/assets/icons/normal/key.svg +0 -8
- package/src/assets/icons/normal/language.svg +0 -14
- package/src/assets/icons/normal/learning-path.svg +0 -7
- package/src/assets/icons/normal/light-off.svg +0 -10
- package/src/assets/icons/normal/light-on.svg +0 -17
- package/src/assets/icons/normal/link.svg +0 -12
- package/src/assets/icons/normal/lock.svg +0 -12
- package/src/assets/icons/normal/login.svg +0 -10
- package/src/assets/icons/normal/logout.svg +0 -10
- package/src/assets/icons/normal/maximize.svg +0 -10
- package/src/assets/icons/normal/menu.svg +0 -8
- package/src/assets/icons/normal/merge.svg +0 -20
- package/src/assets/icons/normal/minimize.svg +0 -12
- package/src/assets/icons/normal/mixed-class.svg +0 -36
- package/src/assets/icons/normal/more-horizontal.svg +0 -7
- package/src/assets/icons/normal/more-vertical.svg +0 -7
- package/src/assets/icons/normal/news.svg +0 -9
- package/src/assets/icons/normal/no-prerequisites.svg +0 -12
- package/src/assets/icons/normal/notes.svg +0 -15
- package/src/assets/icons/normal/number-code.svg +0 -34
- package/src/assets/icons/normal/numbered-list.svg +0 -19
- package/src/assets/icons/normal/on-site.svg +0 -18
- package/src/assets/icons/normal/order-down.svg +0 -12
- package/src/assets/icons/normal/order-up.svg +0 -11
- package/src/assets/icons/normal/paste.svg +0 -14
- package/src/assets/icons/normal/pausa.svg +0 -7
- package/src/assets/icons/normal/pdf.svg +0 -12
- package/src/assets/icons/normal/phone.svg +0 -10
- package/src/assets/icons/normal/pin-map.svg +0 -10
- package/src/assets/icons/normal/pin.svg +0 -12
- package/src/assets/icons/normal/pizza.svg +0 -17
- package/src/assets/icons/normal/play.svg +0 -9
- package/src/assets/icons/normal/plug-in.svg +0 -10
- package/src/assets/icons/normal/pointer.svg +0 -12
- package/src/assets/icons/normal/printer.svg +0 -28
- package/src/assets/icons/normal/profile-add.svg +0 -28
- package/src/assets/icons/normal/profile.svg +0 -15
- package/src/assets/icons/normal/push pin on.svg +0 -9
- package/src/assets/icons/normal/push-pin-off.svg +0 -23
- package/src/assets/icons/normal/qrcode.svg +0 -26
- package/src/assets/icons/normal/question-badge.svg +0 -10
- package/src/assets/icons/normal/radio.svg +0 -8
- package/src/assets/icons/normal/redo.svg +0 -9
- package/src/assets/icons/normal/relations.svg +0 -28
- package/src/assets/icons/normal/reload.svg +0 -12
- package/src/assets/icons/normal/remove-circle.svg +0 -10
- package/src/assets/icons/normal/remove.svg +0 -4
- package/src/assets/icons/normal/reorder.svg +0 -12
- package/src/assets/icons/normal/repeat.svg +0 -12
- package/src/assets/icons/normal/repository.svg +0 -18
- package/src/assets/icons/normal/request-form.svg +0 -18
- package/src/assets/icons/normal/resize-100%.svg +0 -17
- package/src/assets/icons/normal/resize-height.svg +0 -12
- package/src/assets/icons/normal/resize-width.svg +0 -12
- package/src/assets/icons/normal/search.svg +0 -10
- package/src/assets/icons/normal/sequential-prerequisites.svg +0 -20
- package/src/assets/icons/normal/settings.svg +0 -14
- package/src/assets/icons/normal/share.svg +0 -20
- package/src/assets/icons/normal/sketch.svg +0 -11
- package/src/assets/icons/normal/skills.svg +0 -16
- package/src/assets/icons/normal/skip-back.svg +0 -12
- package/src/assets/icons/normal/skip-forward.svg +0 -13
- package/src/assets/icons/normal/sms.svg +0 -20
- package/src/assets/icons/normal/sso-access.svg +0 -20
- package/src/assets/icons/normal/star-active.svg +0 -4
- package/src/assets/icons/normal/star.svg +0 -4
- package/src/assets/icons/normal/success.svg +0 -10
- package/src/assets/icons/normal/sun.svg +0 -24
- package/src/assets/icons/normal/sunrise.svg +0 -18
- package/src/assets/icons/normal/support.svg +0 -18
- package/src/assets/icons/normal/survey.svg +0 -24
- package/src/assets/icons/normal/table.svg +0 -11
- package/src/assets/icons/normal/tematic-channels.svg +0 -10
- package/src/assets/icons/normal/test.svg +0 -15
- package/src/assets/icons/normal/text-body.svg +0 -8
- package/src/assets/icons/normal/text-edit.svg +0 -11
- package/src/assets/icons/normal/text-style.svg +0 -10
- package/src/assets/icons/normal/time.svg +0 -10
- package/src/assets/icons/normal/toilet-paper.svg +0 -15
- package/src/assets/icons/normal/training-points.svg +0 -16
- package/src/assets/icons/normal/trash.svg +0 -19
- package/src/assets/icons/normal/underline.svg +0 -8
- package/src/assets/icons/normal/undo.svg +0 -9
- package/src/assets/icons/normal/unlock.svg +0 -13
- package/src/assets/icons/normal/upload.svg +0 -10
- package/src/assets/icons/normal/user-add.svg +0 -14
- package/src/assets/icons/normal/user-badge.svg +0 -11
- package/src/assets/icons/normal/user.svg +0 -5
- package/src/assets/icons/normal/video-off.svg +0 -11
- package/src/assets/icons/normal/video-on.svg +0 -20
- package/src/assets/icons/normal/video-rec.svg +0 -23
- package/src/assets/icons/normal/view-card.svg +0 -10
- package/src/assets/icons/normal/view-list.svg +0 -18
- package/src/assets/icons/normal/view.svg +0 -8
- package/src/assets/icons/normal/voice-off.svg +0 -18
- package/src/assets/icons/normal/voice-on.svg +0 -15
- package/src/assets/icons/normal/volume-down.svg +0 -14
- package/src/assets/icons/normal/volume-off.svg +0 -18
- package/src/assets/icons/normal/volume-up.svg +0 -16
- package/src/assets/icons/normal/warning.svg +0 -16
- package/src/assets/icons/normal/webinar.svg +0 -36
- package/src/assets/icons/normal/whiteboard.svg +0 -17
- package/src/assets/icons/normal/wine.svg +0 -22
- package/src/assets/icons/normal/zip.svg +0 -19
- package/src/assets/icons/normal/zoom-in.svg +0 -16
- package/src/assets/icons/normal/zoom-out.svg +0 -14
- package/src/assets/icons/normal.json +0 -1
- package/src/assets/icons/simple/add-circle.svg +0 -12
- package/src/assets/icons/simple/add.svg +0 -8
- package/src/assets/icons/simple/align-center.svg +0 -12
- package/src/assets/icons/simple/align-justify.svg +0 -12
- package/src/assets/icons/simple/align-left.svg +0 -12
- package/src/assets/icons/simple/align-right.svg +0 -12
- package/src/assets/icons/simple/analysis-2.svg +0 -21
- package/src/assets/icons/simple/analysis-3.svg +0 -8
- package/src/assets/icons/simple/analysis.svg +0 -16
- package/src/assets/icons/simple/apple.svg +0 -18
- package/src/assets/icons/simple/arrow-down.svg +0 -8
- package/src/assets/icons/simple/arrow-left.svg +0 -8
- package/src/assets/icons/simple/arrow-right.svg +0 -8
- package/src/assets/icons/simple/arrow-up.svg +0 -8
- package/src/assets/icons/simple/attachment.svg +0 -10
- package/src/assets/icons/simple/bck-to-front.svg +0 -19
- package/src/assets/icons/simple/bell-active.svg +0 -14
- package/src/assets/icons/simple/bell.svg +0 -14
- package/src/assets/icons/simple/bold.svg +0 -8
- package/src/assets/icons/simple/bookmark-active.svg +0 -12
- package/src/assets/icons/simple/bookmark.svg +0 -12
- package/src/assets/icons/simple/building.svg +0 -25
- package/src/assets/icons/simple/bulleted-list.svg +0 -22
- package/src/assets/icons/simple/calendar.svg +0 -22
- package/src/assets/icons/simple/camera-off.svg +0 -12
- package/src/assets/icons/simple/camera-on.svg +0 -16
- package/src/assets/icons/simple/catalog.svg +0 -14
- package/src/assets/icons/simple/certificate.svg +0 -15
- package/src/assets/icons/simple/chat.svg +0 -9
- package/src/assets/icons/simple/check-badge.svg +0 -9
- package/src/assets/icons/simple/check-circle.svg +0 -10
- package/src/assets/icons/simple/check.svg +0 -6
- package/src/assets/icons/simple/checkbox.svg +0 -6
- package/src/assets/icons/simple/chevron-down-circle.svg +0 -10
- package/src/assets/icons/simple/chevron-down.svg +0 -6
- package/src/assets/icons/simple/chevron-left-circle.svg +0 -10
- package/src/assets/icons/simple/chevron-left.svg +0 -6
- package/src/assets/icons/simple/chevron-right-circle.svg +0 -10
- package/src/assets/icons/simple/chevron-right.svg +0 -7
- package/src/assets/icons/simple/chevron-up-circle.svg +0 -10
- package/src/assets/icons/simple/chevron-up.svg +0 -6
- package/src/assets/icons/simple/circle.svg +0 -8
- package/src/assets/icons/simple/classroom.svg +0 -38
- package/src/assets/icons/simple/clear-field.svg +0 -11
- package/src/assets/icons/simple/clear-style.svg +0 -15
- package/src/assets/icons/simple/close-circle.svg +0 -14
- package/src/assets/icons/simple/close-loader.svg +0 -6
- package/src/assets/icons/simple/close.svg +0 -10
- package/src/assets/icons/simple/coffee.svg +0 -28
- package/src/assets/icons/simple/color.svg +0 -20
- package/src/assets/icons/simple/contact-us.svg +0 -26
- package/src/assets/icons/simple/copy.svg +0 -10
- package/src/assets/icons/simple/courses.svg +0 -21
- package/src/assets/icons/simple/dashboard.svg +0 -20
- package/src/assets/icons/simple/download.svg +0 -10
- package/src/assets/icons/simple/drag.svg +0 -10
- package/src/assets/icons/simple/duplicate.svg +0 -24
- package/src/assets/icons/simple/edit.svg +0 -17
- package/src/assets/icons/simple/elearning.svg +0 -17
- package/src/assets/icons/simple/email.svg +0 -11
- package/src/assets/icons/simple/error-2.svg +0 -8
- package/src/assets/icons/simple/error.svg +0 -12
- package/src/assets/icons/simple/exercise.svg +0 -30
- package/src/assets/icons/simple/external-link.svg +0 -13
- package/src/assets/icons/simple/extract.svg +0 -17
- package/src/assets/icons/simple/eye-off.svg +0 -13
- package/src/assets/icons/simple/eye-on.svg +0 -11
- package/src/assets/icons/simple/fail.svg +0 -11
- package/src/assets/icons/simple/fast-back.svg +0 -20
- package/src/assets/icons/simple/fast-forward.svg +0 -19
- package/src/assets/icons/simple/file-add.svg +0 -20
- package/src/assets/icons/simple/file-duplicate.svg +0 -22
- package/src/assets/icons/simple/file-remove.svg +0 -18
- package/src/assets/icons/simple/file-required.svg +0 -24
- package/src/assets/icons/simple/file.svg +0 -14
- package/src/assets/icons/simple/filter-2.svg +0 -24
- package/src/assets/icons/simple/filter-active.svg +0 -13
- package/src/assets/icons/simple/filter.svg +0 -12
- package/src/assets/icons/simple/flag.svg +0 -12
- package/src/assets/icons/simple/folder.svg +0 -14
- package/src/assets/icons/simple/full-width.svg +0 -11
- package/src/assets/icons/simple/go-to-back.svg +0 -18
- package/src/assets/icons/simple/grid.svg +0 -20
- package/src/assets/icons/simple/group-add.svg +0 -24
- package/src/assets/icons/simple/group.svg +0 -18
- package/src/assets/icons/simple/heart-active.svg +0 -12
- package/src/assets/icons/simple/heart.svg +0 -12
- package/src/assets/icons/simple/highlighter.svg +0 -12
- package/src/assets/icons/simple/home.svg +0 -13
- package/src/assets/icons/simple/hourglass.svg +0 -11
- package/src/assets/icons/simple/image.svg +0 -15
- package/src/assets/icons/simple/info-badge.svg +0 -9
- package/src/assets/icons/simple/information.svg +0 -12
- package/src/assets/icons/simple/italic.svg +0 -12
- package/src/assets/icons/simple/key.svg +0 -11
- package/src/assets/icons/simple/language.svg +0 -12
- package/src/assets/icons/simple/learning-path.svg +0 -9
- package/src/assets/icons/simple/light-off.svg +0 -7
- package/src/assets/icons/simple/light-on.svg +0 -18
- package/src/assets/icons/simple/link.svg +0 -14
- package/src/assets/icons/simple/lock.svg +0 -13
- package/src/assets/icons/simple/login.svg +0 -11
- package/src/assets/icons/simple/logout.svg +0 -11
- package/src/assets/icons/simple/maximaze.svg +0 -12
- package/src/assets/icons/simple/menu.svg +0 -10
- package/src/assets/icons/simple/merge.svg +0 -20
- package/src/assets/icons/simple/minimaze.svg +0 -12
- package/src/assets/icons/simple/mixed-class.svg +0 -40
- package/src/assets/icons/simple/more-horizontal.svg +0 -8
- package/src/assets/icons/simple/more-vertical.svg +0 -8
- package/src/assets/icons/simple/news.svg +0 -12
- package/src/assets/icons/simple/no-prerequisites.svg +0 -17
- package/src/assets/icons/simple/notes.svg +0 -14
- package/src/assets/icons/simple/number-code.svg +0 -29
- package/src/assets/icons/simple/numbered-list.svg +0 -18
- package/src/assets/icons/simple/on-site.svg +0 -18
- package/src/assets/icons/simple/order-down.svg +0 -12
- package/src/assets/icons/simple/order-up.svg +0 -12
- package/src/assets/icons/simple/paste.svg +0 -14
- package/src/assets/icons/simple/pausa.svg +0 -8
- package/src/assets/icons/simple/pdf.svg +0 -12
- package/src/assets/icons/simple/phone.svg +0 -10
- package/src/assets/icons/simple/pin-map.svg +0 -13
- package/src/assets/icons/simple/pin.svg +0 -14
- package/src/assets/icons/simple/pizza.svg +0 -17
- package/src/assets/icons/simple/play.svg +0 -10
- package/src/assets/icons/simple/plug-in.svg +0 -10
- package/src/assets/icons/simple/pointer.svg +0 -6
- package/src/assets/icons/simple/printer.svg +0 -28
- package/src/assets/icons/simple/profile-add.svg +0 -28
- package/src/assets/icons/simple/profile.svg +0 -13
- package/src/assets/icons/simple/push-pin-off.svg +0 -11
- package/src/assets/icons/simple/push-pin-on.svg +0 -12
- package/src/assets/icons/simple/qrcode.svg +0 -26
- package/src/assets/icons/simple/question-badge.svg +0 -10
- package/src/assets/icons/simple/radio.svg +0 -8
- package/src/assets/icons/simple/redo.svg +0 -9
- package/src/assets/icons/simple/relations.svg +0 -28
- package/src/assets/icons/simple/reload.svg +0 -12
- package/src/assets/icons/simple/remove-circle.svg +0 -10
- package/src/assets/icons/simple/remove.svg +0 -6
- package/src/assets/icons/simple/repeart.svg +0 -14
- package/src/assets/icons/simple/repository.svg +0 -18
- package/src/assets/icons/simple/request-form.svg +0 -20
- package/src/assets/icons/simple/resize-100%.svg +0 -15
- package/src/assets/icons/simple/resize-height.svg +0 -12
- package/src/assets/icons/simple/resize-width.svg +0 -14
- package/src/assets/icons/simple/search.svg +0 -10
- package/src/assets/icons/simple/sequential-prerequisites.svg +0 -22
- package/src/assets/icons/simple/settings.svg +0 -17
- package/src/assets/icons/simple/share.svg +0 -21
- package/src/assets/icons/simple/sketch.svg +0 -13
- package/src/assets/icons/simple/skills.svg +0 -17
- package/src/assets/icons/simple/skip-back.svg +0 -14
- package/src/assets/icons/simple/skip-forward.svg +0 -14
- package/src/assets/icons/simple/sms.svg +0 -22
- package/src/assets/icons/simple/sso-access.svg +0 -20
- package/src/assets/icons/simple/star-active.svg +0 -6
- package/src/assets/icons/simple/star.svg +0 -6
- package/src/assets/icons/simple/success.svg +0 -12
- package/src/assets/icons/simple/sun.svg +0 -22
- package/src/assets/icons/simple/sunrise.svg +0 -18
- package/src/assets/icons/simple/support.svg +0 -18
- package/src/assets/icons/simple/survey.svg +0 -32
- package/src/assets/icons/simple/table.svg +0 -11
- package/src/assets/icons/simple/tematic-channels.svg +0 -15
- package/src/assets/icons/simple/test.svg +0 -23
- package/src/assets/icons/simple/text-body.svg +0 -7
- package/src/assets/icons/simple/text-edit.svg +0 -11
- package/src/assets/icons/simple/text-style.svg +0 -10
- package/src/assets/icons/simple/time.svg +0 -10
- package/src/assets/icons/simple/toilet-paper.svg +0 -17
- package/src/assets/icons/simple/training-points.svg +0 -18
- package/src/assets/icons/simple/trash.svg +0 -20
- package/src/assets/icons/simple/underline.svg +0 -9
- package/src/assets/icons/simple/undo.svg +0 -9
- package/src/assets/icons/simple/unlock.svg +0 -15
- package/src/assets/icons/simple/upload.svg +0 -10
- package/src/assets/icons/simple/user-add.svg +0 -18
- package/src/assets/icons/simple/user-badge.svg +0 -12
- package/src/assets/icons/simple/user.svg +0 -8
- package/src/assets/icons/simple/video-off.svg +0 -17
- package/src/assets/icons/simple/video-on.svg +0 -17
- package/src/assets/icons/simple/video-rec.svg +0 -20
- package/src/assets/icons/simple/view-card.svg +0 -12
- package/src/assets/icons/simple/view-list.svg +0 -20
- package/src/assets/icons/simple/view.svg +0 -17
- package/src/assets/icons/simple/voice-off.svg +0 -16
- package/src/assets/icons/simple/voice-on.svg +0 -16
- package/src/assets/icons/simple/volume-down.svg +0 -15
- package/src/assets/icons/simple/volume-off.svg +0 -16
- package/src/assets/icons/simple/volume-up.svg +0 -16
- package/src/assets/icons/simple/warning.svg +0 -14
- package/src/assets/icons/simple/webinar.svg +0 -19
- package/src/assets/icons/simple/whiteboard.svg +0 -16
- package/src/assets/icons/simple/wine.svg +0 -24
- package/src/assets/icons/simple/zip.svg +0 -22
- package/src/assets/icons/simple/zoom-in.svg +0 -18
- package/src/assets/icons/simple/zoom-out.svg +0 -17
- package/src/assets/icons/simple.json +0 -1
- package/src/components/VvAccordion/VvAccordion.vue +0 -109
- package/src/components/VvAccordion/index.ts +0 -96
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +0 -115
- package/src/components/VvAccordionGroup/index.ts +0 -50
- package/src/components/VvAction/VvAction.vue +0 -146
- package/src/components/VvAction/index.ts +0 -5
- package/src/components/VvAlert/VvAlert.vue +0 -76
- package/src/components/VvAlert/index.ts +0 -162
- package/src/components/VvAlertGroup/VvAlertGroup.vue +0 -64
- package/src/components/VvAlertGroup/index.ts +0 -132
- package/src/components/VvAvatar/VvAvatar.vue +0 -21
- package/src/components/VvAvatar/index.ts +0 -9
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +0 -65
- package/src/components/VvAvatarGroup/index.ts +0 -28
- package/src/components/VvBadge/VvBadge.vue +0 -20
- package/src/components/VvBadge/index.ts +0 -6
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +0 -54
- package/src/components/VvBreadcrumb/index.ts +0 -13
- package/src/components/VvButton/VvButton.vue +0 -164
- package/src/components/VvButton/index.ts +0 -132
- package/src/components/VvButtonGroup/VvButtonGroup.vue +0 -74
- package/src/components/VvButtonGroup/index.ts +0 -28
- package/src/components/VvCard/VvCard.vue +0 -37
- package/src/components/VvCard/index.ts +0 -6
- package/src/components/VvCheckbox/VvCheckbox.vue +0 -198
- package/src/components/VvCheckbox/index.ts +0 -65
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +0 -99
- package/src/components/VvCheckboxGroup/index.ts +0 -5
- package/src/components/VvCombobox/VvCombobox.vue +0 -629
- package/src/components/VvCombobox/index.ts +0 -179
- package/src/components/VvDialog/VvDialog.vue +0 -144
- package/src/components/VvDialog/index.ts +0 -42
- package/src/components/VvDropdown/VvDropdown.vue +0 -475
- package/src/components/VvDropdown/VvDropdownAction.vue +0 -46
- package/src/components/VvDropdown/VvDropdownItem.vue +0 -32
- package/src/components/VvDropdown/VvDropdownOptgroup.vue +0 -18
- package/src/components/VvDropdown/VvDropdownOption.vue +0 -72
- package/src/components/VvDropdown/index.ts +0 -32
- package/src/components/VvIcon/README.md +0 -64
- package/src/components/VvIcon/VvIcon.vue +0 -139
- package/src/components/VvIcon/index.ts +0 -103
- package/src/components/VvInputText/VvInputClearAction.ts +0 -52
- package/src/components/VvInputText/VvInputPasswordAction.ts +0 -68
- package/src/components/VvInputText/VvInputStepAction.ts +0 -49
- package/src/components/VvInputText/VvInputText.vue +0 -547
- package/src/components/VvInputText/VvInputTextActions.ts +0 -97
- package/src/components/VvInputText/index.ts +0 -199
- package/src/components/VvNav/VvNav.vue +0 -44
- package/src/components/VvNav/VvNavItem.vue +0 -18
- package/src/components/VvNav/VvNavSeparator.vue +0 -11
- package/src/components/VvNav/index.ts +0 -8
- package/src/components/VvProgress/VvProgress.vue +0 -34
- package/src/components/VvProgress/index.ts +0 -32
- package/src/components/VvRadio/VvRadio.vue +0 -124
- package/src/components/VvRadio/index.ts +0 -46
- package/src/components/VvRadioGroup/VvRadioGroup.vue +0 -103
- package/src/components/VvRadioGroup/index.ts +0 -5
- package/src/components/VvSelect/VvSelect.vue +0 -247
- package/src/components/VvSelect/index.ts +0 -69
- package/src/components/VvTab/VvTab.vue +0 -77
- package/src/components/VvTab/index.ts +0 -19
- package/src/components/VvTextarea/VvTextarea.vue +0 -225
- package/src/components/VvTextarea/index.ts +0 -50
- package/src/components/VvTooltip/VvTooltip.vue +0 -23
- package/src/components/VvTooltip/index.ts +0 -18
- package/src/components/common/HintSlot.ts +0 -175
- package/src/components/index.ts +0 -24
- package/src/composables/alert/useAlert.ts +0 -103
- package/src/composables/alert/useInjectAlert.ts +0 -8
- package/src/composables/alert/useProvideAlert.ts +0 -23
- package/src/composables/dropdown/useInjectDropdown.ts +0 -26
- package/src/composables/dropdown/useProvideDropdown.ts +0 -94
- package/src/composables/group/useInjectedGroupState.ts +0 -51
- package/src/composables/group/useProvideGroupState.ts +0 -20
- package/src/composables/index.ts +0 -1
- package/src/composables/useComponentFocus.ts +0 -16
- package/src/composables/useComponentIcon.ts +0 -41
- package/src/composables/useDebouncedInput.ts +0 -32
- package/src/composables/useDefaults.ts +0 -89
- package/src/composables/useModifiers.ts +0 -36
- package/src/composables/useOptions.ts +0 -47
- package/src/composables/useTextCount.ts +0 -57
- package/src/composables/useUniqueId.ts +0 -5
- package/src/composables/useVolver.ts +0 -5
- package/src/constants.ts +0 -138
- package/src/directives/index.ts +0 -7
- package/src/directives/v-contextmenu.ts +0 -40
- package/src/directives/v-tooltip.ts +0 -15
- package/src/icons.ts +0 -7
- package/src/index.ts +0 -12
- package/src/props/index.ts +0 -479
- package/src/resolvers/unplugin.ts +0 -169
- package/src/shims.d.ts +0 -13
- package/src/stories/Accordion/Accordion.settings.ts +0 -57
- package/src/stories/Accordion/Accordion.stories.ts +0 -45
- package/src/stories/Accordion/Accordion.test.ts +0 -67
- package/src/stories/Accordion/AccordionSlots.stories.ts +0 -29
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +0 -77
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +0 -62
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +0 -56
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +0 -53
- package/src/stories/Alert/Alert.settings.ts +0 -122
- package/src/stories/Alert/Alert.stories.ts +0 -60
- package/src/stories/Alert/Alert.test.ts +0 -99
- package/src/stories/Alert/AlertModifiers.stories.ts +0 -77
- package/src/stories/Alert/AlertSlots.stories.ts +0 -74
- package/src/stories/AlertGroup/AlertGroup.settings.ts +0 -110
- package/src/stories/AlertGroup/AlertGroup.stories.ts +0 -50
- package/src/stories/AlertGroup/AlertGroup.test.ts +0 -89
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +0 -103
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +0 -67
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +0 -118
- package/src/stories/Avatar/Avatar.settings.ts +0 -37
- package/src/stories/Avatar/Avatar.stories.ts +0 -42
- package/src/stories/Avatar/Avatar.test.ts +0 -34
- package/src/stories/Avatar/AvatarBadge.stories.ts +0 -36
- package/src/stories/Avatar/AvatarModifiers.stories.ts +0 -100
- package/src/stories/Avatar/AvatarSlots.stories.ts +0 -34
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +0 -60
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +0 -35
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +0 -36
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +0 -31
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +0 -39
- package/src/stories/Badge/Badge.settings.ts +0 -26
- package/src/stories/Badge/Badge.stories.ts +0 -43
- package/src/stories/Badge/Badge.test.ts +0 -12
- package/src/stories/Badge/BadgeSlots.stories.ts +0 -23
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +0 -40
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +0 -41
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +0 -52
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +0 -37
- package/src/stories/Button/Button.settings.ts +0 -159
- package/src/stories/Button/Button.stories.ts +0 -38
- package/src/stories/Button/Button.test.ts +0 -48
- package/src/stories/Button/ButtonIcon.stories.ts +0 -67
- package/src/stories/Button/ButtonLink.stories.ts +0 -40
- package/src/stories/Button/ButtonLoading.stories.ts +0 -41
- package/src/stories/Button/ButtonModifiers.stories.ts +0 -148
- package/src/stories/Button/ButtonSlots.stories.ts +0 -87
- package/src/stories/Button/ButtonState.stories.ts +0 -42
- package/src/stories/Button/ButtonToggle.stories.ts +0 -52
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +0 -32
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +0 -39
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +0 -35
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +0 -39
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +0 -38
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +0 -41
- package/src/stories/Card/Card.settings.ts +0 -55
- package/src/stories/Card/Card.stories.ts +0 -46
- package/src/stories/Card/Card.test.ts +0 -23
- package/src/stories/Card/CardSlots.stories.ts +0 -81
- package/src/stories/Checkbox/Checkbox.settings.ts +0 -41
- package/src/stories/Checkbox/Checkbox.stories.ts +0 -97
- package/src/stories/Checkbox/Checkbox.test.ts +0 -81
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +0 -33
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +0 -31
- package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +0 -15
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +0 -87
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +0 -83
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +0 -53
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +0 -47
- package/src/stories/Combobox/Combobox.settings.ts +0 -403
- package/src/stories/Combobox/Combobox.stories.ts +0 -176
- package/src/stories/Combobox/Combobox.test.ts +0 -110
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +0 -43
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +0 -41
- package/src/stories/Combobox/ComboboxOptions.stories.ts +0 -114
- package/src/stories/Combobox/ComboboxSlots.stories.ts +0 -104
- package/src/stories/Dialog/Dialog.settings.ts +0 -45
- package/src/stories/Dialog/Dialog.stories.ts +0 -51
- package/src/stories/Dialog/Dialog.test.ts +0 -69
- package/src/stories/Dialog/DialogSlots.stories.ts +0 -39
- package/src/stories/Dropdown/Dropdown.settings.ts +0 -69
- package/src/stories/Dropdown/Dropdown.stories.ts +0 -107
- package/src/stories/Dropdown/Dropdown.test.ts +0 -21
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +0 -49
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +0 -61
- package/src/stories/Dropdown/DropdownSlots.stories.ts +0 -95
- package/src/stories/Icon/Icon.settings.ts +0 -72
- package/src/stories/Icon/Icon.stories.ts +0 -48
- package/src/stories/Icon/IconsCollection.stories.ts +0 -53
- package/src/stories/InputText/InputText.settings.ts +0 -259
- package/src/stories/InputText/InputText.stories.ts +0 -113
- package/src/stories/InputText/InputText.test.ts +0 -144
- package/src/stories/InputText/InputTextIconPosition.stories.ts +0 -43
- package/src/stories/InputText/InputTextLength.stories.ts +0 -58
- package/src/stories/InputText/InputTextMask.stories.ts +0 -122
- package/src/stories/InputText/InputTextMinMax.stories.ts +0 -51
- package/src/stories/InputText/InputTextSlots.stories.ts +0 -39
- package/src/stories/InputText/InputTextType.stories.ts +0 -119
- package/src/stories/Nav/Nav.settings.ts +0 -35
- package/src/stories/Nav/Nav.stories.ts +0 -33
- package/src/stories/Nav/Nav.test.ts +0 -21
- package/src/stories/Nav/NavModifiers.stories.ts +0 -47
- package/src/stories/Progress/Progress.settings.ts +0 -30
- package/src/stories/Progress/Progress.stories.ts +0 -41
- package/src/stories/Progress/Progress.test.ts +0 -9
- package/src/stories/Radio/Radio.settings.ts +0 -15
- package/src/stories/Radio/Radio.stories.ts +0 -81
- package/src/stories/Radio/Radio.test.ts +0 -70
- package/src/stories/Radio/RadioSlots.stories.ts +0 -31
- package/src/stories/RadioGroup/RadioGroup.settings.ts +0 -15
- package/src/stories/RadioGroup/RadioGroup.stories.ts +0 -88
- package/src/stories/RadioGroup/RadioGroup.test.ts +0 -83
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +0 -53
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +0 -47
- package/src/stories/Select/Select.settings.ts +0 -80
- package/src/stories/Select/Select.stories.ts +0 -113
- package/src/stories/Select/Select.test.ts +0 -85
- package/src/stories/Select/SelectIconPosition.stories.ts +0 -43
- package/src/stories/Select/SelectOptions.stories.ts +0 -77
- package/src/stories/Select/SelectSlots.stories.ts +0 -39
- package/src/stories/Tab/Tab.settings.ts +0 -41
- package/src/stories/Tab/Tab.stories.ts +0 -70
- package/src/stories/Tab/Tab.test.ts +0 -29
- package/src/stories/Textarea/Textarea.settings.ts +0 -88
- package/src/stories/Textarea/Textarea.stories.ts +0 -107
- package/src/stories/Textarea/Textarea.test.ts +0 -90
- package/src/stories/Textarea/TextareaLength.stories.ts +0 -58
- package/src/stories/Textarea/TextareaSlots.stories.ts +0 -39
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +0 -43
- package/src/stories/Tooltip/Tooltip.settings.ts +0 -25
- package/src/stories/Tooltip/Tooltip.stories.ts +0 -40
- package/src/stories/Tooltip/Tooltip.test.ts +0 -60
- package/src/stories/Tooltip/TooltipDirective.stories.ts +0 -68
- package/src/stories/argTypes.ts +0 -562
- package/src/test/expect.ts +0 -88
- package/src/test/options.ts +0 -17
- package/src/test/sleep.ts +0 -2
- package/src/test/types.d.ts +0 -17
- package/src/types/alert.ts +0 -20
- package/src/types/floating-ui.ts +0 -7
- package/src/types/generic.ts +0 -5
- package/src/types/group.ts +0 -44
- package/src/types/index.ts +0 -5
- package/src/types/nav.ts +0 -19
- package/src/utils/ObjectUtilities.ts +0 -288
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { computed, isRef, defineComponent, h, inject, unref, mergeDefaults, ref, toRefs, createBlock, createCommentVNode, openBlock, mergeProps, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, toRef, getCurrentInstance, watch, resolveComponent, resolveDynamicComponent, withCtx, useId, useAttrs, useSlots, Fragment, provide, onMounted, nextTick, createVNode, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, vShow, renderList, vModelSelect, createSlots, withModifiers, vModelText } from "vue";
|
|
2
|
+
import { iconLoaded, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
|
|
4
|
-
import {
|
|
5
|
-
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
4
|
+
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
6
5
|
import mitt from "mitt";
|
|
7
6
|
import { get } from "ts-dot-prop";
|
|
7
|
+
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
8
|
+
StorageType2["local"] = "local";
|
|
9
|
+
StorageType2["session"] = "session";
|
|
10
|
+
return StorageType2;
|
|
11
|
+
})(StorageType || {});
|
|
8
12
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
9
13
|
Strategy2["absolute"] = "absolute";
|
|
10
14
|
Strategy2["fixed"] = "fixed";
|
|
@@ -62,15 +66,10 @@ var DropdownItemRole = /* @__PURE__ */ ((DropdownItemRole2) => {
|
|
|
62
66
|
DropdownItemRole2["presentation"] = "presentation";
|
|
63
67
|
return DropdownItemRole2;
|
|
64
68
|
})(DropdownItemRole || {});
|
|
65
|
-
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
66
|
-
AnchorTarget2["_blank"] = "_blank";
|
|
67
|
-
AnchorTarget2["_self"] = "_self";
|
|
68
|
-
AnchorTarget2["_parent"] = "_parent";
|
|
69
|
-
AnchorTarget2["_top"] = "_top";
|
|
70
|
-
return AnchorTarget2;
|
|
71
|
-
})(AnchorTarget || {});
|
|
72
69
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
73
|
-
const INJECTION_KEY_BUTTON_GROUP = Symbol.for(
|
|
70
|
+
const INJECTION_KEY_BUTTON_GROUP = Symbol.for(
|
|
71
|
+
"buttonGroup"
|
|
72
|
+
);
|
|
74
73
|
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
75
74
|
"dropdownTrigger"
|
|
76
75
|
);
|
|
@@ -95,10 +94,7 @@ const LinkProps = {
|
|
|
95
94
|
/**
|
|
96
95
|
* Anchor target
|
|
97
96
|
*/
|
|
98
|
-
target:
|
|
99
|
-
type: String,
|
|
100
|
-
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
101
|
-
},
|
|
97
|
+
target: String,
|
|
102
98
|
/**
|
|
103
99
|
* Anchor rel
|
|
104
100
|
*/
|
|
@@ -111,27 +107,33 @@ const ValidProps = {
|
|
|
111
107
|
/**
|
|
112
108
|
* Valid status
|
|
113
109
|
*/
|
|
114
|
-
valid: Boolean,
|
|
110
|
+
valid: { type: Boolean, default: false },
|
|
115
111
|
/**
|
|
116
112
|
* Valid label
|
|
117
113
|
*/
|
|
118
|
-
validLabel: [String, Array]
|
|
114
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
119
115
|
};
|
|
120
116
|
const InvalidProps = {
|
|
121
117
|
/**
|
|
122
118
|
* Invalid status
|
|
123
119
|
*/
|
|
124
|
-
invalid:
|
|
120
|
+
invalid: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false
|
|
123
|
+
},
|
|
125
124
|
/**
|
|
126
125
|
* Invalid label
|
|
127
126
|
*/
|
|
128
|
-
invalidLabel: [String, Array]
|
|
127
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
129
128
|
};
|
|
130
129
|
const LoadingProps = {
|
|
131
130
|
/**
|
|
132
131
|
* Loading status
|
|
133
132
|
*/
|
|
134
|
-
loading:
|
|
133
|
+
loading: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false
|
|
136
|
+
},
|
|
135
137
|
/**
|
|
136
138
|
* Loading label
|
|
137
139
|
*/
|
|
@@ -144,49 +146,82 @@ const DisabledProps = {
|
|
|
144
146
|
/**
|
|
145
147
|
* Whether the form control is disabled
|
|
146
148
|
*/
|
|
147
|
-
disabled:
|
|
149
|
+
disabled: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: false
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const RequiredProps = {
|
|
155
|
+
/**
|
|
156
|
+
* Whether the form control is required
|
|
157
|
+
*/
|
|
158
|
+
required: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: false
|
|
161
|
+
}
|
|
148
162
|
};
|
|
149
163
|
const SelectedProps = {
|
|
150
164
|
/**
|
|
151
165
|
* Whether the item is selected
|
|
152
166
|
*/
|
|
153
|
-
selected:
|
|
167
|
+
selected: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: false
|
|
170
|
+
}
|
|
154
171
|
};
|
|
155
172
|
const ActiveProps = {
|
|
156
173
|
/**
|
|
157
174
|
* Whether the item is active
|
|
158
175
|
*/
|
|
159
|
-
active:
|
|
176
|
+
active: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: false
|
|
179
|
+
}
|
|
160
180
|
};
|
|
161
181
|
const CurrentProps = {
|
|
162
182
|
/**
|
|
163
183
|
* Whether the item is current
|
|
164
184
|
*/
|
|
165
|
-
current:
|
|
185
|
+
current: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: false
|
|
188
|
+
}
|
|
166
189
|
};
|
|
167
190
|
const PressedProps = {
|
|
168
191
|
/**
|
|
169
192
|
* Whether the item is pressed
|
|
170
193
|
*/
|
|
171
|
-
pressed:
|
|
194
|
+
pressed: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: false
|
|
197
|
+
}
|
|
172
198
|
};
|
|
173
199
|
const LabelProps = {
|
|
174
200
|
/**
|
|
175
201
|
* The item label
|
|
176
202
|
*/
|
|
177
|
-
label:
|
|
203
|
+
label: {
|
|
204
|
+
type: [String, Number],
|
|
205
|
+
default: void 0
|
|
206
|
+
}
|
|
178
207
|
};
|
|
179
208
|
const ReadonlyProps = {
|
|
180
209
|
/**
|
|
181
210
|
* The value is not editable
|
|
182
211
|
*/
|
|
183
|
-
readonly:
|
|
212
|
+
readonly: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: false
|
|
215
|
+
}
|
|
184
216
|
};
|
|
185
217
|
const ModifiersProps = {
|
|
186
218
|
/**
|
|
187
219
|
* Component BEM modifiers
|
|
188
220
|
*/
|
|
189
|
-
modifiers:
|
|
221
|
+
modifiers: {
|
|
222
|
+
type: [String, Array],
|
|
223
|
+
default: void 0
|
|
224
|
+
}
|
|
190
225
|
};
|
|
191
226
|
const HintProps = {
|
|
192
227
|
hintLabel: { type: String, default: "" }
|
|
@@ -215,9 +250,12 @@ const OptionsProps = {
|
|
|
215
250
|
const IconProps = {
|
|
216
251
|
/**
|
|
217
252
|
* VvIcon name or props
|
|
218
|
-
* @see
|
|
253
|
+
* @see VvIcon
|
|
219
254
|
*/
|
|
220
|
-
icon: {
|
|
255
|
+
icon: {
|
|
256
|
+
type: [String, Object],
|
|
257
|
+
default: void 0
|
|
258
|
+
},
|
|
221
259
|
/**
|
|
222
260
|
* VvIcon position
|
|
223
261
|
*/
|
|
@@ -238,7 +276,10 @@ const FloatingLabelProps = {
|
|
|
238
276
|
/**
|
|
239
277
|
* If true the label will be floating
|
|
240
278
|
*/
|
|
241
|
-
floating:
|
|
279
|
+
floating: {
|
|
280
|
+
type: Boolean,
|
|
281
|
+
default: false
|
|
282
|
+
}
|
|
242
283
|
};
|
|
243
284
|
const UnselectableProps = {
|
|
244
285
|
/**
|
|
@@ -274,7 +315,8 @@ const DropdownProps = {
|
|
|
274
315
|
* Dropdown show / hide transition name
|
|
275
316
|
*/
|
|
276
317
|
transitionName: {
|
|
277
|
-
type: String
|
|
318
|
+
type: String,
|
|
319
|
+
default: void 0
|
|
278
320
|
},
|
|
279
321
|
/**
|
|
280
322
|
* Offset of the dropdown from the trigger
|
|
@@ -342,7 +384,8 @@ const DropdownProps = {
|
|
|
342
384
|
* Set dropdown width to the same as the trigger
|
|
343
385
|
*/
|
|
344
386
|
triggerWidth: {
|
|
345
|
-
type: Boolean
|
|
387
|
+
type: Boolean,
|
|
388
|
+
default: false
|
|
346
389
|
}
|
|
347
390
|
};
|
|
348
391
|
const IdNameProps = {
|
|
@@ -359,7 +402,10 @@ const AutofocusProps = {
|
|
|
359
402
|
* Global attribute autofocus
|
|
360
403
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
361
404
|
*/
|
|
362
|
-
autofocus:
|
|
405
|
+
autofocus: {
|
|
406
|
+
type: Boolean,
|
|
407
|
+
default: false
|
|
408
|
+
}
|
|
363
409
|
};
|
|
364
410
|
const AutocompleteProps = {
|
|
365
411
|
/**
|
|
@@ -389,18 +435,27 @@ const ActionProps = {
|
|
|
389
435
|
ariaLabel: {
|
|
390
436
|
type: String,
|
|
391
437
|
default: void 0
|
|
392
|
-
}
|
|
393
|
-
};
|
|
394
|
-
const VvComboboxEvents = [
|
|
395
|
-
"update:modelValue",
|
|
396
|
-
"update:search",
|
|
438
|
+
},
|
|
397
439
|
/**
|
|
398
|
-
*
|
|
440
|
+
* Default tag for the action
|
|
399
441
|
*/
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
442
|
+
defaultTag: {
|
|
443
|
+
type: String,
|
|
444
|
+
default: ActionTag.button
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
({
|
|
448
|
+
storageType: {
|
|
449
|
+
default: StorageType.local
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
const ACTION_ICONS = {
|
|
453
|
+
clear: "close"
|
|
454
|
+
};
|
|
455
|
+
const VvIconPropsDefaults = {
|
|
456
|
+
prefix: "normal"
|
|
457
|
+
/* normal */
|
|
458
|
+
};
|
|
404
459
|
const VvComboboxProps = {
|
|
405
460
|
...IdNameProps,
|
|
406
461
|
...TabindexProps,
|
|
@@ -414,9 +469,9 @@ const VvComboboxProps = {
|
|
|
414
469
|
...OptionsProps,
|
|
415
470
|
...IconProps,
|
|
416
471
|
...FloatingLabelProps,
|
|
417
|
-
...UnselectableProps,
|
|
418
472
|
...DropdownProps,
|
|
419
473
|
...LabelProps,
|
|
474
|
+
...RequiredProps,
|
|
420
475
|
/**
|
|
421
476
|
* Dropdown show / hide transition name
|
|
422
477
|
*/
|
|
@@ -492,10 +547,22 @@ const VvComboboxProps = {
|
|
|
492
547
|
* Manage modelValue as string[] or object[]
|
|
493
548
|
*/
|
|
494
549
|
multiple: Boolean,
|
|
550
|
+
/**
|
|
551
|
+
* The min number of selected values
|
|
552
|
+
*/
|
|
553
|
+
minValues: {
|
|
554
|
+
type: [Number, String],
|
|
555
|
+
default: 0
|
|
556
|
+
},
|
|
495
557
|
/**
|
|
496
558
|
* The max number of selected values
|
|
497
559
|
*/
|
|
498
560
|
maxValues: [Number, String],
|
|
561
|
+
/**
|
|
562
|
+
* If true the input will be unselectable
|
|
563
|
+
* @deprecated use minValues instead
|
|
564
|
+
*/
|
|
565
|
+
unselectable: { type: Boolean, default: true },
|
|
499
566
|
/**
|
|
500
567
|
* The select label separator visible to the user
|
|
501
568
|
*/
|
|
@@ -537,209 +604,356 @@ const VvComboboxProps = {
|
|
|
537
604
|
default: false
|
|
538
605
|
},
|
|
539
606
|
/**
|
|
540
|
-
*
|
|
607
|
+
* Select first option automatically
|
|
541
608
|
*/
|
|
542
|
-
|
|
609
|
+
autoselectFirst: {
|
|
543
610
|
type: Boolean,
|
|
544
611
|
default: false
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
const VvIconProps = {
|
|
548
|
-
/**
|
|
549
|
-
* Color
|
|
550
|
-
*/
|
|
551
|
-
color: String,
|
|
552
|
-
/**
|
|
553
|
-
* Width
|
|
554
|
-
*/
|
|
555
|
-
width: {
|
|
556
|
-
type: [String, Number]
|
|
557
612
|
},
|
|
558
613
|
/**
|
|
559
|
-
*
|
|
614
|
+
* Keep open dropdown on single select
|
|
560
615
|
*/
|
|
561
|
-
|
|
562
|
-
type:
|
|
616
|
+
keepOpen: {
|
|
617
|
+
type: Boolean,
|
|
618
|
+
default: false
|
|
563
619
|
},
|
|
564
620
|
/**
|
|
565
|
-
*
|
|
566
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
567
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
621
|
+
* Focus on hover option (this prop remove the focus from the input search)
|
|
568
622
|
*/
|
|
569
|
-
|
|
570
|
-
type:
|
|
571
|
-
|
|
623
|
+
focusOnHover: {
|
|
624
|
+
type: Boolean,
|
|
625
|
+
default: true
|
|
572
626
|
},
|
|
573
627
|
/**
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
628
|
+
* VvIcon name for clear button
|
|
629
|
+
* @see VvIcon
|
|
577
630
|
*/
|
|
578
|
-
|
|
579
|
-
type: String
|
|
631
|
+
iconClear: {
|
|
632
|
+
type: [String, Object],
|
|
633
|
+
default: ACTION_ICONS.clear
|
|
580
634
|
},
|
|
581
635
|
/**
|
|
582
|
-
*
|
|
583
|
-
* Icon default options prefix: simple | normal | detailed
|
|
636
|
+
* Label for clear button
|
|
584
637
|
*/
|
|
585
|
-
|
|
638
|
+
labelClear: {
|
|
586
639
|
type: String,
|
|
587
|
-
default: "
|
|
588
|
-
},
|
|
589
|
-
/**
|
|
590
|
-
* Url remote SVG icon
|
|
591
|
-
*/
|
|
592
|
-
src: String,
|
|
593
|
-
/**
|
|
594
|
-
* Horizontal flip
|
|
595
|
-
*/
|
|
596
|
-
horizontalFlip: Boolean,
|
|
597
|
-
/**
|
|
598
|
-
* Vertical flip
|
|
599
|
-
*/
|
|
600
|
-
verticalFlip: Boolean,
|
|
601
|
-
/**
|
|
602
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
603
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
604
|
-
*/
|
|
605
|
-
flip: String,
|
|
606
|
-
/**
|
|
607
|
-
* Icon render mode
|
|
608
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
609
|
-
* 'bg' = span with style using `background`
|
|
610
|
-
* 'mask' = span with style using `mask`
|
|
611
|
-
* 'svg' = svg
|
|
612
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
613
|
-
*/
|
|
614
|
-
mode: String,
|
|
615
|
-
/**
|
|
616
|
-
* Toggles inline or block mode
|
|
617
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
618
|
-
*/
|
|
619
|
-
inline: Boolean,
|
|
620
|
-
/**
|
|
621
|
-
* rotates icon
|
|
622
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
623
|
-
*/
|
|
624
|
-
rotate: [Number, String],
|
|
625
|
-
/**
|
|
626
|
-
* A callback that is called when icon data has been loaded
|
|
627
|
-
*/
|
|
628
|
-
onLoad: Function,
|
|
629
|
-
/**
|
|
630
|
-
* SVG icon string
|
|
631
|
-
*/
|
|
632
|
-
svg: String,
|
|
633
|
-
/**
|
|
634
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
635
|
-
* @values string | string[]
|
|
636
|
-
*/
|
|
637
|
-
modifiers: {
|
|
638
|
-
type: [String, Array]
|
|
640
|
+
default: "Clear"
|
|
639
641
|
}
|
|
640
642
|
};
|
|
641
|
-
function
|
|
642
|
-
return
|
|
643
|
+
function useVvComboboxProps() {
|
|
644
|
+
return {
|
|
645
|
+
...VvComboboxProps,
|
|
646
|
+
options: {
|
|
647
|
+
...VvComboboxProps.options,
|
|
648
|
+
type: Array
|
|
649
|
+
},
|
|
650
|
+
searchFunction: {
|
|
651
|
+
...VvComboboxProps.searchFunction,
|
|
652
|
+
type: Function
|
|
653
|
+
}
|
|
654
|
+
};
|
|
643
655
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
656
|
+
function equals(obj1, obj2, field) {
|
|
657
|
+
return deepEquals(obj1, obj2);
|
|
658
|
+
}
|
|
659
|
+
function deepEquals(a, b) {
|
|
660
|
+
if (a === b)
|
|
661
|
+
return true;
|
|
662
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
663
|
+
const arrA = Array.isArray(a);
|
|
664
|
+
const arrB = Array.isArray(b);
|
|
665
|
+
let i, length, key;
|
|
666
|
+
if (arrA && arrB) {
|
|
667
|
+
length = a.length;
|
|
668
|
+
if (length !== b.length)
|
|
669
|
+
return false;
|
|
670
|
+
for (i = length; i-- !== 0; ) {
|
|
671
|
+
if (!deepEquals(a[i], b[i]))
|
|
672
|
+
return false;
|
|
657
673
|
}
|
|
674
|
+
return true;
|
|
658
675
|
}
|
|
659
|
-
if (
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
676
|
+
if (arrA !== arrB)
|
|
677
|
+
return false;
|
|
678
|
+
const dateA = a instanceof Date;
|
|
679
|
+
const dateB = b instanceof Date;
|
|
680
|
+
if (dateA !== dateB)
|
|
681
|
+
return false;
|
|
682
|
+
if (dateA && dateB)
|
|
683
|
+
return a.getTime() === b.getTime();
|
|
684
|
+
const regexpA = a instanceof RegExp;
|
|
685
|
+
const regexpB = b instanceof RegExp;
|
|
686
|
+
if (regexpA !== regexpB)
|
|
687
|
+
return false;
|
|
688
|
+
if (regexpA && regexpB)
|
|
689
|
+
return a.toString() === b.toString();
|
|
690
|
+
const keys = Object.keys(a);
|
|
691
|
+
length = keys.length;
|
|
692
|
+
if (length !== Object.keys(b).length)
|
|
693
|
+
return false;
|
|
694
|
+
for (i = length; i-- !== 0; ) {
|
|
695
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
696
|
+
return false;
|
|
663
697
|
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
name: "VvIcon"
|
|
669
|
-
};
|
|
670
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
671
|
-
...__default__$9,
|
|
672
|
-
props: VvIconProps,
|
|
673
|
-
setup(__props) {
|
|
674
|
-
const props = __props;
|
|
675
|
-
const hasRotate = computed(() => {
|
|
676
|
-
if (typeof props.rotate === "string") {
|
|
677
|
-
return parseFloat(props.rotate);
|
|
678
|
-
}
|
|
679
|
-
return props.rotate;
|
|
680
|
-
});
|
|
681
|
-
const show = ref(true);
|
|
682
|
-
const volver = useVolver();
|
|
683
|
-
const { modifiers } = toRefs(props);
|
|
684
|
-
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
685
|
-
const provider = computed(() => {
|
|
686
|
-
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
687
|
-
});
|
|
688
|
-
const icon = computed(() => {
|
|
689
|
-
const name = props.name ?? "";
|
|
690
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
691
|
-
if (iconExists(iconName)) {
|
|
692
|
-
return iconName;
|
|
693
|
-
}
|
|
694
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
695
|
-
(iconsCollection2) => {
|
|
696
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
697
|
-
return iconExists(icon2);
|
|
698
|
-
}
|
|
699
|
-
);
|
|
700
|
-
if (iconsCollection) {
|
|
701
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
702
|
-
}
|
|
703
|
-
return name;
|
|
704
|
-
});
|
|
705
|
-
function getSvgContent(svg) {
|
|
706
|
-
let dom;
|
|
707
|
-
if (typeof window === "undefined") {
|
|
708
|
-
const { JSDOM } = require("jsdom");
|
|
709
|
-
dom = new JSDOM().window;
|
|
710
|
-
}
|
|
711
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
712
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
713
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
714
|
-
return svgEl;
|
|
698
|
+
for (i = length; i-- !== 0; ) {
|
|
699
|
+
key = keys[i];
|
|
700
|
+
if (!deepEquals(a[key], b[key]))
|
|
701
|
+
return false;
|
|
715
702
|
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
});
|
|
703
|
+
return true;
|
|
704
|
+
}
|
|
705
|
+
return Number.isNaN(a) && Number.isNaN(b);
|
|
706
|
+
}
|
|
707
|
+
function contains(value, list) {
|
|
708
|
+
if (value != null && list && list.length) {
|
|
709
|
+
for (const val of list) {
|
|
710
|
+
if (equals(value, val)) {
|
|
711
|
+
return true;
|
|
726
712
|
}
|
|
727
713
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
714
|
+
}
|
|
715
|
+
return false;
|
|
716
|
+
}
|
|
717
|
+
function isString(value) {
|
|
718
|
+
return typeof value === "string";
|
|
719
|
+
}
|
|
720
|
+
function joinLines(items) {
|
|
721
|
+
if (Array.isArray(items)) {
|
|
722
|
+
return items.filter((item) => isString(item)).join(" ");
|
|
723
|
+
}
|
|
724
|
+
return items;
|
|
725
|
+
}
|
|
726
|
+
function HintSlotFactory(propsOrRef, slots) {
|
|
727
|
+
const props = computed(() => {
|
|
728
|
+
if (isRef(propsOrRef)) {
|
|
729
|
+
return propsOrRef.value;
|
|
740
730
|
}
|
|
741
|
-
|
|
742
|
-
|
|
731
|
+
return propsOrRef;
|
|
732
|
+
});
|
|
733
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
734
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
735
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
736
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
737
|
+
const hasLoadingLabelOrSlot = computed(
|
|
738
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
739
|
+
);
|
|
740
|
+
const hasInvalidLabelOrSlot = computed(
|
|
741
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
742
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
743
|
+
)
|
|
744
|
+
);
|
|
745
|
+
const hasValidLabelOrSlot = computed(
|
|
746
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
747
|
+
);
|
|
748
|
+
const hasHintLabelOrSlot = computed(
|
|
749
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
750
|
+
);
|
|
751
|
+
const isVisible = computed(
|
|
752
|
+
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
753
|
+
);
|
|
754
|
+
const hintSlotScope = computed(() => ({
|
|
755
|
+
modelValue: props.value.modelValue,
|
|
756
|
+
valid: props.value.valid,
|
|
757
|
+
invalid: props.value.invalid,
|
|
758
|
+
loading: props.value.loading
|
|
759
|
+
}));
|
|
760
|
+
const HintSlot = defineComponent({
|
|
761
|
+
name: "HintSlot",
|
|
762
|
+
props: {
|
|
763
|
+
tag: {
|
|
764
|
+
type: String,
|
|
765
|
+
default: "small"
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
setup() {
|
|
769
|
+
return {
|
|
770
|
+
isVisible,
|
|
771
|
+
invalidLabel,
|
|
772
|
+
validLabel,
|
|
773
|
+
loadingLabel,
|
|
774
|
+
hintLabel,
|
|
775
|
+
hasInvalidLabelOrSlot,
|
|
776
|
+
hasValidLabelOrSlot,
|
|
777
|
+
hasLoadingLabelOrSlot,
|
|
778
|
+
hasHintLabelOrSlot
|
|
779
|
+
};
|
|
780
|
+
},
|
|
781
|
+
render() {
|
|
782
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
783
|
+
if (this.isVisible) {
|
|
784
|
+
let role;
|
|
785
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
786
|
+
role = "alert";
|
|
787
|
+
}
|
|
788
|
+
if (this.hasValidLabelOrSlot) {
|
|
789
|
+
role = "status";
|
|
790
|
+
}
|
|
791
|
+
if (this.hasLoadingLabelOrSlot) {
|
|
792
|
+
return h(
|
|
793
|
+
this.tag,
|
|
794
|
+
{
|
|
795
|
+
role
|
|
796
|
+
},
|
|
797
|
+
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
801
|
+
return h(
|
|
802
|
+
this.tag,
|
|
803
|
+
{
|
|
804
|
+
role
|
|
805
|
+
},
|
|
806
|
+
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
if (this.hasValidLabelOrSlot) {
|
|
810
|
+
return h(
|
|
811
|
+
this.tag,
|
|
812
|
+
{
|
|
813
|
+
role
|
|
814
|
+
},
|
|
815
|
+
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
return h(
|
|
819
|
+
this.tag,
|
|
820
|
+
{
|
|
821
|
+
role
|
|
822
|
+
},
|
|
823
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
return null;
|
|
827
|
+
}
|
|
828
|
+
});
|
|
829
|
+
return {
|
|
830
|
+
hasInvalidLabelOrSlot,
|
|
831
|
+
hasHintLabelOrSlot,
|
|
832
|
+
hasValidLabelOrSlot,
|
|
833
|
+
hasLoadingLabelOrSlot,
|
|
834
|
+
hintSlotScope,
|
|
835
|
+
HintSlot
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
function useVolver() {
|
|
839
|
+
return inject(INJECTION_KEY_VOLVER, void 0);
|
|
840
|
+
}
|
|
841
|
+
function useModifiers(prefix, modifiers, others) {
|
|
842
|
+
return computed(() => {
|
|
843
|
+
const toReturn = {
|
|
844
|
+
[prefix]: true
|
|
845
|
+
};
|
|
846
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
847
|
+
if (modifiersArray) {
|
|
848
|
+
if (Array.isArray(modifiersArray)) {
|
|
849
|
+
modifiersArray.forEach((modifier) => {
|
|
850
|
+
if (modifier) {
|
|
851
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
if (others) {
|
|
857
|
+
Object.keys(others.value).forEach((key) => {
|
|
858
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
return toReturn;
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
const __default__$9 = {
|
|
865
|
+
name: "VvIcon"
|
|
866
|
+
};
|
|
867
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
868
|
+
...__default__$9,
|
|
869
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
870
|
+
name: {},
|
|
871
|
+
color: {},
|
|
872
|
+
width: {},
|
|
873
|
+
height: {},
|
|
874
|
+
provider: {},
|
|
875
|
+
prefix: {},
|
|
876
|
+
src: {},
|
|
877
|
+
horizontalFlip: { type: Boolean },
|
|
878
|
+
verticalFlip: { type: Boolean },
|
|
879
|
+
flip: {},
|
|
880
|
+
mode: {},
|
|
881
|
+
inline: { type: Boolean },
|
|
882
|
+
rotate: {},
|
|
883
|
+
onLoad: { type: Function },
|
|
884
|
+
svg: {},
|
|
885
|
+
modifiers: {}
|
|
886
|
+
}, VvIconPropsDefaults),
|
|
887
|
+
setup(__props) {
|
|
888
|
+
const props = __props;
|
|
889
|
+
const hasRotate = computed(() => {
|
|
890
|
+
if (typeof props.rotate === "string") {
|
|
891
|
+
return Number.parseFloat(props.rotate);
|
|
892
|
+
}
|
|
893
|
+
return props.rotate;
|
|
894
|
+
});
|
|
895
|
+
const show = ref(true);
|
|
896
|
+
const volver = useVolver();
|
|
897
|
+
const { modifiers } = toRefs(props);
|
|
898
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
899
|
+
const provider = computed(() => {
|
|
900
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
901
|
+
});
|
|
902
|
+
const icon = computed(() => {
|
|
903
|
+
const name = props.name ?? "";
|
|
904
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
905
|
+
if (iconLoaded(iconName)) {
|
|
906
|
+
return iconName;
|
|
907
|
+
}
|
|
908
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
909
|
+
(iconsCollection2) => {
|
|
910
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
911
|
+
return iconLoaded(icon2);
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
if (iconsCollection) {
|
|
915
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
916
|
+
}
|
|
917
|
+
return name;
|
|
918
|
+
});
|
|
919
|
+
function getSvgContent(svg) {
|
|
920
|
+
let dom;
|
|
921
|
+
if (typeof window === "undefined") {
|
|
922
|
+
const { JSDOM } = require("jsdom");
|
|
923
|
+
dom = new JSDOM().window;
|
|
924
|
+
}
|
|
925
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
926
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
927
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
928
|
+
return svgEl;
|
|
929
|
+
}
|
|
930
|
+
function addIconFromSvg(svg) {
|
|
931
|
+
const svgContentEl = getSvgContent(svg);
|
|
932
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
933
|
+
if (svgContentEl && svgContent) {
|
|
934
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
935
|
+
body: svgContent,
|
|
936
|
+
// Set height and width from svg content
|
|
937
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
938
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
if (volver) {
|
|
943
|
+
if (props.src && !iconLoaded(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
944
|
+
show.value = false;
|
|
945
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
946
|
+
if (svg) {
|
|
947
|
+
addIconFromSvg(svg);
|
|
948
|
+
show.value = true;
|
|
949
|
+
}
|
|
950
|
+
}).catch((e) => {
|
|
951
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (props.svg) {
|
|
956
|
+
addIconFromSvg(props.svg);
|
|
743
957
|
}
|
|
744
958
|
return (_ctx, _cache) => {
|
|
745
959
|
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
@@ -754,496 +968,265 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
754
968
|
flip: _ctx.flip,
|
|
755
969
|
rotate: unref(hasRotate),
|
|
756
970
|
color: _ctx.color,
|
|
757
|
-
onLoad: _ctx.onLoad,
|
|
758
971
|
icon: unref(icon)
|
|
759
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
972
|
+
}, { onLoad: _ctx.onLoad }), null, 16, ["class", "onLoad"])) : createCommentVNode("v-if", true);
|
|
760
973
|
};
|
|
761
974
|
}
|
|
762
975
|
});
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* Show / hide dropdown programmatically
|
|
769
|
-
*/
|
|
770
|
-
modelValue: {
|
|
771
|
-
type: Boolean,
|
|
772
|
-
default: void 0
|
|
773
|
-
},
|
|
774
|
-
/**
|
|
775
|
-
* Dropdown trigger element
|
|
776
|
-
*/
|
|
777
|
-
reference: {
|
|
778
|
-
type: Object,
|
|
779
|
-
default: null
|
|
780
|
-
},
|
|
781
|
-
/**
|
|
782
|
-
* Dropdown role
|
|
783
|
-
*/
|
|
784
|
-
role: {
|
|
785
|
-
type: String,
|
|
786
|
-
default: DropdownRole.menu,
|
|
787
|
-
validator: (value) => Object.values(DropdownRole).includes(value)
|
|
788
|
-
}
|
|
789
|
-
};
|
|
790
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
791
|
-
function useProvideDropdownTrigger({
|
|
792
|
-
reference,
|
|
793
|
-
id,
|
|
794
|
-
expanded,
|
|
795
|
-
aria
|
|
796
|
-
}) {
|
|
797
|
-
const bus = mitt();
|
|
798
|
-
const component = defineComponent({
|
|
799
|
-
name: "VvDropdownTriggerProvider",
|
|
800
|
-
setup() {
|
|
801
|
-
provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
|
|
802
|
-
reference,
|
|
803
|
-
id,
|
|
804
|
-
expanded,
|
|
805
|
-
aria,
|
|
806
|
-
bus
|
|
807
|
-
});
|
|
808
|
-
},
|
|
809
|
-
render() {
|
|
810
|
-
var _a, _b;
|
|
811
|
-
return h(Fragment, {}, (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a));
|
|
976
|
+
function useComponentIcon(icon, iconPosition) {
|
|
977
|
+
const hasIcon = computed(() => {
|
|
978
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
979
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
812
980
|
}
|
|
981
|
+
return icon == null ? void 0 : icon.value;
|
|
813
982
|
});
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
component
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
function useProvideDropdownItem({
|
|
820
|
-
role,
|
|
821
|
-
expanded
|
|
822
|
-
}) {
|
|
823
|
-
const itemRole = computed(
|
|
824
|
-
() => role.value === DropdownRole.listbox ? DropdownItemRole.option : DropdownItemRole.presentation
|
|
983
|
+
const hasIconBefore = computed(
|
|
984
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
825
985
|
);
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
986
|
+
const hasIconAfter = computed(
|
|
987
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
988
|
+
);
|
|
989
|
+
const hasIconLeft = computed(
|
|
990
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
991
|
+
);
|
|
992
|
+
const hasIconRight = computed(
|
|
993
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
994
|
+
);
|
|
995
|
+
const hasIconTop = computed(
|
|
996
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
997
|
+
);
|
|
998
|
+
const hasIconBottom = computed(
|
|
999
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
1000
|
+
);
|
|
1001
|
+
return {
|
|
1002
|
+
hasIcon,
|
|
1003
|
+
hasIconLeft,
|
|
1004
|
+
hasIconRight,
|
|
1005
|
+
hasIconTop,
|
|
1006
|
+
hasIconBottom,
|
|
1007
|
+
hasIconBefore,
|
|
1008
|
+
hasIconAfter
|
|
1009
|
+
};
|
|
839
1010
|
}
|
|
840
|
-
const
|
|
1011
|
+
const VvInputClearAction = defineComponent({
|
|
1012
|
+
components: {
|
|
1013
|
+
VvIcon: _sfc_main$9
|
|
1014
|
+
},
|
|
1015
|
+
props: {
|
|
1016
|
+
inputType: {
|
|
1017
|
+
type: String,
|
|
1018
|
+
default: "input-text"
|
|
1019
|
+
},
|
|
1020
|
+
disabled: {
|
|
1021
|
+
type: Boolean,
|
|
1022
|
+
default: false
|
|
1023
|
+
},
|
|
1024
|
+
label: {
|
|
1025
|
+
type: String,
|
|
1026
|
+
default: "Clear"
|
|
1027
|
+
},
|
|
1028
|
+
icon: {
|
|
1029
|
+
type: [String, Object],
|
|
1030
|
+
default: "close"
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
emits: ["clear"],
|
|
1034
|
+
setup(props, { emit }) {
|
|
1035
|
+
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
1036
|
+
function onClick(e) {
|
|
1037
|
+
e == null ? void 0 : e.stopPropagation();
|
|
1038
|
+
if (!props.disabled) {
|
|
1039
|
+
emit("clear");
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return {
|
|
1043
|
+
hasIcon,
|
|
1044
|
+
onClick
|
|
1045
|
+
};
|
|
1046
|
+
},
|
|
1047
|
+
render() {
|
|
1048
|
+
const icon = this.hasIcon ? h(_sfc_main$9, {
|
|
1049
|
+
...this.hasIcon,
|
|
1050
|
+
class: `vv-${this.inputType}__icon`
|
|
1051
|
+
}) : void 0;
|
|
1052
|
+
return h(
|
|
1053
|
+
"button",
|
|
1054
|
+
{
|
|
1055
|
+
disabled: this.disabled,
|
|
1056
|
+
class: `vv-${this.inputType}__action`,
|
|
1057
|
+
ariaLabel: this.label,
|
|
1058
|
+
type: "button",
|
|
1059
|
+
onClick: this.onClick
|
|
1060
|
+
},
|
|
1061
|
+
icon
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
const VvBadgeProps = {
|
|
1066
|
+
...ModifiersProps,
|
|
1067
|
+
value: [String, Number]
|
|
1068
|
+
};
|
|
841
1069
|
const __default__$8 = {
|
|
842
|
-
name: "
|
|
843
|
-
inheritAttrs: false
|
|
1070
|
+
name: "VvBadge"
|
|
844
1071
|
};
|
|
845
1072
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
846
1073
|
...__default__$8,
|
|
847
|
-
props:
|
|
848
|
-
|
|
849
|
-
"update:modelValue",
|
|
850
|
-
"beforeExpand",
|
|
851
|
-
"beforeCollapse",
|
|
852
|
-
"afterExpand",
|
|
853
|
-
"afterCollapse",
|
|
854
|
-
"before-enter",
|
|
855
|
-
"after-leave",
|
|
856
|
-
"enter",
|
|
857
|
-
"after-enter",
|
|
858
|
-
"enter-cancelled",
|
|
859
|
-
"before-leave",
|
|
860
|
-
"leave",
|
|
861
|
-
"leave-cancelled"
|
|
862
|
-
],
|
|
863
|
-
setup(__props, { expose: __expose, emit }) {
|
|
1074
|
+
props: VvBadgeProps,
|
|
1075
|
+
setup(__props) {
|
|
864
1076
|
const props = __props;
|
|
865
|
-
const {
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
const localReferenceEl = ref(null);
|
|
871
|
-
const floatingEl = ref();
|
|
872
|
-
const arrowEl = ref(null);
|
|
873
|
-
const listEl = ref(null);
|
|
874
|
-
const referenceEl = computed({
|
|
875
|
-
get: () => props.reference ?? localReferenceEl.value,
|
|
876
|
-
set: (newValue) => {
|
|
877
|
-
localReferenceEl.value = newValue;
|
|
878
|
-
}
|
|
879
|
-
});
|
|
880
|
-
const hasCustomPosition = ref(false);
|
|
881
|
-
onMounted(() => {
|
|
882
|
-
useMutationObserver(
|
|
883
|
-
floatingEl.value,
|
|
884
|
-
() => {
|
|
885
|
-
var _a;
|
|
886
|
-
hasCustomPosition.value = ((_a = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")) == null ? void 0 : _a.trim()) === "true";
|
|
887
|
-
},
|
|
1077
|
+
const { modifiers } = toRefs(props);
|
|
1078
|
+
const bemCssClasses = useModifiers("vv-badge", modifiers);
|
|
1079
|
+
return (_ctx, _cache) => {
|
|
1080
|
+
return openBlock(), createElementBlock(
|
|
1081
|
+
"span",
|
|
888
1082
|
{
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
1083
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1084
|
+
},
|
|
1085
|
+
[
|
|
1086
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1087
|
+
createTextVNode(
|
|
1088
|
+
toDisplayString(_ctx.value),
|
|
1089
|
+
1
|
|
1090
|
+
/* TEXT */
|
|
1091
|
+
)
|
|
1092
|
+
])
|
|
1093
|
+
],
|
|
1094
|
+
2
|
|
1095
|
+
/* CLASS */
|
|
892
1096
|
);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
toReturn.push(flip(props.flip));
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
function useGroupStateInject(groupKey) {
|
|
1101
|
+
const group = inject(groupKey, void 0);
|
|
1102
|
+
const isInGroup = computed(() => group !== void 0);
|
|
1103
|
+
function getGroupOrLocalRef(propName, props, emit) {
|
|
1104
|
+
const groupPropValue = group == null ? void 0 : group[propName];
|
|
1105
|
+
if (groupPropValue) {
|
|
1106
|
+
return computed({
|
|
1107
|
+
get() {
|
|
1108
|
+
return groupPropValue.value;
|
|
1109
|
+
},
|
|
1110
|
+
set(value) {
|
|
1111
|
+
groupPropValue.value = value;
|
|
909
1112
|
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
const propRef = toRef(props, propName);
|
|
1116
|
+
return computed({
|
|
1117
|
+
get() {
|
|
1118
|
+
return propRef.value;
|
|
1119
|
+
},
|
|
1120
|
+
set(value) {
|
|
1121
|
+
if (emit) {
|
|
1122
|
+
emit(`update:${propName}`, value);
|
|
916
1123
|
}
|
|
917
1124
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
return {
|
|
1128
|
+
group,
|
|
1129
|
+
isInGroup,
|
|
1130
|
+
getGroupOrLocalRef
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
const VvButtonEvents = ["update:modelValue"];
|
|
1134
|
+
const VvButtonProps = {
|
|
1135
|
+
...ActionProps,
|
|
1136
|
+
...IdProps,
|
|
1137
|
+
...ModifiersProps,
|
|
1138
|
+
...UnselectableProps,
|
|
1139
|
+
...LoadingProps,
|
|
1140
|
+
...IconProps,
|
|
1141
|
+
/**
|
|
1142
|
+
* Button icon position
|
|
1143
|
+
*/
|
|
1144
|
+
iconPosition: {
|
|
1145
|
+
type: String,
|
|
1146
|
+
default: Side.left,
|
|
1147
|
+
validator: (value) => Object.values(Side).includes(value)
|
|
1148
|
+
},
|
|
1149
|
+
/**
|
|
1150
|
+
* Loading icon
|
|
1151
|
+
*/
|
|
1152
|
+
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
1153
|
+
/**
|
|
1154
|
+
* Enable button toggle
|
|
1155
|
+
*/
|
|
1156
|
+
toggle: {
|
|
1157
|
+
type: Boolean,
|
|
1158
|
+
default: false
|
|
1159
|
+
},
|
|
1160
|
+
/**
|
|
1161
|
+
* Button toggle value
|
|
1162
|
+
*/
|
|
1163
|
+
value: {
|
|
1164
|
+
type: [String, Number, Boolean],
|
|
1165
|
+
default: void 0
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
* Value associated with the unchecked state
|
|
1169
|
+
*/
|
|
1170
|
+
uncheckedValue: {
|
|
1171
|
+
type: [String, Number, Boolean],
|
|
1172
|
+
default: void 0
|
|
1173
|
+
},
|
|
1174
|
+
/**
|
|
1175
|
+
* Button toggle model value
|
|
1176
|
+
*/
|
|
1177
|
+
modelValue: {
|
|
1178
|
+
type: [String, Number, Boolean],
|
|
1179
|
+
default: void 0
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
function useGroupProps(props, emit) {
|
|
1183
|
+
const { group, isInGroup, getGroupOrLocalRef } = useGroupStateInject(INJECTION_KEY_BUTTON_GROUP);
|
|
1184
|
+
const { id, iconPosition, icon, label, pressed } = toRefs(props);
|
|
1185
|
+
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
1186
|
+
const toggle = getGroupOrLocalRef("toggle", props);
|
|
1187
|
+
const unselectable = getGroupOrLocalRef("unselectable", props);
|
|
1188
|
+
const multiple = computed(() => (group == null ? void 0 : group.multiple.value) ?? false);
|
|
1189
|
+
const modifiers = computed(() => {
|
|
1190
|
+
let localModifiers = props.modifiers;
|
|
1191
|
+
let groupModifiers = group == null ? void 0 : group.modifiers.value;
|
|
1192
|
+
const toReturn = /* @__PURE__ */ new Set();
|
|
1193
|
+
if (localModifiers) {
|
|
1194
|
+
if (!Array.isArray(localModifiers)) {
|
|
1195
|
+
localModifiers = localModifiers.split(" ");
|
|
940
1196
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
toReturn.push(offset(props.offset));
|
|
947
|
-
}
|
|
1197
|
+
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
1198
|
+
}
|
|
1199
|
+
if (groupModifiers) {
|
|
1200
|
+
if (!Array.isArray(groupModifiers)) {
|
|
1201
|
+
groupModifiers = groupModifiers.split(" ");
|
|
948
1202
|
}
|
|
949
|
-
|
|
950
|
-
toReturn.push(
|
|
951
|
-
arrow({
|
|
952
|
-
element: arrowEl
|
|
953
|
-
})
|
|
954
|
-
);
|
|
955
|
-
}
|
|
956
|
-
return toReturn;
|
|
957
|
-
});
|
|
958
|
-
const { x, y, middlewareData, placement, strategy } = useFloating(
|
|
959
|
-
referenceEl,
|
|
960
|
-
floatingEl,
|
|
961
|
-
{
|
|
962
|
-
whileElementsMounted: (...args) => {
|
|
963
|
-
return autoUpdate(...args, {
|
|
964
|
-
animationFrame: props.strategy === Strategy.fixed
|
|
965
|
-
});
|
|
966
|
-
},
|
|
967
|
-
placement: computed(() => props.placement),
|
|
968
|
-
strategy: computed(() => props.strategy),
|
|
969
|
-
middleware
|
|
970
|
-
}
|
|
971
|
-
);
|
|
972
|
-
const dropdownPlacement = computed(() => {
|
|
973
|
-
var _a;
|
|
974
|
-
if (hasCustomPosition.value) {
|
|
975
|
-
return void 0;
|
|
976
|
-
}
|
|
977
|
-
const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
|
|
978
|
-
return {
|
|
979
|
-
position: strategy.value,
|
|
980
|
-
top: `${y.value ?? 0}px`,
|
|
981
|
-
left: `${x.value ?? 0}px`,
|
|
982
|
-
maxWidth: width ? void 0 : maxWidth.value,
|
|
983
|
-
maxHeight: maxHeight.value,
|
|
984
|
-
width
|
|
985
|
-
};
|
|
986
|
-
});
|
|
987
|
-
const side = computed(
|
|
988
|
-
() => placement.value.split("-")[0]
|
|
989
|
-
);
|
|
990
|
-
const arrowPlacement = computed(() => {
|
|
991
|
-
var _a, _b, _c, _d, _e;
|
|
992
|
-
if (hasCustomPosition.value) {
|
|
993
|
-
return void 0;
|
|
994
|
-
}
|
|
995
|
-
const staticSide = {
|
|
996
|
-
[Side.top]: Side.bottom,
|
|
997
|
-
[Side.right]: Side.left,
|
|
998
|
-
[Side.bottom]: Side.top,
|
|
999
|
-
[Side.left]: Side.right
|
|
1000
|
-
}[side.value];
|
|
1001
|
-
return {
|
|
1002
|
-
left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
|
|
1003
|
-
top: ((_c = middlewareData.value.arrow) == null ? void 0 : _c.y) !== void 0 ? `${(_d = middlewareData.value.arrow) == null ? void 0 : _d.y}px` : void 0,
|
|
1004
|
-
[staticSide]: `${-(((_e = arrowEl.value) == null ? void 0 : _e.offsetWidth) ?? 0) / 2}px`
|
|
1005
|
-
};
|
|
1006
|
-
});
|
|
1007
|
-
const modelValue = useVModel(props, "modelValue", emit);
|
|
1008
|
-
const localModelValue = ref(false);
|
|
1009
|
-
const expanded = computed({
|
|
1010
|
-
get: () => modelValue.value ?? localModelValue.value,
|
|
1011
|
-
set: (newValue) => {
|
|
1012
|
-
if (modelValue.value === void 0) {
|
|
1013
|
-
localModelValue.value = newValue;
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
modelValue.value = newValue;
|
|
1017
|
-
}
|
|
1018
|
-
});
|
|
1019
|
-
const show = () => {
|
|
1020
|
-
expanded.value = true;
|
|
1021
|
-
};
|
|
1022
|
-
const hide = () => {
|
|
1023
|
-
expanded.value = false;
|
|
1024
|
-
};
|
|
1025
|
-
const toggle = () => {
|
|
1026
|
-
expanded.value = !expanded.value;
|
|
1027
|
-
};
|
|
1028
|
-
const init = (el) => {
|
|
1029
|
-
referenceEl.value = el;
|
|
1030
|
-
};
|
|
1031
|
-
__expose({
|
|
1032
|
-
toggle,
|
|
1033
|
-
show,
|
|
1034
|
-
hide,
|
|
1035
|
-
init,
|
|
1036
|
-
customPosition: hasCustomPosition
|
|
1037
|
-
});
|
|
1038
|
-
watch(expanded, (newValue) => {
|
|
1039
|
-
if (newValue && props.autofocusFirst) {
|
|
1040
|
-
nextTick(() => {
|
|
1041
|
-
const focusableElements = getKeyboardFocusableElements(
|
|
1042
|
-
floatingEl.value
|
|
1043
|
-
);
|
|
1044
|
-
if (focusableElements.length > 0) {
|
|
1045
|
-
focusableElements[0].focus({
|
|
1046
|
-
preventScroll: true
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
});
|
|
1052
|
-
onClickOutside(
|
|
1053
|
-
floatingEl,
|
|
1054
|
-
() => {
|
|
1055
|
-
if (!props.keepOpen && expanded.value) {
|
|
1056
|
-
expanded.value = false;
|
|
1057
|
-
}
|
|
1058
|
-
},
|
|
1059
|
-
{ ignore: [referenceEl] }
|
|
1060
|
-
);
|
|
1061
|
-
const hasAriaLabelledby = computed(() => {
|
|
1062
|
-
var _a, _b;
|
|
1063
|
-
return ((_b = (_a = referenceEl.value) == null ? void 0 : _a.getAttribute) == null ? void 0 : _b.call(_a, "id")) ?? void 0;
|
|
1064
|
-
});
|
|
1065
|
-
const referenceAria = computed(() => ({
|
|
1066
|
-
"aria-controls": hasId.value,
|
|
1067
|
-
"aria-haspopup": true,
|
|
1068
|
-
"aria-expanded": expanded.value
|
|
1069
|
-
}));
|
|
1070
|
-
const { component: VvDropdownTriggerProvider, bus } = useProvideDropdownTrigger({
|
|
1071
|
-
reference: referenceEl,
|
|
1072
|
-
id: hasId,
|
|
1073
|
-
expanded,
|
|
1074
|
-
aria: referenceAria
|
|
1075
|
-
});
|
|
1076
|
-
bus.on("click", toggle);
|
|
1077
|
-
const { role, modifiers } = toRefs(props);
|
|
1078
|
-
const { itemRole } = useProvideDropdownItem({ role, expanded });
|
|
1079
|
-
const bemCssClasses = useModifiers(
|
|
1080
|
-
"vv-dropdown",
|
|
1081
|
-
modifiers,
|
|
1082
|
-
computed(() => ({
|
|
1083
|
-
arrow: props.arrow
|
|
1084
|
-
}))
|
|
1085
|
-
);
|
|
1086
|
-
const { focused } = useFocusWithin(floatingEl);
|
|
1087
|
-
function getKeyboardFocusableElements(element) {
|
|
1088
|
-
if (!element) {
|
|
1089
|
-
return [];
|
|
1090
|
-
}
|
|
1091
|
-
return [
|
|
1092
|
-
...element.querySelectorAll(
|
|
1093
|
-
'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
1094
|
-
)
|
|
1095
|
-
].filter(
|
|
1096
|
-
(el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
|
|
1097
|
-
);
|
|
1203
|
+
groupModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
1098
1204
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
nextTick(() => {
|
|
1125
|
-
if (focused.value) {
|
|
1126
|
-
const focusableElements = getKeyboardFocusableElements(
|
|
1127
|
-
floatingEl.value
|
|
1128
|
-
);
|
|
1129
|
-
if (focusableElements.length === 0 || !document.activeElement) {
|
|
1130
|
-
return;
|
|
1131
|
-
}
|
|
1132
|
-
const activeElementIndex = focusableElements.indexOf(
|
|
1133
|
-
document.activeElement
|
|
1134
|
-
);
|
|
1135
|
-
if (activeElementIndex > 0) {
|
|
1136
|
-
focusableElements[activeElementIndex - 1].focus({
|
|
1137
|
-
preventScroll: true
|
|
1138
|
-
});
|
|
1139
|
-
} else {
|
|
1140
|
-
focusableElements[focusableElements.length - 1].focus({
|
|
1141
|
-
preventScroll: true
|
|
1142
|
-
});
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
});
|
|
1146
|
-
};
|
|
1147
|
-
onKeyStroke("Escape", (e) => {
|
|
1148
|
-
if (expanded.value) {
|
|
1149
|
-
e.preventDefault();
|
|
1150
|
-
hide();
|
|
1151
|
-
}
|
|
1152
|
-
});
|
|
1153
|
-
onKeyStroke("ArrowDown", (e) => {
|
|
1154
|
-
if (expanded.value && focused.value) {
|
|
1155
|
-
e.preventDefault();
|
|
1156
|
-
focusNext();
|
|
1157
|
-
}
|
|
1158
|
-
});
|
|
1159
|
-
onKeyStroke("ArrowUp", (e) => {
|
|
1160
|
-
if (expanded.value && focused.value) {
|
|
1161
|
-
e.preventDefault();
|
|
1162
|
-
focusPrev();
|
|
1163
|
-
}
|
|
1164
|
-
});
|
|
1165
|
-
onKeyStroke([" ", "Enter"], (e) => {
|
|
1166
|
-
const htmlEl = e.target;
|
|
1167
|
-
if (expanded.value && focused.value && htmlEl) {
|
|
1168
|
-
htmlEl == null ? void 0 : htmlEl.click();
|
|
1169
|
-
}
|
|
1170
|
-
});
|
|
1171
|
-
const dropdownTransitionHandlers = {
|
|
1172
|
-
"before-enter": () => {
|
|
1173
|
-
emit(expanded.value ? "beforeExpand" : "beforeCollapse");
|
|
1174
|
-
emit("before-enter");
|
|
1175
|
-
},
|
|
1176
|
-
"after-leave": () => {
|
|
1177
|
-
emit(expanded.value ? "afterExpand" : "afterCollapse");
|
|
1178
|
-
emit("after-leave");
|
|
1179
|
-
},
|
|
1180
|
-
enter: () => {
|
|
1181
|
-
emit("enter");
|
|
1182
|
-
},
|
|
1183
|
-
"after-enter": () => {
|
|
1184
|
-
emit("after-enter");
|
|
1185
|
-
},
|
|
1186
|
-
"enter-cancelled": () => {
|
|
1187
|
-
emit("enter-cancelled");
|
|
1188
|
-
},
|
|
1189
|
-
"before-leave": () => {
|
|
1190
|
-
emit("before-leave");
|
|
1191
|
-
},
|
|
1192
|
-
leave: () => {
|
|
1193
|
-
emit("leave");
|
|
1194
|
-
},
|
|
1195
|
-
"leave-cancelled": () => {
|
|
1196
|
-
emit("leave-cancelled");
|
|
1197
|
-
}
|
|
1198
|
-
};
|
|
1199
|
-
return (_ctx, _cache) => {
|
|
1200
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1201
|
-
createVNode(unref(VvDropdownTriggerProvider), null, {
|
|
1202
|
-
default: withCtx(() => [
|
|
1203
|
-
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
|
|
1204
|
-
]),
|
|
1205
|
-
_: 3
|
|
1206
|
-
}),
|
|
1207
|
-
createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
|
|
1208
|
-
default: withCtx(() => [
|
|
1209
|
-
withDirectives(createElementVNode("div", {
|
|
1210
|
-
ref_key: "floatingEl",
|
|
1211
|
-
ref: floatingEl,
|
|
1212
|
-
style: normalizeStyle(unref(dropdownPlacement)),
|
|
1213
|
-
class: normalizeClass(unref(bemCssClasses))
|
|
1214
|
-
}, [
|
|
1215
|
-
props.arrow ? (openBlock(), createElementBlock("div", {
|
|
1216
|
-
key: 0,
|
|
1217
|
-
ref_key: "arrowEl",
|
|
1218
|
-
ref: arrowEl,
|
|
1219
|
-
style: normalizeStyle(unref(arrowPlacement)),
|
|
1220
|
-
class: "vv-dropdown__arrow"
|
|
1221
|
-
}, null, 4)) : createCommentVNode("", true),
|
|
1222
|
-
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
|
|
1223
|
-
createElementVNode("div", mergeProps(unref(attrs), {
|
|
1224
|
-
id: unref(hasId),
|
|
1225
|
-
ref_key: "listEl",
|
|
1226
|
-
ref: listEl,
|
|
1227
|
-
tabindex: !unref(expanded) ? -1 : void 0,
|
|
1228
|
-
role: unref(role),
|
|
1229
|
-
"aria-labelledby": unref(hasAriaLabelledby),
|
|
1230
|
-
class: "vv-dropdown__list"
|
|
1231
|
-
}), [
|
|
1232
|
-
renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
|
|
1233
|
-
role: unref(itemRole)
|
|
1234
|
-
})))
|
|
1235
|
-
], 16, _hoisted_1$5),
|
|
1236
|
-
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
|
|
1237
|
-
], 6), [
|
|
1238
|
-
[vShow, unref(expanded)]
|
|
1239
|
-
])
|
|
1240
|
-
]),
|
|
1241
|
-
_: 3
|
|
1242
|
-
}, 16, ["name"])
|
|
1243
|
-
], 64);
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
});
|
|
1205
|
+
return Array.from(toReturn);
|
|
1206
|
+
});
|
|
1207
|
+
const disabled = computed(
|
|
1208
|
+
() => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
|
|
1209
|
+
);
|
|
1210
|
+
return {
|
|
1211
|
+
// group props
|
|
1212
|
+
group,
|
|
1213
|
+
isInGroup,
|
|
1214
|
+
modelValue,
|
|
1215
|
+
toggle,
|
|
1216
|
+
unselectable,
|
|
1217
|
+
multiple,
|
|
1218
|
+
modifiers,
|
|
1219
|
+
disabled,
|
|
1220
|
+
// local props
|
|
1221
|
+
id,
|
|
1222
|
+
pressed,
|
|
1223
|
+
iconPosition,
|
|
1224
|
+
icon,
|
|
1225
|
+
label
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
1229
|
+
const VvActionProps = ActionProps;
|
|
1247
1230
|
function useInjectedDropdownTrigger() {
|
|
1248
1231
|
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
1249
1232
|
}
|
|
@@ -1254,1162 +1237,1460 @@ function useInjectedDropdownAction() {
|
|
|
1254
1237
|
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
1255
1238
|
}
|
|
1256
1239
|
const __default__$7 = {
|
|
1257
|
-
name: "
|
|
1240
|
+
name: "VvAction"
|
|
1258
1241
|
};
|
|
1259
1242
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1260
1243
|
...__default__$7,
|
|
1261
|
-
|
|
1262
|
-
|
|
1244
|
+
props: VvActionProps,
|
|
1245
|
+
emits: VvActionEvents,
|
|
1246
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1247
|
+
const props = __props;
|
|
1248
|
+
const emit = __emit;
|
|
1249
|
+
const instance = getCurrentInstance();
|
|
1250
|
+
const volver = useVolver();
|
|
1263
1251
|
const element = ref(null);
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1252
|
+
__expose({ $el: element });
|
|
1253
|
+
const {
|
|
1254
|
+
reference: dropdownTriggerReference,
|
|
1255
|
+
bus: dropdownEventBus,
|
|
1256
|
+
aria: dropdownAria,
|
|
1257
|
+
expanded: dropdownExpanded
|
|
1258
|
+
} = useInjectedDropdownTrigger();
|
|
1259
|
+
watch(
|
|
1260
|
+
() => element.value,
|
|
1261
|
+
(newValue) => {
|
|
1262
|
+
if (dropdownTriggerReference) {
|
|
1263
|
+
dropdownTriggerReference.value = newValue;
|
|
1264
|
+
}
|
|
1271
1265
|
}
|
|
1272
|
-
});
|
|
1273
|
-
return (_ctx, _cache) => {
|
|
1274
|
-
return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
|
|
1275
|
-
ref_key: "element",
|
|
1276
|
-
ref: element,
|
|
1277
|
-
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
1278
|
-
}), [
|
|
1279
|
-
renderSlot(_ctx.$slots, "default")
|
|
1280
|
-
], 16);
|
|
1281
|
-
};
|
|
1282
|
-
}
|
|
1283
|
-
});
|
|
1284
|
-
const _hoisted_1$4 = ["title"];
|
|
1285
|
-
const __default__$6 = {
|
|
1286
|
-
name: "VvDropdownOption"
|
|
1287
|
-
};
|
|
1288
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1289
|
-
...__default__$6,
|
|
1290
|
-
props: {
|
|
1291
|
-
...DisabledProps,
|
|
1292
|
-
...SelectedProps,
|
|
1293
|
-
...UnselectableProps,
|
|
1294
|
-
...ModifiersProps,
|
|
1295
|
-
deselectHintLabel: {
|
|
1296
|
-
type: String
|
|
1297
|
-
},
|
|
1298
|
-
selectHintLabel: {
|
|
1299
|
-
type: String
|
|
1300
|
-
},
|
|
1301
|
-
selectedHintLabel: {
|
|
1302
|
-
type: String
|
|
1303
|
-
}
|
|
1304
|
-
},
|
|
1305
|
-
setup(__props) {
|
|
1306
|
-
const props = __props;
|
|
1307
|
-
const { modifiers } = toRefs(props);
|
|
1308
|
-
const bemCssClasses = useModifiers(
|
|
1309
|
-
"vv-dropdown-option",
|
|
1310
|
-
modifiers,
|
|
1311
|
-
computed(() => ({
|
|
1312
|
-
disabled: props.disabled,
|
|
1313
|
-
selected: props.selected,
|
|
1314
|
-
unselectable: props.unselectable && props.selected
|
|
1315
|
-
}))
|
|
1316
1266
|
);
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1319
|
-
|
|
1267
|
+
const pressed = computed(() => {
|
|
1268
|
+
return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
|
|
1269
|
+
});
|
|
1270
|
+
const { role } = useInjectedDropdownAction();
|
|
1271
|
+
const hasTag = computed(() => {
|
|
1272
|
+
switch (true) {
|
|
1273
|
+
case props.disabled:
|
|
1274
|
+
return ActionTag.button;
|
|
1275
|
+
case props.to !== void 0:
|
|
1276
|
+
return (volver == null ? void 0 : volver.nuxt) ? resolveComponent(ActionTag.nuxtLink) : ActionTag.routerLink;
|
|
1277
|
+
case props.href !== void 0:
|
|
1278
|
+
return ActionTag.a;
|
|
1279
|
+
default:
|
|
1280
|
+
return props.defaultTag;
|
|
1320
1281
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1282
|
+
});
|
|
1283
|
+
const hasProps = computed(() => {
|
|
1284
|
+
const toReturn = {
|
|
1285
|
+
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
1286
|
+
ariaPressed: pressed.value ? true : void 0,
|
|
1287
|
+
ariaLabel: props.ariaLabel,
|
|
1288
|
+
role: role == null ? void 0 : role.value
|
|
1289
|
+
};
|
|
1290
|
+
switch (hasTag.value) {
|
|
1291
|
+
case ActionTag.a:
|
|
1292
|
+
return {
|
|
1293
|
+
...toReturn,
|
|
1294
|
+
href: props.href,
|
|
1295
|
+
target: props.target,
|
|
1296
|
+
rel: props.rel
|
|
1297
|
+
};
|
|
1298
|
+
case ActionTag.routerLink:
|
|
1299
|
+
case ActionTag.nuxtLink:
|
|
1300
|
+
return {
|
|
1301
|
+
...toReturn,
|
|
1302
|
+
to: props.to,
|
|
1303
|
+
target: props.target
|
|
1304
|
+
};
|
|
1305
|
+
case ActionTag.button:
|
|
1306
|
+
return {
|
|
1307
|
+
...toReturn,
|
|
1308
|
+
type: props.type,
|
|
1309
|
+
disabled: props.disabled
|
|
1310
|
+
};
|
|
1311
|
+
default:
|
|
1312
|
+
return toReturn;
|
|
1323
1313
|
}
|
|
1324
1314
|
});
|
|
1315
|
+
function onClick(e) {
|
|
1316
|
+
var _a;
|
|
1317
|
+
if (props.disabled) {
|
|
1318
|
+
e.preventDefault();
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
|
|
1322
|
+
emit("click", e);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
1326
|
+
}
|
|
1327
|
+
function onMouseover(e) {
|
|
1328
|
+
var _a;
|
|
1329
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
|
|
1330
|
+
emit("mouseover", e);
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
1334
|
+
}
|
|
1335
|
+
function onMouseleave(e) {
|
|
1336
|
+
var _a;
|
|
1337
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
|
|
1338
|
+
emit("mouseleave", e);
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
1342
|
+
}
|
|
1325
1343
|
return (_ctx, _cache) => {
|
|
1326
|
-
return openBlock(), createBlock(
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1344
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
1345
|
+
ref_key: "element",
|
|
1346
|
+
ref: element,
|
|
1347
|
+
class: {
|
|
1348
|
+
active: _ctx.active,
|
|
1349
|
+
pressed: unref(pressed),
|
|
1350
|
+
disabled: _ctx.disabled,
|
|
1351
|
+
current: _ctx.current
|
|
1352
|
+
},
|
|
1353
|
+
onClickPassive: onClick,
|
|
1354
|
+
onMouseoverPassive: onMouseover,
|
|
1355
|
+
onMouseleavePassive: onMouseleave
|
|
1356
|
+
}), {
|
|
1332
1357
|
default: withCtx(() => [
|
|
1333
|
-
renderSlot(_ctx.$slots, "default")
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
])
|
|
1341
|
-
], 8, _hoisted_1$4)
|
|
1358
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1359
|
+
createTextVNode(
|
|
1360
|
+
toDisplayString(_ctx.label),
|
|
1361
|
+
1
|
|
1362
|
+
/* TEXT */
|
|
1363
|
+
)
|
|
1364
|
+
])
|
|
1342
1365
|
]),
|
|
1343
1366
|
_: 3
|
|
1344
|
-
|
|
1367
|
+
/* FORWARDED */
|
|
1368
|
+
}, 16, ["class"]);
|
|
1345
1369
|
};
|
|
1346
1370
|
}
|
|
1347
1371
|
});
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1372
|
+
function useUniqueId(id) {
|
|
1373
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
1374
|
+
}
|
|
1375
|
+
const _hoisted_1$5 = {
|
|
1376
|
+
key: 1,
|
|
1377
|
+
class: "vv-button__label"
|
|
1352
1378
|
};
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1379
|
+
const _hoisted_2$2 = {
|
|
1380
|
+
key: 1,
|
|
1381
|
+
class: "vv-button__label"
|
|
1355
1382
|
};
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1383
|
+
const __default__$6 = {
|
|
1384
|
+
name: "VvButton",
|
|
1385
|
+
inheritAttrs: false
|
|
1386
|
+
};
|
|
1387
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1388
|
+
...__default__$6,
|
|
1389
|
+
props: VvButtonProps,
|
|
1390
|
+
emits: VvButtonEvents,
|
|
1391
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1362
1392
|
const props = __props;
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
const
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
return true;
|
|
1389
|
-
}
|
|
1390
|
-
if (arrA != arrB)
|
|
1391
|
-
return false;
|
|
1392
|
-
const dateA = a instanceof Date, dateB = b instanceof Date;
|
|
1393
|
-
if (dateA != dateB)
|
|
1394
|
-
return false;
|
|
1395
|
-
if (dateA && dateB)
|
|
1396
|
-
return a.getTime() == b.getTime();
|
|
1397
|
-
const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
|
|
1398
|
-
if (regexpA != regexpB)
|
|
1399
|
-
return false;
|
|
1400
|
-
if (regexpA && regexpB)
|
|
1401
|
-
return a.toString() == b.toString();
|
|
1402
|
-
const keys = Object.keys(a);
|
|
1403
|
-
length = keys.length;
|
|
1404
|
-
if (length !== Object.keys(b).length)
|
|
1405
|
-
return false;
|
|
1406
|
-
for (i = length; i-- !== 0; )
|
|
1407
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
1408
|
-
return false;
|
|
1409
|
-
for (i = length; i-- !== 0; ) {
|
|
1410
|
-
key = keys[i];
|
|
1411
|
-
if (!deepEquals(a[key], b[key]))
|
|
1412
|
-
return false;
|
|
1413
|
-
}
|
|
1414
|
-
return true;
|
|
1415
|
-
}
|
|
1416
|
-
return a !== a && b !== b;
|
|
1417
|
-
}
|
|
1418
|
-
function resolveFieldData(data, field) {
|
|
1419
|
-
if (data && Object.keys(data).length && field) {
|
|
1420
|
-
if (field.indexOf(".") === -1) {
|
|
1421
|
-
return data[field];
|
|
1422
|
-
} else {
|
|
1423
|
-
const fields = field.split(".");
|
|
1424
|
-
let value = data;
|
|
1425
|
-
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
1426
|
-
if (data == null) {
|
|
1427
|
-
return null;
|
|
1428
|
-
}
|
|
1429
|
-
value = value[fields[i]];
|
|
1430
|
-
}
|
|
1431
|
-
return value;
|
|
1432
|
-
}
|
|
1433
|
-
} else {
|
|
1434
|
-
return null;
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
function findIndexInList(value, list) {
|
|
1438
|
-
let index = -1;
|
|
1439
|
-
if (list) {
|
|
1440
|
-
for (let i = 0; i < list.length; i++) {
|
|
1441
|
-
if (equals(list[i], value)) {
|
|
1442
|
-
index = i;
|
|
1443
|
-
break;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
return index;
|
|
1448
|
-
}
|
|
1449
|
-
function contains(value, list) {
|
|
1450
|
-
if (value != null && list && list.length) {
|
|
1451
|
-
for (const val of list) {
|
|
1452
|
-
if (equals(value, val)) {
|
|
1453
|
-
return true;
|
|
1393
|
+
const emit = __emit;
|
|
1394
|
+
const attrs = useAttrs();
|
|
1395
|
+
const slots = useSlots();
|
|
1396
|
+
const {
|
|
1397
|
+
id,
|
|
1398
|
+
modifiers,
|
|
1399
|
+
iconPosition,
|
|
1400
|
+
icon,
|
|
1401
|
+
label,
|
|
1402
|
+
modelValue,
|
|
1403
|
+
disabled,
|
|
1404
|
+
toggle,
|
|
1405
|
+
unselectable
|
|
1406
|
+
} = useGroupProps(props, emit);
|
|
1407
|
+
const hasId = useUniqueId(id);
|
|
1408
|
+
const name = computed(() => (attrs == null ? void 0 : attrs.name) || hasId.value);
|
|
1409
|
+
const element = ref(null);
|
|
1410
|
+
const $el = computed(() => {
|
|
1411
|
+
var _a;
|
|
1412
|
+
return (_a = element.value) == null ? void 0 : _a.$el;
|
|
1413
|
+
});
|
|
1414
|
+
__expose({ $el });
|
|
1415
|
+
const pressed = computed(() => {
|
|
1416
|
+
if (!toggle.value) {
|
|
1417
|
+
return props.pressed;
|
|
1454
1418
|
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
return propsOrRef.value;
|
|
1483
|
-
}
|
|
1484
|
-
return propsOrRef;
|
|
1485
|
-
});
|
|
1486
|
-
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
1487
|
-
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
1488
|
-
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
1489
|
-
const hintLabel = computed(() => props.value.hintLabel);
|
|
1490
|
-
const hasLoadingLabelOrSlot = computed(
|
|
1491
|
-
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
1492
|
-
);
|
|
1493
|
-
const hasInvalidLabelOrSlot = computed(
|
|
1494
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
1495
|
-
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
1496
|
-
)
|
|
1497
|
-
);
|
|
1498
|
-
const hasValidLabelOrSlot = computed(
|
|
1499
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
1500
|
-
);
|
|
1501
|
-
const hasHintLabelOrSlot = computed(
|
|
1502
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
1503
|
-
);
|
|
1504
|
-
const isVisible = computed(
|
|
1505
|
-
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
1506
|
-
);
|
|
1507
|
-
const hintSlotScope = computed(() => ({
|
|
1508
|
-
modelValue: props.value.modelValue,
|
|
1509
|
-
valid: props.value.valid,
|
|
1510
|
-
invalid: props.value.invalid,
|
|
1511
|
-
loading: props.value.loading
|
|
1512
|
-
}));
|
|
1513
|
-
const HintSlot = defineComponent({
|
|
1514
|
-
name: "HintSlot",
|
|
1515
|
-
props: {
|
|
1516
|
-
tag: {
|
|
1517
|
-
type: String,
|
|
1518
|
-
default: "small"
|
|
1419
|
+
if (Array.isArray(modelValue.value)) {
|
|
1420
|
+
return contains(name.value, modelValue.value);
|
|
1421
|
+
}
|
|
1422
|
+
return equals(name.value, modelValue.value);
|
|
1423
|
+
});
|
|
1424
|
+
const bemCssClasses = useModifiers(
|
|
1425
|
+
"vv-button",
|
|
1426
|
+
modifiers,
|
|
1427
|
+
computed(() => ({
|
|
1428
|
+
"reverse": [Side.right, Side.bottom].includes(
|
|
1429
|
+
iconPosition.value
|
|
1430
|
+
),
|
|
1431
|
+
"column": [Side.top, Side.bottom].includes(
|
|
1432
|
+
iconPosition.value
|
|
1433
|
+
),
|
|
1434
|
+
"icon-only": Boolean(
|
|
1435
|
+
(icon == null ? void 0 : icon.value) && !(label == null ? void 0 : label.value) && !slots.default
|
|
1436
|
+
)
|
|
1437
|
+
}))
|
|
1438
|
+
);
|
|
1439
|
+
const { hasIcon } = useComponentIcon(icon);
|
|
1440
|
+
const toggleValue = computed(() => {
|
|
1441
|
+
return props.value !== void 0 ? props.value : name.value;
|
|
1442
|
+
});
|
|
1443
|
+
const hasListeners = computed(() => {
|
|
1444
|
+
if (!toggle.value) {
|
|
1445
|
+
return void 0;
|
|
1519
1446
|
}
|
|
1520
|
-
},
|
|
1521
|
-
setup() {
|
|
1522
1447
|
return {
|
|
1523
|
-
|
|
1524
|
-
invalidLabel,
|
|
1525
|
-
validLabel,
|
|
1526
|
-
loadingLabel,
|
|
1527
|
-
hintLabel,
|
|
1528
|
-
hasInvalidLabelOrSlot,
|
|
1529
|
-
hasValidLabelOrSlot,
|
|
1530
|
-
hasLoadingLabelOrSlot,
|
|
1531
|
-
hasHintLabelOrSlot
|
|
1448
|
+
onClick
|
|
1532
1449
|
};
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
{
|
|
1548
|
-
role
|
|
1549
|
-
},
|
|
1550
|
-
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
1551
|
-
);
|
|
1552
|
-
}
|
|
1553
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
1554
|
-
return h(
|
|
1555
|
-
this.tag,
|
|
1556
|
-
{
|
|
1557
|
-
role
|
|
1558
|
-
},
|
|
1559
|
-
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
1560
|
-
);
|
|
1450
|
+
});
|
|
1451
|
+
function onClick() {
|
|
1452
|
+
if (toggle.value) {
|
|
1453
|
+
if (Array.isArray(modelValue.value)) {
|
|
1454
|
+
if (contains(toggleValue.value, modelValue.value)) {
|
|
1455
|
+
if (unselectable.value) {
|
|
1456
|
+
modelValue.value = modelValue.value.filter(
|
|
1457
|
+
(n) => n !== toggleValue.value
|
|
1458
|
+
);
|
|
1459
|
+
}
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
modelValue.value.push(toggleValue.value);
|
|
1463
|
+
return;
|
|
1561
1464
|
}
|
|
1562
|
-
if (
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
{
|
|
1566
|
-
role
|
|
1567
|
-
},
|
|
1568
|
-
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
1569
|
-
);
|
|
1465
|
+
if (toggleValue.value === modelValue.value && unselectable.value) {
|
|
1466
|
+
modelValue.value = props.uncheckedValue;
|
|
1467
|
+
return;
|
|
1570
1468
|
}
|
|
1571
|
-
|
|
1572
|
-
this.tag,
|
|
1573
|
-
{
|
|
1574
|
-
role
|
|
1575
|
-
},
|
|
1576
|
-
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
1577
|
-
);
|
|
1469
|
+
modelValue.value = toggleValue.value;
|
|
1578
1470
|
}
|
|
1579
|
-
return null;
|
|
1580
1471
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1472
|
+
return (_ctx, _cache) => {
|
|
1473
|
+
return openBlock(), createBlock(_sfc_main$7, mergeProps({
|
|
1474
|
+
...unref(attrs),
|
|
1475
|
+
...unref(hasListeners),
|
|
1476
|
+
disabled: unref(disabled),
|
|
1477
|
+
pressed: unref(pressed),
|
|
1478
|
+
active: _ctx.active,
|
|
1479
|
+
type: _ctx.type,
|
|
1480
|
+
to: _ctx.to,
|
|
1481
|
+
href: _ctx.href,
|
|
1482
|
+
target: _ctx.target,
|
|
1483
|
+
rel: _ctx.rel,
|
|
1484
|
+
ariaLabel: _ctx.ariaLabel
|
|
1485
|
+
}, {
|
|
1486
|
+
id: unref(hasId),
|
|
1487
|
+
ref_key: "element",
|
|
1488
|
+
ref: element,
|
|
1489
|
+
class: unref(bemCssClasses)
|
|
1490
|
+
}), {
|
|
1491
|
+
default: withCtx(() => [
|
|
1492
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1493
|
+
_ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
|
|
1494
|
+
_ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$9, {
|
|
1495
|
+
key: 0,
|
|
1496
|
+
class: "vv-button__loading-icon",
|
|
1497
|
+
name: _ctx.loadingIcon
|
|
1498
|
+
}, null, 8, ["name"])) : createCommentVNode("v-if", true),
|
|
1499
|
+
_ctx.loadingLabel ? (openBlock(), createElementBlock(
|
|
1500
|
+
"span",
|
|
1501
|
+
_hoisted_1$5,
|
|
1502
|
+
toDisplayString(_ctx.loadingLabel),
|
|
1503
|
+
1
|
|
1504
|
+
/* TEXT */
|
|
1505
|
+
)) : createCommentVNode("v-if", true)
|
|
1506
|
+
]) : (openBlock(), createElementBlock(
|
|
1507
|
+
Fragment,
|
|
1508
|
+
{ key: 1 },
|
|
1509
|
+
[
|
|
1510
|
+
renderSlot(_ctx.$slots, "before"),
|
|
1511
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
1512
|
+
_sfc_main$9,
|
|
1513
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
|
|
1514
|
+
null,
|
|
1515
|
+
16
|
|
1516
|
+
/* FULL_PROPS */
|
|
1517
|
+
)) : createCommentVNode("v-if", true),
|
|
1518
|
+
unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$2, [
|
|
1519
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
1520
|
+
createTextVNode(
|
|
1521
|
+
toDisplayString(unref(label)),
|
|
1522
|
+
1
|
|
1523
|
+
/* TEXT */
|
|
1524
|
+
)
|
|
1525
|
+
])
|
|
1526
|
+
])) : createCommentVNode("v-if", true),
|
|
1527
|
+
renderSlot(_ctx.$slots, "after")
|
|
1528
|
+
],
|
|
1529
|
+
64
|
|
1530
|
+
/* STABLE_FRAGMENT */
|
|
1531
|
+
))
|
|
1532
|
+
])
|
|
1533
|
+
]),
|
|
1534
|
+
_: 3
|
|
1535
|
+
/* FORWARDED */
|
|
1536
|
+
}, 16, ["id", "class"]);
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
});
|
|
1540
|
+
const VvDropdownProps = {
|
|
1541
|
+
...IdProps,
|
|
1542
|
+
...DropdownProps,
|
|
1602
1543
|
...ModifiersProps,
|
|
1603
|
-
...OptionsProps,
|
|
1604
|
-
...IconProps,
|
|
1605
|
-
...FloatingLabelProps,
|
|
1606
|
-
...UnselectableProps,
|
|
1607
|
-
...LabelProps,
|
|
1608
|
-
/**
|
|
1609
|
-
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
1610
|
-
* If it is not specified, then only one option can be selected at a time.
|
|
1611
|
-
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
1612
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
1613
|
-
*/
|
|
1614
|
-
multiple: Boolean,
|
|
1615
1544
|
/**
|
|
1616
|
-
*
|
|
1617
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
1545
|
+
* Show / hide dropdown programmatically
|
|
1618
1546
|
*/
|
|
1619
|
-
|
|
1547
|
+
modelValue: {
|
|
1548
|
+
type: Boolean,
|
|
1549
|
+
default: void 0
|
|
1550
|
+
},
|
|
1620
1551
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
1623
|
-
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
1624
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
1552
|
+
* Dropdown trigger element
|
|
1625
1553
|
*/
|
|
1626
|
-
|
|
1554
|
+
reference: {
|
|
1555
|
+
type: Object,
|
|
1556
|
+
default: null
|
|
1557
|
+
},
|
|
1627
1558
|
/**
|
|
1628
|
-
*
|
|
1559
|
+
* Dropdown role
|
|
1629
1560
|
*/
|
|
1630
|
-
|
|
1631
|
-
type:
|
|
1632
|
-
default:
|
|
1561
|
+
role: {
|
|
1562
|
+
type: String,
|
|
1563
|
+
default: DropdownRole.menu,
|
|
1564
|
+
validator: (value) => Object.values(DropdownRole).includes(value)
|
|
1565
|
+
}
|
|
1566
|
+
};
|
|
1567
|
+
const VvDropdownItemProps = {
|
|
1568
|
+
focusOnHover: {
|
|
1569
|
+
type: Boolean,
|
|
1570
|
+
default: false
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
const VvDropdownOptionProps = {
|
|
1574
|
+
...DisabledProps,
|
|
1575
|
+
...SelectedProps,
|
|
1576
|
+
...UnselectableProps,
|
|
1577
|
+
...ModifiersProps,
|
|
1578
|
+
deselectHintLabel: {
|
|
1579
|
+
type: String
|
|
1633
1580
|
},
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1581
|
+
selectHintLabel: {
|
|
1582
|
+
type: String
|
|
1583
|
+
},
|
|
1584
|
+
selectedHintLabel: {
|
|
1585
|
+
type: String
|
|
1586
|
+
},
|
|
1587
|
+
focusOnHover: {
|
|
1588
|
+
type: Boolean,
|
|
1589
|
+
default: false
|
|
1590
|
+
}
|
|
1638
1591
|
};
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1592
|
+
function useDropdownProvideTrigger({
|
|
1593
|
+
reference,
|
|
1594
|
+
id,
|
|
1595
|
+
expanded,
|
|
1596
|
+
aria
|
|
1597
|
+
}) {
|
|
1598
|
+
const bus = mitt();
|
|
1599
|
+
const component = defineComponent({
|
|
1600
|
+
name: "VvDropdownTriggerProvider",
|
|
1601
|
+
setup() {
|
|
1602
|
+
provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
|
|
1603
|
+
reference,
|
|
1604
|
+
id,
|
|
1605
|
+
expanded,
|
|
1606
|
+
aria,
|
|
1607
|
+
bus
|
|
1608
|
+
});
|
|
1609
|
+
},
|
|
1610
|
+
render() {
|
|
1611
|
+
var _a, _b;
|
|
1612
|
+
return h(Fragment, {}, (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a));
|
|
1652
1613
|
}
|
|
1653
|
-
const componentDefaults = volverComponentDefaults.value;
|
|
1654
|
-
const simplifiedPropsDefinition = propsDefinition;
|
|
1655
|
-
const simplifiedProps = props;
|
|
1656
|
-
return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
|
|
1657
|
-
const propValue = simplifiedProps[key];
|
|
1658
|
-
acc[key] = propValue;
|
|
1659
|
-
if (key in componentDefaults) {
|
|
1660
|
-
if (Array.isArray(simplifiedPropsDefinition[key])) {
|
|
1661
|
-
const typeArray = simplifiedPropsDefinition[key];
|
|
1662
|
-
if (typeArray.length) {
|
|
1663
|
-
const typeFunction = typeArray[0];
|
|
1664
|
-
if (typeFunction === propValue) {
|
|
1665
|
-
acc[key] = componentDefaults[key];
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
if (typeof simplifiedPropsDefinition[key] === "function") {
|
|
1670
|
-
const typeFunction = simplifiedPropsDefinition[key];
|
|
1671
|
-
if (typeFunction() === propValue) {
|
|
1672
|
-
acc[key] = componentDefaults[key];
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
if (typeof simplifiedPropsDefinition[key] === "object") {
|
|
1676
|
-
let defaultValue = simplifiedPropsDefinition[key].default;
|
|
1677
|
-
if (typeof defaultValue === "function") {
|
|
1678
|
-
defaultValue = defaultValue();
|
|
1679
|
-
}
|
|
1680
|
-
if (typeof defaultValue === "object") {
|
|
1681
|
-
if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
|
|
1682
|
-
acc[key] = componentDefaults[key];
|
|
1683
|
-
}
|
|
1684
|
-
} else if (defaultValue === propValue) {
|
|
1685
|
-
acc[key] = componentDefaults[key];
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
return acc;
|
|
1690
|
-
}, {});
|
|
1691
|
-
});
|
|
1692
|
-
}
|
|
1693
|
-
function useComponentFocus(inputTemplateRef, emit) {
|
|
1694
|
-
const { focused } = useFocus(inputTemplateRef);
|
|
1695
|
-
watch(focused, (newValue) => {
|
|
1696
|
-
emit(newValue ? "focus" : "blur", unref(inputTemplateRef));
|
|
1697
1614
|
});
|
|
1698
1615
|
return {
|
|
1699
|
-
|
|
1616
|
+
bus,
|
|
1617
|
+
component
|
|
1700
1618
|
};
|
|
1701
1619
|
}
|
|
1702
|
-
function
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
const
|
|
1707
|
-
() =>
|
|
1708
|
-
);
|
|
1709
|
-
const hasIconLeft = computed(
|
|
1710
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
|
|
1711
|
-
);
|
|
1712
|
-
const hasIconRight = computed(
|
|
1713
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
|
|
1714
|
-
);
|
|
1715
|
-
const hasIconTop = computed(
|
|
1716
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
|
|
1717
|
-
);
|
|
1718
|
-
const hasIconBottom = computed(
|
|
1719
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
|
|
1620
|
+
function useDropdownProvideItem({
|
|
1621
|
+
role,
|
|
1622
|
+
...others
|
|
1623
|
+
}) {
|
|
1624
|
+
const itemRole = computed(
|
|
1625
|
+
() => role.value === DropdownRole.listbox ? DropdownItemRole.option : DropdownItemRole.presentation
|
|
1720
1626
|
);
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
}
|
|
1725
|
-
return icon == null ? void 0 : icon.value;
|
|
1627
|
+
provide(INJECTION_KEY_DROPDOWN_ITEM, {
|
|
1628
|
+
role: itemRole,
|
|
1629
|
+
...others
|
|
1726
1630
|
});
|
|
1727
|
-
return {
|
|
1728
|
-
hasIcon,
|
|
1729
|
-
hasIconLeft,
|
|
1730
|
-
hasIconRight,
|
|
1731
|
-
hasIconTop,
|
|
1732
|
-
hasIconBottom,
|
|
1733
|
-
hasIconBefore,
|
|
1734
|
-
hasIconAfter
|
|
1735
|
-
};
|
|
1631
|
+
return { itemRole };
|
|
1736
1632
|
}
|
|
1737
|
-
function
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
);
|
|
1745
|
-
};
|
|
1746
|
-
const getOptionValue = (option) => {
|
|
1747
|
-
if (typeof option !== "object" && option !== null)
|
|
1748
|
-
return option;
|
|
1749
|
-
return typeof valueKey.value === "function" ? valueKey.value(option) : get(option, valueKey.value);
|
|
1750
|
-
};
|
|
1751
|
-
const isOptionDisabled = (option) => {
|
|
1752
|
-
if (typeof option !== "object" && option !== null)
|
|
1753
|
-
return false;
|
|
1754
|
-
return typeof disabledKey.value === "function" ? disabledKey.value(option) : get(option, disabledKey.value);
|
|
1755
|
-
};
|
|
1756
|
-
const getOptionGrouped = (option) => {
|
|
1757
|
-
if (typeof option !== "object" && option !== null)
|
|
1758
|
-
return [];
|
|
1759
|
-
return option.options || [];
|
|
1760
|
-
};
|
|
1761
|
-
return {
|
|
1762
|
-
options,
|
|
1763
|
-
getOptionLabel,
|
|
1764
|
-
getOptionValue,
|
|
1765
|
-
isOptionDisabled,
|
|
1766
|
-
getOptionGrouped
|
|
1767
|
-
};
|
|
1633
|
+
function useDropdownProvideAction({
|
|
1634
|
+
expanded
|
|
1635
|
+
}) {
|
|
1636
|
+
provide(INJECTION_KEY_DROPDOWN_ACTION, {
|
|
1637
|
+
role: ref(ActionRoles.menuitem),
|
|
1638
|
+
expanded
|
|
1639
|
+
});
|
|
1768
1640
|
}
|
|
1769
|
-
const _hoisted_1$
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
class: "vv-select__input-before"
|
|
1774
|
-
};
|
|
1775
|
-
const _hoisted_4$1 = { class: "vv-select__inner" };
|
|
1776
|
-
const _hoisted_5$1 = ["id"];
|
|
1777
|
-
const _hoisted_6$1 = ["disabled", "hidden"];
|
|
1778
|
-
const _hoisted_7$1 = ["disabled", "value"];
|
|
1779
|
-
const _hoisted_8$1 = ["disabled", "label"];
|
|
1780
|
-
const _hoisted_9$1 = ["disabled", "value"];
|
|
1781
|
-
const _hoisted_10 = {
|
|
1782
|
-
key: 1,
|
|
1783
|
-
class: "vv-select__input-after"
|
|
1784
|
-
};
|
|
1785
|
-
const __default__$4 = {
|
|
1786
|
-
name: "VvSelect"
|
|
1641
|
+
const _hoisted_1$4 = ["id", "tabindex", "role", "aria-labelledby"];
|
|
1642
|
+
const __default__$5 = {
|
|
1643
|
+
name: "VvDropdown",
|
|
1644
|
+
inheritAttrs: false
|
|
1787
1645
|
};
|
|
1788
|
-
const _sfc_main$
|
|
1789
|
-
...__default__$
|
|
1790
|
-
props:
|
|
1791
|
-
emits:
|
|
1792
|
-
|
|
1646
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1647
|
+
...__default__$5,
|
|
1648
|
+
props: VvDropdownProps,
|
|
1649
|
+
emits: [
|
|
1650
|
+
"update:modelValue",
|
|
1651
|
+
"beforeEnter",
|
|
1652
|
+
"afterLeave",
|
|
1653
|
+
"beforeExpand",
|
|
1654
|
+
"beforeCollapse",
|
|
1655
|
+
"afterExpand",
|
|
1656
|
+
"afterCollapse",
|
|
1657
|
+
"before-enter",
|
|
1658
|
+
"after-leave",
|
|
1659
|
+
"enter",
|
|
1660
|
+
"afterEnter",
|
|
1661
|
+
"enterCancelled",
|
|
1662
|
+
"beforeLeave",
|
|
1663
|
+
"leave",
|
|
1664
|
+
"leaveCancelled"
|
|
1665
|
+
],
|
|
1666
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1793
1667
|
const props = __props;
|
|
1794
|
-
const
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1668
|
+
const emit = __emit;
|
|
1669
|
+
const { id } = toRefs(props);
|
|
1670
|
+
const hasId = useUniqueId(id);
|
|
1671
|
+
const attrs = useAttrs();
|
|
1672
|
+
const maxWidth = ref("auto");
|
|
1673
|
+
const maxHeight = ref("auto");
|
|
1674
|
+
const localReferenceEl = ref();
|
|
1675
|
+
const floatingEl = ref();
|
|
1676
|
+
const arrowEl = ref();
|
|
1677
|
+
const listEl = ref();
|
|
1678
|
+
const referenceEl = computed({
|
|
1679
|
+
get: () => props.reference ?? localReferenceEl.value,
|
|
1680
|
+
set: (newValue) => {
|
|
1681
|
+
localReferenceEl.value = newValue;
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
const hasCustomPosition = ref(false);
|
|
1685
|
+
onMounted(() => {
|
|
1686
|
+
useMutationObserver(
|
|
1687
|
+
floatingEl.value,
|
|
1688
|
+
() => {
|
|
1689
|
+
var _a;
|
|
1690
|
+
hasCustomPosition.value = ((_a = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")) == null ? void 0 : _a.trim()) === "true";
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
attributeFilter: ["style"],
|
|
1694
|
+
window
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
});
|
|
1698
|
+
const middleware = computed(() => {
|
|
1699
|
+
const toReturn = [];
|
|
1700
|
+
if (props.autoPlacement) {
|
|
1701
|
+
if (typeof props.autoPlacement === "boolean") {
|
|
1702
|
+
toReturn.push(autoPlacement());
|
|
1703
|
+
} else {
|
|
1704
|
+
toReturn.push(
|
|
1705
|
+
autoPlacement(props.autoPlacement)
|
|
1706
|
+
);
|
|
1707
|
+
}
|
|
1708
|
+
} else if (props.flip) {
|
|
1709
|
+
if (typeof props.flip === "boolean") {
|
|
1710
|
+
toReturn.push(flip({ fallbackStrategy: "initialPlacement" }));
|
|
1711
|
+
} else {
|
|
1712
|
+
toReturn.push(flip(props.flip));
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
if (props.shift) {
|
|
1716
|
+
if (typeof props.shift === "boolean") {
|
|
1717
|
+
toReturn.push(shift());
|
|
1718
|
+
} else {
|
|
1719
|
+
toReturn.push(shift(props.shift));
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
if (props.size) {
|
|
1723
|
+
const apply = ({
|
|
1724
|
+
availableWidth,
|
|
1725
|
+
availableHeight
|
|
1726
|
+
}) => {
|
|
1727
|
+
maxWidth.value = `${availableWidth}px`;
|
|
1728
|
+
maxHeight.value = `${availableHeight}px`;
|
|
1729
|
+
};
|
|
1730
|
+
if (typeof props.size === "boolean") {
|
|
1731
|
+
toReturn.push(
|
|
1732
|
+
size({
|
|
1733
|
+
apply
|
|
1734
|
+
})
|
|
1735
|
+
);
|
|
1736
|
+
} else {
|
|
1737
|
+
toReturn.push(
|
|
1738
|
+
size({
|
|
1739
|
+
...props.size,
|
|
1740
|
+
apply
|
|
1741
|
+
})
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
if (props.offset) {
|
|
1746
|
+
toReturn.push(offset(Number(props.offset)));
|
|
1747
|
+
if (["string", "number"].includes(typeof props.offset)) {
|
|
1748
|
+
toReturn.push(offset(Number(props.offset)));
|
|
1749
|
+
} else {
|
|
1750
|
+
toReturn.push(offset(props.offset));
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
if (props.arrow) {
|
|
1754
|
+
toReturn.push(
|
|
1755
|
+
arrow({
|
|
1756
|
+
element: arrowEl
|
|
1757
|
+
})
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
return toReturn;
|
|
1761
|
+
});
|
|
1762
|
+
const { x, y, middlewareData, placement, strategy } = useFloating(
|
|
1763
|
+
referenceEl,
|
|
1764
|
+
floatingEl,
|
|
1765
|
+
{
|
|
1766
|
+
whileElementsMounted: (...args) => {
|
|
1767
|
+
return autoUpdate(...args, {
|
|
1768
|
+
animationFrame: props.strategy === Strategy.fixed
|
|
1769
|
+
});
|
|
1770
|
+
},
|
|
1771
|
+
placement: computed(() => props.placement),
|
|
1772
|
+
strategy: computed(() => props.strategy),
|
|
1773
|
+
middleware
|
|
1774
|
+
}
|
|
1799
1775
|
);
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
hasInvalidLabelOrSlot,
|
|
1805
|
-
hintSlotScope
|
|
1806
|
-
} = HintSlotFactory(propsDefaults, slots);
|
|
1807
|
-
const {
|
|
1808
|
-
id,
|
|
1809
|
-
modifiers,
|
|
1810
|
-
disabled,
|
|
1811
|
-
readonly,
|
|
1812
|
-
loading,
|
|
1813
|
-
icon,
|
|
1814
|
-
iconPosition,
|
|
1815
|
-
invalid,
|
|
1816
|
-
valid,
|
|
1817
|
-
floating,
|
|
1818
|
-
multiple
|
|
1819
|
-
} = toRefs(props);
|
|
1820
|
-
const hasId = useUniqueId(id);
|
|
1821
|
-
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
1822
|
-
const { focused } = useComponentFocus(select, emit);
|
|
1823
|
-
const isVisible = useElementVisibility(select);
|
|
1824
|
-
watch(isVisible, (newValue) => {
|
|
1825
|
-
if (newValue && props.autofocus) {
|
|
1826
|
-
focused.value = true;
|
|
1776
|
+
const dropdownPlacement = computed(() => {
|
|
1777
|
+
var _a;
|
|
1778
|
+
if (hasCustomPosition.value) {
|
|
1779
|
+
return void 0;
|
|
1827
1780
|
}
|
|
1781
|
+
const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
|
|
1782
|
+
return {
|
|
1783
|
+
position: strategy.value,
|
|
1784
|
+
top: `${y.value ?? 0}px`,
|
|
1785
|
+
left: `${x.value ?? 0}px`,
|
|
1786
|
+
maxWidth: width ? void 0 : maxWidth.value,
|
|
1787
|
+
maxHeight: maxHeight.value,
|
|
1788
|
+
width
|
|
1789
|
+
};
|
|
1828
1790
|
});
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1831
|
-
iconPosition
|
|
1791
|
+
const side = computed(
|
|
1792
|
+
() => placement.value.split("-")[0]
|
|
1832
1793
|
);
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1794
|
+
const arrowPlacement = computed(() => {
|
|
1795
|
+
var _a, _b, _c, _d, _e;
|
|
1796
|
+
if (hasCustomPosition.value) {
|
|
1797
|
+
return void 0;
|
|
1798
|
+
}
|
|
1799
|
+
const staticSide = {
|
|
1800
|
+
[Side.top]: Side.bottom,
|
|
1801
|
+
[Side.right]: Side.left,
|
|
1802
|
+
[Side.bottom]: Side.top,
|
|
1803
|
+
[Side.left]: Side.right
|
|
1804
|
+
}[side.value];
|
|
1805
|
+
return {
|
|
1806
|
+
left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
|
|
1807
|
+
top: ((_c = middlewareData.value.arrow) == null ? void 0 : _c.y) !== void 0 ? `${(_d = middlewareData.value.arrow) == null ? void 0 : _d.y}px` : void 0,
|
|
1808
|
+
[staticSide]: `${-(((_e = arrowEl.value) == null ? void 0 : _e.offsetWidth) ?? 0) / 2}px`
|
|
1809
|
+
};
|
|
1837
1810
|
});
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1840
|
-
|
|
1811
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
1812
|
+
const localModelValue = ref(false);
|
|
1813
|
+
const expanded = computed({
|
|
1814
|
+
get: () => modelValue.value ?? localModelValue.value,
|
|
1815
|
+
set: (newValue) => {
|
|
1816
|
+
if (modelValue.value === void 0) {
|
|
1817
|
+
localModelValue.value = newValue;
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
modelValue.value = newValue;
|
|
1841
1821
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1822
|
+
});
|
|
1823
|
+
function show() {
|
|
1824
|
+
expanded.value = true;
|
|
1825
|
+
}
|
|
1826
|
+
function hide() {
|
|
1827
|
+
expanded.value = false;
|
|
1828
|
+
}
|
|
1829
|
+
function toggle() {
|
|
1830
|
+
expanded.value = !expanded.value;
|
|
1831
|
+
}
|
|
1832
|
+
function init(el) {
|
|
1833
|
+
referenceEl.value = el;
|
|
1834
|
+
}
|
|
1835
|
+
__expose({
|
|
1836
|
+
toggle,
|
|
1837
|
+
show,
|
|
1838
|
+
hide,
|
|
1839
|
+
init,
|
|
1840
|
+
customPosition: hasCustomPosition
|
|
1841
|
+
});
|
|
1842
|
+
watch(expanded, (newValue) => {
|
|
1843
|
+
if (newValue && props.autofocusFirst) {
|
|
1844
|
+
nextTick(() => {
|
|
1845
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1846
|
+
floatingEl.value
|
|
1847
|
+
);
|
|
1848
|
+
if (focusableElements.length > 0) {
|
|
1849
|
+
focusableElements[0].focus({
|
|
1850
|
+
preventScroll: true
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1844
1854
|
}
|
|
1845
|
-
return void 0;
|
|
1846
1855
|
});
|
|
1856
|
+
onClickOutside(
|
|
1857
|
+
floatingEl,
|
|
1858
|
+
() => {
|
|
1859
|
+
if (!props.keepOpen && expanded.value) {
|
|
1860
|
+
expanded.value = false;
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
{ ignore: [referenceEl] }
|
|
1864
|
+
);
|
|
1865
|
+
const hasAriaLabelledby = computed(() => {
|
|
1866
|
+
var _a, _b;
|
|
1867
|
+
return ((_b = (_a = referenceEl.value) == null ? void 0 : _a.getAttribute) == null ? void 0 : _b.call(_a, "id")) ?? void 0;
|
|
1868
|
+
});
|
|
1869
|
+
const referenceAria = computed(() => ({
|
|
1870
|
+
"aria-controls": hasId.value,
|
|
1871
|
+
"aria-haspopup": true,
|
|
1872
|
+
"aria-expanded": expanded.value
|
|
1873
|
+
}));
|
|
1874
|
+
const { component: VvDropdownTriggerProvider, bus } = useDropdownProvideTrigger({
|
|
1875
|
+
reference: referenceEl,
|
|
1876
|
+
id: hasId,
|
|
1877
|
+
expanded,
|
|
1878
|
+
aria: referenceAria
|
|
1879
|
+
});
|
|
1880
|
+
bus.on("click", toggle);
|
|
1881
|
+
const { role, modifiers } = toRefs(props);
|
|
1847
1882
|
const bemCssClasses = useModifiers(
|
|
1848
|
-
"vv-
|
|
1883
|
+
"vv-dropdown",
|
|
1849
1884
|
modifiers,
|
|
1850
1885
|
computed(() => ({
|
|
1851
|
-
|
|
1852
|
-
invalid: invalid.value,
|
|
1853
|
-
loading: loading.value,
|
|
1854
|
-
disabled: disabled.value,
|
|
1855
|
-
readonly: readonly.value,
|
|
1856
|
-
"icon-before": hasIconBefore.value,
|
|
1857
|
-
"icon-after": hasIconAfter.value,
|
|
1858
|
-
dirty: isDirty.value,
|
|
1859
|
-
focus: focused.value,
|
|
1860
|
-
floating: floating.value,
|
|
1861
|
-
multiple: multiple.value
|
|
1886
|
+
arrow: props.arrow
|
|
1862
1887
|
}))
|
|
1863
1888
|
);
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
"
|
|
1875
|
-
|
|
1876
|
-
|
|
1889
|
+
const { focused } = useFocusWithin(floatingEl);
|
|
1890
|
+
function getKeyboardFocusableElements(element) {
|
|
1891
|
+
if (!element) {
|
|
1892
|
+
return [];
|
|
1893
|
+
}
|
|
1894
|
+
return [
|
|
1895
|
+
...element.querySelectorAll(
|
|
1896
|
+
'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
1897
|
+
)
|
|
1898
|
+
].filter(
|
|
1899
|
+
(el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
function focusNext() {
|
|
1903
|
+
nextTick(() => {
|
|
1904
|
+
if (focused.value) {
|
|
1905
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1906
|
+
floatingEl.value
|
|
1907
|
+
);
|
|
1908
|
+
if (focusableElements.length === 0 || !document.activeElement) {
|
|
1909
|
+
return;
|
|
1910
|
+
}
|
|
1911
|
+
const activeElementIndex = focusableElements.indexOf(
|
|
1912
|
+
document.activeElement
|
|
1913
|
+
);
|
|
1914
|
+
if (activeElementIndex < focusableElements.length - 1) {
|
|
1915
|
+
focusableElements[activeElementIndex + 1].focus({
|
|
1916
|
+
preventScroll: true
|
|
1917
|
+
});
|
|
1918
|
+
} else {
|
|
1919
|
+
focusableElements[0].focus({
|
|
1920
|
+
preventScroll: true
|
|
1921
|
+
});
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
function focusPrev() {
|
|
1927
|
+
nextTick(() => {
|
|
1928
|
+
if (focused.value) {
|
|
1929
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1930
|
+
floatingEl.value
|
|
1931
|
+
);
|
|
1932
|
+
if (focusableElements.length === 0 || !document.activeElement) {
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1935
|
+
const activeElementIndex = focusableElements.indexOf(
|
|
1936
|
+
document.activeElement
|
|
1937
|
+
);
|
|
1938
|
+
if (activeElementIndex > 0) {
|
|
1939
|
+
focusableElements[activeElementIndex - 1].focus({
|
|
1940
|
+
preventScroll: true
|
|
1941
|
+
});
|
|
1942
|
+
} else {
|
|
1943
|
+
focusableElements[focusableElements.length - 1].focus({
|
|
1944
|
+
preventScroll: true
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
});
|
|
1949
|
+
}
|
|
1950
|
+
const hovered = useElementHover(floatingEl);
|
|
1951
|
+
const { itemRole } = useDropdownProvideItem({
|
|
1952
|
+
role,
|
|
1953
|
+
expanded,
|
|
1954
|
+
focused,
|
|
1955
|
+
hovered
|
|
1956
|
+
});
|
|
1957
|
+
onKeyStroke("Escape", (e) => {
|
|
1958
|
+
if (expanded.value) {
|
|
1959
|
+
e.preventDefault();
|
|
1960
|
+
hide();
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
onKeyStroke("ArrowDown", (e) => {
|
|
1964
|
+
if (expanded.value && focused.value) {
|
|
1965
|
+
e.preventDefault();
|
|
1966
|
+
focusNext();
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
onKeyStroke("ArrowUp", (e) => {
|
|
1970
|
+
if (expanded.value && focused.value) {
|
|
1971
|
+
e.preventDefault();
|
|
1972
|
+
focusPrev();
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1975
|
+
onKeyStroke([" ", "Enter"], (e) => {
|
|
1976
|
+
const htmlEl = e.target;
|
|
1977
|
+
if (expanded.value && focused.value && htmlEl) {
|
|
1978
|
+
htmlEl == null ? void 0 : htmlEl.click();
|
|
1979
|
+
}
|
|
1877
1980
|
});
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
}));
|
|
1883
|
-
const {
|
|
1884
|
-
getOptionLabel,
|
|
1885
|
-
getOptionValue,
|
|
1886
|
-
isOptionDisabled,
|
|
1887
|
-
getOptionGrouped
|
|
1888
|
-
} = useOptions(props);
|
|
1889
|
-
const localModelValue = computed({
|
|
1890
|
-
get: () => {
|
|
1891
|
-
return props.modelValue;
|
|
1981
|
+
const dropdownTransitionHandlers = {
|
|
1982
|
+
"before-enter": () => {
|
|
1983
|
+
emit(expanded.value ? "beforeExpand" : "beforeCollapse");
|
|
1984
|
+
emit("beforeEnter");
|
|
1892
1985
|
},
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1986
|
+
"after-leave": () => {
|
|
1987
|
+
emit(expanded.value ? "afterExpand" : "afterCollapse");
|
|
1988
|
+
emit("afterLeave");
|
|
1989
|
+
},
|
|
1990
|
+
"enter": () => {
|
|
1991
|
+
emit("enter");
|
|
1992
|
+
},
|
|
1993
|
+
"after-enter": () => {
|
|
1994
|
+
emit("afterEnter");
|
|
1995
|
+
},
|
|
1996
|
+
"enter-cancelled": () => {
|
|
1997
|
+
emit("enterCancelled");
|
|
1998
|
+
},
|
|
1999
|
+
"before-leave": () => {
|
|
2000
|
+
emit("beforeLeave");
|
|
2001
|
+
},
|
|
2002
|
+
"leave": () => {
|
|
2003
|
+
emit("leave");
|
|
2004
|
+
},
|
|
2005
|
+
"leave-cancelled": () => {
|
|
2006
|
+
emit("leaveCancelled");
|
|
1898
2007
|
}
|
|
1899
|
-
});
|
|
1900
|
-
const isGroup = (option) => {
|
|
1901
|
-
if (typeof option === "string")
|
|
1902
|
-
return false;
|
|
1903
|
-
return option && option.options && option.options.length > 0;
|
|
1904
2008
|
};
|
|
1905
2009
|
return (_ctx, _cache) => {
|
|
1906
|
-
return openBlock(), createElementBlock(
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
createElementVNode("div", _hoisted_2$2, [
|
|
1914
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1915
|
-
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1916
|
-
])) : createCommentVNode("", true),
|
|
1917
|
-
createElementVNode("div", _hoisted_4$1, [
|
|
1918
|
-
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
|
|
1919
|
-
key: 0,
|
|
1920
|
-
class: "vv-select__icon"
|
|
1921
|
-
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
1922
|
-
withDirectives(createElementVNode("select", mergeProps({
|
|
1923
|
-
id: unref(hasId),
|
|
1924
|
-
ref_key: "select",
|
|
1925
|
-
ref: select,
|
|
1926
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
|
|
1927
|
-
}, unref(hasAttrs)), [
|
|
1928
|
-
_ctx.placeholder ? (openBlock(), createElementBlock("option", {
|
|
1929
|
-
key: 0,
|
|
1930
|
-
value: void 0,
|
|
1931
|
-
disabled: !_ctx.unselectable,
|
|
1932
|
-
hidden: !_ctx.unselectable
|
|
1933
|
-
}, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("", true),
|
|
1934
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
|
|
1935
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1936
|
-
!isGroup(option) ? (openBlock(), createElementBlock("option", {
|
|
1937
|
-
key: index,
|
|
1938
|
-
disabled: unref(isOptionDisabled)(option),
|
|
1939
|
-
value: unref(getOptionValue)(option)
|
|
1940
|
-
}, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
|
|
1941
|
-
key: `group-${index}`,
|
|
1942
|
-
disabled: unref(isOptionDisabled)(option),
|
|
1943
|
-
label: unref(getOptionLabel)(option)
|
|
1944
|
-
}, [
|
|
1945
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
|
|
1946
|
-
return openBlock(), createElementBlock("option", {
|
|
1947
|
-
key: `group-${index}-item-${i}`,
|
|
1948
|
-
disabled: unref(isOptionDisabled)(item),
|
|
1949
|
-
value: unref(getOptionValue)(item)
|
|
1950
|
-
}, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
|
|
1951
|
-
}), 128))
|
|
1952
|
-
], 8, _hoisted_8$1))
|
|
1953
|
-
], 64);
|
|
1954
|
-
}), 256))
|
|
1955
|
-
], 16, _hoisted_5$1), [
|
|
1956
|
-
[vModelSelect, unref(localModelValue)]
|
|
1957
|
-
]),
|
|
1958
|
-
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
|
|
1959
|
-
key: 1,
|
|
1960
|
-
class: "vv-select__icon vv-select__icon-after"
|
|
1961
|
-
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
|
|
1962
|
-
]),
|
|
1963
|
-
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
1964
|
-
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1965
|
-
])) : createCommentVNode("", true)
|
|
1966
|
-
]),
|
|
1967
|
-
createVNode(unref(HintSlot), {
|
|
1968
|
-
id: unref(hasHintId),
|
|
1969
|
-
class: "vv-select__hint"
|
|
1970
|
-
}, createSlots({ _: 2 }, [
|
|
1971
|
-
_ctx.$slots.hint ? {
|
|
1972
|
-
name: "hint",
|
|
1973
|
-
fn: withCtx(() => [
|
|
1974
|
-
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1975
|
-
]),
|
|
1976
|
-
key: "0"
|
|
1977
|
-
} : void 0,
|
|
1978
|
-
_ctx.$slots.loading ? {
|
|
1979
|
-
name: "loading",
|
|
1980
|
-
fn: withCtx(() => [
|
|
1981
|
-
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1982
|
-
]),
|
|
1983
|
-
key: "1"
|
|
1984
|
-
} : void 0,
|
|
1985
|
-
_ctx.$slots.valid ? {
|
|
1986
|
-
name: "valid",
|
|
1987
|
-
fn: withCtx(() => [
|
|
1988
|
-
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2010
|
+
return openBlock(), createElementBlock(
|
|
2011
|
+
Fragment,
|
|
2012
|
+
null,
|
|
2013
|
+
[
|
|
2014
|
+
createVNode(unref(VvDropdownTriggerProvider), null, {
|
|
2015
|
+
default: withCtx(() => [
|
|
2016
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
|
|
1989
2017
|
]),
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
2018
|
+
_: 3
|
|
2019
|
+
/* FORWARDED */
|
|
2020
|
+
}),
|
|
2021
|
+
createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
|
|
2022
|
+
default: withCtx(() => [
|
|
2023
|
+
withDirectives(createElementVNode(
|
|
2024
|
+
"div",
|
|
2025
|
+
{
|
|
2026
|
+
ref_key: "floatingEl",
|
|
2027
|
+
ref: floatingEl,
|
|
2028
|
+
style: normalizeStyle(unref(dropdownPlacement)),
|
|
2029
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
2030
|
+
},
|
|
2031
|
+
[
|
|
2032
|
+
props.arrow ? (openBlock(), createElementBlock(
|
|
2033
|
+
"div",
|
|
2034
|
+
{
|
|
2035
|
+
key: 0,
|
|
2036
|
+
ref_key: "arrowEl",
|
|
2037
|
+
ref: arrowEl,
|
|
2038
|
+
style: normalizeStyle(unref(arrowPlacement)),
|
|
2039
|
+
class: "vv-dropdown__arrow"
|
|
2040
|
+
},
|
|
2041
|
+
null,
|
|
2042
|
+
4
|
|
2043
|
+
/* STYLE */
|
|
2044
|
+
)) : createCommentVNode("v-if", true),
|
|
2045
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
|
|
2046
|
+
createElementVNode("div", mergeProps(unref(attrs), {
|
|
2047
|
+
id: unref(hasId),
|
|
2048
|
+
ref_key: "listEl",
|
|
2049
|
+
ref: listEl,
|
|
2050
|
+
tabindex: !unref(expanded) ? -1 : void 0,
|
|
2051
|
+
role: unref(role),
|
|
2052
|
+
"aria-labelledby": unref(hasAriaLabelledby),
|
|
2053
|
+
class: "vv-dropdown__list"
|
|
2054
|
+
}), [
|
|
2055
|
+
renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
|
|
2056
|
+
role: unref(itemRole)
|
|
2057
|
+
})))
|
|
2058
|
+
], 16, _hoisted_1$4),
|
|
2059
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
|
|
2060
|
+
],
|
|
2061
|
+
6
|
|
2062
|
+
/* CLASS, STYLE */
|
|
2063
|
+
), [
|
|
2064
|
+
[vShow, unref(expanded)]
|
|
2065
|
+
])
|
|
1996
2066
|
]),
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2067
|
+
_: 3
|
|
2068
|
+
/* FORWARDED */
|
|
2069
|
+
}, 16, ["name"])
|
|
2070
|
+
],
|
|
2071
|
+
64
|
|
2072
|
+
/* STABLE_FRAGMENT */
|
|
2073
|
+
);
|
|
2001
2074
|
};
|
|
2002
2075
|
}
|
|
2003
2076
|
});
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2006
|
-
|
|
2077
|
+
const _hoisted_1$3 = {
|
|
2078
|
+
class: "vv-dropdown-optgroup",
|
|
2079
|
+
role: "presentation",
|
|
2080
|
+
tabindex: "-1"
|
|
2081
|
+
};
|
|
2082
|
+
const __default__$4 = {
|
|
2083
|
+
name: "VvDropdownOptgroup"
|
|
2007
2084
|
};
|
|
2085
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2086
|
+
...__default__$4,
|
|
2087
|
+
props: {
|
|
2088
|
+
...LabelProps
|
|
2089
|
+
},
|
|
2090
|
+
setup(__props) {
|
|
2091
|
+
const props = __props;
|
|
2092
|
+
return (_ctx, _cache) => {
|
|
2093
|
+
return openBlock(), createElementBlock(
|
|
2094
|
+
"li",
|
|
2095
|
+
_hoisted_1$3,
|
|
2096
|
+
toDisplayString(props.label),
|
|
2097
|
+
1
|
|
2098
|
+
/* TEXT */
|
|
2099
|
+
);
|
|
2100
|
+
};
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2008
2103
|
const __default__$3 = {
|
|
2009
|
-
name: "
|
|
2104
|
+
name: "VvDropdownItem"
|
|
2010
2105
|
};
|
|
2011
2106
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2012
2107
|
...__default__$3,
|
|
2013
|
-
props:
|
|
2108
|
+
props: VvDropdownItemProps,
|
|
2014
2109
|
setup(__props) {
|
|
2015
2110
|
const props = __props;
|
|
2016
|
-
const {
|
|
2017
|
-
const
|
|
2111
|
+
const { role, expanded } = useInjectedDropdownItem();
|
|
2112
|
+
const element = ref(null);
|
|
2113
|
+
useDropdownProvideAction({ expanded });
|
|
2114
|
+
const hovered = useElementHover(element);
|
|
2115
|
+
const { focused } = useFocus(element);
|
|
2116
|
+
const { focused: focusedWithin } = useFocusWithin(element);
|
|
2117
|
+
watch(hovered, (newValue) => {
|
|
2118
|
+
if (newValue && props.focusOnHover) {
|
|
2119
|
+
focused.value = true;
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
2018
2122
|
return (_ctx, _cache) => {
|
|
2019
|
-
return openBlock(), createElementBlock(
|
|
2020
|
-
|
|
2021
|
-
role:
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2123
|
+
return openBlock(), createElementBlock(
|
|
2124
|
+
"div",
|
|
2125
|
+
mergeProps({ role: unref(role) }, {
|
|
2126
|
+
ref_key: "element",
|
|
2127
|
+
ref: element,
|
|
2128
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
2129
|
+
}),
|
|
2130
|
+
[
|
|
2131
|
+
renderSlot(_ctx.$slots, "default")
|
|
2132
|
+
],
|
|
2133
|
+
16
|
|
2134
|
+
/* FULL_PROPS */
|
|
2135
|
+
);
|
|
2027
2136
|
};
|
|
2028
2137
|
}
|
|
2029
2138
|
});
|
|
2030
|
-
const
|
|
2031
|
-
const VvActionProps = ActionProps;
|
|
2139
|
+
const _hoisted_1$2 = ["title"];
|
|
2032
2140
|
const __default__$2 = {
|
|
2033
|
-
name: "
|
|
2141
|
+
name: "VvDropdownOption"
|
|
2034
2142
|
};
|
|
2035
2143
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2036
2144
|
...__default__$2,
|
|
2037
|
-
props:
|
|
2038
|
-
|
|
2039
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2145
|
+
props: VvDropdownOptionProps,
|
|
2146
|
+
setup(__props) {
|
|
2040
2147
|
const props = __props;
|
|
2041
|
-
const
|
|
2042
|
-
const
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
watch(
|
|
2051
|
-
() => element.value,
|
|
2052
|
-
(newValue) => {
|
|
2053
|
-
if (dropdownTriggerReference) {
|
|
2054
|
-
dropdownTriggerReference.value = newValue;
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2148
|
+
const { modifiers } = toRefs(props);
|
|
2149
|
+
const bemCssClasses = useModifiers(
|
|
2150
|
+
"vv-dropdown-option",
|
|
2151
|
+
modifiers,
|
|
2152
|
+
computed(() => ({
|
|
2153
|
+
disabled: props.disabled,
|
|
2154
|
+
selected: props.selected,
|
|
2155
|
+
unselectable: props.unselectable && props.selected
|
|
2156
|
+
}))
|
|
2057
2157
|
);
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
const { role } = useInjectedDropdownAction();
|
|
2062
|
-
const hasTag = computed(() => {
|
|
2063
|
-
switch (true) {
|
|
2064
|
-
case props.disabled:
|
|
2065
|
-
return ActionTag.button;
|
|
2066
|
-
case props.to !== void 0:
|
|
2067
|
-
return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
|
|
2068
|
-
case props.href !== void 0:
|
|
2069
|
-
return ActionTag.a;
|
|
2070
|
-
default:
|
|
2071
|
-
return ActionTag.button;
|
|
2158
|
+
const hintLabel = computed(() => {
|
|
2159
|
+
if (props.selected) {
|
|
2160
|
+
return props.unselectable ? props.deselectHintLabel : props.selectedHintLabel;
|
|
2072
2161
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
const toReturn = {
|
|
2076
|
-
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
2077
|
-
ariaPressed: pressed.value ? true : void 0,
|
|
2078
|
-
ariaLabel: props.ariaLabel,
|
|
2079
|
-
role: role == null ? void 0 : role.value
|
|
2080
|
-
};
|
|
2081
|
-
switch (hasTag.value) {
|
|
2082
|
-
case ActionTag.a:
|
|
2083
|
-
return {
|
|
2084
|
-
...toReturn,
|
|
2085
|
-
href: props.href,
|
|
2086
|
-
target: props.target,
|
|
2087
|
-
rel: props.rel
|
|
2088
|
-
};
|
|
2089
|
-
case ActionTag.routerLink:
|
|
2090
|
-
case ActionTag.nuxtLink:
|
|
2091
|
-
return {
|
|
2092
|
-
...toReturn,
|
|
2093
|
-
to: props.to,
|
|
2094
|
-
target: props.target
|
|
2095
|
-
};
|
|
2096
|
-
default:
|
|
2097
|
-
return {
|
|
2098
|
-
...toReturn,
|
|
2099
|
-
type: props.type,
|
|
2100
|
-
disabled: props.disabled
|
|
2101
|
-
};
|
|
2162
|
+
if (!props.disabled) {
|
|
2163
|
+
return props.selectHintLabel;
|
|
2102
2164
|
}
|
|
2165
|
+
return "";
|
|
2103
2166
|
});
|
|
2104
|
-
const onClick = (e) => {
|
|
2105
|
-
if (props.disabled) {
|
|
2106
|
-
e.preventDefault();
|
|
2107
|
-
return;
|
|
2108
|
-
}
|
|
2109
|
-
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
2110
|
-
emit("click", e);
|
|
2111
|
-
};
|
|
2112
|
-
const onMouseover = (e) => {
|
|
2113
|
-
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
2114
|
-
emit("mouseover", e);
|
|
2115
|
-
};
|
|
2116
|
-
const onMouseleave = (e) => {
|
|
2117
|
-
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
2118
|
-
emit("mouseleave", e);
|
|
2119
|
-
};
|
|
2120
2167
|
return (_ctx, _cache) => {
|
|
2121
|
-
return openBlock(), createBlock(
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
current: _ctx.current
|
|
2129
|
-
},
|
|
2130
|
-
onClickPassive: onClick,
|
|
2131
|
-
onMouseoverPassive: onMouseover,
|
|
2132
|
-
onMouseleavePassive: onMouseleave
|
|
2133
|
-
}), {
|
|
2168
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
2169
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
2170
|
+
tabindex: _ctx.disabled ? -1 : 0,
|
|
2171
|
+
"aria-selected": _ctx.selected,
|
|
2172
|
+
"aria-disabled": _ctx.disabled,
|
|
2173
|
+
"focus-on-hover": _ctx.focusOnHover
|
|
2174
|
+
}, {
|
|
2134
2175
|
default: withCtx(() => [
|
|
2135
|
-
renderSlot(_ctx.$slots, "default",
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
},
|
|
2154
|
-
set(value) {
|
|
2155
|
-
groupPropValue.value = value;
|
|
2156
|
-
}
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
const propRef = toRef(props, propName);
|
|
2160
|
-
return computed({
|
|
2161
|
-
get() {
|
|
2162
|
-
return propRef.value;
|
|
2163
|
-
},
|
|
2164
|
-
set(value) {
|
|
2165
|
-
if (emit)
|
|
2166
|
-
emit(`update:${propName}`, value);
|
|
2167
|
-
}
|
|
2168
|
-
});
|
|
2176
|
+
renderSlot(_ctx.$slots, "default"),
|
|
2177
|
+
createElementVNode("span", {
|
|
2178
|
+
class: "vv-dropdown-option__hint",
|
|
2179
|
+
title: unref(hintLabel)
|
|
2180
|
+
}, [
|
|
2181
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
2182
|
+
createTextVNode(
|
|
2183
|
+
toDisplayString(unref(hintLabel)),
|
|
2184
|
+
1
|
|
2185
|
+
/* TEXT */
|
|
2186
|
+
)
|
|
2187
|
+
])
|
|
2188
|
+
], 8, _hoisted_1$2)
|
|
2189
|
+
]),
|
|
2190
|
+
_: 3
|
|
2191
|
+
/* FORWARDED */
|
|
2192
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled", "focus-on-hover"]);
|
|
2193
|
+
};
|
|
2169
2194
|
}
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
...
|
|
2179
|
-
...
|
|
2195
|
+
});
|
|
2196
|
+
const VvSelectProps = {
|
|
2197
|
+
...IdNameProps,
|
|
2198
|
+
...AutofocusProps,
|
|
2199
|
+
...AutocompleteProps,
|
|
2200
|
+
...TabindexProps,
|
|
2201
|
+
...ValidProps,
|
|
2202
|
+
...InvalidProps,
|
|
2203
|
+
...HintProps,
|
|
2204
|
+
...LoadingProps,
|
|
2205
|
+
...DisabledProps,
|
|
2206
|
+
...ReadonlyProps,
|
|
2180
2207
|
...ModifiersProps,
|
|
2208
|
+
...OptionsProps,
|
|
2209
|
+
...IconProps,
|
|
2210
|
+
...FloatingLabelProps,
|
|
2181
2211
|
...UnselectableProps,
|
|
2182
|
-
...
|
|
2212
|
+
...LabelProps,
|
|
2183
2213
|
/**
|
|
2184
|
-
*
|
|
2214
|
+
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
2215
|
+
* If it is not specified, then only one option can be selected at a time.
|
|
2216
|
+
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
2217
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
2185
2218
|
*/
|
|
2186
|
-
|
|
2219
|
+
multiple: Boolean,
|
|
2187
2220
|
/**
|
|
2188
|
-
*
|
|
2221
|
+
* A Boolean attribute indicating that an option with a non-empty string value must be selected.
|
|
2222
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
2189
2223
|
*/
|
|
2190
|
-
|
|
2191
|
-
type: String,
|
|
2192
|
-
default: Side.left,
|
|
2193
|
-
validator: (value) => Object.values(Side).includes(value)
|
|
2194
|
-
},
|
|
2224
|
+
required: Boolean,
|
|
2195
2225
|
/**
|
|
2196
|
-
*
|
|
2226
|
+
* If the control is presented as a scrolling list box (e.g. when multiple is specified),
|
|
2227
|
+
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
2228
|
+
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
2229
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
2197
2230
|
*/
|
|
2198
|
-
|
|
2231
|
+
size: [String, Number],
|
|
2199
2232
|
/**
|
|
2200
|
-
*
|
|
2233
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
2201
2234
|
*/
|
|
2202
|
-
|
|
2235
|
+
modelValue: {
|
|
2236
|
+
type: [String, Number, Boolean, Object, Array],
|
|
2237
|
+
default: void 0
|
|
2238
|
+
},
|
|
2239
|
+
/**
|
|
2240
|
+
* Select first option automatically
|
|
2241
|
+
*/
|
|
2242
|
+
autoselectFirst: {
|
|
2203
2243
|
type: Boolean,
|
|
2204
2244
|
default: false
|
|
2205
2245
|
},
|
|
2206
2246
|
/**
|
|
2207
|
-
*
|
|
2247
|
+
* Select placeholder
|
|
2208
2248
|
*/
|
|
2209
|
-
|
|
2210
|
-
type: [String, Number, Boolean],
|
|
2211
|
-
default: void 0
|
|
2212
|
-
},
|
|
2249
|
+
placeholder: String,
|
|
2213
2250
|
/**
|
|
2214
|
-
*
|
|
2251
|
+
* VvIcon name for clear button
|
|
2252
|
+
* @see VvIcon
|
|
2215
2253
|
*/
|
|
2216
|
-
|
|
2217
|
-
type: [String,
|
|
2218
|
-
default:
|
|
2254
|
+
iconClear: {
|
|
2255
|
+
type: [String, Object],
|
|
2256
|
+
default: ACTION_ICONS.clear
|
|
2219
2257
|
},
|
|
2220
2258
|
/**
|
|
2221
|
-
*
|
|
2259
|
+
* Label for clear button
|
|
2222
2260
|
*/
|
|
2223
|
-
|
|
2224
|
-
type:
|
|
2225
|
-
default:
|
|
2261
|
+
labelClear: {
|
|
2262
|
+
type: String,
|
|
2263
|
+
default: "Clear"
|
|
2226
2264
|
}
|
|
2227
2265
|
};
|
|
2228
|
-
function
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
props
|
|
2236
|
-
);
|
|
2237
|
-
const multiple = computed(() => (group == null ? void 0 : group.value.multiple.value) ?? false);
|
|
2238
|
-
const modifiers = computed(() => {
|
|
2239
|
-
let localModifiers = props.modifiers;
|
|
2240
|
-
let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
|
|
2241
|
-
const toReturn = /* @__PURE__ */ new Set();
|
|
2242
|
-
if (localModifiers) {
|
|
2243
|
-
if (!Array.isArray(localModifiers)) {
|
|
2244
|
-
localModifiers = localModifiers.split(" ");
|
|
2245
|
-
}
|
|
2246
|
-
localModifiers.forEach((modifier) => toReturn.add(modifier));
|
|
2266
|
+
function useVvSelectProps() {
|
|
2267
|
+
return {
|
|
2268
|
+
...VvSelectProps,
|
|
2269
|
+
options: {
|
|
2270
|
+
...VvSelectProps.options,
|
|
2271
|
+
type: Array,
|
|
2272
|
+
default: () => []
|
|
2247
2273
|
}
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2274
|
+
};
|
|
2275
|
+
}
|
|
2276
|
+
function useDefaults(componentName, propsDefinition, props) {
|
|
2277
|
+
const volver = useVolver();
|
|
2278
|
+
const volverComponentDefaults = computed(() => {
|
|
2279
|
+
var _a;
|
|
2280
|
+
if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
|
|
2281
|
+
return void 0;
|
|
2253
2282
|
}
|
|
2254
|
-
return
|
|
2283
|
+
return volver.defaults.value[componentName];
|
|
2255
2284
|
});
|
|
2256
|
-
|
|
2257
|
-
()
|
|
2258
|
-
|
|
2259
|
-
return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
|
|
2285
|
+
return computed(() => {
|
|
2286
|
+
if (volverComponentDefaults.value === void 0) {
|
|
2287
|
+
return props;
|
|
2260
2288
|
}
|
|
2261
|
-
|
|
2289
|
+
const componentDefaults = volverComponentDefaults.value;
|
|
2290
|
+
const simplifiedPropsDefinition = propsDefinition;
|
|
2291
|
+
const simplifiedProps = props;
|
|
2292
|
+
return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
|
|
2293
|
+
const propValue = simplifiedProps[key];
|
|
2294
|
+
acc[key] = propValue;
|
|
2295
|
+
if (key in componentDefaults) {
|
|
2296
|
+
if (Array.isArray(simplifiedPropsDefinition[key])) {
|
|
2297
|
+
const typeArray = simplifiedPropsDefinition[key];
|
|
2298
|
+
if (typeArray.length) {
|
|
2299
|
+
const typeFunction = typeArray[0];
|
|
2300
|
+
if (typeFunction === propValue) {
|
|
2301
|
+
acc[key] = componentDefaults[key];
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
if (typeof simplifiedPropsDefinition[key] === "function") {
|
|
2306
|
+
const typeFunction = simplifiedPropsDefinition[key];
|
|
2307
|
+
if (typeFunction() === propValue) {
|
|
2308
|
+
acc[key] = componentDefaults[key];
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
if (typeof simplifiedPropsDefinition[key] === "object") {
|
|
2312
|
+
let defaultValue = simplifiedPropsDefinition[key].default;
|
|
2313
|
+
if (typeof defaultValue === "function") {
|
|
2314
|
+
defaultValue = defaultValue();
|
|
2315
|
+
}
|
|
2316
|
+
if (typeof defaultValue === "object") {
|
|
2317
|
+
if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
|
|
2318
|
+
acc[key] = componentDefaults[key];
|
|
2319
|
+
}
|
|
2320
|
+
} else if (defaultValue === propValue) {
|
|
2321
|
+
acc[key] = componentDefaults[key];
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
return acc;
|
|
2326
|
+
}, {});
|
|
2327
|
+
});
|
|
2328
|
+
}
|
|
2329
|
+
function useComponentFocus(inputTemplateRef, emit) {
|
|
2330
|
+
const { focused } = useFocus(inputTemplateRef);
|
|
2331
|
+
watch(focused, (newValue) => {
|
|
2332
|
+
emit(newValue ? "focus" : "blur", unref(inputTemplateRef));
|
|
2333
|
+
});
|
|
2262
2334
|
return {
|
|
2263
|
-
|
|
2264
|
-
group,
|
|
2265
|
-
isInGroup,
|
|
2266
|
-
modelValue,
|
|
2267
|
-
toggle,
|
|
2268
|
-
unselectable,
|
|
2269
|
-
multiple,
|
|
2270
|
-
modifiers,
|
|
2271
|
-
disabled,
|
|
2272
|
-
// local props
|
|
2273
|
-
id,
|
|
2274
|
-
pressed,
|
|
2275
|
-
iconPosition,
|
|
2276
|
-
icon,
|
|
2277
|
-
label
|
|
2335
|
+
focused
|
|
2278
2336
|
};
|
|
2279
2337
|
}
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2338
|
+
function useOptions(props) {
|
|
2339
|
+
const { options, labelKey, valueKey, disabledKey } = toRefs(props);
|
|
2340
|
+
const getOptionLabel = (option) => {
|
|
2341
|
+
if (typeof option === "string") {
|
|
2342
|
+
return option;
|
|
2343
|
+
}
|
|
2344
|
+
if (typeof labelKey.value === "function") {
|
|
2345
|
+
return labelKey.value(option);
|
|
2346
|
+
}
|
|
2347
|
+
return String(
|
|
2348
|
+
labelKey.value ? get(option, labelKey.value) : option
|
|
2349
|
+
);
|
|
2350
|
+
};
|
|
2351
|
+
const getOptionValue = (option) => {
|
|
2352
|
+
if (typeof option === "string") {
|
|
2353
|
+
return option;
|
|
2354
|
+
}
|
|
2355
|
+
if (typeof valueKey.value === "function") {
|
|
2356
|
+
return valueKey.value(option);
|
|
2357
|
+
}
|
|
2358
|
+
return valueKey.value ? get(option, valueKey.value) : option;
|
|
2359
|
+
};
|
|
2360
|
+
const isOptionDisabled = (option) => {
|
|
2361
|
+
if (typeof option === "string") {
|
|
2362
|
+
return false;
|
|
2363
|
+
}
|
|
2364
|
+
if (typeof disabledKey.value === "function") {
|
|
2365
|
+
return disabledKey.value(option);
|
|
2366
|
+
}
|
|
2367
|
+
return disabledKey.value ? get(option, disabledKey.value) : false;
|
|
2368
|
+
};
|
|
2369
|
+
const getOptionGrouped = (option) => {
|
|
2370
|
+
if (typeof option == "string") {
|
|
2371
|
+
return [];
|
|
2372
|
+
}
|
|
2373
|
+
if (typeof option === "object" && option && "options" in option) {
|
|
2374
|
+
return option.options;
|
|
2375
|
+
}
|
|
2376
|
+
return [];
|
|
2377
|
+
};
|
|
2378
|
+
return {
|
|
2379
|
+
options,
|
|
2380
|
+
getOptionLabel,
|
|
2381
|
+
getOptionValue,
|
|
2382
|
+
isOptionDisabled,
|
|
2383
|
+
getOptionGrouped
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
const _hoisted_1$1 = ["for"];
|
|
2387
|
+
const _hoisted_2$1 = { class: "vv-select__wrapper" };
|
|
2388
|
+
const _hoisted_3$1 = {
|
|
2389
|
+
key: 0,
|
|
2390
|
+
class: "vv-select__input-before"
|
|
2283
2391
|
};
|
|
2284
|
-
const
|
|
2285
|
-
|
|
2286
|
-
|
|
2392
|
+
const _hoisted_4$1 = { class: "vv-select__inner" };
|
|
2393
|
+
const _hoisted_5$1 = ["id"];
|
|
2394
|
+
const _hoisted_6$1 = ["disabled", "hidden"];
|
|
2395
|
+
const _hoisted_7$1 = ["disabled", "value"];
|
|
2396
|
+
const _hoisted_8$1 = ["disabled", "label"];
|
|
2397
|
+
const _hoisted_9$1 = ["disabled", "value"];
|
|
2398
|
+
const _hoisted_10 = {
|
|
2399
|
+
key: 2,
|
|
2400
|
+
class: "vv-select__input-after"
|
|
2287
2401
|
};
|
|
2288
2402
|
const __default__$1 = {
|
|
2289
|
-
name: "
|
|
2403
|
+
name: "VvSelect"
|
|
2290
2404
|
};
|
|
2291
2405
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2292
2406
|
...__default__$1,
|
|
2293
|
-
props:
|
|
2294
|
-
emits:
|
|
2295
|
-
setup(__props, {
|
|
2407
|
+
props: useVvSelectProps(),
|
|
2408
|
+
emits: ["update:modelValue", "focus", "blur", "clear"],
|
|
2409
|
+
setup(__props, { emit: __emit }) {
|
|
2296
2410
|
const props = __props;
|
|
2297
|
-
const
|
|
2411
|
+
const emit = __emit;
|
|
2298
2412
|
const slots = useSlots();
|
|
2413
|
+
const VvSelectProps2 = useVvSelectProps();
|
|
2414
|
+
const propsDefaults = useDefaults(
|
|
2415
|
+
"VvSelect",
|
|
2416
|
+
VvSelectProps2,
|
|
2417
|
+
props
|
|
2418
|
+
);
|
|
2419
|
+
const selectEl = ref();
|
|
2420
|
+
const {
|
|
2421
|
+
HintSlot,
|
|
2422
|
+
hasHintLabelOrSlot,
|
|
2423
|
+
hasInvalidLabelOrSlot,
|
|
2424
|
+
hintSlotScope
|
|
2425
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
2426
|
+
const { focused } = useComponentFocus(selectEl, emit);
|
|
2427
|
+
function isGroup(option) {
|
|
2428
|
+
var _a;
|
|
2429
|
+
if (typeof option === "string") {
|
|
2430
|
+
return false;
|
|
2431
|
+
}
|
|
2432
|
+
return (_a = option.options) == null ? void 0 : _a.length;
|
|
2433
|
+
}
|
|
2299
2434
|
const {
|
|
2300
2435
|
id,
|
|
2301
2436
|
modifiers,
|
|
2302
|
-
iconPosition,
|
|
2303
|
-
icon,
|
|
2304
|
-
label,
|
|
2305
|
-
modelValue,
|
|
2306
2437
|
disabled,
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2438
|
+
readonly,
|
|
2439
|
+
loading,
|
|
2440
|
+
icon,
|
|
2441
|
+
iconPosition,
|
|
2442
|
+
invalid,
|
|
2443
|
+
valid,
|
|
2444
|
+
floating,
|
|
2445
|
+
multiple
|
|
2446
|
+
} = toRefs(props);
|
|
2310
2447
|
const hasId = useUniqueId(id);
|
|
2311
|
-
const
|
|
2312
|
-
const
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2315
|
-
return (_a = element.value) == null ? void 0 : _a.$el;
|
|
2448
|
+
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
2449
|
+
const isDisabledOrReadonly = computed(() => props.disabled || props.readonly);
|
|
2450
|
+
const hasTabindex = computed(() => {
|
|
2451
|
+
return isDisabledOrReadonly.value ? -1 : props.tabindex;
|
|
2316
2452
|
});
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2453
|
+
const localModelValue = computed({
|
|
2454
|
+
get: () => {
|
|
2455
|
+
return props.modelValue;
|
|
2456
|
+
},
|
|
2457
|
+
set: (newValue) => {
|
|
2458
|
+
if (Array.isArray(newValue)) {
|
|
2459
|
+
newValue = newValue.filter((item) => item !== void 0);
|
|
2460
|
+
if (newValue.length === 0 && !props.unselectable && selectEl.value) {
|
|
2461
|
+
selectEl.value.value = String(props.modelValue);
|
|
2462
|
+
return;
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
emit("update:modelValue", newValue);
|
|
2321
2466
|
}
|
|
2322
|
-
|
|
2323
|
-
|
|
2467
|
+
});
|
|
2468
|
+
const isDirty = computed(() => {
|
|
2469
|
+
if (Array.isArray(localModelValue.value)) {
|
|
2470
|
+
return localModelValue.value.length > 0;
|
|
2324
2471
|
}
|
|
2325
|
-
return
|
|
2472
|
+
return localModelValue.value !== void 0 && localModelValue.value !== null;
|
|
2473
|
+
});
|
|
2474
|
+
const isUnselectable = computed(() => {
|
|
2475
|
+
if (isDisabledOrReadonly.value) {
|
|
2476
|
+
return false;
|
|
2477
|
+
}
|
|
2478
|
+
return props.unselectable;
|
|
2479
|
+
});
|
|
2480
|
+
const isVisible = useElementVisibility(selectEl);
|
|
2481
|
+
watch(isVisible, (newValue) => {
|
|
2482
|
+
if (newValue && props.autofocus) {
|
|
2483
|
+
focused.value = true;
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
2487
|
+
const isInvalid = computed(() => {
|
|
2488
|
+
if (props.invalid === true) {
|
|
2489
|
+
return true;
|
|
2490
|
+
}
|
|
2491
|
+
if (props.valid === true) {
|
|
2492
|
+
return false;
|
|
2493
|
+
}
|
|
2494
|
+
return void 0;
|
|
2326
2495
|
});
|
|
2327
2496
|
const bemCssClasses = useModifiers(
|
|
2328
|
-
"vv-
|
|
2497
|
+
"vv-select",
|
|
2329
2498
|
modifiers,
|
|
2330
2499
|
computed(() => ({
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
"icon-
|
|
2338
|
-
|
|
2339
|
-
|
|
2500
|
+
"valid": valid.value,
|
|
2501
|
+
"invalid": invalid.value,
|
|
2502
|
+
"loading": loading.value,
|
|
2503
|
+
"disabled": disabled.value,
|
|
2504
|
+
"readonly": readonly.value,
|
|
2505
|
+
"icon-before": hasIconBefore.value !== void 0,
|
|
2506
|
+
"icon-after": hasIconAfter.value !== void 0,
|
|
2507
|
+
"dirty": isDirty.value,
|
|
2508
|
+
"focus": focused.value && !isDisabledOrReadonly.value,
|
|
2509
|
+
"floating": floating.value,
|
|
2510
|
+
"multiple": multiple.value
|
|
2340
2511
|
}))
|
|
2341
2512
|
);
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
});
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
(n) => n !== toggleValue.value
|
|
2355
|
-
);
|
|
2356
|
-
}
|
|
2357
|
-
return;
|
|
2358
|
-
}
|
|
2359
|
-
modelValue.value.push(toggleValue.value);
|
|
2360
|
-
return;
|
|
2361
|
-
}
|
|
2362
|
-
if (toggleValue.value === modelValue.value && unselectable.value) {
|
|
2363
|
-
modelValue.value = props.uncheckedValue;
|
|
2364
|
-
return;
|
|
2513
|
+
const {
|
|
2514
|
+
getOptionLabel,
|
|
2515
|
+
getOptionValue,
|
|
2516
|
+
isOptionDisabled,
|
|
2517
|
+
getOptionGrouped
|
|
2518
|
+
} = useOptions(props);
|
|
2519
|
+
watch(
|
|
2520
|
+
() => props.options,
|
|
2521
|
+
(newValue) => {
|
|
2522
|
+
if ((newValue == null ? void 0 : newValue.length) && props.autoselectFirst && !isDirty.value) {
|
|
2523
|
+
const firstOptionValue = getOptionValue(newValue[0]);
|
|
2524
|
+
localModelValue.value = props.multiple ? [firstOptionValue] : firstOptionValue;
|
|
2365
2525
|
}
|
|
2366
|
-
|
|
2526
|
+
},
|
|
2527
|
+
{ immediate: true }
|
|
2528
|
+
);
|
|
2529
|
+
function onClear() {
|
|
2530
|
+
if (Array.isArray(localModelValue.value)) {
|
|
2531
|
+
localModelValue.value = [];
|
|
2532
|
+
} else {
|
|
2533
|
+
localModelValue.value = void 0;
|
|
2367
2534
|
}
|
|
2368
|
-
|
|
2535
|
+
emit("clear");
|
|
2536
|
+
}
|
|
2537
|
+
const hasAttrs = computed(() => {
|
|
2538
|
+
return {
|
|
2539
|
+
"name": props.name,
|
|
2540
|
+
"tabindex": hasTabindex.value,
|
|
2541
|
+
"disabled": isDisabledOrReadonly.value,
|
|
2542
|
+
"required": props.required,
|
|
2543
|
+
"size": props.size,
|
|
2544
|
+
"autocomplete": props.autocomplete,
|
|
2545
|
+
"multiple": props.multiple,
|
|
2546
|
+
"aria-invalid": isInvalid.value,
|
|
2547
|
+
"aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
|
|
2548
|
+
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
2549
|
+
};
|
|
2550
|
+
});
|
|
2551
|
+
const slotProps = computed(() => ({
|
|
2552
|
+
valid: props.valid,
|
|
2553
|
+
invalid: props.invalid,
|
|
2554
|
+
modelValue: props.modelValue
|
|
2555
|
+
}));
|
|
2369
2556
|
return (_ctx, _cache) => {
|
|
2370
|
-
return openBlock(),
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2557
|
+
return openBlock(), createElementBlock(
|
|
2558
|
+
"div",
|
|
2559
|
+
{
|
|
2560
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
2561
|
+
},
|
|
2562
|
+
[
|
|
2563
|
+
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
2564
|
+
key: 0,
|
|
2565
|
+
for: unref(hasId)
|
|
2566
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_1$1)) : createCommentVNode("v-if", true),
|
|
2567
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
2568
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
2569
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2570
|
+
])) : createCommentVNode("v-if", true),
|
|
2571
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
2572
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
2573
|
+
_sfc_main$9,
|
|
2574
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
|
|
2575
|
+
null,
|
|
2576
|
+
16
|
|
2577
|
+
/* FULL_PROPS */
|
|
2578
|
+
)) : createCommentVNode("v-if", true),
|
|
2579
|
+
withDirectives(createElementVNode("select", mergeProps({
|
|
2580
|
+
id: unref(hasId),
|
|
2581
|
+
ref_key: "selectEl",
|
|
2582
|
+
ref: selectEl
|
|
2583
|
+
}, unref(hasAttrs), {
|
|
2584
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
|
|
2585
|
+
}), [
|
|
2586
|
+
_ctx.placeholder ? (openBlock(), createElementBlock("option", {
|
|
2587
|
+
key: 0,
|
|
2588
|
+
value: void 0,
|
|
2589
|
+
disabled: !unref(isUnselectable),
|
|
2590
|
+
hidden: !unref(isUnselectable)
|
|
2591
|
+
}, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
|
|
2592
|
+
(openBlock(true), createElementBlock(
|
|
2593
|
+
Fragment,
|
|
2594
|
+
null,
|
|
2595
|
+
renderList(_ctx.options, (option, index) => {
|
|
2596
|
+
return openBlock(), createElementBlock(
|
|
2597
|
+
Fragment,
|
|
2598
|
+
null,
|
|
2599
|
+
[
|
|
2600
|
+
!isGroup(option) ? (openBlock(), createElementBlock("option", {
|
|
2601
|
+
key: index,
|
|
2602
|
+
disabled: unref(isOptionDisabled)(option),
|
|
2603
|
+
value: unref(getOptionValue)(option)
|
|
2604
|
+
}, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
|
|
2605
|
+
key: `group-${index}`,
|
|
2606
|
+
disabled: unref(isOptionDisabled)(option),
|
|
2607
|
+
label: unref(getOptionLabel)(option)
|
|
2608
|
+
}, [
|
|
2609
|
+
(openBlock(true), createElementBlock(
|
|
2610
|
+
Fragment,
|
|
2611
|
+
null,
|
|
2612
|
+
renderList(unref(getOptionGrouped)(option), (item, i) => {
|
|
2613
|
+
return openBlock(), createElementBlock("option", {
|
|
2614
|
+
key: `group-${index}-item-${i}`,
|
|
2615
|
+
disabled: unref(isOptionDisabled)(item),
|
|
2616
|
+
value: unref(getOptionValue)(item)
|
|
2617
|
+
}, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
|
|
2618
|
+
}),
|
|
2619
|
+
128
|
|
2620
|
+
/* KEYED_FRAGMENT */
|
|
2621
|
+
))
|
|
2622
|
+
], 8, _hoisted_8$1))
|
|
2623
|
+
],
|
|
2624
|
+
64
|
|
2625
|
+
/* STABLE_FRAGMENT */
|
|
2626
|
+
);
|
|
2627
|
+
}),
|
|
2628
|
+
256
|
|
2629
|
+
/* UNKEYED_FRAGMENT */
|
|
2630
|
+
))
|
|
2631
|
+
], 16, _hoisted_5$1), [
|
|
2632
|
+
[vModelSelect, unref(localModelValue)]
|
|
2633
|
+
]),
|
|
2634
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
2635
|
+
_sfc_main$9,
|
|
2636
|
+
mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
|
|
2637
|
+
null,
|
|
2638
|
+
16
|
|
2639
|
+
/* FULL_PROPS */
|
|
2640
|
+
)) : createCommentVNode("v-if", true)
|
|
2641
|
+
]),
|
|
2642
|
+
unref(isUnselectable) ? (openBlock(), createBlock(unref(VvInputClearAction), {
|
|
2643
|
+
key: 1,
|
|
2644
|
+
"input-type": "select",
|
|
2645
|
+
label: _ctx.labelClear,
|
|
2646
|
+
icon: _ctx.iconClear,
|
|
2647
|
+
disabled: !unref(isDirty),
|
|
2648
|
+
onClear
|
|
2649
|
+
}, null, 8, ["label", "icon", "disabled"])) : createCommentVNode("v-if", true),
|
|
2650
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
2651
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2652
|
+
])) : createCommentVNode("v-if", true)
|
|
2653
|
+
]),
|
|
2654
|
+
createVNode(unref(HintSlot), {
|
|
2655
|
+
id: unref(hasHintId),
|
|
2656
|
+
class: "vv-select__hint"
|
|
2657
|
+
}, createSlots({
|
|
2658
|
+
_: 2
|
|
2659
|
+
/* DYNAMIC */
|
|
2660
|
+
}, [
|
|
2661
|
+
_ctx.$slots.hint ? {
|
|
2662
|
+
name: "hint",
|
|
2663
|
+
fn: withCtx(() => [
|
|
2664
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2665
|
+
]),
|
|
2666
|
+
key: "0"
|
|
2667
|
+
} : void 0,
|
|
2668
|
+
_ctx.$slots.loading ? {
|
|
2669
|
+
name: "loading",
|
|
2670
|
+
fn: withCtx(() => [
|
|
2671
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2672
|
+
]),
|
|
2673
|
+
key: "1"
|
|
2674
|
+
} : void 0,
|
|
2675
|
+
_ctx.$slots.valid ? {
|
|
2676
|
+
name: "valid",
|
|
2677
|
+
fn: withCtx(() => [
|
|
2678
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2679
|
+
]),
|
|
2680
|
+
key: "2"
|
|
2681
|
+
} : void 0,
|
|
2682
|
+
_ctx.$slots.invalid ? {
|
|
2683
|
+
name: "invalid",
|
|
2684
|
+
fn: withCtx(() => [
|
|
2685
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2686
|
+
]),
|
|
2687
|
+
key: "3"
|
|
2688
|
+
} : void 0
|
|
2689
|
+
]), 1032, ["id"])
|
|
2690
|
+
],
|
|
2691
|
+
2
|
|
2692
|
+
/* CLASS */
|
|
2693
|
+
);
|
|
2413
2694
|
};
|
|
2414
2695
|
}
|
|
2415
2696
|
});
|
|
@@ -2421,52 +2702,49 @@ const _hoisted_4 = {
|
|
|
2421
2702
|
class: "vv-select__input-before"
|
|
2422
2703
|
};
|
|
2423
2704
|
const _hoisted_5 = { class: "vv-select__inner" };
|
|
2424
|
-
const _hoisted_6 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
|
|
2705
|
+
const _hoisted_6 = ["aria-controls", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
|
|
2425
2706
|
const _hoisted_7 = {
|
|
2426
2707
|
key: 0,
|
|
2427
2708
|
class: "vv-select__value"
|
|
2428
2709
|
};
|
|
2429
2710
|
const _hoisted_8 = ["aria-label", "onClick"];
|
|
2430
2711
|
const _hoisted_9 = {
|
|
2431
|
-
key:
|
|
2712
|
+
key: 2,
|
|
2432
2713
|
class: "vv-select__input-after"
|
|
2433
2714
|
};
|
|
2434
2715
|
const __default__ = {
|
|
2435
2716
|
name: "VvCombobox",
|
|
2436
2717
|
components: {
|
|
2437
|
-
VvDropdown: _sfc_main$
|
|
2438
|
-
VvDropdownOption: _sfc_main$
|
|
2439
|
-
VvDropdownOptgroup: _sfc_main$
|
|
2440
|
-
VvButton: _sfc_main$
|
|
2718
|
+
VvDropdown: _sfc_main$5,
|
|
2719
|
+
VvDropdownOption: _sfc_main$2,
|
|
2720
|
+
VvDropdownOptgroup: _sfc_main$4,
|
|
2721
|
+
VvButton: _sfc_main$6
|
|
2441
2722
|
}
|
|
2442
2723
|
};
|
|
2443
2724
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2444
2725
|
...__default__,
|
|
2445
|
-
props:
|
|
2446
|
-
emits:
|
|
2447
|
-
setup(__props, { emit }) {
|
|
2726
|
+
props: useVvComboboxProps(),
|
|
2727
|
+
emits: ["update:modelValue", "update:search", "focus", "blur", "clear", "change:search"],
|
|
2728
|
+
setup(__props, { emit: __emit }) {
|
|
2448
2729
|
const props = __props;
|
|
2730
|
+
const emit = __emit;
|
|
2449
2731
|
const slots = useSlots();
|
|
2732
|
+
const VvComboboxProps2 = useVvComboboxProps();
|
|
2450
2733
|
const propsDefaults = useDefaults(
|
|
2451
2734
|
"VvCombobox",
|
|
2452
|
-
|
|
2735
|
+
VvComboboxProps2,
|
|
2453
2736
|
props
|
|
2454
2737
|
);
|
|
2455
|
-
const
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
return option.options && option.options.length > 0;
|
|
2460
|
-
};
|
|
2738
|
+
const inputEl = ref(null);
|
|
2739
|
+
const inputSearchEl = ref(null);
|
|
2740
|
+
const wrapperEl = ref(null);
|
|
2741
|
+
const dropdownEl = ref();
|
|
2461
2742
|
const {
|
|
2462
2743
|
HintSlot,
|
|
2463
2744
|
hasHintLabelOrSlot,
|
|
2464
2745
|
hasInvalidLabelOrSlot,
|
|
2465
2746
|
hintSlotScope
|
|
2466
2747
|
} = HintSlotFactory(propsDefaults, slots);
|
|
2467
|
-
const inputEl = ref(null);
|
|
2468
|
-
const inputSearchEl = ref(null);
|
|
2469
|
-
const wrapperEl = ref(null);
|
|
2470
2748
|
const { focused } = useComponentFocus(inputEl, emit);
|
|
2471
2749
|
const { focused: focusedWithin } = useFocusWithin(wrapperEl);
|
|
2472
2750
|
watch(focused, (newValue) => {
|
|
@@ -2496,22 +2774,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2496
2774
|
emit("change:search", debouncedSearchText.value);
|
|
2497
2775
|
});
|
|
2498
2776
|
const expanded = ref(false);
|
|
2499
|
-
|
|
2500
|
-
if (
|
|
2777
|
+
function toggleExpanded() {
|
|
2778
|
+
if (isDisabledOrReadonly.value)
|
|
2501
2779
|
return;
|
|
2502
2780
|
expanded.value = !expanded.value;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
if (
|
|
2781
|
+
}
|
|
2782
|
+
function expand() {
|
|
2783
|
+
if (isDisabledOrReadonly.value || expanded.value)
|
|
2506
2784
|
return;
|
|
2507
2785
|
expanded.value = true;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
if (
|
|
2786
|
+
}
|
|
2787
|
+
function collapse() {
|
|
2788
|
+
if (isDisabledOrReadonly.value || !expanded.value)
|
|
2511
2789
|
return;
|
|
2512
2790
|
expanded.value = false;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2791
|
+
}
|
|
2792
|
+
function onAfterExpand() {
|
|
2515
2793
|
if (propsDefaults.value.searchable) {
|
|
2516
2794
|
if (inputSearchEl.value) {
|
|
2517
2795
|
inputSearchEl.value.focus({
|
|
@@ -2519,18 +2797,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2519
2797
|
});
|
|
2520
2798
|
}
|
|
2521
2799
|
}
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2800
|
+
}
|
|
2801
|
+
function onAfterCollapse() {
|
|
2524
2802
|
if (propsDefaults.value.searchable) {
|
|
2525
2803
|
searchText.value = "";
|
|
2526
2804
|
}
|
|
2527
|
-
}
|
|
2805
|
+
}
|
|
2806
|
+
function isGroup(option) {
|
|
2807
|
+
var _a;
|
|
2808
|
+
if (typeof option === "string") {
|
|
2809
|
+
return false;
|
|
2810
|
+
}
|
|
2811
|
+
return (_a = option.options) == null ? void 0 : _a.length;
|
|
2812
|
+
}
|
|
2528
2813
|
const {
|
|
2529
2814
|
id,
|
|
2530
2815
|
icon,
|
|
2531
2816
|
iconPosition,
|
|
2532
2817
|
modifiers,
|
|
2533
2818
|
disabled,
|
|
2819
|
+
required,
|
|
2534
2820
|
readonly,
|
|
2535
2821
|
loading,
|
|
2536
2822
|
valid,
|
|
@@ -2542,32 +2828,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2542
2828
|
const hasDropdownId = computed(() => `${hasId.value}-dropdown`);
|
|
2543
2829
|
const hasSearchId = computed(() => `${hasId.value}-search`);
|
|
2544
2830
|
const hasLabelId = computed(() => `${hasId.value}-label`);
|
|
2545
|
-
const
|
|
2546
|
-
const isLoading = computed(() => localLoading.value || loading.value);
|
|
2547
|
-
const dropdownEl = ref();
|
|
2548
|
-
const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
|
|
2549
|
-
icon,
|
|
2550
|
-
iconPosition
|
|
2551
|
-
);
|
|
2552
|
-
const isDirty = computed(() => !isEmpty(props.modelValue));
|
|
2831
|
+
const isDisabledOrReadonly = computed(() => props.disabled || props.readonly);
|
|
2553
2832
|
const hasTabindex = computed(() => {
|
|
2554
|
-
return
|
|
2833
|
+
return isDisabledOrReadonly.value ? -1 : props.tabindex;
|
|
2834
|
+
});
|
|
2835
|
+
const localModelValue = computed({
|
|
2836
|
+
get: () => {
|
|
2837
|
+
if (Array.isArray(props.modelValue)) {
|
|
2838
|
+
return props.modelValue;
|
|
2839
|
+
}
|
|
2840
|
+
return props.modelValue !== void 0 && props.modelValue !== null ? [props.modelValue] : [];
|
|
2841
|
+
},
|
|
2842
|
+
set: (value) => {
|
|
2843
|
+
emit("update:modelValue", props.multiple || Array.isArray(props.modelValue) ? value : value.pop());
|
|
2844
|
+
}
|
|
2845
|
+
});
|
|
2846
|
+
const sizeOfModelValue = computed(() => localModelValue.value.length);
|
|
2847
|
+
const isDirty = computed(() => sizeOfModelValue.value > 0);
|
|
2848
|
+
const hasMaxValues = computed(() => {
|
|
2849
|
+
if (!props.multiple) {
|
|
2850
|
+
return 1;
|
|
2851
|
+
}
|
|
2852
|
+
if (props.maxValues === void 0) {
|
|
2853
|
+
return Infinity;
|
|
2854
|
+
}
|
|
2855
|
+
return Number(props.maxValues);
|
|
2555
2856
|
});
|
|
2857
|
+
const isUnselectable = computed(() => {
|
|
2858
|
+
if (isDisabledOrReadonly.value) {
|
|
2859
|
+
return false;
|
|
2860
|
+
}
|
|
2861
|
+
if (!props.unselectable) {
|
|
2862
|
+
return false;
|
|
2863
|
+
}
|
|
2864
|
+
return Number(props.minValues) === 0 || sizeOfModelValue.value > Number(props.minValues);
|
|
2865
|
+
});
|
|
2866
|
+
const isSelectable = computed(() => {
|
|
2867
|
+
if (isDisabledOrReadonly.value) {
|
|
2868
|
+
return false;
|
|
2869
|
+
}
|
|
2870
|
+
if (!props.multiple) {
|
|
2871
|
+
return true;
|
|
2872
|
+
}
|
|
2873
|
+
return sizeOfModelValue.value < hasMaxValues.value;
|
|
2874
|
+
});
|
|
2875
|
+
const localLoading = ref(false);
|
|
2876
|
+
const isLoading = computed(() => localLoading.value || loading.value);
|
|
2877
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
2556
2878
|
const bemCssClasses = useModifiers(
|
|
2557
2879
|
"vv-select",
|
|
2558
2880
|
modifiers,
|
|
2559
2881
|
computed(() => ({
|
|
2560
|
-
disabled: disabled.value,
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
"
|
|
2564
|
-
"icon-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2882
|
+
"disabled": disabled.value,
|
|
2883
|
+
"required": required.value,
|
|
2884
|
+
"loading": isLoading.value,
|
|
2885
|
+
"readonly": readonly.value,
|
|
2886
|
+
"icon-before": hasIconBefore.value !== void 0,
|
|
2887
|
+
"icon-after": hasIconAfter.value !== void 0,
|
|
2888
|
+
"valid": valid.value,
|
|
2889
|
+
"invalid": invalid.value,
|
|
2890
|
+
"dirty": isDirty.value,
|
|
2891
|
+
"focus": (focused.value || focusedWithin.value || expanded.value) && !isDisabledOrReadonly.value,
|
|
2892
|
+
"floating": floating.value,
|
|
2893
|
+
"badges": props.badges
|
|
2571
2894
|
}))
|
|
2572
2895
|
);
|
|
2573
2896
|
const {
|
|
@@ -2576,6 +2899,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2576
2899
|
getOptionGrouped,
|
|
2577
2900
|
isOptionDisabled
|
|
2578
2901
|
} = useOptions(props);
|
|
2902
|
+
function isOptionDisabledOrNotSelectable(option) {
|
|
2903
|
+
return isOptionDisabled(option) || !isSelectable.value && !isOptionSelected(option);
|
|
2904
|
+
}
|
|
2579
2905
|
const filteredOptions = computedAsync(async () => {
|
|
2580
2906
|
var _a;
|
|
2581
2907
|
if (propsDefaults.value.searchFunction) {
|
|
@@ -2594,10 +2920,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2594
2920
|
});
|
|
2595
2921
|
});
|
|
2596
2922
|
function isOptionSelected(option) {
|
|
2597
|
-
|
|
2598
|
-
|
|
2923
|
+
const optionValue = getOptionValue(option);
|
|
2924
|
+
if (typeof optionValue === "object") {
|
|
2925
|
+
return localModelValue.value.some((item) => {
|
|
2926
|
+
if (typeof item === "object") {
|
|
2927
|
+
return JSON.stringify(item) === JSON.stringify(optionValue);
|
|
2928
|
+
}
|
|
2929
|
+
return false;
|
|
2930
|
+
});
|
|
2599
2931
|
}
|
|
2600
|
-
return
|
|
2932
|
+
return localModelValue.value.includes(optionValue);
|
|
2601
2933
|
}
|
|
2602
2934
|
const selectedOptions = computed(() => {
|
|
2603
2935
|
const options = props.options.reduce(
|
|
@@ -2616,44 +2948,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2616
2948
|
const hasValue = computed(() => {
|
|
2617
2949
|
return selectedOptions.value.map((option) => getOptionLabel(option)).join(props.separator);
|
|
2618
2950
|
});
|
|
2619
|
-
|
|
2951
|
+
function onClickInput() {
|
|
2620
2952
|
props.autoOpen ? expand() : toggleExpanded();
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
if (props.multiple) {
|
|
2630
|
-
if (Array.isArray(props.modelValue)) {
|
|
2631
|
-
const maxValues = Number(props.maxValues);
|
|
2632
|
-
if (props.maxValues !== void 0 && maxValues >= 0 && ((_a = props.modelValue) == null ? void 0 : _a.length) >= maxValues) {
|
|
2633
|
-
if (!contains(value, props.modelValue)) {
|
|
2634
|
-
return;
|
|
2635
|
-
}
|
|
2953
|
+
}
|
|
2954
|
+
function onInput(option) {
|
|
2955
|
+
const isSelected = isOptionSelected(option);
|
|
2956
|
+
const optionValue = getOptionValue(option);
|
|
2957
|
+
if (isSelected && isUnselectable.value) {
|
|
2958
|
+
localModelValue.value = localModelValue.value.filter((item) => {
|
|
2959
|
+
if (typeof optionValue === "object" && typeof item === "object") {
|
|
2960
|
+
return JSON.stringify(item) !== JSON.stringify(optionValue);
|
|
2636
2961
|
}
|
|
2637
|
-
|
|
2962
|
+
return item !== optionValue;
|
|
2963
|
+
});
|
|
2964
|
+
} else if (!isSelected && isSelectable.value) {
|
|
2965
|
+
if (!props.multiple) {
|
|
2966
|
+
localModelValue.value = [optionValue];
|
|
2638
2967
|
} else {
|
|
2639
|
-
|
|
2640
|
-
}
|
|
2641
|
-
} else {
|
|
2642
|
-
if (!props.keepOpen) {
|
|
2643
|
-
collapse();
|
|
2644
|
-
}
|
|
2645
|
-
if (Array.isArray(props.modelValue)) {
|
|
2646
|
-
if (props.unselectable && props.modelValue.includes(value)) {
|
|
2647
|
-
toReturn = [];
|
|
2648
|
-
} else {
|
|
2649
|
-
toReturn = [value];
|
|
2650
|
-
}
|
|
2651
|
-
} else if (props.unselectable && value === props.modelValue) {
|
|
2652
|
-
toReturn = void 0;
|
|
2968
|
+
localModelValue.value = [...localModelValue.value, optionValue];
|
|
2653
2969
|
}
|
|
2654
2970
|
}
|
|
2655
|
-
|
|
2656
|
-
|
|
2971
|
+
if (!props.multiple && !props.keepOpen) {
|
|
2972
|
+
collapse();
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
function onClear() {
|
|
2976
|
+
localModelValue.value = [];
|
|
2977
|
+
emit("update:search", "");
|
|
2978
|
+
emit("clear");
|
|
2979
|
+
}
|
|
2980
|
+
watch(
|
|
2981
|
+
() => props.options,
|
|
2982
|
+
(newValue) => {
|
|
2983
|
+
if ((newValue == null ? void 0 : newValue.length) && props.autoselectFirst && !isDirty.value) {
|
|
2984
|
+
onInput(newValue[0]);
|
|
2985
|
+
}
|
|
2986
|
+
},
|
|
2987
|
+
{ immediate: true }
|
|
2988
|
+
);
|
|
2657
2989
|
const selectProps = computed(() => ({
|
|
2658
2990
|
id: hasId.value,
|
|
2659
2991
|
name: props.name,
|
|
@@ -2674,7 +3006,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2674
3006
|
icon: propsDefaults.value.icon,
|
|
2675
3007
|
iconPosition: propsDefaults.value.iconPosition,
|
|
2676
3008
|
floating: propsDefaults.value.floating,
|
|
2677
|
-
unselectable:
|
|
3009
|
+
unselectable: isUnselectable.value,
|
|
3010
|
+
autoselectFirst: propsDefaults.value.autoselectFirst,
|
|
2678
3011
|
multiple: propsDefaults.value.multiple,
|
|
2679
3012
|
label: propsDefaults.value.label,
|
|
2680
3013
|
placeholder: propsDefaults.value.placeholder,
|
|
@@ -2724,208 +3057,315 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2724
3057
|
key: 0,
|
|
2725
3058
|
id: unref(hasLabelId),
|
|
2726
3059
|
for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
|
|
2727
|
-
}, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
|
|
2728
|
-
createElementVNode(
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
"
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
unref(
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
3060
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
|
|
3061
|
+
createElementVNode(
|
|
3062
|
+
"div",
|
|
3063
|
+
{
|
|
3064
|
+
ref_key: "wrapperEl",
|
|
3065
|
+
ref: wrapperEl,
|
|
3066
|
+
class: "vv-select__wrapper"
|
|
3067
|
+
},
|
|
3068
|
+
[
|
|
3069
|
+
createVNode(_sfc_main$5, mergeProps({
|
|
3070
|
+
ref_key: "dropdownEl",
|
|
3071
|
+
ref: dropdownEl,
|
|
3072
|
+
modelValue: unref(expanded),
|
|
3073
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
|
|
3074
|
+
}, unref(dropdownProps), {
|
|
3075
|
+
role: unref(DropdownRole).listbox,
|
|
3076
|
+
onAfterExpand,
|
|
3077
|
+
onAfterCollapse
|
|
3078
|
+
}), createSlots({
|
|
3079
|
+
default: withCtx(({ aria }) => [
|
|
3080
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
3081
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
3082
|
+
])) : createCommentVNode("v-if", true),
|
|
3083
|
+
createElementVNode("div", _hoisted_5, [
|
|
3084
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
3085
|
+
_sfc_main$9,
|
|
3086
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
|
|
3087
|
+
null,
|
|
3088
|
+
16
|
|
3089
|
+
/* FULL_PROPS */
|
|
3090
|
+
)) : createCommentVNode("v-if", true),
|
|
3091
|
+
createElementVNode("div", mergeProps({
|
|
3092
|
+
ref_key: "inputEl",
|
|
3093
|
+
ref: inputEl
|
|
3094
|
+
}, aria, {
|
|
3095
|
+
class: "vv-select__input",
|
|
3096
|
+
role: "combobox",
|
|
3097
|
+
"aria-controls": unref(hasDropdownId),
|
|
3098
|
+
"aria-expanded": unref(expanded),
|
|
3099
|
+
"aria-labelledby": unref(hasLabelId),
|
|
3100
|
+
"aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
|
|
3101
|
+
"aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
|
|
3102
|
+
tabindex: unref(hasTabindex),
|
|
3103
|
+
onClickPassive: onClickInput
|
|
3104
|
+
}), [
|
|
3105
|
+
renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
|
|
3106
|
+
unref(hasValue) ? (openBlock(), createElementBlock(
|
|
3107
|
+
Fragment,
|
|
3108
|
+
{ key: 0 },
|
|
3109
|
+
[
|
|
3110
|
+
!_ctx.badges ? (openBlock(), createElementBlock(
|
|
3111
|
+
"div",
|
|
3112
|
+
_hoisted_7,
|
|
3113
|
+
toDisplayString(unref(hasValue)),
|
|
3114
|
+
1
|
|
3115
|
+
/* TEXT */
|
|
3116
|
+
)) : (openBlock(true), createElementBlock(
|
|
3117
|
+
Fragment,
|
|
3118
|
+
{ key: 1 },
|
|
3119
|
+
renderList(unref(selectedOptions), (option, index) => {
|
|
3120
|
+
return openBlock(), createBlock(_sfc_main$8, {
|
|
3121
|
+
key: index,
|
|
3122
|
+
modifiers: _ctx.badgeModifiers,
|
|
3123
|
+
class: "vv-select__badge"
|
|
3124
|
+
}, {
|
|
3125
|
+
default: withCtx(() => [
|
|
3126
|
+
createTextVNode(
|
|
3127
|
+
toDisplayString(unref(getOptionLabel)(option)) + " ",
|
|
3128
|
+
1
|
|
3129
|
+
/* TEXT */
|
|
3130
|
+
),
|
|
3131
|
+
unref(isUnselectable) ? (openBlock(), createElementBlock("button", {
|
|
3132
|
+
key: 0,
|
|
3133
|
+
"aria-label": unref(propsDefaults).deselectActionLabel,
|
|
3134
|
+
type: "button",
|
|
3135
|
+
onClick: withModifiers(($event) => onInput(option), ["stop"])
|
|
3136
|
+
}, [
|
|
3137
|
+
createVNode(_sfc_main$9, { name: "close" })
|
|
3138
|
+
], 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
3139
|
+
]),
|
|
3140
|
+
_: 2
|
|
3141
|
+
/* DYNAMIC */
|
|
3142
|
+
}, 1032, ["modifiers"]);
|
|
3143
|
+
}),
|
|
3144
|
+
128
|
|
3145
|
+
/* KEYED_FRAGMENT */
|
|
3146
|
+
))
|
|
3147
|
+
],
|
|
3148
|
+
64
|
|
3149
|
+
/* STABLE_FRAGMENT */
|
|
3150
|
+
)) : (openBlock(), createElementBlock(
|
|
3151
|
+
Fragment,
|
|
3152
|
+
{ key: 1 },
|
|
3153
|
+
[
|
|
3154
|
+
createTextVNode(
|
|
3155
|
+
toDisplayString(_ctx.placeholder),
|
|
3156
|
+
1
|
|
3157
|
+
/* TEXT */
|
|
3158
|
+
)
|
|
3159
|
+
],
|
|
3160
|
+
64
|
|
3161
|
+
/* STABLE_FRAGMENT */
|
|
3162
|
+
))
|
|
3163
|
+
])
|
|
3164
|
+
], 16, _hoisted_6),
|
|
3165
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
3166
|
+
_sfc_main$9,
|
|
3167
|
+
mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
|
|
3168
|
+
null,
|
|
3169
|
+
16
|
|
3170
|
+
/* FULL_PROPS */
|
|
3171
|
+
)) : createCommentVNode("v-if", true)
|
|
3172
|
+
]),
|
|
3173
|
+
unref(isUnselectable) ? (openBlock(), createBlock(unref(VvInputClearAction), {
|
|
2793
3174
|
key: 1,
|
|
2794
|
-
|
|
2795
|
-
|
|
3175
|
+
"input-type": "select",
|
|
3176
|
+
label: _ctx.labelClear,
|
|
3177
|
+
icon: _ctx.iconClear,
|
|
3178
|
+
disabled: !unref(isDirty),
|
|
3179
|
+
onClear
|
|
3180
|
+
}, null, 8, ["label", "icon", "disabled"])) : createCommentVNode("v-if", true),
|
|
3181
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
3182
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
3183
|
+
])) : createCommentVNode("v-if", true)
|
|
2796
3184
|
]),
|
|
2797
|
-
|
|
2798
|
-
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2799
|
-
])) : createCommentVNode("", true)
|
|
2800
|
-
]),
|
|
2801
|
-
items: withCtx(() => {
|
|
2802
|
-
var _a;
|
|
2803
|
-
return [
|
|
2804
|
-
!unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
|
|
2805
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
2806
|
-
isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2807
|
-
createVNode(_sfc_main$5, {
|
|
2808
|
-
label: unref(getOptionLabel)(option)
|
|
2809
|
-
}, null, 8, ["label"]),
|
|
2810
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
|
|
2811
|
-
option
|
|
2812
|
-
), (item, i) => {
|
|
2813
|
-
return openBlock(), createBlock(_sfc_main$6, mergeProps({
|
|
2814
|
-
selected: isOptionSelected(item),
|
|
2815
|
-
disabled: unref(isOptionDisabled)(item),
|
|
2816
|
-
unselectable: _ctx.unselectable,
|
|
2817
|
-
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2818
|
-
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2819
|
-
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2820
|
-
}, {
|
|
2821
|
-
key: i,
|
|
2822
|
-
class: "vv-dropdown-option",
|
|
2823
|
-
onClickPassive: ($event) => onInput(item)
|
|
2824
|
-
}), {
|
|
2825
|
-
default: withCtx(() => [
|
|
2826
|
-
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2827
|
-
option,
|
|
2828
|
-
selectedOptions: unref(selectedOptions),
|
|
2829
|
-
selected: isOptionSelected(item),
|
|
2830
|
-
disabled: unref(isOptionDisabled)(item)
|
|
2831
|
-
})), () => [
|
|
2832
|
-
createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
|
|
2833
|
-
])
|
|
2834
|
-
]),
|
|
2835
|
-
_: 2
|
|
2836
|
-
}, 1040, ["onClickPassive"]);
|
|
2837
|
-
}), 128))
|
|
2838
|
-
], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
|
|
2839
|
-
selected: isOptionSelected(option),
|
|
2840
|
-
disabled: unref(isOptionDisabled)(option),
|
|
2841
|
-
unselectable: _ctx.unselectable,
|
|
2842
|
-
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2843
|
-
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2844
|
-
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2845
|
-
}, {
|
|
2846
|
-
class: "vv-dropdown-option",
|
|
2847
|
-
onClickPassive: ($event) => onInput(option)
|
|
2848
|
-
}), {
|
|
2849
|
-
default: withCtx(() => [
|
|
2850
|
-
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2851
|
-
option,
|
|
2852
|
-
selectedOptions: unref(selectedOptions),
|
|
2853
|
-
selected: isOptionSelected(option),
|
|
2854
|
-
disabled: unref(isOptionDisabled)(option)
|
|
2855
|
-
})), () => [
|
|
2856
|
-
createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
|
|
2857
|
-
])
|
|
2858
|
-
]),
|
|
2859
|
-
_: 2
|
|
2860
|
-
}, 1040, ["onClickPassive"]))
|
|
2861
|
-
], 64);
|
|
2862
|
-
}), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2863
|
-
key: 1,
|
|
2864
|
-
modifiers: "inert"
|
|
2865
|
-
}, {
|
|
2866
|
-
default: withCtx(() => [
|
|
2867
|
-
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
2868
|
-
createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
|
|
2869
|
-
])
|
|
2870
|
-
]),
|
|
2871
|
-
_: 3
|
|
2872
|
-
})) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2873
|
-
key: 2,
|
|
2874
|
-
modifiers: "inert"
|
|
2875
|
-
}, {
|
|
2876
|
-
default: withCtx(() => [
|
|
2877
|
-
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
2878
|
-
createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
|
|
2879
|
-
])
|
|
2880
|
-
]),
|
|
2881
|
-
_: 3
|
|
2882
|
-
})) : createCommentVNode("", true)
|
|
2883
|
-
];
|
|
2884
|
-
}),
|
|
2885
|
-
after: withCtx(() => [
|
|
2886
|
-
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
3185
|
+
items: withCtx(() => {
|
|
2887
3186
|
var _a;
|
|
2888
3187
|
return [
|
|
2889
|
-
((_a = unref(
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
3188
|
+
!unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
|
|
3189
|
+
Fragment,
|
|
3190
|
+
{ key: 0 },
|
|
3191
|
+
renderList(unref(filteredOptions), (option, index) => {
|
|
3192
|
+
return openBlock(), createElementBlock(
|
|
3193
|
+
Fragment,
|
|
3194
|
+
{ key: index },
|
|
3195
|
+
[
|
|
3196
|
+
isGroup(option) ? (openBlock(), createElementBlock(
|
|
3197
|
+
Fragment,
|
|
3198
|
+
{ key: 0 },
|
|
3199
|
+
[
|
|
3200
|
+
createVNode(_sfc_main$4, {
|
|
3201
|
+
label: unref(getOptionLabel)(option)
|
|
3202
|
+
}, null, 8, ["label"]),
|
|
3203
|
+
(openBlock(true), createElementBlock(
|
|
3204
|
+
Fragment,
|
|
3205
|
+
null,
|
|
3206
|
+
renderList(unref(getOptionGrouped)(
|
|
3207
|
+
option
|
|
3208
|
+
), (item, i) => {
|
|
3209
|
+
return openBlock(), createBlock(_sfc_main$2, mergeProps({ ref_for: true }, {
|
|
3210
|
+
selected: isOptionSelected(item),
|
|
3211
|
+
disabled: isOptionDisabledOrNotSelectable(item),
|
|
3212
|
+
unselectable: unref(isUnselectable),
|
|
3213
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
3214
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
3215
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel,
|
|
3216
|
+
focusOnHover: _ctx.focusOnHover
|
|
3217
|
+
}, {
|
|
3218
|
+
key: i,
|
|
3219
|
+
class: "vv-dropdown-option",
|
|
3220
|
+
onClickPassive: ($event) => onInput(item)
|
|
3221
|
+
}), {
|
|
3222
|
+
default: withCtx(() => [
|
|
3223
|
+
renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
|
|
3224
|
+
option,
|
|
3225
|
+
selectedOptions: unref(selectedOptions),
|
|
3226
|
+
selected: isOptionSelected(item),
|
|
3227
|
+
disabled: isOptionDisabledOrNotSelectable(item)
|
|
3228
|
+
}), () => [
|
|
3229
|
+
createTextVNode(
|
|
3230
|
+
toDisplayString(unref(getOptionLabel)(item)),
|
|
3231
|
+
1
|
|
3232
|
+
/* TEXT */
|
|
3233
|
+
)
|
|
3234
|
+
])
|
|
3235
|
+
]),
|
|
3236
|
+
_: 2
|
|
3237
|
+
/* DYNAMIC */
|
|
3238
|
+
}, 1040, ["onClickPassive"]);
|
|
3239
|
+
}),
|
|
3240
|
+
128
|
|
3241
|
+
/* KEYED_FRAGMENT */
|
|
3242
|
+
))
|
|
3243
|
+
],
|
|
3244
|
+
64
|
|
3245
|
+
/* STABLE_FRAGMENT */
|
|
3246
|
+
)) : (openBlock(), createBlock(_sfc_main$2, mergeProps({
|
|
3247
|
+
key: 1,
|
|
3248
|
+
ref_for: true
|
|
3249
|
+
}, {
|
|
3250
|
+
selected: isOptionSelected(option),
|
|
3251
|
+
disabled: isOptionDisabledOrNotSelectable(option),
|
|
3252
|
+
unselectable: unref(isUnselectable),
|
|
3253
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
3254
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
3255
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel,
|
|
3256
|
+
focusOnHover: _ctx.focusOnHover
|
|
3257
|
+
}, {
|
|
3258
|
+
class: "vv-dropdown-option",
|
|
3259
|
+
onClickPassive: ($event) => onInput(option)
|
|
3260
|
+
}), {
|
|
3261
|
+
default: withCtx(() => [
|
|
3262
|
+
renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
|
|
3263
|
+
option,
|
|
3264
|
+
selectedOptions: unref(selectedOptions),
|
|
3265
|
+
selected: isOptionSelected(option),
|
|
3266
|
+
disabled: isOptionDisabledOrNotSelectable(option)
|
|
3267
|
+
}), () => [
|
|
3268
|
+
createTextVNode(
|
|
3269
|
+
toDisplayString(unref(getOptionLabel)(option)),
|
|
3270
|
+
1
|
|
3271
|
+
/* TEXT */
|
|
3272
|
+
)
|
|
3273
|
+
])
|
|
3274
|
+
]),
|
|
3275
|
+
_: 2
|
|
3276
|
+
/* DYNAMIC */
|
|
3277
|
+
}, 1040, ["onClickPassive"]))
|
|
3278
|
+
],
|
|
3279
|
+
64
|
|
3280
|
+
/* STABLE_FRAGMENT */
|
|
3281
|
+
);
|
|
3282
|
+
}),
|
|
3283
|
+
128
|
|
3284
|
+
/* KEYED_FRAGMENT */
|
|
3285
|
+
)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$2, {
|
|
3286
|
+
key: 1,
|
|
3287
|
+
modifiers: "inert"
|
|
3288
|
+
}, {
|
|
3289
|
+
default: withCtx(() => [
|
|
3290
|
+
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
3291
|
+
createTextVNode(
|
|
3292
|
+
toDisplayString(unref(propsDefaults).noOptionsLabel),
|
|
3293
|
+
1
|
|
3294
|
+
/* TEXT */
|
|
3295
|
+
)
|
|
3296
|
+
])
|
|
3297
|
+
]),
|
|
3298
|
+
_: 3
|
|
3299
|
+
/* FORWARDED */
|
|
3300
|
+
})) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$2, {
|
|
3301
|
+
key: 2,
|
|
3302
|
+
modifiers: "inert"
|
|
3303
|
+
}, {
|
|
3304
|
+
default: withCtx(() => [
|
|
3305
|
+
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
3306
|
+
createTextVNode(
|
|
3307
|
+
toDisplayString(unref(propsDefaults).noResultsLabel),
|
|
3308
|
+
1
|
|
3309
|
+
/* TEXT */
|
|
3310
|
+
)
|
|
3311
|
+
])
|
|
3312
|
+
]),
|
|
3313
|
+
_: 3
|
|
3314
|
+
/* FORWARDED */
|
|
3315
|
+
})) : createCommentVNode("v-if", true)
|
|
2895
3316
|
];
|
|
2896
|
-
})
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
|
|
2910
|
-
"aria-autocomplete": "list",
|
|
2911
|
-
"aria-controls": unref(hasDropdownId),
|
|
2912
|
-
autocomplete: "off",
|
|
2913
|
-
spellcheck: "false",
|
|
2914
|
-
type: "search",
|
|
2915
|
-
class: "vv-dropdown__search",
|
|
2916
|
-
placeholder: unref(propsDefaults).searchPlaceholder
|
|
2917
|
-
}, null, 8, _hoisted_3)), [
|
|
2918
|
-
[vModelText, unref(searchText)]
|
|
2919
|
-
]) : createCommentVNode("", true)
|
|
3317
|
+
}),
|
|
3318
|
+
after: withCtx(() => [
|
|
3319
|
+
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
3320
|
+
var _a;
|
|
3321
|
+
return [
|
|
3322
|
+
((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$6, {
|
|
3323
|
+
key: 0,
|
|
3324
|
+
label: unref(propsDefaults).closeLabel,
|
|
3325
|
+
modifiers: "secondary",
|
|
3326
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
|
|
3327
|
+
}, null, 8, ["label"])) : createCommentVNode("v-if", true)
|
|
3328
|
+
];
|
|
3329
|
+
})
|
|
2920
3330
|
]),
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
3331
|
+
_: 2
|
|
3332
|
+
/* DYNAMIC */
|
|
3333
|
+
}, [
|
|
3334
|
+
unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
|
|
3335
|
+
name: "before",
|
|
3336
|
+
fn: withCtx(() => [
|
|
3337
|
+
renderSlot(_ctx.$slots, "dropdown::before"),
|
|
3338
|
+
unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
3339
|
+
key: 0,
|
|
3340
|
+
id: unref(hasSearchId),
|
|
3341
|
+
ref_key: "inputSearchEl",
|
|
3342
|
+
ref: inputSearchEl,
|
|
3343
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
|
|
3344
|
+
"aria-autocomplete": "list",
|
|
3345
|
+
"aria-controls": unref(hasDropdownId),
|
|
3346
|
+
autocomplete: "off",
|
|
3347
|
+
spellcheck: "false",
|
|
3348
|
+
type: "search",
|
|
3349
|
+
class: "vv-dropdown__search",
|
|
3350
|
+
placeholder: unref(propsDefaults).searchPlaceholder
|
|
3351
|
+
}, null, 8, _hoisted_3)), [
|
|
3352
|
+
[vModelText, unref(searchText)]
|
|
3353
|
+
]) : createCommentVNode("v-if", true)
|
|
3354
|
+
]),
|
|
3355
|
+
key: "0"
|
|
3356
|
+
} : void 0
|
|
3357
|
+
]), 1040, ["modelValue", "role"])
|
|
3358
|
+
],
|
|
3359
|
+
512
|
|
3360
|
+
/* NEED_PATCH */
|
|
3361
|
+
),
|
|
2925
3362
|
createVNode(unref(HintSlot), {
|
|
2926
3363
|
id: unref(hasHintId),
|
|
2927
3364
|
class: "vv-select__hint"
|
|
2928
|
-
}, createSlots({
|
|
3365
|
+
}, createSlots({
|
|
3366
|
+
_: 2
|
|
3367
|
+
/* DYNAMIC */
|
|
3368
|
+
}, [
|
|
2929
3369
|
_ctx.$slots.hint ? {
|
|
2930
3370
|
name: "hint",
|
|
2931
3371
|
fn: withCtx(() => [
|
|
@@ -2955,9 +3395,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2955
3395
|
key: "3"
|
|
2956
3396
|
} : void 0
|
|
2957
3397
|
]), 1032, ["id"])
|
|
2958
|
-
], 10, _hoisted_1)) : (openBlock(), createBlock(
|
|
2959
|
-
|
|
2960
|
-
|
|
3398
|
+
], 10, _hoisted_1)) : (openBlock(), createBlock(
|
|
3399
|
+
_sfc_main$1,
|
|
3400
|
+
mergeProps({ key: 1 }, unref(selectProps), {
|
|
3401
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
|
|
3402
|
+
}),
|
|
3403
|
+
null,
|
|
3404
|
+
16
|
|
3405
|
+
/* FULL_PROPS */
|
|
3406
|
+
));
|
|
2961
3407
|
};
|
|
2962
3408
|
}
|
|
2963
3409
|
});
|