@volverjs/ui-vue 0.0.1-beta.12 → 0.0.1-beta.17
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 +1 -1
- package/bin/icons.cjs +73 -0
- package/bin/icons.js +75 -0
- package/dist/Volver.d.ts +15 -2
- package/dist/components/VvAccordion/VvAccordion.es.js +133 -236
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
- package/dist/components/VvAccordion/index.d.ts +46 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +199 -277
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +44 -151
- package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +9 -13
- package/dist/components/VvBadge/VvBadge.es.js +42 -151
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -53
- package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +0 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +55 -168
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +24 -104
- package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +1 -1
- package/dist/components/VvButton/VvButton.es.js +298 -312
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +91 -163
- package/dist/components/VvButton/{VvButton.d.ts → index.d.ts} +46 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +59 -172
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +30 -125
- package/dist/components/VvButtonGroup/{VvButtonGroup.d.ts → index.d.ts} +0 -0
- package/dist/components/VvCard/VvCard.es.js +55 -166
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
- package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +344 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +87 -0
- package/dist/components/VvCheckbox/index.d.ts +86 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +415 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +113 -0
- package/dist/components/{VvCheckGroup/VvCheckGroup.d.ts → VvCheckboxGroup/index.d.ts} +10 -10
- package/dist/components/VvDialog/VvDialog.es.js +108 -230
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
- package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
- package/dist/components/VvDropdown/VvDropdown.es.js +167 -186
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +34 -136
- package/dist/components/VvDropdown/{VvDropdown.d.ts → index.d.ts} +7 -3
- package/dist/components/VvIcon/VvIcon.es.js +62 -174
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
- package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
- package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
- package/dist/components/VvInputText/VvInputText.es.js +586 -577
- package/dist/components/VvInputText/VvInputText.umd.js +1 -2
- package/dist/components/VvInputText/VvInputText.vue.d.ts +187 -275
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +175 -0
- package/dist/components/VvNativeSelect/VvNativeSelect.es.js +299 -347
- package/dist/components/VvNativeSelect/VvNativeSelect.umd.js +1 -2
- package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +78 -190
- package/dist/components/VvNativeSelect/{VvNativeSelect.d.ts → index.d.ts} +35 -8
- package/dist/components/VvProgress/VvProgress.es.js +45 -162
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +17 -103
- package/dist/components/VvProgress/{VvProgress.d.ts → index.d.ts} +1 -7
- package/dist/components/VvRadio/VvRadio.es.js +292 -267
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +52 -122
- package/dist/components/VvRadio/index.d.ts +64 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +342 -380
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +58 -213
- package/dist/components/VvRadioGroup/{VvRadioGroup.d.ts → index.d.ts} +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +556 -510
- package/dist/components/VvSelect/VvSelect.umd.js +1 -2
- package/dist/components/VvSelect/VvSelect.vue.d.ts +75 -240
- package/dist/components/VvSelect/{VvSelect.d.ts → index.d.ts} +12 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +372 -481
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -2
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +103 -299
- package/dist/components/VvTextarea/{VvTextarea.d.ts → index.d.ts} +36 -13
- package/dist/components/common/HintSlot.d.ts +10 -4
- package/dist/components/index.d.ts +13 -6
- package/dist/components/index.es.js +2070 -895
- package/dist/components/index.umd.js +1 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -2
- package/dist/composables/focus/useComponentFocus.d.ts +3 -3
- package/dist/composables/group/types/IAccordionGroupState.d.ts +1 -3
- package/dist/composables/group/types/IGroupState.d.ts +2 -2
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/icons/useComponentIcons.d.ts +2 -2
- package/dist/composables/textLimit/useTextLimit.d.ts +0 -3
- package/dist/constants.d.ts +4 -4
- package/dist/icons.d.ts +1881 -0
- package/dist/icons.es.js +4 -6
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2113 -932
- package/dist/index.umd.js +1 -2
- package/dist/props/index.d.ts +9 -3
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +40 -0
- package/dist/resolvers/unplugin.umd.js +1 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +4 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Button/Button.test.d.ts +3 -8
- package/dist/stories/Card/Card.test.d.ts +3 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Icon/IconList.vue.d.ts +1 -43
- package/dist/stories/InputText/InputText.test.d.ts +6 -0
- package/dist/stories/Radio/Radio.test.d.ts +3 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +8 -0
- package/dist/stories/Select/Select.test.d.ts +3 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +8 -0
- package/dist/stories/utils.d.ts +1 -3
- package/dist/test/sleep.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +82 -95
- package/env.d.ts +1 -0
- package/package.json +103 -68
- package/src/Volver.ts +32 -3
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +80 -76
- package/src/components/VvAccordion/index.ts +69 -0
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +77 -41
- package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +8 -12
- package/src/components/VvBadge/VvBadge.vue +14 -10
- package/src/components/VvBadge/{VvBadge.ts → index.ts} +0 -0
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +18 -19
- package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -1
- package/src/components/VvButton/VvButton.vue +123 -113
- package/src/components/VvButton/index.ts +147 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +21 -17
- package/src/components/VvButtonGroup/{VvButtonGroup.ts → index.ts} +0 -0
- package/src/components/VvCard/VvCard.vue +20 -22
- package/src/components/VvCard/{VvCard.ts → index.ts} +0 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +124 -0
- package/src/components/VvCheckbox/index.ts +94 -0
- package/src/components/{VvCheckGroup/VvCheckGroup.vue → VvCheckboxGroup/VvCheckboxGroup.vue} +49 -54
- package/src/components/{VvCheckGroup/VvCheckGroup.ts → VvCheckboxGroup/index.ts} +9 -9
- package/src/components/VvDialog/VvDialog.vue +47 -50
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +61 -40
- package/src/components/VvDropdown/{VvDropdown.ts → index.ts} +8 -4
- package/src/components/VvIcon/VvIcon.vue +31 -25
- package/src/components/VvIcon/{VvIcon.ts → index.ts} +9 -0
- package/src/components/VvInputText/VvInputClearAction.ts +53 -0
- package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
- package/src/components/VvInputText/VvInputStepAction.ts +49 -0
- package/src/components/VvInputText/VvInputText.vue +168 -170
- package/src/components/VvInputText/VvInputTextActions.ts +54 -108
- package/src/components/VvInputText/index.ts +135 -0
- package/src/components/VvNativeSelect/VvNativeSelect.vue +130 -68
- package/src/components/VvNativeSelect/{VvNativeSelect.ts → index.ts} +26 -7
- package/src/components/VvProgress/VvProgress.vue +25 -26
- package/src/components/VvProgress/{VvProgress.ts → index.ts} +4 -7
- package/src/components/VvRadio/VvRadio.vue +81 -108
- package/src/components/VvRadio/index.ts +78 -0
- package/src/components/VvRadioGroup/VvRadioGroup.vue +45 -45
- package/src/components/VvRadioGroup/{VvRadioGroup.ts → index.ts} +1 -1
- package/src/components/VvSelect/VvSelect.vue +90 -69
- package/src/components/VvSelect/{VvSelect.ts → index.ts} +12 -5
- package/src/components/VvTextarea/VvTextarea.vue +121 -128
- package/src/components/VvTextarea/{VvTextarea.ts → index.ts} +31 -11
- package/src/components/common/HintSlot.ts +157 -136
- package/src/components/index.ts +13 -6
- package/src/composables/debouncedInput/useDebouncedInput.ts +21 -15
- package/src/composables/focus/useComponentFocus.ts +6 -8
- package/src/composables/group/types/IAccordionGroupState.ts +1 -3
- package/src/composables/group/types/IGroupState.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +20 -30
- package/src/composables/group/useProvideGroupState.ts +1 -2
- package/src/composables/icons/useComponentIcons.ts +2 -3
- package/src/composables/options/useOptions.ts +3 -0
- package/src/composables/textLimit/useTextLimit.ts +1 -4
- package/src/composables/useModifiers.ts +13 -15
- package/src/constants.ts +5 -7
- package/src/directives/{.README → .gitkeep} +0 -0
- package/src/icons.ts +7 -0
- package/src/index.ts +0 -1
- package/src/props/index.ts +7 -1
- package/src/resolvers/unplugin.ts +103 -0
- package/src/shims.d.ts +11 -0
- package/src/stories/Accordion/Accordion.stories.mdx +10 -9
- package/src/stories/Accordion/Accordion.test.ts +37 -0
- package/src/stories/Accordion/AccordionSlots.stories.mdx +40 -25
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +10 -16
- package/src/stories/AccordionGroup/{accordionGroupTest.js → AccordionGroup.test.js} +15 -17
- package/src/stories/AccordionGroup/AccordionGroupCollapse.stories.mdx +38 -0
- package/src/stories/AccordionGroup/{AccordionItems.stories.mdx → AccordionGroupItems.stories.mdx} +7 -13
- package/src/stories/Badge/Badge.stories.mdx +8 -8
- package/src/stories/Badge/Badge.test.ts +16 -0
- package/src/stories/Badge/BadgeColor.stories.mdx +6 -7
- package/src/stories/Badge/BadgeDot.stories.mdx +4 -3
- package/src/stories/Badge/BadgeModifiers.stories.mdx +7 -6
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +15 -7
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +49 -0
- package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +15 -7
- package/src/stories/Button/Button.stories.mdx +16 -17
- package/src/stories/Button/Button.test.ts +8 -12
- package/src/stories/Button/ButtonActive.stories.mdx +2 -1
- package/src/stories/Button/ButtonBadge.stories.mdx +2 -2
- package/src/stories/Button/ButtonDisabled.stories.mdx +1 -1
- package/src/stories/Button/ButtonIcon.stories.mdx +6 -3
- package/src/stories/Button/ButtonIconPosition.stories.mdx +1 -1
- package/src/stories/Button/ButtonLink.stories.mdx +1 -19
- package/src/stories/Button/ButtonLoading.stories.mdx +4 -4
- package/src/stories/Button/ButtonModifiers.stories.mdx +1 -1
- package/src/stories/Button/ButtonPressed.stories.mdx +31 -0
- package/src/stories/Button/ButtonSlots.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +5 -6
- package/src/stories/ButtonGroup/{ButtonGroupTest.js → ButtonGroup.test.js} +6 -28
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +5 -6
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +11 -12
- package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +3 -4
- package/src/stories/Card/Card.stories.mdx +7 -5
- package/src/stories/Card/Card.test.ts +26 -0
- package/src/stories/Card/CardSlots.stories.mdx +5 -5
- package/src/stories/Card/CardVariant.stories.mdx +5 -4
- package/src/stories/Checkbox/Checkbox.stories.mdx +51 -0
- package/src/stories/Checkbox/Checkbox.test.js +115 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +76 -0
- package/src/stories/{Check/CheckDisabled.stories.mdx → Checkbox/CheckboxDisabled.stories.mdx} +7 -7
- package/src/stories/Checkbox/CheckboxError.stories.mdx +43 -0
- package/src/stories/Checkbox/CheckboxHintLabel.stories.mdx +35 -0
- package/src/stories/{Check/CheckReadonly.stories.mdx → Checkbox/CheckboxReadonly.stories.mdx} +6 -8
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +69 -0
- package/src/stories/{Check/CheckSwitch.stories.mdx → Checkbox/CheckboxSwitch.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +69 -0
- package/src/stories/CheckboxGroup/CheckboxGroupDisabled.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupError.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupHintLabel.stories.mdx +27 -0
- package/src/stories/CheckboxGroup/CheckboxGroupLabel.stories.mdx +26 -0
- package/src/stories/{CheckGroup/CheckGroupOptionLabel.stories.mdx → CheckboxGroup/CheckboxGroupOptionLabel.stories.mdx} +14 -11
- package/src/stories/{CheckGroup/CheckGroupOptionValue.stories.mdx → CheckboxGroup/CheckboxGroupOptionValue.stories.mdx} +13 -10
- package/src/stories/{CheckGroup/CheckGroupOptions.stories.mdx → CheckboxGroup/CheckboxGroupOptions.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroupReadonly.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +152 -0
- package/src/stories/CheckboxGroup/CheckboxGroupValid.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupVertical.stories.mdx +26 -0
- package/src/stories/Dialog/Dialog.stories.mdx +5 -5
- package/src/stories/Dialog/Dialog.test.ts +26 -0
- package/src/stories/Dialog/DialogAutoClose.stories.mdx +1 -1
- package/src/stories/Dialog/DialogSize.stories.mdx +1 -1
- package/src/stories/Dropdown/Dropdown.stories.mdx +11 -7
- package/src/stories/Dropdown/Dropdown.test.ts +80 -0
- package/src/stories/Dropdown/DropdownDisabled.stories.mdx +9 -2
- package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +2 -2
- package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownMultiple.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +4 -4
- package/src/stories/Dropdown/DropdownUseObject.stories.mdx +4 -2
- package/src/stories/Icon/Icon.stories.mdx +8 -8
- package/src/stories/Icon/{IconTest.js → Icon.test.js} +2 -5
- package/src/stories/Icon/IconList.vue +5 -6
- package/src/stories/Icon/IconPrefix.stories.mdx +2 -2
- package/src/stories/Icon/IconRemote.stories.mdx +2 -2
- package/src/stories/Icon/IconsList.stories.mdx +2 -18
- package/src/stories/InputText/InputText.stories.mdx +25 -19
- package/src/stories/InputText/InputText.test.ts +156 -0
- package/src/stories/InputText/InputTextAutocomplete.stories.mdx +9 -2
- package/src/stories/InputText/InputTextAutofocus.stories.mdx +6 -3
- package/src/stories/InputText/InputTextDisabled.stories.mdx +10 -2
- package/src/stories/InputText/InputTextError.stories.mdx +10 -2
- package/src/stories/InputText/InputTextFloating.stories.mdx +10 -3
- package/src/stories/InputText/InputTextHintLabel.stories.mdx +10 -2
- package/src/stories/InputText/InputTextIcon.stories.mdx +6 -2
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +10 -3
- package/src/stories/InputText/InputTextLabel.stories.mdx +8 -2
- package/src/stories/InputText/InputTextLoading.stories.mdx +10 -2
- package/src/stories/InputText/InputTextMax.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +22 -5
- package/src/stories/InputText/InputTextMin.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMinLength.stories.mdx +9 -2
- package/src/stories/InputText/InputTextPlaceholder.stories.mdx +8 -2
- package/src/stories/InputText/InputTextReadonly.stories.mdx +6 -2
- package/src/stories/InputText/InputTextSlots.stories.mdx +4 -5
- package/src/stories/InputText/InputTextStep.stories.mdx +9 -3
- package/src/stories/InputText/InputTextType.stories.mdx +110 -13
- package/src/stories/InputText/InputTextValid.stories.mdx +10 -2
- package/src/stories/NativeSelect/NativeSelect.stories.mdx +15 -11
- package/src/stories/NativeSelect/NativeSelect.test.js +151 -0
- package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +6 -7
- package/src/stories/NativeSelect/NativeSelectError.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +14 -12
- package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +44 -38
- package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +19 -11
- package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +26 -30
- package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +30 -30
- package/src/stories/Progress/Progress.stories.mdx +8 -11
- package/src/stories/Progress/{ProgressTest.js → Progress.test.js} +4 -10
- package/src/stories/Progress/ProgressDeterminate.stories.mdx +3 -6
- package/src/stories/Radio/Radio.stories.mdx +11 -17
- package/src/stories/Radio/Radio.test.ts +52 -0
- package/src/stories/Radio/RadioDisabled.stories.mdx +4 -7
- package/src/stories/Radio/RadioError.stories.mdx +8 -28
- package/src/stories/Radio/RadioHintLabel.stories.mdx +6 -7
- package/src/stories/Radio/RadioSlots.stories.mdx +21 -7
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +20 -27
- package/src/stories/RadioGroup/RadioGroup.test.ts +139 -0
- package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupError.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +8 -10
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +11 -13
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +7 -9
- package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +39 -62
- package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +6 -8
- package/src/stories/Select/Select.stories.mdx +32 -29
- package/src/stories/Select/Select.test.ts +104 -0
- package/src/stories/Select/SelectDisabled.stories.mdx +3 -3
- package/src/stories/Select/SelectMaxValues.stories.mdx +3 -3
- package/src/stories/Select/SelectMultiple.stories.mdx +5 -6
- package/src/stories/Select/SelectNative.stories.mdx +6 -8
- package/src/stories/Select/SelectOptions.stories.mdx +4 -4
- package/src/stories/Select/SelectSearchable.stories.mdx +13 -12
- package/src/stories/Select/SelectSeparator.stories.mdx +3 -3
- package/src/stories/Select/SelectUseObject.stories.mdx +3 -3
- package/src/stories/Textarea/Textarea.stories.mdx +6 -10
- package/src/stories/Textarea/Textarea.test.ts +204 -0
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +7 -6
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaError.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +12 -2
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaIcon.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaId.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLabel.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLimit.stories.mdx +5 -2
- package/src/stories/Textarea/TextareaLoading.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +5 -4
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaName.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +4 -3
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +8 -3
- package/src/stories/Textarea/TextareaRequired.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaResizable.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaSlots.stories.mdx +7 -8
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -1
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +14 -4
- package/src/stories/utils.ts +1 -1
- package/src/stories/volver-ui-vue.stories.mdx +1 -1
- package/src/test/expect.ts +3 -1
- package/src/test/sleep.ts +2 -0
- package/src/test/types.d.ts +14 -1
- package/src/types/{.README → .gitkeep} +0 -0
- package/src/utils/ObjectUtilities.ts +247 -241
- package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
- package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
- package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -18
- package/dist/components/VvCheck/VvCheck.d.ts +0 -47
- package/dist/components/VvCheck/VvCheck.es.js +0 -318
- package/dist/components/VvCheck/VvCheck.umd.js +0 -1
- package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
- package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
- package/dist/components/VvCheckGroup/VvCheckGroup.es.js +0 -451
- package/dist/components/VvCheckGroup/VvCheckGroup.umd.js +0 -2
- package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
- package/dist/components/VvDialog/constants.d.ts +0 -5
- package/dist/components/VvInputText/VvInputText.d.ts +0 -73
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvRadio/VvRadio.d.ts +0 -22
- package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/stories/RadioGroup/RadioOption.test.d.ts +0 -4
- package/dist/stories/RadioGroup/RadioProperty.test.d.ts +0 -12
- package/dist/stories/RadioGroup/RadioSlots.test.d.ts +0 -6
- package/src/assets/icons/index.js +0 -7
- package/src/components/VvAccordion/VvAccordion.ts +0 -34
- package/src/components/VvAccordion/useAccordionProps.ts +0 -45
- package/src/components/VvButton/VvButton.ts +0 -87
- package/src/components/VvButton/useButtonGroupProps.ts +0 -43
- package/src/components/VvCheck/VvCheck.ts +0 -48
- package/src/components/VvCheck/VvCheck.vue +0 -147
- package/src/components/VvCheck/useCheckProps.ts +0 -41
- package/src/components/VvDialog/VvDialog.ts +0 -17
- package/src/components/VvDialog/constants.ts +0 -5
- package/src/components/VvInputText/VvInputText.ts +0 -66
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvRadio/VvRadio.ts +0 -25
- package/src/components/VvRadio/useRadioProps.ts +0 -40
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
- package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
- package/src/stories/Accordion/accordionTest.js +0 -36
- package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
- package/src/stories/Badge/BadgeTest.js +0 -21
- package/src/stories/Button/ButtonSelected.stories.mdx +0 -30
- package/src/stories/Check/Check.stories.mdx +0 -62
- package/src/stories/Check/CheckBinary.stories.mdx +0 -75
- package/src/stories/Check/CheckError.stories.mdx +0 -64
- package/src/stories/Check/CheckErrorTests.js +0 -74
- package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
- package/src/stories/Check/CheckPropertyTest.js +0 -102
- package/src/stories/Check/CheckSlots.stories.mdx +0 -51
- package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
- package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
- package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
- package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
- package/src/stories/RadioGroup/RadioOption.test.ts +0 -45
- package/src/stories/RadioGroup/RadioProperty.test.ts +0 -87
- package/src/stories/RadioGroup/RadioSlots.test.ts +0 -29
- package/src/stories/stories.scss +0 -13
|
@@ -1,171 +1,438 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { unref as a, computed as i, inject as Ne, toRef as Ct, toRefs as x, defineComponent as B, useAttrs as Ye, ref as H, openBlock as m, createElementBlock as _, normalizeClass as U, withModifiers as Fe, createElementVNode as w, renderSlot as C, normalizeProps as te, guardReactiveProps as ye, createTextVNode as K, toDisplayString as E, isRef as be, provide as kt, watchEffect as We, Fragment as re, renderList as ge, createBlock as G, mergeProps as D, withCtx as he, resolveDynamicComponent as ze, createCommentVNode as O, useSlots as oe, h as W, withDirectives as ne, vModelCheckbox as At, createVNode as q, Transition as Pt, toHandlers as Ot, vShow as Xe, watch as Ze, onMounted as Je, vModelDynamic as wt, vModelSelect as It, vModelRadio as Et, withKeys as Ge, vModelText as Qe } from "vue";
|
|
2
|
+
import { useToggle as Tt, useVModel as ke, toReactive as Bt, onClickOutside as et, useFocus as tt, isString as je, refDebounced as Rt } from "@vueuse/core";
|
|
3
|
+
import { nanoid as ve } from "nanoid";
|
|
4
|
+
import { iconExists as Ve, Icon as Dt, addIcon as Nt } from "@iconify/vue";
|
|
5
|
+
function le(o, t, e) {
|
|
6
|
+
return e ? Ce(o, e) === Ce(t, e) : Re(o, t);
|
|
7
|
+
}
|
|
8
|
+
function Re(o, t) {
|
|
9
|
+
if (o === t)
|
|
10
|
+
return !0;
|
|
11
|
+
if (o && t && typeof o == "object" && typeof t == "object") {
|
|
12
|
+
const e = Array.isArray(o), n = Array.isArray(t);
|
|
13
|
+
let l, s, r;
|
|
14
|
+
if (e && n) {
|
|
15
|
+
if (s = o.length, s != t.length)
|
|
16
|
+
return !1;
|
|
17
|
+
for (l = s; l-- !== 0; )
|
|
18
|
+
if (!Re(o[l], t[l]))
|
|
19
|
+
return !1;
|
|
20
|
+
return !0;
|
|
21
|
+
}
|
|
22
|
+
if (e != n)
|
|
23
|
+
return !1;
|
|
24
|
+
const f = o instanceof Date, v = t instanceof Date;
|
|
25
|
+
if (f != v)
|
|
26
|
+
return !1;
|
|
27
|
+
if (f && v)
|
|
28
|
+
return o.getTime() == t.getTime();
|
|
29
|
+
const p = o instanceof RegExp, u = t instanceof RegExp;
|
|
30
|
+
if (p != u)
|
|
31
|
+
return !1;
|
|
32
|
+
if (p && u)
|
|
33
|
+
return o.toString() == t.toString();
|
|
34
|
+
const d = Object.keys(o);
|
|
35
|
+
if (s = d.length, s !== Object.keys(t).length)
|
|
36
|
+
return !1;
|
|
37
|
+
for (l = s; l-- !== 0; )
|
|
38
|
+
if (!Object.prototype.hasOwnProperty.call(t, d[l]))
|
|
39
|
+
return !1;
|
|
40
|
+
for (l = s; l-- !== 0; )
|
|
41
|
+
if (r = d[l], !Re(o[r], t[r]))
|
|
42
|
+
return !1;
|
|
43
|
+
return !0;
|
|
44
|
+
}
|
|
45
|
+
return o !== o && t !== t;
|
|
46
|
+
}
|
|
47
|
+
function Ce(o, t) {
|
|
48
|
+
if (o && Object.keys(o).length && t) {
|
|
49
|
+
if (t.indexOf(".") === -1)
|
|
50
|
+
return o[t];
|
|
51
|
+
{
|
|
52
|
+
const e = t.split(".");
|
|
53
|
+
let n = o;
|
|
54
|
+
for (let l = 0, s = e.length; l < s; ++l) {
|
|
55
|
+
if (o == null)
|
|
56
|
+
return null;
|
|
57
|
+
n = n[e[l]];
|
|
58
|
+
}
|
|
59
|
+
return n;
|
|
60
|
+
}
|
|
61
|
+
} else
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function Lt(o, t) {
|
|
65
|
+
let e = -1;
|
|
66
|
+
if (t) {
|
|
67
|
+
for (let n = 0; n < t.length; n++)
|
|
68
|
+
if (le(t[n], o)) {
|
|
69
|
+
e = n;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return e;
|
|
74
|
+
}
|
|
75
|
+
function ce(o, t) {
|
|
76
|
+
if (o != null && t && t.length) {
|
|
77
|
+
for (const e of t)
|
|
78
|
+
if (le(o, e))
|
|
79
|
+
return !0;
|
|
80
|
+
}
|
|
81
|
+
return !1;
|
|
82
|
+
}
|
|
83
|
+
function z(o) {
|
|
84
|
+
return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(a(o));
|
|
85
|
+
}
|
|
86
|
+
function Le(o, t) {
|
|
87
|
+
const e = Lt(o, t);
|
|
88
|
+
return e > -1 ? t.filter((n, l) => l !== e) : t;
|
|
89
|
+
}
|
|
90
|
+
function xt(o) {
|
|
91
|
+
return typeof o == "string" || o instanceof String;
|
|
92
|
+
}
|
|
93
|
+
function Ht(o, t, e) {
|
|
94
|
+
return o.filter((n) => t.some((l) => typeof l == "string" ? n[e] == l : le(n[e], l[e])));
|
|
95
|
+
}
|
|
96
|
+
function Me(o) {
|
|
97
|
+
var t, e;
|
|
98
|
+
if (o)
|
|
99
|
+
return (e = (t = o.match(
|
|
100
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
101
|
+
)) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
|
|
102
|
+
}
|
|
103
|
+
function L(o, t) {
|
|
104
|
+
const e = { [`${o}`]: !0 };
|
|
105
|
+
return {
|
|
106
|
+
bemCssClasses: i(() => Object.keys(t).reduce((l, s) => {
|
|
107
|
+
const r = a(t[s]) || !1;
|
|
108
|
+
if (!r)
|
|
109
|
+
return l;
|
|
110
|
+
if (s === "modifiers") {
|
|
111
|
+
const f = Array.isArray(r) ? r : r.split(" ");
|
|
112
|
+
return {
|
|
113
|
+
...l,
|
|
114
|
+
...f.reduce(
|
|
115
|
+
(v, p) => ({
|
|
116
|
+
...v,
|
|
117
|
+
[`${o}--${Me(p)}`]: !0
|
|
118
|
+
}),
|
|
119
|
+
{}
|
|
120
|
+
)
|
|
121
|
+
};
|
|
122
|
+
} else
|
|
123
|
+
return {
|
|
124
|
+
...l,
|
|
125
|
+
[`${o}--${Me(s)}`]: r
|
|
126
|
+
};
|
|
127
|
+
}, e) || {})
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function Ae(o) {
|
|
131
|
+
const t = Ne(o, void 0), e = i(() => !z(t));
|
|
132
|
+
function n(l, s, r) {
|
|
133
|
+
if (t != null && t.value) {
|
|
134
|
+
const v = a(t.value)[l];
|
|
135
|
+
return i({
|
|
136
|
+
get() {
|
|
137
|
+
return v == null ? void 0 : v.value;
|
|
138
|
+
},
|
|
139
|
+
set(p) {
|
|
140
|
+
v.value = p;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
const f = Ct(s, l);
|
|
145
|
+
return i({
|
|
146
|
+
get() {
|
|
147
|
+
return f.value;
|
|
148
|
+
},
|
|
149
|
+
set(v) {
|
|
150
|
+
r && r(`update:${l}`, v);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
group: t,
|
|
156
|
+
isInGroup: e,
|
|
157
|
+
getGroupOrLocalRef: n
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
const ot = "VV_BUTTON_GROUP", at = "VV_RADIO_GROUP", nt = "VV_CHECK_GROUP", lt = "VV_ACCORDION_GROUP", Gt = {
|
|
161
|
+
name: String,
|
|
162
|
+
title: String,
|
|
163
|
+
content: String,
|
|
164
|
+
modelValue: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
default: void 0
|
|
167
|
+
},
|
|
168
|
+
modifiers: [String, Array],
|
|
169
|
+
disabled: Boolean
|
|
170
|
+
}, jt = ["update:modelValue"];
|
|
171
|
+
function Mt(o, t) {
|
|
172
|
+
const { group: e, isInGroup: n, getGroupOrLocalRef: l } = Ae(lt), { modifiers: s, title: r, content: f } = x(o), v = l("modelValue", o, t), p = l("disabled", o), u = l("collapse", o);
|
|
173
|
+
return {
|
|
174
|
+
modelValue: v,
|
|
175
|
+
disabled: p,
|
|
176
|
+
isInGroup: n,
|
|
177
|
+
group: e,
|
|
178
|
+
collapse: u,
|
|
179
|
+
modifiers: s,
|
|
180
|
+
title: r,
|
|
181
|
+
content: f
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
const Ut = ["id", "open"], qt = ["aria-controls", "aria-expanded"], Kt = ["aria-hidden"], Yt = {
|
|
185
|
+
name: "VvAccordion"
|
|
186
|
+
}, Ft = /* @__PURE__ */ B({
|
|
187
|
+
...Yt,
|
|
188
|
+
props: Gt,
|
|
189
|
+
emits: jt,
|
|
190
|
+
setup(o, { emit: t }) {
|
|
191
|
+
const e = o, n = Ye(), l = e.name || (n == null ? void 0 : n.id) || ve(), { modifiers: s, title: r, content: f, disabled: v, collapse: p, modelValue: u, isInGroup: d } = Mt(e, t), c = H(!1), b = i({
|
|
192
|
+
get: () => d.value ? p.value && Array.isArray(u.value) ? u.value.includes(l) : u.value === l : u.value === void 0 ? c.value : u.value,
|
|
193
|
+
set: (h) => {
|
|
194
|
+
if (d.value) {
|
|
195
|
+
if (p.value && Array.isArray(u.value)) {
|
|
196
|
+
if (h) {
|
|
197
|
+
u.value.push(l);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
u.value = u.value.filter(
|
|
201
|
+
(k) => k !== l
|
|
202
|
+
);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
u.value = h ? l : null;
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (u.value === void 0 && typeof h == "boolean") {
|
|
209
|
+
c.value = h;
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
u.value = h;
|
|
213
|
+
}
|
|
214
|
+
}), { bemCssClasses: g } = L("vv-accordion", {
|
|
215
|
+
modifiers: s,
|
|
216
|
+
disabled: v
|
|
217
|
+
}), y = Tt(b);
|
|
218
|
+
return (h, k) => (m(), _("details", {
|
|
219
|
+
id: a(l),
|
|
220
|
+
class: U(a(g)),
|
|
221
|
+
open: a(b),
|
|
222
|
+
onClick: k[0] || (k[0] = Fe((P) => a(y)(), ["prevent"]))
|
|
223
|
+
}, [
|
|
224
|
+
w("summary", {
|
|
225
|
+
"aria-controls": a(l),
|
|
226
|
+
"aria-expanded": a(b),
|
|
227
|
+
class: "vv-collapse__summary"
|
|
228
|
+
}, [
|
|
229
|
+
C(h.$slots, "header", te(ye({ open: a(b) })), () => [
|
|
230
|
+
K(E(a(r)), 1)
|
|
231
|
+
])
|
|
232
|
+
], 8, qt),
|
|
233
|
+
w("div", {
|
|
234
|
+
"aria-hidden": !a(b),
|
|
235
|
+
class: "vv-collapse__content"
|
|
236
|
+
}, [
|
|
237
|
+
C(h.$slots, "details", te(ye({ open: a(b) })), () => [
|
|
238
|
+
K(E(a(f)), 1)
|
|
239
|
+
])
|
|
240
|
+
], 8, Kt)
|
|
241
|
+
], 10, Ut));
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
function Pe(o) {
|
|
245
|
+
if (Object.keys(o).some(
|
|
246
|
+
(t) => t !== "key" && !be(o[t])
|
|
247
|
+
))
|
|
248
|
+
throw Error("One or more groupState props aren't ref.");
|
|
249
|
+
kt(
|
|
250
|
+
o.key,
|
|
251
|
+
i(() => o)
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
const Wt = {
|
|
255
|
+
modelValue: [String, Array],
|
|
256
|
+
items: { type: Array, default: () => [] },
|
|
257
|
+
collapse: Boolean,
|
|
258
|
+
modifiers: [String, Array],
|
|
259
|
+
disabled: Boolean
|
|
260
|
+
}, zt = ["update:modelValue"], Xt = {
|
|
261
|
+
name: "VvAccordionGroup"
|
|
262
|
+
}, Ga = /* @__PURE__ */ B({
|
|
263
|
+
...Xt,
|
|
264
|
+
props: Wt,
|
|
265
|
+
emits: zt,
|
|
266
|
+
setup(o, { emit: t }) {
|
|
267
|
+
const e = o, { disabled: n, collapse: l, modifiers: s, items: r } = x(e), f = i(
|
|
268
|
+
() => l.value && (e.modelValue === void 0 || Array.isArray(e.modelValue))
|
|
269
|
+
);
|
|
270
|
+
We(() => {
|
|
271
|
+
typeof e.modelValue == "string" && l.value && console.warn(
|
|
272
|
+
"[VvAccordionGroup]: modelValue is a string but collapse is true."
|
|
273
|
+
);
|
|
274
|
+
});
|
|
275
|
+
const v = H([]), p = i({
|
|
276
|
+
get: () => {
|
|
277
|
+
var c;
|
|
278
|
+
return e.modelValue !== void 0 ? f.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : f.value ? v.value : (c = v.value) == null ? void 0 : c[0];
|
|
279
|
+
},
|
|
280
|
+
set: (c) => {
|
|
281
|
+
if (e.modelValue !== void 0)
|
|
282
|
+
return t("update:modelValue", c);
|
|
283
|
+
v.value = Array.isArray(c) ? c : [c];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
Pe({
|
|
287
|
+
key: lt,
|
|
288
|
+
modelValue: p,
|
|
289
|
+
disabled: n,
|
|
290
|
+
collapse: f
|
|
291
|
+
});
|
|
292
|
+
const { bemCssClasses: d } = L("vv-accordion-group", {
|
|
293
|
+
modifiers: s,
|
|
294
|
+
disabled: n
|
|
295
|
+
});
|
|
296
|
+
return (c, b) => {
|
|
297
|
+
var g;
|
|
298
|
+
return m(), _("div", {
|
|
299
|
+
class: U(a(d))
|
|
300
|
+
}, [
|
|
301
|
+
((g = e.items) == null ? void 0 : g.length) > 0 ? (m(!0), _(re, { key: 0 }, ge(a(r), (y) => (m(), G(Ft, D({
|
|
302
|
+
key: y.title
|
|
303
|
+
}, {
|
|
304
|
+
name: y.name,
|
|
305
|
+
title: y.title,
|
|
306
|
+
content: y.content,
|
|
307
|
+
disabled: y.disabled,
|
|
308
|
+
modifiers: a(s)
|
|
309
|
+
}), {
|
|
310
|
+
header: he((h) => [
|
|
311
|
+
C(c.$slots, `header::${y.name}`, te(ye(h)))
|
|
312
|
+
]),
|
|
313
|
+
details: he((h) => [
|
|
314
|
+
C(c.$slots, `details::${y.name}`, te(ye(h)))
|
|
315
|
+
]),
|
|
316
|
+
_: 2
|
|
317
|
+
}, 1040))), 128)) : C(c.$slots, "default", { key: 1 })
|
|
318
|
+
], 2);
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}), se = {
|
|
6
322
|
valid: Boolean,
|
|
7
323
|
validLabel: [String, Array]
|
|
8
|
-
},
|
|
324
|
+
}, ie = {
|
|
9
325
|
error: Boolean,
|
|
10
326
|
errorLabel: [String, Array]
|
|
11
|
-
},
|
|
327
|
+
}, Oe = {
|
|
328
|
+
loading: Boolean,
|
|
329
|
+
loadingLabel: String
|
|
330
|
+
}, _e = {
|
|
12
331
|
disabled: Boolean
|
|
13
|
-
},
|
|
332
|
+
}, rt = {
|
|
333
|
+
readonly: Boolean
|
|
334
|
+
}, J = {
|
|
14
335
|
modifiers: [String, Array]
|
|
15
|
-
},
|
|
336
|
+
}, ue = {
|
|
16
337
|
hintLabel: { type: String, default: "" }
|
|
17
|
-
},
|
|
338
|
+
}, st = {
|
|
18
339
|
options: { type: Array, default: () => [] },
|
|
19
340
|
optionLabel: { type: [String, Function], default: () => "label" },
|
|
20
341
|
optionValue: { type: [String, Function], default: () => "value" }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
342
|
+
}, it = {
|
|
343
|
+
limit: {
|
|
344
|
+
type: [Boolean, String],
|
|
345
|
+
default: !1,
|
|
346
|
+
validator: (o) => [!0, !1, "countdown"].includes(o)
|
|
347
|
+
}
|
|
348
|
+
}, ut = {
|
|
349
|
+
id: [String, Number],
|
|
350
|
+
name: { type: String, required: !0 },
|
|
351
|
+
autocomplete: { type: String, default: "off" },
|
|
352
|
+
autofocus: Boolean,
|
|
353
|
+
minlength: Number,
|
|
354
|
+
maxlength: Number,
|
|
32
355
|
label: String,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
findIndexInList(e, n) {
|
|
113
|
-
let t = -1;
|
|
114
|
-
if (n) {
|
|
115
|
-
for (let s = 0; s < n.length; s++)
|
|
116
|
-
if (this.equals(n[s], e)) {
|
|
117
|
-
t = s;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return t;
|
|
122
|
-
},
|
|
123
|
-
contains(e, n) {
|
|
124
|
-
if (e != null && n && n.length) {
|
|
125
|
-
for (const t of n)
|
|
126
|
-
if (this.equals(e, t))
|
|
127
|
-
return !0;
|
|
128
|
-
}
|
|
129
|
-
return !1;
|
|
130
|
-
},
|
|
131
|
-
isEmpty(e) {
|
|
132
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
|
133
|
-
},
|
|
134
|
-
isNotEmpty(e) {
|
|
135
|
-
return !this.isEmpty(e);
|
|
136
|
-
},
|
|
137
|
-
pickBy(e, n) {
|
|
138
|
-
return Object.fromEntries(
|
|
139
|
-
Object.entries(e).filter(([t]) => n(t))
|
|
140
|
-
);
|
|
141
|
-
},
|
|
142
|
-
removeFromList(e, n) {
|
|
143
|
-
const t = this.findIndexInList(e, n);
|
|
144
|
-
return t > -1 ? n.filter((s, r) => r !== t) : n;
|
|
145
|
-
},
|
|
146
|
-
isString(e) {
|
|
147
|
-
return typeof e == "string" || e instanceof String;
|
|
148
|
-
},
|
|
149
|
-
propsToObject(e) {
|
|
150
|
-
return Object.keys(e).reduce((n, t) => {
|
|
151
|
-
var s, r, i, a, u;
|
|
152
|
-
return this.isFunction(e[t]) ? n[t] = e[t]() : Array.isArray(e[t]) ? n[t] = e[t][0]() : (s = e[t]) != null && s.type && (Array.isArray(e[t].type) ? n[t] = ((r = e[t]) == null ? void 0 : r.default) || ((i = e[t]) == null ? void 0 : i.type[0]()) : n[t] = ((a = e[t]) == null ? void 0 : a.default) || ((u = e[t]) == null ? void 0 : u.type())), n;
|
|
153
|
-
}, {});
|
|
154
|
-
},
|
|
155
|
-
filterArray(e, n, t) {
|
|
156
|
-
return e.filter((s) => n.some((r) => typeof r == "string" ? s[t] == r : this.equals(
|
|
157
|
-
s[t],
|
|
158
|
-
r[t]
|
|
159
|
-
)));
|
|
160
|
-
},
|
|
161
|
-
kebabCase(e) {
|
|
162
|
-
var n, t;
|
|
163
|
-
if (e)
|
|
164
|
-
return (t = (n = e.match(
|
|
165
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
166
|
-
)) == null ? void 0 : n.join("-")) == null ? void 0 : t.toLowerCase();
|
|
356
|
+
placeholder: String,
|
|
357
|
+
required: Boolean,
|
|
358
|
+
disabled: Boolean,
|
|
359
|
+
readonly: Boolean
|
|
360
|
+
}, Zt = {
|
|
361
|
+
debounce: Number
|
|
362
|
+
}, Jt = {
|
|
363
|
+
...J,
|
|
364
|
+
value: [String, Number]
|
|
365
|
+
}, Qt = {
|
|
366
|
+
name: "VvBadge"
|
|
367
|
+
}, ja = /* @__PURE__ */ B({
|
|
368
|
+
...Qt,
|
|
369
|
+
props: Jt,
|
|
370
|
+
setup(o) {
|
|
371
|
+
const t = o, { bemCssClasses: e } = L("vv-badge", {
|
|
372
|
+
modifiers: t.modifiers
|
|
373
|
+
});
|
|
374
|
+
return (n, l) => (m(), _("span", {
|
|
375
|
+
class: U(a(e)),
|
|
376
|
+
role: "status"
|
|
377
|
+
}, [
|
|
378
|
+
C(n.$slots, "default", {}, () => [
|
|
379
|
+
K(E(n.value), 1)
|
|
380
|
+
])
|
|
381
|
+
], 2));
|
|
382
|
+
}
|
|
383
|
+
}), eo = {
|
|
384
|
+
...J,
|
|
385
|
+
routes: Array,
|
|
386
|
+
multiline: Boolean
|
|
387
|
+
}, to = { class: "vv-breadcrumb__list" }, oo = ["content"], ao = {
|
|
388
|
+
name: "VvBreadcrumb"
|
|
389
|
+
}, Ma = /* @__PURE__ */ B({
|
|
390
|
+
...ao,
|
|
391
|
+
props: eo,
|
|
392
|
+
setup(o) {
|
|
393
|
+
const t = o, { bemCssClasses: e } = L("vv-breadcrumb", {
|
|
394
|
+
modifiers: t.modifiers,
|
|
395
|
+
multiline: t.multiline
|
|
396
|
+
});
|
|
397
|
+
return (n, l) => (m(), _("nav", {
|
|
398
|
+
class: U(a(e)),
|
|
399
|
+
"aria-label": "breadcrumbs"
|
|
400
|
+
}, [
|
|
401
|
+
w("ol", to, [
|
|
402
|
+
(m(!0), _(re, null, ge(n.routes, (s, r) => {
|
|
403
|
+
var f, v, p, u;
|
|
404
|
+
return m(), _("li", {
|
|
405
|
+
key: `${s.label}-${r}`,
|
|
406
|
+
class: U({
|
|
407
|
+
"vv-breadcrumb__item": r < Number((f = n.routes) == null ? void 0 : f.length) - 1,
|
|
408
|
+
"vv-breadcrumb__item-active": r === Number((v = n.routes) == null ? void 0 : v.length) - 1
|
|
409
|
+
}),
|
|
410
|
+
itemprop: "itemListElement",
|
|
411
|
+
itemtype: "https://schema.org/ListItem",
|
|
412
|
+
itemscope: ""
|
|
413
|
+
}, [
|
|
414
|
+
(m(), G(ze(s.to ? "router-link" : s.href ? "a" : "span"), D(s, {
|
|
415
|
+
class: {
|
|
416
|
+
"vv-breadcrumb__link": r < Number((p = n.routes) == null ? void 0 : p.length) - 1
|
|
417
|
+
},
|
|
418
|
+
"aria-current": r === Number((u = n.routes) == null ? void 0 : u.length) - 1 ? "page" : void 0,
|
|
419
|
+
itemprop: "item"
|
|
420
|
+
}), {
|
|
421
|
+
default: he(() => [
|
|
422
|
+
K(E(s.label), 1)
|
|
423
|
+
]),
|
|
424
|
+
_: 2
|
|
425
|
+
}, 1040, ["class", "aria-current"])),
|
|
426
|
+
w("meta", {
|
|
427
|
+
itemprop: "position",
|
|
428
|
+
content: `${r + 1}`
|
|
429
|
+
}, null, 8, oo)
|
|
430
|
+
], 2);
|
|
431
|
+
}), 128))
|
|
432
|
+
])
|
|
433
|
+
], 2));
|
|
167
434
|
}
|
|
168
|
-
},
|
|
435
|
+
}), dt = "ds", no = {
|
|
169
436
|
color: String,
|
|
170
437
|
width: {
|
|
171
438
|
type: [String, Number]
|
|
@@ -196,809 +463,606 @@ const Re = {
|
|
|
196
463
|
modifiers: {
|
|
197
464
|
type: [String, Array]
|
|
198
465
|
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
[`${e}--${b.kebabCase(
|
|
215
|
-
d
|
|
216
|
-
)}`]: !0
|
|
217
|
-
}),
|
|
218
|
-
{}
|
|
219
|
-
)
|
|
220
|
-
};
|
|
221
|
-
} else
|
|
222
|
-
return {
|
|
223
|
-
...r,
|
|
224
|
-
[`${e}--${b.kebabCase(i)}`]: a
|
|
225
|
-
};
|
|
226
|
-
}, t) || {})
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
const Y = /* @__PURE__ */ P({
|
|
230
|
-
__name: "VvIcon",
|
|
231
|
-
props: Ie,
|
|
232
|
-
setup(e) {
|
|
233
|
-
const n = e, t = H(!0), { modifiers: s } = S(n), r = oe(De), { bemCssClasses: i } = w("vv-icon", {
|
|
234
|
-
modifiers: s
|
|
235
|
-
}), a = y(() => n.provider || (r == null ? void 0 : r.provider)), u = y(() => {
|
|
236
|
-
const c = n.name || "", o = `@${a.value}:${n.prefix}:${n.name}`;
|
|
237
|
-
return Q(c) ? c : Q(o) ? o : (r == null ? void 0 : r.iconsCollections.find((f) => {
|
|
238
|
-
const v = `@${a.value}:${f.prefix}:${c}`;
|
|
239
|
-
if (Q(v))
|
|
240
|
-
return v;
|
|
241
|
-
})) || c;
|
|
466
|
+
}, lo = {
|
|
467
|
+
name: "VvIcon"
|
|
468
|
+
}, j = /* @__PURE__ */ B({
|
|
469
|
+
...lo,
|
|
470
|
+
props: no,
|
|
471
|
+
setup(o) {
|
|
472
|
+
const t = o, e = H(!0), { modifiers: n } = x(t), l = Ne(dt), { bemCssClasses: s } = L("vv-icon", {
|
|
473
|
+
modifiers: n
|
|
474
|
+
}), r = i(() => t.provider || (l == null ? void 0 : l.provider)), f = i(() => {
|
|
475
|
+
const u = t.name || "", d = `@${r.value}:${t.prefix}:${t.name}`;
|
|
476
|
+
return Ve(u) ? u : Ve(d) ? d : (l == null ? void 0 : l.iconsCollections.find((c) => {
|
|
477
|
+
const b = `@${r.value}:${c.prefix}:${u}`;
|
|
478
|
+
if (Ve(b))
|
|
479
|
+
return b;
|
|
480
|
+
})) || u;
|
|
242
481
|
});
|
|
243
|
-
function
|
|
244
|
-
let
|
|
482
|
+
function v(u) {
|
|
483
|
+
let d = null;
|
|
245
484
|
if (typeof window > "u") {
|
|
246
|
-
const { JSDOM:
|
|
247
|
-
|
|
485
|
+
const { JSDOM: y } = require("jsdom");
|
|
486
|
+
d = new y().window;
|
|
248
487
|
}
|
|
249
|
-
return (
|
|
488
|
+
return (d ? new d.DOMParser() : new window.DOMParser()).parseFromString(u, "text/html").querySelector("svg");
|
|
250
489
|
}
|
|
251
|
-
function
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
body:
|
|
255
|
-
height:
|
|
256
|
-
width:
|
|
490
|
+
function p(u) {
|
|
491
|
+
const d = v(u), c = (d == null ? void 0 : d.innerHTML.trim()) || "";
|
|
492
|
+
d && c && Nt(`@${r.value}:${t.prefix}:${t.name}`, {
|
|
493
|
+
body: c,
|
|
494
|
+
height: d.viewBox.baseVal.height,
|
|
495
|
+
width: d.viewBox.baseVal.width
|
|
257
496
|
});
|
|
258
497
|
}
|
|
259
|
-
return
|
|
260
|
-
|
|
261
|
-
}).catch((
|
|
262
|
-
throw new Error(`During fetch icon: ${
|
|
263
|
-
})) :
|
|
498
|
+
return l && (t.src && !Ve(`@${r.value}:${t.prefix}:${t.name}`) ? (e.value = !1, l.fetchIcon(t.src).then((u) => {
|
|
499
|
+
u && (p(u), e.value = !0);
|
|
500
|
+
}).catch((u) => {
|
|
501
|
+
throw new Error(`During fetch icon: ${u == null ? void 0 : u.message}`);
|
|
502
|
+
})) : t.svg && p(t.svg)), (u, d) => e.value ? (m(), G(a(Dt), D({
|
|
264
503
|
key: 0,
|
|
265
|
-
class:
|
|
504
|
+
class: a(s)
|
|
266
505
|
}, {
|
|
267
|
-
...
|
|
268
|
-
provider:
|
|
269
|
-
icon:
|
|
506
|
+
...u.$props,
|
|
507
|
+
provider: a(r),
|
|
508
|
+
icon: a(f)
|
|
270
509
|
}), null, 16, ["class"])) : O("", !0);
|
|
271
510
|
}
|
|
272
511
|
});
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
512
|
+
var pe = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(pe || {}), ct = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(ct || {}), ee = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ee || {}), vt = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(vt || {});
|
|
513
|
+
const ro = {
|
|
514
|
+
...J,
|
|
515
|
+
..._e,
|
|
516
|
+
icon: {
|
|
517
|
+
type: [String, Object],
|
|
518
|
+
default: ""
|
|
519
|
+
},
|
|
520
|
+
iconPosition: {
|
|
521
|
+
type: String,
|
|
522
|
+
default: "left",
|
|
523
|
+
validator: (o) => o in pe
|
|
524
|
+
},
|
|
525
|
+
label: [String, Number],
|
|
526
|
+
loading: Boolean,
|
|
527
|
+
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
528
|
+
loadingLabel: {
|
|
529
|
+
type: String,
|
|
530
|
+
default: "Loading..."
|
|
531
|
+
},
|
|
532
|
+
to: {
|
|
533
|
+
type: [String, Object]
|
|
534
|
+
},
|
|
535
|
+
href: String,
|
|
536
|
+
target: {
|
|
537
|
+
type: String,
|
|
538
|
+
validator: (o) => o in vt
|
|
539
|
+
},
|
|
540
|
+
active: Boolean,
|
|
541
|
+
pressed: Boolean,
|
|
542
|
+
rel: {
|
|
543
|
+
type: String,
|
|
544
|
+
default: "noopener noreferrer"
|
|
545
|
+
},
|
|
546
|
+
type: {
|
|
547
|
+
type: String,
|
|
548
|
+
default: "button",
|
|
549
|
+
validator: (o) => o in ct
|
|
297
550
|
}
|
|
551
|
+
};
|
|
552
|
+
function so(o) {
|
|
553
|
+
const { group: t, isInGroup: e, getGroupOrLocalRef: n } = Ae(ot), { iconPosition: l, icon: s, label: r, pressed: f } = x(o), v = n("modelValue", o), p = n("disabled", o), u = n("toggle", o), d = n("modifiers", o);
|
|
298
554
|
return {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
disabled: d,
|
|
310
|
-
toggle: c,
|
|
311
|
-
isInGroup: t,
|
|
312
|
-
group: n,
|
|
313
|
-
modifiers: o,
|
|
314
|
-
selected: u,
|
|
315
|
-
iconPosition: r,
|
|
316
|
-
icon: i,
|
|
317
|
-
label: a
|
|
555
|
+
modelValue: v,
|
|
556
|
+
disabled: p,
|
|
557
|
+
toggle: u,
|
|
558
|
+
isInGroup: e,
|
|
559
|
+
group: t,
|
|
560
|
+
modifiers: d,
|
|
561
|
+
pressed: f,
|
|
562
|
+
iconPosition: l,
|
|
563
|
+
icon: s,
|
|
564
|
+
label: r
|
|
318
565
|
};
|
|
319
566
|
}
|
|
320
|
-
const
|
|
567
|
+
const io = {
|
|
321
568
|
key: 1,
|
|
322
569
|
class: "vv-button__label"
|
|
323
|
-
},
|
|
570
|
+
}, uo = {
|
|
324
571
|
key: 1,
|
|
325
572
|
class: "vv-button__label"
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
573
|
+
}, co = {
|
|
574
|
+
name: "VvButton"
|
|
575
|
+
}, Ua = /* @__PURE__ */ B({
|
|
576
|
+
...co,
|
|
577
|
+
props: ro,
|
|
578
|
+
setup(o) {
|
|
579
|
+
const t = o, e = Ye(), n = oe(), l = (e == null ? void 0 : e.name) || ve(), {
|
|
580
|
+
modifiers: s,
|
|
581
|
+
iconPosition: r,
|
|
582
|
+
icon: f,
|
|
583
|
+
label: v,
|
|
584
|
+
modelValue: p,
|
|
585
|
+
disabled: u,
|
|
586
|
+
toggle: d,
|
|
587
|
+
isInGroup: c
|
|
588
|
+
} = so(t), b = Ne(dt), g = i(() => {
|
|
340
589
|
switch (!0) {
|
|
341
|
-
case
|
|
342
|
-
return
|
|
343
|
-
case
|
|
344
|
-
return
|
|
345
|
-
case
|
|
346
|
-
return
|
|
590
|
+
case u.value:
|
|
591
|
+
return ee.button;
|
|
592
|
+
case t.to !== void 0:
|
|
593
|
+
return b != null && b.nuxt ? ee.nuxtLink : ee.routerLink;
|
|
594
|
+
case t.href !== void 0:
|
|
595
|
+
return ee.a;
|
|
347
596
|
default:
|
|
348
|
-
return
|
|
597
|
+
return ee.button;
|
|
349
598
|
}
|
|
350
|
-
}),
|
|
351
|
-
modifiers:
|
|
352
|
-
active:
|
|
353
|
-
|
|
354
|
-
disabled:
|
|
355
|
-
reverse:
|
|
356
|
-
() => [
|
|
357
|
-
|
|
599
|
+
}), y = i(() => d.value ? Array.isArray(p.value) ? ce(l, p.value) : le(l, p.value) : t.pressed), { bemCssClasses: h } = L("vv-button", {
|
|
600
|
+
modifiers: s,
|
|
601
|
+
active: t.active,
|
|
602
|
+
pressed: y,
|
|
603
|
+
disabled: u,
|
|
604
|
+
reverse: i(
|
|
605
|
+
() => [pe.right, pe.bottom].includes(
|
|
606
|
+
r.value
|
|
358
607
|
)
|
|
359
608
|
),
|
|
360
|
-
column:
|
|
361
|
-
() => [
|
|
362
|
-
|
|
609
|
+
column: i(
|
|
610
|
+
() => [pe.top, pe.bottom].includes(
|
|
611
|
+
r.value
|
|
363
612
|
)
|
|
364
613
|
),
|
|
365
|
-
iconOnly:
|
|
366
|
-
}),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
614
|
+
iconOnly: i(() => (f == null ? void 0 : f.value) && !(v != null && v.value) && !n.default)
|
|
615
|
+
}), k = i(
|
|
616
|
+
() => typeof (f == null ? void 0 : f.value) == "string" ? { name: f == null ? void 0 : f.value } : f == null ? void 0 : f.value
|
|
617
|
+
), P = i(() => {
|
|
618
|
+
const A = {
|
|
619
|
+
class: h.value,
|
|
620
|
+
"aria-label": e["aria-label"],
|
|
621
|
+
"aria-pressed": y.value ? !0 : void 0
|
|
622
|
+
};
|
|
623
|
+
switch (g.value) {
|
|
624
|
+
case ee.a:
|
|
625
|
+
return {
|
|
626
|
+
...A,
|
|
627
|
+
role: "button",
|
|
628
|
+
href: t.href,
|
|
629
|
+
target: t.target,
|
|
630
|
+
rel: t.rel
|
|
631
|
+
};
|
|
632
|
+
case ee.routerLink:
|
|
633
|
+
case ee.nuxtLink:
|
|
634
|
+
return {
|
|
635
|
+
...A,
|
|
636
|
+
role: "button",
|
|
637
|
+
to: t.to,
|
|
638
|
+
target: t.target
|
|
639
|
+
};
|
|
640
|
+
default:
|
|
641
|
+
return {
|
|
642
|
+
...A,
|
|
643
|
+
type: t.type,
|
|
644
|
+
disabled: u.value
|
|
645
|
+
};
|
|
646
|
+
}
|
|
382
647
|
});
|
|
383
|
-
function
|
|
384
|
-
|
|
648
|
+
function I() {
|
|
649
|
+
c.value && (p.value = l);
|
|
385
650
|
}
|
|
386
|
-
return (
|
|
387
|
-
default:
|
|
388
|
-
C(
|
|
389
|
-
|
|
390
|
-
|
|
651
|
+
return (A, R) => (m(), G(ze(a(g)), D(a(P), { onClickPassive: I }), {
|
|
652
|
+
default: he(() => [
|
|
653
|
+
C(A.$slots, "default", {}, () => [
|
|
654
|
+
A.loading ? C(A.$slots, "loading", { key: 0 }, () => [
|
|
655
|
+
A.loadingIcon ? (m(), G(j, {
|
|
391
656
|
key: 0,
|
|
392
657
|
class: "vv-button__loading-icon",
|
|
393
|
-
name:
|
|
658
|
+
name: A.loadingIcon
|
|
394
659
|
}, null, 8, ["name"])) : O("", !0),
|
|
395
|
-
|
|
396
|
-
]) : (
|
|
397
|
-
C(
|
|
398
|
-
|
|
660
|
+
A.loadingLabel ? (m(), _("span", io, E(A.loadingLabel), 1)) : O("", !0)
|
|
661
|
+
]) : (m(), _(re, { key: 1 }, [
|
|
662
|
+
C(A.$slots, "before"),
|
|
663
|
+
a(f) ? (m(), G(j, D({
|
|
399
664
|
key: 0,
|
|
400
|
-
class: "vv-button__icon"
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
j(B(p(l)), 1)
|
|
665
|
+
class: "vv-button__icon"
|
|
666
|
+
}, a(k)), null, 16)) : O("", !0),
|
|
667
|
+
a(v) ? (m(), _("span", uo, [
|
|
668
|
+
C(A.$slots, "label", {}, () => [
|
|
669
|
+
K(E(a(v)), 1)
|
|
406
670
|
])
|
|
407
671
|
])) : O("", !0),
|
|
408
|
-
C(
|
|
672
|
+
C(A.$slots, "after")
|
|
409
673
|
], 64))
|
|
410
674
|
])
|
|
411
675
|
]),
|
|
412
676
|
_: 3
|
|
413
677
|
}, 16));
|
|
414
678
|
}
|
|
415
|
-
}),
|
|
416
|
-
...
|
|
417
|
-
|
|
418
|
-
}, Gt = /* @__PURE__ */ P({
|
|
419
|
-
__name: "VvBadge",
|
|
420
|
-
props: qe,
|
|
421
|
-
setup(e) {
|
|
422
|
-
const n = e, { modifiers: t } = S(n), { bemCssClasses: s } = w("vv-badge", {
|
|
423
|
-
modifiers: t
|
|
424
|
-
});
|
|
425
|
-
return (r, i) => (g(), _("span", {
|
|
426
|
-
class: N(p(s)),
|
|
427
|
-
role: "status"
|
|
428
|
-
}, B(r.value), 3));
|
|
429
|
-
}
|
|
430
|
-
}), Le = {
|
|
431
|
-
...z,
|
|
432
|
-
...te,
|
|
679
|
+
}), vo = {
|
|
680
|
+
...J,
|
|
681
|
+
..._e,
|
|
433
682
|
vertical: { type: Boolean, default: !1 },
|
|
434
683
|
compact: { type: Boolean, default: !1 },
|
|
435
684
|
toggle: { type: Boolean, default: !1 },
|
|
436
685
|
modelValue: { type: String, default: void 0 }
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
e
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
modifiers: l,
|
|
455
|
-
vertical: i,
|
|
456
|
-
compact: a
|
|
457
|
-
}), c = {
|
|
458
|
-
key: de,
|
|
459
|
-
modelValue: s,
|
|
460
|
-
disabled: r,
|
|
461
|
-
toggle: u,
|
|
462
|
-
modifiers: l != null && l.value ? l : H([])
|
|
686
|
+
}, po = ["update:modelValue"], fo = {
|
|
687
|
+
name: "VvButtonGroup"
|
|
688
|
+
}, qa = /* @__PURE__ */ B({
|
|
689
|
+
...fo,
|
|
690
|
+
props: vo,
|
|
691
|
+
emits: po,
|
|
692
|
+
setup(o, { emit: t }) {
|
|
693
|
+
const e = o, n = ke(e, "modelValue", t), { disabled: l, vertical: s, compact: r, toggle: f, modifiers: v } = x(e), { bemCssClasses: p } = L("vv-button-group", {
|
|
694
|
+
modifiers: v,
|
|
695
|
+
vertical: s,
|
|
696
|
+
compact: r
|
|
697
|
+
}), u = {
|
|
698
|
+
key: ot,
|
|
699
|
+
modelValue: n,
|
|
700
|
+
disabled: l,
|
|
701
|
+
toggle: f,
|
|
702
|
+
modifiers: v != null && v.value ? v : H([])
|
|
463
703
|
};
|
|
464
|
-
return
|
|
465
|
-
class:
|
|
704
|
+
return Pe(u), (d, c) => (m(), _("div", {
|
|
705
|
+
class: U(a(p)),
|
|
466
706
|
role: "group"
|
|
467
707
|
}, [
|
|
468
|
-
C(
|
|
708
|
+
C(d.$slots, "default")
|
|
469
709
|
], 2));
|
|
470
710
|
}
|
|
471
|
-
}),
|
|
472
|
-
title: String,
|
|
473
|
-
content: String,
|
|
474
|
-
open: Boolean,
|
|
475
|
-
iconRight: Boolean,
|
|
476
|
-
bordered: Boolean,
|
|
477
|
-
modifiers: [String, Array],
|
|
478
|
-
disabled: Boolean
|
|
479
|
-
}, Ue = ["update:open"];
|
|
480
|
-
function ze(e, n) {
|
|
481
|
-
const { group: t, isInGroup: s, getGroupOrLocalRef: r } = ne(fe), { modifiers: i } = S(e), a = r("modelValue", e, n), u = r("bordered", e), l = r("disabled", e), d = r("iconRight", e), c = r("accordion", e);
|
|
482
|
-
return {
|
|
483
|
-
modelValue: a,
|
|
484
|
-
disabled: l,
|
|
485
|
-
bordered: u,
|
|
486
|
-
iconRight: d,
|
|
487
|
-
isInGroup: s,
|
|
488
|
-
group: t,
|
|
489
|
-
accordion: c,
|
|
490
|
-
modifiers: i
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
const Ke = ["open"], Te = ["aria-controls", "aria-expanded"], Ze = ["aria-hidden"], We = /* @__PURE__ */ P({
|
|
494
|
-
__name: "VvAccordion",
|
|
495
|
-
props: Me,
|
|
496
|
-
emits: Ue,
|
|
497
|
-
setup(e, { emit: n }) {
|
|
498
|
-
const t = e, s = Z(), r = (s == null ? void 0 : s.name) || ee(), {
|
|
499
|
-
modelValue: i,
|
|
500
|
-
modifiers: a,
|
|
501
|
-
bordered: u,
|
|
502
|
-
disabled: l = H(!1),
|
|
503
|
-
iconRight: d,
|
|
504
|
-
isInGroup: c,
|
|
505
|
-
accordion: o
|
|
506
|
-
} = ze(t, n), f = y(() => c.value ? o.value ? b.equals(r, i.value) : b.contains(r, i.value) : t.open), { bemCssClasses: v } = w("vv-accordion", {
|
|
507
|
-
modifiers: a,
|
|
508
|
-
disabled: l,
|
|
509
|
-
markerRight: y(() => d.value),
|
|
510
|
-
bordered: u
|
|
511
|
-
}), h = (V) => {
|
|
512
|
-
const A = V.target;
|
|
513
|
-
n("update:open", A.open);
|
|
514
|
-
}, m = (V) => {
|
|
515
|
-
c.value && (o.value ? i.value = f.value ? null : r : i.value = f.value ? b.removeFromList(
|
|
516
|
-
r,
|
|
517
|
-
i.value
|
|
518
|
-
) : [...i.value, r], V.preventDefault());
|
|
519
|
-
};
|
|
520
|
-
return (V, A) => (g(), _("details", {
|
|
521
|
-
class: N(p(v)),
|
|
522
|
-
open: p(f),
|
|
523
|
-
onToggle: h,
|
|
524
|
-
onClick: m
|
|
525
|
-
}, [
|
|
526
|
-
$("summary", {
|
|
527
|
-
"aria-controls": `#${p(r)}`,
|
|
528
|
-
"aria-expanded": p(f),
|
|
529
|
-
class: "vv-collapse__summary"
|
|
530
|
-
}, [
|
|
531
|
-
C(V.$slots, "header", {}, () => [
|
|
532
|
-
j(B(V.title), 1)
|
|
533
|
-
])
|
|
534
|
-
], 8, Te),
|
|
535
|
-
$("div", {
|
|
536
|
-
"aria-hidden": !p(f),
|
|
537
|
-
class: "vv-collapse__content"
|
|
538
|
-
}, [
|
|
539
|
-
C(V.$slots, "details", {}, () => [
|
|
540
|
-
j(B(V.content), 1)
|
|
541
|
-
])
|
|
542
|
-
], 8, Ze)
|
|
543
|
-
], 42, Ke));
|
|
544
|
-
}
|
|
545
|
-
}), Je = {
|
|
546
|
-
modelValue: [String, Array],
|
|
547
|
-
iconRight: Boolean,
|
|
548
|
-
bordered: Boolean,
|
|
549
|
-
items: { type: Array, default: () => [] },
|
|
550
|
-
accordion: Boolean,
|
|
551
|
-
modifiers: [String, Array],
|
|
552
|
-
disabled: Boolean
|
|
553
|
-
}, Xe = ["update:open"], Rt = /* @__PURE__ */ P({
|
|
554
|
-
__name: "VvAccordionGroup",
|
|
555
|
-
props: Je,
|
|
556
|
-
emits: Xe,
|
|
557
|
-
setup(e, { emit: n }) {
|
|
558
|
-
const t = e, s = J(t, "modelValue", n), { disabled: r, bordered: i, iconRight: a, accordion: u, modifiers: l, items: d } = S(t);
|
|
559
|
-
re({
|
|
560
|
-
key: fe,
|
|
561
|
-
modelValue: s,
|
|
562
|
-
disabled: r,
|
|
563
|
-
bordered: i,
|
|
564
|
-
iconRight: a,
|
|
565
|
-
accordion: u
|
|
566
|
-
});
|
|
567
|
-
const { bemCssClasses: o } = w("vv-accordion-group", {
|
|
568
|
-
modifiers: l,
|
|
569
|
-
disabled: r
|
|
570
|
-
});
|
|
571
|
-
return (f, v) => {
|
|
572
|
-
var h;
|
|
573
|
-
return g(), _("div", {
|
|
574
|
-
class: N(p(o))
|
|
575
|
-
}, [
|
|
576
|
-
((h = t.items) == null ? void 0 : h.length) > 0 ? (g(!0), _(U, { key: 0 }, W(p(d), (m) => (g(), I(We, E({
|
|
577
|
-
key: m.title
|
|
578
|
-
}, {
|
|
579
|
-
name: m.name,
|
|
580
|
-
title: m.title,
|
|
581
|
-
content: m.content,
|
|
582
|
-
...t
|
|
583
|
-
}), null, 16))), 128)) : C(f.$slots, "default", { key: 1 })
|
|
584
|
-
], 2);
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
}), Qe = {
|
|
588
|
-
...z,
|
|
589
|
-
routes: Array,
|
|
590
|
-
multiline: Boolean
|
|
591
|
-
}, Ye = { class: "vv-breadcrumb__list" }, xe = ["content"], Dt = /* @__PURE__ */ P({
|
|
592
|
-
__name: "VvBreadcrumb",
|
|
593
|
-
props: Qe,
|
|
594
|
-
setup(e) {
|
|
595
|
-
const n = e, { modifiers: t, multiline: s } = S(n), { bemCssClasses: r } = w("vv-breadcrumb", {
|
|
596
|
-
modifiers: t,
|
|
597
|
-
multiline: s
|
|
598
|
-
});
|
|
599
|
-
return (i, a) => (g(), _("nav", {
|
|
600
|
-
class: N(p(r)),
|
|
601
|
-
"aria-label": "breadcrumbs"
|
|
602
|
-
}, [
|
|
603
|
-
$("ol", Ye, [
|
|
604
|
-
(g(!0), _(U, null, W(i.routes, (u, l) => {
|
|
605
|
-
var d, c, o, f;
|
|
606
|
-
return g(), _("li", {
|
|
607
|
-
key: `${u.label}-${l}`,
|
|
608
|
-
class: N({
|
|
609
|
-
"vv-breadcrumb__item": l < Number((d = i.routes) == null ? void 0 : d.length) - 1,
|
|
610
|
-
"vv-breadcrumb__item-active": l === Number((c = i.routes) == null ? void 0 : c.length) - 1
|
|
611
|
-
}),
|
|
612
|
-
itemprop: "itemListElement",
|
|
613
|
-
itemtype: "https://schema.org/ListItem",
|
|
614
|
-
itemscope: ""
|
|
615
|
-
}, [
|
|
616
|
-
(g(), I(ae(u.to ? "router-link" : u.href ? "a" : "span"), E(u, {
|
|
617
|
-
class: {
|
|
618
|
-
"vv-breadcrumb__link": l < Number((o = i.routes) == null ? void 0 : o.length) - 1
|
|
619
|
-
},
|
|
620
|
-
"aria-current": l === Number((f = i.routes) == null ? void 0 : f.length) - 1 ? "page" : void 0,
|
|
621
|
-
itemprop: "item"
|
|
622
|
-
}), {
|
|
623
|
-
default: x(() => [
|
|
624
|
-
j(B(u.label) + " ", 1)
|
|
625
|
-
]),
|
|
626
|
-
_: 2
|
|
627
|
-
}, 1040, ["class", "aria-current"])),
|
|
628
|
-
$("meta", {
|
|
629
|
-
itemprop: "position",
|
|
630
|
-
content: `${l + 1}`
|
|
631
|
-
}, null, 8, xe)
|
|
632
|
-
], 2);
|
|
633
|
-
}), 128))
|
|
634
|
-
])
|
|
635
|
-
], 2));
|
|
636
|
-
}
|
|
637
|
-
}), et = {
|
|
711
|
+
}), mo = {
|
|
638
712
|
title: String,
|
|
639
713
|
modifiers: [String, Array]
|
|
640
|
-
},
|
|
714
|
+
}, bo = {
|
|
641
715
|
key: 0,
|
|
642
716
|
class: "vv-card__header"
|
|
643
|
-
},
|
|
717
|
+
}, go = {
|
|
644
718
|
key: 1,
|
|
645
719
|
class: "vv-card__content"
|
|
646
|
-
},
|
|
720
|
+
}, yo = {
|
|
647
721
|
key: 2,
|
|
648
722
|
class: "vv-card__footer"
|
|
649
|
-
},
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
723
|
+
}, ho = {
|
|
724
|
+
name: "VvCard"
|
|
725
|
+
}, Ka = /* @__PURE__ */ B({
|
|
726
|
+
...ho,
|
|
727
|
+
props: mo,
|
|
728
|
+
setup(o) {
|
|
729
|
+
const t = o, { bemCssClasses: e } = L("vv-card", {
|
|
730
|
+
modifiers: t.modifiers
|
|
731
|
+
});
|
|
732
|
+
return (n, l) => (m(), _("article", {
|
|
733
|
+
class: U(a(e))
|
|
734
|
+
}, [
|
|
735
|
+
n.$slots.header || n.title ? (m(), _("header", bo, [
|
|
736
|
+
C(n.$slots, "header", {}, () => [
|
|
737
|
+
K(E(n.title), 1)
|
|
660
738
|
])
|
|
661
739
|
])) : O("", !0),
|
|
662
|
-
C(
|
|
663
|
-
|
|
664
|
-
C(
|
|
740
|
+
C(n.$slots, "default"),
|
|
741
|
+
n.$slots.content ? (m(), _("div", go, [
|
|
742
|
+
C(n.$slots, "content")
|
|
665
743
|
])) : O("", !0),
|
|
666
|
-
|
|
667
|
-
C(
|
|
744
|
+
n.$slots.footer ? (m(), _("footer", yo, [
|
|
745
|
+
C(n.$slots, "footer")
|
|
668
746
|
])) : O("", !0)
|
|
669
|
-
],
|
|
747
|
+
], 2));
|
|
670
748
|
}
|
|
671
|
-
}),
|
|
749
|
+
}), _o = {
|
|
750
|
+
...se,
|
|
672
751
|
...ie,
|
|
673
752
|
...ue,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
falseValue: { type: null, default: !1 },
|
|
679
|
-
switch: Boolean,
|
|
753
|
+
id: [String, Number],
|
|
754
|
+
name: { type: String, required: !0 },
|
|
755
|
+
value: [String, Number, Boolean],
|
|
756
|
+
modelValue: [Object, Number, Boolean, String],
|
|
680
757
|
label: String,
|
|
681
758
|
disabled: Boolean,
|
|
682
|
-
readonly: Boolean
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
function at(e, n) {
|
|
691
|
-
const { group: t, isInGroup: s, getGroupOrLocalRef: r } = ne(ve), { valid: i, error: a, switch: u } = S(e), l = r("modelValue", e, n), d = r("readonly", e), c = r("disabled", e);
|
|
759
|
+
readonly: Boolean,
|
|
760
|
+
trueValue: { type: [String, Number, Boolean], default: void 0 },
|
|
761
|
+
falseValue: { type: [String, Number, Boolean], default: void 0 },
|
|
762
|
+
switch: Boolean,
|
|
763
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
764
|
+
}, So = ["click", "update:modelValue", "change", "blur"];
|
|
765
|
+
function Vo(o, t) {
|
|
766
|
+
const { group: e, isInGroup: n, getGroupOrLocalRef: l } = Ae(nt), { valid: s, error: r, switch: f } = x(o), v = l("modelValue", o, t), p = l("readonly", o), u = l("disabled", o);
|
|
692
767
|
return {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
modelValue:
|
|
699
|
-
readonly:
|
|
700
|
-
disabled:
|
|
768
|
+
valid: s,
|
|
769
|
+
error: r,
|
|
770
|
+
propsSwitch: f,
|
|
771
|
+
group: e,
|
|
772
|
+
isInGroup: n,
|
|
773
|
+
modelValue: v,
|
|
774
|
+
readonly: p,
|
|
775
|
+
disabled: u
|
|
701
776
|
};
|
|
702
777
|
}
|
|
703
|
-
function
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
778
|
+
function $e(o) {
|
|
779
|
+
return Array.isArray(o) ? o.filter((t) => xt(t)).join(" ") : o;
|
|
780
|
+
}
|
|
781
|
+
function de(o, t) {
|
|
782
|
+
const {
|
|
783
|
+
error: e,
|
|
784
|
+
valid: n,
|
|
785
|
+
hint: l,
|
|
786
|
+
loading: s
|
|
787
|
+
} = t, {
|
|
788
|
+
hintLabel: r,
|
|
789
|
+
modelValue: f,
|
|
790
|
+
valid: v,
|
|
791
|
+
validLabel: p,
|
|
792
|
+
error: u,
|
|
793
|
+
errorLabel: d,
|
|
794
|
+
...c
|
|
795
|
+
} = x(o), b = Ce(c, "loading"), g = Ce(c, "loadingLabel"), y = i(() => u.value ? !!(u.value && e || d != null && d.value && Array.isArray(d.value) && d.value.length > 0 || d != null && d.value && !z(d)) : !1), h = i(
|
|
796
|
+
() => !!(r && r.value || l)
|
|
797
|
+
), k = i(
|
|
798
|
+
() => !!(p && p.value || n)
|
|
799
|
+
), P = i(
|
|
800
|
+
() => !!(b != null && b.value && s || b != null && b.value && (g != null && g.value))
|
|
801
|
+
), I = i(
|
|
802
|
+
() => h.value || k || y.value || P.value
|
|
803
|
+
);
|
|
804
|
+
return {
|
|
805
|
+
hasErrors: y,
|
|
806
|
+
hasHint: h,
|
|
807
|
+
hasValid: k,
|
|
808
|
+
hasLoading: P,
|
|
809
|
+
HintSlot: {
|
|
810
|
+
name: "HintSlot",
|
|
811
|
+
props: {
|
|
812
|
+
params: {
|
|
813
|
+
type: Object,
|
|
814
|
+
default: () => ({})
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
setup(A) {
|
|
818
|
+
const R = i(() => {
|
|
819
|
+
const M = Bt({
|
|
820
|
+
hintLabel: r,
|
|
821
|
+
modelValue: f,
|
|
822
|
+
valid: v,
|
|
823
|
+
validLabel: p,
|
|
824
|
+
error: u,
|
|
825
|
+
errorLabel: d,
|
|
826
|
+
loading: b,
|
|
827
|
+
loadingLabel: g,
|
|
828
|
+
...A.params
|
|
829
|
+
});
|
|
830
|
+
return u != null && u.value ? (e == null ? void 0 : e(M)) || $e(d == null ? void 0 : d.value) || (r == null ? void 0 : r.value) : v != null && v.value ? (n == null ? void 0 : n(M)) || $e(p == null ? void 0 : p.value) || (r == null ? void 0 : r.value) : b != null && b.value ? (s == null ? void 0 : s(M)) || $e(g == null ? void 0 : g.value) || (r == null ? void 0 : r.value) : (l == null ? void 0 : l(M)) || $e(r == null ? void 0 : r.value) || (r == null ? void 0 : r.value);
|
|
831
|
+
});
|
|
832
|
+
return {
|
|
833
|
+
isVisible: I,
|
|
834
|
+
hasErrors: y,
|
|
835
|
+
hasValid: k,
|
|
836
|
+
hintContent: R
|
|
837
|
+
};
|
|
838
|
+
},
|
|
839
|
+
render() {
|
|
840
|
+
if (this.isVisible)
|
|
841
|
+
return W(
|
|
842
|
+
"small",
|
|
843
|
+
{
|
|
844
|
+
role: this.hasErrors || this.hasValid ? "alert" : void 0
|
|
845
|
+
},
|
|
846
|
+
this.hintContent
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
709
850
|
};
|
|
710
851
|
}
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
},
|
|
714
|
-
...
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
852
|
+
const $o = ["for"], Co = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ko = {
|
|
853
|
+
name: "VvCheckbox"
|
|
854
|
+
}, Ao = /* @__PURE__ */ B({
|
|
855
|
+
...ko,
|
|
856
|
+
props: _o,
|
|
857
|
+
emits: So,
|
|
858
|
+
setup(o, { emit: t }) {
|
|
859
|
+
const e = o, n = oe(), { disabled: l, readonly: s, valid: r, error: f, propsSwitch: v, modelValue: p } = Vo(e, t), u = H(), d = i(
|
|
860
|
+
() => e.id !== void 0 ? String(e.id) : void 0
|
|
861
|
+
), c = i(
|
|
862
|
+
() => e.trueValue !== void 0 && e.falseValue !== void 0
|
|
863
|
+
), b = i(() => l.value || s.value), g = i(() => b.value ? -1 : e.tabindex), y = i(() => {
|
|
864
|
+
if (e.error === !0)
|
|
865
|
+
return !0;
|
|
866
|
+
if (e.valid === !0)
|
|
867
|
+
return !1;
|
|
868
|
+
}), h = i(() => c.value ? p.value === e.trueValue : Array.isArray(p.value) ? ce(e.value, p.value) : le(e.value, p.value)), k = i(() => {
|
|
869
|
+
if (!c.value)
|
|
870
|
+
return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
|
|
871
|
+
}), P = i({
|
|
872
|
+
get() {
|
|
873
|
+
return h.value;
|
|
874
|
+
},
|
|
875
|
+
set(R) {
|
|
876
|
+
if (c.value) {
|
|
877
|
+
p.value = R ? e.trueValue : e.falseValue;
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
if (Array.isArray(p.value)) {
|
|
881
|
+
p.value = R ? [...p.value, e.value] : Le(e.value, p.value);
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
p.value = R ? e.value : null, t("change", R);
|
|
729
885
|
}
|
|
730
|
-
),
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
})
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
);
|
|
741
|
-
return {
|
|
742
|
-
for: G || F,
|
|
743
|
-
style: X,
|
|
744
|
-
...pe
|
|
745
|
-
};
|
|
746
|
-
}), R = y(() => {
|
|
747
|
-
const { id: G = "", name: F = "" } = s;
|
|
748
|
-
return {
|
|
749
|
-
type: "checkbox",
|
|
750
|
-
id: G || F,
|
|
751
|
-
name: F,
|
|
752
|
-
value: t.value,
|
|
753
|
-
disabled: r.value,
|
|
754
|
-
readonly: i.value,
|
|
755
|
-
checked: f.value,
|
|
756
|
-
...D.value
|
|
757
|
-
};
|
|
758
|
-
}), D = y(() => {
|
|
759
|
-
const { name: G } = s, F = b.pickBy(
|
|
760
|
-
s,
|
|
761
|
-
(X) => X.startsWith("aria-")
|
|
886
|
+
}), { bemCssClasses: I } = L("vv-checkbox", {
|
|
887
|
+
switch: v,
|
|
888
|
+
valid: r,
|
|
889
|
+
invalid: f,
|
|
890
|
+
disabled: l,
|
|
891
|
+
readonly: s
|
|
892
|
+
});
|
|
893
|
+
We(() => {
|
|
894
|
+
c.value && Array.isArray(p.value) && console.warn(
|
|
895
|
+
"[VvCheckbox] The model value is an array but the component is in binary mode."
|
|
762
896
|
);
|
|
763
|
-
return {
|
|
764
|
-
"aria-label": G,
|
|
765
|
-
"aria-checked": f.value,
|
|
766
|
-
...F
|
|
767
|
-
};
|
|
768
897
|
});
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
d
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
if (Array.isArray(d.value)) {
|
|
779
|
-
d.value = f.value ? b.removeFromList(t.value, d.value) : [...d.value, t.value];
|
|
780
|
-
return;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
function M(G) {
|
|
784
|
-
r.value || (n("click", G), n("change", f.value ? t.value : null), o.value = !0);
|
|
785
|
-
}
|
|
786
|
-
return (G, F) => (g(), _("label", E({ class: p(m) }, p(A), { onClick: M }), [
|
|
787
|
-
$("input", E({
|
|
898
|
+
const { HintSlot: A } = de(e, n);
|
|
899
|
+
return (R, M) => (m(), _("label", {
|
|
900
|
+
class: U(a(I)),
|
|
901
|
+
for: a(d)
|
|
902
|
+
}, [
|
|
903
|
+
ne(w("input", {
|
|
904
|
+
id: a(d),
|
|
788
905
|
ref_key: "input",
|
|
789
|
-
ref:
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
906
|
+
ref: u,
|
|
907
|
+
"onUpdate:modelValue": M[0] || (M[0] = (X) => be(P) ? P.value = X : null),
|
|
908
|
+
type: "checkbox",
|
|
909
|
+
class: "vv-checkbox__input",
|
|
910
|
+
name: R.name,
|
|
911
|
+
disabled: a(b),
|
|
912
|
+
value: a(k),
|
|
913
|
+
tabindex: a(g),
|
|
914
|
+
"aria-invalid": a(y)
|
|
915
|
+
}, null, 8, Co), [
|
|
916
|
+
[At, a(P)]
|
|
917
|
+
]),
|
|
918
|
+
C(R.$slots, "default", { value: a(p) }, () => [
|
|
919
|
+
K(E(R.label), 1)
|
|
920
|
+
]),
|
|
921
|
+
q(a(A), {
|
|
922
|
+
class: "vv-checkbox__hint",
|
|
923
|
+
params: { value: a(p) }
|
|
924
|
+
}, null, 8, ["params"])
|
|
925
|
+
], 10, $o));
|
|
796
926
|
}
|
|
797
|
-
})
|
|
927
|
+
});
|
|
928
|
+
function pt(o) {
|
|
929
|
+
const { options: t, optionLabel: e, optionValue: n } = x(o);
|
|
930
|
+
return {
|
|
931
|
+
options: t,
|
|
932
|
+
getOptionLabel: (r) => typeof r != "object" && r !== null ? r : typeof e.value == "function" ? e.value(r) : r[e.value],
|
|
933
|
+
getOptionValue: (r) => typeof r != "object" && r !== null ? r : typeof n.value == "function" ? n.value(r) : r[n.value]
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
const Po = {
|
|
937
|
+
...se,
|
|
798
938
|
...ie,
|
|
799
939
|
...ue,
|
|
800
|
-
...
|
|
801
|
-
...Ee,
|
|
940
|
+
...st,
|
|
802
941
|
modelValue: { type: Array },
|
|
803
942
|
label: { type: String, default: "" },
|
|
804
943
|
name: { type: String, default: "", required: !0 },
|
|
805
944
|
disabled: { type: Boolean, default: !1 },
|
|
806
945
|
readonly: { type: Boolean, default: !1 },
|
|
807
946
|
vertical: { type: Boolean, default: !1 }
|
|
808
|
-
},
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
function ft(e, n) {
|
|
822
|
-
return {
|
|
823
|
-
name: "HintSlot",
|
|
824
|
-
props: {
|
|
825
|
-
params: {
|
|
826
|
-
type: Object,
|
|
827
|
-
default: () => ({})
|
|
828
|
-
}
|
|
829
|
-
},
|
|
830
|
-
setup(t) {
|
|
831
|
-
const s = S(e), {
|
|
832
|
-
error: r,
|
|
833
|
-
valid: i,
|
|
834
|
-
hint: a,
|
|
835
|
-
loading: u
|
|
836
|
-
} = n, {
|
|
837
|
-
hintLabel: l,
|
|
838
|
-
modelValue: d,
|
|
839
|
-
valid: c,
|
|
840
|
-
validLabel: o,
|
|
841
|
-
error: f,
|
|
842
|
-
errorLabel: v
|
|
843
|
-
} = s, h = b.resolveFieldData(s, "loading"), m = b.resolveFieldData(
|
|
844
|
-
s,
|
|
845
|
-
"loadingLabel"
|
|
846
|
-
), V = y(() => f.value ? !!(f.value && r || (v == null ? void 0 : v.value) && Array.isArray(v.value) && v.value.length > 0 || (v == null ? void 0 : v.value) && b.isNotEmpty(v.value)) : !1), A = y(() => !!(l && l.value || a || i || o && o.value || V.value || (h == null ? void 0 : h.value) && u || (h == null ? void 0 : h.value) && (m == null ? void 0 : m.value))), R = y(() => {
|
|
847
|
-
const D = we({
|
|
848
|
-
hintLabel: l,
|
|
849
|
-
modelValue: d,
|
|
850
|
-
valid: c,
|
|
851
|
-
validLabel: o,
|
|
852
|
-
error: f,
|
|
853
|
-
errorLabel: v,
|
|
854
|
-
loading: h,
|
|
855
|
-
loadingLabel: m,
|
|
856
|
-
...t.params
|
|
857
|
-
});
|
|
858
|
-
return f != null && f.value ? (r == null ? void 0 : r(D)) || K(v == null ? void 0 : v.value) || (l == null ? void 0 : l.value) : c != null && c.value ? (i == null ? void 0 : i(D)) || K(o == null ? void 0 : o.value) || (l == null ? void 0 : l.value) : h != null && h.value ? (u == null ? void 0 : u(D)) || K(m == null ? void 0 : m.value) || (l == null ? void 0 : l.value) : (a == null ? void 0 : a(D)) || K(l == null ? void 0 : l.value) || (l == null ? void 0 : l.value);
|
|
859
|
-
});
|
|
860
|
-
return {
|
|
861
|
-
hasHint: A,
|
|
862
|
-
hintContent: R
|
|
863
|
-
};
|
|
864
|
-
},
|
|
865
|
-
render() {
|
|
866
|
-
if (this.hasHint)
|
|
867
|
-
return _e(
|
|
868
|
-
"pre",
|
|
869
|
-
{ style: { "white-space": "pre" } },
|
|
870
|
-
this.hintContent
|
|
871
|
-
);
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
}
|
|
875
|
-
const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" }, jt = /* @__PURE__ */ P({
|
|
876
|
-
__name: "VvCheckGroup",
|
|
877
|
-
props: ct,
|
|
878
|
-
emits: dt,
|
|
879
|
-
setup(e, { emit: n }) {
|
|
880
|
-
const t = e, s = se(), r = J(t, "modelValue", n), { disabled: i, readonly: a, error: u, valid: l } = S(t);
|
|
881
|
-
re({
|
|
882
|
-
key: ve,
|
|
883
|
-
modelValue: r,
|
|
884
|
-
disabled: i,
|
|
885
|
-
readonly: a
|
|
947
|
+
}, Oo = ["update:modelValue", "change"], wo = ["textContent"], Io = { class: "vv-checkbox-group__wrapper" }, Eo = {
|
|
948
|
+
name: "VvCheckboxGroup"
|
|
949
|
+
}, Ya = /* @__PURE__ */ B({
|
|
950
|
+
...Eo,
|
|
951
|
+
props: Po,
|
|
952
|
+
emits: Oo,
|
|
953
|
+
setup(o, { emit: t }) {
|
|
954
|
+
const e = o, n = oe(), l = ke(e, "modelValue", t), { disabled: s, readonly: r, error: f, valid: v } = x(e);
|
|
955
|
+
Pe({
|
|
956
|
+
key: nt,
|
|
957
|
+
modelValue: l,
|
|
958
|
+
disabled: s,
|
|
959
|
+
readonly: r
|
|
886
960
|
});
|
|
887
|
-
const { getOptionLabel:
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}), h = ft(t, s);
|
|
900
|
-
return (m, V) => (g(), _("fieldset", {
|
|
901
|
-
class: N(p(f))
|
|
961
|
+
const { getOptionLabel: u, getOptionValue: d } = pt(e), { bemCssClasses: c } = L("vv-checkbox-group", {
|
|
962
|
+
horizontal: i(() => !e.vertical),
|
|
963
|
+
valid: v,
|
|
964
|
+
invalid: f
|
|
965
|
+
}), b = (y, h) => ({
|
|
966
|
+
id: `${e.name}_opt${h}`,
|
|
967
|
+
name: e.name,
|
|
968
|
+
label: u(y),
|
|
969
|
+
value: d(y)
|
|
970
|
+
}), { HintSlot: g } = de(e, n);
|
|
971
|
+
return (y, h) => (m(), _("fieldset", {
|
|
972
|
+
class: U(a(c))
|
|
902
973
|
}, [
|
|
903
|
-
|
|
974
|
+
y.label ? (m(), _("legend", {
|
|
904
975
|
key: 0,
|
|
905
|
-
textContent:
|
|
906
|
-
}, null, 8,
|
|
907
|
-
|
|
908
|
-
|
|
976
|
+
textContent: E(y.label)
|
|
977
|
+
}, null, 8, wo)) : O("", !0),
|
|
978
|
+
w("div", Io, [
|
|
979
|
+
y.options.length > 0 ? (m(!0), _(re, { key: 0 }, ge(y.options, (k, P) => (m(), G(Ao, D({ key: P }, b(k, P)), null, 16))), 128)) : C(y.$slots, "default", { key: 1 })
|
|
909
980
|
]),
|
|
910
|
-
|
|
981
|
+
q(a(g), { class: "vv-checkbox-group__hint" })
|
|
911
982
|
], 2));
|
|
912
983
|
}
|
|
913
|
-
}),
|
|
914
|
-
normal: "",
|
|
915
|
-
small: "small",
|
|
916
|
-
fullscreen: "fullscreen"
|
|
917
|
-
}, gt = ["open", "close", "update:open"], yt = {
|
|
984
|
+
}), To = ["open", "close", "update:modelValue"], Bo = {
|
|
918
985
|
id: { type: String, required: !0 },
|
|
919
986
|
title: String,
|
|
920
|
-
|
|
987
|
+
modelValue: Boolean,
|
|
921
988
|
transition: { type: String, default: "fade-block" },
|
|
922
|
-
size:
|
|
923
|
-
type: String,
|
|
924
|
-
default: T.normal,
|
|
925
|
-
validator: (e) => Object.values(T).includes(e)
|
|
926
|
-
},
|
|
989
|
+
size: String,
|
|
927
990
|
autoClose: { type: Boolean, default: !0 }
|
|
928
|
-
},
|
|
991
|
+
}, Ro = {
|
|
929
992
|
key: 0,
|
|
930
993
|
class: "vv-dialog__header"
|
|
931
|
-
},
|
|
994
|
+
}, Do = ["onClick"], No = { class: "vv-dialog__content" }, Lo = {
|
|
932
995
|
key: 1,
|
|
933
996
|
class: "vv-dialog__footer"
|
|
934
|
-
},
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
997
|
+
}, xo = {
|
|
998
|
+
name: "VvDialog"
|
|
999
|
+
}, Fa = /* @__PURE__ */ B({
|
|
1000
|
+
...xo,
|
|
1001
|
+
props: Bo,
|
|
1002
|
+
emits: To,
|
|
1003
|
+
setup(o, { emit: t }) {
|
|
1004
|
+
const e = o, n = ke(e, "modelValue", t), l = H(!0), s = H(null), r = i(() => {
|
|
1005
|
+
const { id: d } = e;
|
|
941
1006
|
return {
|
|
942
|
-
id:
|
|
943
|
-
open:
|
|
1007
|
+
id: d,
|
|
1008
|
+
open: l.value
|
|
944
1009
|
};
|
|
945
|
-
}),
|
|
946
|
-
"
|
|
947
|
-
|
|
948
|
-
"vv-dialog--fullscreen": t.size === T.fullscreen
|
|
949
|
-
})), l = y(() => `vv-dialog--${t.transition}`), d = {
|
|
950
|
-
"after-enter": () => {
|
|
951
|
-
r.value = !0, n("open");
|
|
1010
|
+
}), f = i(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), v = i(() => `vv-dialog--${e.transition}`), p = {
|
|
1011
|
+
"before-enter": () => {
|
|
1012
|
+
l.value = !0, t("open");
|
|
952
1013
|
},
|
|
953
1014
|
"after-leave": () => {
|
|
954
|
-
|
|
1015
|
+
l.value = !1, t("close");
|
|
955
1016
|
}
|
|
956
1017
|
};
|
|
957
|
-
|
|
958
|
-
|
|
1018
|
+
et(s, () => {
|
|
1019
|
+
e.autoClose && (n.value = !1);
|
|
959
1020
|
});
|
|
960
|
-
function
|
|
961
|
-
|
|
1021
|
+
function u() {
|
|
1022
|
+
n.value = !1;
|
|
962
1023
|
}
|
|
963
|
-
return (
|
|
964
|
-
default:
|
|
965
|
-
|
|
966
|
-
|
|
1024
|
+
return (d, c) => (m(), G(Pt, D({ name: a(v) }, Ot(p)), {
|
|
1025
|
+
default: he(() => [
|
|
1026
|
+
ne(w("dialog", D(a(r), { class: a(f) }), [
|
|
1027
|
+
w("article", {
|
|
967
1028
|
ref_key: "modalWrapper",
|
|
968
|
-
ref:
|
|
1029
|
+
ref: s,
|
|
969
1030
|
class: "vv-dialog__wrapper"
|
|
970
1031
|
}, [
|
|
971
|
-
|
|
972
|
-
C(
|
|
973
|
-
|
|
974
|
-
|
|
1032
|
+
d.$slots.header || d.title ? (m(), _("header", Ro, [
|
|
1033
|
+
C(d.$slots, "header", {}, () => [
|
|
1034
|
+
K(E(d.title) + " ", 1),
|
|
1035
|
+
w("button", {
|
|
975
1036
|
type: "button",
|
|
976
1037
|
"aria-label": "Close",
|
|
977
1038
|
class: "vv-dialog__close",
|
|
978
|
-
onClick:
|
|
1039
|
+
onClick: Fe(u, ["prevent"])
|
|
979
1040
|
}, [
|
|
980
|
-
|
|
981
|
-
], 8,
|
|
1041
|
+
q(j, { name: "close" })
|
|
1042
|
+
], 8, Do)
|
|
982
1043
|
])
|
|
983
1044
|
])) : O("", !0),
|
|
984
|
-
|
|
985
|
-
C(
|
|
1045
|
+
w("div", No, [
|
|
1046
|
+
C(d.$slots, "default")
|
|
986
1047
|
]),
|
|
987
|
-
|
|
988
|
-
C(
|
|
1048
|
+
d.$slots.footer ? (m(), _("footer", Lo, [
|
|
1049
|
+
C(d.$slots, "footer")
|
|
989
1050
|
])) : O("", !0)
|
|
990
1051
|
], 512)
|
|
991
1052
|
], 16), [
|
|
992
|
-
[
|
|
1053
|
+
[Xe, a(n)]
|
|
993
1054
|
])
|
|
994
1055
|
]),
|
|
995
1056
|
_: 3
|
|
996
1057
|
}, 16, ["name"]));
|
|
997
1058
|
}
|
|
998
|
-
}),
|
|
999
|
-
...
|
|
1000
|
-
...
|
|
1001
|
-
modelValue:
|
|
1059
|
+
}), Ho = {
|
|
1060
|
+
..._e,
|
|
1061
|
+
...J,
|
|
1062
|
+
modelValue: {
|
|
1063
|
+
type: [String, Number, Boolean, Object, Array],
|
|
1064
|
+
required: !0
|
|
1065
|
+
},
|
|
1002
1066
|
labelNoResult: { type: String, default: "No results" },
|
|
1003
1067
|
options: {
|
|
1004
1068
|
type: Array,
|
|
@@ -1009,81 +1073,1192 @@ const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" },
|
|
|
1009
1073
|
maxValues: [Number, String],
|
|
1010
1074
|
labelKey: { type: String, default: "label" },
|
|
1011
1075
|
valueKey: { type: String, default: "value" }
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
|
|
1076
|
+
}, Go = {
|
|
1077
|
+
key: 0,
|
|
1078
|
+
role: "option"
|
|
1079
|
+
}, jo = ["aria-selected"], Mo = ["for"], Uo = ["id", "type", "value", "checked", "disabled"], qo = {
|
|
1080
|
+
name: "VvDropdown"
|
|
1081
|
+
}, Ko = /* @__PURE__ */ B({
|
|
1082
|
+
...qo,
|
|
1083
|
+
props: Ho,
|
|
1015
1084
|
emits: ["update:modelValue"],
|
|
1016
|
-
setup(
|
|
1017
|
-
const
|
|
1018
|
-
modifiers:
|
|
1019
|
-
disabled:
|
|
1085
|
+
setup(o, { emit: t }) {
|
|
1086
|
+
const e = o, n = ve(), { modifiers: l, disabled: s } = x(e), { bemCssClasses: r } = L("vv-dropdown", {
|
|
1087
|
+
modifiers: l,
|
|
1088
|
+
disabled: s
|
|
1020
1089
|
});
|
|
1021
|
-
function
|
|
1022
|
-
return Array.isArray(
|
|
1090
|
+
function f(c) {
|
|
1091
|
+
return Array.isArray(e.modelValue) ? ce(c, e.modelValue) || ce(v(c), e.modelValue) : le(c, e.modelValue) || le(v(c), e.modelValue);
|
|
1023
1092
|
}
|
|
1024
|
-
function
|
|
1025
|
-
return typeof
|
|
1093
|
+
function v(c) {
|
|
1094
|
+
return typeof c == "string" ? c : String(c[e.valueKey]);
|
|
1026
1095
|
}
|
|
1027
|
-
function
|
|
1028
|
-
return typeof
|
|
1096
|
+
function p(c) {
|
|
1097
|
+
return typeof c == "string" ? c : c[e.labelKey];
|
|
1029
1098
|
}
|
|
1030
|
-
function c
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1099
|
+
function u(c) {
|
|
1100
|
+
return typeof c == "string" || c.disabled === void 0 ? s.value : c.disabled;
|
|
1101
|
+
}
|
|
1102
|
+
function d(c) {
|
|
1103
|
+
var h, k;
|
|
1104
|
+
const b = c.target;
|
|
1105
|
+
let g = b.value;
|
|
1106
|
+
if (g = (e.useObject ? (h = e.options) == null ? void 0 : h.find(
|
|
1107
|
+
(P) => P[e.valueKey] == g
|
|
1108
|
+
) : null) || g, e.multiple) {
|
|
1109
|
+
if (typeof e.maxValues < "u" && e.maxValues >= 0 && Array.isArray(e.modelValue) && ((k = e.modelValue) == null ? void 0 : k.length) >= e.maxValues && (Array.isArray(e.modelValue) && !ce(g, e.modelValue) || e.maxValues == 0)) {
|
|
1110
|
+
b.checked = !1;
|
|
1039
1111
|
return;
|
|
1040
1112
|
}
|
|
1041
|
-
Array.isArray(
|
|
1113
|
+
Array.isArray(e.modelValue) ? g = ce(g, e.modelValue) ? Le(g, e.modelValue) : [...e.modelValue, g] : g = [g];
|
|
1042
1114
|
}
|
|
1043
|
-
|
|
1115
|
+
t("update:modelValue", g);
|
|
1044
1116
|
}
|
|
1045
|
-
return (
|
|
1046
|
-
var
|
|
1047
|
-
return
|
|
1048
|
-
class:
|
|
1117
|
+
return (c, b) => {
|
|
1118
|
+
var g;
|
|
1119
|
+
return m(), _("ul", {
|
|
1120
|
+
class: U(a(r)),
|
|
1049
1121
|
role: "listbox"
|
|
1050
1122
|
}, [
|
|
1051
|
-
(
|
|
1052
|
-
|
|
1123
|
+
(g = c.options) != null && g.length ? O("", !0) : (m(), _("li", Go, [
|
|
1124
|
+
w("label", null, E(c.labelNoResult), 1)
|
|
1053
1125
|
])),
|
|
1054
|
-
(
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1126
|
+
(m(!0), _(re, null, ge(c.options, (y, h) => (m(), _("li", {
|
|
1127
|
+
key: h,
|
|
1128
|
+
role: "option",
|
|
1129
|
+
"aria-selected": f(y)
|
|
1130
|
+
}, [
|
|
1131
|
+
w("label", {
|
|
1132
|
+
for: `dropdown-${h}-${a(n)}`
|
|
1133
|
+
}, [
|
|
1134
|
+
w("input", {
|
|
1135
|
+
id: `dropdown-${h}-${a(n)}`,
|
|
1136
|
+
type: c.multiple ? "checkbox" : "radio",
|
|
1137
|
+
value: v(y),
|
|
1138
|
+
checked: f(y),
|
|
1139
|
+
disabled: u(y),
|
|
1140
|
+
tabindex: "-1",
|
|
1141
|
+
"aria-hidden": "true",
|
|
1142
|
+
onInput: d
|
|
1143
|
+
}, null, 40, Uo),
|
|
1144
|
+
K(" " + E(p(y)), 1)
|
|
1145
|
+
], 8, Mo)
|
|
1146
|
+
], 8, jo))), 128))
|
|
1072
1147
|
], 2);
|
|
1073
1148
|
};
|
|
1074
1149
|
}
|
|
1075
1150
|
});
|
|
1151
|
+
function ft(o, t, e) {
|
|
1152
|
+
const n = i(
|
|
1153
|
+
() => !!(o.value && t.value === "left" || e.iconLeft)
|
|
1154
|
+
), l = i(
|
|
1155
|
+
() => !!(o.value && t.value === "right" || e.iconRight)
|
|
1156
|
+
), s = i(
|
|
1157
|
+
() => !!(o.value && t.value === "top" || e.iconTop)
|
|
1158
|
+
), r = i(
|
|
1159
|
+
() => !!(o.value && t.value === "bottom" || e.iconBottom)
|
|
1160
|
+
);
|
|
1161
|
+
return {
|
|
1162
|
+
hasIconLeft: n,
|
|
1163
|
+
hasIconRight: l,
|
|
1164
|
+
hasIconTop: s,
|
|
1165
|
+
hasIconBottom: r
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1168
|
+
function mt(o, t) {
|
|
1169
|
+
const { focused: e } = tt(o);
|
|
1170
|
+
return Ze(e, (n) => {
|
|
1171
|
+
t(n ? "focus" : "blur", a(o));
|
|
1172
|
+
}), {
|
|
1173
|
+
focused: e
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
function bt(o, t, e = 0) {
|
|
1177
|
+
let n;
|
|
1178
|
+
return typeof e == "string" && (e = parseInt(e)), i({
|
|
1179
|
+
get: () => o == null ? void 0 : o.value,
|
|
1180
|
+
set: (l) => {
|
|
1181
|
+
n && clearTimeout(n), n = setTimeout(() => {
|
|
1182
|
+
t("update:modelValue", l);
|
|
1183
|
+
}, e);
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
function gt(o, t) {
|
|
1188
|
+
const e = i(() => {
|
|
1189
|
+
const s = a(o);
|
|
1190
|
+
return je(s) ? s.length : 0;
|
|
1191
|
+
}), n = i(() => {
|
|
1192
|
+
const s = a(o) || "";
|
|
1193
|
+
return !je(s) || t.mode === !1 ? 0 : t.mode === !0 ? s.length : a(t.upperLimit) - s.length;
|
|
1194
|
+
}), l = i(() => t.mode === !1 ? "" : t.mode === !0 && t.upperLimit && t.upperLimit > 0 ? `${n.value}/${a(t.upperLimit)}` : n.value);
|
|
1195
|
+
return {
|
|
1196
|
+
textLength: e,
|
|
1197
|
+
textLimitLength: n,
|
|
1198
|
+
formattedTextLimitLength: l
|
|
1199
|
+
};
|
|
1200
|
+
}
|
|
1201
|
+
const fe = {
|
|
1202
|
+
TEXT: "text",
|
|
1203
|
+
PASSWORD: "password",
|
|
1204
|
+
DATE: "date",
|
|
1205
|
+
DATETIME_LOCAL: "datetime-local",
|
|
1206
|
+
NUMBER: "number",
|
|
1207
|
+
TIME: "time",
|
|
1208
|
+
EMAIL: "email",
|
|
1209
|
+
TEL: "tel",
|
|
1210
|
+
URL: "url",
|
|
1211
|
+
COLOR: "color",
|
|
1212
|
+
SEARCH: "search",
|
|
1213
|
+
FILE: "file"
|
|
1214
|
+
}, De = {
|
|
1215
|
+
LEFT: "left",
|
|
1216
|
+
RIGHT: "right"
|
|
1217
|
+
}, me = {
|
|
1218
|
+
PASSWORD_SHOW: "eye-on",
|
|
1219
|
+
PASSWORD_HIDE: "eye-off",
|
|
1220
|
+
DATE: "calendar",
|
|
1221
|
+
TIME: "time",
|
|
1222
|
+
COLOR: "color",
|
|
1223
|
+
SEARCH: "close"
|
|
1224
|
+
}, N = {
|
|
1225
|
+
TYPES: fe,
|
|
1226
|
+
ICON_POSITIONS: De,
|
|
1227
|
+
TYPES_ICON: me
|
|
1228
|
+
}, Yo = ["update:modelValue", "focus", "blur", "keyup"], Fo = {
|
|
1229
|
+
...se,
|
|
1230
|
+
...ie,
|
|
1231
|
+
...ue,
|
|
1232
|
+
...Oe,
|
|
1233
|
+
...J,
|
|
1234
|
+
...it,
|
|
1235
|
+
...ut,
|
|
1236
|
+
modelValue: {
|
|
1237
|
+
type: [String, Number],
|
|
1238
|
+
default: void 0
|
|
1239
|
+
},
|
|
1240
|
+
type: {
|
|
1241
|
+
type: String,
|
|
1242
|
+
default: fe.TEXT,
|
|
1243
|
+
validator: (o) => Object.values(fe).includes(o)
|
|
1244
|
+
},
|
|
1245
|
+
min: [Number, Date],
|
|
1246
|
+
max: [Number, Date],
|
|
1247
|
+
step: { type: Number, default: 1 },
|
|
1248
|
+
labelStepUp: {
|
|
1249
|
+
type: String,
|
|
1250
|
+
default: "Increase value"
|
|
1251
|
+
},
|
|
1252
|
+
labelStepDown: {
|
|
1253
|
+
type: String,
|
|
1254
|
+
default: "Decrease value"
|
|
1255
|
+
},
|
|
1256
|
+
labelShowPassword: {
|
|
1257
|
+
type: String,
|
|
1258
|
+
default: "Show password"
|
|
1259
|
+
},
|
|
1260
|
+
labelHidePassword: {
|
|
1261
|
+
type: String,
|
|
1262
|
+
default: "Hide password"
|
|
1263
|
+
},
|
|
1264
|
+
labelClear: {
|
|
1265
|
+
type: String,
|
|
1266
|
+
default: "Clear"
|
|
1267
|
+
},
|
|
1268
|
+
iconShowPassword: {
|
|
1269
|
+
type: String,
|
|
1270
|
+
default: me.PASSWORD_SHOW
|
|
1271
|
+
},
|
|
1272
|
+
iconHidePassword: {
|
|
1273
|
+
type: String,
|
|
1274
|
+
default: me.PASSWORD_HIDE
|
|
1275
|
+
},
|
|
1276
|
+
iconClear: {
|
|
1277
|
+
type: String,
|
|
1278
|
+
default: me.SEARCH
|
|
1279
|
+
},
|
|
1280
|
+
icon: {
|
|
1281
|
+
type: [String, Object],
|
|
1282
|
+
default: ""
|
|
1283
|
+
},
|
|
1284
|
+
iconPosition: {
|
|
1285
|
+
type: String,
|
|
1286
|
+
validation: (o) => Object.values(De).includes(o),
|
|
1287
|
+
default: De.RIGHT
|
|
1288
|
+
},
|
|
1289
|
+
floating: Boolean,
|
|
1290
|
+
debounce: [String, Number],
|
|
1291
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
1292
|
+
}, Ue = B({
|
|
1293
|
+
components: {
|
|
1294
|
+
VvIcon: j
|
|
1295
|
+
},
|
|
1296
|
+
props: {
|
|
1297
|
+
disabled: {
|
|
1298
|
+
type: Boolean,
|
|
1299
|
+
default: !1
|
|
1300
|
+
},
|
|
1301
|
+
labelShow: {
|
|
1302
|
+
type: String,
|
|
1303
|
+
default: "Show password"
|
|
1304
|
+
},
|
|
1305
|
+
labelHide: {
|
|
1306
|
+
type: String,
|
|
1307
|
+
default: "Hide password"
|
|
1308
|
+
},
|
|
1309
|
+
iconShow: {
|
|
1310
|
+
type: String,
|
|
1311
|
+
default: me.PASSWORD_SHOW
|
|
1312
|
+
},
|
|
1313
|
+
iconHide: {
|
|
1314
|
+
type: String,
|
|
1315
|
+
default: me.PASSWORD_HIDE
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
emits: ["toggle-password"],
|
|
1319
|
+
setup(o, { emit: t }) {
|
|
1320
|
+
const e = H(!1), n = i(
|
|
1321
|
+
() => e.value ? o.iconHide : o.iconShow
|
|
1322
|
+
);
|
|
1323
|
+
function l(s) {
|
|
1324
|
+
s == null || s.stopPropagation(), o.disabled || (e.value = !e.value, t("toggle-password", e.value));
|
|
1325
|
+
}
|
|
1326
|
+
return {
|
|
1327
|
+
active: e,
|
|
1328
|
+
activeIcon: n,
|
|
1329
|
+
onClick: l
|
|
1330
|
+
};
|
|
1331
|
+
},
|
|
1332
|
+
render() {
|
|
1333
|
+
const o = W(j, {
|
|
1334
|
+
name: this.activeIcon,
|
|
1335
|
+
class: "vv-input-text__action-icon"
|
|
1336
|
+
});
|
|
1337
|
+
return W(
|
|
1338
|
+
"button",
|
|
1339
|
+
{
|
|
1340
|
+
disabled: this.disabled,
|
|
1341
|
+
class: "vv-input-text__action",
|
|
1342
|
+
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
1343
|
+
type: "button",
|
|
1344
|
+
onClick: this.onClick
|
|
1345
|
+
},
|
|
1346
|
+
o
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
}), Te = B({
|
|
1350
|
+
components: {
|
|
1351
|
+
VvIcon: j
|
|
1352
|
+
},
|
|
1353
|
+
props: {
|
|
1354
|
+
disabled: {
|
|
1355
|
+
type: Boolean,
|
|
1356
|
+
default: !1
|
|
1357
|
+
},
|
|
1358
|
+
label: {
|
|
1359
|
+
type: String
|
|
1360
|
+
},
|
|
1361
|
+
mode: {
|
|
1362
|
+
type: String,
|
|
1363
|
+
validator: (o) => ["up", "down"].includes(o),
|
|
1364
|
+
default: "up"
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
emits: ["step-up", "step-down"],
|
|
1368
|
+
setup(o, { emit: t }) {
|
|
1369
|
+
const e = i(() => o.mode === "up");
|
|
1370
|
+
return {
|
|
1371
|
+
isUp: e,
|
|
1372
|
+
onClick: (l) => {
|
|
1373
|
+
l == null || l.stopPropagation(), o.disabled || t(e.value ? "step-up" : "step-down");
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
},
|
|
1377
|
+
render() {
|
|
1378
|
+
return W("button", {
|
|
1379
|
+
class: [
|
|
1380
|
+
"vv-input-text__action-chevron",
|
|
1381
|
+
this.isUp && "vv-input-text__action-chevron-up"
|
|
1382
|
+
],
|
|
1383
|
+
disabled: this.disabled,
|
|
1384
|
+
ariaLabel: this.label,
|
|
1385
|
+
onClick: this.onClick
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
}), qe = B({
|
|
1389
|
+
components: {
|
|
1390
|
+
VvIcon: j
|
|
1391
|
+
},
|
|
1392
|
+
props: {
|
|
1393
|
+
disabled: {
|
|
1394
|
+
type: Boolean,
|
|
1395
|
+
default: !1
|
|
1396
|
+
},
|
|
1397
|
+
label: {
|
|
1398
|
+
type: String,
|
|
1399
|
+
default: "Clear"
|
|
1400
|
+
},
|
|
1401
|
+
icon: {
|
|
1402
|
+
type: String,
|
|
1403
|
+
default: "close"
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
emits: ["clear"],
|
|
1407
|
+
setup(o, { emit: t }) {
|
|
1408
|
+
function e(n) {
|
|
1409
|
+
n == null || n.stopPropagation(), o.disabled || t("clear");
|
|
1410
|
+
}
|
|
1411
|
+
return {
|
|
1412
|
+
onClick: e
|
|
1413
|
+
};
|
|
1414
|
+
},
|
|
1415
|
+
render() {
|
|
1416
|
+
const o = W(j, {
|
|
1417
|
+
name: this.icon,
|
|
1418
|
+
class: "vv-input-text__action-icon"
|
|
1419
|
+
});
|
|
1420
|
+
return W(
|
|
1421
|
+
"button",
|
|
1422
|
+
{
|
|
1423
|
+
disabled: this.disabled,
|
|
1424
|
+
class: "vv-input-text__action",
|
|
1425
|
+
ariaLabel: this.label,
|
|
1426
|
+
type: "button",
|
|
1427
|
+
onClick: this.onClick
|
|
1428
|
+
},
|
|
1429
|
+
o
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
function Be(o, t) {
|
|
1434
|
+
return {
|
|
1435
|
+
name: "VvInputTextActions",
|
|
1436
|
+
components: {
|
|
1437
|
+
VvIcon: j,
|
|
1438
|
+
VvInputPasswordAction: Ue,
|
|
1439
|
+
VvInputStepAction: Te,
|
|
1440
|
+
VvInputClearAction: qe
|
|
1441
|
+
},
|
|
1442
|
+
setup() {
|
|
1443
|
+
return {
|
|
1444
|
+
isDisabled: i(() => t.disabled || t.readonly),
|
|
1445
|
+
labelStepUp: t.labelStepUp,
|
|
1446
|
+
labelStepDown: t.labelStepDown,
|
|
1447
|
+
labelShowPassword: t.labelShowPassword,
|
|
1448
|
+
labelHidePassword: t.labelHidePassword,
|
|
1449
|
+
labelClear: t.labelClear,
|
|
1450
|
+
iconShowPassword: t.iconShowPassword,
|
|
1451
|
+
iconHidePassword: t.iconHidePassword
|
|
1452
|
+
};
|
|
1453
|
+
},
|
|
1454
|
+
render() {
|
|
1455
|
+
let e = null;
|
|
1456
|
+
switch (o) {
|
|
1457
|
+
case fe.SEARCH: {
|
|
1458
|
+
const { onClear: n } = this.$attrs;
|
|
1459
|
+
e = [
|
|
1460
|
+
W(qe, {
|
|
1461
|
+
disabled: this.isDisabled,
|
|
1462
|
+
label: this.labelShowPassword,
|
|
1463
|
+
onClear: n
|
|
1464
|
+
})
|
|
1465
|
+
];
|
|
1466
|
+
break;
|
|
1467
|
+
}
|
|
1468
|
+
case fe.PASSWORD: {
|
|
1469
|
+
const { onTogglePassword: n } = this.$attrs;
|
|
1470
|
+
e = [
|
|
1471
|
+
W(Ue, {
|
|
1472
|
+
disabled: this.isDisabled,
|
|
1473
|
+
onTogglePassword: n,
|
|
1474
|
+
labelShow: this.labelShowPassword,
|
|
1475
|
+
labelHide: this.labelHidePassword,
|
|
1476
|
+
iconShow: this.iconShowPassword,
|
|
1477
|
+
iconHide: this.iconHidePassword
|
|
1478
|
+
})
|
|
1479
|
+
];
|
|
1480
|
+
break;
|
|
1481
|
+
}
|
|
1482
|
+
case fe.NUMBER: {
|
|
1483
|
+
const { onStepUp: n, onStepDown: l } = this.$attrs;
|
|
1484
|
+
e = [
|
|
1485
|
+
W(Te, {
|
|
1486
|
+
mode: "up",
|
|
1487
|
+
disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
|
|
1488
|
+
label: this.labelStepUp,
|
|
1489
|
+
onStepUp: n,
|
|
1490
|
+
onStepDown: l
|
|
1491
|
+
}),
|
|
1492
|
+
W(Te, {
|
|
1493
|
+
mode: "down",
|
|
1494
|
+
disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
|
|
1495
|
+
label: this.labelStepDown,
|
|
1496
|
+
onStepUp: n,
|
|
1497
|
+
onStepDown: l
|
|
1498
|
+
})
|
|
1499
|
+
];
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
return Array.isArray(e) ? W("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
1504
|
+
}
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
const Wo = ["for"], zo = { class: "vv-input-text__wrapper" }, Xo = ["id", "disabled", "readonly", "required"], Zo = {
|
|
1508
|
+
key: 1,
|
|
1509
|
+
class: "vv-input-text__limit"
|
|
1510
|
+
}, Jo = {
|
|
1511
|
+
name: "VvInputText"
|
|
1512
|
+
}, Wa = /* @__PURE__ */ B({
|
|
1513
|
+
...Jo,
|
|
1514
|
+
props: Fo,
|
|
1515
|
+
emits: Yo,
|
|
1516
|
+
setup(o, { emit: t }) {
|
|
1517
|
+
const e = o, n = oe(), l = H(), { icon: s, iconPosition: r, label: f, modelValue: v, limit: p } = x(e), u = i(() => String(e.id || ve())), d = i(() => `${u.value}-hint`), c = i(
|
|
1518
|
+
() => e.floating && z(e.placeholder) ? " " : e.placeholder
|
|
1519
|
+
), b = bt(v, t, e.debounce), g = H(!1), y = i(() => e.type === N.TYPES.PASSWORD), h = () => {
|
|
1520
|
+
g.value = !g.value;
|
|
1521
|
+
}, k = i(
|
|
1522
|
+
() => [N.TYPES.TIME, N.TYPES.DATETIME_LOCAL, N.TYPES.DATE].includes(
|
|
1523
|
+
e.type
|
|
1524
|
+
)
|
|
1525
|
+
), P = i(() => e.type === N.TYPES.NUMBER), I = () => {
|
|
1526
|
+
S.value || (l.value.stepUp(), b.value = a(l).value);
|
|
1527
|
+
}, A = () => {
|
|
1528
|
+
S.value || (l.value.stepDown(), b.value = a(l).value);
|
|
1529
|
+
}, R = i(() => e.type === N.TYPES.SEARCH), M = () => {
|
|
1530
|
+
b.value = null;
|
|
1531
|
+
}, { hasIconLeft: X, hasIconRight: Z } = ft(s, r, {
|
|
1532
|
+
iconLeft: n["icon-left"],
|
|
1533
|
+
iconRight: n["icon-right"]
|
|
1534
|
+
}), ae = i(() => typeof s.value == "string" ? { name: s.value } : s.value), Y = i(() => {
|
|
1535
|
+
switch (e.type) {
|
|
1536
|
+
case N.TYPES.COLOR:
|
|
1537
|
+
return { name: N.TYPES_ICON.COLOR };
|
|
1538
|
+
case N.TYPES.DATE:
|
|
1539
|
+
case N.TYPES.DATETIME_LOCAL:
|
|
1540
|
+
return { name: N.TYPES_ICON.DATE };
|
|
1541
|
+
case N.TYPES.TIME:
|
|
1542
|
+
return { name: N.TYPES_ICON.TIME };
|
|
1543
|
+
default:
|
|
1544
|
+
return "";
|
|
1545
|
+
}
|
|
1546
|
+
}), { formattedTextLimitLength: $ } = gt(b, {
|
|
1547
|
+
mode: e.limit,
|
|
1548
|
+
upperLimit: e.maxlength || 0
|
|
1549
|
+
}), { focused: V } = mt(l, t), S = i(() => e.disabled || e.readonly), T = i(() => S.value ? -1 : e.tabindex), F = i(() => !z(v)), we = i(() => {
|
|
1550
|
+
if (e.error === !0)
|
|
1551
|
+
return !0;
|
|
1552
|
+
if (e.valid === !0)
|
|
1553
|
+
return !1;
|
|
1554
|
+
}), { bemCssClasses: Ie } = L("vv-input-text", {
|
|
1555
|
+
modifiers: e.modifiers,
|
|
1556
|
+
valid: e.valid,
|
|
1557
|
+
invalid: e.error,
|
|
1558
|
+
loading: e.loading,
|
|
1559
|
+
iconLeft: X,
|
|
1560
|
+
iconRight: Z.value || !z(Y),
|
|
1561
|
+
floating: e.floating && !z(e.label),
|
|
1562
|
+
dirty: F,
|
|
1563
|
+
focus: V
|
|
1564
|
+
}), yt = i(() => {
|
|
1565
|
+
const Q = (() => y.value && g.value || k.value && !F.value && !V.value ? N.TYPES.TEXT : e.type)();
|
|
1566
|
+
return {
|
|
1567
|
+
type: Q,
|
|
1568
|
+
placeholder: c.value,
|
|
1569
|
+
name: e.name,
|
|
1570
|
+
autocomplete: e.autocomplete,
|
|
1571
|
+
minlength: e.minlength,
|
|
1572
|
+
maxlength: e.maxlength,
|
|
1573
|
+
min: e.min,
|
|
1574
|
+
max: e.max,
|
|
1575
|
+
step: Q === N.TYPES.NUMBER ? e.step : void 0,
|
|
1576
|
+
tabindex: T.value,
|
|
1577
|
+
"aria-invalid": we.value,
|
|
1578
|
+
"aria-describedby": !He.value && _t.value ? d.value : void 0,
|
|
1579
|
+
"aria-errormessage": He.value ? d.value : void 0
|
|
1580
|
+
};
|
|
1581
|
+
}), xe = i(() => ({
|
|
1582
|
+
valid: e.valid,
|
|
1583
|
+
error: e.error,
|
|
1584
|
+
modelValue: e.modelValue
|
|
1585
|
+
})), { HintSlot: ht, hasHint: _t, hasErrors: He } = de(e, n), St = Be(
|
|
1586
|
+
N.TYPES.PASSWORD,
|
|
1587
|
+
e
|
|
1588
|
+
), Vt = Be(N.TYPES.NUMBER, e), $t = Be(N.TYPES.SEARCH, e);
|
|
1589
|
+
return Je(() => {
|
|
1590
|
+
e.autofocus && (V.value = !0);
|
|
1591
|
+
}), (Q, Se) => (m(), _("div", {
|
|
1592
|
+
class: U(a(Ie))
|
|
1593
|
+
}, [
|
|
1594
|
+
a(f) ? (m(), _("label", {
|
|
1595
|
+
key: 0,
|
|
1596
|
+
for: a(u),
|
|
1597
|
+
class: "vv-input-text__label"
|
|
1598
|
+
}, E(a(f)), 9, Wo)) : O("", !0),
|
|
1599
|
+
w("div", zo, [
|
|
1600
|
+
a(X) ? C(Q.$slots, "icon-left", te(D({ key: 0 }, a(xe))), () => [
|
|
1601
|
+
q(j, D({ class: "vv-input-text__icon-left" }, a(ae)), null, 16)
|
|
1602
|
+
]) : O("", !0),
|
|
1603
|
+
ne(w("input", D({
|
|
1604
|
+
id: a(u),
|
|
1605
|
+
ref_key: "input",
|
|
1606
|
+
ref: l,
|
|
1607
|
+
"onUpdate:modelValue": Se[0] || (Se[0] = (Ee) => be(b) ? b.value = Ee : null)
|
|
1608
|
+
}, a(yt), {
|
|
1609
|
+
disabled: Q.disabled,
|
|
1610
|
+
readonly: Q.readonly,
|
|
1611
|
+
required: Q.required,
|
|
1612
|
+
onKeyup: Se[1] || (Se[1] = (Ee) => t("keyup", Ee))
|
|
1613
|
+
}), null, 16, Xo), [
|
|
1614
|
+
[wt, a(b)]
|
|
1615
|
+
]),
|
|
1616
|
+
C(Q.$slots, "icon-right", te(ye(a(xe))), () => [
|
|
1617
|
+
a(Z) || a(Y) ? (m(), G(j, te(D({ key: 0 }, a(Z) ? a(ae) : a(Y))), null, 16)) : a(y) ? (m(), G(a(St), {
|
|
1618
|
+
key: 1,
|
|
1619
|
+
onTogglePassword: h
|
|
1620
|
+
})) : a(P) ? (m(), G(a(Vt), {
|
|
1621
|
+
key: 2,
|
|
1622
|
+
onStepUp: I,
|
|
1623
|
+
onStepDown: A
|
|
1624
|
+
})) : a(R) ? (m(), G(a($t), {
|
|
1625
|
+
key: 3,
|
|
1626
|
+
onClear: M
|
|
1627
|
+
})) : O("", !0)
|
|
1628
|
+
]),
|
|
1629
|
+
a(p) ? (m(), _("span", Zo, [
|
|
1630
|
+
C(Q.$slots, "limit", {}, () => [
|
|
1631
|
+
K(E(a($)), 1)
|
|
1632
|
+
])
|
|
1633
|
+
])) : O("", !0)
|
|
1634
|
+
]),
|
|
1635
|
+
q(a(ht), {
|
|
1636
|
+
id: a(d),
|
|
1637
|
+
class: "vv-input-text__hint"
|
|
1638
|
+
}, null, 8, ["id"])
|
|
1639
|
+
], 2));
|
|
1640
|
+
}
|
|
1641
|
+
}), Qo = {
|
|
1642
|
+
...se,
|
|
1643
|
+
...ie,
|
|
1644
|
+
...ue,
|
|
1645
|
+
...Oe,
|
|
1646
|
+
..._e,
|
|
1647
|
+
...rt,
|
|
1648
|
+
...J,
|
|
1649
|
+
id: [String, Number],
|
|
1650
|
+
name: { type: String, required: !0 },
|
|
1651
|
+
modelValue: {
|
|
1652
|
+
type: [String, Number, Boolean, Object, Array],
|
|
1653
|
+
default: void 0
|
|
1654
|
+
},
|
|
1655
|
+
label: String,
|
|
1656
|
+
required: Boolean,
|
|
1657
|
+
placeholder: String,
|
|
1658
|
+
options: {
|
|
1659
|
+
type: Array,
|
|
1660
|
+
required: !0
|
|
1661
|
+
},
|
|
1662
|
+
useObject: Boolean,
|
|
1663
|
+
labelKey: { type: String, default: "label" },
|
|
1664
|
+
valueKey: { type: String, default: "value" },
|
|
1665
|
+
iconLeft: String,
|
|
1666
|
+
iconRight: String,
|
|
1667
|
+
modifiers: [String, Array],
|
|
1668
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
1669
|
+
}, ea = ["update:modelValue"], ta = ["for"], oa = { class: "vv-select__wrapper" }, aa = ["id", "disabled", "required"], na = {
|
|
1670
|
+
key: 0,
|
|
1671
|
+
value: void 0,
|
|
1672
|
+
disabled: ""
|
|
1673
|
+
}, la = ["disabled", "value"], ra = {
|
|
1674
|
+
name: "VvNativeSelect"
|
|
1675
|
+
}, sa = /* @__PURE__ */ B({
|
|
1676
|
+
...ra,
|
|
1677
|
+
props: Qo,
|
|
1678
|
+
emits: ea,
|
|
1679
|
+
setup(o, { emit: t }) {
|
|
1680
|
+
const e = o, n = oe(), { HintSlot: l, hasHint: s, hasErrors: r } = de(e, n), {
|
|
1681
|
+
modifiers: f,
|
|
1682
|
+
disabled: v,
|
|
1683
|
+
readonly: p,
|
|
1684
|
+
loading: u,
|
|
1685
|
+
iconLeft: d,
|
|
1686
|
+
iconRight: c,
|
|
1687
|
+
error: b,
|
|
1688
|
+
valid: g
|
|
1689
|
+
} = x(e), y = i(() => String(e.id || ve())), h = i(() => `${y.value}-hint`), k = i(() => !z(e.modelValue)), P = i(() => e.disabled || e.readonly), I = i(() => P.value ? -1 : e.tabindex), A = i(() => {
|
|
1690
|
+
if (e.error === !0)
|
|
1691
|
+
return !0;
|
|
1692
|
+
if (e.valid === !0)
|
|
1693
|
+
return !1;
|
|
1694
|
+
}), { bemCssClasses: R } = L("vv-select", {
|
|
1695
|
+
modifiers: f,
|
|
1696
|
+
loading: u,
|
|
1697
|
+
readonly: p,
|
|
1698
|
+
iconLeft: d,
|
|
1699
|
+
iconRight: c,
|
|
1700
|
+
valid: g,
|
|
1701
|
+
invalid: b,
|
|
1702
|
+
dirty: k
|
|
1703
|
+
}), M = i(() => ({
|
|
1704
|
+
name: e.name,
|
|
1705
|
+
tabindex: I.value,
|
|
1706
|
+
"aria-invalid": A.value,
|
|
1707
|
+
"aria-describedby": !r.value && s.value ? h.value : void 0,
|
|
1708
|
+
"aria-errormessage": r.value ? h.value : void 0
|
|
1709
|
+
}));
|
|
1710
|
+
function X($) {
|
|
1711
|
+
return typeof $ == "string" ? $ : $[e.valueKey];
|
|
1712
|
+
}
|
|
1713
|
+
function Z($) {
|
|
1714
|
+
return typeof $ == "string" ? $ : $[e.labelKey];
|
|
1715
|
+
}
|
|
1716
|
+
function ae($) {
|
|
1717
|
+
return typeof $ == "string" || $.disabled === void 0 ? v.value : $.disabled;
|
|
1718
|
+
}
|
|
1719
|
+
const Y = i({
|
|
1720
|
+
get: () => {
|
|
1721
|
+
var $;
|
|
1722
|
+
return typeof e.modelValue == "object" ? ($ = e.modelValue) == null ? void 0 : $[e.valueKey] : e.modelValue;
|
|
1723
|
+
},
|
|
1724
|
+
set: ($) => {
|
|
1725
|
+
var S;
|
|
1726
|
+
const V = e.useObject ? (S = e.options) == null ? void 0 : S.find(
|
|
1727
|
+
(T) => T[e.valueKey] === $
|
|
1728
|
+
) : void 0;
|
|
1729
|
+
t("update:modelValue", V ?? $);
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
return ($, V) => (m(), _("div", {
|
|
1733
|
+
class: U(a(R))
|
|
1734
|
+
}, [
|
|
1735
|
+
$.label ? (m(), _("label", {
|
|
1736
|
+
key: 0,
|
|
1737
|
+
for: a(y)
|
|
1738
|
+
}, E($.label), 9, ta)) : O("", !0),
|
|
1739
|
+
w("div", oa, [
|
|
1740
|
+
C($.$slots, "icon-left", {}, () => [
|
|
1741
|
+
a(d) ? (m(), G(j, {
|
|
1742
|
+
key: 0,
|
|
1743
|
+
name: a(d)
|
|
1744
|
+
}, null, 8, ["name"])) : O("", !0)
|
|
1745
|
+
]),
|
|
1746
|
+
ne(w("select", D({
|
|
1747
|
+
id: a(y),
|
|
1748
|
+
"onUpdate:modelValue": V[0] || (V[0] = (S) => be(Y) ? Y.value = S : null)
|
|
1749
|
+
}, a(M), {
|
|
1750
|
+
disabled: a(P),
|
|
1751
|
+
required: $.required
|
|
1752
|
+
}), [
|
|
1753
|
+
$.placeholder ? (m(), _("option", na, E($.placeholder), 1)) : O("", !0),
|
|
1754
|
+
(m(!0), _(re, null, ge($.options, (S, T) => (m(), _("option", {
|
|
1755
|
+
key: T,
|
|
1756
|
+
disabled: ae(S),
|
|
1757
|
+
value: X(S)
|
|
1758
|
+
}, E(Z(S)), 9, la))), 128))
|
|
1759
|
+
], 16, aa), [
|
|
1760
|
+
[It, a(Y)]
|
|
1761
|
+
]),
|
|
1762
|
+
C($.$slots, "icon-right", {}, () => [
|
|
1763
|
+
a(c) ? (m(), G(j, {
|
|
1764
|
+
key: 0,
|
|
1765
|
+
name: a(c)
|
|
1766
|
+
}, null, 8, ["name"])) : O("", !0)
|
|
1767
|
+
])
|
|
1768
|
+
]),
|
|
1769
|
+
q(a(l), {
|
|
1770
|
+
id: a(h),
|
|
1771
|
+
class: "vv-select__hint"
|
|
1772
|
+
}, null, 8, ["id"])
|
|
1773
|
+
], 2));
|
|
1774
|
+
}
|
|
1775
|
+
}), ia = {
|
|
1776
|
+
...J,
|
|
1777
|
+
value: {
|
|
1778
|
+
type: [Number, String],
|
|
1779
|
+
default: void 0
|
|
1780
|
+
},
|
|
1781
|
+
max: {
|
|
1782
|
+
type: [Number, String]
|
|
1783
|
+
},
|
|
1784
|
+
ariaLabel: {
|
|
1785
|
+
type: String,
|
|
1786
|
+
default: "progress-bar"
|
|
1787
|
+
}
|
|
1788
|
+
}, ua = {
|
|
1789
|
+
name: "VvProgress"
|
|
1790
|
+
}, za = /* @__PURE__ */ B({
|
|
1791
|
+
...ua,
|
|
1792
|
+
props: ia,
|
|
1793
|
+
setup(o) {
|
|
1794
|
+
const t = o, { value: e, max: n, ariaLabel: l } = x(t), s = i(() => t.value === void 0), { bemCssClasses: r } = L("vv-progress", {
|
|
1795
|
+
modifiers: t.modifiers,
|
|
1796
|
+
indeterminate: s
|
|
1797
|
+
});
|
|
1798
|
+
return (f, v) => (m(), _("progress", D({ role: "progressbar" }, {
|
|
1799
|
+
class: a(r),
|
|
1800
|
+
ariaLabel: a(l),
|
|
1801
|
+
max: a(n),
|
|
1802
|
+
value: a(e)
|
|
1803
|
+
}), null, 16));
|
|
1804
|
+
}
|
|
1805
|
+
}), da = {
|
|
1806
|
+
...se,
|
|
1807
|
+
...ie,
|
|
1808
|
+
...ue,
|
|
1809
|
+
id: [String, Number],
|
|
1810
|
+
name: { type: String, required: !0 },
|
|
1811
|
+
value: [String, Number, Boolean],
|
|
1812
|
+
modelValue: [Object, Number, Boolean, String],
|
|
1813
|
+
label: String,
|
|
1814
|
+
disabled: Boolean,
|
|
1815
|
+
readonly: Boolean,
|
|
1816
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
1817
|
+
}, ca = ["click", "update:modelValue", "change", "blur"];
|
|
1818
|
+
function va(o, t) {
|
|
1819
|
+
const { group: e, isInGroup: n, getGroupOrLocalRef: l } = Ae(at), { valid: s, error: r } = x(o), f = l("modelValue", o, t), v = l("readonly", o), p = l("disabled", o);
|
|
1820
|
+
return {
|
|
1821
|
+
valid: s,
|
|
1822
|
+
error: r,
|
|
1823
|
+
group: e,
|
|
1824
|
+
isInGroup: n,
|
|
1825
|
+
modelValue: f,
|
|
1826
|
+
readonly: v,
|
|
1827
|
+
disabled: p
|
|
1828
|
+
};
|
|
1829
|
+
}
|
|
1830
|
+
const pa = ["for"], fa = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ma = {
|
|
1831
|
+
name: "VvRadio"
|
|
1832
|
+
}, ba = /* @__PURE__ */ B({
|
|
1833
|
+
...ma,
|
|
1834
|
+
props: da,
|
|
1835
|
+
emits: ca,
|
|
1836
|
+
setup(o, { emit: t }) {
|
|
1837
|
+
const e = o, n = oe(), { disabled: l, readonly: s, modelValue: r, valid: f, error: v } = va(
|
|
1838
|
+
e,
|
|
1839
|
+
t
|
|
1840
|
+
), p = H(), u = i(
|
|
1841
|
+
() => e.id !== void 0 ? String(e.id) : void 0
|
|
1842
|
+
), d = i(() => l.value || s.value), c = i(() => d.value ? -1 : e.tabindex), b = i(() => {
|
|
1843
|
+
if (e.error === !0)
|
|
1844
|
+
return !0;
|
|
1845
|
+
if (e.valid === !0)
|
|
1846
|
+
return !1;
|
|
1847
|
+
}), g = i(
|
|
1848
|
+
() => Array.isArray(r.value) ? ce(e.value, r.value) : le(e.value, r.value)
|
|
1849
|
+
), y = i(
|
|
1850
|
+
() => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
|
|
1851
|
+
), h = i({
|
|
1852
|
+
get() {
|
|
1853
|
+
return g.value ? y.value : null;
|
|
1854
|
+
},
|
|
1855
|
+
set(I) {
|
|
1856
|
+
if (Array.isArray(r.value)) {
|
|
1857
|
+
r.value = I ? [...r.value, e.value] : Le(e.value, r.value);
|
|
1858
|
+
return;
|
|
1859
|
+
}
|
|
1860
|
+
r.value = e.value, t("change", I);
|
|
1861
|
+
}
|
|
1862
|
+
}), { bemCssClasses: k } = L("vv-radio", {
|
|
1863
|
+
valid: f,
|
|
1864
|
+
invalid: v,
|
|
1865
|
+
disabled: l,
|
|
1866
|
+
readonly: s
|
|
1867
|
+
}), { HintSlot: P } = de(e, n);
|
|
1868
|
+
return (I, A) => (m(), _("label", {
|
|
1869
|
+
class: U(a(k)),
|
|
1870
|
+
for: a(u)
|
|
1871
|
+
}, [
|
|
1872
|
+
ne(w("input", {
|
|
1873
|
+
id: a(u),
|
|
1874
|
+
ref_key: "input",
|
|
1875
|
+
ref: p,
|
|
1876
|
+
"onUpdate:modelValue": A[0] || (A[0] = (R) => be(h) ? h.value = R : null),
|
|
1877
|
+
type: "radio",
|
|
1878
|
+
class: "vv-radio__input",
|
|
1879
|
+
name: I.name,
|
|
1880
|
+
disabled: a(d),
|
|
1881
|
+
value: a(y),
|
|
1882
|
+
tabindex: a(c),
|
|
1883
|
+
"aria-invalid": a(b)
|
|
1884
|
+
}, null, 8, fa), [
|
|
1885
|
+
[Et, a(h)]
|
|
1886
|
+
]),
|
|
1887
|
+
C(I.$slots, "default", { value: a(r) }, () => [
|
|
1888
|
+
K(E(I.label), 1)
|
|
1889
|
+
]),
|
|
1890
|
+
q(a(P), {
|
|
1891
|
+
class: "vv-radio__hint",
|
|
1892
|
+
params: { value: a(r) }
|
|
1893
|
+
}, null, 8, ["params"])
|
|
1894
|
+
], 10, pa));
|
|
1895
|
+
}
|
|
1896
|
+
}), ga = ["update:modelValue"], ya = {
|
|
1897
|
+
...se,
|
|
1898
|
+
...ie,
|
|
1899
|
+
...st,
|
|
1900
|
+
...ue,
|
|
1901
|
+
modelValue: null,
|
|
1902
|
+
label: { type: String, default: "" },
|
|
1903
|
+
name: { type: String, default: "", required: !0 },
|
|
1904
|
+
disabled: { type: Boolean, default: !1 },
|
|
1905
|
+
readonly: { type: Boolean, default: !1 },
|
|
1906
|
+
vertical: { type: Boolean, default: !1 }
|
|
1907
|
+
}, ha = ["textContent"], _a = { class: "vv-radio-group__wrapper" }, Sa = {
|
|
1908
|
+
name: "VvRadioGroup"
|
|
1909
|
+
}, Xa = /* @__PURE__ */ B({
|
|
1910
|
+
...Sa,
|
|
1911
|
+
props: ya,
|
|
1912
|
+
emits: ga,
|
|
1913
|
+
setup(o, { emit: t }) {
|
|
1914
|
+
const e = o, n = oe(), { HintSlot: l } = de(e, n), s = ke(e, "modelValue", t), { disabled: r, readonly: f, vertical: v, valid: p, error: u } = x(e);
|
|
1915
|
+
Pe({
|
|
1916
|
+
key: at,
|
|
1917
|
+
modelValue: s,
|
|
1918
|
+
disabled: r,
|
|
1919
|
+
readonly: f
|
|
1920
|
+
});
|
|
1921
|
+
const { getOptionLabel: c, getOptionValue: b } = pt(e), { bemCssClasses: g } = L("vv-radio-group", {
|
|
1922
|
+
horizontal: i(() => !v.value),
|
|
1923
|
+
valid: p,
|
|
1924
|
+
invalid: u
|
|
1925
|
+
}), y = (h, k) => ({
|
|
1926
|
+
id: `${e.name}_opt${k}`,
|
|
1927
|
+
name: e.name,
|
|
1928
|
+
label: c(h),
|
|
1929
|
+
value: b(h)
|
|
1930
|
+
});
|
|
1931
|
+
return (h, k) => (m(), _("fieldset", {
|
|
1932
|
+
class: U(a(g))
|
|
1933
|
+
}, [
|
|
1934
|
+
h.label ? (m(), _("legend", {
|
|
1935
|
+
key: 0,
|
|
1936
|
+
textContent: E(h.label)
|
|
1937
|
+
}, null, 8, ha)) : O("", !0),
|
|
1938
|
+
w("div", _a, [
|
|
1939
|
+
h.options.length > 0 ? (m(!0), _(re, { key: 0 }, ge(h.options, (P, I) => (m(), G(ba, D({ key: I }, y(P, I)), null, 16))), 128)) : C(h.$slots, "default", { key: 1 })
|
|
1940
|
+
]),
|
|
1941
|
+
q(a(l), { class: "vv-radio-group__hint" })
|
|
1942
|
+
], 2));
|
|
1943
|
+
}
|
|
1944
|
+
}), Va = {
|
|
1945
|
+
...se,
|
|
1946
|
+
...ie,
|
|
1947
|
+
...ue,
|
|
1948
|
+
...Oe,
|
|
1949
|
+
..._e,
|
|
1950
|
+
...rt,
|
|
1951
|
+
...J,
|
|
1952
|
+
modelValue: {
|
|
1953
|
+
type: [String, Number, Boolean, Object, Array],
|
|
1954
|
+
default: void 0
|
|
1955
|
+
},
|
|
1956
|
+
label: String,
|
|
1957
|
+
labelNoResult: { type: String, default: "No results" },
|
|
1958
|
+
placeholder: String,
|
|
1959
|
+
searchable: Boolean,
|
|
1960
|
+
searchPlaceholder: String,
|
|
1961
|
+
debounceSearch: {
|
|
1962
|
+
type: [Number, String],
|
|
1963
|
+
default: 0
|
|
1964
|
+
},
|
|
1965
|
+
options: {
|
|
1966
|
+
type: Array,
|
|
1967
|
+
required: !0
|
|
1968
|
+
},
|
|
1969
|
+
useObject: Boolean,
|
|
1970
|
+
multiple: Boolean,
|
|
1971
|
+
maxValues: [Number, String],
|
|
1972
|
+
separator: { type: String, default: ", " },
|
|
1973
|
+
labelKey: { type: String, default: "label" },
|
|
1974
|
+
valueKey: { type: String, default: "value" },
|
|
1975
|
+
iconLeft: String,
|
|
1976
|
+
iconRight: String,
|
|
1977
|
+
native: Boolean,
|
|
1978
|
+
tabindex: {
|
|
1979
|
+
type: [Number, String],
|
|
1980
|
+
default: 0
|
|
1981
|
+
}
|
|
1982
|
+
}, $a = ["id"], Ca = ["id", "for"], ka = ["tabindex"], Aa = ["id", "placeholder"], Pa = {
|
|
1983
|
+
name: "VvSelect"
|
|
1984
|
+
}, Za = /* @__PURE__ */ B({
|
|
1985
|
+
...Pa,
|
|
1986
|
+
props: Va,
|
|
1987
|
+
emits: ["update:modelValue", "change:search"],
|
|
1988
|
+
setup(o, { emit: t }) {
|
|
1989
|
+
const e = o, n = oe(), { HintSlot: l } = de(e, n), s = H(), r = H();
|
|
1990
|
+
tt(r, { initialValue: !0 });
|
|
1991
|
+
const f = ve(), v = H(""), p = Rt(
|
|
1992
|
+
v,
|
|
1993
|
+
Number(e.debounceSearch)
|
|
1994
|
+
), u = H(!1), {
|
|
1995
|
+
modifiers: d,
|
|
1996
|
+
disabled: c,
|
|
1997
|
+
readonly: b,
|
|
1998
|
+
loading: g,
|
|
1999
|
+
iconLeft: y,
|
|
2000
|
+
iconRight: h,
|
|
2001
|
+
valid: k,
|
|
2002
|
+
error: P
|
|
2003
|
+
} = x(e);
|
|
2004
|
+
Ze(
|
|
2005
|
+
p,
|
|
2006
|
+
() => t("change:search", p.value)
|
|
2007
|
+
);
|
|
2008
|
+
const I = i(() => !z(e.modelValue)), A = i(() => c.value || b.value ? -1 : e.tabindex), { bemCssClasses: R } = L("vv-select", {
|
|
2009
|
+
modifiers: d,
|
|
2010
|
+
disabled: c,
|
|
2011
|
+
loading: g,
|
|
2012
|
+
readonly: b,
|
|
2013
|
+
iconLeft: y,
|
|
2014
|
+
iconRight: h,
|
|
2015
|
+
valid: k,
|
|
2016
|
+
invalid: P,
|
|
2017
|
+
dirty: I
|
|
2018
|
+
}), M = i(
|
|
2019
|
+
() => {
|
|
2020
|
+
var V;
|
|
2021
|
+
return (V = e.options) == null ? void 0 : V.every((S) => typeof S == "object");
|
|
2022
|
+
}
|
|
2023
|
+
), X = i(
|
|
2024
|
+
() => e.searchable ? Z.value : e.options
|
|
2025
|
+
), Z = i(() => {
|
|
2026
|
+
var V;
|
|
2027
|
+
return (V = e.options) == null ? void 0 : V.filter((S) => typeof S == "string" ? S.toLowerCase().includes(p.value.toLowerCase().trim()) : typeof S[e.labelKey] == "string" ? S[e.labelKey].toLowerCase().includes(p.value.toLowerCase().trim()) : !1);
|
|
2028
|
+
}), ae = i(() => {
|
|
2029
|
+
var S, T;
|
|
2030
|
+
if (e.multiple && Array.isArray(e.modelValue) && ((S = e.modelValue) != null && S.length))
|
|
2031
|
+
return M.value ? Ht(
|
|
2032
|
+
e.options,
|
|
2033
|
+
e.modelValue,
|
|
2034
|
+
e.valueKey
|
|
2035
|
+
).map((F) => F[e.labelKey]).join(e.separator) : e.modelValue.join(e.separator);
|
|
2036
|
+
const V = e.useObject ? e.modelValue : (T = e.options) == null ? void 0 : T.find(
|
|
2037
|
+
(F) => typeof F == "object" ? F[e.valueKey] == e.modelValue : F == e.modelValue
|
|
2038
|
+
);
|
|
2039
|
+
return typeof V == "object" ? V == null ? void 0 : V[e.labelKey] : V;
|
|
2040
|
+
});
|
|
2041
|
+
et(s, () => {
|
|
2042
|
+
s.value.open = !1;
|
|
2043
|
+
});
|
|
2044
|
+
function Y(V) {
|
|
2045
|
+
const S = V.target;
|
|
2046
|
+
u.value = S.open;
|
|
2047
|
+
}
|
|
2048
|
+
function $(V) {
|
|
2049
|
+
s.value && !e.multiple && (s.value.open = !1), t("update:modelValue", V);
|
|
2050
|
+
}
|
|
2051
|
+
return (V, S) => V.native ? (m(), G(sa, D({ key: 1 }, e, {
|
|
2052
|
+
"onUpdate:modelValue": S[4] || (S[4] = (T) => t("update:modelValue", T))
|
|
2053
|
+
}), null, 16)) : (m(), _("div", {
|
|
2054
|
+
key: 0,
|
|
2055
|
+
id: a(f),
|
|
2056
|
+
class: U(a(R))
|
|
2057
|
+
}, [
|
|
2058
|
+
V.label ? (m(), _("label", {
|
|
2059
|
+
key: 0,
|
|
2060
|
+
id: `${a(f)}-label`,
|
|
2061
|
+
for: V.searchable && u.value ? `${a(f)}-input` : void 0
|
|
2062
|
+
}, E(V.label), 9, Ca)) : O("", !0),
|
|
2063
|
+
w("details", {
|
|
2064
|
+
ref_key: "dropdown",
|
|
2065
|
+
ref: s,
|
|
2066
|
+
class: "vv-select__wrapper",
|
|
2067
|
+
onClick: S[2] || (S[2] = (T) => a(c) || a(b) ? T.preventDefault() : null),
|
|
2068
|
+
onKeyup: S[3] || (S[3] = Ge((T) => s.value.open = !1, ["esc"])),
|
|
2069
|
+
onToggle: Y
|
|
2070
|
+
}, [
|
|
2071
|
+
w("summary", {
|
|
2072
|
+
class: "vv-select__input",
|
|
2073
|
+
tabindex: a(A),
|
|
2074
|
+
onKeyup: S[1] || (S[1] = Ge((T) => V.searchable ? T.preventDefault() : null, ["space"]))
|
|
2075
|
+
}, [
|
|
2076
|
+
V.searchable && u.value ? ne((m(), _("input", {
|
|
2077
|
+
key: 0,
|
|
2078
|
+
id: `${a(f)}-input`,
|
|
2079
|
+
ref_key: "inputSearch",
|
|
2080
|
+
ref: r,
|
|
2081
|
+
"onUpdate:modelValue": S[0] || (S[0] = (T) => v.value = T),
|
|
2082
|
+
role: "combobox",
|
|
2083
|
+
placeholder: V.searchPlaceholder
|
|
2084
|
+
}, null, 8, Aa)), [
|
|
2085
|
+
[Qe, v.value]
|
|
2086
|
+
]) : (m(), _(re, { key: 1 }, [
|
|
2087
|
+
K(E(a(ae) || V.placeholder), 1)
|
|
2088
|
+
], 64))
|
|
2089
|
+
], 40, ka),
|
|
2090
|
+
q(Ko, D({
|
|
2091
|
+
id: `${a(f)}-dropdown`
|
|
2092
|
+
}, {
|
|
2093
|
+
...e,
|
|
2094
|
+
options: a(X)
|
|
2095
|
+
}, { "onUpdate:modelValue": $ }), null, 16, ["id"])
|
|
2096
|
+
], 544),
|
|
2097
|
+
q(a(l), { class: "vv-select__hint" })
|
|
2098
|
+
], 10, $a));
|
|
2099
|
+
}
|
|
2100
|
+
}), Ke = {
|
|
2101
|
+
LEFT: "left",
|
|
2102
|
+
RIGHT: "right"
|
|
2103
|
+
}, Oa = {
|
|
2104
|
+
hard: "hard",
|
|
2105
|
+
soft: "soft"
|
|
2106
|
+
}, wa = ["update:modelValue", "focus", "blur"], Ia = {
|
|
2107
|
+
...se,
|
|
2108
|
+
...ie,
|
|
2109
|
+
...ue,
|
|
2110
|
+
...Oe,
|
|
2111
|
+
...J,
|
|
2112
|
+
...it,
|
|
2113
|
+
...ut,
|
|
2114
|
+
...Zt,
|
|
2115
|
+
id: [String, Number],
|
|
2116
|
+
modelValue: {
|
|
2117
|
+
type: [String],
|
|
2118
|
+
default: void 0
|
|
2119
|
+
},
|
|
2120
|
+
cols: { type: Number, default: 50 },
|
|
2121
|
+
rows: { type: Number, default: 5 },
|
|
2122
|
+
icon: { type: String, default: "" },
|
|
2123
|
+
iconPosition: {
|
|
2124
|
+
type: String,
|
|
2125
|
+
validation: (o) => Object.values(Ke).includes(o),
|
|
2126
|
+
default: Ke.RIGHT
|
|
2127
|
+
},
|
|
2128
|
+
floating: Boolean,
|
|
2129
|
+
wrap: { type: String, default: Oa.soft },
|
|
2130
|
+
autoclear: Boolean,
|
|
2131
|
+
resizable: Boolean
|
|
2132
|
+
}, Ea = ["for"], Ta = { class: "vv-textarea__wrapper" }, Ba = ["id", "disabled", "readonly", "required"], Ra = {
|
|
2133
|
+
key: 2,
|
|
2134
|
+
class: "vv-textarea__limit"
|
|
2135
|
+
}, Da = {
|
|
2136
|
+
name: "VvInputText"
|
|
2137
|
+
}, Ja = /* @__PURE__ */ B({
|
|
2138
|
+
...Da,
|
|
2139
|
+
props: Ia,
|
|
2140
|
+
emits: wa,
|
|
2141
|
+
setup(o, { emit: t }) {
|
|
2142
|
+
const e = o, n = oe(), l = H(), { icon: s, iconPosition: r, label: f, modelValue: v, autoclear: p, limit: u } = x(e), d = i(() => String(e.id || ve())), c = i(() => `${d.value}-hint`), b = i(
|
|
2143
|
+
() => e.floating && z(e.placeholder) ? " " : e.placeholder
|
|
2144
|
+
), g = bt(v, t, e.debounce), { hasIconLeft: y, hasIconRight: h } = ft(s, r, {
|
|
2145
|
+
iconLeft: n["icon-left"],
|
|
2146
|
+
iconRight: n["icon-right"]
|
|
2147
|
+
}), { focused: k } = mt(l, t), { textLength: P, formattedTextLimitLength: I } = gt(g, {
|
|
2148
|
+
mode: e.limit,
|
|
2149
|
+
upperLimit: e.maxlength || 0
|
|
2150
|
+
}), A = i(() => !z(v)), R = i(() => {
|
|
2151
|
+
if (e.error === !0)
|
|
2152
|
+
return !0;
|
|
2153
|
+
if (e.valid === !0)
|
|
2154
|
+
return !1;
|
|
2155
|
+
}), { HintSlot: M, hasHint: X, hasErrors: Z } = de(e, n), { bemCssClasses: ae } = L("vv-textarea", {
|
|
2156
|
+
modifiers: e.modifiers,
|
|
2157
|
+
readonly: e.readonly,
|
|
2158
|
+
valid: e.valid,
|
|
2159
|
+
invalid: e.error,
|
|
2160
|
+
loading: e.loading,
|
|
2161
|
+
iconLeft: y,
|
|
2162
|
+
iconRight: h,
|
|
2163
|
+
floating: e.floating && !z(e.label),
|
|
2164
|
+
dirty: A,
|
|
2165
|
+
resizable: e.resizable
|
|
2166
|
+
}), Y = i(
|
|
2167
|
+
() => ({
|
|
2168
|
+
placeholder: b.value,
|
|
2169
|
+
name: e.name,
|
|
2170
|
+
autocomplete: e.autocomplete,
|
|
2171
|
+
minlength: e.minlength,
|
|
2172
|
+
maxlength: e.maxlength,
|
|
2173
|
+
cols: e.cols,
|
|
2174
|
+
rows: e.rows,
|
|
2175
|
+
"aria-invalid": R.value,
|
|
2176
|
+
"aria-describedby": !Z.value && X.value ? c.value : void 0,
|
|
2177
|
+
"aria-errormessage": Z.value ? c.value : void 0
|
|
2178
|
+
})
|
|
2179
|
+
), $ = i(() => {
|
|
2180
|
+
const { modelValue: S, valid: T, error: F, maxlength: we, hintLabel: Ie } = e;
|
|
2181
|
+
return {
|
|
2182
|
+
valid: T,
|
|
2183
|
+
error: F,
|
|
2184
|
+
modelValue: S,
|
|
2185
|
+
hintLabel: Ie,
|
|
2186
|
+
maxlength: we,
|
|
2187
|
+
textLength: P
|
|
2188
|
+
};
|
|
2189
|
+
});
|
|
2190
|
+
function V() {
|
|
2191
|
+
g.value = "";
|
|
2192
|
+
}
|
|
2193
|
+
return Je(() => {
|
|
2194
|
+
e.autofocus && (k.value = !0);
|
|
2195
|
+
}), (S, T) => (m(), _("div", D(a(Y), { class: a(ae) }), [
|
|
2196
|
+
a(f) ? (m(), _("label", {
|
|
2197
|
+
key: 0,
|
|
2198
|
+
for: a(d),
|
|
2199
|
+
class: "vv-textarea__label"
|
|
2200
|
+
}, E(a(f)), 9, Ea)) : O("", !0),
|
|
2201
|
+
w("div", Ta, [
|
|
2202
|
+
a(y) ? C(S.$slots, "icon-left", te(D({ key: 0 }, a($))), () => [
|
|
2203
|
+
q(j, {
|
|
2204
|
+
class: "vv-textarea__icon-left",
|
|
2205
|
+
name: a(s)
|
|
2206
|
+
}, null, 8, ["name"])
|
|
2207
|
+
]) : O("", !0),
|
|
2208
|
+
ne(w("textarea", D({
|
|
2209
|
+
id: a(d),
|
|
2210
|
+
ref_key: "input",
|
|
2211
|
+
ref: l,
|
|
2212
|
+
"onUpdate:modelValue": T[0] || (T[0] = (F) => be(g) ? g.value = F : null)
|
|
2213
|
+
}, a(Y), {
|
|
2214
|
+
disabled: S.disabled,
|
|
2215
|
+
readonly: S.readonly,
|
|
2216
|
+
required: S.required
|
|
2217
|
+
}), null, 16, Ba), [
|
|
2218
|
+
[Qe, a(g)]
|
|
2219
|
+
]),
|
|
2220
|
+
ne(w("button", {
|
|
2221
|
+
class: "vv-button vv-button--ghost",
|
|
2222
|
+
onClick: V
|
|
2223
|
+
}, [
|
|
2224
|
+
q(j, { name: "clear-field" })
|
|
2225
|
+
], 512), [
|
|
2226
|
+
[Xe, a(p) && a(P) > 0]
|
|
2227
|
+
]),
|
|
2228
|
+
a(h) ? C(S.$slots, "icon-right", te(D({ key: 1 }, a($))), () => [
|
|
2229
|
+
q(j, { name: a(s) }, null, 8, ["name"])
|
|
2230
|
+
]) : O("", !0),
|
|
2231
|
+
a(u) ? (m(), _("span", Ra, [
|
|
2232
|
+
C(S.$slots, "limit", {}, () => [
|
|
2233
|
+
K(E(a(I)), 1)
|
|
2234
|
+
])
|
|
2235
|
+
])) : O("", !0)
|
|
2236
|
+
]),
|
|
2237
|
+
q(a(M), {
|
|
2238
|
+
id: a(c),
|
|
2239
|
+
class: "vv-textarea__hint"
|
|
2240
|
+
}, null, 8, ["id"])
|
|
2241
|
+
], 16));
|
|
2242
|
+
}
|
|
2243
|
+
});
|
|
1076
2244
|
export {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
2245
|
+
Ft as VvAccordion,
|
|
2246
|
+
Ga as VvAccordionGroup,
|
|
2247
|
+
ja as VvBadge,
|
|
2248
|
+
Ma as VvBreadcrumb,
|
|
2249
|
+
Ua as VvButton,
|
|
2250
|
+
qa as VvButtonGroup,
|
|
2251
|
+
Ka as VvCard,
|
|
2252
|
+
Ao as VvCheckbox,
|
|
2253
|
+
Ya as VvCheckboxGroup,
|
|
2254
|
+
Fa as VvDialog,
|
|
2255
|
+
Ko as VvDropdown,
|
|
2256
|
+
j as VvIcon,
|
|
2257
|
+
Wa as VvInputText,
|
|
2258
|
+
sa as VvNativeSelect,
|
|
2259
|
+
za as VvProgress,
|
|
2260
|
+
ba as VvRadio,
|
|
2261
|
+
Xa as VvRadioGroup,
|
|
2262
|
+
Za as VvSelect,
|
|
2263
|
+
Ja as VvTextarea
|
|
1089
2264
|
};
|