@volverjs/ui-vue 0.0.3-beta.4 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/auto-imports.d.ts +10 -6
- package/bin/icons.cjs +8 -8
- package/bin/icons.js +8 -8
- package/dist/Volver.d.ts +39 -13
- package/dist/components/VvAccordion/VvAccordion.es.js +68 -41
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +128 -79
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +22 -17
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +48 -57
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +313 -172
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +21 -24
- package/dist/components/VvButton/index.d.ts +13 -19
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +55 -40
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +22 -24
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +197 -138
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +5 -3
- package/dist/components/VvCheckbox/index.d.ts +5 -9
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +270 -181
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +12 -1
- package/dist/components/VvCheckboxGroup/index.d.ts +5 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +1127 -452
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +254 -21
- package/dist/components/VvCombobox/index.d.ts +134 -13
- package/dist/components/VvDialog/VvDialog.es.js +169 -78
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +3 -9
- package/dist/components/VvDialog/index.d.ts +16 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +331 -90
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +184 -51
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +9 -0
- package/dist/components/VvDropdown/index.d.ts +73 -31
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +23 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +82 -19
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +509 -294
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/index.d.ts +4 -4
- package/dist/components/VvProgress/VvProgress.es.js +43 -19
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +159 -114
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -2
- package/dist/components/VvRadio/index.d.ts +5 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +233 -158
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +12 -1
- package/dist/components/VvRadioGroup/index.d.ts +5 -0
- package/dist/components/VvSelect/VvSelect.es.js +366 -201
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +33 -17
- package/dist/components/VvSelect/index.d.ts +8 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +381 -202
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +9 -9
- package/dist/components/VvTextarea/index.d.ts +8 -5
- package/dist/components/VvTooltip/VvTooltip.es.js +34 -14
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +11 -5
- package/dist/components/VvTooltip/index.d.ts +7 -9
- package/dist/components/index.es.js +2324 -1339
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +31 -0
- package/dist/composables/dropdown/useProvideDropdown.d.ts +36 -0
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +2 -2
- package/dist/composables/useComponentIcon.d.ts +10 -0
- package/dist/composables/useModifiers.d.ts +1 -9
- package/dist/composables/useOptions.d.ts +2 -1
- package/dist/composables/useUniqueId.d.ts +2 -0
- package/dist/composables/useVolver.d.ts +2 -0
- package/dist/constants.d.ts +29 -4
- package/dist/directives/index.d.ts +4 -0
- package/dist/directives/v-tooltip.d.ts +3 -0
- package/dist/icons.d.ts +9 -0
- package/dist/icons.es.js +30 -21
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +2463 -1393
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +149 -23
- package/dist/resolvers/unplugin.es.js +20 -20
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +14 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +226 -3
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +138 -28
- package/dist/stories/Dropdown/Dropdown.test.d.ts +1 -1
- package/dist/stories/InputText/InputText.settings.d.ts +24 -24
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +14 -0
- package/dist/stories/Select/Select.settings.d.ts +15 -1
- package/dist/stories/Textarea/Textarea.settings.d.ts +24 -24
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +1 -1
- package/dist/stories/argTypes.d.ts +164 -3
- package/package.json +51 -42
- package/src/Volver.ts +145 -33
- package/src/assets/icons/detailed/add-circle.svg +12 -1
- package/src/assets/icons/detailed/add.svg +8 -1
- package/src/assets/icons/detailed/align-center.svg +12 -1
- package/src/assets/icons/detailed/align-justify.svg +12 -1
- package/src/assets/icons/detailed/align-left.svg +12 -1
- package/src/assets/icons/detailed/align-right.svg +12 -1
- package/src/assets/icons/detailed/analysis-2.svg +20 -1
- package/src/assets/icons/detailed/analysis-3.svg +8 -1
- package/src/assets/icons/detailed/analysis.svg +16 -1
- package/src/assets/icons/detailed/apple.svg +16 -1
- package/src/assets/icons/detailed/arrow-down.svg +8 -1
- package/src/assets/icons/detailed/arrow-left.svg +8 -1
- package/src/assets/icons/detailed/arrow-right.svg +8 -1
- package/src/assets/icons/detailed/arrow-up.svg +8 -1
- package/src/assets/icons/detailed/attachment.svg +8 -1
- package/src/assets/icons/detailed/back-to-front.svg +17 -1
- package/src/assets/icons/detailed/bell-active.svg +14 -1
- package/src/assets/icons/detailed/bell.svg +14 -1
- package/src/assets/icons/detailed/bold.svg +8 -1
- package/src/assets/icons/detailed/bookmark-active.svg +12 -1
- package/src/assets/icons/detailed/bookmark.svg +12 -1
- package/src/assets/icons/detailed/building.svg +26 -1
- package/src/assets/icons/detailed/bullet-list.svg +22 -1
- package/src/assets/icons/detailed/calendar.svg +26 -1
- package/src/assets/icons/detailed/camera-off.svg +12 -1
- package/src/assets/icons/detailed/camera-on.svg +17 -1
- package/src/assets/icons/detailed/catalog.svg +15 -1
- package/src/assets/icons/detailed/certificate.svg +10 -1
- package/src/assets/icons/detailed/chat.svg +6 -1
- package/src/assets/icons/detailed/check-badge.svg +9 -1
- package/src/assets/icons/detailed/check-circle.svg +10 -1
- package/src/assets/icons/detailed/check.svg +6 -1
- package/src/assets/icons/detailed/checkbox.svg +8 -1
- package/src/assets/icons/detailed/chevron-down-circle.svg +10 -1
- package/src/assets/icons/detailed/chevron-down.svg +6 -1
- package/src/assets/icons/detailed/chevron-left-circle.svg +10 -1
- package/src/assets/icons/detailed/chevron-left.svg +6 -1
- package/src/assets/icons/detailed/chevron-right-circle.svg +7 -1
- package/src/assets/icons/detailed/chevron-up-circle.svg +10 -1
- package/src/assets/icons/detailed/chevron-up.svg +6 -1
- package/src/assets/icons/detailed/circle.svg +8 -0
- package/src/assets/icons/detailed/classroom.svg +38 -1
- package/src/assets/icons/detailed/clear-field.svg +14 -1
- package/src/assets/icons/detailed/clear-style.svg +9 -1
- package/src/assets/icons/detailed/close-circle.svg +14 -1
- package/src/assets/icons/detailed/close-loader.svg +6 -1
- package/src/assets/icons/detailed/close.svg +8 -1
- package/src/assets/icons/detailed/coffee.svg +21 -1
- package/src/assets/icons/detailed/color.svg +20 -1
- package/src/assets/icons/detailed/contact-us.svg +27 -1
- package/src/assets/icons/detailed/copy.svg +10 -1
- package/src/assets/icons/detailed/courses.svg +22 -1
- package/src/assets/icons/detailed/dashboard.svg +20 -1
- package/src/assets/icons/detailed/download.svg +10 -1
- package/src/assets/icons/detailed/drag.svg +10 -1
- package/src/assets/icons/detailed/duplicate.svg +23 -1
- package/src/assets/icons/detailed/edit.svg +16 -1
- package/src/assets/icons/detailed/elearning.svg +13 -1
- package/src/assets/icons/detailed/email.svg +11 -1
- package/src/assets/icons/detailed/error-2.svg +8 -1
- package/src/assets/icons/detailed/error.svg +12 -1
- package/src/assets/icons/detailed/exercise.svg +26 -1
- package/src/assets/icons/detailed/external-link.svg +11 -1
- package/src/assets/icons/detailed/extract.svg +20 -1
- package/src/assets/icons/detailed/eye-off.svg +15 -1
- package/src/assets/icons/detailed/eye-on.svg +8 -1
- package/src/assets/icons/detailed/fail.svg +11 -1
- package/src/assets/icons/detailed/fast-back.svg +20 -1
- package/src/assets/icons/detailed/fast-forward.svg +20 -1
- package/src/assets/icons/detailed/file-add.svg +19 -1
- package/src/assets/icons/detailed/file-duplicate.svg +16 -1
- package/src/assets/icons/detailed/file-remove.svg +17 -1
- package/src/assets/icons/detailed/file-required.svg +23 -1
- package/src/assets/icons/detailed/file.svg +13 -1
- package/src/assets/icons/detailed/filter-2.svg +22 -1
- package/src/assets/icons/detailed/filter-active.svg +12 -1
- package/src/assets/icons/detailed/filter.svg +12 -1
- package/src/assets/icons/detailed/flag.svg +11 -1
- package/src/assets/icons/detailed/folder.svg +14 -1
- package/src/assets/icons/detailed/full-width.svg +11 -1
- package/src/assets/icons/detailed/go-to-back.svg +19 -1
- package/src/assets/icons/detailed/grid.svg +20 -1
- package/src/assets/icons/detailed/group-add.svg +24 -1
- package/src/assets/icons/detailed/group.svg +16 -1
- package/src/assets/icons/detailed/heart-active.svg +12 -1
- package/src/assets/icons/detailed/heart.svg +12 -1
- package/src/assets/icons/detailed/highlighter.svg +10 -1
- package/src/assets/icons/detailed/home.svg +12 -1
- package/src/assets/icons/detailed/hourglass.svg +12 -1
- package/src/assets/icons/detailed/image.svg +15 -1
- package/src/assets/icons/detailed/info-badge.svg +9 -1
- package/src/assets/icons/detailed/information.svg +12 -1
- package/src/assets/icons/detailed/italic.svg +10 -1
- package/src/assets/icons/detailed/key.svg +5 -1
- package/src/assets/icons/detailed/language.svg +14 -1
- package/src/assets/icons/detailed/learning-path.svg +7 -1
- package/src/assets/icons/detailed/light-off.svg +10 -1
- package/src/assets/icons/detailed/light-on.svg +18 -1
- package/src/assets/icons/detailed/link.svg +12 -1
- package/src/assets/icons/detailed/lock.svg +13 -1
- package/src/assets/icons/detailed/login.svg +11 -1
- package/src/assets/icons/detailed/logout.svg +11 -1
- package/src/assets/icons/detailed/maximaze.svg +12 -1
- package/src/assets/icons/detailed/menu.svg +9 -1
- package/src/assets/icons/detailed/merge.svg +20 -1
- package/src/assets/icons/detailed/minimize.svg +14 -1
- package/src/assets/icons/detailed/mixed-class.svg +40 -1
- package/src/assets/icons/detailed/more-horizontal.svg +7 -1
- package/src/assets/icons/detailed/more-vertical.svg +7 -1
- package/src/assets/icons/detailed/news.svg +12 -1
- package/src/assets/icons/detailed/no-prerequisites.svg +13 -1
- package/src/assets/icons/detailed/notes.svg +14 -1
- package/src/assets/icons/detailed/number-code.svg +34 -1
- package/src/assets/icons/detailed/numbered-list.svg +18 -1
- package/src/assets/icons/detailed/on-site.svg +22 -1
- package/src/assets/icons/detailed/order-down.svg +12 -1
- package/src/assets/icons/detailed/order-up.svg +12 -1
- package/src/assets/icons/detailed/paste.svg +14 -1
- package/src/assets/icons/detailed/pausa.svg +8 -1
- package/src/assets/icons/detailed/pdf.svg +12 -1
- package/src/assets/icons/detailed/phone.svg +10 -1
- package/src/assets/icons/detailed/pin-map.svg +12 -1
- package/src/assets/icons/detailed/pin.svg +15 -1
- package/src/assets/icons/detailed/pizza.svg +17 -1
- package/src/assets/icons/detailed/play.svg +11 -1
- package/src/assets/icons/detailed/plug-in.svg +10 -1
- package/src/assets/icons/detailed/pointer.svg +12 -1
- package/src/assets/icons/detailed/printer.svg +26 -1
- package/src/assets/icons/detailed/profile-add.svg +20 -1
- package/src/assets/icons/detailed/profile.svg +10 -1
- package/src/assets/icons/detailed/push-pin-off.svg +11 -1
- package/src/assets/icons/detailed/push-pin-on.svg +9 -1
- package/src/assets/icons/detailed/qrcode.svg +28 -1
- package/src/assets/icons/detailed/question-badge.svg +10 -1
- package/src/assets/icons/detailed/radio.svg +8 -1
- package/src/assets/icons/detailed/redo.svg +9 -1
- package/src/assets/icons/detailed/relations.svg +32 -1
- package/src/assets/icons/detailed/reload.svg +13 -1
- package/src/assets/icons/detailed/remove-circle.svg +10 -1
- package/src/assets/icons/detailed/remove.svg +5 -1
- package/src/assets/icons/detailed/reorder.svg +12 -1
- package/src/assets/icons/detailed/repeat.svg +12 -1
- package/src/assets/icons/detailed/repository.svg +18 -1
- package/src/assets/icons/detailed/request-form.svg +18 -1
- package/src/assets/icons/detailed/resize-100%.svg +15 -1
- package/src/assets/icons/detailed/resize-height.svg +12 -1
- package/src/assets/icons/detailed/resize-width.svg +12 -1
- package/src/assets/icons/detailed/search.svg +12 -1
- package/src/assets/icons/detailed/sequential-prerequisites.svg +20 -1
- package/src/assets/icons/detailed/settings.svg +14 -1
- package/src/assets/icons/detailed/share.svg +20 -1
- package/src/assets/icons/detailed/sketch.svg +12 -1
- package/src/assets/icons/detailed/skills.svg +20 -1
- package/src/assets/icons/detailed/skip-back.svg +12 -1
- package/src/assets/icons/detailed/skip-forward.svg +13 -1
- package/src/assets/icons/detailed/sms.svg +18 -1
- package/src/assets/icons/detailed/sso-access.svg +18 -1
- package/src/assets/icons/detailed/star-active.svg +6 -1
- package/src/assets/icons/detailed/star.svg +6 -1
- package/src/assets/icons/detailed/success.svg +10 -1
- package/src/assets/icons/detailed/sun.svg +24 -1
- package/src/assets/icons/detailed/sunrise.svg +18 -1
- package/src/assets/icons/detailed/support.svg +18 -1
- package/src/assets/icons/detailed/survey.svg +24 -1
- package/src/assets/icons/detailed/table.svg +11 -1
- package/src/assets/icons/detailed/tematic-channels.svg +12 -1
- package/src/assets/icons/detailed/test.svg +14 -1
- package/src/assets/icons/detailed/text-body.svg +8 -1
- package/src/assets/icons/detailed/text-edit.svg +11 -1
- package/src/assets/icons/detailed/text-style.svg +10 -1
- package/src/assets/icons/detailed/time.svg +10 -1
- package/src/assets/icons/detailed/toilet-piper.svg +15 -1
- package/src/assets/icons/detailed/training-points.svg +16 -1
- package/src/assets/icons/detailed/trash.svg +19 -1
- package/src/assets/icons/detailed/underline.svg +8 -1
- package/src/assets/icons/detailed/undo.svg +9 -1
- package/src/assets/icons/detailed/unlock.svg +13 -1
- package/src/assets/icons/detailed/upload.svg +10 -1
- package/src/assets/icons/detailed/user-add.svg +16 -1
- package/src/assets/icons/detailed/user-badge.svg +11 -1
- package/src/assets/icons/detailed/user.svg +8 -1
- package/src/assets/icons/detailed/video-off.svg +17 -1
- package/src/assets/icons/detailed/video-on.svg +16 -1
- package/src/assets/icons/detailed/video-rec.svg +19 -1
- package/src/assets/icons/detailed/view-card.svg +12 -1
- package/src/assets/icons/detailed/view-list.svg +20 -1
- package/src/assets/icons/detailed/view.svg +7 -1
- package/src/assets/icons/detailed/voice-off.svg +14 -1
- package/src/assets/icons/detailed/voice-on.svg +16 -1
- package/src/assets/icons/detailed/volume-down.svg +14 -1
- package/src/assets/icons/detailed/volume-off.svg +19 -1
- package/src/assets/icons/detailed/volume-up.svg +16 -1
- package/src/assets/icons/detailed/warning.svg +16 -1
- package/src/assets/icons/detailed/webinar.svg +57 -1
- package/src/assets/icons/detailed/whiteboard.svg +16 -1
- package/src/assets/icons/detailed/wine.svg +22 -1
- package/src/assets/icons/detailed/zip.svg +17 -1
- package/src/assets/icons/detailed/zoom-in.svg +18 -1
- package/src/assets/icons/detailed/zoom-out.svg +16 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal/add-circle.svg +12 -1
- package/src/assets/icons/normal/add.svg +4 -1
- package/src/assets/icons/normal/align-center.svg +11 -1
- package/src/assets/icons/normal/align-justify.svg +11 -1
- package/src/assets/icons/normal/align-left.svg +11 -1
- package/src/assets/icons/normal/align-right.svg +11 -1
- package/src/assets/icons/normal/analysis-2.svg +18 -1
- package/src/assets/icons/normal/analysis-3.svg +8 -1
- package/src/assets/icons/normal/analysis.svg +14 -1
- package/src/assets/icons/normal/apple.svg +16 -1
- package/src/assets/icons/normal/arrow-down.svg +8 -1
- package/src/assets/icons/normal/arrow-left.svg +8 -1
- package/src/assets/icons/normal/arrow-right.svg +8 -1
- package/src/assets/icons/normal/arrow-up.svg +8 -1
- package/src/assets/icons/normal/attachment.svg +6 -1
- package/src/assets/icons/normal/back-to-front.svg +15 -1
- package/src/assets/icons/normal/bell-active.svg +14 -1
- package/src/assets/icons/normal/bell.svg +14 -1
- package/src/assets/icons/normal/bold.svg +8 -1
- package/src/assets/icons/normal/bookmark active.svg +12 -1
- package/src/assets/icons/normal/bookmark.svg +10 -1
- package/src/assets/icons/normal/building.svg +21 -1
- package/src/assets/icons/normal/bulleted-list.svg +23 -1
- package/src/assets/icons/normal/calendar.svg +20 -1
- package/src/assets/icons/normal/camera-off.svg +17 -1
- package/src/assets/icons/normal/camera-on.svg +16 -1
- package/src/assets/icons/normal/catalog.svg +13 -1
- package/src/assets/icons/normal/certificate.svg +12 -1
- package/src/assets/icons/normal/chat.svg +6 -1
- package/src/assets/icons/normal/check-badge.svg +9 -1
- package/src/assets/icons/normal/check-circle.svg +10 -1
- package/src/assets/icons/normal/check.svg +4 -1
- package/src/assets/icons/normal/checkbox.svg +8 -1
- package/src/assets/icons/normal/chevron-down-circle.svg +10 -1
- package/src/assets/icons/normal/chevron-down.svg +6 -1
- package/src/assets/icons/normal/chevron-left-circle.svg +10 -1
- package/src/assets/icons/normal/chevron-left.svg +6 -1
- package/src/assets/icons/normal/chevron-right-circle.svg +10 -1
- package/src/assets/icons/normal/chevron-right.svg +7 -1
- package/src/assets/icons/normal/chevron-up-circle.svg +10 -1
- package/src/assets/icons/normal/chevron-up.svg +6 -1
- package/src/assets/icons/normal/circle.svg +8 -0
- package/src/assets/icons/normal/classroom.svg +36 -1
- package/src/assets/icons/normal/clear-field.svg +14 -1
- package/src/assets/icons/normal/clear-style.svg +18 -1
- package/src/assets/icons/normal/close-circle.svg +14 -1
- package/src/assets/icons/normal/close-loader.svg +6 -1
- package/src/assets/icons/normal/close.svg +8 -1
- package/src/assets/icons/normal/coffee.svg +26 -1
- package/src/assets/icons/normal/color.svg +18 -1
- package/src/assets/icons/normal/contact-us.svg +29 -1
- package/src/assets/icons/normal/copy.svg +10 -1
- package/src/assets/icons/normal/courses.svg +22 -1
- package/src/assets/icons/normal/dashboard.svg +18 -1
- package/src/assets/icons/normal/download.svg +10 -1
- package/src/assets/icons/normal/drag.svg +5 -1
- package/src/assets/icons/normal/dulicate.svg +22 -1
- package/src/assets/icons/normal/edit.svg +16 -1
- package/src/assets/icons/normal/elearning.svg +16 -1
- package/src/assets/icons/normal/email.svg +11 -1
- package/src/assets/icons/normal/error-2.svg +8 -1
- package/src/assets/icons/normal/error.svg +12 -1
- package/src/assets/icons/normal/exercise.svg +26 -1
- package/src/assets/icons/normal/external-link.svg +11 -1
- package/src/assets/icons/normal/extract.svg +14 -1
- package/src/assets/icons/normal/eye-off.svg +14 -1
- package/src/assets/icons/normal/eye-on.svg +16 -1
- package/src/assets/icons/normal/fail.svg +11 -1
- package/src/assets/icons/normal/fast-back.svg +19 -1
- package/src/assets/icons/normal/fast-forward.svg +17 -1
- package/src/assets/icons/normal/file-add.svg +16 -1
- package/src/assets/icons/normal/file-duplicate.svg +22 -1
- package/src/assets/icons/normal/file-remove.svg +14 -1
- package/src/assets/icons/normal/file-required.svg +24 -1
- package/src/assets/icons/normal/file.svg +13 -1
- package/src/assets/icons/normal/filter-2.svg +20 -1
- package/src/assets/icons/normal/filter-active.svg +12 -1
- package/src/assets/icons/normal/filter.svg +12 -1
- package/src/assets/icons/normal/flag.svg +10 -1
- package/src/assets/icons/normal/folder.svg +12 -1
- package/src/assets/icons/normal/full-width.svg +9 -1
- package/src/assets/icons/normal/go-to-back.svg +19 -1
- package/src/assets/icons/normal/grid.svg +20 -1
- package/src/assets/icons/normal/group-add.svg +18 -1
- package/src/assets/icons/normal/group.svg +14 -1
- package/src/assets/icons/normal/heart-active.svg +10 -1
- package/src/assets/icons/normal/heart.svg +10 -1
- package/src/assets/icons/normal/highlighter.svg +11 -1
- package/src/assets/icons/normal/home.svg +12 -1
- package/src/assets/icons/normal/hourglass.svg +8 -1
- package/src/assets/icons/normal/image.svg +15 -1
- package/src/assets/icons/normal/info-badge.svg +9 -1
- package/src/assets/icons/normal/information.svg +12 -1
- package/src/assets/icons/normal/italic.svg +10 -1
- package/src/assets/icons/normal/key.svg +8 -1
- package/src/assets/icons/normal/language.svg +14 -1
- package/src/assets/icons/normal/learning-path.svg +7 -1
- package/src/assets/icons/normal/light-off.svg +10 -1
- package/src/assets/icons/normal/light-on.svg +17 -1
- package/src/assets/icons/normal/link.svg +12 -1
- package/src/assets/icons/normal/lock.svg +12 -1
- package/src/assets/icons/normal/login.svg +10 -1
- package/src/assets/icons/normal/logout.svg +10 -1
- package/src/assets/icons/normal/maximize.svg +10 -1
- package/src/assets/icons/normal/menu.svg +8 -1
- package/src/assets/icons/normal/merge.svg +20 -1
- package/src/assets/icons/normal/minimize.svg +12 -1
- package/src/assets/icons/normal/mixed-class.svg +36 -1
- package/src/assets/icons/normal/more-horizontal.svg +7 -1
- package/src/assets/icons/normal/more-vertical.svg +7 -1
- package/src/assets/icons/normal/news.svg +9 -1
- package/src/assets/icons/normal/no-prerequisites.svg +12 -1
- package/src/assets/icons/normal/notes.svg +15 -1
- package/src/assets/icons/normal/number-code.svg +34 -1
- package/src/assets/icons/normal/numbered-list.svg +19 -1
- package/src/assets/icons/normal/on-site.svg +18 -1
- package/src/assets/icons/normal/order-down.svg +12 -1
- package/src/assets/icons/normal/order-up.svg +11 -1
- package/src/assets/icons/normal/paste.svg +14 -1
- package/src/assets/icons/normal/pausa.svg +7 -1
- package/src/assets/icons/normal/pdf.svg +12 -1
- package/src/assets/icons/normal/phone.svg +10 -1
- package/src/assets/icons/normal/pin-map.svg +10 -1
- package/src/assets/icons/normal/pin.svg +12 -1
- package/src/assets/icons/normal/pizza.svg +17 -1
- package/src/assets/icons/normal/play.svg +9 -1
- package/src/assets/icons/normal/plug-in.svg +10 -1
- package/src/assets/icons/normal/pointer.svg +12 -1
- package/src/assets/icons/normal/printer.svg +28 -1
- package/src/assets/icons/normal/profile-add.svg +28 -1
- package/src/assets/icons/normal/profile.svg +15 -1
- package/src/assets/icons/normal/push pin on.svg +9 -1
- package/src/assets/icons/normal/push-pin-off.svg +23 -1
- package/src/assets/icons/normal/qrcode.svg +26 -1
- package/src/assets/icons/normal/question-badge.svg +10 -1
- package/src/assets/icons/normal/radio.svg +8 -1
- package/src/assets/icons/normal/redo.svg +9 -1
- package/src/assets/icons/normal/relations.svg +28 -1
- package/src/assets/icons/normal/reload.svg +12 -1
- package/src/assets/icons/normal/remove-circle.svg +10 -1
- package/src/assets/icons/normal/remove.svg +4 -1
- package/src/assets/icons/normal/reorder.svg +12 -1
- package/src/assets/icons/normal/repeat.svg +12 -1
- package/src/assets/icons/normal/repository.svg +18 -1
- package/src/assets/icons/normal/request-form.svg +18 -1
- package/src/assets/icons/normal/resize-100%.svg +17 -1
- package/src/assets/icons/normal/resize-height.svg +12 -1
- package/src/assets/icons/normal/resize-width.svg +12 -1
- package/src/assets/icons/normal/search.svg +10 -1
- package/src/assets/icons/normal/sequential-prerequisites.svg +20 -1
- package/src/assets/icons/normal/settings.svg +14 -1
- package/src/assets/icons/normal/share.svg +20 -1
- package/src/assets/icons/normal/sketch.svg +11 -1
- package/src/assets/icons/normal/skills.svg +16 -1
- package/src/assets/icons/normal/skip-back.svg +12 -1
- package/src/assets/icons/normal/skip-forward.svg +13 -1
- package/src/assets/icons/normal/sms.svg +20 -1
- package/src/assets/icons/normal/sso-access.svg +20 -1
- package/src/assets/icons/normal/star-active.svg +4 -1
- package/src/assets/icons/normal/star.svg +4 -1
- package/src/assets/icons/normal/success.svg +10 -1
- package/src/assets/icons/normal/sun.svg +24 -1
- package/src/assets/icons/normal/sunrise.svg +18 -1
- package/src/assets/icons/normal/support.svg +18 -1
- package/src/assets/icons/normal/survey.svg +24 -1
- package/src/assets/icons/normal/table.svg +11 -1
- package/src/assets/icons/normal/tematic-channels.svg +10 -1
- package/src/assets/icons/normal/test.svg +15 -1
- package/src/assets/icons/normal/text-body.svg +8 -1
- package/src/assets/icons/normal/text-edit.svg +11 -1
- package/src/assets/icons/normal/text-style.svg +10 -1
- package/src/assets/icons/normal/time.svg +10 -1
- package/src/assets/icons/normal/toilet-paper.svg +15 -1
- package/src/assets/icons/normal/training-points.svg +16 -1
- package/src/assets/icons/normal/trash.svg +19 -1
- package/src/assets/icons/normal/underline.svg +8 -1
- package/src/assets/icons/normal/undo.svg +9 -1
- package/src/assets/icons/normal/unlock.svg +13 -1
- package/src/assets/icons/normal/upload.svg +10 -1
- package/src/assets/icons/normal/user-add.svg +14 -1
- package/src/assets/icons/normal/user-badge.svg +11 -1
- package/src/assets/icons/normal/user.svg +5 -1
- package/src/assets/icons/normal/video-off.svg +11 -1
- package/src/assets/icons/normal/video-on.svg +20 -1
- package/src/assets/icons/normal/video-rec.svg +23 -1
- package/src/assets/icons/normal/view-card.svg +10 -1
- package/src/assets/icons/normal/view-list.svg +18 -1
- package/src/assets/icons/normal/view.svg +8 -1
- package/src/assets/icons/normal/voice-off.svg +18 -1
- package/src/assets/icons/normal/voice-on.svg +15 -1
- package/src/assets/icons/normal/volume-down.svg +14 -1
- package/src/assets/icons/normal/volume-off.svg +18 -1
- package/src/assets/icons/normal/volume-up.svg +16 -1
- package/src/assets/icons/normal/warning.svg +16 -1
- package/src/assets/icons/normal/webinar.svg +36 -1
- package/src/assets/icons/normal/whiteboard.svg +17 -1
- package/src/assets/icons/normal/wine.svg +22 -1
- package/src/assets/icons/normal/zip.svg +19 -1
- package/src/assets/icons/normal/zoom-in.svg +16 -1
- package/src/assets/icons/normal/zoom-out.svg +14 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple/add-circle.svg +12 -1
- package/src/assets/icons/simple/add.svg +8 -1
- package/src/assets/icons/simple/align-center.svg +12 -1
- package/src/assets/icons/simple/align-justify.svg +12 -1
- package/src/assets/icons/simple/align-left.svg +12 -1
- package/src/assets/icons/simple/align-right.svg +12 -1
- package/src/assets/icons/simple/analysis-2.svg +21 -1
- package/src/assets/icons/simple/analysis-3.svg +8 -1
- package/src/assets/icons/simple/analysis.svg +16 -1
- package/src/assets/icons/simple/apple.svg +18 -1
- package/src/assets/icons/simple/arrow-down.svg +8 -1
- package/src/assets/icons/simple/arrow-left.svg +8 -1
- package/src/assets/icons/simple/arrow-right.svg +8 -1
- package/src/assets/icons/simple/arrow-up.svg +8 -1
- package/src/assets/icons/simple/attachment.svg +10 -1
- package/src/assets/icons/simple/bck-to-front.svg +19 -1
- package/src/assets/icons/simple/bell-active.svg +14 -1
- package/src/assets/icons/simple/bell.svg +14 -1
- package/src/assets/icons/simple/bold.svg +8 -1
- package/src/assets/icons/simple/bookmark-active.svg +12 -1
- package/src/assets/icons/simple/bookmark.svg +12 -1
- package/src/assets/icons/simple/building.svg +25 -1
- package/src/assets/icons/simple/bulleted-list.svg +22 -1
- package/src/assets/icons/simple/calendar.svg +22 -1
- package/src/assets/icons/simple/camera-off.svg +12 -1
- package/src/assets/icons/simple/camera-on.svg +16 -1
- package/src/assets/icons/simple/catalog.svg +14 -1
- package/src/assets/icons/simple/certificate.svg +15 -1
- package/src/assets/icons/simple/chat.svg +9 -1
- package/src/assets/icons/simple/check-badge.svg +9 -1
- package/src/assets/icons/simple/check-circle.svg +10 -1
- package/src/assets/icons/simple/check.svg +6 -1
- package/src/assets/icons/simple/checkbox.svg +6 -1
- package/src/assets/icons/simple/chevron-down-circle.svg +10 -1
- package/src/assets/icons/simple/chevron-down.svg +6 -1
- package/src/assets/icons/simple/chevron-left-circle.svg +10 -1
- package/src/assets/icons/simple/chevron-left.svg +6 -1
- package/src/assets/icons/simple/chevron-right-circle.svg +10 -1
- package/src/assets/icons/simple/chevron-right.svg +7 -1
- package/src/assets/icons/simple/chevron-up-circle.svg +10 -1
- package/src/assets/icons/simple/chevron-up.svg +6 -1
- package/src/assets/icons/simple/circle.svg +8 -0
- package/src/assets/icons/simple/classroom.svg +38 -1
- package/src/assets/icons/simple/clear-field.svg +11 -1
- package/src/assets/icons/simple/clear-style.svg +15 -1
- package/src/assets/icons/simple/close-circle.svg +14 -1
- package/src/assets/icons/simple/close-loader.svg +6 -1
- package/src/assets/icons/simple/close.svg +10 -1
- package/src/assets/icons/simple/coffee.svg +28 -1
- package/src/assets/icons/simple/color.svg +20 -1
- package/src/assets/icons/simple/contact-us.svg +26 -1
- package/src/assets/icons/simple/copy.svg +10 -1
- package/src/assets/icons/simple/courses.svg +21 -1
- package/src/assets/icons/simple/dashboard.svg +20 -1
- package/src/assets/icons/simple/download.svg +10 -1
- package/src/assets/icons/simple/drag.svg +10 -1
- package/src/assets/icons/simple/duplicate.svg +24 -1
- package/src/assets/icons/simple/edit.svg +17 -1
- package/src/assets/icons/simple/elearning.svg +17 -1
- package/src/assets/icons/simple/email.svg +11 -1
- package/src/assets/icons/simple/error-2.svg +8 -1
- package/src/assets/icons/simple/error.svg +12 -1
- package/src/assets/icons/simple/exercise.svg +30 -1
- package/src/assets/icons/simple/external-link.svg +13 -1
- package/src/assets/icons/simple/extract.svg +17 -1
- package/src/assets/icons/simple/eye-off.svg +13 -1
- package/src/assets/icons/simple/eye-on.svg +11 -1
- package/src/assets/icons/simple/fail.svg +11 -1
- package/src/assets/icons/simple/fast-back.svg +20 -1
- package/src/assets/icons/simple/fast-forward.svg +19 -1
- package/src/assets/icons/simple/file-add.svg +20 -1
- package/src/assets/icons/simple/file-duplicate.svg +22 -1
- package/src/assets/icons/simple/file-remove.svg +18 -1
- package/src/assets/icons/simple/file-required.svg +24 -1
- package/src/assets/icons/simple/file.svg +14 -1
- package/src/assets/icons/simple/filter-2.svg +24 -1
- package/src/assets/icons/simple/filter-active.svg +13 -1
- package/src/assets/icons/simple/filter.svg +12 -1
- package/src/assets/icons/simple/flag.svg +12 -1
- package/src/assets/icons/simple/folder.svg +14 -1
- package/src/assets/icons/simple/full-width.svg +11 -1
- package/src/assets/icons/simple/go-to-back.svg +18 -1
- package/src/assets/icons/simple/grid.svg +20 -1
- package/src/assets/icons/simple/group-add.svg +24 -1
- package/src/assets/icons/simple/group.svg +18 -1
- package/src/assets/icons/simple/heart-active.svg +12 -1
- package/src/assets/icons/simple/heart.svg +12 -1
- package/src/assets/icons/simple/highlighter.svg +12 -1
- package/src/assets/icons/simple/home.svg +13 -1
- package/src/assets/icons/simple/hourglass.svg +11 -1
- package/src/assets/icons/simple/image.svg +15 -1
- package/src/assets/icons/simple/info-badge.svg +9 -1
- package/src/assets/icons/simple/information.svg +12 -1
- package/src/assets/icons/simple/italic.svg +12 -1
- package/src/assets/icons/simple/key.svg +11 -1
- package/src/assets/icons/simple/language.svg +12 -1
- package/src/assets/icons/simple/learning-path.svg +9 -1
- package/src/assets/icons/simple/light-off.svg +7 -1
- package/src/assets/icons/simple/light-on.svg +18 -1
- package/src/assets/icons/simple/link.svg +14 -1
- package/src/assets/icons/simple/lock.svg +13 -1
- package/src/assets/icons/simple/login.svg +11 -1
- package/src/assets/icons/simple/logout.svg +11 -1
- package/src/assets/icons/simple/maximaze.svg +12 -1
- package/src/assets/icons/simple/menu.svg +10 -1
- package/src/assets/icons/simple/merge.svg +20 -1
- package/src/assets/icons/simple/minimaze.svg +12 -1
- package/src/assets/icons/simple/mixed-class.svg +40 -1
- package/src/assets/icons/simple/more-horizontal.svg +8 -1
- package/src/assets/icons/simple/more-vertical.svg +8 -1
- package/src/assets/icons/simple/news.svg +12 -1
- package/src/assets/icons/simple/no-prerequisites.svg +17 -1
- package/src/assets/icons/simple/notes.svg +14 -1
- package/src/assets/icons/simple/number-code.svg +29 -1
- package/src/assets/icons/simple/numbered-list.svg +18 -1
- package/src/assets/icons/simple/on-site.svg +18 -1
- package/src/assets/icons/simple/order-down.svg +12 -1
- package/src/assets/icons/simple/order-up.svg +12 -1
- package/src/assets/icons/simple/paste.svg +14 -1
- package/src/assets/icons/simple/pausa.svg +8 -1
- package/src/assets/icons/simple/pdf.svg +12 -1
- package/src/assets/icons/simple/phone.svg +10 -1
- package/src/assets/icons/simple/pin-map.svg +13 -1
- package/src/assets/icons/simple/pin.svg +14 -1
- package/src/assets/icons/simple/pizza.svg +17 -1
- package/src/assets/icons/simple/play.svg +10 -1
- package/src/assets/icons/simple/plug-in.svg +10 -1
- package/src/assets/icons/simple/pointer.svg +6 -1
- package/src/assets/icons/simple/printer.svg +28 -1
- package/src/assets/icons/simple/profile-add.svg +28 -1
- package/src/assets/icons/simple/profile.svg +13 -1
- package/src/assets/icons/simple/push-pin-off.svg +11 -1
- package/src/assets/icons/simple/push-pin-on.svg +12 -1
- package/src/assets/icons/simple/qrcode.svg +26 -1
- package/src/assets/icons/simple/question-badge.svg +10 -1
- package/src/assets/icons/simple/radio.svg +8 -1
- package/src/assets/icons/simple/redo.svg +9 -1
- package/src/assets/icons/simple/relations.svg +28 -1
- package/src/assets/icons/simple/reload.svg +12 -1
- package/src/assets/icons/simple/remove-circle.svg +10 -1
- package/src/assets/icons/simple/remove.svg +6 -1
- package/src/assets/icons/simple/repeart.svg +14 -1
- package/src/assets/icons/simple/repository.svg +18 -1
- package/src/assets/icons/simple/request-form.svg +20 -1
- package/src/assets/icons/simple/resize-100%.svg +15 -1
- package/src/assets/icons/simple/resize-height.svg +12 -1
- package/src/assets/icons/simple/resize-width.svg +14 -1
- package/src/assets/icons/simple/search.svg +10 -1
- package/src/assets/icons/simple/sequential-prerequisites.svg +22 -1
- package/src/assets/icons/simple/settings.svg +17 -1
- package/src/assets/icons/simple/share.svg +21 -1
- package/src/assets/icons/simple/sketch.svg +13 -1
- package/src/assets/icons/simple/skills.svg +17 -1
- package/src/assets/icons/simple/skip-back.svg +14 -1
- package/src/assets/icons/simple/skip-forward.svg +14 -1
- package/src/assets/icons/simple/sms.svg +22 -1
- package/src/assets/icons/simple/sso-access.svg +20 -1
- package/src/assets/icons/simple/star-active.svg +6 -1
- package/src/assets/icons/simple/star.svg +6 -1
- package/src/assets/icons/simple/success.svg +12 -1
- package/src/assets/icons/simple/sun.svg +22 -1
- package/src/assets/icons/simple/sunrise.svg +18 -1
- package/src/assets/icons/simple/support.svg +18 -1
- package/src/assets/icons/simple/survey.svg +32 -1
- package/src/assets/icons/simple/table.svg +11 -1
- package/src/assets/icons/simple/tematic-channels.svg +15 -1
- package/src/assets/icons/simple/test.svg +23 -1
- package/src/assets/icons/simple/text-body.svg +7 -1
- package/src/assets/icons/simple/text-edit.svg +11 -1
- package/src/assets/icons/simple/text-style.svg +10 -1
- package/src/assets/icons/simple/time.svg +10 -1
- package/src/assets/icons/simple/toilet-paper.svg +17 -1
- package/src/assets/icons/simple/training-points.svg +18 -1
- package/src/assets/icons/simple/trash.svg +20 -1
- package/src/assets/icons/simple/underline.svg +9 -1
- package/src/assets/icons/simple/undo.svg +9 -1
- package/src/assets/icons/simple/unlock.svg +15 -1
- package/src/assets/icons/simple/upload.svg +10 -1
- package/src/assets/icons/simple/user-add.svg +18 -1
- package/src/assets/icons/simple/user-badge.svg +12 -1
- package/src/assets/icons/simple/user.svg +8 -1
- package/src/assets/icons/simple/video-off.svg +17 -1
- package/src/assets/icons/simple/video-on.svg +17 -1
- package/src/assets/icons/simple/video-rec.svg +20 -1
- package/src/assets/icons/simple/view-card.svg +12 -1
- package/src/assets/icons/simple/view-list.svg +20 -1
- package/src/assets/icons/simple/view.svg +17 -1
- package/src/assets/icons/simple/voice-off.svg +16 -1
- package/src/assets/icons/simple/voice-on.svg +16 -1
- package/src/assets/icons/simple/volume-down.svg +15 -1
- package/src/assets/icons/simple/volume-off.svg +16 -1
- package/src/assets/icons/simple/volume-up.svg +16 -1
- package/src/assets/icons/simple/warning.svg +14 -1
- package/src/assets/icons/simple/webinar.svg +19 -1
- package/src/assets/icons/simple/whiteboard.svg +16 -1
- package/src/assets/icons/simple/wine.svg +24 -1
- package/src/assets/icons/simple/zip.svg +22 -1
- package/src/assets/icons/simple/zoom-in.svg +18 -1
- package/src/assets/icons/simple/zoom-out.svg +17 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +16 -9
- package/src/components/VvAccordion/index.ts +5 -3
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +16 -11
- package/src/components/VvBadge/VvBadge.vue +3 -3
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +5 -5
- package/src/components/VvButton/VvButton.vue +82 -46
- package/src/components/VvButton/index.ts +20 -20
- package/src/components/VvButtonGroup/VvButtonGroup.vue +7 -10
- package/src/components/VvCard/VvCard.vue +6 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +17 -12
- package/src/components/VvCheckbox/index.ts +7 -5
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +21 -19
- package/src/components/VvCombobox/VvCombobox.vue +318 -101
- package/src/components/VvCombobox/index.ts +59 -5
- package/src/components/VvDialog/VvDialog.vue +14 -6
- package/src/components/VvDialog/index.ts +18 -1
- package/src/components/VvDropdown/VvDropdown.vue +344 -95
- package/src/components/VvDropdown/VvDropdownItem.vue +32 -0
- package/src/components/VvDropdown/index.ts +25 -23
- package/src/components/VvIcon/VvIcon.vue +16 -16
- package/src/components/VvInputText/VvInputText.vue +45 -34
- package/src/components/VvProgress/VvProgress.vue +7 -5
- package/src/components/VvRadio/VvRadio.vue +16 -14
- package/src/components/VvRadio/index.ts +6 -3
- package/src/components/VvRadioGroup/VvRadioGroup.vue +20 -16
- package/src/components/VvSelect/VvSelect.vue +69 -56
- package/src/components/VvSelect/index.ts +2 -2
- package/src/components/VvTextarea/VvTextarea.vue +46 -33
- package/src/components/VvTooltip/VvTooltip.vue +16 -10
- package/src/components/VvTooltip/index.ts +8 -11
- package/src/components/common/HintSlot.ts +5 -4
- package/src/composables/dropdown/useInjectDropdown.ts +51 -0
- package/src/composables/dropdown/useProvideDropdown.ts +97 -0
- package/src/composables/group/useInjectedGroupState.ts +7 -7
- package/src/composables/group/useProvideGroupState.ts +3 -3
- package/src/composables/useComponentIcon.ts +41 -0
- package/src/composables/useModifiers.ts +31 -91
- package/src/composables/useOptions.ts +11 -3
- package/src/composables/useUniqueId.ts +5 -0
- package/src/composables/useVolver.ts +6 -0
- package/src/constants.ts +38 -5
- package/src/directives/index.ts +5 -0
- package/src/directives/v-tooltip.ts +15 -0
- package/src/index.ts +1 -1
- package/src/props/index.ts +117 -13
- package/src/resolvers/unplugin.ts +4 -1
- package/src/shims.d.ts +1 -1
- package/src/stories/Accordion/Accordion.stories.mdx +9 -7
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +6 -4
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +10 -8
- package/src/stories/Badge/Badge.stories.mdx +4 -3
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +4 -3
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +14 -12
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +8 -8
- package/src/stories/Button/Button.stories.mdx +7 -7
- package/src/stories/Button/Button.test.ts +6 -6
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +15 -11
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +2 -2
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +2 -2
- package/src/stories/Card/Card.stories.mdx +2 -2
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Card/CardSlots.stories.mdx +2 -2
- package/src/stories/Checkbox/Checkbox.stories.mdx +7 -7
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +7 -7
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +9 -9
- package/src/stories/Combobox/Combobox.settings.ts +111 -4
- package/src/stories/Combobox/Combobox.stories.mdx +85 -4
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +78 -0
- package/src/stories/Combobox/ComboboxMultiple.stories.mdx +1 -2
- package/src/stories/Combobox/ComboboxSlots.stories.mdx +107 -2
- package/src/stories/Dialog/Dialog.stories.mdx +2 -2
- package/src/stories/Dialog/Dialog.test.ts +4 -4
- package/src/stories/Dropdown/Dropdown.settings.ts +55 -37
- package/src/stories/Dropdown/Dropdown.stories.mdx +57 -58
- package/src/stories/Dropdown/Dropdown.test.ts +10 -32
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +113 -0
- package/src/stories/Icon/Icon.stories.mdx +1 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -2
- package/src/stories/InputText/InputText.settings.ts +2 -1
- package/src/stories/InputText/InputText.stories.mdx +7 -4
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +2 -2
- package/src/stories/InputText/InputTextSlots.stories.mdx +2 -2
- package/src/stories/Progress/Progress.stories.mdx +3 -1
- package/src/stories/Progress/Progress.test.ts +1 -1
- package/src/stories/Radio/Radio.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +7 -7
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +9 -9
- package/src/stories/Select/Select.settings.ts +2 -2
- package/src/stories/Select/Select.stories.mdx +3 -3
- package/src/stories/Select/SelectIconPosition.stories.mdx +78 -0
- package/src/stories/Select/SelectSlots.stories.mdx +2 -2
- package/src/stories/Textarea/Textarea.settings.ts +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +4 -4
- package/src/stories/Textarea/TextareaSlots.stories.mdx +2 -2
- package/src/stories/Textarea/TextareatIconPosition.stories.mdx +2 -2
- package/src/stories/Tooltip/Tooltip.settings.ts +13 -13
- package/src/stories/Tooltip/Tooltip.stories.mdx +24 -21
- package/src/stories/Tooltip/Tooltip.test.ts +22 -13
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +98 -0
- package/src/stories/argTypes.ts +153 -4
- package/src/types/floating-ui.d.ts +7 -0
- package/src/types/generic.d.ts +0 -1
- package/src/types/group.d.ts +37 -0
- package/src/utils/ObjectUtilities.ts +4 -1
- package/dist/composables/group/types/IAccordionGroupState.d.ts +0 -9
- package/dist/composables/group/types/IButtonGroupState.d.ts +0 -13
- package/dist/composables/group/types/IGroupState.d.ts +0 -8
- package/dist/composables/group/types/IInputGroup.d.ts +0 -8
- package/dist/composables/useComponentIcons.d.ts +0 -27
- package/src/composables/group/types/IAccordionGroupState.ts +0 -10
- package/src/composables/group/types/IButtonGroupState.ts +0 -14
- package/src/composables/group/types/IGroupState.ts +0 -10
- package/src/composables/group/types/IInputGroup.ts +0 -9
- package/src/composables/useComponentIcons.ts +0 -96
- package/src/directives/.gitkeep +0 -0
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +0 -96
|
@@ -1,433 +1,724 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { nanoid as
|
|
3
|
-
import { iconExists as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as K, openBlock as i, createElementBlock as y, unref as t, normalizeClass as ee, withModifiers as st, createElementVNode as M, renderSlot as $, normalizeProps as F, guardReactiveProps as j, createTextVNode as Z, toDisplayString as H, Fragment as ne, renderList as ke, createBlock as W, mergeProps as G, withCtx as ce, resolveDynamicComponent as nt, createCommentVNode as w, withDirectives as Se, isRef as Ae, vModelCheckbox as $t, createVNode as de, Transition as rt, normalizeStyle as Je, vShow as je, vModelSelect as kt, createSlots as At, vModelText as it, toHandlers as Ct, vModelDynamic as wt, vModelRadio as Et } from "vue";
|
|
2
|
+
import { nanoid as It } from "nanoid";
|
|
3
|
+
import { iconExists as Be, Icon as Pt, addIcon as Ot } from "@iconify/vue";
|
|
4
|
+
import { autoPlacement as Qe, flip as Ze, shift as et, size as tt, offset as He, arrow as Dt, useFloating as Bt, autoUpdate as Rt } from "@floating-ui/vue";
|
|
5
|
+
var ge = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(ge || {}), ut = /* @__PURE__ */ ((o) => (o.topStart = "top-start", o.topEnd = "top-end", o.bottomStart = "bottom-start", o.bottomEnd = "bottom-end", o.leftStart = "left-start", o.leftEnd = "left-end", o.rightStart = "right-start", o.rightEnd = "right-end", o))(ut || {}), We = /* @__PURE__ */ ((o) => (o.before = "before", o.after = "after", o))(We || {});
|
|
6
|
+
const dt = Symbol.for("buttonGroup"), ct = Symbol.for("radioGroup"), vt = Symbol.for("checkGroup"), pt = Symbol.for("accordionGroup"), Tt = {
|
|
7
|
+
/**
|
|
8
|
+
* Accordion name
|
|
9
|
+
*/
|
|
5
10
|
name: String,
|
|
11
|
+
/**
|
|
12
|
+
* Header title
|
|
13
|
+
*/
|
|
6
14
|
title: String,
|
|
15
|
+
/**
|
|
16
|
+
* Content text
|
|
17
|
+
*/
|
|
7
18
|
content: String,
|
|
19
|
+
/**
|
|
20
|
+
* (Optional) Defines if item is open. Event "update:modelValue" is emitted on accordion header click
|
|
21
|
+
*/
|
|
8
22
|
modelValue: {
|
|
9
23
|
type: Boolean,
|
|
10
24
|
default: void 0
|
|
11
25
|
},
|
|
26
|
+
/**
|
|
27
|
+
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
28
|
+
*/
|
|
12
29
|
modifiers: [String, Array],
|
|
30
|
+
/**
|
|
31
|
+
* If true, the accordion will be disabled
|
|
32
|
+
*/
|
|
13
33
|
disabled: Boolean
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
const { group: e, isInGroup:
|
|
34
|
+
}, xt = ["update:modelValue"];
|
|
35
|
+
function Mt(o, n) {
|
|
36
|
+
const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(
|
|
37
|
+
pt
|
|
38
|
+
), { title: c, content: u } = toRefs(o), v = a("modelValue", o, n), m = a("disabled", o), d = a("collapse", o), l = a("modifiers", o);
|
|
17
39
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
40
|
+
// group props
|
|
41
|
+
modelValue: v,
|
|
42
|
+
disabled: m,
|
|
43
|
+
isInGroup: r,
|
|
21
44
|
group: e,
|
|
22
|
-
collapse:
|
|
45
|
+
collapse: d,
|
|
23
46
|
modifiers: l,
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
// local props
|
|
48
|
+
title: c,
|
|
49
|
+
content: u
|
|
26
50
|
};
|
|
27
51
|
}
|
|
28
|
-
const
|
|
52
|
+
const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-hidden"], Gt = {
|
|
29
53
|
name: "VvAccordion"
|
|
30
|
-
},
|
|
31
|
-
...
|
|
32
|
-
props:
|
|
33
|
-
emits:
|
|
34
|
-
setup(o, { emit:
|
|
35
|
-
const e = o,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
54
|
+
}, Ut = /* @__PURE__ */ K({
|
|
55
|
+
...Gt,
|
|
56
|
+
props: Tt,
|
|
57
|
+
emits: xt,
|
|
58
|
+
setup(o, { emit: n }) {
|
|
59
|
+
const e = o, r = useAttrs(), a = computed(
|
|
60
|
+
() => e.name || (r == null ? void 0 : r.id) || It()
|
|
61
|
+
), {
|
|
62
|
+
modifiers: c,
|
|
63
|
+
title: u,
|
|
64
|
+
content: v,
|
|
65
|
+
disabled: m,
|
|
66
|
+
collapse: d,
|
|
41
67
|
modelValue: l,
|
|
42
|
-
isInGroup:
|
|
43
|
-
} =
|
|
44
|
-
get: () =>
|
|
45
|
-
set: (
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
48
|
-
if (
|
|
49
|
-
l.value.push(
|
|
68
|
+
isInGroup: s
|
|
69
|
+
} = Mt(e, n), p = ref(!1), g = computed({
|
|
70
|
+
get: () => s.value ? d.value && Array.isArray(l.value) ? l.value.includes(a.value) : l.value === a.value : l.value === void 0 ? p.value : l.value,
|
|
71
|
+
set: (b) => {
|
|
72
|
+
if (s.value) {
|
|
73
|
+
if (d.value && Array.isArray(l.value)) {
|
|
74
|
+
if (b) {
|
|
75
|
+
l.value.push(a.value);
|
|
50
76
|
return;
|
|
51
77
|
}
|
|
52
78
|
l.value = l.value.filter(
|
|
53
|
-
(
|
|
79
|
+
(S) => S !== a.value
|
|
54
80
|
);
|
|
55
81
|
return;
|
|
56
82
|
}
|
|
57
|
-
l.value =
|
|
83
|
+
l.value = b ? a.value : null;
|
|
58
84
|
return;
|
|
59
85
|
}
|
|
60
|
-
if (l.value === void 0 && typeof
|
|
61
|
-
|
|
86
|
+
if (l.value === void 0 && typeof b == "boolean") {
|
|
87
|
+
p.value = b;
|
|
62
88
|
return;
|
|
63
89
|
}
|
|
64
|
-
l.value =
|
|
90
|
+
l.value = b;
|
|
65
91
|
}
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
92
|
+
}), k = useBemModifiers(
|
|
93
|
+
"vv-accordion",
|
|
94
|
+
c,
|
|
95
|
+
computed(() => ({
|
|
96
|
+
disabled: m.value
|
|
97
|
+
}))
|
|
98
|
+
), C = useToggle(g);
|
|
99
|
+
return (b, S) => (i(), y("details", {
|
|
100
|
+
id: t(a),
|
|
101
|
+
class: ee(t(k)),
|
|
102
|
+
open: t(g),
|
|
103
|
+
onClick: S[0] || (S[0] = st((I) => t(C)(), ["prevent"]))
|
|
75
104
|
}, [
|
|
76
|
-
|
|
77
|
-
"aria-controls": t(
|
|
78
|
-
"aria-expanded": t(
|
|
105
|
+
M("summary", {
|
|
106
|
+
"aria-controls": t(a),
|
|
107
|
+
"aria-expanded": t(g),
|
|
79
108
|
class: "vv-collapse__summary"
|
|
80
109
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
110
|
+
$(b.$slots, "summary", F(j({ open: t(g) })), () => [
|
|
111
|
+
Z(H(t(u)), 1)
|
|
83
112
|
])
|
|
84
|
-
], 8,
|
|
85
|
-
|
|
86
|
-
"aria-hidden": !t(
|
|
113
|
+
], 8, Nt),
|
|
114
|
+
M("div", {
|
|
115
|
+
"aria-hidden": !t(g),
|
|
87
116
|
class: "vv-collapse__content"
|
|
88
117
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
118
|
+
$(b.$slots, "details", F(j({ open: t(g) })), () => [
|
|
119
|
+
Z(H(t(v)), 1)
|
|
91
120
|
])
|
|
92
|
-
], 8,
|
|
93
|
-
], 10,
|
|
121
|
+
], 8, Ht)
|
|
122
|
+
], 10, Lt));
|
|
94
123
|
}
|
|
95
|
-
}),
|
|
124
|
+
}), Wt = {
|
|
125
|
+
/**
|
|
126
|
+
* VModel
|
|
127
|
+
*/
|
|
96
128
|
modelValue: [String, Array],
|
|
129
|
+
/**
|
|
130
|
+
* Accordion items
|
|
131
|
+
* @type VvAccordionGroupItem
|
|
132
|
+
*/
|
|
97
133
|
items: { type: Array, default: () => [] },
|
|
134
|
+
/**
|
|
135
|
+
* If true, accordion items stay open when another item is opened
|
|
136
|
+
*/
|
|
98
137
|
collapse: Boolean,
|
|
138
|
+
/**
|
|
139
|
+
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
140
|
+
*/
|
|
99
141
|
modifiers: [String, Array],
|
|
142
|
+
/**
|
|
143
|
+
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
144
|
+
*/
|
|
100
145
|
itemModifiers: {
|
|
101
146
|
type: [String, Array],
|
|
102
147
|
default: ""
|
|
103
148
|
},
|
|
149
|
+
/**
|
|
150
|
+
* If true, the accordion items will be disabled
|
|
151
|
+
*/
|
|
104
152
|
disabled: Boolean
|
|
105
|
-
},
|
|
153
|
+
}, Ft = ["update:modelValue"], jt = {
|
|
106
154
|
name: "VvAccordionGroup"
|
|
107
|
-
},
|
|
108
|
-
...
|
|
109
|
-
props:
|
|
110
|
-
emits:
|
|
111
|
-
setup(o, { emit:
|
|
112
|
-
const e = o, { disabled:
|
|
155
|
+
}, Qa = /* @__PURE__ */ K({
|
|
156
|
+
...jt,
|
|
157
|
+
props: Wt,
|
|
158
|
+
emits: Ft,
|
|
159
|
+
setup(o, { emit: n }) {
|
|
160
|
+
const e = o, { disabled: r, collapse: a, modifiers: c, itemModifiers: u, items: v } = toRefs(e);
|
|
113
161
|
watchEffect(() => {
|
|
114
|
-
typeof e.modelValue == "string" &&
|
|
162
|
+
typeof e.modelValue == "string" && a.value && console.warn(
|
|
115
163
|
"[VvAccordionGroup]: modelValue is a string but collapse is true."
|
|
116
164
|
);
|
|
117
165
|
});
|
|
118
|
-
const
|
|
166
|
+
const m = ref([]), d = computed({
|
|
119
167
|
get: () => {
|
|
120
|
-
var
|
|
121
|
-
return e.modelValue !== void 0 ?
|
|
168
|
+
var s;
|
|
169
|
+
return e.modelValue !== void 0 ? a.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : a.value ? m.value : (s = m.value) == null ? void 0 : s[0];
|
|
122
170
|
},
|
|
123
|
-
set: (
|
|
171
|
+
set: (s) => {
|
|
124
172
|
if (e.modelValue !== void 0)
|
|
125
|
-
return (Array.isArray(e.modelValue) ||
|
|
126
|
-
|
|
173
|
+
return (Array.isArray(e.modelValue) || a.value) && !Array.isArray(s) && (s = [s]), n("update:modelValue", s);
|
|
174
|
+
m.value = Array.isArray(s) ? s : [s];
|
|
127
175
|
}
|
|
128
|
-
}), l = {
|
|
129
|
-
key: We,
|
|
130
|
-
modelValue: i,
|
|
131
|
-
disabled: n,
|
|
132
|
-
collapse: s,
|
|
133
|
-
modifiers: r
|
|
134
|
-
};
|
|
135
|
-
useProvideGroupState(l);
|
|
136
|
-
const { bemCssClasses: c } = useBemModifiers("vv-accordion-group", {
|
|
137
|
-
modifiers: d,
|
|
138
|
-
disabled: n
|
|
139
176
|
});
|
|
140
|
-
|
|
141
|
-
|
|
177
|
+
useProvideGroupState({
|
|
178
|
+
key: pt,
|
|
179
|
+
modelValue: d,
|
|
180
|
+
disabled: r,
|
|
181
|
+
collapse: a,
|
|
182
|
+
modifiers: u
|
|
183
|
+
});
|
|
184
|
+
const l = useBemModifiers(
|
|
185
|
+
"vv-accordion-group",
|
|
186
|
+
c,
|
|
187
|
+
computed(() => ({
|
|
188
|
+
disabled: r.value
|
|
189
|
+
}))
|
|
190
|
+
);
|
|
191
|
+
return (s, p) => (i(), y("div", {
|
|
192
|
+
class: ee(t(l))
|
|
142
193
|
}, [
|
|
143
|
-
|
|
144
|
-
(
|
|
194
|
+
$(s.$slots, "default", {}, () => [
|
|
195
|
+
(i(!0), y(ne, null, ke(t(v), (g) => (i(), W(Ut, G({
|
|
145
196
|
key: g.title
|
|
146
197
|
}, {
|
|
147
198
|
name: g.name,
|
|
148
199
|
title: g.title,
|
|
149
200
|
content: g.content
|
|
150
201
|
}), {
|
|
151
|
-
header:
|
|
152
|
-
|
|
202
|
+
header: ce((k) => [
|
|
203
|
+
$(s.$slots, `header::${g.name}`, F(j(k)))
|
|
153
204
|
]),
|
|
154
|
-
details:
|
|
155
|
-
|
|
205
|
+
details: ce((k) => [
|
|
206
|
+
$(s.$slots, `details::${g.name}`, F(j(k)))
|
|
156
207
|
]),
|
|
157
208
|
_: 2
|
|
158
209
|
}, 1040))), 128))
|
|
159
210
|
])
|
|
160
211
|
], 2));
|
|
161
212
|
}
|
|
162
|
-
}),
|
|
213
|
+
}), Ie = {
|
|
163
214
|
valid: Boolean,
|
|
164
215
|
validLabel: [String, Array]
|
|
165
|
-
},
|
|
216
|
+
}, Pe = {
|
|
166
217
|
invalid: Boolean,
|
|
167
218
|
invalidLabel: [String, Array]
|
|
168
|
-
},
|
|
219
|
+
}, qe = {
|
|
169
220
|
loading: Boolean,
|
|
170
221
|
loadingLabel: String
|
|
171
|
-
},
|
|
222
|
+
}, Ce = {
|
|
223
|
+
/**
|
|
224
|
+
* Whether the form control is disabled
|
|
225
|
+
*/
|
|
172
226
|
disabled: Boolean
|
|
173
|
-
},
|
|
227
|
+
}, Oe = {
|
|
228
|
+
/**
|
|
229
|
+
* The value is not editable
|
|
230
|
+
*/
|
|
174
231
|
readonly: Boolean
|
|
175
|
-
},
|
|
232
|
+
}, ve = {
|
|
233
|
+
/**
|
|
234
|
+
* Component BEM modifiers
|
|
235
|
+
*/
|
|
176
236
|
modifiers: [String, Array]
|
|
177
|
-
},
|
|
237
|
+
}, De = {
|
|
178
238
|
hintLabel: { type: String, default: "" }
|
|
179
|
-
},
|
|
239
|
+
}, Ke = {
|
|
240
|
+
/**
|
|
241
|
+
* List of options, can be string[] or object[]
|
|
242
|
+
*/
|
|
180
243
|
options: {
|
|
181
244
|
type: Array,
|
|
182
245
|
default: () => []
|
|
183
246
|
},
|
|
247
|
+
/**
|
|
248
|
+
* Used when options are objects: key to use for option label
|
|
249
|
+
*/
|
|
184
250
|
labelKey: { type: [String, Function], default: "label" },
|
|
185
|
-
|
|
186
|
-
|
|
251
|
+
/**
|
|
252
|
+
* Used when options are objects: key to use for option label
|
|
253
|
+
*/
|
|
254
|
+
valueKey: { type: [String, Function], default: "value" },
|
|
255
|
+
/**
|
|
256
|
+
* Used when options are objects: key to use for option disabled
|
|
257
|
+
*/
|
|
258
|
+
disabledKey: { type: [String, Function], default: "disabled" }
|
|
259
|
+
}, qt = {
|
|
260
|
+
/**
|
|
261
|
+
* Show character limit
|
|
262
|
+
*/
|
|
187
263
|
count: {
|
|
188
264
|
type: [Boolean, String],
|
|
189
265
|
default: !1,
|
|
190
266
|
validator: (o) => [!0, !1, "limit", "countdown"].includes(o)
|
|
191
267
|
}
|
|
192
|
-
},
|
|
268
|
+
}, Kt = {
|
|
269
|
+
/**
|
|
270
|
+
* Milliseconds to wait before emitting the input event
|
|
271
|
+
*/
|
|
193
272
|
debounce: [Number, String]
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
273
|
+
}, ze = {
|
|
274
|
+
/**
|
|
275
|
+
* VvIcon name or props
|
|
276
|
+
* @see VVIcon
|
|
277
|
+
*/
|
|
198
278
|
icon: { type: [String, Object] },
|
|
279
|
+
/**
|
|
280
|
+
* VvIcon position
|
|
281
|
+
*/
|
|
199
282
|
iconPosition: {
|
|
200
283
|
type: String,
|
|
201
|
-
|
|
202
|
-
|
|
284
|
+
default: We.before,
|
|
285
|
+
validation: (o) => Object.values(We).includes(o)
|
|
203
286
|
}
|
|
204
|
-
},
|
|
287
|
+
}, Te = {
|
|
288
|
+
/**
|
|
289
|
+
* Global attribute tabindex
|
|
290
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
291
|
+
*/
|
|
205
292
|
tabindex: { type: [String, Number], default: 0 }
|
|
206
|
-
},
|
|
293
|
+
}, Xe = {
|
|
294
|
+
/**
|
|
295
|
+
* If true the label will be floating
|
|
296
|
+
*/
|
|
207
297
|
floating: Boolean
|
|
208
|
-
},
|
|
298
|
+
}, xe = {
|
|
299
|
+
/**
|
|
300
|
+
* If true the input will be unselectable
|
|
301
|
+
*/
|
|
209
302
|
unselectable: { type: Boolean, default: !0 }
|
|
210
|
-
},
|
|
211
|
-
|
|
303
|
+
}, Me = {
|
|
304
|
+
/**
|
|
305
|
+
* Global attribute id
|
|
306
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
307
|
+
*/
|
|
308
|
+
id: [String, Number]
|
|
309
|
+
}, Fe = {
|
|
310
|
+
/**
|
|
311
|
+
* Dropdown placement
|
|
312
|
+
*/
|
|
313
|
+
placement: {
|
|
314
|
+
type: String,
|
|
315
|
+
default: ge.bottom,
|
|
316
|
+
validator: (o) => Object.values(ge).includes(o) || Object.values(ut).includes(o)
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* Dropdown show / hide transition name
|
|
320
|
+
*/
|
|
321
|
+
transitionName: {
|
|
322
|
+
type: String
|
|
323
|
+
},
|
|
324
|
+
/**
|
|
325
|
+
* Offset of the dropdown from the trigger
|
|
326
|
+
* @see https://floating-ui.com/docs/offset
|
|
327
|
+
*/
|
|
328
|
+
offset: {
|
|
329
|
+
type: [Number, String, Object],
|
|
330
|
+
default: 0
|
|
331
|
+
},
|
|
332
|
+
/**
|
|
333
|
+
* Move dropdown to the side if there is no space in the default position
|
|
334
|
+
* @see https://floating-ui.com/docs/shift
|
|
335
|
+
*/
|
|
336
|
+
shift: {
|
|
337
|
+
type: [Boolean, Object],
|
|
338
|
+
default: !1
|
|
339
|
+
},
|
|
340
|
+
/**
|
|
341
|
+
* Flip dropdown position if there is no space in the default position
|
|
342
|
+
* @see https://floating-ui.com/docs/flip
|
|
343
|
+
*/
|
|
344
|
+
flip: {
|
|
345
|
+
type: [Boolean, Object],
|
|
346
|
+
default: !0
|
|
347
|
+
},
|
|
348
|
+
/**
|
|
349
|
+
* Size of the dropdown
|
|
350
|
+
* @see https://floating-ui.com/docs/size
|
|
351
|
+
*/
|
|
352
|
+
size: {
|
|
353
|
+
type: [Boolean, Object],
|
|
354
|
+
default: () => ({ padding: 10 })
|
|
355
|
+
},
|
|
356
|
+
/**
|
|
357
|
+
* Automatically change the position of the dropdown
|
|
358
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
359
|
+
*/
|
|
360
|
+
autoPlacement: {
|
|
361
|
+
type: [Boolean, Object],
|
|
362
|
+
default: !1
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* Add arrow to the dropdown
|
|
366
|
+
* @see https://floating-ui.com/docs/arrow
|
|
367
|
+
*/
|
|
368
|
+
arrow: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
default: !1
|
|
371
|
+
},
|
|
372
|
+
/**
|
|
373
|
+
* Close dropdown on click outside
|
|
374
|
+
*/
|
|
375
|
+
autoClose: {
|
|
376
|
+
type: Boolean,
|
|
377
|
+
default: !0
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* Autofocus first item on dropdown open
|
|
381
|
+
*/
|
|
382
|
+
autofocusFirst: {
|
|
383
|
+
type: Boolean,
|
|
384
|
+
default: !0
|
|
385
|
+
},
|
|
386
|
+
/**
|
|
387
|
+
* Set dropdown width to the same as the trigger
|
|
388
|
+
*/
|
|
389
|
+
triggerWidth: {
|
|
390
|
+
type: Boolean
|
|
391
|
+
}
|
|
392
|
+
}, Le = {
|
|
393
|
+
...Me,
|
|
394
|
+
/**
|
|
395
|
+
* Input / Textarea name
|
|
396
|
+
* Name of the form control. Submitted with the form as part of a name/value pair
|
|
397
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
398
|
+
*/
|
|
212
399
|
name: { type: String, required: !0 }
|
|
213
|
-
},
|
|
400
|
+
}, ft = {
|
|
401
|
+
/**
|
|
402
|
+
* Global attribute autofocus
|
|
403
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
404
|
+
*/
|
|
214
405
|
autofocus: Boolean
|
|
215
|
-
},
|
|
406
|
+
}, mt = {
|
|
407
|
+
/**
|
|
408
|
+
* Global attribute autocomplete
|
|
409
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
410
|
+
*/
|
|
216
411
|
autocomplete: { type: String, default: "off" }
|
|
217
|
-
},
|
|
218
|
-
...
|
|
219
|
-
...
|
|
220
|
-
...
|
|
221
|
-
...
|
|
222
|
-
...
|
|
223
|
-
..._e,
|
|
224
|
-
...ge,
|
|
225
|
-
...ye,
|
|
226
|
-
...Se,
|
|
412
|
+
}, bt = {
|
|
413
|
+
...Le,
|
|
414
|
+
...ft,
|
|
415
|
+
...mt,
|
|
416
|
+
...Te,
|
|
417
|
+
...Ce,
|
|
227
418
|
...Oe,
|
|
228
|
-
...
|
|
229
|
-
...
|
|
230
|
-
...At,
|
|
231
|
-
...Be,
|
|
419
|
+
...Ie,
|
|
420
|
+
...Pe,
|
|
232
421
|
...De,
|
|
422
|
+
...qe,
|
|
423
|
+
...ve,
|
|
424
|
+
...qt,
|
|
425
|
+
...Kt,
|
|
426
|
+
...ze,
|
|
427
|
+
...Xe,
|
|
428
|
+
/**
|
|
429
|
+
* Input / Textarea minlength
|
|
430
|
+
* Minimum length (number of characters) of value
|
|
431
|
+
* Available for input types: text, search, url, tel, email, password
|
|
432
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
433
|
+
*/
|
|
233
434
|
minlength: Number,
|
|
435
|
+
/**
|
|
436
|
+
* Input / Textarea maxlength
|
|
437
|
+
* Maximum length (number of characters) of value
|
|
438
|
+
* Available for input types: text, search, url, tel, email, password
|
|
439
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
440
|
+
*/
|
|
234
441
|
maxlength: Number,
|
|
442
|
+
/**
|
|
443
|
+
* Input / Textarea placeholder
|
|
444
|
+
* Text that appears in the form control when it has no value set
|
|
445
|
+
* Available for input types: text, search, url, tel, email, password, number
|
|
446
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
447
|
+
*/
|
|
235
448
|
placeholder: String,
|
|
449
|
+
/**
|
|
450
|
+
* Input / Textarea required
|
|
451
|
+
* A value is required or must be check for the form to be submittable
|
|
452
|
+
* Available for all input types except color
|
|
453
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
454
|
+
*/
|
|
236
455
|
required: Boolean,
|
|
456
|
+
/**
|
|
457
|
+
* <label> value for the Input / Textarea
|
|
458
|
+
*/
|
|
237
459
|
label: String
|
|
238
|
-
},
|
|
239
|
-
...
|
|
240
|
-
...
|
|
241
|
-
...
|
|
242
|
-
...
|
|
243
|
-
...
|
|
244
|
-
...
|
|
245
|
-
...
|
|
460
|
+
}, ht = {
|
|
461
|
+
...Le,
|
|
462
|
+
...Te,
|
|
463
|
+
...Ie,
|
|
464
|
+
...Pe,
|
|
465
|
+
...De,
|
|
466
|
+
...Ce,
|
|
467
|
+
...Oe,
|
|
468
|
+
...ve,
|
|
469
|
+
/**
|
|
470
|
+
* Input value
|
|
471
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
472
|
+
*/
|
|
246
473
|
value: [String, Number, Boolean],
|
|
474
|
+
/**
|
|
475
|
+
* Input value
|
|
476
|
+
*/
|
|
247
477
|
modelValue: [Object, Number, Boolean, String],
|
|
478
|
+
/**
|
|
479
|
+
* <label> for input
|
|
480
|
+
*/
|
|
248
481
|
label: String
|
|
249
|
-
},
|
|
250
|
-
...
|
|
251
|
-
...
|
|
252
|
-
...
|
|
253
|
-
...
|
|
254
|
-
...
|
|
255
|
-
...
|
|
482
|
+
}, yt = {
|
|
483
|
+
...Ie,
|
|
484
|
+
...Pe,
|
|
485
|
+
...Ke,
|
|
486
|
+
...De,
|
|
487
|
+
...Ce,
|
|
488
|
+
...Oe,
|
|
489
|
+
...ve,
|
|
490
|
+
/**
|
|
491
|
+
* Input value
|
|
492
|
+
*/
|
|
256
493
|
modelValue: [String, Array],
|
|
494
|
+
/**
|
|
495
|
+
* Input label
|
|
496
|
+
*/
|
|
257
497
|
label: String,
|
|
498
|
+
/**
|
|
499
|
+
* Input name
|
|
500
|
+
*/
|
|
258
501
|
name: { type: String, required: !0 },
|
|
502
|
+
/**
|
|
503
|
+
* If true, the group will be displayed in a vertical column
|
|
504
|
+
*/
|
|
259
505
|
vertical: Boolean
|
|
260
|
-
},
|
|
261
|
-
...
|
|
506
|
+
}, zt = {
|
|
507
|
+
...ve,
|
|
262
508
|
value: [String, Number]
|
|
263
|
-
},
|
|
509
|
+
}, Xt = {
|
|
264
510
|
name: "VvBadge"
|
|
265
|
-
},
|
|
266
|
-
...
|
|
267
|
-
props:
|
|
511
|
+
}, Yt = /* @__PURE__ */ K({
|
|
512
|
+
...Xt,
|
|
513
|
+
props: zt,
|
|
268
514
|
setup(o) {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return (n, s) => (m(), _("span", {
|
|
273
|
-
class: U(t(e)),
|
|
515
|
+
const n = o, { modifiers: e } = toRefs(n), r = useBemModifiers("vv-badge", e);
|
|
516
|
+
return (a, c) => (i(), y("span", {
|
|
517
|
+
class: ee(t(r)),
|
|
274
518
|
role: "status"
|
|
275
519
|
}, [
|
|
276
|
-
|
|
277
|
-
|
|
520
|
+
$(a.$slots, "default", {}, () => [
|
|
521
|
+
Z(H(a.value), 1)
|
|
278
522
|
])
|
|
279
523
|
], 2));
|
|
280
524
|
}
|
|
281
525
|
});
|
|
282
|
-
function
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
(p, i) => ({
|
|
295
|
-
...p,
|
|
296
|
-
[`${o}--${kebabCase(i)}`]: !0
|
|
297
|
-
}),
|
|
298
|
-
{}
|
|
299
|
-
)
|
|
300
|
-
};
|
|
301
|
-
} else
|
|
302
|
-
return {
|
|
303
|
-
...s,
|
|
304
|
-
[`${o}--${kebabCase(d)}`]: r
|
|
305
|
-
};
|
|
306
|
-
}, e) || {})
|
|
307
|
-
};
|
|
526
|
+
function Jt(o, n, e) {
|
|
527
|
+
return computed(() => {
|
|
528
|
+
const r = {
|
|
529
|
+
[o]: !0
|
|
530
|
+
};
|
|
531
|
+
let a = unref(n);
|
|
532
|
+
return a && (!Array.isArray(a) && typeof a == "string" && (a = a.split(" ")), Array.isArray(a) && a.forEach((c) => {
|
|
533
|
+
r[`${o}--${c}`] = !0;
|
|
534
|
+
})), e && Object.keys(e.value).forEach((c) => {
|
|
535
|
+
r[`${o}--${c}`] = unref(e.value[c]);
|
|
536
|
+
}), r;
|
|
537
|
+
});
|
|
308
538
|
}
|
|
309
|
-
const
|
|
310
|
-
...
|
|
539
|
+
const Qt = {
|
|
540
|
+
...ve,
|
|
311
541
|
routes: Array
|
|
312
|
-
},
|
|
542
|
+
}, Zt = { class: "vv-breadcrumb__list" }, eo = ["content"], to = {
|
|
313
543
|
name: "VvBreadcrumb"
|
|
314
|
-
},
|
|
315
|
-
...
|
|
316
|
-
props:
|
|
544
|
+
}, Za = /* @__PURE__ */ K({
|
|
545
|
+
...to,
|
|
546
|
+
props: Qt,
|
|
317
547
|
setup(o) {
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
return (n, s) => (m(), _("nav", {
|
|
322
|
-
class: U(t(e)),
|
|
548
|
+
const n = o, { modifiers: e } = toRefs(n), r = Jt("vv-breadcrumb", e);
|
|
549
|
+
return (a, c) => (i(), y("nav", {
|
|
550
|
+
class: ee(t(r)),
|
|
323
551
|
"aria-label": "breadcrumbs"
|
|
324
552
|
}, [
|
|
325
|
-
|
|
326
|
-
(
|
|
327
|
-
var
|
|
328
|
-
return
|
|
329
|
-
key: `${
|
|
330
|
-
class:
|
|
331
|
-
"vv-breadcrumb__item":
|
|
332
|
-
"vv-breadcrumb__item-active":
|
|
553
|
+
M("ol", Zt, [
|
|
554
|
+
(i(!0), y(ne, null, ke(a.routes, (u, v) => {
|
|
555
|
+
var m, d, l, s;
|
|
556
|
+
return i(), y("li", {
|
|
557
|
+
key: `${u.label}-${v}`,
|
|
558
|
+
class: ee({
|
|
559
|
+
"vv-breadcrumb__item": v < Number((m = a.routes) == null ? void 0 : m.length) - 1,
|
|
560
|
+
"vv-breadcrumb__item-active": v === Number((d = a.routes) == null ? void 0 : d.length) - 1
|
|
333
561
|
}),
|
|
334
562
|
itemprop: "itemListElement",
|
|
335
563
|
itemtype: "https://schema.org/ListItem",
|
|
336
564
|
itemscope: ""
|
|
337
565
|
}, [
|
|
338
|
-
(
|
|
566
|
+
(i(), W(nt(u.to ? "router-link" : u.href ? "a" : "span"), G(u, {
|
|
339
567
|
class: {
|
|
340
|
-
"vv-breadcrumb__link":
|
|
568
|
+
"vv-breadcrumb__link": v < Number((l = a.routes) == null ? void 0 : l.length) - 1
|
|
341
569
|
},
|
|
342
|
-
"aria-current":
|
|
570
|
+
"aria-current": v === Number((s = a.routes) == null ? void 0 : s.length) - 1 ? "page" : void 0,
|
|
343
571
|
itemprop: "item"
|
|
344
572
|
}), {
|
|
345
|
-
default:
|
|
346
|
-
|
|
347
|
-
|
|
573
|
+
default: ce(() => [
|
|
574
|
+
$(a.$slots, "label", F(j({ route: u, index: v })), () => [
|
|
575
|
+
Z(H(u.label), 1)
|
|
348
576
|
])
|
|
349
577
|
]),
|
|
350
578
|
_: 2
|
|
351
579
|
}, 1040, ["class", "aria-current"])),
|
|
352
|
-
|
|
580
|
+
M("meta", {
|
|
353
581
|
itemprop: "position",
|
|
354
|
-
content: `${
|
|
355
|
-
}, null, 8,
|
|
582
|
+
content: `${v + 1}`
|
|
583
|
+
}, null, 8, eo)
|
|
356
584
|
], 2);
|
|
357
585
|
}), 128))
|
|
358
586
|
])
|
|
359
587
|
], 2));
|
|
360
588
|
}
|
|
361
|
-
}),
|
|
589
|
+
}), oo = {
|
|
590
|
+
/**
|
|
591
|
+
* Color
|
|
592
|
+
*/
|
|
362
593
|
color: String,
|
|
594
|
+
/**
|
|
595
|
+
* Width
|
|
596
|
+
*/
|
|
363
597
|
width: {
|
|
364
598
|
type: [String, Number]
|
|
365
599
|
},
|
|
600
|
+
/**
|
|
601
|
+
* Height
|
|
602
|
+
*/
|
|
366
603
|
height: {
|
|
367
604
|
type: [String, Number]
|
|
368
605
|
},
|
|
606
|
+
/**
|
|
607
|
+
* Icon name
|
|
608
|
+
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
609
|
+
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
610
|
+
*/
|
|
369
611
|
name: {
|
|
370
612
|
type: String,
|
|
371
613
|
required: !0
|
|
372
614
|
},
|
|
615
|
+
/**
|
|
616
|
+
* By default 'vv'
|
|
617
|
+
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
618
|
+
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
619
|
+
*/
|
|
373
620
|
provider: {
|
|
374
621
|
type: String
|
|
375
622
|
},
|
|
623
|
+
/**
|
|
624
|
+
* The name of icon set.
|
|
625
|
+
* Icon default options prefix: simple | normal | detailed
|
|
626
|
+
*/
|
|
376
627
|
prefix: {
|
|
377
628
|
type: String,
|
|
378
629
|
default: "normal"
|
|
379
630
|
},
|
|
631
|
+
/**
|
|
632
|
+
* Url remote SVG icon
|
|
633
|
+
*/
|
|
380
634
|
src: String,
|
|
635
|
+
/**
|
|
636
|
+
* Horizontal flip
|
|
637
|
+
*/
|
|
381
638
|
horizontalFlip: Boolean,
|
|
639
|
+
/**
|
|
640
|
+
* Vertical flip
|
|
641
|
+
*/
|
|
382
642
|
verticalFlip: Boolean,
|
|
643
|
+
/**
|
|
644
|
+
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
645
|
+
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
646
|
+
*/
|
|
383
647
|
flip: String,
|
|
648
|
+
/**
|
|
649
|
+
* Icon render mode
|
|
650
|
+
* 'style' = 'bg' or 'mask', depending on icon content
|
|
651
|
+
* 'bg' = span with style using `background`
|
|
652
|
+
* 'mask' = span with style using `mask`
|
|
653
|
+
* 'svg' = svg
|
|
654
|
+
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
655
|
+
*/
|
|
384
656
|
mode: String,
|
|
657
|
+
/**
|
|
658
|
+
* Toggles inline or block mode
|
|
659
|
+
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
660
|
+
*/
|
|
385
661
|
inline: Boolean,
|
|
662
|
+
/**
|
|
663
|
+
* rotates icon
|
|
664
|
+
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
665
|
+
*/
|
|
386
666
|
rotate: [Number, String],
|
|
667
|
+
/**
|
|
668
|
+
* A callback that is called when icon data has been loaded
|
|
669
|
+
*/
|
|
387
670
|
onLoad: Function,
|
|
671
|
+
/**
|
|
672
|
+
* SVG icon string
|
|
673
|
+
*/
|
|
388
674
|
svg: String,
|
|
675
|
+
/**
|
|
676
|
+
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
677
|
+
* @values string | Array<string>
|
|
678
|
+
*/
|
|
389
679
|
modifiers: {
|
|
390
680
|
type: [String, Array]
|
|
391
681
|
}
|
|
392
|
-
},
|
|
682
|
+
}, ao = {
|
|
393
683
|
name: "VvIcon"
|
|
394
|
-
},
|
|
395
|
-
...
|
|
396
|
-
props:
|
|
684
|
+
}, J = /* @__PURE__ */ K({
|
|
685
|
+
...ao,
|
|
686
|
+
props: oo,
|
|
397
687
|
setup(o) {
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
688
|
+
const n = o, e = ref(!0), r = useVolver(), { modifiers: a } = toRefs(n), c = useBemModifiers("vv-icon", a), u = computed(() => n.provider || (r == null ? void 0 : r.provider)), v = computed(() => {
|
|
689
|
+
const l = n.name ?? "", s = `@${u.value}:${n.prefix}:${n.name}`;
|
|
690
|
+
return Be(l) ? l : Be(s) ? s : (r == null ? void 0 : r.iconsCollections.find(
|
|
691
|
+
(p) => {
|
|
692
|
+
const g = `@${u.value}:${p.prefix}:${l}`;
|
|
693
|
+
if (Be(g))
|
|
694
|
+
return g;
|
|
695
|
+
}
|
|
696
|
+
)) || l;
|
|
407
697
|
});
|
|
408
|
-
function
|
|
409
|
-
let
|
|
698
|
+
function m(l) {
|
|
699
|
+
let s = null;
|
|
410
700
|
if (typeof window > "u") {
|
|
411
|
-
const { JSDOM:
|
|
412
|
-
|
|
701
|
+
const { JSDOM: C } = require("jsdom");
|
|
702
|
+
s = new C().window;
|
|
413
703
|
}
|
|
414
|
-
return (
|
|
704
|
+
return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
|
|
415
705
|
}
|
|
416
|
-
function
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
body:
|
|
420
|
-
height
|
|
421
|
-
|
|
706
|
+
function d(l) {
|
|
707
|
+
const s = m(l), p = (s == null ? void 0 : s.innerHTML.trim()) || "";
|
|
708
|
+
s && p && Ot(`@${u.value}:${n.prefix}:${n.name}`, {
|
|
709
|
+
body: p,
|
|
710
|
+
// Set height and width from svg content
|
|
711
|
+
height: s.viewBox.baseVal.height,
|
|
712
|
+
width: s.viewBox.baseVal.width
|
|
422
713
|
});
|
|
423
714
|
}
|
|
424
|
-
return
|
|
425
|
-
l && (
|
|
715
|
+
return r && (n.src && !Be(`@${u.value}:${n.prefix}:${n.name}`) ? (e.value = !1, r.fetchIcon(n.src).then((l) => {
|
|
716
|
+
l && (d(l), e.value = !0);
|
|
426
717
|
}).catch((l) => {
|
|
427
718
|
throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
|
|
428
|
-
})) :
|
|
719
|
+
})) : n.svg && d(n.svg)), (l, s) => t(e) ? (i(), W(t(Pt), G({
|
|
429
720
|
key: 0,
|
|
430
|
-
class: t(
|
|
721
|
+
class: t(c)
|
|
431
722
|
}, {
|
|
432
723
|
inline: l.inline,
|
|
433
724
|
width: l.width,
|
|
@@ -438,49 +729,84 @@ const Et = {
|
|
|
438
729
|
rotate: l.rotate,
|
|
439
730
|
color: l.color,
|
|
440
731
|
onLoad: l.onLoad,
|
|
441
|
-
icon: t(
|
|
442
|
-
}), null, 16, ["class"])) :
|
|
732
|
+
icon: t(v)
|
|
733
|
+
}), null, 16, ["class"])) : w("", !0);
|
|
443
734
|
}
|
|
444
735
|
});
|
|
445
|
-
var
|
|
446
|
-
const
|
|
447
|
-
...
|
|
448
|
-
...
|
|
449
|
-
...
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
736
|
+
var gt = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(gt || {}), ye = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ye || {}), _t = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(_t || {});
|
|
737
|
+
const lo = ["update:modelValue"], so = {
|
|
738
|
+
...Me,
|
|
739
|
+
...ve,
|
|
740
|
+
...Ce,
|
|
741
|
+
...xe,
|
|
742
|
+
/**
|
|
743
|
+
* Button icon
|
|
744
|
+
*/
|
|
745
|
+
icon: [String, Object],
|
|
746
|
+
/**
|
|
747
|
+
* Button icon position
|
|
748
|
+
*/
|
|
454
749
|
iconPosition: {
|
|
455
750
|
type: String,
|
|
456
|
-
default:
|
|
457
|
-
validator: (o) => o
|
|
751
|
+
default: ge.left,
|
|
752
|
+
validator: (o) => Object.values(ge).includes(o)
|
|
458
753
|
},
|
|
754
|
+
/**
|
|
755
|
+
* Button label
|
|
756
|
+
*/
|
|
459
757
|
label: [String, Number],
|
|
758
|
+
/**
|
|
759
|
+
* Loading status
|
|
760
|
+
*/
|
|
460
761
|
loading: Boolean,
|
|
762
|
+
/**
|
|
763
|
+
* Loading icon
|
|
764
|
+
*/
|
|
461
765
|
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
766
|
+
/**
|
|
767
|
+
* Loading label
|
|
768
|
+
*/
|
|
462
769
|
loadingLabel: {
|
|
463
770
|
type: String,
|
|
464
771
|
default: "Loading..."
|
|
465
772
|
},
|
|
773
|
+
/**
|
|
774
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
775
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
776
|
+
*/
|
|
466
777
|
to: {
|
|
467
778
|
type: [String, Object]
|
|
468
779
|
},
|
|
780
|
+
/**
|
|
781
|
+
* Link href
|
|
782
|
+
*/
|
|
469
783
|
href: String,
|
|
784
|
+
/**
|
|
785
|
+
* Link target
|
|
786
|
+
*/
|
|
470
787
|
target: {
|
|
471
788
|
type: String,
|
|
472
|
-
validator: (o) => o
|
|
789
|
+
validator: (o) => Object.values(_t).includes(o)
|
|
473
790
|
},
|
|
474
791
|
active: Boolean,
|
|
792
|
+
/**
|
|
793
|
+
* Button pressed mode
|
|
794
|
+
*/
|
|
475
795
|
pressed: Boolean,
|
|
796
|
+
/**
|
|
797
|
+
* Link rel
|
|
798
|
+
*/
|
|
476
799
|
rel: {
|
|
477
800
|
type: String,
|
|
478
801
|
default: "noopener noreferrer"
|
|
479
802
|
},
|
|
803
|
+
/**
|
|
804
|
+
* Button type
|
|
805
|
+
*/
|
|
480
806
|
type: {
|
|
481
807
|
type: String,
|
|
482
808
|
default: "button",
|
|
483
|
-
validator: (o) => o
|
|
809
|
+
validator: (o) => Object.values(gt).includes(o)
|
|
484
810
|
},
|
|
485
811
|
toggle: {
|
|
486
812
|
type: Boolean,
|
|
@@ -488,306 +814,342 @@ const Lt = ["update:modelValue"], Mt = {
|
|
|
488
814
|
},
|
|
489
815
|
modelValue: String
|
|
490
816
|
};
|
|
491
|
-
function
|
|
492
|
-
var
|
|
493
|
-
const { group: e, isInGroup:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
817
|
+
function no(o, n) {
|
|
818
|
+
var S;
|
|
819
|
+
const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(dt), {
|
|
820
|
+
id: c,
|
|
821
|
+
iconPosition: u,
|
|
822
|
+
icon: v,
|
|
823
|
+
label: m,
|
|
824
|
+
pressed: d,
|
|
825
|
+
modifiers: l
|
|
826
|
+
} = toRefs(o), s = a("modelValue", o, n), p = a("disabled", o), g = a("toggle", o), k = a(
|
|
500
827
|
"unselectable",
|
|
501
828
|
o
|
|
502
|
-
),
|
|
503
|
-
var
|
|
504
|
-
const
|
|
505
|
-
return [...
|
|
829
|
+
), C = ((S = e == null ? void 0 : e.value) == null ? void 0 : S.multiple) ?? ref(!1), b = computed(() => {
|
|
830
|
+
var E;
|
|
831
|
+
const I = l != null && l.value ? Array.isArray(l.value) ? l.value : [l.value] : [], B = (E = e == null ? void 0 : e.value.itemModifiers) != null && E.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
|
|
832
|
+
return [...I, ...B];
|
|
506
833
|
});
|
|
507
834
|
return {
|
|
835
|
+
// group props
|
|
508
836
|
group: e,
|
|
509
|
-
isInGroup:
|
|
510
|
-
modelValue:
|
|
511
|
-
disabled:
|
|
512
|
-
toggle:
|
|
513
|
-
unselectable:
|
|
514
|
-
multiple:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
837
|
+
isInGroup: r,
|
|
838
|
+
modelValue: s,
|
|
839
|
+
disabled: p,
|
|
840
|
+
toggle: g,
|
|
841
|
+
unselectable: k,
|
|
842
|
+
multiple: C,
|
|
843
|
+
// local props
|
|
844
|
+
id: c,
|
|
845
|
+
modifiers: b,
|
|
846
|
+
pressed: d,
|
|
847
|
+
iconPosition: u,
|
|
848
|
+
icon: v,
|
|
849
|
+
label: m
|
|
520
850
|
};
|
|
521
851
|
}
|
|
522
|
-
const
|
|
852
|
+
const ro = {
|
|
523
853
|
key: 1,
|
|
524
854
|
class: "vv-button__label"
|
|
525
|
-
},
|
|
855
|
+
}, io = {
|
|
526
856
|
key: 1,
|
|
527
857
|
class: "vv-button__label"
|
|
528
|
-
},
|
|
858
|
+
}, uo = {
|
|
529
859
|
name: "VvButton"
|
|
530
|
-
},
|
|
531
|
-
...
|
|
532
|
-
props:
|
|
533
|
-
emits:
|
|
534
|
-
setup(o, { emit:
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
860
|
+
}, el = /* @__PURE__ */ K({
|
|
861
|
+
...uo,
|
|
862
|
+
props: so,
|
|
863
|
+
emits: lo,
|
|
864
|
+
setup(o, { expose: n, emit: e }) {
|
|
865
|
+
const r = o, a = useAttrs(), c = useSlots(), {
|
|
866
|
+
id: u,
|
|
867
|
+
modifiers: v,
|
|
868
|
+
iconPosition: m,
|
|
869
|
+
icon: d,
|
|
870
|
+
label: l,
|
|
871
|
+
modelValue: s,
|
|
872
|
+
disabled: p,
|
|
873
|
+
toggle: g,
|
|
874
|
+
unselectable: k
|
|
875
|
+
} = no(r, e), C = useUniqueId(u), b = computed(() => (a == null ? void 0 : a.name) || C.value), S = useVolver(), I = ref(null);
|
|
876
|
+
n({ $el: I });
|
|
877
|
+
const {
|
|
878
|
+
reference: B,
|
|
879
|
+
bus: E,
|
|
880
|
+
aria: O
|
|
881
|
+
} = useInjectedDropdownTrigger();
|
|
882
|
+
watch(
|
|
883
|
+
() => I.value,
|
|
884
|
+
(A) => {
|
|
885
|
+
B && (B.value = A);
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
const { role: L } = useInjectedDropdownAction(), q = computed(() => {
|
|
545
889
|
switch (!0) {
|
|
546
|
-
case
|
|
547
|
-
return
|
|
548
|
-
case
|
|
549
|
-
return
|
|
550
|
-
case
|
|
551
|
-
return
|
|
890
|
+
case p.value:
|
|
891
|
+
return ye.button;
|
|
892
|
+
case r.to !== void 0:
|
|
893
|
+
return S != null && S.nuxt ? ye.nuxtLink : ye.routerLink;
|
|
894
|
+
case r.href !== void 0:
|
|
895
|
+
return ye.a;
|
|
552
896
|
default:
|
|
553
|
-
return
|
|
897
|
+
return ye.button;
|
|
554
898
|
}
|
|
555
|
-
}),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
)
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
() => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
|
|
575
|
-
), $ = computed(() => {
|
|
576
|
-
const C = {
|
|
577
|
-
class: V.value,
|
|
578
|
-
"aria-pressed": v.value ? !0 : void 0
|
|
899
|
+
}), Q = computed(() => g.value ? Array.isArray(s.value) ? contains(b.value, s.value) : equals(b.value, s.value) : r.pressed), P = useBemModifiers(
|
|
900
|
+
"vv-button",
|
|
901
|
+
v,
|
|
902
|
+
computed(() => ({
|
|
903
|
+
active: r.active,
|
|
904
|
+
pressed: Q.value,
|
|
905
|
+
disabled: p.value,
|
|
906
|
+
reverse: [ge.right, ge.bottom].includes(m.value),
|
|
907
|
+
column: [ge.top, ge.bottom].includes(m.value),
|
|
908
|
+
iconOnly: Boolean((d == null ? void 0 : d.value) && !(l != null && l.value) && !c.default)
|
|
909
|
+
}))
|
|
910
|
+
), T = computed(
|
|
911
|
+
() => typeof (d == null ? void 0 : d.value) == "string" ? { name: d == null ? void 0 : d.value } : d == null ? void 0 : d.value
|
|
912
|
+
), U = computed(() => {
|
|
913
|
+
const A = {
|
|
914
|
+
...O == null ? void 0 : O.value,
|
|
915
|
+
"aria-pressed": Q.value ? !0 : void 0,
|
|
916
|
+
class: P.value,
|
|
917
|
+
role: L
|
|
579
918
|
};
|
|
580
|
-
switch (
|
|
581
|
-
case
|
|
919
|
+
switch (q.value) {
|
|
920
|
+
case ye.a:
|
|
582
921
|
return {
|
|
583
|
-
...
|
|
584
|
-
role: "button",
|
|
585
|
-
href:
|
|
586
|
-
target:
|
|
587
|
-
rel:
|
|
922
|
+
...A,
|
|
923
|
+
role: A.role ?? "button",
|
|
924
|
+
href: r.href,
|
|
925
|
+
target: r.target,
|
|
926
|
+
rel: r.rel
|
|
588
927
|
};
|
|
589
|
-
case
|
|
590
|
-
case
|
|
928
|
+
case ye.routerLink:
|
|
929
|
+
case ye.nuxtLink:
|
|
591
930
|
return {
|
|
592
|
-
...
|
|
593
|
-
role: "button",
|
|
594
|
-
to:
|
|
595
|
-
target:
|
|
931
|
+
...A,
|
|
932
|
+
role: A.role ?? "button",
|
|
933
|
+
to: r.to,
|
|
934
|
+
target: r.target
|
|
596
935
|
};
|
|
597
936
|
default:
|
|
598
937
|
return {
|
|
599
|
-
...
|
|
600
|
-
type:
|
|
601
|
-
disabled:
|
|
938
|
+
...A,
|
|
939
|
+
type: r.type,
|
|
940
|
+
disabled: p.value
|
|
602
941
|
};
|
|
603
942
|
}
|
|
604
|
-
}),
|
|
605
|
-
if (
|
|
606
|
-
if (Array.isArray(
|
|
607
|
-
if (contains(
|
|
608
|
-
|
|
609
|
-
(
|
|
943
|
+
}), te = (A) => {
|
|
944
|
+
if (E == null || E.emit("click", A), g.value) {
|
|
945
|
+
if (Array.isArray(s.value)) {
|
|
946
|
+
if (contains(b.value, s.value)) {
|
|
947
|
+
k.value && (s.value = s.value.filter(
|
|
948
|
+
(oe) => oe !== b.value
|
|
610
949
|
));
|
|
611
950
|
return;
|
|
612
951
|
}
|
|
613
|
-
|
|
952
|
+
s.value.push(b.value);
|
|
614
953
|
return;
|
|
615
954
|
}
|
|
616
|
-
if (equals(
|
|
617
|
-
|
|
955
|
+
if (equals(b, s.value) && k.value) {
|
|
956
|
+
s.value = void 0;
|
|
618
957
|
return;
|
|
619
958
|
}
|
|
620
|
-
|
|
959
|
+
s.value = b.value;
|
|
621
960
|
}
|
|
961
|
+
}, re = (A) => {
|
|
962
|
+
E == null || E.emit("mouseover", A);
|
|
963
|
+
}, ie = (A) => {
|
|
964
|
+
E == null || E.emit("mouseleave", A);
|
|
622
965
|
};
|
|
623
|
-
return (
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
966
|
+
return (A, oe) => (i(), W(nt(t(q)), G(t(U), {
|
|
967
|
+
id: t(C),
|
|
968
|
+
ref_key: "$el",
|
|
969
|
+
ref: I,
|
|
970
|
+
onClickPassive: te,
|
|
971
|
+
onMouseoverPassive: re,
|
|
972
|
+
onMouseleavePassive: ie
|
|
973
|
+
}), {
|
|
974
|
+
default: ce(() => [
|
|
975
|
+
$(A.$slots, "default", {}, () => [
|
|
976
|
+
A.loading ? $(A.$slots, "loading", { key: 0 }, () => [
|
|
977
|
+
A.loadingIcon ? (i(), W(J, {
|
|
628
978
|
key: 0,
|
|
629
979
|
class: "vv-button__loading-icon",
|
|
630
|
-
name:
|
|
631
|
-
}, null, 8, ["name"])) :
|
|
632
|
-
|
|
633
|
-
]) : (
|
|
634
|
-
|
|
635
|
-
t(
|
|
980
|
+
name: A.loadingIcon
|
|
981
|
+
}, null, 8, ["name"])) : w("", !0),
|
|
982
|
+
A.loadingLabel ? (i(), y("span", ro, H(A.loadingLabel), 1)) : w("", !0)
|
|
983
|
+
]) : (i(), y(ne, { key: 1 }, [
|
|
984
|
+
$(A.$slots, "before"),
|
|
985
|
+
t(d) ? (i(), W(J, G({
|
|
636
986
|
key: 0,
|
|
637
987
|
class: "vv-button__icon"
|
|
638
|
-
}, t(
|
|
639
|
-
t(
|
|
640
|
-
|
|
641
|
-
|
|
988
|
+
}, t(T)), null, 16)) : w("", !0),
|
|
989
|
+
t(l) ? (i(), y("span", io, [
|
|
990
|
+
$(A.$slots, "label", {}, () => [
|
|
991
|
+
Z(H(t(l)), 1)
|
|
642
992
|
])
|
|
643
|
-
])) :
|
|
644
|
-
|
|
993
|
+
])) : w("", !0),
|
|
994
|
+
$(A.$slots, "after")
|
|
645
995
|
], 64))
|
|
646
996
|
])
|
|
647
997
|
]),
|
|
648
998
|
_: 3
|
|
649
|
-
}, 16));
|
|
999
|
+
}, 16, ["id"]));
|
|
650
1000
|
}
|
|
651
|
-
}),
|
|
652
|
-
...
|
|
653
|
-
...
|
|
654
|
-
...
|
|
1001
|
+
}), co = {
|
|
1002
|
+
...ve,
|
|
1003
|
+
...Ce,
|
|
1004
|
+
...xe,
|
|
1005
|
+
/**
|
|
1006
|
+
* String or String[] of css classes (modifiers) that will be provided to each button'
|
|
1007
|
+
*/
|
|
655
1008
|
itemModifiers: { type: [String, Array], default: void 0 },
|
|
656
1009
|
toggle: { type: Boolean, default: !1 },
|
|
657
1010
|
multiple: { type: Boolean, default: !1 },
|
|
658
1011
|
modelValue: { type: [String, Array], default: void 0 }
|
|
659
|
-
},
|
|
1012
|
+
}, vo = ["update:modelValue"], po = {
|
|
660
1013
|
name: "VvButtonGroup"
|
|
661
|
-
},
|
|
662
|
-
...
|
|
663
|
-
props:
|
|
664
|
-
emits:
|
|
665
|
-
setup(o, { emit:
|
|
1014
|
+
}, tl = /* @__PURE__ */ K({
|
|
1015
|
+
...po,
|
|
1016
|
+
props: co,
|
|
1017
|
+
emits: vo,
|
|
1018
|
+
setup(o, { emit: n }) {
|
|
666
1019
|
const e = o, {
|
|
667
|
-
disabled:
|
|
668
|
-
toggle:
|
|
669
|
-
modifiers:
|
|
670
|
-
multiple:
|
|
671
|
-
unselectable:
|
|
672
|
-
itemModifiers:
|
|
1020
|
+
disabled: r,
|
|
1021
|
+
toggle: a,
|
|
1022
|
+
modifiers: c,
|
|
1023
|
+
multiple: u,
|
|
1024
|
+
unselectable: v,
|
|
1025
|
+
itemModifiers: m
|
|
673
1026
|
} = toRefs(e);
|
|
674
1027
|
watchEffect(() => {
|
|
675
|
-
typeof e.modelValue == "string" &&
|
|
1028
|
+
typeof e.modelValue == "string" && u.value && console.warn(
|
|
676
1029
|
"[VvButtonGroup]: modelValue is a string but multiple is true."
|
|
677
1030
|
);
|
|
678
1031
|
});
|
|
679
|
-
const
|
|
680
|
-
get: () =>
|
|
681
|
-
set: (
|
|
682
|
-
}), l = {
|
|
683
|
-
key: Ue,
|
|
684
|
-
modelValue: i,
|
|
685
|
-
disabled: n,
|
|
686
|
-
toggle: s,
|
|
687
|
-
multiple: r,
|
|
688
|
-
unselectable: f,
|
|
689
|
-
itemModifiers: p
|
|
690
|
-
};
|
|
691
|
-
useProvideGroupState(l);
|
|
692
|
-
const { bemCssClasses: c } = useBemModifiers("vv-button-group", {
|
|
693
|
-
modifiers: d
|
|
1032
|
+
const d = computed({
|
|
1033
|
+
get: () => u.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
|
|
1034
|
+
set: (s) => (s !== void 0 && (Array.isArray(e.modelValue) || u.value) && !Array.isArray(s) && (s = [s]), n("update:modelValue", s))
|
|
694
1035
|
});
|
|
695
|
-
|
|
696
|
-
|
|
1036
|
+
useProvideGroupState({
|
|
1037
|
+
key: dt,
|
|
1038
|
+
modelValue: d,
|
|
1039
|
+
disabled: r,
|
|
1040
|
+
toggle: a,
|
|
1041
|
+
multiple: u,
|
|
1042
|
+
unselectable: v,
|
|
1043
|
+
itemModifiers: m
|
|
1044
|
+
});
|
|
1045
|
+
const l = useBemModifiers("vv-button-group", c);
|
|
1046
|
+
return (s, p) => (i(), y("div", {
|
|
1047
|
+
class: ee(t(l)),
|
|
697
1048
|
role: "group"
|
|
698
1049
|
}, [
|
|
699
|
-
|
|
1050
|
+
$(s.$slots, "default")
|
|
700
1051
|
], 2));
|
|
701
1052
|
}
|
|
702
|
-
}),
|
|
1053
|
+
}), fo = {
|
|
703
1054
|
title: String,
|
|
704
1055
|
modifiers: [String, Array]
|
|
705
|
-
},
|
|
1056
|
+
}, mo = {
|
|
706
1057
|
key: 0,
|
|
707
1058
|
class: "vv-card__header"
|
|
708
|
-
},
|
|
1059
|
+
}, bo = {
|
|
709
1060
|
key: 1,
|
|
710
1061
|
class: "vv-card__content"
|
|
711
|
-
},
|
|
1062
|
+
}, ho = {
|
|
712
1063
|
key: 2,
|
|
713
1064
|
class: "vv-card__footer"
|
|
714
|
-
},
|
|
1065
|
+
}, yo = {
|
|
715
1066
|
name: "VvCard"
|
|
716
|
-
},
|
|
717
|
-
...
|
|
718
|
-
props:
|
|
1067
|
+
}, ol = /* @__PURE__ */ K({
|
|
1068
|
+
...yo,
|
|
1069
|
+
props: fo,
|
|
719
1070
|
setup(o) {
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
return (n, s) => (m(), _("article", {
|
|
724
|
-
class: U(t(e))
|
|
1071
|
+
const n = o, { modifiers: e } = toRefs(n), r = useBemModifiers("vv-card", e);
|
|
1072
|
+
return (a, c) => (i(), y("article", {
|
|
1073
|
+
class: ee(t(r))
|
|
725
1074
|
}, [
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
1075
|
+
a.$slots.header || a.title ? (i(), y("header", mo, [
|
|
1076
|
+
$(a.$slots, "header", {}, () => [
|
|
1077
|
+
Z(H(a.title), 1)
|
|
729
1078
|
])
|
|
730
|
-
])) :
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
])) :
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
])) :
|
|
1079
|
+
])) : w("", !0),
|
|
1080
|
+
$(a.$slots, "default"),
|
|
1081
|
+
a.$slots.content ? (i(), y("div", bo, [
|
|
1082
|
+
$(a.$slots, "content")
|
|
1083
|
+
])) : w("", !0),
|
|
1084
|
+
a.$slots.footer ? (i(), y("footer", ho, [
|
|
1085
|
+
$(a.$slots, "footer")
|
|
1086
|
+
])) : w("", !0)
|
|
738
1087
|
], 2));
|
|
739
1088
|
}
|
|
740
|
-
}),
|
|
741
|
-
...
|
|
1089
|
+
}), go = {
|
|
1090
|
+
...ht,
|
|
1091
|
+
...ve,
|
|
1092
|
+
/**
|
|
1093
|
+
* If true, the input will be indeterminated
|
|
1094
|
+
*/
|
|
742
1095
|
indeterminate: Boolean,
|
|
1096
|
+
/**
|
|
1097
|
+
* Value associated with the unchecked state
|
|
1098
|
+
*/
|
|
743
1099
|
uncheckedValue: [String, Number, Boolean],
|
|
1100
|
+
/**
|
|
1101
|
+
* If true, the input will be displayed as a switch
|
|
1102
|
+
*/
|
|
744
1103
|
switch: Boolean
|
|
745
|
-
},
|
|
746
|
-
function
|
|
747
|
-
const { group: e, isInGroup:
|
|
1104
|
+
}, _o = ["click", "update:modelValue", "change", "blur"];
|
|
1105
|
+
function So(o, n) {
|
|
1106
|
+
const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(vt), { id: c, switch: u, indeterminate: v } = toRefs(o), m = a("modelValue", o, n), d = a("readonly", o), l = a("disabled", o), s = a("valid", o), p = a("invalid", o);
|
|
748
1107
|
return {
|
|
749
|
-
|
|
750
|
-
|
|
1108
|
+
// local props
|
|
1109
|
+
id: c,
|
|
1110
|
+
propsSwitch: u,
|
|
1111
|
+
indeterminate: v,
|
|
1112
|
+
// global props
|
|
751
1113
|
group: e,
|
|
752
|
-
isInGroup:
|
|
753
|
-
modelValue:
|
|
754
|
-
readonly:
|
|
755
|
-
disabled:
|
|
756
|
-
valid:
|
|
757
|
-
invalid:
|
|
1114
|
+
isInGroup: r,
|
|
1115
|
+
modelValue: m,
|
|
1116
|
+
readonly: d,
|
|
1117
|
+
disabled: l,
|
|
1118
|
+
valid: s,
|
|
1119
|
+
invalid: p
|
|
758
1120
|
};
|
|
759
1121
|
}
|
|
760
|
-
function
|
|
761
|
-
return Array.isArray(o) ? o.filter((
|
|
1122
|
+
function Re(o) {
|
|
1123
|
+
return Array.isArray(o) ? o.filter((n) => isString(n)).join(" ") : o;
|
|
762
1124
|
}
|
|
763
|
-
function
|
|
1125
|
+
function Ve(o, n) {
|
|
764
1126
|
const {
|
|
765
1127
|
invalid: e,
|
|
766
|
-
valid:
|
|
767
|
-
hint:
|
|
768
|
-
loading:
|
|
769
|
-
} =
|
|
770
|
-
hintLabel:
|
|
771
|
-
modelValue:
|
|
772
|
-
valid:
|
|
773
|
-
validLabel:
|
|
1128
|
+
valid: r,
|
|
1129
|
+
hint: a,
|
|
1130
|
+
loading: c
|
|
1131
|
+
} = n, {
|
|
1132
|
+
hintLabel: u,
|
|
1133
|
+
modelValue: v,
|
|
1134
|
+
valid: m,
|
|
1135
|
+
validLabel: d,
|
|
774
1136
|
invalid: l,
|
|
775
|
-
invalidLabel:
|
|
776
|
-
...
|
|
777
|
-
} = toRefs(o),
|
|
778
|
-
() => !!(
|
|
779
|
-
),
|
|
780
|
-
() => !!(
|
|
781
|
-
),
|
|
782
|
-
() => !!(
|
|
783
|
-
),
|
|
784
|
-
() =>
|
|
1137
|
+
invalidLabel: s,
|
|
1138
|
+
...p
|
|
1139
|
+
} = toRefs(o), g = resolveFieldData(p, "loading"), k = resolveFieldData(p, "loadingLabel"), C = computed(() => l.value ? !!(l.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !isEmpty(s)) : !1), b = computed(
|
|
1140
|
+
() => !!(u && u.value || a)
|
|
1141
|
+
), S = computed(
|
|
1142
|
+
() => !!(d && d.value || r)
|
|
1143
|
+
), I = computed(
|
|
1144
|
+
() => !!(g != null && g.value && c || g != null && g.value && (k != null && k.value))
|
|
1145
|
+
), B = computed(
|
|
1146
|
+
() => b.value || S.value || C.value || I.value
|
|
785
1147
|
);
|
|
786
1148
|
return {
|
|
787
|
-
hasInvalid:
|
|
788
|
-
hasHint:
|
|
789
|
-
hasValid:
|
|
790
|
-
hasLoading:
|
|
1149
|
+
hasInvalid: C,
|
|
1150
|
+
hasHint: b,
|
|
1151
|
+
hasValid: S,
|
|
1152
|
+
hasLoading: I,
|
|
791
1153
|
HintSlot: {
|
|
792
1154
|
name: "HintSlot",
|
|
793
1155
|
props: {
|
|
@@ -796,26 +1158,26 @@ function pe(o, a) {
|
|
|
796
1158
|
default: () => ({})
|
|
797
1159
|
}
|
|
798
1160
|
},
|
|
799
|
-
setup(
|
|
800
|
-
const
|
|
801
|
-
const
|
|
802
|
-
hintLabel:
|
|
803
|
-
modelValue:
|
|
804
|
-
valid:
|
|
805
|
-
validLabel:
|
|
1161
|
+
setup(E) {
|
|
1162
|
+
const O = computed(() => {
|
|
1163
|
+
const L = toReactive({
|
|
1164
|
+
hintLabel: u,
|
|
1165
|
+
modelValue: v,
|
|
1166
|
+
valid: m,
|
|
1167
|
+
validLabel: d,
|
|
806
1168
|
invalid: l,
|
|
807
|
-
invalidLabel:
|
|
808
|
-
loading:
|
|
809
|
-
loadingLabel:
|
|
810
|
-
...
|
|
1169
|
+
invalidLabel: s,
|
|
1170
|
+
loading: g,
|
|
1171
|
+
loadingLabel: k,
|
|
1172
|
+
...E.params
|
|
811
1173
|
});
|
|
812
|
-
return l != null && l.value ? (e == null ? void 0 : e(
|
|
1174
|
+
return l != null && l.value ? (e == null ? void 0 : e(L)) || Re(s == null ? void 0 : s.value) || (u == null ? void 0 : u.value) : m != null && m.value ? (r == null ? void 0 : r(L)) || Re(d == null ? void 0 : d.value) || (u == null ? void 0 : u.value) : g != null && g.value ? (c == null ? void 0 : c(L)) || Re(k == null ? void 0 : k.value) || (u == null ? void 0 : u.value) : (a == null ? void 0 : a(L)) || Re(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
813
1175
|
});
|
|
814
1176
|
return {
|
|
815
|
-
isVisible:
|
|
816
|
-
hasInvalid:
|
|
817
|
-
hasValid:
|
|
818
|
-
hintContent:
|
|
1177
|
+
isVisible: B,
|
|
1178
|
+
hasInvalid: C,
|
|
1179
|
+
hasValid: S,
|
|
1180
|
+
hintContent: O
|
|
819
1181
|
};
|
|
820
1182
|
},
|
|
821
1183
|
render() {
|
|
@@ -823,7 +1185,7 @@ function pe(o, a) {
|
|
|
823
1185
|
return h(
|
|
824
1186
|
"small",
|
|
825
1187
|
{
|
|
826
|
-
role: this.hasInvalid
|
|
1188
|
+
role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
|
|
827
1189
|
},
|
|
828
1190
|
this.hintContent
|
|
829
1191
|
);
|
|
@@ -831,474 +1193,833 @@ function pe(o, a) {
|
|
|
831
1193
|
}
|
|
832
1194
|
};
|
|
833
1195
|
}
|
|
834
|
-
const
|
|
1196
|
+
const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ko = {
|
|
835
1197
|
name: "VvCheckbox"
|
|
836
|
-
},
|
|
837
|
-
...
|
|
838
|
-
props:
|
|
839
|
-
emits:
|
|
840
|
-
setup(o, { emit:
|
|
841
|
-
const e = o,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1198
|
+
}, Ao = /* @__PURE__ */ K({
|
|
1199
|
+
...ko,
|
|
1200
|
+
props: go,
|
|
1201
|
+
emits: _o,
|
|
1202
|
+
setup(o, { emit: n }) {
|
|
1203
|
+
const e = o, r = useSlots(), {
|
|
1204
|
+
id: a,
|
|
1205
|
+
disabled: c,
|
|
1206
|
+
readonly: u,
|
|
1207
|
+
valid: v,
|
|
1208
|
+
invalid: m,
|
|
1209
|
+
propsSwitch: d,
|
|
1210
|
+
modelValue: l,
|
|
1211
|
+
indeterminate: s,
|
|
1212
|
+
isInGroup: p
|
|
1213
|
+
} = So(e, n), g = useUniqueId(a), k = computed(() => S.value ? -1 : e.tabindex), C = ref(), b = computed(
|
|
1214
|
+
() => e.uncheckedValue !== void 0 && !p.value
|
|
1215
|
+
), S = computed(() => c.value || u.value), I = computed(() => {
|
|
1216
|
+
if (m.value === !0)
|
|
854
1217
|
return !0;
|
|
855
|
-
if (
|
|
1218
|
+
if (v.value === !0)
|
|
856
1219
|
return !1;
|
|
857
|
-
}),
|
|
858
|
-
if (!
|
|
1220
|
+
}), B = computed(() => b.value ? l.value === e.value : Array.isArray(l.value) ? contains(e.value, l.value) : equals(e.value, l.value)), E = computed(() => !!(s.value || !B.value && b.value && e.uncheckedValue !== l.value)), O = computed(() => {
|
|
1221
|
+
if (!b.value)
|
|
859
1222
|
return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
|
|
860
|
-
}),
|
|
1223
|
+
}), L = computed({
|
|
861
1224
|
get() {
|
|
862
|
-
return
|
|
1225
|
+
return B.value;
|
|
863
1226
|
},
|
|
864
1227
|
set(T) {
|
|
865
|
-
if (
|
|
866
|
-
|
|
867
|
-
else if (Array.isArray(
|
|
868
|
-
const
|
|
869
|
-
Array.isArray(
|
|
1228
|
+
if (b.value)
|
|
1229
|
+
l.value = T ? e.value : e.uncheckedValue;
|
|
1230
|
+
else if (Array.isArray(l.value) || p.value) {
|
|
1231
|
+
const U = new Set(
|
|
1232
|
+
Array.isArray(l.value) ? l.value : l.value !== void 0 ? [l.value] : []
|
|
870
1233
|
);
|
|
871
|
-
T ?
|
|
1234
|
+
T ? U.add(e.value) : U.delete(e.value), l.value = [...U];
|
|
872
1235
|
} else
|
|
873
|
-
|
|
874
|
-
|
|
1236
|
+
l.value = T ? e.value : void 0;
|
|
1237
|
+
n("change", T);
|
|
875
1238
|
}
|
|
876
|
-
}), {
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
1239
|
+
}), { modifiers: q } = toRefs(e), Q = useBemModifiers(
|
|
1240
|
+
"vv-checkbox",
|
|
1241
|
+
q,
|
|
1242
|
+
computed(() => ({
|
|
1243
|
+
switch: d.value,
|
|
1244
|
+
valid: v.value,
|
|
1245
|
+
invalid: m.value,
|
|
1246
|
+
disabled: c.value,
|
|
1247
|
+
readonly: u.value,
|
|
1248
|
+
indeterminate: s.value
|
|
1249
|
+
}))
|
|
1250
|
+
);
|
|
884
1251
|
watchEffect(() => {
|
|
885
|
-
|
|
1252
|
+
b.value && Array.isArray(l.value) && console.warn(
|
|
886
1253
|
"[VvCheckbox] The model value is an array but the component is in binary mode."
|
|
887
1254
|
);
|
|
888
1255
|
}), watch(
|
|
889
|
-
() =>
|
|
1256
|
+
() => E.value,
|
|
890
1257
|
(T) => {
|
|
891
|
-
T ?
|
|
1258
|
+
T ? C.value.indeterminate = !0 : C.value.indeterminate = !1;
|
|
892
1259
|
}
|
|
893
1260
|
), onMounted(() => {
|
|
894
|
-
|
|
1261
|
+
E.value && (C.value.indeterminate = !0);
|
|
895
1262
|
});
|
|
896
|
-
const { HintSlot:
|
|
897
|
-
return (T,
|
|
898
|
-
class:
|
|
899
|
-
for: t(
|
|
1263
|
+
const { HintSlot: P } = Ve(e, r);
|
|
1264
|
+
return (T, U) => (i(), y("label", {
|
|
1265
|
+
class: ee(t(Q)),
|
|
1266
|
+
for: t(g)
|
|
900
1267
|
}, [
|
|
901
|
-
|
|
902
|
-
id: t(
|
|
1268
|
+
Se(M("input", {
|
|
1269
|
+
id: t(g),
|
|
903
1270
|
ref_key: "input",
|
|
904
|
-
ref:
|
|
905
|
-
"onUpdate:modelValue":
|
|
1271
|
+
ref: C,
|
|
1272
|
+
"onUpdate:modelValue": U[0] || (U[0] = (te) => Ae(L) ? L.value = te : null),
|
|
906
1273
|
type: "checkbox",
|
|
907
1274
|
class: "vv-checkbox__input",
|
|
908
1275
|
name: T.name,
|
|
909
|
-
disabled: t(
|
|
910
|
-
value: t(
|
|
911
|
-
tabindex: t(
|
|
912
|
-
"aria-invalid": t(
|
|
913
|
-
}, null, 8,
|
|
914
|
-
[
|
|
1276
|
+
disabled: t(S),
|
|
1277
|
+
value: t(O),
|
|
1278
|
+
tabindex: t(k),
|
|
1279
|
+
"aria-invalid": t(I)
|
|
1280
|
+
}, null, 8, $o), [
|
|
1281
|
+
[$t, t(L)]
|
|
915
1282
|
]),
|
|
916
|
-
|
|
917
|
-
|
|
1283
|
+
$(T.$slots, "default", { value: t(l) }, () => [
|
|
1284
|
+
Z(H(T.label), 1)
|
|
918
1285
|
]),
|
|
919
|
-
|
|
1286
|
+
de(t(P), {
|
|
920
1287
|
class: "vv-checkbox__hint",
|
|
921
|
-
params: { value: t(
|
|
1288
|
+
params: { value: t(l) }
|
|
922
1289
|
}, null, 8, ["params"])
|
|
923
|
-
], 10,
|
|
1290
|
+
], 10, Vo));
|
|
924
1291
|
}
|
|
925
|
-
}),
|
|
1292
|
+
}), Co = yt, wo = ["update:modelValue", "change"], Eo = ["textContent"], Io = { class: "vv-checkbox-group__wrapper" }, Po = {
|
|
926
1293
|
name: "VvCheckboxGroup"
|
|
927
|
-
},
|
|
928
|
-
...
|
|
929
|
-
props:
|
|
930
|
-
emits:
|
|
931
|
-
setup(o, { emit:
|
|
932
|
-
const e = o,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
const { getOptionLabel:
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1294
|
+
}, al = /* @__PURE__ */ K({
|
|
1295
|
+
...Po,
|
|
1296
|
+
props: Co,
|
|
1297
|
+
emits: wo,
|
|
1298
|
+
setup(o, { emit: n }) {
|
|
1299
|
+
const e = o, r = useSlots(), a = useVModel(e, "modelValue", n), { disabled: c, readonly: u, vertical: v, valid: m, invalid: d, modifiers: l } = toRefs(e);
|
|
1300
|
+
useProvideGroupState({
|
|
1301
|
+
key: vt,
|
|
1302
|
+
modelValue: a,
|
|
1303
|
+
disabled: c,
|
|
1304
|
+
readonly: u,
|
|
1305
|
+
valid: m,
|
|
1306
|
+
invalid: d
|
|
1307
|
+
});
|
|
1308
|
+
const { getOptionLabel: s, getOptionValue: p } = useOptions(e), g = useBemModifiers(
|
|
1309
|
+
"vv-checkbox-group",
|
|
1310
|
+
l,
|
|
1311
|
+
computed(() => ({
|
|
1312
|
+
disabled: c.value,
|
|
1313
|
+
readonly: u.value,
|
|
1314
|
+
horizontal: !v.value,
|
|
1315
|
+
valid: m.value,
|
|
1316
|
+
invalid: d.value
|
|
1317
|
+
}))
|
|
1318
|
+
), k = (b, S) => ({
|
|
1319
|
+
id: `${e.name}_opt${S}`,
|
|
949
1320
|
name: e.name,
|
|
950
|
-
label:
|
|
951
|
-
value:
|
|
952
|
-
}), { HintSlot:
|
|
953
|
-
return (
|
|
954
|
-
class:
|
|
1321
|
+
label: s(b),
|
|
1322
|
+
value: p(b)
|
|
1323
|
+
}), { HintSlot: C } = Ve(e, r);
|
|
1324
|
+
return (b, S) => (i(), y("fieldset", {
|
|
1325
|
+
class: ee(t(g))
|
|
955
1326
|
}, [
|
|
956
|
-
|
|
1327
|
+
b.label ? (i(), y("legend", {
|
|
957
1328
|
key: 0,
|
|
958
|
-
textContent:
|
|
959
|
-
}, null, 8,
|
|
960
|
-
|
|
961
|
-
|
|
1329
|
+
textContent: H(b.label)
|
|
1330
|
+
}, null, 8, Eo)) : w("", !0),
|
|
1331
|
+
M("div", Io, [
|
|
1332
|
+
b.options.length > 0 ? (i(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (i(), W(Ao, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
|
|
962
1333
|
]),
|
|
963
|
-
|
|
1334
|
+
de(t(C), { class: "vv-checkbox-group__hint" })
|
|
964
1335
|
], 2));
|
|
965
1336
|
}
|
|
966
|
-
}),
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1337
|
+
}), Oo = [
|
|
1338
|
+
"update:modelValue",
|
|
1339
|
+
"change:search",
|
|
1340
|
+
"focus",
|
|
1341
|
+
"blur"
|
|
1342
|
+
], Do = {
|
|
1343
|
+
...Le,
|
|
1344
|
+
...Te,
|
|
1345
|
+
...Ie,
|
|
1346
|
+
...Pe,
|
|
1347
|
+
...De,
|
|
1348
|
+
...qe,
|
|
1349
|
+
...Ce,
|
|
1350
|
+
...Oe,
|
|
1351
|
+
...ve,
|
|
1352
|
+
...Ke,
|
|
1353
|
+
...ze,
|
|
1354
|
+
...Xe,
|
|
1355
|
+
...xe,
|
|
1356
|
+
...Fe,
|
|
1357
|
+
/**
|
|
1358
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
1359
|
+
*/
|
|
971
1360
|
modelValue: {
|
|
972
|
-
type: [String, Number, Boolean, Object, Array]
|
|
1361
|
+
type: [String, Number, Boolean, Object, Array],
|
|
1362
|
+
default: void 0
|
|
1363
|
+
},
|
|
1364
|
+
/**
|
|
1365
|
+
* Select input label
|
|
1366
|
+
*/
|
|
1367
|
+
label: String,
|
|
1368
|
+
/**
|
|
1369
|
+
* Label for no search results
|
|
1370
|
+
*/
|
|
1371
|
+
noResultsLabel: { type: String, default: "No results" },
|
|
1372
|
+
/**
|
|
1373
|
+
* Label for selected option hint
|
|
1374
|
+
*/
|
|
1375
|
+
selectedLabel: { type: String, default: "Selected" },
|
|
1376
|
+
/**
|
|
1377
|
+
* Label for deselect button
|
|
1378
|
+
*/
|
|
1379
|
+
deselectLabel: { type: String, default: "Deselect" },
|
|
1380
|
+
/**
|
|
1381
|
+
* Label for select option hint
|
|
1382
|
+
*/
|
|
1383
|
+
pressToSelectLabel: { type: String, default: "Press enter to select" },
|
|
1384
|
+
/**
|
|
1385
|
+
* Label for deselected option hint
|
|
1386
|
+
*/
|
|
1387
|
+
pressToDeselectLabel: { type: String, default: "Press enter to remove" },
|
|
1388
|
+
/**
|
|
1389
|
+
* Select input placeholder
|
|
1390
|
+
*/
|
|
1391
|
+
placeholder: String,
|
|
1392
|
+
/**
|
|
1393
|
+
* Use input text to search on options
|
|
1394
|
+
*/
|
|
1395
|
+
searchable: Boolean,
|
|
1396
|
+
/**
|
|
1397
|
+
* On searchable select is the input search placeholder
|
|
1398
|
+
*/
|
|
1399
|
+
searchPlaceholder: {
|
|
1400
|
+
type: String,
|
|
1401
|
+
default: "Search..."
|
|
1402
|
+
},
|
|
1403
|
+
/**
|
|
1404
|
+
* The input search debounce time in ms
|
|
1405
|
+
*/
|
|
1406
|
+
debounceSearch: {
|
|
1407
|
+
type: [Number, String],
|
|
1408
|
+
default: 0
|
|
973
1409
|
},
|
|
974
|
-
|
|
1410
|
+
/**
|
|
1411
|
+
* Manage modelValue as string[] or object[]
|
|
1412
|
+
*/
|
|
975
1413
|
multiple: Boolean,
|
|
1414
|
+
/**
|
|
1415
|
+
* The max number of selected values
|
|
1416
|
+
*/
|
|
976
1417
|
maxValues: [Number, String],
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1418
|
+
/**
|
|
1419
|
+
* The select label separator visible to the user
|
|
1420
|
+
*/
|
|
1421
|
+
separator: { type: String, default: ", " },
|
|
1422
|
+
/**
|
|
1423
|
+
* Show native select
|
|
1424
|
+
*/
|
|
1425
|
+
native: Boolean,
|
|
1426
|
+
/**
|
|
1427
|
+
* Show badges
|
|
1428
|
+
*/
|
|
1429
|
+
badges: Boolean,
|
|
1430
|
+
/**
|
|
1431
|
+
* Badge modifiers
|
|
1432
|
+
*/
|
|
1433
|
+
badgeModifiers: {
|
|
1434
|
+
type: [String, Array],
|
|
1435
|
+
default: "action sm"
|
|
1436
|
+
},
|
|
1437
|
+
/**
|
|
1438
|
+
* Set dropdown width to the same as the trigger
|
|
1439
|
+
*/
|
|
1440
|
+
triggerWidth: {
|
|
1441
|
+
...Fe.triggerWidth,
|
|
1442
|
+
default: !0
|
|
1443
|
+
},
|
|
1444
|
+
/**
|
|
1445
|
+
* Dropdown modifiers
|
|
1446
|
+
*/
|
|
1447
|
+
dropdownModifiers: {
|
|
1448
|
+
type: [String, Array]
|
|
1449
|
+
},
|
|
1450
|
+
/**
|
|
1451
|
+
* Open dropdown on focus
|
|
1452
|
+
*/
|
|
1453
|
+
autoOpen: Boolean,
|
|
1454
|
+
/**
|
|
1455
|
+
* Close dropdown on select (not multiple)
|
|
1456
|
+
*/
|
|
1457
|
+
autoClose: Boolean
|
|
1458
|
+
}, ot = ["listbox", "menu"], Bo = {
|
|
1459
|
+
...Me,
|
|
1460
|
+
...ve,
|
|
1461
|
+
...Fe,
|
|
1462
|
+
/**
|
|
1463
|
+
* Show / hide dropdown programmatically
|
|
1464
|
+
*/
|
|
1465
|
+
modelValue: {
|
|
1466
|
+
type: Boolean,
|
|
1467
|
+
default: void 0
|
|
1468
|
+
},
|
|
1469
|
+
/**
|
|
1470
|
+
* Dropdown trigger element
|
|
1471
|
+
*/
|
|
1472
|
+
reference: {
|
|
1473
|
+
type: Object,
|
|
1474
|
+
default: null
|
|
1475
|
+
},
|
|
1476
|
+
/**
|
|
1477
|
+
* Dropdown role
|
|
1478
|
+
*/
|
|
1479
|
+
role: {
|
|
1480
|
+
type: String,
|
|
1481
|
+
default: ot[1],
|
|
1482
|
+
validator: (o) => ot.includes(o)
|
|
1483
|
+
}
|
|
1484
|
+
}, Ro = ["id", "tabindex", "role", "aria-labelledby"], To = {
|
|
1485
|
+
name: "VvDropdown",
|
|
1486
|
+
inheritAttrs: !1
|
|
1487
|
+
}, St = /* @__PURE__ */ K({
|
|
1488
|
+
...To,
|
|
1489
|
+
props: Bo,
|
|
986
1490
|
emits: ["update:modelValue"],
|
|
987
|
-
setup(o, { emit:
|
|
988
|
-
const e = o,
|
|
989
|
-
|
|
990
|
-
|
|
1491
|
+
setup(o, { emit: n }) {
|
|
1492
|
+
const e = o, { id: r } = toRefs(e), a = useUniqueId(r), c = useAttrs(), u = ref("auto"), v = ref("auto"), m = ref(null), d = ref(null), l = ref(null), s = ref(null), p = computed({
|
|
1493
|
+
get: () => e.reference ?? m.value,
|
|
1494
|
+
set: (f) => {
|
|
1495
|
+
m.value = f;
|
|
1496
|
+
}
|
|
1497
|
+
}), g = computed(() => {
|
|
1498
|
+
const f = [];
|
|
1499
|
+
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? f.push(Qe()) : f.push(
|
|
1500
|
+
Qe(e.autoPlacement)
|
|
1501
|
+
) : e.flip && (typeof e.flip == "boolean" ? f.push(Ze()) : f.push(Ze(e.flip))), e.shift && (typeof e.shift == "boolean" ? f.push(et()) : f.push(et(e.shift))), e.size) {
|
|
1502
|
+
const x = ({
|
|
1503
|
+
availableWidth: ue,
|
|
1504
|
+
availableHeight: he
|
|
1505
|
+
}) => {
|
|
1506
|
+
u.value = `${ue}px`, v.value = `${he}px`;
|
|
1507
|
+
};
|
|
1508
|
+
typeof e.size == "boolean" ? f.push(
|
|
1509
|
+
tt({
|
|
1510
|
+
apply: x
|
|
1511
|
+
})
|
|
1512
|
+
) : f.push(
|
|
1513
|
+
tt({
|
|
1514
|
+
...e.size,
|
|
1515
|
+
apply: x
|
|
1516
|
+
})
|
|
1517
|
+
);
|
|
1518
|
+
}
|
|
1519
|
+
return e.offset && (f.push(He(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? f.push(He(Number(e.offset))) : f.push(He(e.offset))), e.arrow && f.push(
|
|
1520
|
+
Dt({
|
|
1521
|
+
element: l
|
|
1522
|
+
})
|
|
1523
|
+
), f;
|
|
1524
|
+
}), { x: k, y: C, strategy: b, middlewareData: S, placement: I } = Bt(
|
|
1525
|
+
p,
|
|
1526
|
+
d,
|
|
1527
|
+
{
|
|
1528
|
+
whileElementsMounted: Rt,
|
|
1529
|
+
placement: e.placement,
|
|
1530
|
+
middleware: g
|
|
1531
|
+
}
|
|
1532
|
+
), B = computed(() => ({
|
|
1533
|
+
position: b.value,
|
|
1534
|
+
top: `${C.value ?? 0}px`,
|
|
1535
|
+
left: `${k.value ?? 0}px`,
|
|
1536
|
+
maxWidth: u.value,
|
|
1537
|
+
maxHeight: v.value,
|
|
1538
|
+
width: e.triggerWidth && p.value ? `${p.value.offsetWidth}px` : void 0
|
|
1539
|
+
})), E = computed(() => I.value.split("-")[0]), O = computed(
|
|
1540
|
+
() => ({
|
|
1541
|
+
top: "bottom",
|
|
1542
|
+
right: "left",
|
|
1543
|
+
bottom: "top",
|
|
1544
|
+
left: "right"
|
|
1545
|
+
})[E.value] ?? "bottom"
|
|
1546
|
+
), L = computed(() => {
|
|
1547
|
+
var f, x, ue, he;
|
|
1548
|
+
return ["bottom", "top"].includes(O.value) ? {
|
|
1549
|
+
right: `${((f = S.value.arrow) == null ? void 0 : f.x) ?? 0}px`,
|
|
1550
|
+
[O.value]: `${-(((x = l.value) == null ? void 0 : x.offsetWidth) ?? 0) / 2}px`
|
|
1551
|
+
} : {
|
|
1552
|
+
top: `${((ue = S.value.arrow) == null ? void 0 : ue.y) ?? 0}px`,
|
|
1553
|
+
[O.value]: `${-(((he = l.value) == null ? void 0 : he.offsetWidth) ?? 0) / 2}px`
|
|
1554
|
+
};
|
|
1555
|
+
}), q = useVModel(e, "modelValue", n), Q = ref(!1), P = computed({
|
|
1556
|
+
get: () => q.value ?? Q.value,
|
|
1557
|
+
set: (f) => {
|
|
1558
|
+
if (q.value === void 0) {
|
|
1559
|
+
Q.value = f;
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
q.value = f;
|
|
1563
|
+
}
|
|
1564
|
+
}), T = () => {
|
|
1565
|
+
P.value = !0;
|
|
1566
|
+
}, U = () => {
|
|
1567
|
+
P.value = !1;
|
|
1568
|
+
}, te = () => {
|
|
1569
|
+
P.value = !P.value;
|
|
1570
|
+
}, re = (f) => {
|
|
1571
|
+
p.value = f;
|
|
1572
|
+
};
|
|
1573
|
+
watch(P, (f) => {
|
|
1574
|
+
f && e.autofocusFirst && nextTick(() => {
|
|
1575
|
+
const x = ae(
|
|
1576
|
+
d.value
|
|
1577
|
+
);
|
|
1578
|
+
x.length > 0 && x[0].focus();
|
|
1579
|
+
});
|
|
1580
|
+
}), onClickOutside(
|
|
1581
|
+
d,
|
|
1582
|
+
() => {
|
|
1583
|
+
e.autoClose && (P.value = !1);
|
|
1584
|
+
},
|
|
1585
|
+
{ ignore: [p] }
|
|
1586
|
+
);
|
|
1587
|
+
const ie = computed(() => {
|
|
1588
|
+
var f;
|
|
1589
|
+
return ((f = p.value) == null ? void 0 : f.getAttribute("id")) ?? void 0;
|
|
1590
|
+
}), A = computed(() => ({
|
|
1591
|
+
"aria-controls": a.value,
|
|
1592
|
+
"aria-haspopup": !0,
|
|
1593
|
+
"aria-expanded": P.value
|
|
1594
|
+
})), { component: oe, bus: fe } = useProvideDropdownTrigger({
|
|
1595
|
+
reference: p,
|
|
1596
|
+
id: a,
|
|
1597
|
+
expanded: P,
|
|
1598
|
+
aria: A
|
|
991
1599
|
});
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1600
|
+
fe.on("click", te);
|
|
1601
|
+
const { role: se, modifiers: be } = toRefs(e), { itemRole: z } = useProvideDropdownItem({ role: se, expanded: P }), R = useBemModifiers(
|
|
1602
|
+
"vv-dropdown",
|
|
1603
|
+
be,
|
|
1604
|
+
computed(() => ({
|
|
1605
|
+
arrow: e.arrow
|
|
1606
|
+
}))
|
|
1607
|
+
), { focused: X } = useFocusWithin(d);
|
|
1608
|
+
function ae(f) {
|
|
1609
|
+
return f ? [
|
|
1610
|
+
...f.querySelectorAll(
|
|
1611
|
+
'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
|
|
1612
|
+
)
|
|
1613
|
+
].filter(
|
|
1614
|
+
(x) => !x.hasAttribute("disabled") && !x.getAttribute("aria-hidden")
|
|
1615
|
+
) : [];
|
|
997
1616
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((g = e.modelValue) == null ? void 0 : g.length) >= e.maxValues && !contains(u, e.modelValue))
|
|
1617
|
+
const me = () => {
|
|
1618
|
+
nextTick(() => {
|
|
1619
|
+
if (X.value) {
|
|
1620
|
+
const f = ae(
|
|
1621
|
+
d.value
|
|
1622
|
+
);
|
|
1623
|
+
if (f.length === 0 || !document.activeElement)
|
|
1006
1624
|
return;
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
"aria-selected": i(y)
|
|
1028
|
-
}, [
|
|
1029
|
-
R("label", {
|
|
1030
|
-
for: `dropdown-${v}-${t(n)}`,
|
|
1031
|
-
onClick: Re((V) => c(t(f)(y)), ["prevent"])
|
|
1032
|
-
}, [
|
|
1033
|
-
R("input", {
|
|
1034
|
-
id: `dropdown-${v}-${t(n)}`,
|
|
1035
|
-
type: u.multiple ? "checkbox" : "radio",
|
|
1036
|
-
value: t(f)(y),
|
|
1037
|
-
checked: i(y),
|
|
1038
|
-
disabled: l(y),
|
|
1039
|
-
name: u.name,
|
|
1040
|
-
tabindex: "-1",
|
|
1041
|
-
"aria-hidden": "true"
|
|
1042
|
-
}, null, 8, mo),
|
|
1043
|
-
q(" " + B(t(r)(y)), 1)
|
|
1044
|
-
], 8, vo)
|
|
1045
|
-
], 8, po))), 128))
|
|
1046
|
-
], 10, uo);
|
|
1625
|
+
const x = f.indexOf(
|
|
1626
|
+
document.activeElement
|
|
1627
|
+
);
|
|
1628
|
+
x < f.length - 1 ? f[x + 1].focus() : f[0].focus();
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
}, pe = () => {
|
|
1632
|
+
nextTick(() => {
|
|
1633
|
+
if (X.value) {
|
|
1634
|
+
const f = ae(
|
|
1635
|
+
d.value
|
|
1636
|
+
);
|
|
1637
|
+
if (f.length === 0 || !document.activeElement)
|
|
1638
|
+
return;
|
|
1639
|
+
const x = f.indexOf(
|
|
1640
|
+
document.activeElement
|
|
1641
|
+
);
|
|
1642
|
+
x > 0 ? f[x - 1].focus() : f[f.length - 1].focus();
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1047
1645
|
};
|
|
1646
|
+
return onKeyStroke("Escape", (f) => {
|
|
1647
|
+
P.value && (f.preventDefault(), U());
|
|
1648
|
+
}), onKeyStroke("ArrowDown", (f) => {
|
|
1649
|
+
P.value && X.value && (f.preventDefault(), me());
|
|
1650
|
+
}), onKeyStroke("ArrowUp", (f) => {
|
|
1651
|
+
P.value && X.value && (f.preventDefault(), pe());
|
|
1652
|
+
}), onKeyStroke([" ", "Enter"], (f) => {
|
|
1653
|
+
P.value && X.value && (f.preventDefault(), document.activeElement.click());
|
|
1654
|
+
}), (f, x) => (i(), y(ne, null, [
|
|
1655
|
+
de(t(oe), null, {
|
|
1656
|
+
default: ce(() => [
|
|
1657
|
+
$(f.$slots, "default", F(j({ init: re, show: T, hide: U, toggle: te, expanded: t(P), aria: t(A) })))
|
|
1658
|
+
]),
|
|
1659
|
+
_: 3
|
|
1660
|
+
}),
|
|
1661
|
+
de(rt, { name: f.transitionName }, {
|
|
1662
|
+
default: ce(() => [
|
|
1663
|
+
Se(M("div", {
|
|
1664
|
+
ref_key: "floatingEl",
|
|
1665
|
+
ref: d,
|
|
1666
|
+
style: Je(t(B)),
|
|
1667
|
+
class: ee(t(R))
|
|
1668
|
+
}, [
|
|
1669
|
+
e.arrow ? (i(), y("div", {
|
|
1670
|
+
key: 0,
|
|
1671
|
+
ref_key: "arrowEl",
|
|
1672
|
+
ref: l,
|
|
1673
|
+
style: Je(t(L)),
|
|
1674
|
+
class: "vv-dropdown__arrow"
|
|
1675
|
+
}, null, 4)) : w("", !0),
|
|
1676
|
+
$(f.$slots, "before", F(j({ expanded: t(P) }))),
|
|
1677
|
+
M("ul", G(t(c), {
|
|
1678
|
+
id: t(a),
|
|
1679
|
+
ref_key: "listEl",
|
|
1680
|
+
ref: s,
|
|
1681
|
+
tabindex: t(P) ? void 0 : -1,
|
|
1682
|
+
role: t(se),
|
|
1683
|
+
"aria-labelledby": t(ie),
|
|
1684
|
+
class: "vv-dropdown__list"
|
|
1685
|
+
}), [
|
|
1686
|
+
$(f.$slots, "items", F(j({
|
|
1687
|
+
role: t(z)
|
|
1688
|
+
})))
|
|
1689
|
+
], 16, Ro),
|
|
1690
|
+
$(f.$slots, "after", F(j({ expanded: t(P) })))
|
|
1691
|
+
], 6), [
|
|
1692
|
+
[je, t(P)]
|
|
1693
|
+
])
|
|
1694
|
+
]),
|
|
1695
|
+
_: 3
|
|
1696
|
+
}, 8, ["name"])
|
|
1697
|
+
], 64));
|
|
1048
1698
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
|
|
1699
|
+
}), xo = {
|
|
1700
|
+
name: "VvDropdownItem"
|
|
1701
|
+
}, Vt = /* @__PURE__ */ K({
|
|
1702
|
+
...xo,
|
|
1703
|
+
setup(o) {
|
|
1704
|
+
const { role: n, expanded: e } = useInjectedDropdownItem(), r = ref(null);
|
|
1705
|
+
useProvideDropdownAction({ expanded: e });
|
|
1706
|
+
const a = useElementHover(r), { focused: c } = useFocus(r), { focused: u } = useFocusWithin(r);
|
|
1707
|
+
return watch(a, (v) => {
|
|
1708
|
+
v && (c.value = !0);
|
|
1709
|
+
}), (v, m) => (i(), y("li", G({ role: t(n) }, {
|
|
1710
|
+
ref_key: "element",
|
|
1711
|
+
ref: r,
|
|
1712
|
+
class: ["vv-dropdown__item", { "focus-visible": t(c) || t(u) }]
|
|
1713
|
+
}), [
|
|
1714
|
+
$(v.$slots, "default")
|
|
1715
|
+
], 16));
|
|
1716
|
+
}
|
|
1717
|
+
}), Mo = {
|
|
1718
|
+
...Le,
|
|
1719
|
+
...ft,
|
|
1720
|
+
...mt,
|
|
1721
|
+
...Te,
|
|
1722
|
+
...Ie,
|
|
1723
|
+
...Pe,
|
|
1724
|
+
...De,
|
|
1051
1725
|
...qe,
|
|
1052
|
-
...
|
|
1053
|
-
...Ae,
|
|
1054
|
-
...ge,
|
|
1055
|
-
...ye,
|
|
1056
|
-
...Se,
|
|
1726
|
+
...Ce,
|
|
1057
1727
|
...Oe,
|
|
1058
|
-
...
|
|
1059
|
-
...
|
|
1060
|
-
...
|
|
1061
|
-
...
|
|
1062
|
-
...
|
|
1063
|
-
|
|
1064
|
-
|
|
1728
|
+
...ve,
|
|
1729
|
+
...Ke,
|
|
1730
|
+
...ze,
|
|
1731
|
+
...Xe,
|
|
1732
|
+
...xe,
|
|
1733
|
+
/**
|
|
1734
|
+
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
1735
|
+
* If it is not specified, then only one option can be selected at a time.
|
|
1736
|
+
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
1737
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
1738
|
+
*/
|
|
1065
1739
|
multiple: Boolean,
|
|
1740
|
+
/**
|
|
1741
|
+
* A Boolean attribute indicating that an option with a non-empty string value must be selected.
|
|
1742
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
1743
|
+
*/
|
|
1066
1744
|
required: Boolean,
|
|
1745
|
+
/**
|
|
1746
|
+
* If the control is presented as a scrolling list box (e.g. when multiple is specified),
|
|
1747
|
+
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
1748
|
+
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
1749
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
1750
|
+
*/
|
|
1067
1751
|
size: [String, Number],
|
|
1752
|
+
/**
|
|
1753
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
1754
|
+
*/
|
|
1068
1755
|
modelValue: {
|
|
1069
1756
|
type: [String, Number, Boolean, Object, Array],
|
|
1070
1757
|
default: void 0
|
|
1071
1758
|
},
|
|
1759
|
+
/**
|
|
1760
|
+
* <label> value for the select
|
|
1761
|
+
*/
|
|
1072
1762
|
label: String,
|
|
1763
|
+
/**
|
|
1764
|
+
* Select placeholder
|
|
1765
|
+
*/
|
|
1073
1766
|
placeholder: String
|
|
1074
|
-
},
|
|
1767
|
+
}, Lo = ["update:modelValue", "focus", "blur"], No = ["for"], Ho = { class: "vv-select__wrapper" }, Go = {
|
|
1768
|
+
key: 0,
|
|
1769
|
+
class: "vv-select__input-before"
|
|
1770
|
+
}, Uo = { class: "vv-select__inner" }, Wo = ["id"], Fo = ["disabled", "hidden"], jo = ["disabled", "value"], qo = {
|
|
1771
|
+
key: 1,
|
|
1772
|
+
class: "vv-select__input-after"
|
|
1773
|
+
}, Ko = {
|
|
1075
1774
|
name: "VvSelect"
|
|
1076
|
-
},
|
|
1077
|
-
...
|
|
1078
|
-
props:
|
|
1079
|
-
emits:
|
|
1080
|
-
setup(o, { emit:
|
|
1081
|
-
const e = o,
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1775
|
+
}, zo = /* @__PURE__ */ K({
|
|
1776
|
+
...Ko,
|
|
1777
|
+
props: Mo,
|
|
1778
|
+
emits: Lo,
|
|
1779
|
+
setup(o, { emit: n }) {
|
|
1780
|
+
const e = o, r = useSlots(), a = ref(), { HintSlot: c, hasHint: u, hasInvalid: v } = Ve(e, r), {
|
|
1781
|
+
id: m,
|
|
1782
|
+
modifiers: d,
|
|
1783
|
+
disabled: l,
|
|
1784
|
+
readonly: s,
|
|
1785
|
+
loading: p,
|
|
1786
|
+
icon: g,
|
|
1787
|
+
iconPosition: k,
|
|
1788
|
+
invalid: C,
|
|
1789
|
+
valid: b,
|
|
1790
|
+
floating: S,
|
|
1791
|
+
multiple: I
|
|
1792
|
+
} = toRefs(e), B = useUniqueId(m), E = computed(() => `${B.value}-hint`), { focused: O } = useComponentFocus(a, n), L = useElementVisibility(a);
|
|
1793
|
+
watch(L, (R) => {
|
|
1794
|
+
R && e.autofocus && (O.value = !0);
|
|
1095
1795
|
});
|
|
1096
|
-
const { hasIcon:
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
),
|
|
1796
|
+
const { hasIcon: q, hasIconBefore: Q, hasIconAfter: P } = useComponentIcon(
|
|
1797
|
+
g,
|
|
1798
|
+
k
|
|
1799
|
+
), T = computed(() => !isEmpty(e.modelValue)), U = computed(() => e.disabled || e.readonly), te = computed(() => U.value ? -1 : e.tabindex), re = computed(() => {
|
|
1100
1800
|
if (e.invalid === !0)
|
|
1101
1801
|
return !0;
|
|
1102
1802
|
if (e.valid === !0)
|
|
1103
1803
|
return !1;
|
|
1104
|
-
}),
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1804
|
+
}), ie = useBemModifiers(
|
|
1805
|
+
"vv-select",
|
|
1806
|
+
d,
|
|
1807
|
+
computed(() => ({
|
|
1808
|
+
valid: b.value,
|
|
1809
|
+
invalid: C.value,
|
|
1810
|
+
loading: p.value,
|
|
1811
|
+
disabled: l.value,
|
|
1812
|
+
readonly: s.value,
|
|
1813
|
+
"icon-before": Q.value,
|
|
1814
|
+
"icon-after": P.value,
|
|
1815
|
+
dirty: T.value,
|
|
1816
|
+
focus: O.value,
|
|
1817
|
+
floating: S.value,
|
|
1818
|
+
multiple: I.value
|
|
1819
|
+
}))
|
|
1820
|
+
), A = computed(() => ({
|
|
1118
1821
|
name: e.name,
|
|
1119
|
-
tabindex:
|
|
1120
|
-
disabled:
|
|
1822
|
+
tabindex: te.value,
|
|
1823
|
+
disabled: U.value,
|
|
1121
1824
|
required: e.required,
|
|
1122
1825
|
size: e.size,
|
|
1123
1826
|
autocomplete: e.autocomplete,
|
|
1124
1827
|
multiple: e.multiple,
|
|
1125
|
-
"aria-invalid":
|
|
1126
|
-
"aria-describedby": !
|
|
1127
|
-
"aria-errormessage":
|
|
1128
|
-
})),
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1828
|
+
"aria-invalid": re.value,
|
|
1829
|
+
"aria-describedby": !v.value && u.value ? E.value : void 0,
|
|
1830
|
+
"aria-errormessage": v.value ? E.value : void 0
|
|
1831
|
+
})), oe = computed(() => ({
|
|
1832
|
+
valid: e.valid,
|
|
1833
|
+
invalid: e.invalid,
|
|
1834
|
+
modelValue: e.modelValue
|
|
1835
|
+
})), { getOptionLabel: fe, getOptionValue: se, getOptionDisabled: be } = useOptions(e), z = computed({
|
|
1133
1836
|
get: () => e.modelValue,
|
|
1134
|
-
set: (
|
|
1135
|
-
Array.isArray(
|
|
1837
|
+
set: (R) => {
|
|
1838
|
+
Array.isArray(R) && (R = R.filter((X) => X !== void 0)), n("update:modelValue", R);
|
|
1136
1839
|
}
|
|
1137
1840
|
});
|
|
1138
|
-
return (
|
|
1139
|
-
class:
|
|
1841
|
+
return (R, X) => (i(), y("div", {
|
|
1842
|
+
class: ee(t(ie))
|
|
1140
1843
|
}, [
|
|
1141
|
-
|
|
1844
|
+
R.label ? (i(), y("label", {
|
|
1142
1845
|
key: 0,
|
|
1143
|
-
for: t(
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
]),
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
ref_key: "select",
|
|
1152
|
-
ref: s,
|
|
1153
|
-
"onUpdate:modelValue": j[0] || (j[0] = (A) => be(W) ? W.value = A : null)
|
|
1154
|
-
}, t(ie)), [
|
|
1155
|
-
P.placeholder ? (m(), _("option", {
|
|
1846
|
+
for: t(B)
|
|
1847
|
+
}, H(R.label), 9, No)) : w("", !0),
|
|
1848
|
+
M("div", Ho, [
|
|
1849
|
+
R.$slots.before ? (i(), y("div", Go, [
|
|
1850
|
+
$(R.$slots, "before", F(j(t(oe))))
|
|
1851
|
+
])) : w("", !0),
|
|
1852
|
+
M("div", Uo, [
|
|
1853
|
+
t(Q) ? (i(), W(J, G({
|
|
1156
1854
|
key: 0,
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1855
|
+
class: "vv-select__icon"
|
|
1856
|
+
}, t(q)), null, 16)) : w("", !0),
|
|
1857
|
+
Se(M("select", G({
|
|
1858
|
+
id: t(B),
|
|
1859
|
+
ref_key: "select",
|
|
1860
|
+
ref: a,
|
|
1861
|
+
"onUpdate:modelValue": X[0] || (X[0] = (ae) => Ae(z) ? z.value = ae : null)
|
|
1862
|
+
}, t(A)), [
|
|
1863
|
+
R.placeholder ? (i(), y("option", {
|
|
1864
|
+
key: 0,
|
|
1865
|
+
value: void 0,
|
|
1866
|
+
disabled: !R.unselectable,
|
|
1867
|
+
hidden: !R.unselectable
|
|
1868
|
+
}, H(R.placeholder), 9, Fo)) : w("", !0),
|
|
1869
|
+
(i(!0), y(ne, null, ke(R.options, (ae, me) => (i(), y("option", {
|
|
1870
|
+
key: me,
|
|
1871
|
+
disabled: t(be)(ae),
|
|
1872
|
+
value: t(se)(ae)
|
|
1873
|
+
}, H(t(fe)(ae)), 9, jo))), 128))
|
|
1874
|
+
], 16, Wo), [
|
|
1875
|
+
[kt, t(z)]
|
|
1876
|
+
]),
|
|
1877
|
+
t(P) ? (i(), W(J, G({
|
|
1878
|
+
key: 1,
|
|
1879
|
+
class: "vv-select__icon vv-select__icon-after"
|
|
1880
|
+
}, t(q)), null, 16)) : w("", !0)
|
|
1168
1881
|
]),
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
])
|
|
1882
|
+
R.$slots.after ? (i(), y("div", qo, [
|
|
1883
|
+
$(R.$slots, "after", F(j(t(oe))))
|
|
1884
|
+
])) : w("", !0)
|
|
1172
1885
|
]),
|
|
1173
|
-
|
|
1174
|
-
id: t(
|
|
1886
|
+
de(t(c), {
|
|
1887
|
+
id: t(E),
|
|
1175
1888
|
class: "vv-select__hint"
|
|
1176
1889
|
}, null, 8, ["id"])
|
|
1177
1890
|
], 2));
|
|
1178
1891
|
}
|
|
1179
|
-
}),
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
...
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
debounceSearch: {
|
|
1208
|
-
type: [Number, String],
|
|
1209
|
-
default: 0
|
|
1210
|
-
},
|
|
1211
|
-
multiple: Boolean,
|
|
1212
|
-
maxValues: [Number, String],
|
|
1213
|
-
separator: { type: String, default: ", " },
|
|
1214
|
-
native: Boolean
|
|
1215
|
-
}, wo = ["id"], Io = ["id", "for"], Eo = ["tabindex"], Ro = ["id", "placeholder"], Oo = {
|
|
1216
|
-
name: "VvCombobox"
|
|
1217
|
-
}, As = /* @__PURE__ */ N({
|
|
1218
|
-
...Oo,
|
|
1219
|
-
props: Po,
|
|
1220
|
-
emits: Ao,
|
|
1221
|
-
setup(o, { emit: a }) {
|
|
1222
|
-
const e = o, n = useSlots(), { HintSlot: s } = pe(e, n), d = ref(), r = ref(), { focused: f } = useComponentFocus(d, a), p = computed(() => String(e.id || ne())), i = ref(""), l = refDebounced(
|
|
1223
|
-
i,
|
|
1892
|
+
}), Xo = ["id"], Yo = ["id", "for"], Jo = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], Qo = {
|
|
1893
|
+
key: 0,
|
|
1894
|
+
class: "vv-select__input-before"
|
|
1895
|
+
}, Zo = { class: "vv-select__inner" }, ea = ["aria-labelledby", "tabindex"], ta = ["aria-label", "onClick"], oa = {
|
|
1896
|
+
key: 1,
|
|
1897
|
+
class: "vv-select__input-after"
|
|
1898
|
+
}, aa = { class: "vv-dropdown-action__hint" }, la = {
|
|
1899
|
+
name: "VvCombobox",
|
|
1900
|
+
components: { VvDropdown: St, VvDropdownItem: Vt }
|
|
1901
|
+
}, ll = /* @__PURE__ */ K({
|
|
1902
|
+
...la,
|
|
1903
|
+
props: Do,
|
|
1904
|
+
emits: Oo,
|
|
1905
|
+
setup(o, { emit: n }) {
|
|
1906
|
+
const e = o, r = useSlots(), { HintSlot: a } = Ve(e, r), c = ref(null), u = ref(null), v = ref(null), { focused: m } = useComponentFocus(c, n), { focused: d } = useFocusWithin(v);
|
|
1907
|
+
watch(m, (_) => {
|
|
1908
|
+
if (e.autoOpen) {
|
|
1909
|
+
if (_ && !p.value) {
|
|
1910
|
+
k();
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
!_ && p.value && !d.value && C();
|
|
1914
|
+
}
|
|
1915
|
+
}), watch(d, (_) => {
|
|
1916
|
+
!m.value && !_ && p.value && C();
|
|
1917
|
+
});
|
|
1918
|
+
const l = ref(""), s = refDebounced(
|
|
1919
|
+
l,
|
|
1224
1920
|
Number(e.debounceSearch)
|
|
1225
|
-
)
|
|
1226
|
-
icon: u,
|
|
1227
|
-
iconPosition: b,
|
|
1228
|
-
modifiers: g,
|
|
1229
|
-
disabled: y,
|
|
1230
|
-
readonly: v,
|
|
1231
|
-
loading: V,
|
|
1232
|
-
valid: w,
|
|
1233
|
-
invalid: $,
|
|
1234
|
-
floating: M
|
|
1235
|
-
} = toRefs(e);
|
|
1921
|
+
);
|
|
1236
1922
|
watch(
|
|
1237
|
-
|
|
1238
|
-
() =>
|
|
1923
|
+
s,
|
|
1924
|
+
() => n("change:search", s.value)
|
|
1239
1925
|
);
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
disabled
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}), ee = computed(
|
|
1256
|
-
() => e.searchable ? ie.value : e.options
|
|
1257
|
-
), { getOptionLabel: te, getOptionValue: Q } = useOptions(e), ie = computed(() => {
|
|
1258
|
-
var A;
|
|
1259
|
-
return (A = e.options) == null ? void 0 : A.filter((L) => te(L).toLowerCase().includes(l.value.toLowerCase().trim()));
|
|
1260
|
-
}), oe = computed(() => {
|
|
1261
|
-
let A = [];
|
|
1262
|
-
return Array.isArray(e.modelValue) ? A = e.modelValue : e.modelValue && (A = [e.modelValue]), e.options.filter(
|
|
1263
|
-
(L) => A.includes(Q(L))
|
|
1264
|
-
);
|
|
1265
|
-
}), se = computed(() => oe.value.map((A) => te(A)).join(e.separator));
|
|
1266
|
-
onClickOutside(d, () => {
|
|
1267
|
-
d.value.open = !1;
|
|
1926
|
+
const p = ref(!1), g = () => {
|
|
1927
|
+
e.disabled || e.readonly || (p.value = !p.value);
|
|
1928
|
+
}, k = () => {
|
|
1929
|
+
e.disabled || e.readonly || p.value || (p.value = !0);
|
|
1930
|
+
}, C = () => {
|
|
1931
|
+
e.disabled || e.readonly || !p.value || (p.value = !1);
|
|
1932
|
+
};
|
|
1933
|
+
watch(p, (_) => {
|
|
1934
|
+
T.value && nextTick(() => {
|
|
1935
|
+
if (_) {
|
|
1936
|
+
u.value && u.value.focus();
|
|
1937
|
+
return;
|
|
1938
|
+
}
|
|
1939
|
+
l.value = "";
|
|
1940
|
+
});
|
|
1268
1941
|
});
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1942
|
+
const {
|
|
1943
|
+
id: b,
|
|
1944
|
+
icon: S,
|
|
1945
|
+
iconPosition: I,
|
|
1946
|
+
modifiers: B,
|
|
1947
|
+
disabled: E,
|
|
1948
|
+
readonly: O,
|
|
1949
|
+
loading: L,
|
|
1950
|
+
valid: q,
|
|
1951
|
+
invalid: Q,
|
|
1952
|
+
floating: P,
|
|
1953
|
+
searchable: T
|
|
1954
|
+
} = toRefs(e), U = useUniqueId(b), te = computed(() => `${U.value}-hint`), re = computed(() => `${U.value}-dropdown`), ie = computed(() => `${U.value}-search`), A = computed(() => `${U.value}-label`), { hasIcon: oe, hasIconBefore: fe, hasIconAfter: se } = useComponentIcon(
|
|
1955
|
+
S,
|
|
1956
|
+
I
|
|
1957
|
+
), be = computed(() => !isEmpty(e.modelValue)), z = computed(() => E.value || O.value ? -1 : e.tabindex), R = useBemModifiers(
|
|
1958
|
+
"vv-select",
|
|
1959
|
+
B,
|
|
1960
|
+
computed(() => ({
|
|
1961
|
+
disabled: E.value,
|
|
1962
|
+
loading: L.value,
|
|
1963
|
+
readonly: O.value,
|
|
1964
|
+
"icon-before": Boolean(fe.value),
|
|
1965
|
+
"icon-after": Boolean(se.value),
|
|
1966
|
+
valid: q.value,
|
|
1967
|
+
invalid: Q.value,
|
|
1968
|
+
dirty: be.value,
|
|
1969
|
+
focus: m.value,
|
|
1970
|
+
floating: P.value
|
|
1971
|
+
}))
|
|
1972
|
+
), X = computed(
|
|
1973
|
+
() => e.searchable ? f.value : e.options
|
|
1974
|
+
), { getOptionLabel: ae, getOptionValue: me, getOptionDisabled: pe } = useOptions(e), f = computed(() => {
|
|
1975
|
+
var _;
|
|
1976
|
+
return (_ = e.options) == null ? void 0 : _.filter((Y) => ae(Y).toLowerCase().includes(s.value.toLowerCase().trim()));
|
|
1977
|
+
});
|
|
1978
|
+
function x(_) {
|
|
1979
|
+
return Array.isArray(e.modelValue) ? contains(_, e.modelValue) || contains(me(_), e.modelValue) : equals(_, e.modelValue) || equals(me(_), e.modelValue);
|
|
1275
1980
|
}
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
multiple
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1981
|
+
const ue = computed(() => {
|
|
1982
|
+
let _ = [];
|
|
1983
|
+
return Array.isArray(e.modelValue) ? _ = e.modelValue : e.modelValue && (_ = [e.modelValue]), e.options.filter(
|
|
1984
|
+
(Y) => _.includes(me(Y))
|
|
1985
|
+
);
|
|
1986
|
+
}), he = computed(() => ue.value.map((_) => ae(_)).join(e.separator));
|
|
1987
|
+
watch(ue, () => {
|
|
1988
|
+
!e.multiple && e.autoClose && C();
|
|
1989
|
+
});
|
|
1990
|
+
const Ne = () => {
|
|
1991
|
+
e.autoOpen ? k() : g();
|
|
1992
|
+
}, Ee = (_) => {
|
|
1993
|
+
var $e;
|
|
1994
|
+
if (e.disabled || e.readonly)
|
|
1995
|
+
return;
|
|
1996
|
+
const Y = me(_);
|
|
1997
|
+
let N = Y;
|
|
1998
|
+
if (e.multiple)
|
|
1999
|
+
if (Array.isArray(e.modelValue)) {
|
|
2000
|
+
if (e.maxValues !== void 0 && e.maxValues >= 0 && (($e = e.modelValue) == null ? void 0 : $e.length) >= e.maxValues && !contains(Y, e.modelValue))
|
|
2001
|
+
return;
|
|
2002
|
+
N = contains(Y, e.modelValue) ? removeFromList(Y, e.modelValue) : [...e.modelValue, Y];
|
|
2003
|
+
} else
|
|
2004
|
+
N = [Y];
|
|
2005
|
+
else
|
|
2006
|
+
e.unselectable && Y === e.modelValue && (N = void 0);
|
|
2007
|
+
n("update:modelValue", N);
|
|
2008
|
+
}, D = computed(() => ({
|
|
2009
|
+
id: U.value,
|
|
1289
2010
|
name: e.name,
|
|
1290
|
-
tabindex:
|
|
1291
|
-
valid:
|
|
2011
|
+
tabindex: z.value,
|
|
2012
|
+
valid: q.value,
|
|
1292
2013
|
validLabel: e.validLabel,
|
|
1293
|
-
invalid:
|
|
2014
|
+
invalid: Q.value,
|
|
1294
2015
|
invalidLabel: e.invalidLabel,
|
|
1295
2016
|
hintLabel: e.hintLabel,
|
|
1296
|
-
loading:
|
|
2017
|
+
loading: L.value,
|
|
1297
2018
|
loadingLabel: e.loadingLabel,
|
|
1298
|
-
disabled:
|
|
1299
|
-
readonly:
|
|
2019
|
+
disabled: E.value,
|
|
2020
|
+
readonly: O.value,
|
|
1300
2021
|
modifiers: e.modifiers,
|
|
1301
|
-
options:
|
|
2022
|
+
options: X.value,
|
|
1302
2023
|
labelKey: e.labelKey,
|
|
1303
2024
|
valueKey: e.valueKey,
|
|
1304
2025
|
icon: e.icon,
|
|
@@ -1309,142 +2030,263 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1309
2030
|
label: e.label,
|
|
1310
2031
|
placeholder: e.placeholder,
|
|
1311
2032
|
modelValue: e.modelValue
|
|
2033
|
+
})), le = computed(() => ({
|
|
2034
|
+
id: re.value,
|
|
2035
|
+
reference: v.value,
|
|
2036
|
+
placement: e.placement,
|
|
2037
|
+
transitionName: e.transitionName,
|
|
2038
|
+
offset: e.offset,
|
|
2039
|
+
shift: e.shift,
|
|
2040
|
+
flip: e.flip,
|
|
2041
|
+
autoPlacement: e.autoPlacement,
|
|
2042
|
+
arrow: e.arrow,
|
|
2043
|
+
autoClose: e.autoClose,
|
|
2044
|
+
autofocusFirst: T.value ? !1 : e.autofocusFirst,
|
|
2045
|
+
triggerWidth: e.triggerWidth,
|
|
2046
|
+
modifiers: e.dropdownModifiers
|
|
2047
|
+
})), we = computed(() => ({
|
|
2048
|
+
valid: e.valid,
|
|
2049
|
+
invalid: e.invalid,
|
|
2050
|
+
modelValue: e.modelValue
|
|
1312
2051
|
}));
|
|
1313
|
-
return (
|
|
1314
|
-
|
|
1315
|
-
}),
|
|
2052
|
+
return onKeyStroke([" ", "Enter"], (_) => {
|
|
2053
|
+
e.autoOpen || !p.value && m.value && (_.preventDefault(), _.stopImmediatePropagation(), g());
|
|
2054
|
+
}), (_, Y) => _.native ? (i(), W(zo, G({ key: 1 }, t(D), {
|
|
2055
|
+
"onUpdate:modelValue": Y[2] || (Y[2] = (N) => n("update:modelValue", N))
|
|
2056
|
+
}), null, 16)) : (i(), y("div", {
|
|
1316
2057
|
key: 0,
|
|
1317
|
-
id: t(
|
|
1318
|
-
class:
|
|
2058
|
+
id: t(U),
|
|
2059
|
+
class: ee(t(R))
|
|
1319
2060
|
}, [
|
|
1320
|
-
|
|
2061
|
+
_.label ? (i(), y("label", {
|
|
1321
2062
|
key: 0,
|
|
1322
|
-
id:
|
|
1323
|
-
for:
|
|
1324
|
-
},
|
|
1325
|
-
|
|
1326
|
-
ref_key: "
|
|
1327
|
-
ref:
|
|
1328
|
-
class: "vv-select__wrapper"
|
|
1329
|
-
onClick: L[2] || (L[2] = (z) => t(y) || t(v) ? z.preventDefault() : null),
|
|
1330
|
-
onKeyup: L[3] || (L[3] = Le((z) => t(d).open = !1, ["esc"])),
|
|
1331
|
-
onToggle: ae
|
|
2063
|
+
id: t(A),
|
|
2064
|
+
for: t(T) ? t(ie) : void 0
|
|
2065
|
+
}, H(_.label), 9, Yo)) : w("", !0),
|
|
2066
|
+
M("div", {
|
|
2067
|
+
ref_key: "wrapperEl",
|
|
2068
|
+
ref: v,
|
|
2069
|
+
class: "vv-select__wrapper"
|
|
1332
2070
|
}, [
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
2071
|
+
de(St, G({
|
|
2072
|
+
modelValue: t(p),
|
|
2073
|
+
"onUpdate:modelValue": Y[1] || (Y[1] = (N) => Ae(p) ? p.value = N : null)
|
|
2074
|
+
}, t(le), { role: "listbox" }), At({
|
|
2075
|
+
default: ce(({ aria: N }) => [
|
|
2076
|
+
_.$slots.before ? (i(), y("div", Qo, [
|
|
2077
|
+
$(_.$slots, "before", F(j(t(we))))
|
|
2078
|
+
])) : w("", !0),
|
|
2079
|
+
M("div", Zo, [
|
|
2080
|
+
t(fe) ? (i(), W(J, G({
|
|
2081
|
+
key: 0,
|
|
2082
|
+
class: "vv-select__icon"
|
|
2083
|
+
}, t(oe)), null, 16)) : w("", !0),
|
|
2084
|
+
M("div", G({
|
|
2085
|
+
ref_key: "inputEl",
|
|
2086
|
+
ref: c
|
|
2087
|
+
}, N, {
|
|
2088
|
+
"aria-labelledby": t(A),
|
|
2089
|
+
class: "vv-select__input",
|
|
2090
|
+
role: "combobox",
|
|
2091
|
+
tabindex: t(z),
|
|
2092
|
+
onClickPassive: Ne
|
|
2093
|
+
}), [
|
|
2094
|
+
$(_.$slots, "value", F(j({ selectedOptions: t(ue), onInput: Ee })), () => [
|
|
2095
|
+
t(he) ? (i(), y(ne, { key: 0 }, [
|
|
2096
|
+
_.badges ? (i(!0), y(ne, { key: 1 }, ke(t(ue), ($e, Ye) => (i(), W(Yt, {
|
|
2097
|
+
key: Ye,
|
|
2098
|
+
modifiers: _.badgeModifiers,
|
|
2099
|
+
class: "vv-select__badge"
|
|
2100
|
+
}, {
|
|
2101
|
+
default: ce(() => [
|
|
2102
|
+
Z(H(t(ae)($e)) + " ", 1),
|
|
2103
|
+
_.unselectable && !t(O) && !t(E) ? (i(), y("button", {
|
|
2104
|
+
key: 0,
|
|
2105
|
+
"aria-label": _.deselectLabel,
|
|
2106
|
+
onClick: st((Ka) => Ee($e), ["stop"])
|
|
2107
|
+
}, [
|
|
2108
|
+
de(J, { name: "close" })
|
|
2109
|
+
], 8, ta)) : w("", !0)
|
|
2110
|
+
]),
|
|
2111
|
+
_: 2
|
|
2112
|
+
}, 1032, ["modifiers"]))), 128)) : (i(), y(ne, { key: 0 }, [
|
|
2113
|
+
Z(H(t(he)), 1)
|
|
2114
|
+
], 64))
|
|
2115
|
+
], 64)) : (i(), y(ne, { key: 1 }, [
|
|
2116
|
+
Z(H(_.placeholder), 1)
|
|
2117
|
+
], 64))
|
|
2118
|
+
])
|
|
2119
|
+
], 16, ea),
|
|
2120
|
+
t(se) ? (i(), W(J, G({
|
|
2121
|
+
key: 1,
|
|
2122
|
+
class: "vv-select__icon vv-select__icon-after"
|
|
2123
|
+
}, t(oe)), null, 16)) : w("", !0)
|
|
2124
|
+
]),
|
|
2125
|
+
_.$slots.after ? (i(), y("div", oa, [
|
|
2126
|
+
$(_.$slots, "after", F(j(t(we))))
|
|
2127
|
+
])) : w("", !0)
|
|
1343
2128
|
]),
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
2129
|
+
items: ce(() => [
|
|
2130
|
+
(i(!0), y(ne, null, ke(t(f), (N, $e) => (i(), W(Vt, {
|
|
2131
|
+
key: $e,
|
|
2132
|
+
class: ee(["vv-dropdown-action", {
|
|
2133
|
+
disabled: t(pe)(N),
|
|
2134
|
+
selected: x(N),
|
|
2135
|
+
"vv-dropdown-action--unselectable": _.unselectable && x(N)
|
|
2136
|
+
}]),
|
|
2137
|
+
tabindex: t(pe)(N) ? -1 : 0,
|
|
2138
|
+
"aria-selected": x(N),
|
|
2139
|
+
"aria-disabled": t(pe)(N),
|
|
2140
|
+
onClickPassive: (Ye) => Ee(N)
|
|
2141
|
+
}, {
|
|
2142
|
+
default: ce(() => [
|
|
2143
|
+
$(_.$slots, "option", F(j({
|
|
2144
|
+
option: N,
|
|
2145
|
+
selectedOptions: t(ue),
|
|
2146
|
+
selected: x(N),
|
|
2147
|
+
disabled: t(pe)(N)
|
|
2148
|
+
})), () => [
|
|
2149
|
+
Z(H(t(ae)(N)) + " ", 1),
|
|
2150
|
+
M("span", aa, [
|
|
2151
|
+
x(N) ? (i(), y(ne, { key: 0 }, [
|
|
2152
|
+
Z(H(_.unselectable ? _.pressToDeselectLabel : _.selectedLabel), 1)
|
|
2153
|
+
], 64)) : t(pe)(N) ? w("", !0) : (i(), y(ne, { key: 1 }, [
|
|
2154
|
+
Z(H(_.pressToSelectLabel), 1)
|
|
2155
|
+
], 64))
|
|
2156
|
+
])
|
|
2157
|
+
])
|
|
2158
|
+
]),
|
|
2159
|
+
_: 2
|
|
2160
|
+
}, 1032, ["tabindex", "class", "aria-selected", "aria-disabled", "onClickPassive"]))), 128))
|
|
2161
|
+
]),
|
|
2162
|
+
_: 2
|
|
2163
|
+
}, [
|
|
2164
|
+
t(T) ? {
|
|
2165
|
+
name: "before",
|
|
2166
|
+
fn: ce(() => [
|
|
2167
|
+
t(T) ? Se((i(), y("input", {
|
|
2168
|
+
key: 0,
|
|
2169
|
+
id: t(ie),
|
|
2170
|
+
ref_key: "inputSearchEl",
|
|
2171
|
+
ref: u,
|
|
2172
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (N) => Ae(l) ? l.value = N : null),
|
|
2173
|
+
"aria-autocomplete": "list",
|
|
2174
|
+
"aria-controls": t(re),
|
|
2175
|
+
"aria-labelledby": t(A),
|
|
2176
|
+
"aria-describedby": t(te),
|
|
2177
|
+
autocomplete: "off",
|
|
2178
|
+
spellcheck: "false",
|
|
2179
|
+
type: "search",
|
|
2180
|
+
class: "vv-dropdown__search",
|
|
2181
|
+
placeholder: _.searchPlaceholder
|
|
2182
|
+
}, null, 8, Jo)), [
|
|
2183
|
+
[je, t(p)],
|
|
2184
|
+
[it, t(l)]
|
|
2185
|
+
]) : w("", !0)
|
|
2186
|
+
]),
|
|
2187
|
+
key: "0"
|
|
2188
|
+
} : void 0
|
|
2189
|
+
]), 1040, ["modelValue"])
|
|
2190
|
+
], 512),
|
|
2191
|
+
de(t(a), {
|
|
2192
|
+
id: t(te),
|
|
2193
|
+
class: "vv-select__hint"
|
|
2194
|
+
}, null, 8, ["id"])
|
|
2195
|
+
], 10, Xo));
|
|
1371
2196
|
}
|
|
1372
|
-
}),
|
|
1373
|
-
|
|
2197
|
+
}), sa = ["open", "close", "update:modelValue"], na = {
|
|
2198
|
+
...Me,
|
|
2199
|
+
/**
|
|
2200
|
+
* Dialog title
|
|
2201
|
+
*/
|
|
1374
2202
|
title: String,
|
|
2203
|
+
/**
|
|
2204
|
+
* Show / hide dialog programmatically
|
|
2205
|
+
*/
|
|
1375
2206
|
modelValue: Boolean,
|
|
2207
|
+
/**
|
|
2208
|
+
* Dialog transition
|
|
2209
|
+
*/
|
|
1376
2210
|
transition: { type: String, default: "fade-block" },
|
|
2211
|
+
/**
|
|
2212
|
+
* Dialog size
|
|
2213
|
+
*/
|
|
1377
2214
|
size: String,
|
|
2215
|
+
/**
|
|
2216
|
+
* Close dialog on click outside
|
|
2217
|
+
*/
|
|
1378
2218
|
autoClose: { type: Boolean, default: !0 }
|
|
1379
|
-
},
|
|
2219
|
+
}, ra = {
|
|
1380
2220
|
key: 0,
|
|
1381
2221
|
class: "vv-dialog__header"
|
|
1382
|
-
},
|
|
2222
|
+
}, ia = { class: "vv-dialog__content" }, ua = {
|
|
1383
2223
|
key: 1,
|
|
1384
2224
|
class: "vv-dialog__footer"
|
|
1385
|
-
},
|
|
2225
|
+
}, da = {
|
|
1386
2226
|
name: "VvDialog"
|
|
1387
|
-
},
|
|
1388
|
-
...
|
|
1389
|
-
props:
|
|
1390
|
-
emits:
|
|
1391
|
-
setup(o, { emit:
|
|
1392
|
-
const e = o,
|
|
1393
|
-
const { id:
|
|
2227
|
+
}, sl = /* @__PURE__ */ K({
|
|
2228
|
+
...da,
|
|
2229
|
+
props: na,
|
|
2230
|
+
emits: sa,
|
|
2231
|
+
setup(o, { emit: n }) {
|
|
2232
|
+
const e = o, r = useVModel(e, "modelValue", n), a = ref(!0), c = ref(null), u = computed(() => {
|
|
2233
|
+
const { id: s } = e;
|
|
1394
2234
|
return {
|
|
1395
|
-
id:
|
|
1396
|
-
open:
|
|
2235
|
+
id: s,
|
|
2236
|
+
open: a.value
|
|
1397
2237
|
};
|
|
1398
|
-
}),
|
|
2238
|
+
}), v = computed(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), m = computed(() => `vv-dialog--${e.transition}`), d = {
|
|
1399
2239
|
"before-enter": () => {
|
|
1400
|
-
|
|
2240
|
+
a.value = !0, n("open");
|
|
1401
2241
|
},
|
|
1402
2242
|
"after-leave": () => {
|
|
1403
|
-
|
|
2243
|
+
a.value = !1, n("close");
|
|
1404
2244
|
}
|
|
1405
2245
|
};
|
|
1406
|
-
onClickOutside(
|
|
1407
|
-
e.autoClose && (
|
|
2246
|
+
onClickOutside(c, () => {
|
|
2247
|
+
e.autoClose && (r.value = !1);
|
|
1408
2248
|
});
|
|
1409
2249
|
function l() {
|
|
1410
|
-
|
|
2250
|
+
r.value = !1;
|
|
1411
2251
|
}
|
|
1412
|
-
return (
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
2252
|
+
return onKeyStroke("Escape", (s) => {
|
|
2253
|
+
r.value && (s.preventDefault(), l());
|
|
2254
|
+
}), (s, p) => (i(), W(rt, G({ name: t(m) }, Ct(d)), {
|
|
2255
|
+
default: ce(() => [
|
|
2256
|
+
Se(M("dialog", G(t(u), { class: t(v) }), [
|
|
2257
|
+
M("article", {
|
|
1416
2258
|
ref_key: "modalWrapper",
|
|
1417
|
-
ref:
|
|
2259
|
+
ref: c,
|
|
1418
2260
|
class: "vv-dialog__wrapper"
|
|
1419
2261
|
}, [
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
2262
|
+
s.$slots.header || s.title ? (i(), y("header", ra, [
|
|
2263
|
+
$(s.$slots, "header", {}, () => [
|
|
2264
|
+
Z(H(s.title) + " ", 1),
|
|
2265
|
+
M("button", {
|
|
1424
2266
|
type: "button",
|
|
1425
2267
|
"aria-label": "Close",
|
|
1426
2268
|
class: "vv-dialog__close",
|
|
1427
|
-
|
|
2269
|
+
onClickPassive: l
|
|
1428
2270
|
}, [
|
|
1429
|
-
|
|
1430
|
-
],
|
|
2271
|
+
de(J, { name: "close" })
|
|
2272
|
+
], 32)
|
|
1431
2273
|
])
|
|
1432
|
-
])) :
|
|
1433
|
-
|
|
1434
|
-
|
|
2274
|
+
])) : w("", !0),
|
|
2275
|
+
M("div", ia, [
|
|
2276
|
+
$(s.$slots, "default")
|
|
1435
2277
|
]),
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
])) :
|
|
2278
|
+
s.$slots.footer ? (i(), y("footer", ua, [
|
|
2279
|
+
$(s.$slots, "footer")
|
|
2280
|
+
])) : w("", !0)
|
|
1439
2281
|
], 512)
|
|
1440
2282
|
], 16), [
|
|
1441
|
-
[
|
|
2283
|
+
[je, t(r)]
|
|
1442
2284
|
])
|
|
1443
2285
|
]),
|
|
1444
2286
|
_: 3
|
|
1445
2287
|
}, 16, ["name"]));
|
|
1446
2288
|
}
|
|
1447
|
-
}),
|
|
2289
|
+
}), V = {
|
|
1448
2290
|
TEXT: "text",
|
|
1449
2291
|
PASSWORD: "password",
|
|
1450
2292
|
NUMBER: "number",
|
|
@@ -1458,61 +2300,121 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1458
2300
|
DATETIME_LOCAL: "datetime-local",
|
|
1459
2301
|
MONTH: "month",
|
|
1460
2302
|
WEEK: "week"
|
|
1461
|
-
},
|
|
2303
|
+
}, _e = {
|
|
1462
2304
|
PASSWORD_SHOW: "eye-on",
|
|
1463
2305
|
PASSWORD_HIDE: "eye-off",
|
|
1464
2306
|
DATE: "calendar",
|
|
1465
2307
|
TIME: "time",
|
|
1466
2308
|
COLOR: "color",
|
|
1467
2309
|
SEARCH: "close"
|
|
1468
|
-
},
|
|
1469
|
-
...
|
|
2310
|
+
}, ca = ["update:modelValue", "focus", "blur", "keyup"], va = {
|
|
2311
|
+
...bt,
|
|
2312
|
+
/**
|
|
2313
|
+
* Input value
|
|
2314
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
2315
|
+
*/
|
|
1470
2316
|
modelValue: [String, Number],
|
|
2317
|
+
/**
|
|
2318
|
+
* Type of form control
|
|
2319
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type
|
|
2320
|
+
*/
|
|
1471
2321
|
type: {
|
|
1472
2322
|
type: String,
|
|
1473
|
-
default:
|
|
1474
|
-
validator: (o) => Object.values(
|
|
2323
|
+
default: V.TEXT,
|
|
2324
|
+
validator: (o) => Object.values(V).includes(o)
|
|
1475
2325
|
},
|
|
2326
|
+
/**
|
|
2327
|
+
* Minimum value
|
|
2328
|
+
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
2329
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
2330
|
+
*/
|
|
1476
2331
|
min: [Number, Date, String],
|
|
2332
|
+
/**
|
|
2333
|
+
* Maximum value
|
|
2334
|
+
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
2335
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
2336
|
+
*/
|
|
1477
2337
|
max: [Number, Date, String],
|
|
2338
|
+
/**
|
|
2339
|
+
* Incremental values that are valid
|
|
2340
|
+
* Available for input types: date, month, week, time, datetime-local and number
|
|
2341
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
2342
|
+
*/
|
|
1478
2343
|
step: { type: [String, Number], default: 1 },
|
|
2344
|
+
/**
|
|
2345
|
+
* Pattern the value must match to be valid
|
|
2346
|
+
* Available for input types: text, search, url, tel, email and password
|
|
2347
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
2348
|
+
*/
|
|
1479
2349
|
pattern: String,
|
|
2350
|
+
/**
|
|
2351
|
+
* Whether to allow multiple values
|
|
2352
|
+
* Available for input type email
|
|
2353
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
2354
|
+
*/
|
|
1480
2355
|
multiple: Boolean,
|
|
2356
|
+
/**
|
|
2357
|
+
* VvIcon name for show password button
|
|
2358
|
+
* @see VVIcon
|
|
2359
|
+
*/
|
|
1481
2360
|
iconShowPassword: {
|
|
1482
2361
|
type: String,
|
|
1483
|
-
default:
|
|
2362
|
+
default: _e.PASSWORD_SHOW
|
|
1484
2363
|
},
|
|
2364
|
+
/**
|
|
2365
|
+
* VvIcon name for hide password button
|
|
2366
|
+
* @see VVIcon
|
|
2367
|
+
*/
|
|
1485
2368
|
iconHidePassword: {
|
|
1486
2369
|
type: String,
|
|
1487
|
-
default:
|
|
2370
|
+
default: _e.PASSWORD_HIDE
|
|
1488
2371
|
},
|
|
2372
|
+
/**
|
|
2373
|
+
* VvIcon name for clear button
|
|
2374
|
+
* @see VVIcon
|
|
2375
|
+
*/
|
|
1489
2376
|
iconClear: {
|
|
1490
2377
|
type: String,
|
|
1491
|
-
default:
|
|
2378
|
+
default: _e.SEARCH
|
|
1492
2379
|
},
|
|
2380
|
+
/**
|
|
2381
|
+
* Label for step up button
|
|
2382
|
+
*/
|
|
1493
2383
|
labelStepUp: {
|
|
1494
2384
|
type: String,
|
|
1495
2385
|
default: "Increase value"
|
|
1496
2386
|
},
|
|
2387
|
+
/**
|
|
2388
|
+
* Label for step down button
|
|
2389
|
+
*/
|
|
1497
2390
|
labelStepDown: {
|
|
1498
2391
|
type: String,
|
|
1499
2392
|
default: "Decrease value"
|
|
1500
2393
|
},
|
|
2394
|
+
/**
|
|
2395
|
+
* Label for show password button
|
|
2396
|
+
*/
|
|
1501
2397
|
labelShowPassword: {
|
|
1502
2398
|
type: String,
|
|
1503
2399
|
default: "Show password"
|
|
1504
2400
|
},
|
|
2401
|
+
/**
|
|
2402
|
+
* Label for hide password button
|
|
2403
|
+
*/
|
|
1505
2404
|
labelHidePassword: {
|
|
1506
2405
|
type: String,
|
|
1507
2406
|
default: "Hide password"
|
|
1508
2407
|
},
|
|
2408
|
+
/**
|
|
2409
|
+
* Label for clear button
|
|
2410
|
+
*/
|
|
1509
2411
|
labelClear: {
|
|
1510
2412
|
type: String,
|
|
1511
2413
|
default: "Clear"
|
|
1512
2414
|
}
|
|
1513
|
-
},
|
|
2415
|
+
}, at = defineComponent({
|
|
1514
2416
|
components: {
|
|
1515
|
-
VvIcon:
|
|
2417
|
+
VvIcon: J
|
|
1516
2418
|
},
|
|
1517
2419
|
props: {
|
|
1518
2420
|
disabled: {
|
|
@@ -1529,29 +2431,29 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1529
2431
|
},
|
|
1530
2432
|
iconShow: {
|
|
1531
2433
|
type: String,
|
|
1532
|
-
default:
|
|
2434
|
+
default: _e.PASSWORD_SHOW
|
|
1533
2435
|
},
|
|
1534
2436
|
iconHide: {
|
|
1535
2437
|
type: String,
|
|
1536
|
-
default:
|
|
2438
|
+
default: _e.PASSWORD_HIDE
|
|
1537
2439
|
}
|
|
1538
2440
|
},
|
|
1539
2441
|
emits: ["toggle-password"],
|
|
1540
|
-
setup(o, { emit:
|
|
1541
|
-
const e = ref(!1),
|
|
2442
|
+
setup(o, { emit: n }) {
|
|
2443
|
+
const e = ref(!1), r = computed(
|
|
1542
2444
|
() => e.value ? o.iconHide : o.iconShow
|
|
1543
2445
|
);
|
|
1544
|
-
function
|
|
1545
|
-
|
|
2446
|
+
function a(c) {
|
|
2447
|
+
c == null || c.stopPropagation(), o.disabled || (e.value = !e.value, n("toggle-password", e.value));
|
|
1546
2448
|
}
|
|
1547
2449
|
return {
|
|
1548
2450
|
active: e,
|
|
1549
|
-
activeIcon:
|
|
1550
|
-
onClick:
|
|
2451
|
+
activeIcon: r,
|
|
2452
|
+
onClick: a
|
|
1551
2453
|
};
|
|
1552
2454
|
},
|
|
1553
2455
|
render() {
|
|
1554
|
-
const o = h(
|
|
2456
|
+
const o = h(J, {
|
|
1555
2457
|
name: this.activeIcon,
|
|
1556
2458
|
class: "vv-input-text__action-icon"
|
|
1557
2459
|
});
|
|
@@ -1567,9 +2469,9 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1567
2469
|
o
|
|
1568
2470
|
);
|
|
1569
2471
|
}
|
|
1570
|
-
}),
|
|
2472
|
+
}), Ge = defineComponent({
|
|
1571
2473
|
components: {
|
|
1572
|
-
VvIcon:
|
|
2474
|
+
VvIcon: J
|
|
1573
2475
|
},
|
|
1574
2476
|
props: {
|
|
1575
2477
|
disabled: {
|
|
@@ -1586,12 +2488,12 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1586
2488
|
}
|
|
1587
2489
|
},
|
|
1588
2490
|
emits: ["step-up", "step-down"],
|
|
1589
|
-
setup(o, { emit:
|
|
2491
|
+
setup(o, { emit: n }) {
|
|
1590
2492
|
const e = computed(() => o.mode === "up");
|
|
1591
2493
|
return {
|
|
1592
2494
|
isUp: e,
|
|
1593
|
-
onClick: (
|
|
1594
|
-
|
|
2495
|
+
onClick: (a) => {
|
|
2496
|
+
a == null || a.stopPropagation(), o.disabled || n(e.value ? "step-up" : "step-down");
|
|
1595
2497
|
}
|
|
1596
2498
|
};
|
|
1597
2499
|
},
|
|
@@ -1606,9 +2508,9 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1606
2508
|
onClick: this.onClick
|
|
1607
2509
|
});
|
|
1608
2510
|
}
|
|
1609
|
-
}),
|
|
2511
|
+
}), lt = defineComponent({
|
|
1610
2512
|
components: {
|
|
1611
|
-
VvIcon:
|
|
2513
|
+
VvIcon: J
|
|
1612
2514
|
},
|
|
1613
2515
|
props: {
|
|
1614
2516
|
disabled: {
|
|
@@ -1625,16 +2527,16 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1625
2527
|
}
|
|
1626
2528
|
},
|
|
1627
2529
|
emits: ["clear"],
|
|
1628
|
-
setup(o, { emit:
|
|
1629
|
-
function e(
|
|
1630
|
-
|
|
2530
|
+
setup(o, { emit: n }) {
|
|
2531
|
+
function e(r) {
|
|
2532
|
+
r == null || r.stopPropagation(), o.disabled || n("clear");
|
|
1631
2533
|
}
|
|
1632
2534
|
return {
|
|
1633
2535
|
onClick: e
|
|
1634
2536
|
};
|
|
1635
2537
|
},
|
|
1636
2538
|
render() {
|
|
1637
|
-
const o = h(
|
|
2539
|
+
const o = h(J, {
|
|
1638
2540
|
name: this.icon,
|
|
1639
2541
|
class: "vv-input-text__action-icon"
|
|
1640
2542
|
});
|
|
@@ -1651,47 +2553,47 @@ const Zt = ["for"], eo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1651
2553
|
);
|
|
1652
2554
|
}
|
|
1653
2555
|
});
|
|
1654
|
-
function
|
|
2556
|
+
function Ue(o, n) {
|
|
1655
2557
|
return {
|
|
1656
2558
|
name: "VvInputTextActions",
|
|
1657
2559
|
components: {
|
|
1658
|
-
VvIcon:
|
|
1659
|
-
VvInputPasswordAction:
|
|
1660
|
-
VvInputStepAction:
|
|
1661
|
-
VvInputClearAction:
|
|
2560
|
+
VvIcon: J,
|
|
2561
|
+
VvInputPasswordAction: at,
|
|
2562
|
+
VvInputStepAction: Ge,
|
|
2563
|
+
VvInputClearAction: lt
|
|
1662
2564
|
},
|
|
1663
2565
|
setup() {
|
|
1664
2566
|
return {
|
|
1665
|
-
isDisabled: computed(() =>
|
|
1666
|
-
labelStepUp:
|
|
1667
|
-
labelStepDown:
|
|
1668
|
-
labelShowPassword:
|
|
1669
|
-
labelHidePassword:
|
|
1670
|
-
labelClear:
|
|
1671
|
-
iconShowPassword:
|
|
1672
|
-
iconHidePassword:
|
|
2567
|
+
isDisabled: computed(() => n.disabled || n.readonly),
|
|
2568
|
+
labelStepUp: n.labelStepUp,
|
|
2569
|
+
labelStepDown: n.labelStepDown,
|
|
2570
|
+
labelShowPassword: n.labelShowPassword,
|
|
2571
|
+
labelHidePassword: n.labelHidePassword,
|
|
2572
|
+
labelClear: n.labelClear,
|
|
2573
|
+
iconShowPassword: n.iconShowPassword,
|
|
2574
|
+
iconHidePassword: n.iconHidePassword
|
|
1673
2575
|
};
|
|
1674
2576
|
},
|
|
1675
2577
|
render() {
|
|
1676
2578
|
let e = null;
|
|
1677
2579
|
switch (o) {
|
|
1678
|
-
case
|
|
1679
|
-
const { onClear:
|
|
2580
|
+
case V.SEARCH: {
|
|
2581
|
+
const { onClear: r } = this.$attrs;
|
|
1680
2582
|
e = [
|
|
1681
|
-
h(
|
|
2583
|
+
h(lt, {
|
|
1682
2584
|
disabled: this.isDisabled,
|
|
1683
2585
|
label: this.labelShowPassword,
|
|
1684
|
-
onClear:
|
|
2586
|
+
onClear: r
|
|
1685
2587
|
})
|
|
1686
2588
|
];
|
|
1687
2589
|
break;
|
|
1688
2590
|
}
|
|
1689
|
-
case
|
|
1690
|
-
const { onTogglePassword:
|
|
2591
|
+
case V.PASSWORD: {
|
|
2592
|
+
const { onTogglePassword: r } = this.$attrs;
|
|
1691
2593
|
e = [
|
|
1692
|
-
h(
|
|
2594
|
+
h(at, {
|
|
1693
2595
|
disabled: this.isDisabled,
|
|
1694
|
-
onTogglePassword:
|
|
2596
|
+
onTogglePassword: r,
|
|
1695
2597
|
labelShow: this.labelShowPassword,
|
|
1696
2598
|
labelHide: this.labelHidePassword,
|
|
1697
2599
|
iconShow: this.iconShowPassword,
|
|
@@ -1700,22 +2602,22 @@ function Ee(o, a) {
|
|
|
1700
2602
|
];
|
|
1701
2603
|
break;
|
|
1702
2604
|
}
|
|
1703
|
-
case
|
|
1704
|
-
const { onStepUp:
|
|
2605
|
+
case V.NUMBER: {
|
|
2606
|
+
const { onStepUp: r, onStepDown: a } = this.$attrs;
|
|
1705
2607
|
e = [
|
|
1706
|
-
h(
|
|
2608
|
+
h(Ge, {
|
|
1707
2609
|
mode: "up",
|
|
1708
|
-
disabled: this.isDisabled ||
|
|
2610
|
+
disabled: this.isDisabled || n.max !== void 0 && n.modelValue === n.max,
|
|
1709
2611
|
label: this.labelStepUp,
|
|
1710
|
-
onStepUp:
|
|
1711
|
-
onStepDown:
|
|
2612
|
+
onStepUp: r,
|
|
2613
|
+
onStepDown: a
|
|
1712
2614
|
}),
|
|
1713
|
-
h(
|
|
2615
|
+
h(Ge, {
|
|
1714
2616
|
mode: "down",
|
|
1715
|
-
disabled: this.isDisabled ||
|
|
2617
|
+
disabled: this.isDisabled || n.min !== void 0 && n.modelValue === n.min,
|
|
1716
2618
|
label: this.labelStepDown,
|
|
1717
|
-
onStepUp:
|
|
1718
|
-
onStepDown:
|
|
2619
|
+
onStepUp: r,
|
|
2620
|
+
onStepDown: a
|
|
1719
2621
|
})
|
|
1720
2622
|
];
|
|
1721
2623
|
break;
|
|
@@ -1725,378 +2627,454 @@ function Ee(o, a) {
|
|
|
1725
2627
|
}
|
|
1726
2628
|
};
|
|
1727
2629
|
}
|
|
1728
|
-
const
|
|
2630
|
+
const pa = ["for"], fa = { class: "vv-input-text__wrapper" }, ma = {
|
|
1729
2631
|
key: 0,
|
|
2632
|
+
class: "vv-input-text__input-before"
|
|
2633
|
+
}, ba = { class: "vv-input-text__inner" }, ha = ["id"], ya = {
|
|
2634
|
+
key: 1,
|
|
2635
|
+
class: "vv-input-text__input-after"
|
|
2636
|
+
}, ga = {
|
|
2637
|
+
key: 2,
|
|
1730
2638
|
class: "vv-input-text__limit"
|
|
1731
|
-
},
|
|
2639
|
+
}, _a = {
|
|
1732
2640
|
name: "VvInputText"
|
|
1733
|
-
},
|
|
1734
|
-
...
|
|
1735
|
-
props:
|
|
1736
|
-
emits:
|
|
1737
|
-
setup(o, { emit:
|
|
1738
|
-
const e = o,
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
2641
|
+
}, nl = /* @__PURE__ */ K({
|
|
2642
|
+
..._a,
|
|
2643
|
+
props: va,
|
|
2644
|
+
emits: ca,
|
|
2645
|
+
setup(o, { emit: n }) {
|
|
2646
|
+
const e = o, r = useSlots(), a = ref(), {
|
|
2647
|
+
id: c,
|
|
2648
|
+
icon: u,
|
|
2649
|
+
iconPosition: v,
|
|
2650
|
+
label: m,
|
|
2651
|
+
modelValue: d,
|
|
2652
|
+
count: l,
|
|
2653
|
+
valid: s,
|
|
2654
|
+
invalid: p,
|
|
2655
|
+
loading: g
|
|
2656
|
+
} = toRefs(e), k = useUniqueId(c), C = computed(() => `${k.value}-hint`), b = computed(
|
|
1748
2657
|
() => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
|
|
1749
|
-
),
|
|
1750
|
-
watch(
|
|
1751
|
-
|
|
2658
|
+
), S = useDebouncedInput(d, n, e.debounce), { focused: I } = useComponentFocus(a, n), B = useElementVisibility(a);
|
|
2659
|
+
watch(B, (D) => {
|
|
2660
|
+
D && e.autofocus && (I.value = !0);
|
|
1752
2661
|
});
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1755
|
-
},
|
|
1756
|
-
() => e.type ===
|
|
1757
|
-
),
|
|
1758
|
-
|
|
1759
|
-
},
|
|
1760
|
-
|
|
1761
|
-
},
|
|
1762
|
-
|
|
1763
|
-
}, {
|
|
1764
|
-
|
|
1765
|
-
|
|
2662
|
+
const E = ref(!1), O = computed(() => e.type === V.PASSWORD), L = () => {
|
|
2663
|
+
E.value = !E.value;
|
|
2664
|
+
}, q = computed(
|
|
2665
|
+
() => e.type === V.TIME || e.type === V.DATETIME_LOCAL || e.type === V.DATE || e.type === V.WEEK || e.type === V.MONTH
|
|
2666
|
+
), Q = computed(() => e.type === V.NUMBER), P = () => {
|
|
2667
|
+
se.value && (a.value.stepUp(), S.value = unref(a).value);
|
|
2668
|
+
}, T = () => {
|
|
2669
|
+
se.value && (a.value.stepDown(), S.value = unref(a).value);
|
|
2670
|
+
}, U = computed(() => e.type === V.SEARCH), te = () => {
|
|
2671
|
+
S.value = void 0;
|
|
2672
|
+
}, { hasIcon: re, hasIconBefore: ie, hasIconAfter: A } = useComponentIcon(
|
|
2673
|
+
u,
|
|
2674
|
+
v
|
|
1766
2675
|
), oe = computed(() => {
|
|
1767
2676
|
switch (e.type) {
|
|
1768
|
-
case
|
|
1769
|
-
return { name:
|
|
1770
|
-
case
|
|
1771
|
-
case
|
|
1772
|
-
case
|
|
1773
|
-
case
|
|
1774
|
-
return { name:
|
|
1775
|
-
case
|
|
1776
|
-
return { name:
|
|
2677
|
+
case V.COLOR:
|
|
2678
|
+
return { name: _e.COLOR };
|
|
2679
|
+
case V.DATE:
|
|
2680
|
+
case V.DATETIME_LOCAL:
|
|
2681
|
+
case V.WEEK:
|
|
2682
|
+
case V.MONTH:
|
|
2683
|
+
return { name: _e.DATE };
|
|
2684
|
+
case V.TIME:
|
|
2685
|
+
return { name: _e.TIME };
|
|
1777
2686
|
default:
|
|
1778
2687
|
return "";
|
|
1779
2688
|
}
|
|
1780
|
-
}), { formatted:
|
|
2689
|
+
}), { formatted: fe } = useTextCount(S, {
|
|
1781
2690
|
mode: e.count,
|
|
1782
2691
|
upperLimit: e.maxlength,
|
|
1783
2692
|
lowerLimit: e.minlength
|
|
1784
|
-
}),
|
|
1785
|
-
() =>
|
|
1786
|
-
),
|
|
1787
|
-
if (
|
|
2693
|
+
}), se = computed(() => !e.disabled && !e.readonly), be = computed(
|
|
2694
|
+
() => se.value ? e.tabindex : -1
|
|
2695
|
+
), z = computed(() => !isEmpty(d)), R = computed(() => {
|
|
2696
|
+
if (p.value === !0)
|
|
1788
2697
|
return !0;
|
|
1789
|
-
if (
|
|
2698
|
+
if (s.value === !0)
|
|
1790
2699
|
return !1;
|
|
1791
|
-
}), {
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
2700
|
+
}), { modifiers: X } = toRefs(e), ae = useBemModifiers(
|
|
2701
|
+
"vv-input-text",
|
|
2702
|
+
X,
|
|
2703
|
+
computed(() => ({
|
|
2704
|
+
valid: s.value,
|
|
2705
|
+
invalid: p.value,
|
|
2706
|
+
loading: g.value,
|
|
2707
|
+
disabled: e.disabled,
|
|
2708
|
+
readonly: e.readonly,
|
|
2709
|
+
"icon-before": ie.value,
|
|
2710
|
+
"icon-after": A.value || !isEmpty(oe),
|
|
2711
|
+
floating: e.floating && !isEmpty(e.label),
|
|
2712
|
+
dirty: z.value,
|
|
2713
|
+
focus: I.value
|
|
2714
|
+
}))
|
|
2715
|
+
), me = computed(() => {
|
|
2716
|
+
const D = (() => O.value && E.value || q.value && !z.value && !I.value ? V.TEXT : e.type)(), le = {
|
|
2717
|
+
type: D,
|
|
1806
2718
|
name: e.name,
|
|
1807
|
-
tabindex:
|
|
2719
|
+
tabindex: be.value,
|
|
1808
2720
|
disabled: e.disabled,
|
|
1809
2721
|
readonly: e.readonly,
|
|
1810
2722
|
required: e.required,
|
|
1811
2723
|
autocomplete: e.autocomplete,
|
|
1812
|
-
"aria-invalid":
|
|
1813
|
-
"aria-describedby": !
|
|
1814
|
-
"aria-errormessage":
|
|
2724
|
+
"aria-invalid": R.value,
|
|
2725
|
+
"aria-describedby": !ue.value && x.value ? C.value : void 0,
|
|
2726
|
+
"aria-errormessage": ue.value ? C.value : void 0
|
|
1815
2727
|
};
|
|
1816
|
-
return (
|
|
1817
|
-
}),
|
|
2728
|
+
return (D === V.DATE || D === V.MONTH || D === V.WEEK || D === V.TIME || D === V.DATETIME_LOCAL || D === V.NUMBER) && (le.step = e.step, le.max = String(e.max), le.min = String(e.min)), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD || D === V.NUMBER) && (le.placeholder = b.value), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD) && (le.minlength = e.minlength, le.maxlength = e.maxlength, le.pattern = e.pattern), D === V.EMAIL && (le.multiple = e.multiple), le;
|
|
2729
|
+
}), pe = computed(() => ({
|
|
1818
2730
|
valid: e.valid,
|
|
1819
2731
|
invalid: e.invalid,
|
|
1820
2732
|
modelValue: e.modelValue,
|
|
1821
|
-
togglePassword:
|
|
1822
|
-
stepUp:
|
|
1823
|
-
stepDown:
|
|
1824
|
-
clear:
|
|
1825
|
-
})), { HintSlot:
|
|
1826
|
-
|
|
2733
|
+
togglePassword: L,
|
|
2734
|
+
stepUp: P,
|
|
2735
|
+
stepDown: T,
|
|
2736
|
+
clear: te
|
|
2737
|
+
})), { HintSlot: f, hasHint: x, hasInvalid: ue } = Ve(e, r), he = Ue(
|
|
2738
|
+
V.PASSWORD,
|
|
1827
2739
|
e
|
|
1828
|
-
),
|
|
1829
|
-
|
|
2740
|
+
), Ne = Ue(
|
|
2741
|
+
V.NUMBER,
|
|
1830
2742
|
e
|
|
1831
|
-
),
|
|
1832
|
-
|
|
2743
|
+
), Ee = Ue(
|
|
2744
|
+
V.SEARCH,
|
|
1833
2745
|
e
|
|
1834
2746
|
);
|
|
1835
|
-
return (
|
|
1836
|
-
class:
|
|
2747
|
+
return (D, le) => (i(), y("div", {
|
|
2748
|
+
class: ee(t(ae))
|
|
1837
2749
|
}, [
|
|
1838
|
-
t(
|
|
2750
|
+
t(m) ? (i(), y("label", {
|
|
1839
2751
|
key: 0,
|
|
1840
|
-
for: t(
|
|
2752
|
+
for: t(k),
|
|
1841
2753
|
class: "vv-input-text__label"
|
|
1842
|
-
},
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
2754
|
+
}, H(t(m)), 9, pa)) : w("", !0),
|
|
2755
|
+
M("div", fa, [
|
|
2756
|
+
D.$slots.before ? (i(), y("div", ma, [
|
|
2757
|
+
$(D.$slots, "before", F(j(t(pe))))
|
|
2758
|
+
])) : w("", !0),
|
|
2759
|
+
M("div", ba, [
|
|
2760
|
+
t(ie) ? (i(), W(J, G({
|
|
1846
2761
|
key: 0,
|
|
1847
|
-
class: "vv-input-text__icon
|
|
1848
|
-
}, t(
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
k(E.$slots, "after", F(Y(t(z))), () => [
|
|
1861
|
-
t(Q) || t(oe) ? (m(), D(G, F(O({ key: 0 }, t(Q) ? t(ie) : t(oe))), null, 16)) : t(M) ? (m(), D(t(ot), {
|
|
2762
|
+
class: "vv-input-text__icon"
|
|
2763
|
+
}, t(re)), null, 16)) : w("", !0),
|
|
2764
|
+
Se(M("input", G({
|
|
2765
|
+
id: t(k),
|
|
2766
|
+
ref_key: "input",
|
|
2767
|
+
ref: a,
|
|
2768
|
+
"onUpdate:modelValue": le[0] || (le[0] = (we) => Ae(S) ? S.value = we : null)
|
|
2769
|
+
}, t(me), {
|
|
2770
|
+
onKeyup: le[1] || (le[1] = (we) => n("keyup", we))
|
|
2771
|
+
}), null, 16, ha), [
|
|
2772
|
+
[wt, t(S)]
|
|
2773
|
+
]),
|
|
2774
|
+
t(A) || t(oe) ? (i(), W(J, G({
|
|
1862
2775
|
key: 1,
|
|
1863
|
-
|
|
1864
|
-
})) : t(
|
|
2776
|
+
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
2777
|
+
}, t(A) ? t(re) : t(oe)), null, 16)) : t(O) ? (i(), W(t(he), {
|
|
1865
2778
|
key: 2,
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
})) : t(J) ? (m(), D(t(at), {
|
|
2779
|
+
onTogglePassword: L
|
|
2780
|
+
})) : t(Q) ? (i(), W(t(Ne), {
|
|
1869
2781
|
key: 3,
|
|
1870
|
-
|
|
1871
|
-
|
|
2782
|
+
onStepUp: P,
|
|
2783
|
+
onStepDown: T
|
|
2784
|
+
})) : t(U) ? (i(), W(t(Ee), {
|
|
2785
|
+
key: 4,
|
|
2786
|
+
onClear: te
|
|
2787
|
+
})) : w("", !0)
|
|
1872
2788
|
]),
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
2789
|
+
D.$slots.after ? (i(), y("div", ya, [
|
|
2790
|
+
$(D.$slots, "after", F(j(t(pe))))
|
|
2791
|
+
])) : w("", !0),
|
|
2792
|
+
t(l) ? (i(), y("span", ga, [
|
|
2793
|
+
$(D.$slots, "count", F(j(t(pe))), () => [
|
|
2794
|
+
Z(H(t(fe)), 1)
|
|
1876
2795
|
])
|
|
1877
|
-
])) :
|
|
2796
|
+
])) : w("", !0)
|
|
1878
2797
|
]),
|
|
1879
|
-
|
|
1880
|
-
id: t(
|
|
2798
|
+
de(t(f), {
|
|
2799
|
+
id: t(C),
|
|
1881
2800
|
class: "vv-input-text__hint"
|
|
1882
2801
|
}, null, 8, ["id"])
|
|
1883
2802
|
], 2));
|
|
1884
2803
|
}
|
|
1885
|
-
}),
|
|
1886
|
-
...
|
|
2804
|
+
}), Sa = {
|
|
2805
|
+
...ve,
|
|
2806
|
+
/**
|
|
2807
|
+
* Progress value
|
|
2808
|
+
* This attribute specifies how much of the task that has been completed.
|
|
2809
|
+
* It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted.
|
|
2810
|
+
* If there is no value attribute, the progress bar is indeterminate.
|
|
2811
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
2812
|
+
*/
|
|
1887
2813
|
value: {
|
|
1888
2814
|
type: [Number, String],
|
|
1889
2815
|
default: void 0
|
|
1890
2816
|
},
|
|
2817
|
+
/**
|
|
2818
|
+
* Progress max
|
|
2819
|
+
* This attribute describes how much work the task indicated by the progress element requires.
|
|
2820
|
+
* The max attribute, if present, must have a value greater than 0 and be a valid floating point number. The default value is 1.
|
|
2821
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
2822
|
+
*/
|
|
1891
2823
|
max: {
|
|
1892
2824
|
type: [Number, String]
|
|
1893
2825
|
},
|
|
2826
|
+
/**
|
|
2827
|
+
* Progress aria-label
|
|
2828
|
+
*/
|
|
1894
2829
|
label: {
|
|
1895
2830
|
type: String,
|
|
1896
2831
|
required: !0
|
|
1897
2832
|
}
|
|
1898
|
-
},
|
|
2833
|
+
}, Va = {
|
|
1899
2834
|
name: "VvProgress"
|
|
1900
|
-
},
|
|
1901
|
-
...
|
|
1902
|
-
props:
|
|
2835
|
+
}, rl = /* @__PURE__ */ K({
|
|
2836
|
+
...Va,
|
|
2837
|
+
props: Sa,
|
|
1903
2838
|
setup(o) {
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
2839
|
+
const n = o, { value: e, max: r, label: a } = toRefs(n), c = computed(() => n.value === void 0), { modifiers: u } = toRefs(n), v = useBemModifiers(
|
|
2840
|
+
"vv-progress",
|
|
2841
|
+
u,
|
|
2842
|
+
computed(() => ({ indeterminate: c.value }))
|
|
2843
|
+
);
|
|
2844
|
+
return (m, d) => (i(), y("progress", G({ role: "progressbar" }, {
|
|
2845
|
+
class: t(v),
|
|
2846
|
+
ariaLabel: t(a),
|
|
2847
|
+
max: t(r),
|
|
1912
2848
|
value: t(e)
|
|
1913
2849
|
}), null, 16));
|
|
1914
2850
|
}
|
|
1915
|
-
}),
|
|
1916
|
-
function
|
|
1917
|
-
const {
|
|
2851
|
+
}), $a = ht, ka = ["click", "update:modelValue", "change", "blur"];
|
|
2852
|
+
function Aa(o, n) {
|
|
2853
|
+
const { id: e } = toRefs(o), { group: r, isInGroup: a, getGroupOrLocalRef: c } = useInjectedGroupState(ct), u = c("modelValue", o, n), v = c("readonly", o), m = c("disabled", o), d = c("valid", o), l = c("invalid", o);
|
|
1918
2854
|
return {
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
2855
|
+
// local props
|
|
2856
|
+
id: e,
|
|
2857
|
+
// global props
|
|
2858
|
+
group: r,
|
|
2859
|
+
isInGroup: a,
|
|
2860
|
+
modelValue: u,
|
|
2861
|
+
readonly: v,
|
|
2862
|
+
disabled: m,
|
|
2863
|
+
valid: d,
|
|
2864
|
+
invalid: l
|
|
1926
2865
|
};
|
|
1927
2866
|
}
|
|
1928
|
-
const
|
|
2867
|
+
const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ea = {
|
|
1929
2868
|
name: "VvRadio"
|
|
1930
|
-
},
|
|
1931
|
-
...
|
|
1932
|
-
props:
|
|
1933
|
-
emits:
|
|
1934
|
-
setup(o, { emit:
|
|
1935
|
-
const e = o,
|
|
1936
|
-
|
|
1937
|
-
a
|
|
1938
|
-
), i = computed(() => String(e.id || ne())), l = computed(() => u.value ? -1 : e.tabindex), c = ref(), u = computed(() => s.value || d.value), b = computed(() => {
|
|
1939
|
-
if (p.value === !0)
|
|
2869
|
+
}, Ia = /* @__PURE__ */ K({
|
|
2870
|
+
...Ea,
|
|
2871
|
+
props: $a,
|
|
2872
|
+
emits: ka,
|
|
2873
|
+
setup(o, { emit: n }) {
|
|
2874
|
+
const e = o, r = useSlots(), { id: a, disabled: c, readonly: u, modelValue: v, valid: m, invalid: d } = Aa(e, n), l = useUniqueId(a), s = computed(() => g.value ? -1 : e.tabindex), p = ref(), g = computed(() => c.value || u.value), k = computed(() => {
|
|
2875
|
+
if (d.value === !0)
|
|
1940
2876
|
return !0;
|
|
1941
|
-
if (
|
|
2877
|
+
if (m.value === !0)
|
|
1942
2878
|
return !1;
|
|
1943
|
-
}),
|
|
1944
|
-
() => Array.isArray(
|
|
1945
|
-
),
|
|
2879
|
+
}), C = computed(
|
|
2880
|
+
() => Array.isArray(v.value) ? contains(e.value, v.value) : equals(e.value, v.value)
|
|
2881
|
+
), b = computed(
|
|
1946
2882
|
() => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
|
|
1947
|
-
),
|
|
2883
|
+
), S = computed({
|
|
1948
2884
|
get() {
|
|
1949
|
-
return
|
|
2885
|
+
return C.value ? b.value : null;
|
|
1950
2886
|
},
|
|
1951
|
-
set(
|
|
1952
|
-
Array.isArray(
|
|
2887
|
+
set(O) {
|
|
2888
|
+
Array.isArray(v.value) ? v.value = [e.value] : v.value = e.value, n("change", O);
|
|
1953
2889
|
}
|
|
1954
|
-
}), {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
2890
|
+
}), { modifiers: I } = toRefs(e), B = useBemModifiers(
|
|
2891
|
+
"vv-radio",
|
|
2892
|
+
I,
|
|
2893
|
+
computed(() => ({
|
|
2894
|
+
valid: m.value,
|
|
2895
|
+
invalid: d.value,
|
|
2896
|
+
disabled: c.value,
|
|
2897
|
+
readonly: u.value
|
|
2898
|
+
}))
|
|
2899
|
+
), { HintSlot: E } = Ve(e, r);
|
|
2900
|
+
return (O, L) => (i(), y("label", {
|
|
2901
|
+
class: ee(t(B)),
|
|
2902
|
+
for: t(l)
|
|
1963
2903
|
}, [
|
|
1964
|
-
|
|
1965
|
-
id: t(
|
|
2904
|
+
Se(M("input", {
|
|
2905
|
+
id: t(l),
|
|
1966
2906
|
ref_key: "input",
|
|
1967
|
-
ref:
|
|
1968
|
-
"onUpdate:modelValue":
|
|
2907
|
+
ref: p,
|
|
2908
|
+
"onUpdate:modelValue": L[0] || (L[0] = (q) => Ae(S) ? S.value = q : null),
|
|
1969
2909
|
type: "radio",
|
|
1970
2910
|
class: "vv-radio__input",
|
|
1971
|
-
name:
|
|
1972
|
-
disabled: t(
|
|
1973
|
-
value: t(
|
|
1974
|
-
tabindex: t(
|
|
1975
|
-
"aria-invalid": t(
|
|
1976
|
-
}, null, 8,
|
|
1977
|
-
[
|
|
2911
|
+
name: O.name,
|
|
2912
|
+
disabled: t(g),
|
|
2913
|
+
value: t(b),
|
|
2914
|
+
tabindex: t(s),
|
|
2915
|
+
"aria-invalid": t(k)
|
|
2916
|
+
}, null, 8, wa), [
|
|
2917
|
+
[Et, t(S)]
|
|
1978
2918
|
]),
|
|
1979
|
-
|
|
1980
|
-
|
|
2919
|
+
$(O.$slots, "default", { value: t(v) }, () => [
|
|
2920
|
+
Z(H(O.label), 1)
|
|
1981
2921
|
]),
|
|
1982
|
-
|
|
2922
|
+
de(t(E), {
|
|
1983
2923
|
class: "vv-radio__hint",
|
|
1984
|
-
params: { value: t(
|
|
2924
|
+
params: { value: t(v) }
|
|
1985
2925
|
}, null, 8, ["params"])
|
|
1986
|
-
], 10,
|
|
2926
|
+
], 10, Ca));
|
|
1987
2927
|
}
|
|
1988
|
-
}),
|
|
2928
|
+
}), Pa = yt, Oa = ["update:modelValue", "change"], Da = ["textContent"], Ba = { class: "vv-radio-group__wrapper" }, Ra = {
|
|
1989
2929
|
name: "VvRadioGroup"
|
|
1990
|
-
},
|
|
1991
|
-
...
|
|
1992
|
-
props:
|
|
1993
|
-
emits:
|
|
1994
|
-
setup(o, { emit:
|
|
1995
|
-
const e = o,
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
const { getOptionLabel:
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2930
|
+
}, il = /* @__PURE__ */ K({
|
|
2931
|
+
...Ra,
|
|
2932
|
+
props: Pa,
|
|
2933
|
+
emits: Oa,
|
|
2934
|
+
setup(o, { emit: n }) {
|
|
2935
|
+
const e = o, r = useSlots(), a = useVModel(e, "modelValue", n), { disabled: c, readonly: u, vertical: v, valid: m, invalid: d, modifiers: l } = toRefs(e);
|
|
2936
|
+
useProvideGroupState({
|
|
2937
|
+
key: ct,
|
|
2938
|
+
modelValue: a,
|
|
2939
|
+
disabled: c,
|
|
2940
|
+
readonly: u,
|
|
2941
|
+
valid: m,
|
|
2942
|
+
invalid: d
|
|
2943
|
+
});
|
|
2944
|
+
const { getOptionLabel: s, getOptionValue: p } = useOptions(e), g = useBemModifiers(
|
|
2945
|
+
"vv-radio-group",
|
|
2946
|
+
l,
|
|
2947
|
+
computed(() => ({
|
|
2948
|
+
disabled: c.value,
|
|
2949
|
+
readonly: u.value,
|
|
2950
|
+
horizontal: !v.value,
|
|
2951
|
+
valid: m.value,
|
|
2952
|
+
invalid: d.value
|
|
2953
|
+
}))
|
|
2954
|
+
), k = (b, S) => ({
|
|
2955
|
+
id: `${e.name}_opt${S}`,
|
|
2012
2956
|
name: e.name,
|
|
2013
|
-
label:
|
|
2014
|
-
value:
|
|
2015
|
-
}), { HintSlot:
|
|
2016
|
-
return (
|
|
2017
|
-
class:
|
|
2957
|
+
label: s(b),
|
|
2958
|
+
value: p(b)
|
|
2959
|
+
}), { HintSlot: C } = Ve(e, r);
|
|
2960
|
+
return (b, S) => (i(), y("fieldset", {
|
|
2961
|
+
class: ee(t(g))
|
|
2018
2962
|
}, [
|
|
2019
|
-
|
|
2963
|
+
b.label ? (i(), y("legend", {
|
|
2020
2964
|
key: 0,
|
|
2021
|
-
textContent:
|
|
2022
|
-
}, null, 8,
|
|
2023
|
-
|
|
2024
|
-
|
|
2965
|
+
textContent: H(b.label)
|
|
2966
|
+
}, null, 8, Da)) : w("", !0),
|
|
2967
|
+
M("div", Ba, [
|
|
2968
|
+
b.options.length > 0 ? (i(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (i(), W(Ia, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
|
|
2025
2969
|
]),
|
|
2026
|
-
|
|
2970
|
+
de(t(C), { class: "vv-radio-group__hint" })
|
|
2027
2971
|
], 2));
|
|
2028
2972
|
}
|
|
2029
|
-
}),
|
|
2973
|
+
}), Ta = {
|
|
2030
2974
|
hard: "hard",
|
|
2031
2975
|
soft: "soft"
|
|
2032
|
-
},
|
|
2976
|
+
}, xa = {
|
|
2033
2977
|
true: !0,
|
|
2034
2978
|
false: !1,
|
|
2035
2979
|
default: "default"
|
|
2036
|
-
},
|
|
2037
|
-
...
|
|
2980
|
+
}, Ma = ["update:modelValue", "focus", "blur", "keyup"], La = {
|
|
2981
|
+
...bt,
|
|
2982
|
+
/**
|
|
2983
|
+
* Textarea value
|
|
2984
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
|
|
2985
|
+
*/
|
|
2038
2986
|
modelValue: String,
|
|
2987
|
+
/**
|
|
2988
|
+
* The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
|
|
2989
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
|
|
2990
|
+
*/
|
|
2039
2991
|
cols: { type: [String, Number], default: 20 },
|
|
2992
|
+
/**
|
|
2993
|
+
* The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
|
|
2994
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
|
|
2995
|
+
*/
|
|
2040
2996
|
rows: { type: [String, Number], default: 2 },
|
|
2041
|
-
|
|
2042
|
-
|
|
2997
|
+
/**
|
|
2998
|
+
* Indicates how the control should wrap the value for form submission.
|
|
2999
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3000
|
+
*/
|
|
3001
|
+
wrap: { type: String, default: Ta.soft },
|
|
3002
|
+
/**
|
|
3003
|
+
* Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
|
|
3004
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3005
|
+
*/
|
|
3006
|
+
spellcheck: { type: [Boolean, String], default: xa.default },
|
|
3007
|
+
/**
|
|
3008
|
+
* If true, the textarea will be resizable
|
|
3009
|
+
*/
|
|
2043
3010
|
resizable: Boolean
|
|
2044
|
-
},
|
|
3011
|
+
}, Na = ["for"], Ha = { class: "vv-textarea__wrapper" }, Ga = {
|
|
2045
3012
|
key: 0,
|
|
3013
|
+
class: "vv-textarea__input-before"
|
|
3014
|
+
}, Ua = { class: "vv-textarea__inner" }, Wa = ["id"], Fa = {
|
|
3015
|
+
key: 1,
|
|
3016
|
+
class: "vv-textarea__input-after"
|
|
3017
|
+
}, ja = {
|
|
3018
|
+
key: 2,
|
|
2046
3019
|
class: "vv-textarea__limit"
|
|
2047
|
-
},
|
|
3020
|
+
}, qa = {
|
|
2048
3021
|
name: "VvTextarea"
|
|
2049
|
-
},
|
|
2050
|
-
...
|
|
2051
|
-
props:
|
|
2052
|
-
emits:
|
|
2053
|
-
setup(o, { emit:
|
|
2054
|
-
const e = o,
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
3022
|
+
}, ul = /* @__PURE__ */ K({
|
|
3023
|
+
...qa,
|
|
3024
|
+
props: La,
|
|
3025
|
+
emits: Ma,
|
|
3026
|
+
setup(o, { emit: n }) {
|
|
3027
|
+
const e = o, r = useSlots(), a = ref(), {
|
|
3028
|
+
id: c,
|
|
3029
|
+
icon: u,
|
|
3030
|
+
iconPosition: v,
|
|
3031
|
+
label: m,
|
|
3032
|
+
modelValue: d,
|
|
3033
|
+
count: l,
|
|
3034
|
+
valid: s,
|
|
3035
|
+
invalid: p,
|
|
3036
|
+
loading: g,
|
|
3037
|
+
modifiers: k
|
|
3038
|
+
} = toRefs(e), C = useUniqueId(c), b = computed(() => `${C.value}-hint`), S = computed(
|
|
2064
3039
|
() => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
|
|
2065
|
-
),
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
), { focused:
|
|
2069
|
-
watch(
|
|
2070
|
-
|
|
3040
|
+
), I = useDebouncedInput(d, n, e.debounce), { hasIcon: B, hasIconBefore: E, hasIconAfter: O } = useComponentIcon(
|
|
3041
|
+
u,
|
|
3042
|
+
v
|
|
3043
|
+
), { focused: L } = useComponentFocus(a, n), q = useElementVisibility(a);
|
|
3044
|
+
watch(q, (z) => {
|
|
3045
|
+
z && e.autofocus && (L.value = !0);
|
|
2071
3046
|
});
|
|
2072
|
-
const { formatted:
|
|
3047
|
+
const { formatted: Q } = useTextCount(I, {
|
|
2073
3048
|
mode: e.count,
|
|
2074
3049
|
upperLimit: e.maxlength,
|
|
2075
3050
|
lowerLimit: e.minlength
|
|
2076
|
-
}),
|
|
2077
|
-
() =>
|
|
2078
|
-
),
|
|
3051
|
+
}), P = computed(() => !e.disabled && !e.readonly), T = computed(
|
|
3052
|
+
() => P.value ? e.tabindex : -1
|
|
3053
|
+
), U = computed(() => !isEmpty(d)), te = computed(() => {
|
|
2079
3054
|
if (e.invalid === !0)
|
|
2080
3055
|
return !0;
|
|
2081
3056
|
if (e.valid === !0)
|
|
2082
3057
|
return !1;
|
|
2083
|
-
}), { HintSlot:
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
3058
|
+
}), { HintSlot: re, hasHint: ie, hasInvalid: A } = Ve(e, r), oe = useBemModifiers(
|
|
3059
|
+
"vv-textarea",
|
|
3060
|
+
k,
|
|
3061
|
+
computed(() => ({
|
|
3062
|
+
valid: s.value,
|
|
3063
|
+
invalid: p.value,
|
|
3064
|
+
loading: g.value,
|
|
3065
|
+
disabled: e.disabled,
|
|
3066
|
+
readonly: e.readonly,
|
|
3067
|
+
"icon-before": E.value,
|
|
3068
|
+
"icon-after": O.value,
|
|
3069
|
+
floating: e.floating && !isEmpty(e.label),
|
|
3070
|
+
dirty: U.value,
|
|
3071
|
+
focused: L.value,
|
|
3072
|
+
resizable: e.resizable
|
|
3073
|
+
}))
|
|
3074
|
+
), fe = computed(
|
|
2097
3075
|
() => ({
|
|
2098
3076
|
name: e.name,
|
|
2099
|
-
placeholder:
|
|
3077
|
+
placeholder: S.value,
|
|
2100
3078
|
tabindex: T.value,
|
|
2101
3079
|
disabled: e.disabled,
|
|
2102
3080
|
readonly: e.readonly,
|
|
@@ -2108,9 +3086,9 @@ const Qo = ["for"], Zo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2108
3086
|
rows: e.rows,
|
|
2109
3087
|
wrap: e.wrap,
|
|
2110
3088
|
spellcheck: e.spellcheck,
|
|
2111
|
-
"aria-invalid":
|
|
2112
|
-
"aria-describedby": !
|
|
2113
|
-
"aria-errormessage":
|
|
3089
|
+
"aria-invalid": te.value,
|
|
3090
|
+
"aria-describedby": !A.value && ie.value ? b.value : void 0,
|
|
3091
|
+
"aria-errormessage": A.value ? b.value : void 0
|
|
2114
3092
|
})
|
|
2115
3093
|
), se = computed(() => ({
|
|
2116
3094
|
valid: e.valid,
|
|
@@ -2119,69 +3097,76 @@ const Qo = ["for"], Zo = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2119
3097
|
hintLabel: e.hintLabel,
|
|
2120
3098
|
maxlength: e.maxlength,
|
|
2121
3099
|
minlength: e.minlength,
|
|
2122
|
-
clear:
|
|
2123
|
-
})),
|
|
2124
|
-
|
|
3100
|
+
clear: be
|
|
3101
|
+
})), be = () => {
|
|
3102
|
+
I.value = void 0;
|
|
2125
3103
|
};
|
|
2126
|
-
return (
|
|
2127
|
-
class:
|
|
3104
|
+
return (z, R) => (i(), y("div", {
|
|
3105
|
+
class: ee(t(oe))
|
|
2128
3106
|
}, [
|
|
2129
|
-
t(
|
|
3107
|
+
t(m) ? (i(), y("label", {
|
|
2130
3108
|
key: 0,
|
|
2131
|
-
for: t(
|
|
3109
|
+
for: t(C),
|
|
2132
3110
|
class: "vv-textarea__label"
|
|
2133
|
-
},
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
3111
|
+
}, H(t(m)), 9, Na)) : w("", !0),
|
|
3112
|
+
M("div", Ha, [
|
|
3113
|
+
z.$slots.before ? (i(), y("div", Ga, [
|
|
3114
|
+
$(z.$slots, "before", F(j(t(se))))
|
|
3115
|
+
])) : w("", !0),
|
|
3116
|
+
M("div", Ua, [
|
|
3117
|
+
t(E) ? (i(), W(J, G({
|
|
2137
3118
|
key: 0,
|
|
2138
|
-
class: "vv-textarea__icon
|
|
2139
|
-
}, t(
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
3119
|
+
class: "vv-textarea__icon"
|
|
3120
|
+
}, t(B)), null, 16)) : w("", !0),
|
|
3121
|
+
Se(M("textarea", G({
|
|
3122
|
+
id: t(C),
|
|
3123
|
+
ref_key: "textarea",
|
|
3124
|
+
ref: a,
|
|
3125
|
+
"onUpdate:modelValue": R[0] || (R[0] = (X) => Ae(I) ? I.value = X : null)
|
|
3126
|
+
}, t(fe), {
|
|
3127
|
+
onKeyup: R[1] || (R[1] = (X) => n("keyup", X))
|
|
3128
|
+
}), null, 16, Wa), [
|
|
3129
|
+
[it, t(I)]
|
|
3130
|
+
]),
|
|
3131
|
+
t(O) ? (i(), W(J, G({
|
|
3132
|
+
key: 1,
|
|
3133
|
+
class: "vv-textarea__icon vv-textarea__icon-after"
|
|
3134
|
+
}, t(B)), null, 16)) : w("", !0)
|
|
2153
3135
|
]),
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
3136
|
+
z.$slots.after ? (i(), y("div", Fa, [
|
|
3137
|
+
$(z.$slots, "after", F(j(t(se))))
|
|
3138
|
+
])) : w("", !0),
|
|
3139
|
+
t(l) ? (i(), y("span", ja, [
|
|
3140
|
+
$(z.$slots, "count", F(j(t(se))), () => [
|
|
3141
|
+
Z(H(t(Q)), 1)
|
|
2157
3142
|
])
|
|
2158
|
-
])) :
|
|
3143
|
+
])) : w("", !0)
|
|
2159
3144
|
]),
|
|
2160
|
-
|
|
2161
|
-
id: t(
|
|
3145
|
+
de(t(re), {
|
|
3146
|
+
id: t(b),
|
|
2162
3147
|
class: "vv-textarea__hint"
|
|
2163
3148
|
}, null, 8, ["id"])
|
|
2164
3149
|
], 2));
|
|
2165
3150
|
}
|
|
2166
3151
|
});
|
|
2167
3152
|
export {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
3153
|
+
Ut as VvAccordion,
|
|
3154
|
+
Qa as VvAccordionGroup,
|
|
3155
|
+
Yt as VvBadge,
|
|
3156
|
+
Za as VvBreadcrumb,
|
|
3157
|
+
el as VvButton,
|
|
3158
|
+
tl as VvButtonGroup,
|
|
3159
|
+
ol as VvCard,
|
|
3160
|
+
Ao as VvCheckbox,
|
|
3161
|
+
al as VvCheckboxGroup,
|
|
3162
|
+
ll as VvCombobox,
|
|
3163
|
+
sl as VvDialog,
|
|
3164
|
+
St as VvDropdown,
|
|
3165
|
+
J as VvIcon,
|
|
3166
|
+
nl as VvInputText,
|
|
3167
|
+
rl as VvProgress,
|
|
3168
|
+
Ia as VvRadio,
|
|
3169
|
+
il as VvRadioGroup,
|
|
3170
|
+
zo as VvSelect,
|
|
3171
|
+
ul as VvTextarea
|
|
2187
3172
|
};
|