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