@volverjs/ui-vue 0.0.1-beta.12 → 0.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/icons.cjs +73 -0
- package/bin/icons.js +75 -0
- package/dist/Volver.d.ts +15 -2
- package/dist/components/VvAccordion/VvAccordion.es.js +133 -236
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
- package/dist/components/VvAccordion/index.d.ts +46 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +199 -277
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +44 -151
- package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +9 -13
- package/dist/components/VvBadge/VvBadge.es.js +42 -151
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -53
- package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +0 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +55 -168
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +24 -104
- package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +1 -1
- package/dist/components/VvButton/VvButton.es.js +298 -312
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +91 -163
- package/dist/components/VvButton/{VvButton.d.ts → index.d.ts} +46 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +59 -172
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +30 -125
- package/dist/components/VvButtonGroup/{VvButtonGroup.d.ts → index.d.ts} +0 -0
- package/dist/components/VvCard/VvCard.es.js +55 -166
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
- package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +344 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +87 -0
- package/dist/components/VvCheckbox/index.d.ts +86 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +415 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +113 -0
- package/dist/components/{VvCheckGroup/VvCheckGroup.d.ts → VvCheckboxGroup/index.d.ts} +10 -10
- package/dist/components/VvDialog/VvDialog.es.js +108 -230
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
- package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
- package/dist/components/VvDropdown/VvDropdown.es.js +167 -186
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +34 -136
- package/dist/components/VvDropdown/{VvDropdown.d.ts → index.d.ts} +7 -3
- package/dist/components/VvIcon/VvIcon.es.js +62 -174
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
- package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
- package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
- package/dist/components/VvInputText/VvInputText.es.js +586 -577
- package/dist/components/VvInputText/VvInputText.umd.js +1 -2
- package/dist/components/VvInputText/VvInputText.vue.d.ts +187 -275
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +175 -0
- package/dist/components/VvNativeSelect/VvNativeSelect.es.js +299 -347
- package/dist/components/VvNativeSelect/VvNativeSelect.umd.js +1 -2
- package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +78 -190
- package/dist/components/VvNativeSelect/{VvNativeSelect.d.ts → index.d.ts} +35 -8
- package/dist/components/VvProgress/VvProgress.es.js +45 -162
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +17 -103
- package/dist/components/VvProgress/{VvProgress.d.ts → index.d.ts} +1 -7
- package/dist/components/VvRadio/VvRadio.es.js +292 -267
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +52 -122
- package/dist/components/VvRadio/index.d.ts +64 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +342 -380
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +58 -213
- package/dist/components/VvRadioGroup/{VvRadioGroup.d.ts → index.d.ts} +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +556 -510
- package/dist/components/VvSelect/VvSelect.umd.js +1 -2
- package/dist/components/VvSelect/VvSelect.vue.d.ts +75 -240
- package/dist/components/VvSelect/{VvSelect.d.ts → index.d.ts} +12 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +372 -481
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -2
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +103 -299
- package/dist/components/VvTextarea/{VvTextarea.d.ts → index.d.ts} +36 -13
- package/dist/components/common/HintSlot.d.ts +10 -4
- package/dist/components/index.d.ts +13 -6
- package/dist/components/index.es.js +2070 -895
- package/dist/components/index.umd.js +1 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -2
- package/dist/composables/focus/useComponentFocus.d.ts +3 -3
- package/dist/composables/group/types/IAccordionGroupState.d.ts +1 -3
- package/dist/composables/group/types/IGroupState.d.ts +2 -2
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/icons/useComponentIcons.d.ts +2 -2
- package/dist/composables/textLimit/useTextLimit.d.ts +0 -3
- package/dist/constants.d.ts +4 -4
- package/dist/icons.d.ts +1881 -0
- package/dist/icons.es.js +4 -6
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2113 -932
- package/dist/index.umd.js +1 -2
- package/dist/props/index.d.ts +9 -3
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +40 -0
- package/dist/resolvers/unplugin.umd.js +1 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +4 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Button/Button.test.d.ts +3 -8
- package/dist/stories/Card/Card.test.d.ts +3 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Icon/IconList.vue.d.ts +1 -43
- package/dist/stories/InputText/InputText.test.d.ts +6 -0
- package/dist/stories/Radio/Radio.test.d.ts +3 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +8 -0
- package/dist/stories/Select/Select.test.d.ts +3 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +8 -0
- package/dist/stories/utils.d.ts +1 -3
- package/dist/test/sleep.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +82 -95
- package/env.d.ts +1 -0
- package/package.json +103 -68
- package/src/Volver.ts +32 -3
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +80 -76
- package/src/components/VvAccordion/index.ts +69 -0
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +77 -41
- package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +8 -12
- package/src/components/VvBadge/VvBadge.vue +14 -10
- package/src/components/VvBadge/{VvBadge.ts → index.ts} +0 -0
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +18 -19
- package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -1
- package/src/components/VvButton/VvButton.vue +123 -113
- package/src/components/VvButton/index.ts +147 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +21 -17
- package/src/components/VvButtonGroup/{VvButtonGroup.ts → index.ts} +0 -0
- package/src/components/VvCard/VvCard.vue +20 -22
- package/src/components/VvCard/{VvCard.ts → index.ts} +0 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +124 -0
- package/src/components/VvCheckbox/index.ts +94 -0
- package/src/components/{VvCheckGroup/VvCheckGroup.vue → VvCheckboxGroup/VvCheckboxGroup.vue} +49 -54
- package/src/components/{VvCheckGroup/VvCheckGroup.ts → VvCheckboxGroup/index.ts} +9 -9
- package/src/components/VvDialog/VvDialog.vue +47 -50
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +61 -40
- package/src/components/VvDropdown/{VvDropdown.ts → index.ts} +8 -4
- package/src/components/VvIcon/VvIcon.vue +31 -25
- package/src/components/VvIcon/{VvIcon.ts → index.ts} +9 -0
- package/src/components/VvInputText/VvInputClearAction.ts +53 -0
- package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
- package/src/components/VvInputText/VvInputStepAction.ts +49 -0
- package/src/components/VvInputText/VvInputText.vue +168 -170
- package/src/components/VvInputText/VvInputTextActions.ts +54 -108
- package/src/components/VvInputText/index.ts +135 -0
- package/src/components/VvNativeSelect/VvNativeSelect.vue +130 -68
- package/src/components/VvNativeSelect/{VvNativeSelect.ts → index.ts} +26 -7
- package/src/components/VvProgress/VvProgress.vue +25 -26
- package/src/components/VvProgress/{VvProgress.ts → index.ts} +4 -7
- package/src/components/VvRadio/VvRadio.vue +81 -108
- package/src/components/VvRadio/index.ts +78 -0
- package/src/components/VvRadioGroup/VvRadioGroup.vue +45 -45
- package/src/components/VvRadioGroup/{VvRadioGroup.ts → index.ts} +1 -1
- package/src/components/VvSelect/VvSelect.vue +90 -69
- package/src/components/VvSelect/{VvSelect.ts → index.ts} +12 -5
- package/src/components/VvTextarea/VvTextarea.vue +121 -128
- package/src/components/VvTextarea/{VvTextarea.ts → index.ts} +31 -11
- package/src/components/common/HintSlot.ts +157 -136
- package/src/components/index.ts +13 -6
- package/src/composables/debouncedInput/useDebouncedInput.ts +21 -15
- package/src/composables/focus/useComponentFocus.ts +6 -8
- package/src/composables/group/types/IAccordionGroupState.ts +1 -3
- package/src/composables/group/types/IGroupState.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +20 -30
- package/src/composables/group/useProvideGroupState.ts +1 -2
- package/src/composables/icons/useComponentIcons.ts +2 -3
- package/src/composables/options/useOptions.ts +3 -0
- package/src/composables/textLimit/useTextLimit.ts +1 -4
- package/src/composables/useModifiers.ts +13 -15
- package/src/constants.ts +5 -7
- package/src/directives/{.README → .gitkeep} +0 -0
- package/src/icons.ts +7 -0
- package/src/index.ts +0 -1
- package/src/props/index.ts +7 -1
- package/src/resolvers/unplugin.ts +103 -0
- package/src/shims.d.ts +11 -0
- package/src/stories/Accordion/Accordion.stories.mdx +10 -9
- package/src/stories/Accordion/Accordion.test.ts +37 -0
- package/src/stories/Accordion/AccordionSlots.stories.mdx +40 -25
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +10 -16
- package/src/stories/AccordionGroup/{accordionGroupTest.js → AccordionGroup.test.js} +15 -17
- package/src/stories/AccordionGroup/AccordionGroupCollapse.stories.mdx +38 -0
- package/src/stories/AccordionGroup/{AccordionItems.stories.mdx → AccordionGroupItems.stories.mdx} +7 -13
- package/src/stories/Badge/Badge.stories.mdx +8 -8
- package/src/stories/Badge/Badge.test.ts +16 -0
- package/src/stories/Badge/BadgeColor.stories.mdx +6 -7
- package/src/stories/Badge/BadgeDot.stories.mdx +4 -3
- package/src/stories/Badge/BadgeModifiers.stories.mdx +7 -6
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +15 -7
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +49 -0
- package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +15 -7
- package/src/stories/Button/Button.stories.mdx +16 -17
- package/src/stories/Button/Button.test.ts +8 -12
- package/src/stories/Button/ButtonActive.stories.mdx +2 -1
- package/src/stories/Button/ButtonBadge.stories.mdx +2 -2
- package/src/stories/Button/ButtonDisabled.stories.mdx +1 -1
- package/src/stories/Button/ButtonIcon.stories.mdx +6 -3
- package/src/stories/Button/ButtonIconPosition.stories.mdx +1 -1
- package/src/stories/Button/ButtonLink.stories.mdx +1 -19
- package/src/stories/Button/ButtonLoading.stories.mdx +4 -4
- package/src/stories/Button/ButtonModifiers.stories.mdx +1 -1
- package/src/stories/Button/ButtonPressed.stories.mdx +31 -0
- package/src/stories/Button/ButtonSlots.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +5 -6
- package/src/stories/ButtonGroup/{ButtonGroupTest.js → ButtonGroup.test.js} +6 -28
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +5 -6
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +11 -12
- package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +3 -4
- package/src/stories/Card/Card.stories.mdx +7 -5
- package/src/stories/Card/Card.test.ts +26 -0
- package/src/stories/Card/CardSlots.stories.mdx +5 -5
- package/src/stories/Card/CardVariant.stories.mdx +5 -4
- package/src/stories/Checkbox/Checkbox.stories.mdx +51 -0
- package/src/stories/Checkbox/Checkbox.test.js +115 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +76 -0
- package/src/stories/{Check/CheckDisabled.stories.mdx → Checkbox/CheckboxDisabled.stories.mdx} +7 -7
- package/src/stories/Checkbox/CheckboxError.stories.mdx +43 -0
- package/src/stories/Checkbox/CheckboxHintLabel.stories.mdx +35 -0
- package/src/stories/{Check/CheckReadonly.stories.mdx → Checkbox/CheckboxReadonly.stories.mdx} +6 -8
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +69 -0
- package/src/stories/{Check/CheckSwitch.stories.mdx → Checkbox/CheckboxSwitch.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +69 -0
- package/src/stories/CheckboxGroup/CheckboxGroupDisabled.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupError.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupHintLabel.stories.mdx +27 -0
- package/src/stories/CheckboxGroup/CheckboxGroupLabel.stories.mdx +26 -0
- package/src/stories/{CheckGroup/CheckGroupOptionLabel.stories.mdx → CheckboxGroup/CheckboxGroupOptionLabel.stories.mdx} +14 -11
- package/src/stories/{CheckGroup/CheckGroupOptionValue.stories.mdx → CheckboxGroup/CheckboxGroupOptionValue.stories.mdx} +13 -10
- package/src/stories/{CheckGroup/CheckGroupOptions.stories.mdx → CheckboxGroup/CheckboxGroupOptions.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroupReadonly.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +152 -0
- package/src/stories/CheckboxGroup/CheckboxGroupValid.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupVertical.stories.mdx +26 -0
- package/src/stories/Dialog/Dialog.stories.mdx +5 -5
- package/src/stories/Dialog/Dialog.test.ts +26 -0
- package/src/stories/Dialog/DialogAutoClose.stories.mdx +1 -1
- package/src/stories/Dialog/DialogSize.stories.mdx +1 -1
- package/src/stories/Dropdown/Dropdown.stories.mdx +11 -7
- package/src/stories/Dropdown/Dropdown.test.ts +80 -0
- package/src/stories/Dropdown/DropdownDisabled.stories.mdx +9 -2
- package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +2 -2
- package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownMultiple.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +4 -4
- package/src/stories/Dropdown/DropdownUseObject.stories.mdx +4 -2
- package/src/stories/Icon/Icon.stories.mdx +8 -8
- package/src/stories/Icon/{IconTest.js → Icon.test.js} +2 -5
- package/src/stories/Icon/IconList.vue +5 -6
- package/src/stories/Icon/IconPrefix.stories.mdx +2 -2
- package/src/stories/Icon/IconRemote.stories.mdx +2 -2
- package/src/stories/Icon/IconsList.stories.mdx +2 -18
- package/src/stories/InputText/InputText.stories.mdx +25 -19
- package/src/stories/InputText/InputText.test.ts +156 -0
- package/src/stories/InputText/InputTextAutocomplete.stories.mdx +9 -2
- package/src/stories/InputText/InputTextAutofocus.stories.mdx +6 -3
- package/src/stories/InputText/InputTextDisabled.stories.mdx +10 -2
- package/src/stories/InputText/InputTextError.stories.mdx +10 -2
- package/src/stories/InputText/InputTextFloating.stories.mdx +10 -3
- package/src/stories/InputText/InputTextHintLabel.stories.mdx +10 -2
- package/src/stories/InputText/InputTextIcon.stories.mdx +6 -2
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +10 -3
- package/src/stories/InputText/InputTextLabel.stories.mdx +8 -2
- package/src/stories/InputText/InputTextLoading.stories.mdx +10 -2
- package/src/stories/InputText/InputTextMax.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +22 -5
- package/src/stories/InputText/InputTextMin.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMinLength.stories.mdx +9 -2
- package/src/stories/InputText/InputTextPlaceholder.stories.mdx +8 -2
- package/src/stories/InputText/InputTextReadonly.stories.mdx +6 -2
- package/src/stories/InputText/InputTextSlots.stories.mdx +4 -5
- package/src/stories/InputText/InputTextStep.stories.mdx +9 -3
- package/src/stories/InputText/InputTextType.stories.mdx +110 -13
- package/src/stories/InputText/InputTextValid.stories.mdx +10 -2
- package/src/stories/NativeSelect/NativeSelect.stories.mdx +15 -11
- package/src/stories/NativeSelect/NativeSelect.test.js +151 -0
- package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +6 -7
- package/src/stories/NativeSelect/NativeSelectError.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +14 -12
- package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +44 -38
- package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +19 -11
- package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +26 -30
- package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +30 -30
- package/src/stories/Progress/Progress.stories.mdx +8 -11
- package/src/stories/Progress/{ProgressTest.js → Progress.test.js} +4 -10
- package/src/stories/Progress/ProgressDeterminate.stories.mdx +3 -6
- package/src/stories/Radio/Radio.stories.mdx +11 -17
- package/src/stories/Radio/Radio.test.ts +52 -0
- package/src/stories/Radio/RadioDisabled.stories.mdx +4 -7
- package/src/stories/Radio/RadioError.stories.mdx +8 -28
- package/src/stories/Radio/RadioHintLabel.stories.mdx +6 -7
- package/src/stories/Radio/RadioSlots.stories.mdx +21 -7
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +20 -27
- package/src/stories/RadioGroup/RadioGroup.test.ts +139 -0
- package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupError.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +8 -10
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +11 -13
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +7 -9
- package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +39 -62
- package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +6 -8
- package/src/stories/Select/Select.stories.mdx +32 -29
- package/src/stories/Select/Select.test.ts +104 -0
- package/src/stories/Select/SelectDisabled.stories.mdx +3 -3
- package/src/stories/Select/SelectMaxValues.stories.mdx +3 -3
- package/src/stories/Select/SelectMultiple.stories.mdx +5 -6
- package/src/stories/Select/SelectNative.stories.mdx +6 -8
- package/src/stories/Select/SelectOptions.stories.mdx +4 -4
- package/src/stories/Select/SelectSearchable.stories.mdx +13 -12
- package/src/stories/Select/SelectSeparator.stories.mdx +3 -3
- package/src/stories/Select/SelectUseObject.stories.mdx +3 -3
- package/src/stories/Textarea/Textarea.stories.mdx +6 -10
- package/src/stories/Textarea/Textarea.test.ts +204 -0
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +7 -6
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaError.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +12 -2
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaIcon.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaId.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLabel.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLimit.stories.mdx +5 -2
- package/src/stories/Textarea/TextareaLoading.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +5 -4
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaName.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +4 -3
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +8 -3
- package/src/stories/Textarea/TextareaRequired.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaResizable.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaSlots.stories.mdx +7 -8
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -1
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +14 -4
- package/src/stories/utils.ts +1 -1
- package/src/stories/volver-ui-vue.stories.mdx +1 -1
- package/src/test/expect.ts +3 -1
- package/src/test/sleep.ts +2 -0
- package/src/test/types.d.ts +14 -1
- package/src/types/{.README → .gitkeep} +0 -0
- package/src/utils/ObjectUtilities.ts +247 -241
- package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
- package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
- package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -18
- package/dist/components/VvCheck/VvCheck.d.ts +0 -47
- package/dist/components/VvCheck/VvCheck.es.js +0 -318
- package/dist/components/VvCheck/VvCheck.umd.js +0 -1
- package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
- package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
- package/dist/components/VvCheckGroup/VvCheckGroup.es.js +0 -451
- package/dist/components/VvCheckGroup/VvCheckGroup.umd.js +0 -2
- package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
- package/dist/components/VvDialog/constants.d.ts +0 -5
- package/dist/components/VvInputText/VvInputText.d.ts +0 -73
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvRadio/VvRadio.d.ts +0 -22
- package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/stories/RadioGroup/RadioOption.test.d.ts +0 -4
- package/dist/stories/RadioGroup/RadioProperty.test.d.ts +0 -12
- package/dist/stories/RadioGroup/RadioSlots.test.d.ts +0 -6
- package/src/assets/icons/index.js +0 -7
- package/src/components/VvAccordion/VvAccordion.ts +0 -34
- package/src/components/VvAccordion/useAccordionProps.ts +0 -45
- package/src/components/VvButton/VvButton.ts +0 -87
- package/src/components/VvButton/useButtonGroupProps.ts +0 -43
- package/src/components/VvCheck/VvCheck.ts +0 -48
- package/src/components/VvCheck/VvCheck.vue +0 -147
- package/src/components/VvCheck/useCheckProps.ts +0 -41
- package/src/components/VvDialog/VvDialog.ts +0 -17
- package/src/components/VvDialog/constants.ts +0 -5
- package/src/components/VvInputText/VvInputText.ts +0 -66
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvRadio/VvRadio.ts +0 -25
- package/src/components/VvRadio/useRadioProps.ts +0 -40
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
- package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
- package/src/stories/Accordion/accordionTest.js +0 -36
- package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
- package/src/stories/Badge/BadgeTest.js +0 -21
- package/src/stories/Button/ButtonSelected.stories.mdx +0 -30
- package/src/stories/Check/Check.stories.mdx +0 -62
- package/src/stories/Check/CheckBinary.stories.mdx +0 -75
- package/src/stories/Check/CheckError.stories.mdx +0 -64
- package/src/stories/Check/CheckErrorTests.js +0 -74
- package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
- package/src/stories/Check/CheckPropertyTest.js +0 -102
- package/src/stories/Check/CheckSlots.stories.mdx +0 -51
- package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
- package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
- package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
- package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
- package/src/stories/RadioGroup/RadioOption.test.ts +0 -45
- package/src/stories/RadioGroup/RadioProperty.test.ts +0 -87
- package/src/stories/RadioGroup/RadioSlots.test.ts +0 -29
- package/src/stories/stories.scss +0 -13
|
@@ -1,145 +1,296 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { toReactive as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return !1;
|
|
17
|
-
for (r = s; r-- !== 0; )
|
|
18
|
-
if (!this.deepEquals(t[r], n[r]))
|
|
19
|
-
return !1;
|
|
20
|
-
return !0;
|
|
1
|
+
import { unref as s, toRefs as K, computed as r, h as S, watch as Te, defineComponent as O, ref as N, inject as Pe, openBlock as w, createBlock as _, mergeProps as A, createCommentVNode as D, useSlots as Ie, onMounted as Ce, createElementBlock as q, normalizeClass as _e, toDisplayString as ie, createElementVNode as se, renderSlot as z, normalizeProps as X, createVNode as re, withDirectives as Ae, isRef as De, vModelDynamic as xe, guardReactiveProps as Oe, createTextVNode as Re } from "vue";
|
|
2
|
+
import { nanoid as He } from "nanoid";
|
|
3
|
+
import { toReactive as Ve, useFocus as ke, isString as ae } from "@vueuse/core";
|
|
4
|
+
import { iconExists as k, Icon as Le, addIcon as Ne } from "@iconify/vue";
|
|
5
|
+
function le(n, t) {
|
|
6
|
+
if (n && Object.keys(n).length && t) {
|
|
7
|
+
if (t.indexOf(".") === -1)
|
|
8
|
+
return n[t];
|
|
9
|
+
{
|
|
10
|
+
const e = t.split(".");
|
|
11
|
+
let i = n;
|
|
12
|
+
for (let o = 0, u = e.length; o < u; ++o) {
|
|
13
|
+
if (n == null)
|
|
14
|
+
return null;
|
|
15
|
+
i = i[e[o]];
|
|
21
16
|
}
|
|
22
|
-
|
|
23
|
-
return !1;
|
|
24
|
-
const p = t instanceof Date, u = n instanceof Date;
|
|
25
|
-
if (p != u)
|
|
26
|
-
return !1;
|
|
27
|
-
if (p && u)
|
|
28
|
-
return t.getTime() == n.getTime();
|
|
29
|
-
const S = t instanceof RegExp, l = n instanceof RegExp;
|
|
30
|
-
if (S != l)
|
|
31
|
-
return !1;
|
|
32
|
-
if (S && l)
|
|
33
|
-
return t.toString() == n.toString();
|
|
34
|
-
const c = Object.keys(t);
|
|
35
|
-
if (s = c.length, s !== Object.keys(n).length)
|
|
36
|
-
return !1;
|
|
37
|
-
for (r = s; r-- !== 0; )
|
|
38
|
-
if (!Object.prototype.hasOwnProperty.call(n, c[r]))
|
|
39
|
-
return !1;
|
|
40
|
-
for (r = s; r-- !== 0; )
|
|
41
|
-
if (a = c[r], !this.deepEquals(t[a], n[a]))
|
|
42
|
-
return !1;
|
|
43
|
-
return !0;
|
|
17
|
+
return i;
|
|
44
18
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
19
|
+
} else
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
function x(n) {
|
|
23
|
+
return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(s(n));
|
|
24
|
+
}
|
|
25
|
+
function $e(n) {
|
|
26
|
+
return typeof n == "string" || n instanceof String;
|
|
27
|
+
}
|
|
28
|
+
function ue(n) {
|
|
29
|
+
var t, e;
|
|
30
|
+
if (n)
|
|
31
|
+
return (e = (t = n.match(
|
|
32
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
33
|
+
)) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
|
|
34
|
+
}
|
|
35
|
+
function L(n) {
|
|
36
|
+
return Array.isArray(n) ? n.filter((t) => $e(t)).join(" ") : n;
|
|
37
|
+
}
|
|
38
|
+
function Be(n, t) {
|
|
39
|
+
const {
|
|
40
|
+
error: e,
|
|
41
|
+
valid: i,
|
|
42
|
+
hint: o,
|
|
43
|
+
loading: u
|
|
44
|
+
} = t, {
|
|
45
|
+
hintLabel: a,
|
|
46
|
+
modelValue: b,
|
|
47
|
+
valid: m,
|
|
48
|
+
validLabel: f,
|
|
49
|
+
error: c,
|
|
50
|
+
errorLabel: l,
|
|
51
|
+
...h
|
|
52
|
+
} = K(n), d = le(h, "loading"), v = le(h, "loadingLabel"), y = r(() => c.value ? !!(c.value && e || l != null && l.value && Array.isArray(l.value) && l.value.length > 0 || l != null && l.value && !x(l)) : !1), R = r(
|
|
53
|
+
() => !!(a && a.value || o)
|
|
54
|
+
), C = r(
|
|
55
|
+
() => !!(f && f.value || i)
|
|
56
|
+
), H = r(
|
|
57
|
+
() => !!(d != null && d.value && u || d != null && d.value && (v != null && v.value))
|
|
58
|
+
), $ = r(
|
|
59
|
+
() => R.value || C || y.value || H.value
|
|
60
|
+
);
|
|
61
|
+
return {
|
|
62
|
+
hasErrors: y,
|
|
63
|
+
hasHint: R,
|
|
64
|
+
hasValid: C,
|
|
65
|
+
hasLoading: H,
|
|
66
|
+
HintSlot: {
|
|
67
|
+
name: "HintSlot",
|
|
68
|
+
props: {
|
|
69
|
+
params: {
|
|
70
|
+
type: Object,
|
|
71
|
+
default: () => ({})
|
|
58
72
|
}
|
|
59
|
-
|
|
73
|
+
},
|
|
74
|
+
setup(B) {
|
|
75
|
+
const M = r(() => {
|
|
76
|
+
const T = Ve({
|
|
77
|
+
hintLabel: a,
|
|
78
|
+
modelValue: b,
|
|
79
|
+
valid: m,
|
|
80
|
+
validLabel: f,
|
|
81
|
+
error: c,
|
|
82
|
+
errorLabel: l,
|
|
83
|
+
loading: d,
|
|
84
|
+
loadingLabel: v,
|
|
85
|
+
...B.params
|
|
86
|
+
});
|
|
87
|
+
return c != null && c.value ? (e == null ? void 0 : e(T)) || L(l == null ? void 0 : l.value) || (a == null ? void 0 : a.value) : m != null && m.value ? (i == null ? void 0 : i(T)) || L(f == null ? void 0 : f.value) || (a == null ? void 0 : a.value) : d != null && d.value ? (u == null ? void 0 : u(T)) || L(v == null ? void 0 : v.value) || (a == null ? void 0 : a.value) : (o == null ? void 0 : o(T)) || L(a == null ? void 0 : a.value) || (a == null ? void 0 : a.value);
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
isVisible: $,
|
|
91
|
+
hasErrors: y,
|
|
92
|
+
hasValid: C,
|
|
93
|
+
hintContent: M
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
render() {
|
|
97
|
+
if (this.isVisible)
|
|
98
|
+
return S(
|
|
99
|
+
"small",
|
|
100
|
+
{
|
|
101
|
+
role: this.hasErrors || this.hasValid ? "alert" : void 0
|
|
102
|
+
},
|
|
103
|
+
this.hintContent
|
|
104
|
+
);
|
|
60
105
|
}
|
|
61
|
-
} else
|
|
62
|
-
return null;
|
|
63
|
-
},
|
|
64
|
-
isFunction(t) {
|
|
65
|
-
return !!(t && t.constructor && t.call && t.apply);
|
|
66
|
-
},
|
|
67
|
-
findIndexInList(t, n) {
|
|
68
|
-
let e = -1;
|
|
69
|
-
if (n) {
|
|
70
|
-
for (let o = 0; o < n.length; o++)
|
|
71
|
-
if (this.equals(n[o], t)) {
|
|
72
|
-
e = o;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
106
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function Me(n, t, e) {
|
|
110
|
+
const i = r(
|
|
111
|
+
() => !!(n.value && t.value === "left" || e.iconLeft)
|
|
112
|
+
), o = r(
|
|
113
|
+
() => !!(n.value && t.value === "right" || e.iconRight)
|
|
114
|
+
), u = r(
|
|
115
|
+
() => !!(n.value && t.value === "top" || e.iconTop)
|
|
116
|
+
), a = r(
|
|
117
|
+
() => !!(n.value && t.value === "bottom" || e.iconBottom)
|
|
118
|
+
);
|
|
119
|
+
return {
|
|
120
|
+
hasIconLeft: i,
|
|
121
|
+
hasIconRight: o,
|
|
122
|
+
hasIconTop: u,
|
|
123
|
+
hasIconBottom: a
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function Ye(n, t) {
|
|
127
|
+
const { focused: e } = ke(n);
|
|
128
|
+
return Te(e, (i) => {
|
|
129
|
+
t(i ? "focus" : "blur", s(n));
|
|
130
|
+
}), {
|
|
131
|
+
focused: e
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function Ue(n, t, e = 0) {
|
|
135
|
+
let i;
|
|
136
|
+
return typeof e == "string" && (e = parseInt(e)), r({
|
|
137
|
+
get: () => n == null ? void 0 : n.value,
|
|
138
|
+
set: (o) => {
|
|
139
|
+
i && clearTimeout(i), i = setTimeout(() => {
|
|
140
|
+
t("update:modelValue", o);
|
|
141
|
+
}, e);
|
|
83
142
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function Fe(n, t) {
|
|
146
|
+
const e = r(() => {
|
|
147
|
+
const u = s(n);
|
|
148
|
+
return ae(u) ? u.length : 0;
|
|
149
|
+
}), i = r(() => {
|
|
150
|
+
const u = s(n) || "";
|
|
151
|
+
return !ae(u) || t.mode === !1 ? 0 : t.mode === !0 ? u.length : s(t.upperLimit) - u.length;
|
|
152
|
+
}), o = r(() => t.mode === !1 ? "" : t.mode === !0 && t.upperLimit && t.upperLimit > 0 ? `${i.value}/${s(t.upperLimit)}` : i.value);
|
|
153
|
+
return {
|
|
154
|
+
textLength: e,
|
|
155
|
+
textLimitLength: i,
|
|
156
|
+
formattedTextLimitLength: o
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function pe(n, t) {
|
|
160
|
+
const e = { [`${n}`]: !0 };
|
|
161
|
+
return {
|
|
162
|
+
bemCssClasses: r(() => Object.keys(t).reduce((o, u) => {
|
|
163
|
+
const a = s(t[u]) || !1;
|
|
164
|
+
if (!a)
|
|
165
|
+
return o;
|
|
166
|
+
if (u === "modifiers") {
|
|
167
|
+
const b = Array.isArray(a) ? a : a.split(" ");
|
|
168
|
+
return {
|
|
169
|
+
...o,
|
|
170
|
+
...b.reduce(
|
|
171
|
+
(m, f) => ({
|
|
172
|
+
...m,
|
|
173
|
+
[`${n}--${ue(f)}`]: !0
|
|
174
|
+
}),
|
|
175
|
+
{}
|
|
176
|
+
)
|
|
177
|
+
};
|
|
178
|
+
} else
|
|
179
|
+
return {
|
|
180
|
+
...o,
|
|
181
|
+
[`${n}--${ue(u)}`]: a
|
|
182
|
+
};
|
|
183
|
+
}, e) || {})
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const We = "ds", je = {
|
|
187
|
+
color: String,
|
|
188
|
+
width: {
|
|
189
|
+
type: [String, Number]
|
|
96
190
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return e > -1 ? n.filter((o, r) => r !== e) : n;
|
|
191
|
+
height: {
|
|
192
|
+
type: [String, Number]
|
|
100
193
|
},
|
|
101
|
-
|
|
102
|
-
|
|
194
|
+
name: {
|
|
195
|
+
type: String,
|
|
196
|
+
required: !0
|
|
103
197
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var o, r, s, a, p;
|
|
107
|
-
return this.isFunction(t[e]) ? n[e] = t[e]() : Array.isArray(t[e]) ? n[e] = t[e][0]() : (o = t[e]) != null && o.type && (Array.isArray(t[e].type) ? n[e] = ((r = t[e]) == null ? void 0 : r.default) || ((s = t[e]) == null ? void 0 : s.type[0]()) : n[e] = ((a = t[e]) == null ? void 0 : a.default) || ((p = t[e]) == null ? void 0 : p.type())), n;
|
|
108
|
-
}, {});
|
|
198
|
+
provider: {
|
|
199
|
+
type: String
|
|
109
200
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
r[e]
|
|
114
|
-
)));
|
|
201
|
+
prefix: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: "normal"
|
|
115
204
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
205
|
+
src: String,
|
|
206
|
+
horizontalFlip: Boolean,
|
|
207
|
+
verticalFlip: Boolean,
|
|
208
|
+
flip: String,
|
|
209
|
+
mode: String,
|
|
210
|
+
inline: Boolean,
|
|
211
|
+
rotate: [Number, String],
|
|
212
|
+
onLoad: Function,
|
|
213
|
+
svg: String,
|
|
214
|
+
modifiers: {
|
|
215
|
+
type: [String, Array]
|
|
122
216
|
}
|
|
123
|
-
},
|
|
217
|
+
}, qe = {
|
|
218
|
+
name: "VvIcon"
|
|
219
|
+
}, E = /* @__PURE__ */ O({
|
|
220
|
+
...qe,
|
|
221
|
+
props: je,
|
|
222
|
+
setup(n) {
|
|
223
|
+
const t = n, e = N(!0), { modifiers: i } = K(t), o = Pe(We), { bemCssClasses: u } = pe("vv-icon", {
|
|
224
|
+
modifiers: i
|
|
225
|
+
}), a = r(() => t.provider || (o == null ? void 0 : o.provider)), b = r(() => {
|
|
226
|
+
const c = t.name || "", l = `@${a.value}:${t.prefix}:${t.name}`;
|
|
227
|
+
return k(c) ? c : k(l) ? l : (o == null ? void 0 : o.iconsCollections.find((h) => {
|
|
228
|
+
const d = `@${a.value}:${h.prefix}:${c}`;
|
|
229
|
+
if (k(d))
|
|
230
|
+
return d;
|
|
231
|
+
})) || c;
|
|
232
|
+
});
|
|
233
|
+
function m(c) {
|
|
234
|
+
let l = null;
|
|
235
|
+
if (typeof window > "u") {
|
|
236
|
+
const { JSDOM: y } = require("jsdom");
|
|
237
|
+
l = new y().window;
|
|
238
|
+
}
|
|
239
|
+
return (l ? new l.DOMParser() : new window.DOMParser()).parseFromString(c, "text/html").querySelector("svg");
|
|
240
|
+
}
|
|
241
|
+
function f(c) {
|
|
242
|
+
const l = m(c), h = (l == null ? void 0 : l.innerHTML.trim()) || "";
|
|
243
|
+
l && h && Ne(`@${a.value}:${t.prefix}:${t.name}`, {
|
|
244
|
+
body: h,
|
|
245
|
+
height: l.viewBox.baseVal.height,
|
|
246
|
+
width: l.viewBox.baseVal.width
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
return o && (t.src && !k(`@${a.value}:${t.prefix}:${t.name}`) ? (e.value = !1, o.fetchIcon(t.src).then((c) => {
|
|
250
|
+
c && (f(c), e.value = !0);
|
|
251
|
+
}).catch((c) => {
|
|
252
|
+
throw new Error(`During fetch icon: ${c == null ? void 0 : c.message}`);
|
|
253
|
+
})) : t.svg && f(t.svg)), (c, l) => e.value ? (w(), _(s(Le), A({
|
|
254
|
+
key: 0,
|
|
255
|
+
class: s(u)
|
|
256
|
+
}, {
|
|
257
|
+
...c.$props,
|
|
258
|
+
provider: s(a),
|
|
259
|
+
icon: s(b)
|
|
260
|
+
}), null, 16, ["class"])) : D("", !0);
|
|
261
|
+
}
|
|
262
|
+
}), ze = {
|
|
124
263
|
valid: Boolean,
|
|
125
264
|
validLabel: [String, Array]
|
|
126
|
-
},
|
|
265
|
+
}, Xe = {
|
|
127
266
|
error: Boolean,
|
|
128
267
|
errorLabel: [String, Array]
|
|
129
|
-
},
|
|
268
|
+
}, Ze = {
|
|
130
269
|
loading: Boolean,
|
|
131
270
|
loadingLabel: String
|
|
132
|
-
},
|
|
271
|
+
}, Ge = {
|
|
133
272
|
modifiers: [String, Array]
|
|
134
|
-
},
|
|
273
|
+
}, Je = {
|
|
135
274
|
hintLabel: { type: String, default: "" }
|
|
136
|
-
},
|
|
275
|
+
}, Ke = {
|
|
137
276
|
limit: {
|
|
138
277
|
type: [Boolean, String],
|
|
139
278
|
default: !1,
|
|
140
|
-
validator: (
|
|
279
|
+
validator: (n) => [!0, !1, "countdown"].includes(n)
|
|
141
280
|
}
|
|
142
|
-
},
|
|
281
|
+
}, Qe = {
|
|
282
|
+
id: [String, Number],
|
|
283
|
+
name: { type: String, required: !0 },
|
|
284
|
+
autocomplete: { type: String, default: "off" },
|
|
285
|
+
autofocus: Boolean,
|
|
286
|
+
minlength: Number,
|
|
287
|
+
maxlength: Number,
|
|
288
|
+
label: String,
|
|
289
|
+
placeholder: String,
|
|
290
|
+
required: Boolean,
|
|
291
|
+
disabled: Boolean,
|
|
292
|
+
readonly: Boolean
|
|
293
|
+
}, P = {
|
|
143
294
|
TEXT: "text",
|
|
144
295
|
PASSWORD: "password",
|
|
145
296
|
DATE: "date",
|
|
@@ -152,576 +303,434 @@ const A = {
|
|
|
152
303
|
COLOR: "color",
|
|
153
304
|
SEARCH: "search",
|
|
154
305
|
FILE: "file"
|
|
155
|
-
},
|
|
306
|
+
}, J = {
|
|
156
307
|
LEFT: "left",
|
|
157
308
|
RIGHT: "right"
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
|
|
309
|
+
}, I = {
|
|
310
|
+
PASSWORD_SHOW: "eye-on",
|
|
311
|
+
PASSWORD_HIDE: "eye-off",
|
|
161
312
|
DATE: "calendar",
|
|
162
313
|
TIME: "time",
|
|
163
314
|
COLOR: "color",
|
|
164
|
-
SEARCH: "
|
|
165
|
-
},
|
|
166
|
-
TYPES:
|
|
167
|
-
ICON_POSITIONS:
|
|
168
|
-
TYPES_ICON:
|
|
169
|
-
},
|
|
170
|
-
...
|
|
171
|
-
...
|
|
172
|
-
...
|
|
173
|
-
...
|
|
174
|
-
...
|
|
175
|
-
...
|
|
176
|
-
|
|
315
|
+
SEARCH: "close"
|
|
316
|
+
}, p = {
|
|
317
|
+
TYPES: P,
|
|
318
|
+
ICON_POSITIONS: J,
|
|
319
|
+
TYPES_ICON: I
|
|
320
|
+
}, et = ["update:modelValue", "focus", "blur", "keyup"], tt = {
|
|
321
|
+
...ze,
|
|
322
|
+
...Xe,
|
|
323
|
+
...Je,
|
|
324
|
+
...Ze,
|
|
325
|
+
...Ge,
|
|
326
|
+
...Ke,
|
|
327
|
+
...Qe,
|
|
328
|
+
modelValue: {
|
|
329
|
+
type: [String, Number],
|
|
330
|
+
default: void 0
|
|
331
|
+
},
|
|
177
332
|
type: {
|
|
178
333
|
type: String,
|
|
179
|
-
default:
|
|
180
|
-
validator: (
|
|
334
|
+
default: P.TEXT,
|
|
335
|
+
validator: (n) => Object.values(P).includes(n)
|
|
181
336
|
},
|
|
182
|
-
id: String,
|
|
183
|
-
name: { type: String, required: !0 },
|
|
184
|
-
autocomplete: { type: String, default: "off" },
|
|
185
|
-
autofocus: Boolean,
|
|
186
|
-
minlength: Number,
|
|
187
|
-
maxlength: Number,
|
|
188
337
|
min: [Number, Date],
|
|
189
338
|
max: [Number, Date],
|
|
190
|
-
step: Number,
|
|
191
|
-
|
|
192
|
-
disabled: Boolean,
|
|
193
|
-
readonly: Boolean,
|
|
194
|
-
placeholder: String,
|
|
195
|
-
icon: { type: String, default: "" },
|
|
196
|
-
iconPosition: {
|
|
339
|
+
step: { type: Number, default: 1 },
|
|
340
|
+
labelStepUp: {
|
|
197
341
|
type: String,
|
|
198
|
-
|
|
199
|
-
default: H.RIGHT
|
|
342
|
+
default: "Increase value"
|
|
200
343
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}, Le = "ds", Fe = {
|
|
205
|
-
color: String,
|
|
206
|
-
width: {
|
|
207
|
-
type: [String, Number]
|
|
344
|
+
labelStepDown: {
|
|
345
|
+
type: String,
|
|
346
|
+
default: "Decrease value"
|
|
208
347
|
},
|
|
209
|
-
|
|
210
|
-
type:
|
|
348
|
+
labelShowPassword: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: "Show password"
|
|
211
351
|
},
|
|
212
|
-
|
|
352
|
+
labelHidePassword: {
|
|
213
353
|
type: String,
|
|
214
|
-
|
|
354
|
+
default: "Hide password"
|
|
215
355
|
},
|
|
216
|
-
|
|
217
|
-
type: String
|
|
356
|
+
labelClear: {
|
|
357
|
+
type: String,
|
|
358
|
+
default: "Clear"
|
|
218
359
|
},
|
|
219
|
-
|
|
360
|
+
iconShowPassword: {
|
|
220
361
|
type: String,
|
|
221
|
-
default:
|
|
362
|
+
default: I.PASSWORD_SHOW
|
|
222
363
|
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
const p = Array.isArray(a) ? a : [a];
|
|
245
|
-
return {
|
|
246
|
-
...r,
|
|
247
|
-
...p.reduce(
|
|
248
|
-
(u, S) => ({
|
|
249
|
-
...u,
|
|
250
|
-
[`${t}--${A.kebabCase(
|
|
251
|
-
S
|
|
252
|
-
)}`]: !0
|
|
253
|
-
}),
|
|
254
|
-
{}
|
|
255
|
-
)
|
|
256
|
-
};
|
|
257
|
-
} else
|
|
258
|
-
return {
|
|
259
|
-
...r,
|
|
260
|
-
[`${t}--${A.kebabCase(s)}`]: a
|
|
261
|
-
};
|
|
262
|
-
}, e) || {})
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
function Me(t, n) {
|
|
266
|
-
const e = { [`${t}`]: !0 };
|
|
267
|
-
return Object.keys(n).reduce((o, r) => {
|
|
268
|
-
const s = i(n[r]) || !1;
|
|
269
|
-
if (!s)
|
|
270
|
-
return o;
|
|
271
|
-
if (r === "modifiers") {
|
|
272
|
-
const a = Array.isArray(s) ? s : [s];
|
|
273
|
-
return {
|
|
274
|
-
...o,
|
|
275
|
-
...a.reduce(
|
|
276
|
-
(p, u) => ({
|
|
277
|
-
...p,
|
|
278
|
-
[`${t}--${A.kebabCase(
|
|
279
|
-
u
|
|
280
|
-
)}`]: !0
|
|
281
|
-
}),
|
|
282
|
-
{}
|
|
283
|
-
)
|
|
284
|
-
};
|
|
285
|
-
} else
|
|
286
|
-
return {
|
|
287
|
-
...o,
|
|
288
|
-
[`${t}--${A.kebabCase(r)}`]: s
|
|
289
|
-
};
|
|
290
|
-
}, e) || {};
|
|
291
|
-
}
|
|
292
|
-
const T = /* @__PURE__ */ L({
|
|
293
|
-
__name: "VvIcon",
|
|
294
|
-
props: Fe,
|
|
295
|
-
setup(t) {
|
|
296
|
-
const n = t, e = C(!0), { modifiers: o } = U(n), r = ve(Le), { bemCssClasses: s } = Ve("vv-icon", {
|
|
297
|
-
modifiers: o
|
|
298
|
-
}), a = d(() => n.provider || (r == null ? void 0 : r.provider)), p = d(() => {
|
|
299
|
-
const l = n.name || "", c = `@${a.value}:${n.prefix}:${n.name}`;
|
|
300
|
-
return j(l) ? l : j(c) ? c : (r == null ? void 0 : r.iconsCollections.find((v) => {
|
|
301
|
-
const f = `@${a.value}:${v.prefix}:${l}`;
|
|
302
|
-
if (j(f))
|
|
303
|
-
return f;
|
|
304
|
-
})) || l;
|
|
305
|
-
});
|
|
306
|
-
function u(l) {
|
|
307
|
-
let c = null;
|
|
308
|
-
if (typeof window > "u") {
|
|
309
|
-
const { JSDOM: b } = require("jsdom");
|
|
310
|
-
c = new b().window;
|
|
311
|
-
}
|
|
312
|
-
return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
|
|
313
|
-
}
|
|
314
|
-
function S(l) {
|
|
315
|
-
const c = u(l), v = (c == null ? void 0 : c.innerHTML.trim()) || "";
|
|
316
|
-
c && v && Pe(`@${a.value}:${n.prefix}:${n.name}`, {
|
|
317
|
-
body: v,
|
|
318
|
-
height: c.viewBox.baseVal.height,
|
|
319
|
-
width: c.viewBox.baseVal.width
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
return r && (n.src ? (e.value = !1, r.fetchIcon(n.src).then((l) => {
|
|
323
|
-
l && (S(l), e.value = !0);
|
|
324
|
-
}).catch((l) => {
|
|
325
|
-
throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
|
|
326
|
-
})) : n.svg && S(n.svg)), (l, c) => e.value ? (O(), k(i(Oe), $({
|
|
327
|
-
key: 0,
|
|
328
|
-
class: i(s)
|
|
329
|
-
}, {
|
|
330
|
-
...l.$props,
|
|
331
|
-
provider: i(a),
|
|
332
|
-
icon: i(p)
|
|
333
|
-
}), null, 16, ["class"])) : x("", !0);
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
function B(t) {
|
|
337
|
-
return Array.isArray(t) ? t.filter((n) => A.isString(n)).reduce((n, e) => n.length > 0 ? n + `
|
|
338
|
-
` + e : e, "") : t;
|
|
339
|
-
}
|
|
340
|
-
function je(t, n) {
|
|
341
|
-
return {
|
|
342
|
-
name: "HintSlot",
|
|
343
|
-
props: {
|
|
344
|
-
params: {
|
|
345
|
-
type: Object,
|
|
346
|
-
default: () => ({})
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
setup(e) {
|
|
350
|
-
const o = U(t), {
|
|
351
|
-
error: r,
|
|
352
|
-
valid: s,
|
|
353
|
-
hint: a,
|
|
354
|
-
loading: p
|
|
355
|
-
} = n, {
|
|
356
|
-
hintLabel: u,
|
|
357
|
-
modelValue: S,
|
|
358
|
-
valid: l,
|
|
359
|
-
validLabel: c,
|
|
360
|
-
error: v,
|
|
361
|
-
errorLabel: f
|
|
362
|
-
} = o, y = A.resolveFieldData(o, "loading"), b = A.resolveFieldData(
|
|
363
|
-
o,
|
|
364
|
-
"loadingLabel"
|
|
365
|
-
), I = d(() => v.value ? !!(v.value && r || (f == null ? void 0 : f.value) && Array.isArray(f.value) && f.value.length > 0 || (f == null ? void 0 : f.value) && A.isNotEmpty(f.value)) : !1), D = d(() => !!(u && u.value || a || s || c && c.value || I.value || (y == null ? void 0 : y.value) && p || (y == null ? void 0 : y.value) && (b == null ? void 0 : b.value))), R = d(() => {
|
|
366
|
-
const _ = Te({
|
|
367
|
-
hintLabel: u,
|
|
368
|
-
modelValue: S,
|
|
369
|
-
valid: l,
|
|
370
|
-
validLabel: c,
|
|
371
|
-
error: v,
|
|
372
|
-
errorLabel: f,
|
|
373
|
-
loading: y,
|
|
374
|
-
loadingLabel: b,
|
|
375
|
-
...e.params
|
|
376
|
-
});
|
|
377
|
-
return v != null && v.value ? (r == null ? void 0 : r(_)) || B(f == null ? void 0 : f.value) || (u == null ? void 0 : u.value) : l != null && l.value ? (s == null ? void 0 : s(_)) || B(c == null ? void 0 : c.value) || (u == null ? void 0 : u.value) : y != null && y.value ? (p == null ? void 0 : p(_)) || B(b == null ? void 0 : b.value) || (u == null ? void 0 : u.value) : (a == null ? void 0 : a(_)) || B(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
378
|
-
});
|
|
379
|
-
return {
|
|
380
|
-
hasHint: D,
|
|
381
|
-
hintContent: R
|
|
382
|
-
};
|
|
383
|
-
},
|
|
384
|
-
render() {
|
|
385
|
-
if (this.hasHint)
|
|
386
|
-
return P(
|
|
387
|
-
"pre",
|
|
388
|
-
{ style: { "white-space": "pre" } },
|
|
389
|
-
this.hintContent
|
|
390
|
-
);
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
const ee = L({
|
|
364
|
+
iconHidePassword: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: I.PASSWORD_HIDE
|
|
367
|
+
},
|
|
368
|
+
iconClear: {
|
|
369
|
+
type: String,
|
|
370
|
+
default: I.SEARCH
|
|
371
|
+
},
|
|
372
|
+
icon: {
|
|
373
|
+
type: [String, Object],
|
|
374
|
+
default: ""
|
|
375
|
+
},
|
|
376
|
+
iconPosition: {
|
|
377
|
+
type: String,
|
|
378
|
+
validation: (n) => Object.values(J).includes(n),
|
|
379
|
+
default: J.RIGHT
|
|
380
|
+
},
|
|
381
|
+
floating: Boolean,
|
|
382
|
+
debounce: [String, Number],
|
|
383
|
+
tabindex: { type: [String, Number], default: 0 }
|
|
384
|
+
}, ce = O({
|
|
395
385
|
components: {
|
|
396
|
-
VvIcon:
|
|
386
|
+
VvIcon: E
|
|
397
387
|
},
|
|
398
388
|
props: {
|
|
399
|
-
disabled:
|
|
389
|
+
disabled: {
|
|
390
|
+
type: Boolean,
|
|
391
|
+
default: !1
|
|
392
|
+
},
|
|
393
|
+
labelShow: {
|
|
394
|
+
type: String,
|
|
395
|
+
default: "Show password"
|
|
396
|
+
},
|
|
397
|
+
labelHide: {
|
|
398
|
+
type: String,
|
|
399
|
+
default: "Hide password"
|
|
400
|
+
},
|
|
401
|
+
iconShow: {
|
|
402
|
+
type: String,
|
|
403
|
+
default: I.PASSWORD_SHOW
|
|
404
|
+
},
|
|
405
|
+
iconHide: {
|
|
406
|
+
type: String,
|
|
407
|
+
default: I.PASSWORD_HIDE
|
|
408
|
+
}
|
|
400
409
|
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
410
|
+
emits: ["toggle-password"],
|
|
411
|
+
setup(n, { emit: t }) {
|
|
412
|
+
const e = N(!1), i = r(
|
|
413
|
+
() => e.value ? n.iconHide : n.iconShow
|
|
404
414
|
);
|
|
405
|
-
function
|
|
406
|
-
|
|
407
|
-
e.value ? "action-password-on" : "action-password-off"
|
|
408
|
-
));
|
|
415
|
+
function o(u) {
|
|
416
|
+
u == null || u.stopPropagation(), n.disabled || (e.value = !e.value, t("toggle-password", e.value));
|
|
409
417
|
}
|
|
410
418
|
return {
|
|
411
|
-
|
|
412
|
-
|
|
419
|
+
active: e,
|
|
420
|
+
activeIcon: i,
|
|
421
|
+
onClick: o
|
|
413
422
|
};
|
|
414
423
|
},
|
|
415
424
|
render() {
|
|
416
|
-
const
|
|
417
|
-
|
|
425
|
+
const n = S(E, {
|
|
426
|
+
name: this.activeIcon,
|
|
427
|
+
class: "vv-input-text__action-icon"
|
|
428
|
+
});
|
|
429
|
+
return S(
|
|
418
430
|
"button",
|
|
419
431
|
{
|
|
420
432
|
disabled: this.disabled,
|
|
421
|
-
class:
|
|
433
|
+
class: "vv-input-text__action",
|
|
434
|
+
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
435
|
+
type: "button",
|
|
422
436
|
onClick: this.onClick
|
|
423
437
|
},
|
|
424
|
-
|
|
438
|
+
n
|
|
425
439
|
);
|
|
426
440
|
}
|
|
427
|
-
}),
|
|
441
|
+
}), Z = O({
|
|
428
442
|
components: {
|
|
429
|
-
VvIcon:
|
|
443
|
+
VvIcon: E
|
|
430
444
|
},
|
|
431
445
|
props: {
|
|
432
|
-
disabled:
|
|
446
|
+
disabled: {
|
|
447
|
+
type: Boolean,
|
|
448
|
+
default: !1
|
|
449
|
+
},
|
|
450
|
+
label: {
|
|
451
|
+
type: String
|
|
452
|
+
},
|
|
433
453
|
mode: {
|
|
434
454
|
type: String,
|
|
435
|
-
validator: (
|
|
455
|
+
validator: (n) => ["up", "down"].includes(n),
|
|
436
456
|
default: "up"
|
|
437
457
|
}
|
|
438
458
|
},
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
t.mode === "up" ? "action-step-up" : "action-step-down"
|
|
443
|
-
);
|
|
444
|
-
}
|
|
459
|
+
emits: ["step-up", "step-down"],
|
|
460
|
+
setup(n, { emit: t }) {
|
|
461
|
+
const e = r(() => n.mode === "up");
|
|
445
462
|
return {
|
|
446
|
-
|
|
463
|
+
isUp: e,
|
|
464
|
+
onClick: (o) => {
|
|
465
|
+
o == null || o.stopPropagation(), n.disabled || t(e.value ? "step-up" : "step-down");
|
|
466
|
+
}
|
|
447
467
|
};
|
|
448
468
|
},
|
|
449
469
|
render() {
|
|
450
|
-
return
|
|
470
|
+
return S("button", {
|
|
451
471
|
class: [
|
|
452
472
|
"vv-input-text__action-chevron",
|
|
453
|
-
this.
|
|
473
|
+
this.isUp && "vv-input-text__action-chevron-up"
|
|
454
474
|
],
|
|
455
475
|
disabled: this.disabled,
|
|
476
|
+
ariaLabel: this.label,
|
|
456
477
|
onClick: this.onClick
|
|
457
478
|
});
|
|
458
479
|
}
|
|
480
|
+
}), de = O({
|
|
481
|
+
components: {
|
|
482
|
+
VvIcon: E
|
|
483
|
+
},
|
|
484
|
+
props: {
|
|
485
|
+
disabled: {
|
|
486
|
+
type: Boolean,
|
|
487
|
+
default: !1
|
|
488
|
+
},
|
|
489
|
+
label: {
|
|
490
|
+
type: String,
|
|
491
|
+
default: "Clear"
|
|
492
|
+
},
|
|
493
|
+
icon: {
|
|
494
|
+
type: String,
|
|
495
|
+
default: "close"
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
emits: ["clear"],
|
|
499
|
+
setup(n, { emit: t }) {
|
|
500
|
+
function e(i) {
|
|
501
|
+
i == null || i.stopPropagation(), n.disabled || t("clear");
|
|
502
|
+
}
|
|
503
|
+
return {
|
|
504
|
+
onClick: e
|
|
505
|
+
};
|
|
506
|
+
},
|
|
507
|
+
render() {
|
|
508
|
+
const n = S(E, {
|
|
509
|
+
name: this.icon,
|
|
510
|
+
class: "vv-input-text__action-icon"
|
|
511
|
+
});
|
|
512
|
+
return S(
|
|
513
|
+
"button",
|
|
514
|
+
{
|
|
515
|
+
disabled: this.disabled,
|
|
516
|
+
class: "vv-input-text__action",
|
|
517
|
+
ariaLabel: this.label,
|
|
518
|
+
type: "button",
|
|
519
|
+
onClick: this.onClick
|
|
520
|
+
},
|
|
521
|
+
n
|
|
522
|
+
);
|
|
523
|
+
}
|
|
459
524
|
});
|
|
460
|
-
function
|
|
525
|
+
function G(n, t) {
|
|
461
526
|
return {
|
|
462
527
|
name: "VvInputTextActions",
|
|
463
528
|
components: {
|
|
464
|
-
VvIcon:
|
|
465
|
-
VvInputPasswordAction:
|
|
466
|
-
VvInputStepAction:
|
|
529
|
+
VvIcon: E,
|
|
530
|
+
VvInputPasswordAction: ce,
|
|
531
|
+
VvInputStepAction: Z,
|
|
532
|
+
VvInputClearAction: de
|
|
467
533
|
},
|
|
468
534
|
setup() {
|
|
469
535
|
return {
|
|
470
|
-
isDisabled:
|
|
536
|
+
isDisabled: r(() => t.disabled || t.readonly),
|
|
537
|
+
labelStepUp: t.labelStepUp,
|
|
538
|
+
labelStepDown: t.labelStepDown,
|
|
539
|
+
labelShowPassword: t.labelShowPassword,
|
|
540
|
+
labelHidePassword: t.labelHidePassword,
|
|
541
|
+
labelClear: t.labelClear,
|
|
542
|
+
iconShowPassword: t.iconShowPassword,
|
|
543
|
+
iconHidePassword: t.iconHidePassword
|
|
471
544
|
};
|
|
472
545
|
},
|
|
473
546
|
render() {
|
|
474
547
|
let e = null;
|
|
475
|
-
switch (
|
|
476
|
-
case
|
|
477
|
-
const {
|
|
548
|
+
switch (n) {
|
|
549
|
+
case P.SEARCH: {
|
|
550
|
+
const { onClear: i } = this.$attrs;
|
|
478
551
|
e = [
|
|
479
|
-
|
|
552
|
+
S(de, {
|
|
480
553
|
disabled: this.isDisabled,
|
|
481
|
-
|
|
482
|
-
|
|
554
|
+
label: this.labelShowPassword,
|
|
555
|
+
onClear: i
|
|
483
556
|
})
|
|
484
557
|
];
|
|
485
558
|
break;
|
|
486
559
|
}
|
|
487
|
-
case
|
|
488
|
-
const {
|
|
560
|
+
case P.PASSWORD: {
|
|
561
|
+
const { onTogglePassword: i } = this.$attrs;
|
|
489
562
|
e = [
|
|
490
|
-
|
|
491
|
-
mode: "up",
|
|
492
|
-
disabled: this.isDisabled,
|
|
493
|
-
onActionStepUp: o,
|
|
494
|
-
onActionStepDown: r
|
|
495
|
-
}),
|
|
496
|
-
P(Y, {
|
|
497
|
-
mode: "down",
|
|
563
|
+
S(ce, {
|
|
498
564
|
disabled: this.isDisabled,
|
|
499
|
-
|
|
500
|
-
|
|
565
|
+
onTogglePassword: i,
|
|
566
|
+
labelShow: this.labelShowPassword,
|
|
567
|
+
labelHide: this.labelHidePassword,
|
|
568
|
+
iconShow: this.iconShowPassword,
|
|
569
|
+
iconHide: this.iconHidePassword
|
|
501
570
|
})
|
|
502
571
|
];
|
|
503
572
|
break;
|
|
504
573
|
}
|
|
505
|
-
|
|
506
|
-
|
|
574
|
+
case P.NUMBER: {
|
|
575
|
+
const { onStepUp: i, onStepDown: o } = this.$attrs;
|
|
576
|
+
e = [
|
|
577
|
+
S(Z, {
|
|
578
|
+
mode: "up",
|
|
579
|
+
disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
|
|
580
|
+
label: this.labelStepUp,
|
|
581
|
+
onStepUp: i,
|
|
582
|
+
onStepDown: o
|
|
583
|
+
}),
|
|
584
|
+
S(Z, {
|
|
585
|
+
mode: "down",
|
|
586
|
+
disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
|
|
587
|
+
label: this.labelStepDown,
|
|
588
|
+
onStepUp: i,
|
|
589
|
+
onStepDown: o
|
|
590
|
+
})
|
|
591
|
+
];
|
|
507
592
|
break;
|
|
508
593
|
}
|
|
509
594
|
}
|
|
510
|
-
return Array.isArray(e) ?
|
|
595
|
+
return Array.isArray(e) ? S("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
511
596
|
}
|
|
512
597
|
};
|
|
513
598
|
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
() => !!(t.value && n.value === "left" || e.iconLeft)
|
|
517
|
-
), r = d(
|
|
518
|
-
() => !!(t.value && n.value === "right" || e.iconRight)
|
|
519
|
-
), s = d(
|
|
520
|
-
() => !!(t.value && n.value === "top" || e.iconTop)
|
|
521
|
-
), a = d(
|
|
522
|
-
() => !!(t.value && n.value === "bottom" || e.iconBottom)
|
|
523
|
-
);
|
|
524
|
-
return {
|
|
525
|
-
hasIconLeft: o,
|
|
526
|
-
hasIconRight: r,
|
|
527
|
-
hasIconTop: s,
|
|
528
|
-
hasIconBottom: a
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
function He(t, n) {
|
|
532
|
-
const { focused: e } = _e(t);
|
|
533
|
-
return ne(e, (o) => {
|
|
534
|
-
n(o ? "focus" : "blur", t.value);
|
|
535
|
-
}), {
|
|
536
|
-
focused: e
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
function qe(t, n, e) {
|
|
540
|
-
const o = C(t == null ? void 0 : t.value), r = xe(
|
|
541
|
-
o,
|
|
542
|
-
n || 0
|
|
543
|
-
);
|
|
544
|
-
return ne(r, (s) => e("update:modelValue", s)), o;
|
|
545
|
-
}
|
|
546
|
-
function Ue(t, n) {
|
|
547
|
-
const e = d(() => {
|
|
548
|
-
const s = i(t);
|
|
549
|
-
return Q(s) ? s.length : 0;
|
|
550
|
-
}), o = d(() => {
|
|
551
|
-
const s = i(t) || "";
|
|
552
|
-
return !Q(s) || n.mode === !1 ? 0 : n.mode === !0 ? s.length : i(n.upperLimit) - s.length;
|
|
553
|
-
}), r = d(() => n.mode === !1 ? "" : n.mode === !0 && n.upperLimit && n.upperLimit > 0 ? `${o.value}/${i(n.upperLimit)}` : o.value);
|
|
554
|
-
return {
|
|
555
|
-
textLength: e,
|
|
556
|
-
textLimitLength: o,
|
|
557
|
-
formattedTextLimitLength: r
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
const We = ["for"], ze = { class: "vv-input-text__wrapper" }, Ze = {
|
|
561
|
-
key: 2,
|
|
599
|
+
const nt = ["for"], ot = { class: "vv-input-text__wrapper" }, it = ["id", "disabled", "readonly", "required"], st = {
|
|
600
|
+
key: 1,
|
|
562
601
|
class: "vv-input-text__limit"
|
|
563
|
-
},
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
...
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
602
|
+
}, rt = {
|
|
603
|
+
name: "VvInputText"
|
|
604
|
+
}, dt = /* @__PURE__ */ O({
|
|
605
|
+
...rt,
|
|
606
|
+
props: tt,
|
|
607
|
+
emits: et,
|
|
608
|
+
setup(n, { emit: t }) {
|
|
609
|
+
const e = n, i = Ie(), o = N(), { icon: u, iconPosition: a, label: b, modelValue: m, limit: f } = K(e), c = r(() => String(e.id || He())), l = r(() => `${c.value}-hint`), h = r(
|
|
610
|
+
() => e.floating && x(e.placeholder) ? " " : e.placeholder
|
|
611
|
+
), d = Ue(m, t, e.debounce), v = N(!1), y = r(() => e.type === p.TYPES.PASSWORD), R = () => {
|
|
612
|
+
v.value = !v.value;
|
|
613
|
+
}, C = r(
|
|
614
|
+
() => [p.TYPES.TIME, p.TYPES.DATETIME_LOCAL, p.TYPES.DATE].includes(
|
|
615
|
+
e.type
|
|
616
|
+
)
|
|
617
|
+
), H = r(() => e.type === p.TYPES.NUMBER), $ = () => {
|
|
618
|
+
W.value || (o.value.stepUp(), d.value = s(o).value);
|
|
619
|
+
}, B = () => {
|
|
620
|
+
W.value || (o.value.stepDown(), d.value = s(o).value);
|
|
621
|
+
}, M = r(() => e.type === p.TYPES.SEARCH), T = () => {
|
|
622
|
+
d.value = null;
|
|
623
|
+
}, { hasIconLeft: Q, hasIconRight: Y } = Me(u, a, {
|
|
624
|
+
iconLeft: i["icon-left"],
|
|
625
|
+
iconRight: i["icon-right"]
|
|
626
|
+
}), ee = r(() => typeof u.value == "string" ? { name: u.value } : u.value), U = r(() => {
|
|
586
627
|
switch (e.type) {
|
|
587
|
-
case
|
|
588
|
-
return
|
|
589
|
-
case
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
case
|
|
593
|
-
return
|
|
594
|
-
case h.TYPES.TIME:
|
|
595
|
-
return h.TYPES_ICON.TIME;
|
|
596
|
-
case h.TYPES.SEARCH:
|
|
597
|
-
return h.TYPES_ICON.SEARCH;
|
|
628
|
+
case p.TYPES.COLOR:
|
|
629
|
+
return { name: p.TYPES_ICON.COLOR };
|
|
630
|
+
case p.TYPES.DATE:
|
|
631
|
+
case p.TYPES.DATETIME_LOCAL:
|
|
632
|
+
return { name: p.TYPES_ICON.DATE };
|
|
633
|
+
case p.TYPES.TIME:
|
|
634
|
+
return { name: p.TYPES_ICON.TIME };
|
|
598
635
|
default:
|
|
599
636
|
return "";
|
|
600
637
|
}
|
|
601
|
-
}), {
|
|
638
|
+
}), { formattedTextLimitLength: fe } = Fe(d, {
|
|
602
639
|
mode: e.limit,
|
|
603
640
|
upperLimit: e.maxlength || 0
|
|
604
|
-
}), { focused:
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
const { style: g } = r, m = A.pickBy(
|
|
622
|
-
r,
|
|
623
|
-
(E) => E.startsWith("data-")
|
|
624
|
-
);
|
|
625
|
-
return {
|
|
626
|
-
style: g,
|
|
627
|
-
...m
|
|
628
|
-
};
|
|
629
|
-
}), ce = d(() => {
|
|
630
|
-
const g = R.value && D.value ? "text" : e.type, m = A.pickBy(
|
|
631
|
-
r,
|
|
632
|
-
(E) => E.startsWith("aria-")
|
|
633
|
-
);
|
|
641
|
+
}), { focused: F } = Ye(o, t), W = r(() => e.disabled || e.readonly), ve = r(() => W.value ? -1 : e.tabindex), te = r(() => !x(m)), me = r(() => {
|
|
642
|
+
if (e.error === !0)
|
|
643
|
+
return !0;
|
|
644
|
+
if (e.valid === !0)
|
|
645
|
+
return !1;
|
|
646
|
+
}), { bemCssClasses: Se } = pe("vv-input-text", {
|
|
647
|
+
modifiers: e.modifiers,
|
|
648
|
+
valid: e.valid,
|
|
649
|
+
invalid: e.error,
|
|
650
|
+
loading: e.loading,
|
|
651
|
+
iconLeft: Q,
|
|
652
|
+
iconRight: Y.value || !x(U),
|
|
653
|
+
floating: e.floating && !x(e.label),
|
|
654
|
+
dirty: te,
|
|
655
|
+
focus: F
|
|
656
|
+
}), he = r(() => {
|
|
657
|
+
const g = (() => y.value && v.value || C.value && !te.value && !F.value ? p.TYPES.TEXT : e.type)();
|
|
634
658
|
return {
|
|
635
|
-
id: v,
|
|
636
659
|
type: g,
|
|
637
|
-
placeholder:
|
|
660
|
+
placeholder: h.value,
|
|
638
661
|
name: e.name,
|
|
639
662
|
autocomplete: e.autocomplete,
|
|
640
|
-
disabled: e.disabled,
|
|
641
|
-
readonly: e.readonly,
|
|
642
663
|
minlength: e.minlength,
|
|
643
664
|
maxlength: e.maxlength,
|
|
644
665
|
min: e.min,
|
|
645
666
|
max: e.max,
|
|
646
|
-
step: e.step,
|
|
647
|
-
|
|
648
|
-
"aria-
|
|
649
|
-
"aria-
|
|
650
|
-
"aria-
|
|
651
|
-
"aria-errormessage": y,
|
|
652
|
-
...m
|
|
653
|
-
};
|
|
654
|
-
}), X = d(() => {
|
|
655
|
-
const { modelValue: g, valid: m, error: E } = e;
|
|
656
|
-
return {
|
|
657
|
-
valid: m,
|
|
658
|
-
error: E,
|
|
659
|
-
modelValue: g
|
|
667
|
+
step: g === p.TYPES.NUMBER ? e.step : void 0,
|
|
668
|
+
tabindex: ve.value,
|
|
669
|
+
"aria-invalid": me.value,
|
|
670
|
+
"aria-describedby": !oe.value && be.value ? l.value : void 0,
|
|
671
|
+
"aria-errormessage": oe.value ? l.value : void 0
|
|
660
672
|
};
|
|
661
|
-
}),
|
|
662
|
-
|
|
673
|
+
}), ne = r(() => ({
|
|
674
|
+
valid: e.valid,
|
|
675
|
+
error: e.error,
|
|
676
|
+
modelValue: e.modelValue
|
|
677
|
+
})), { HintSlot: ge, hasHint: be, hasErrors: oe } = Be(e, i), ye = G(
|
|
678
|
+
p.TYPES.PASSWORD,
|
|
663
679
|
e
|
|
664
|
-
),
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
i(u) ? (O(), N("label", {
|
|
680
|
+
), we = G(p.TYPES.NUMBER, e), Ee = G(p.TYPES.SEARCH, e);
|
|
681
|
+
return Ce(() => {
|
|
682
|
+
e.autofocus && (F.value = !0);
|
|
683
|
+
}), (g, V) => (w(), q("div", {
|
|
684
|
+
class: _e(s(Se))
|
|
685
|
+
}, [
|
|
686
|
+
s(b) ? (w(), q("label", {
|
|
672
687
|
key: 0,
|
|
673
|
-
for:
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
Se(J("input", $({
|
|
688
|
+
for: s(c),
|
|
689
|
+
class: "vv-input-text__label"
|
|
690
|
+
}, ie(s(b)), 9, nt)) : D("", !0),
|
|
691
|
+
se("div", ot, [
|
|
692
|
+
s(Q) ? z(g.$slots, "icon-left", X(A({ key: 0 }, s(ne))), () => [
|
|
693
|
+
re(E, A({ class: "vv-input-text__icon-left" }, s(ee)), null, 16)
|
|
694
|
+
]) : D("", !0),
|
|
695
|
+
Ae(se("input", A({
|
|
696
|
+
id: s(c),
|
|
683
697
|
ref_key: "input",
|
|
684
|
-
ref:
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
698
|
+
ref: o,
|
|
699
|
+
"onUpdate:modelValue": V[0] || (V[0] = (j) => De(d) ? d.value = j : null)
|
|
700
|
+
}, s(he), {
|
|
701
|
+
disabled: g.disabled,
|
|
702
|
+
readonly: g.readonly,
|
|
703
|
+
required: g.required,
|
|
704
|
+
onKeyup: V[1] || (V[1] = (j) => t("keyup", j))
|
|
705
|
+
}), null, 16, it), [
|
|
706
|
+
[xe, s(d)]
|
|
690
707
|
]),
|
|
691
|
-
|
|
692
|
-
key:
|
|
693
|
-
class: "vv-button vv-button--ghost",
|
|
694
|
-
onClick: me
|
|
695
|
-
}, [
|
|
696
|
-
M(T, { name: "clear-field" })
|
|
697
|
-
])) : x("", !0),
|
|
698
|
-
V(g.$slots, "icon-right", K(be(i(X))), () => [
|
|
699
|
-
i(R) ? (O(), k(i(fe), {
|
|
700
|
-
key: 0,
|
|
701
|
-
onActionPasswordOn: m[2] || (m[2] = (E) => D.value = !0),
|
|
702
|
-
onActionPasswordOff: m[3] || (m[3] = (E) => D.value = !1)
|
|
703
|
-
})) : i(_) ? (O(), k(i(pe), {
|
|
708
|
+
z(g.$slots, "icon-right", X(Oe(s(ne))), () => [
|
|
709
|
+
s(Y) || s(U) ? (w(), _(E, X(A({ key: 0 }, s(Y) ? s(ee) : s(U))), null, 16)) : s(y) ? (w(), _(s(ye), {
|
|
704
710
|
key: 1,
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
})) : i(z) || i(F) ? (O(), k(T, {
|
|
711
|
+
onTogglePassword: R
|
|
712
|
+
})) : s(H) ? (w(), _(s(we), {
|
|
708
713
|
key: 2,
|
|
709
|
-
|
|
710
|
-
|
|
714
|
+
onStepUp: $,
|
|
715
|
+
onStepDown: B
|
|
716
|
+
})) : s(M) ? (w(), _(s(Ee), {
|
|
717
|
+
key: 3,
|
|
718
|
+
onClear: T
|
|
719
|
+
})) : D("", !0)
|
|
711
720
|
]),
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
721
|
+
s(f) ? (w(), q("span", st, [
|
|
722
|
+
z(g.$slots, "limit", {}, () => [
|
|
723
|
+
Re(ie(s(fe)), 1)
|
|
715
724
|
])
|
|
716
|
-
])) :
|
|
725
|
+
])) : D("", !0)
|
|
717
726
|
]),
|
|
718
|
-
|
|
719
|
-
id:
|
|
727
|
+
re(s(ge), {
|
|
728
|
+
id: s(l),
|
|
720
729
|
class: "vv-input-text__hint"
|
|
721
|
-
})
|
|
722
|
-
],
|
|
730
|
+
}, null, 8, ["id"])
|
|
731
|
+
], 2));
|
|
723
732
|
}
|
|
724
733
|
});
|
|
725
734
|
export {
|
|
726
|
-
|
|
735
|
+
dt as default
|
|
727
736
|
};
|