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