@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,2 +1 @@
|
|
|
1
|
-
(function(e,P){typeof exports=="object"&&typeof module<"u"?module.exports=P(require("vue"),require("@iconify/vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@vueuse/core"],P):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputText=P(e.vue,e.vue$1,e.core))})(this,function(e,P,_){"use strict";const S={equals(n,r,t){return t?this.resolveFieldData(n,t)===this.resolveFieldData(r,t):this.deepEquals(n,r)},deepEquals(n,r){if(n===r)return!0;if(n&&r&&typeof n=="object"&&typeof r=="object"){const t=Array.isArray(n),s=Array.isArray(r);let o,i,a;if(t&&s){if(i=n.length,i!=r.length)return!1;for(o=i;o--!==0;)if(!this.deepEquals(n[o],r[o]))return!1;return!0}if(t!=s)return!1;const f=n instanceof Date,c=r instanceof Date;if(f!=c)return!1;if(f&&c)return n.getTime()==r.getTime();const E=n instanceof RegExp,l=r instanceof RegExp;if(E!=l)return!1;if(E&&l)return n.toString()==r.toString();const u=Object.keys(n);if(i=u.length,i!==Object.keys(r).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,u[o]))return!1;for(o=i;o--!==0;)if(a=u[o],!this.deepEquals(n[a],r[a]))return!1;return!0}return n!==n&&r!==r},resolveFieldData(n,r){if(n&&Object.keys(n).length&&r){if(r.indexOf(".")===-1)return n[r];{const t=r.split(".");let s=n;for(let o=0,i=t.length;o<i;++o){if(n==null)return null;s=s[t[o]]}return s}}else return null},isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)},findIndexInList(n,r){let t=-1;if(r){for(let s=0;s<r.length;s++)if(this.equals(r[s],n)){t=s;break}}return t},contains(n,r){if(n!=null&&r&&r.length){for(const t of r)if(this.equals(n,t))return!0}return!1},isEmpty(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&typeof n=="object"&&Object.keys(n).length===0},isNotEmpty(n){return!this.isEmpty(n)},pickBy(n,r){return Object.fromEntries(Object.entries(n).filter(([t])=>r(t)))},removeFromList(n,r){const t=this.findIndexInList(n,r);return t>-1?r.filter((s,o)=>o!==t):r},isString(n){return typeof n=="string"||n instanceof String},propsToObject(n){return Object.keys(n).reduce((r,t)=>{var s,o,i,a,f;return this.isFunction(n[t])?r[t]=n[t]():Array.isArray(n[t])?r[t]=n[t][0]():(s=n[t])!=null&&s.type&&(Array.isArray(n[t].type)?r[t]=((o=n[t])==null?void 0:o.default)||((i=n[t])==null?void 0:i.type[0]()):r[t]=((a=n[t])==null?void 0:a.default)||((f=n[t])==null?void 0:f.type())),r},{})},filterArray(n,r,t){return n.filter(s=>r.some(o=>typeof o=="string"?s[t]==o:this.equals(s[t],o[t])))},kebabCase(n){var r,t;if(n)return(t=(r=n.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:r.join("-"))==null?void 0:t.toLowerCase()}},Y={valid:Boolean,validLabel:[String,Array]},v={error:Boolean,errorLabel:[String,Array]},q={loading:Boolean,loadingLabel:String},H={modifiers:[String,Array]},U={hintLabel:{type:String,default:""}},W={limit:{type:[Boolean,String],default:!1,validator:n=>[!0,!1,"countdown"].includes(n)}},C={TEXT:"text",PASSWORD:"password",DATE:"date",DATETIME_LOCAL:"datetime-local",NUMBER:"number",TIME:"time",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",FILE:"file"},k={LEFT:"left",RIGHT:"right"},w={PASSWORD_ON:"eye-on",PASSWORD_OFF:"eye-off",DATE:"calendar",TIME:"time",COLOR:"color",SEARCH:"search"},m={TYPES:C,ICON_POSITIONS:k,TYPES_ICON:w},z=["update:modelValue","focus","blur"],Z={...Y,...v,...U,...q,...H,...W,modelValue:null,type:{type:String,default:C.TEXT,validator:n=>Object.values(C).includes(n)},id:String,name:{type:String,required:!0},autocomplete:{type:String,default:"off"},autofocus:Boolean,minlength:Number,maxlength:Number,min:[Number,Date],max:[Number,Date],step:Number,label:String,disabled:Boolean,readonly:Boolean,placeholder:String,icon:{type:String,default:""},iconPosition:{type:String,validation:n=>Object.values(k).includes(n),default:k.RIGHT},floating:Boolean,debounce:Number,autoclear:Boolean},X="ds",G={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};function J(n,r){const t={[`${n}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(r).reduce((o,i)=>{const a=e.unref(r[i])||!1;if(!a)return o;if(i==="modifiers"){const f=Array.isArray(a)?a:[a];return{...o,...f.reduce((c,E)=>({...c,[`${n}--${S.kebabCase(E)}`]:!0}),{})}}else return{...o,[`${n}--${S.kebabCase(i)}`]:a}},t)||{})}}function K(n,r){const t={[`${n}`]:!0};return Object.keys(r).reduce((s,o)=>{const i=e.unref(r[o])||!1;if(!i)return s;if(o==="modifiers"){const a=Array.isArray(i)?i:[i];return{...s,...a.reduce((f,c)=>({...f,[`${n}--${S.kebabCase(c)}`]:!0}),{})}}else return{...s,[`${n}--${S.kebabCase(o)}`]:i}},t)||{}}const T=e.defineComponent({__name:"VvIcon",props:G,setup(n){const r=n,t=e.ref(!0),{modifiers:s}=e.toRefs(r),o=e.inject(X),{bemCssClasses:i}=J("vv-icon",{modifiers:s}),a=e.computed(()=>r.provider||(o==null?void 0:o.provider)),f=e.computed(()=>{const l=r.name||"",u=`@${a.value}:${r.prefix}:${r.name}`;return P.iconExists(l)?l:P.iconExists(u)?u:(o==null?void 0:o.iconsCollections.find(h=>{const d=`@${a.value}:${h.prefix}:${l}`;if(P.iconExists(d))return d}))||l});function c(l){let u=null;if(typeof window>"u"){const{JSDOM:b}=require("jsdom");u=new b().window}return(u?new u.DOMParser:new window.DOMParser).parseFromString(l,"text/html").querySelector("svg")}function E(l){const u=c(l),h=(u==null?void 0:u.innerHTML.trim())||"";u&&h&&P.addIcon(`@${a.value}:${r.prefix}:${r.name}`,{body:h,height:u.viewBox.baseVal.height,width:u.viewBox.baseVal.width})}return o&&(r.src?(t.value=!1,o.fetchIcon(r.src).then(l=>{l&&(E(l),t.value=!0)}).catch(l=>{throw new Error(`During fetch icon: ${l==null?void 0:l.message}`)})):r.svg&&E(r.svg)),(l,u)=>t.value?(e.openBlock(),e.createBlock(e.unref(P.Icon),e.mergeProps({key:0,class:e.unref(i)},{...l.$props,provider:e.unref(a),icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("",!0)}});function D(n){return Array.isArray(n)?n.filter(r=>S.isString(r)).reduce((r,t)=>r.length>0?r+`
|
|
2
|
-
`+t:t,""):n}function Q(n,r){return{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(t){const s=e.toRefs(n),{error:o,valid:i,hint:a,loading:f}=r,{hintLabel:c,modelValue:E,valid:l,validLabel:u,error:h,errorLabel:d}=s,y=S.resolveFieldData(s,"loading"),b=S.resolveFieldData(s,"loadingLabel"),I=e.computed(()=>h.value?!!(h.value&&o||(d==null?void 0:d.value)&&Array.isArray(d.value)&&d.value.length>0||(d==null?void 0:d.value)&&S.isNotEmpty(d.value)):!1),x=e.computed(()=>!!(c&&c.value||a||i||u&&u.value||I.value||(y==null?void 0:y.value)&&f||(y==null?void 0:y.value)&&(b==null?void 0:b.value))),B=e.computed(()=>{const O=_.toReactive({hintLabel:c,modelValue:E,valid:l,validLabel:u,error:h,errorLabel:d,loading:y,loadingLabel:b,...t.params});return h!=null&&h.value?(o==null?void 0:o(O))||D(d==null?void 0:d.value)||(c==null?void 0:c.value):l!=null&&l.value?(i==null?void 0:i(O))||D(u==null?void 0:u.value)||(c==null?void 0:c.value):y!=null&&y.value?(f==null?void 0:f(O))||D(b==null?void 0:b.value)||(c==null?void 0:c.value):(a==null?void 0:a(O))||D(c==null?void 0:c.value)||(c==null?void 0:c.value)});return{hasHint:x,hintContent:B}},render(){if(this.hasHint)return e.h("pre",{style:{"white-space":"pre"}},this.hintContent)}}}const V=e.defineComponent({components:{VvIcon:T},props:{disabled:Boolean},setup(n,{emit:r}){const t=e.ref(!1),s=e.computed(()=>t.value?w.PASSWORD_OFF:w.PASSWORD_ON);function o(){n.disabled||(t.value=!t.value,r(t.value?"action-password-on":"action-password-off"))}return{activeIcon:s,onClick:o}},render(){const n=e.h(T,{name:this.activeIcon});return e.h("button",{disabled:this.disabled,class:["vv-input-text__action"],onClick:this.onClick},n)}}),N=e.defineComponent({components:{VvIcon:T},props:{disabled:Boolean,mode:{type:String,validator:n=>["up","down"].includes(n),default:"up"}},setup(n,{emit:r}){function t(){n.disabled||r(n.mode==="up"?"action-step-up":"action-step-down")}return{onClick:t}},render(){return e.h("button",{class:["vv-input-text__action-chevron",this.mode==="up"&&"vv-input-text__action-chevron-up"],disabled:this.disabled,onClick:this.onClick})}});function L(n,r){return{name:"VvInputTextActions",components:{VvIcon:T,VvInputPasswordAction:V,VvInputStepAction:N},setup(){return{isDisabled:e.computed(()=>r.disabled||r.readonly)}},render(){let t=null;switch(n){case C.PASSWORD:{const{onActionPasswordOn:s,onActionPasswordOff:o}=this.$attrs;t=[e.h(V,{disabled:this.isDisabled,onActionPasswordOn:s,onActionPasswordOff:o})];break}case C.NUMBER:{const{onActionStepUp:s,onActionStepDown:o}=this.$attrs;t=[e.h(N,{mode:"up",disabled:this.isDisabled,onActionStepUp:s,onActionStepDown:o}),e.h(N,{mode:"down",disabled:this.isDisabled,onActionStepUp:s,onActionStepDown:o})];break}default:{t=null;break}}return Array.isArray(t)?e.h("div",{class:"vv-input-text__actions-group"},t):t}}}function ee(n,r,t){const s=e.computed(()=>!!(n.value&&r.value==="left"||t.iconLeft)),o=e.computed(()=>!!(n.value&&r.value==="right"||t.iconRight)),i=e.computed(()=>!!(n.value&&r.value==="top"||t.iconTop)),a=e.computed(()=>!!(n.value&&r.value==="bottom"||t.iconBottom));return{hasIconLeft:s,hasIconRight:o,hasIconTop:i,hasIconBottom:a}}function te(n,r){const{focused:t}=_.useFocus(n);return e.watch(t,s=>{r(s?"focus":"blur",n.value)}),{focused:t}}function ne(n,r,t){const s=e.ref(n==null?void 0:n.value),o=_.refDebounced(s,r||0);return e.watch(o,i=>t("update:modelValue",i)),s}function re(n,r){const t=e.computed(()=>{const i=e.unref(n);return _.isString(i)?i.length:0}),s=e.computed(()=>{const i=e.unref(n)||"";return!_.isString(i)||r.mode===!1?0:r.mode===!0?i.length:e.unref(r.upperLimit)-i.length}),o=e.computed(()=>r.mode===!1?"":r.mode===!0&&r.upperLimit&&r.upperLimit>0?`${s.value}/${e.unref(r.upperLimit)}`:s.value);return{textLength:t,textLimitLength:s,formattedTextLimitLength:o}}const oe=["for"],se={class:"vv-input-text__wrapper"},ie={key:2,class:"vv-input-text__limit"},ae={inheritAttrs:!1};return e.defineComponent({...ae,__name:"VvInputText",props:Z,emits:z,setup(n,{emit:r}){const t=n,s=e.useSlots(),o=e.useAttrs(),i=e.ref(),{icon:a,iconPosition:f,label:c,modelValue:E,autoclear:l,limit:u}=e.toRefs(t),h=t.id||t.name,d=`${t.name}-label`,y=`${t.name}-hint`,b=e.computed(()=>t.floating&&S.isEmpty(t.placeholder)?" ":t.placeholder),I=ne(E,t.debounce,r),x=e.ref(!1),B=e.computed(()=>t.type===m.TYPES.PASSWORD),O=e.computed(()=>t.type===m.TYPES.NUMBER);function ce(){const g=t.max;!M.value&&I.value+1<=g&&(i.value.stepUp(),I.value=e.unref(i.value).value)}function le(){const g=t.min;!M.value&&I.value-1<=g&&(i.value.stepDown(),I.value=e.unref(i.value).value)}const{hasIconLeft:$,hasIconRight:F}=ee(a,f,{iconLeft:s["icon-left"],iconRight:s["icon-right"]}),R=e.computed(()=>{switch(t.type){case m.TYPES.PASSWORD:return m.TYPES_ICON.PASSWORD_OFF;case m.TYPES.COLOR:return m.TYPES_ICON.COLOR;case m.TYPES.DATE:case m.TYPES.DATETIME_LOCAL:return m.TYPES_ICON.DATE;case m.TYPES.TIME:return m.TYPES_ICON.TIME;case m.TYPES.SEARCH:return m.TYPES_ICON.SEARCH;default:return""}}),{textLength:ue,formattedTextLimitLength:de}=re(I,{mode:t.limit,upperLimit:t.maxlength||0}),{focused:fe}=te(i,r),M=e.computed(()=>t.disabled||t.readonly),pe=e.computed(()=>{const g=F.value||S.isNotEmpty(R.value),p=t.floating&&S.isNotEmpty(t.label),A=S.isNotEmpty(E==null?void 0:E.value);return[K("vv-input-text",{modifiers:t.modifiers,readonly:t.readonly,valid:t.valid,invalid:t.error,loading:t.loading,iconLeft:$,iconRight:g,floating:p,dirty:A}),o.class]}),me=e.computed(()=>{const{style:g}=o,p=S.pickBy(o,A=>A.startsWith("data-"));return{style:g,...p}}),he=e.computed(()=>{const g=B.value&&x.value?"text":t.type,p=S.pickBy(o,A=>A.startsWith("aria-"));return{id:h,type:g,placeholder:b.value,name:t.name,autocomplete:t.autocomplete,disabled:t.disabled,readonly:t.readonly,minlength:t.minlength,maxlength:t.maxlength,min:t.min,max:t.max,step:t.step,"aria-invalid":t.error,"aria-valid":!t.valid,"aria-labeledby":d,"aria-describedby":y,"aria-errormessage":y,...p}}),j=e.computed(()=>{const{modelValue:g,valid:p,error:A}=t;return{valid:p,error:A,modelValue:g}}),ye=Q(t,s),ge=L(m.TYPES.PASSWORD,t),Se=L(m.TYPES.NUMBER,t);function Ee(){I.value=null}return e.onMounted(()=>{t.autofocus&&(fe.value=!0)}),(g,p)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(e.unref(me),{class:e.unref(pe)}),[e.unref(c)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(h)},e.toDisplayString(e.unref(c)),9,oe)):e.createCommentVNode("",!0),e.createElementVNode("div",se,[e.unref($)?e.renderSlot(g.$slots,"icon-left",e.normalizeProps(e.mergeProps({key:0},e.unref(j))),()=>[e.createVNode(T,{class:"vv-input-text__icon-left",name:e.unref(a)},null,8,["name"])]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({ref_key:"input",ref:i},e.unref(he),{"onUpdate:modelValue":p[0]||(p[0]=A=>e.isRef(I)?I.value=A:null),onInput:p[1]||(p[1]=A=>r("input",A))}),null,16),[[e.vModelDynamic,e.unref(I)]]),e.unref(l)&&e.unref(ue)>0?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vv-button vv-button--ghost",onClick:Ee},[e.createVNode(T,{name:"clear-field"})])):e.createCommentVNode("",!0),e.renderSlot(g.$slots,"icon-right",e.normalizeProps(e.guardReactiveProps(e.unref(j))),()=>[e.unref(B)?(e.openBlock(),e.createBlock(e.unref(ge),{key:0,onActionPasswordOn:p[2]||(p[2]=A=>x.value=!0),onActionPasswordOff:p[3]||(p[3]=A=>x.value=!1)})):e.unref(O)?(e.openBlock(),e.createBlock(e.unref(Se),{key:1,onActionStepUp:ce,onActionStepDown:le})):e.unref(F)||e.unref(R)?(e.openBlock(),e.createBlock(T,{key:2,name:e.unref(a)||e.unref(R)},null,8,["name"])):e.createCommentVNode("",!0)]),e.unref(u)?(e.openBlock(),e.createElementBlock("span",ie,[e.renderSlot(g.$slots,"limit",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(de)),1)])])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(ye),{id:y,class:"vv-input-text__hint"})],16))}})});
|
|
1
|
+
(function(e,C){typeof exports=="object"&&typeof module<"u"?module.exports=C(require("vue"),require("nanoid"),require("@vueuse/core"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","nanoid","@vueuse/core","@iconify/vue"],C):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputText=C(e.vue,e.nanoid,e.core,e.vue$1))})(this,function(e,C,A,w){"use strict";function j(o,n){if(o&&Object.keys(o).length&&n){if(n.indexOf(".")===-1)return o[n];{const t=n.split(".");let i=o;for(let r=0,l=t.length;r<l;++r){if(o==null)return null;i=i[t[r]]}return i}}else return null}function I(o){return(n=>n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&typeof n=="object"&&Object.keys(n).length===0)(e.unref(o))}function Q(o){return typeof o=="string"||o instanceof String}function F(o){var n,t;if(o)return(t=(n=o.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:n.join("-"))==null?void 0:t.toLowerCase()}function D(o){return Array.isArray(o)?o.filter(n=>Q(n)).join(" "):o}function ee(o,n){const{error:t,valid:i,hint:r,loading:l}=n,{hintLabel:s,modelValue:b,valid:m,validLabel:p,error:c,errorLabel:a,...S}=e.toRefs(o),d=j(S,"loading"),f=j(S,"loadingLabel"),y=e.computed(()=>c.value?!!(c.value&&t||a!=null&&a.value&&Array.isArray(a.value)&&a.value.length>0||a!=null&&a.value&&!I(a)):!1),x=e.computed(()=>!!(s&&s.value||r)),_=e.computed(()=>!!(p&&p.value||i)),k=e.computed(()=>!!(d!=null&&d.value&&l||d!=null&&d.value&&(f!=null&&f.value))),H=e.computed(()=>x.value||_||y.value||k.value);return{hasErrors:y,hasHint:x,hasValid:_,hasLoading:k,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(N){const v=e.computed(()=>{const T=A.toReactive({hintLabel:s,modelValue:b,valid:m,validLabel:p,error:c,errorLabel:a,loading:d,loadingLabel:f,...N.params});return c!=null&&c.value?(t==null?void 0:t(T))||D(a==null?void 0:a.value)||(s==null?void 0:s.value):m!=null&&m.value?(i==null?void 0:i(T))||D(p==null?void 0:p.value)||(s==null?void 0:s.value):d!=null&&d.value?(l==null?void 0:l(T))||D(f==null?void 0:f.value)||(s==null?void 0:s.value):(r==null?void 0:r(T))||D(s==null?void 0:s.value)||(s==null?void 0:s.value)});return{isVisible:H,hasErrors:y,hasValid:_,hintContent:v}},render(){if(this.isVisible)return e.h("small",{role:this.hasErrors||this.hasValid?"alert":void 0},this.hintContent)}}}}function te(o,n,t){const i=e.computed(()=>!!(o.value&&n.value==="left"||t.iconLeft)),r=e.computed(()=>!!(o.value&&n.value==="right"||t.iconRight)),l=e.computed(()=>!!(o.value&&n.value==="top"||t.iconTop)),s=e.computed(()=>!!(o.value&&n.value==="bottom"||t.iconBottom));return{hasIconLeft:i,hasIconRight:r,hasIconTop:l,hasIconBottom:s}}function ne(o,n){const{focused:t}=A.useFocus(o);return e.watch(t,i=>{n(i?"focus":"blur",e.unref(o))}),{focused:t}}function oe(o,n,t=0){let i;return typeof t=="string"&&(t=parseInt(t)),e.computed({get:()=>o==null?void 0:o.value,set:r=>{i&&clearTimeout(i),i=setTimeout(()=>{n("update:modelValue",r)},t)}})}function re(o,n){const t=e.computed(()=>{const l=e.unref(o);return A.isString(l)?l.length:0}),i=e.computed(()=>{const l=e.unref(o)||"";return!A.isString(l)||n.mode===!1?0:n.mode===!0?l.length:e.unref(n.upperLimit)-l.length}),r=e.computed(()=>n.mode===!1?"":n.mode===!0&&n.upperLimit&&n.upperLimit>0?`${i.value}/${e.unref(n.upperLimit)}`:i.value);return{textLength:t,textLimitLength:i,formattedTextLimitLength:r}}function W(o,n){const t={[`${o}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(n).reduce((r,l)=>{const s=e.unref(n[l])||!1;if(!s)return r;if(l==="modifiers"){const b=Array.isArray(s)?s:s.split(" ");return{...r,...b.reduce((m,p)=>({...m,[`${o}--${F(p)}`]:!0}),{})}}else return{...r,[`${o}--${F(l)}`]:s}},t)||{})}}const ie="ds",se={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},ae={name:"VvIcon"},g=e.defineComponent({...ae,props:se,setup(o){const n=o,t=e.ref(!0),{modifiers:i}=e.toRefs(n),r=e.inject(ie),{bemCssClasses:l}=W("vv-icon",{modifiers:i}),s=e.computed(()=>n.provider||(r==null?void 0:r.provider)),b=e.computed(()=>{const c=n.name||"",a=`@${s.value}:${n.prefix}:${n.name}`;return w.iconExists(c)?c:w.iconExists(a)?a:(r==null?void 0:r.iconsCollections.find(S=>{const d=`@${s.value}:${S.prefix}:${c}`;if(w.iconExists(d))return d}))||c});function m(c){let a=null;if(typeof window>"u"){const{JSDOM:y}=require("jsdom");a=new y().window}return(a?new a.DOMParser:new window.DOMParser).parseFromString(c,"text/html").querySelector("svg")}function p(c){const a=m(c),S=(a==null?void 0:a.innerHTML.trim())||"";a&&S&&w.addIcon(`@${s.value}:${n.prefix}:${n.name}`,{body:S,height:a.viewBox.baseVal.height,width:a.viewBox.baseVal.width})}return r&&(n.src&&!w.iconExists(`@${s.value}:${n.prefix}:${n.name}`)?(t.value=!1,r.fetchIcon(n.src).then(c=>{c&&(p(c),t.value=!0)}).catch(c=>{throw new Error(`During fetch icon: ${c==null?void 0:c.message}`)})):n.svg&&p(n.svg)),(c,a)=>t.value?(e.openBlock(),e.createBlock(e.unref(w.Icon),e.mergeProps({key:0,class:e.unref(l)},{...c.$props,provider:e.unref(s),icon:e.unref(b)}),null,16,["class"])):e.createCommentVNode("",!0)}}),le={valid:Boolean,validLabel:[String,Array]},ce={error:Boolean,errorLabel:[String,Array]},de={loading:Boolean,loadingLabel:String},ue={modifiers:[String,Array]},pe={hintLabel:{type:String,default:""}},fe={limit:{type:[Boolean,String],default:!1,validator:o=>[!0,!1,"countdown"].includes(o)}},me={id:[String,Number],name:{type:String,required:!0},autocomplete:{type:String,default:"off"},autofocus:Boolean,minlength:Number,maxlength:Number,label:String,placeholder:String,required:Boolean,disabled:Boolean,readonly:Boolean},E={TEXT:"text",PASSWORD:"password",DATE:"date",DATETIME_LOCAL:"datetime-local",NUMBER:"number",TIME:"time",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",FILE:"file"},B={LEFT:"left",RIGHT:"right"},P={PASSWORD_SHOW:"eye-on",PASSWORD_HIDE:"eye-off",DATE:"calendar",TIME:"time",COLOR:"color",SEARCH:"close"},u={TYPES:E,ICON_POSITIONS:B,TYPES_ICON:P},Se=["update:modelValue","focus","blur","keyup"],he={...le,...ce,...pe,...de,...ue,...fe,...me,modelValue:{type:[String,Number],default:void 0},type:{type:String,default:E.TEXT,validator:o=>Object.values(E).includes(o)},min:[Number,Date],max:[Number,Date],step:{type:Number,default:1},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},iconShowPassword:{type:String,default:P.PASSWORD_SHOW},iconHidePassword:{type:String,default:P.PASSWORD_HIDE},iconClear:{type:String,default:P.SEARCH},icon:{type:[String,Object],default:""},iconPosition:{type:String,validation:o=>Object.values(B).includes(o),default:B.RIGHT},floating:Boolean,debounce:[String,Number],tabindex:{type:[String,Number],default:0}},q=e.defineComponent({components:{VvIcon:g},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:P.PASSWORD_SHOW},iconHide:{type:String,default:P.PASSWORD_HIDE}},emits:["toggle-password"],setup(o,{emit:n}){const t=e.ref(!1),i=e.computed(()=>t.value?o.iconHide:o.iconShow);function r(l){l==null||l.stopPropagation(),o.disabled||(t.value=!t.value,n("toggle-password",t.value))}return{active:t,activeIcon:i,onClick:r}},render(){const o=e.h(g,{name:this.activeIcon,class:"vv-input-text__action-icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},o)}}),R=e.defineComponent({components:{VvIcon:g},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:o=>["up","down"].includes(o),default:"up"}},emits:["step-up","step-down"],setup(o,{emit:n}){const t=e.computed(()=>o.mode==="up");return{isUp:t,onClick:r=>{r==null||r.stopPropagation(),o.disabled||n(t.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,onClick:this.onClick})}}),z=e.defineComponent({components:{VvIcon:g},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup(o,{emit:n}){function t(i){i==null||i.stopPropagation(),o.disabled||n("clear")}return{onClick:t}},render(){const o=e.h(g,{name:this.icon,class:"vv-input-text__action-icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},o)}});function V(o,n){return{name:"VvInputTextActions",components:{VvIcon:g,VvInputPasswordAction:q,VvInputStepAction:R,VvInputClearAction:z},setup(){return{isDisabled:e.computed(()=>n.disabled||n.readonly),labelStepUp:n.labelStepUp,labelStepDown:n.labelStepDown,labelShowPassword:n.labelShowPassword,labelHidePassword:n.labelHidePassword,labelClear:n.labelClear,iconShowPassword:n.iconShowPassword,iconHidePassword:n.iconHidePassword}},render(){let t=null;switch(o){case E.SEARCH:{const{onClear:i}=this.$attrs;t=[e.h(z,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:i})];break}case E.PASSWORD:{const{onTogglePassword:i}=this.$attrs;t=[e.h(q,{disabled:this.isDisabled,onTogglePassword:i,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case E.NUMBER:{const{onStepUp:i,onStepDown:r}=this.$attrs;t=[e.h(R,{mode:"up",disabled:this.isDisabled||n.max!==void 0&&n.modelValue===n.max,label:this.labelStepUp,onStepUp:i,onStepDown:r}),e.h(R,{mode:"down",disabled:this.isDisabled||n.min!==void 0&&n.modelValue===n.min,label:this.labelStepDown,onStepUp:i,onStepDown:r})];break}}return Array.isArray(t)?e.h("div",{class:"vv-input-text__actions-group"},t):t}}}const ge=["for"],be={class:"vv-input-text__wrapper"},ye=["id","disabled","readonly","required"],we={key:1,class:"vv-input-text__limit"},Ee={name:"VvInputText"};return e.defineComponent({...Ee,props:he,emits:Se,setup(o,{emit:n}){const t=o,i=e.useSlots(),r=e.ref(),{icon:l,iconPosition:s,label:b,modelValue:m,limit:p}=e.toRefs(t),c=e.computed(()=>String(t.id||C.nanoid())),a=e.computed(()=>`${c.value}-hint`),S=e.computed(()=>t.floating&&I(t.placeholder)?" ":t.placeholder),d=oe(m,n,t.debounce),f=e.ref(!1),y=e.computed(()=>t.type===u.TYPES.PASSWORD),x=()=>{f.value=!f.value},_=e.computed(()=>[u.TYPES.TIME,u.TYPES.DATETIME_LOCAL,u.TYPES.DATE].includes(t.type)),k=e.computed(()=>t.type===u.TYPES.NUMBER),H=()=>{Y.value||(r.value.stepUp(),d.value=e.unref(r).value)},N=()=>{Y.value||(r.value.stepDown(),d.value=e.unref(r).value)},v=e.computed(()=>t.type===u.TYPES.SEARCH),T=()=>{d.value=null},{hasIconLeft:X,hasIconRight:L}=te(l,s,{iconLeft:i["icon-left"],iconRight:i["icon-right"]}),Z=e.computed(()=>typeof l.value=="string"?{name:l.value}:l.value),$=e.computed(()=>{switch(t.type){case u.TYPES.COLOR:return{name:u.TYPES_ICON.COLOR};case u.TYPES.DATE:case u.TYPES.DATETIME_LOCAL:return{name:u.TYPES_ICON.DATE};case u.TYPES.TIME:return{name:u.TYPES_ICON.TIME};default:return""}}),{formattedTextLimitLength:Pe}=re(d,{mode:t.limit,upperLimit:t.maxlength||0}),{focused:M}=ne(r,n),Y=e.computed(()=>t.disabled||t.readonly),Te=e.computed(()=>Y.value?-1:t.tabindex),G=e.computed(()=>!I(m)),Ce=e.computed(()=>{if(t.error===!0)return!0;if(t.valid===!0)return!1}),{bemCssClasses:Ie}=W("vv-input-text",{modifiers:t.modifiers,valid:t.valid,invalid:t.error,loading:t.loading,iconLeft:X,iconRight:L.value||!I($),floating:t.floating&&!I(t.label),dirty:G,focus:M}),_e=e.computed(()=>{const h=(()=>y.value&&f.value||_.value&&!G.value&&!M.value?u.TYPES.TEXT:t.type)();return{type:h,placeholder:S.value,name:t.name,autocomplete:t.autocomplete,minlength:t.minlength,maxlength:t.maxlength,min:t.min,max:t.max,step:h===u.TYPES.NUMBER?t.step:void 0,tabindex:Te.value,"aria-invalid":Ce.value,"aria-describedby":!K.value&&De.value?a.value:void 0,"aria-errormessage":K.value?a.value:void 0}}),J=e.computed(()=>({valid:t.valid,error:t.error,modelValue:t.modelValue})),{HintSlot:Ae,hasHint:De,hasErrors:K}=ee(t,i),xe=V(u.TYPES.PASSWORD,t),ke=V(u.TYPES.NUMBER,t),Oe=V(u.TYPES.SEARCH,t);return e.onMounted(()=>{t.autofocus&&(M.value=!0)}),(h,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Ie))},[e.unref(b)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(c),class:"vv-input-text__label"},e.toDisplayString(e.unref(b)),9,ge)):e.createCommentVNode("",!0),e.createElementVNode("div",be,[e.unref(X)?e.renderSlot(h.$slots,"icon-left",e.normalizeProps(e.mergeProps({key:0},e.unref(J))),()=>[e.createVNode(g,e.mergeProps({class:"vv-input-text__icon-left"},e.unref(Z)),null,16)]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(c),ref_key:"input",ref:r,"onUpdate:modelValue":O[0]||(O[0]=U=>e.isRef(d)?d.value=U:null)},e.unref(_e),{disabled:h.disabled,readonly:h.readonly,required:h.required,onKeyup:O[1]||(O[1]=U=>n("keyup",U))}),null,16,ye),[[e.vModelDynamic,e.unref(d)]]),e.renderSlot(h.$slots,"icon-right",e.normalizeProps(e.guardReactiveProps(e.unref(J))),()=>[e.unref(L)||e.unref($)?(e.openBlock(),e.createBlock(g,e.normalizeProps(e.mergeProps({key:0},e.unref(L)?e.unref(Z):e.unref($))),null,16)):e.unref(y)?(e.openBlock(),e.createBlock(e.unref(xe),{key:1,onTogglePassword:x})):e.unref(k)?(e.openBlock(),e.createBlock(e.unref(ke),{key:2,onStepUp:H,onStepDown:N})):e.unref(v)?(e.openBlock(),e.createBlock(e.unref(Oe),{key:3,onClear:T})):e.createCommentVNode("",!0)]),e.unref(p)?(e.openBlock(),e.createElementBlock("span",we,[e.renderSlot(h.$slots,"limit",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(Pe)),1)])])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(Ae),{id:e.unref(a),class:"vv-input-text__hint"},null,8,["id"])],2))}})});
|
|
@@ -1,251 +1,67 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type: string;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
readonly: boolean;
|
|
9
|
-
icon: string;
|
|
10
|
-
iconPosition: string;
|
|
11
|
-
loading: boolean;
|
|
12
|
-
error: boolean;
|
|
13
|
-
valid: boolean;
|
|
14
|
-
hintLabel: string;
|
|
15
|
-
autocomplete: string;
|
|
16
|
-
autofocus: boolean;
|
|
17
|
-
floating: boolean;
|
|
18
|
-
autoclear: boolean;
|
|
19
|
-
limit: string | boolean;
|
|
20
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
-
modelValue: null;
|
|
22
|
-
type: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
|
-
validator: (value: string) => boolean;
|
|
26
|
-
};
|
|
27
|
-
id: StringConstructor;
|
|
28
|
-
name: {
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
required: boolean;
|
|
31
|
-
};
|
|
32
|
-
autocomplete: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
default: string;
|
|
35
|
-
};
|
|
36
|
-
autofocus: BooleanConstructor;
|
|
37
|
-
minlength: NumberConstructor;
|
|
38
|
-
maxlength: NumberConstructor;
|
|
39
|
-
min: (DateConstructor | NumberConstructor)[];
|
|
40
|
-
max: (DateConstructor | NumberConstructor)[];
|
|
41
|
-
step: NumberConstructor;
|
|
42
|
-
label: StringConstructor;
|
|
43
|
-
disabled: BooleanConstructor;
|
|
44
|
-
readonly: BooleanConstructor;
|
|
45
|
-
placeholder: StringConstructor;
|
|
46
|
-
icon: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
default: string;
|
|
49
|
-
};
|
|
50
|
-
iconPosition: {
|
|
51
|
-
type: StringConstructor;
|
|
52
|
-
validation: (value: string) => boolean;
|
|
53
|
-
default: string;
|
|
54
|
-
};
|
|
55
|
-
floating: BooleanConstructor;
|
|
56
|
-
debounce: NumberConstructor;
|
|
57
|
-
autoclear: BooleanConstructor;
|
|
58
|
-
limit: {
|
|
59
|
-
type: (StringConstructor | BooleanConstructor)[];
|
|
60
|
-
default: boolean;
|
|
61
|
-
validator: (value: string) => boolean;
|
|
62
|
-
};
|
|
63
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
64
|
-
loading: BooleanConstructor;
|
|
65
|
-
loadingLabel: StringConstructor;
|
|
66
|
-
hintLabel: {
|
|
67
|
-
type: StringConstructor;
|
|
68
|
-
default: string;
|
|
69
|
-
};
|
|
70
|
-
error: BooleanConstructor;
|
|
71
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
72
|
-
valid: BooleanConstructor;
|
|
73
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
74
|
-
}>> & {
|
|
75
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
76
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "disabled" | "readonly" | "icon" | "iconPosition" | "loading" | "error" | "valid" | "hintLabel" | "autocomplete" | "autofocus" | "floating" | "autoclear" | "limit">;
|
|
77
|
-
$attrs: {
|
|
78
|
-
[x: string]: unknown;
|
|
79
|
-
};
|
|
80
|
-
$refs: {
|
|
81
|
-
[x: string]: unknown;
|
|
82
|
-
};
|
|
83
|
-
$slots: Readonly<{
|
|
84
|
-
[name: string]: import("vue").Slot | undefined;
|
|
85
|
-
}>;
|
|
86
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
87
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
88
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
89
|
-
$el: any;
|
|
90
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
-
modelValue: null;
|
|
92
|
-
type: {
|
|
93
|
-
type: StringConstructor;
|
|
94
|
-
default: string;
|
|
95
|
-
validator: (value: string) => boolean;
|
|
96
|
-
};
|
|
97
|
-
id: StringConstructor;
|
|
98
|
-
name: {
|
|
99
|
-
type: StringConstructor;
|
|
100
|
-
required: boolean;
|
|
101
|
-
};
|
|
102
|
-
autocomplete: {
|
|
103
|
-
type: StringConstructor;
|
|
104
|
-
default: string;
|
|
105
|
-
};
|
|
106
|
-
autofocus: BooleanConstructor;
|
|
107
|
-
minlength: NumberConstructor;
|
|
108
|
-
maxlength: NumberConstructor;
|
|
109
|
-
min: (DateConstructor | NumberConstructor)[];
|
|
110
|
-
max: (DateConstructor | NumberConstructor)[];
|
|
111
|
-
step: NumberConstructor;
|
|
112
|
-
label: StringConstructor;
|
|
113
|
-
disabled: BooleanConstructor;
|
|
114
|
-
readonly: BooleanConstructor;
|
|
115
|
-
placeholder: StringConstructor;
|
|
116
|
-
icon: {
|
|
117
|
-
type: StringConstructor;
|
|
118
|
-
default: string;
|
|
119
|
-
};
|
|
120
|
-
iconPosition: {
|
|
121
|
-
type: StringConstructor;
|
|
122
|
-
validation: (value: string) => boolean;
|
|
123
|
-
default: string;
|
|
124
|
-
};
|
|
125
|
-
floating: BooleanConstructor;
|
|
126
|
-
debounce: NumberConstructor;
|
|
127
|
-
autoclear: BooleanConstructor;
|
|
128
|
-
limit: {
|
|
129
|
-
type: (StringConstructor | BooleanConstructor)[];
|
|
130
|
-
default: boolean;
|
|
131
|
-
validator: (value: string) => boolean;
|
|
132
|
-
};
|
|
133
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
134
|
-
loading: BooleanConstructor;
|
|
135
|
-
loadingLabel: StringConstructor;
|
|
136
|
-
hintLabel: {
|
|
137
|
-
type: StringConstructor;
|
|
138
|
-
default: string;
|
|
139
|
-
};
|
|
140
|
-
error: BooleanConstructor;
|
|
141
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
142
|
-
valid: BooleanConstructor;
|
|
143
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
144
|
-
}>> & {
|
|
145
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
146
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
|
147
|
-
type: string;
|
|
148
|
-
disabled: boolean;
|
|
149
|
-
readonly: boolean;
|
|
150
|
-
icon: string;
|
|
151
|
-
iconPosition: string;
|
|
152
|
-
loading: boolean;
|
|
153
|
-
error: boolean;
|
|
154
|
-
valid: boolean;
|
|
155
|
-
hintLabel: string;
|
|
156
|
-
autocomplete: string;
|
|
157
|
-
autofocus: boolean;
|
|
158
|
-
floating: boolean;
|
|
159
|
-
autoclear: boolean;
|
|
160
|
-
limit: string | boolean;
|
|
161
|
-
}, {}, string> & {
|
|
162
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
163
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
164
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
165
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
166
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
167
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
168
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
169
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
170
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
171
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
172
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
173
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
174
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
175
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
176
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
177
|
-
};
|
|
178
|
-
$forceUpdate: () => void;
|
|
179
|
-
$nextTick: typeof import("vue").nextTick;
|
|
180
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
181
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
182
|
-
modelValue: null;
|
|
183
|
-
type: {
|
|
184
|
-
type: StringConstructor;
|
|
185
|
-
default: string;
|
|
186
|
-
validator: (value: string) => boolean;
|
|
187
|
-
};
|
|
188
|
-
id: StringConstructor;
|
|
189
|
-
name: {
|
|
190
|
-
type: StringConstructor;
|
|
191
|
-
required: boolean;
|
|
192
|
-
};
|
|
193
|
-
autocomplete: {
|
|
194
|
-
type: StringConstructor;
|
|
195
|
-
default: string;
|
|
196
|
-
};
|
|
197
|
-
autofocus: BooleanConstructor;
|
|
198
|
-
minlength: NumberConstructor;
|
|
199
|
-
maxlength: NumberConstructor;
|
|
200
|
-
min: (DateConstructor | NumberConstructor)[];
|
|
201
|
-
max: (DateConstructor | NumberConstructor)[];
|
|
202
|
-
step: NumberConstructor;
|
|
203
|
-
label: StringConstructor;
|
|
204
|
-
disabled: BooleanConstructor;
|
|
205
|
-
readonly: BooleanConstructor;
|
|
206
|
-
placeholder: StringConstructor;
|
|
207
|
-
icon: {
|
|
208
|
-
type: StringConstructor;
|
|
209
|
-
default: string;
|
|
210
|
-
};
|
|
211
|
-
iconPosition: {
|
|
212
|
-
type: StringConstructor;
|
|
213
|
-
validation: (value: string) => boolean;
|
|
214
|
-
default: string;
|
|
215
|
-
};
|
|
216
|
-
floating: BooleanConstructor;
|
|
217
|
-
debounce: NumberConstructor;
|
|
218
|
-
autoclear: BooleanConstructor;
|
|
219
|
-
limit: {
|
|
220
|
-
type: (StringConstructor | BooleanConstructor)[];
|
|
221
|
-
default: boolean;
|
|
222
|
-
validator: (value: string) => boolean;
|
|
223
|
-
};
|
|
224
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
225
|
-
loading: BooleanConstructor;
|
|
226
|
-
loadingLabel: StringConstructor;
|
|
227
|
-
hintLabel: {
|
|
228
|
-
type: StringConstructor;
|
|
229
|
-
default: string;
|
|
230
|
-
};
|
|
231
|
-
error: BooleanConstructor;
|
|
232
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
233
|
-
valid: BooleanConstructor;
|
|
234
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
235
|
-
}>> & {
|
|
236
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
237
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
238
|
-
__isFragment?: undefined;
|
|
239
|
-
__isTeleport?: undefined;
|
|
240
|
-
__isSuspense?: undefined;
|
|
241
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
242
|
-
modelValue: null;
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
243
6
|
type: {
|
|
244
7
|
type: StringConstructor;
|
|
245
8
|
default: string;
|
|
246
9
|
validator: (value: string) => boolean;
|
|
247
10
|
};
|
|
248
|
-
|
|
11
|
+
min: (DateConstructor | NumberConstructor)[];
|
|
12
|
+
max: (DateConstructor | NumberConstructor)[];
|
|
13
|
+
step: {
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
labelStepUp: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
labelStepDown: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
labelShowPassword: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
labelHidePassword: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
labelClear: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
iconShowPassword: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
iconHidePassword: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
iconClear: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
icon: {
|
|
50
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
iconPosition: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
validation: (value: string) => boolean;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
floating: BooleanConstructor;
|
|
59
|
+
debounce: (StringConstructor | NumberConstructor)[];
|
|
60
|
+
tabindex: {
|
|
61
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
62
|
+
default: number;
|
|
63
|
+
};
|
|
64
|
+
id: (StringConstructor | NumberConstructor)[];
|
|
249
65
|
name: {
|
|
250
66
|
type: StringConstructor;
|
|
251
67
|
required: boolean;
|
|
@@ -257,25 +73,107 @@ declare const _default: {
|
|
|
257
73
|
autofocus: BooleanConstructor;
|
|
258
74
|
minlength: NumberConstructor;
|
|
259
75
|
maxlength: NumberConstructor;
|
|
260
|
-
min: (DateConstructor | NumberConstructor)[];
|
|
261
|
-
max: (DateConstructor | NumberConstructor)[];
|
|
262
|
-
step: NumberConstructor;
|
|
263
76
|
label: StringConstructor;
|
|
77
|
+
placeholder: StringConstructor;
|
|
78
|
+
required: BooleanConstructor;
|
|
264
79
|
disabled: BooleanConstructor;
|
|
265
80
|
readonly: BooleanConstructor;
|
|
266
|
-
|
|
267
|
-
|
|
81
|
+
limit: {
|
|
82
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
83
|
+
default: boolean;
|
|
84
|
+
validator: (value: string) => boolean;
|
|
85
|
+
};
|
|
86
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
87
|
+
loading: BooleanConstructor;
|
|
88
|
+
loadingLabel: StringConstructor;
|
|
89
|
+
hintLabel: {
|
|
268
90
|
type: StringConstructor;
|
|
269
91
|
default: string;
|
|
270
92
|
};
|
|
93
|
+
error: BooleanConstructor;
|
|
94
|
+
errorLabel: (ArrayConstructor | StringConstructor)[];
|
|
95
|
+
valid: BooleanConstructor;
|
|
96
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
97
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
98
|
+
modelValue: {
|
|
99
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
102
|
+
type: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
validator: (value: string) => boolean;
|
|
106
|
+
};
|
|
107
|
+
min: (DateConstructor | NumberConstructor)[];
|
|
108
|
+
max: (DateConstructor | NumberConstructor)[];
|
|
109
|
+
step: {
|
|
110
|
+
type: NumberConstructor;
|
|
111
|
+
default: number;
|
|
112
|
+
};
|
|
113
|
+
labelStepUp: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
labelStepDown: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
labelShowPassword: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
labelHidePassword: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
labelClear: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
133
|
+
iconShowPassword: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
137
|
+
iconHidePassword: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
iconClear: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
icon: {
|
|
146
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
271
149
|
iconPosition: {
|
|
272
150
|
type: StringConstructor;
|
|
273
151
|
validation: (value: string) => boolean;
|
|
274
152
|
default: string;
|
|
275
153
|
};
|
|
276
154
|
floating: BooleanConstructor;
|
|
277
|
-
debounce: NumberConstructor;
|
|
278
|
-
|
|
155
|
+
debounce: (StringConstructor | NumberConstructor)[];
|
|
156
|
+
tabindex: {
|
|
157
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
158
|
+
default: number;
|
|
159
|
+
};
|
|
160
|
+
id: (StringConstructor | NumberConstructor)[];
|
|
161
|
+
name: {
|
|
162
|
+
type: StringConstructor;
|
|
163
|
+
required: boolean;
|
|
164
|
+
};
|
|
165
|
+
autocomplete: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
autofocus: BooleanConstructor;
|
|
170
|
+
minlength: NumberConstructor;
|
|
171
|
+
maxlength: NumberConstructor;
|
|
172
|
+
label: StringConstructor;
|
|
173
|
+
placeholder: StringConstructor;
|
|
174
|
+
required: BooleanConstructor;
|
|
175
|
+
disabled: BooleanConstructor;
|
|
176
|
+
readonly: BooleanConstructor;
|
|
279
177
|
limit: {
|
|
280
178
|
type: (StringConstructor | BooleanConstructor)[];
|
|
281
179
|
default: boolean;
|
|
@@ -289,39 +187,53 @@ declare const _default: {
|
|
|
289
187
|
default: string;
|
|
290
188
|
};
|
|
291
189
|
error: BooleanConstructor;
|
|
292
|
-
errorLabel: (
|
|
190
|
+
errorLabel: (ArrayConstructor | StringConstructor)[];
|
|
293
191
|
valid: BooleanConstructor;
|
|
294
|
-
validLabel: (
|
|
192
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
295
193
|
}>> & {
|
|
296
194
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
297
|
-
}, {
|
|
298
|
-
|
|
195
|
+
}, {
|
|
196
|
+
modelValue: string | number;
|
|
299
197
|
disabled: boolean;
|
|
300
|
-
|
|
301
|
-
|
|
198
|
+
type: string;
|
|
199
|
+
error: boolean;
|
|
200
|
+
required: boolean;
|
|
201
|
+
icon: string | Record<string, any>;
|
|
302
202
|
iconPosition: string;
|
|
303
203
|
loading: boolean;
|
|
304
|
-
|
|
305
|
-
|
|
204
|
+
readonly: boolean;
|
|
205
|
+
tabindex: string | number;
|
|
306
206
|
hintLabel: string;
|
|
207
|
+
valid: boolean;
|
|
208
|
+
step: number;
|
|
209
|
+
labelStepUp: string;
|
|
210
|
+
labelStepDown: string;
|
|
211
|
+
labelShowPassword: string;
|
|
212
|
+
labelHidePassword: string;
|
|
213
|
+
labelClear: string;
|
|
214
|
+
iconShowPassword: string;
|
|
215
|
+
iconHidePassword: string;
|
|
216
|
+
iconClear: string;
|
|
217
|
+
floating: boolean;
|
|
307
218
|
autocomplete: string;
|
|
308
219
|
autofocus: boolean;
|
|
309
|
-
floating: boolean;
|
|
310
|
-
autoclear: boolean;
|
|
311
220
|
limit: string | boolean;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
};
|
|
326
|
-
});
|
|
221
|
+
}>, {
|
|
222
|
+
'icon-left': (_: {
|
|
223
|
+
valid: boolean;
|
|
224
|
+
error: boolean;
|
|
225
|
+
modelValue: string | number | undefined;
|
|
226
|
+
}) => any;
|
|
227
|
+
'icon-right': (_: {
|
|
228
|
+
valid: boolean;
|
|
229
|
+
error: boolean;
|
|
230
|
+
modelValue: string | number | undefined;
|
|
231
|
+
}) => any;
|
|
232
|
+
limit: (_: {}) => any;
|
|
233
|
+
}>;
|
|
327
234
|
export default _default;
|
|
235
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
236
|
+
new (): {
|
|
237
|
+
$slots: S;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { VvInputTextPropsTypes } from './VvInputText';
|
|
2
1
|
import { type Component } from 'vue';
|
|
2
|
+
import { type VvInputTextPropsTypes } from '@/components/VvInputText';
|
|
3
3
|
export default function VvInputTextActionsFactory(type: string, parentProps: VvInputTextPropsTypes): Component;
|