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