@volverjs/ui-vue 0.0.1-beta.6 → 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 +101 -7
- 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 +214 -256
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- 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 +147 -273
- 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} +8 -1
- package/dist/composables/useDebouncedInput.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- 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 +322 -13
- 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 -124
- 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 -154
- 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 +293 -252
- package/src/components/VvInputText/VvInputTextActions.ts +100 -0
- 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 +188 -180
- package/src/components/VvTextarea/index.ts +50 -0
- package/src/components/common/HintSlot.ts +169 -121
- 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/useComponentIcons.ts +96 -0
- package/src/composables/useDebouncedInput.ts +25 -0
- package/src/composables/useModifiers.ts +58 -14
- 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 +204 -15
- 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 +160 -58
- 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 -424
- 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 -434
- 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 -59
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/dist/components/VvInputText/vv-input-text.es.js +0 -596
- 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 -395
- 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 -423
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +0 -2
- package/dist/components/VvSelect/vv-select.es.js +0 -427
- package/dist/components/VvSelect/vv-select.umd.js +0 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +0 -67
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/components/VvTextarea/vv-textarea.es.js +0 -472
- package/dist/components/VvTextarea/vv-textarea.umd.js +0 -2
- package/dist/composables/focus/useComponentFocus.d.ts +0 -7
- package/dist/composables/options/useOptions.d.ts +0 -5
- package/dist/stories/Icon/IconList.vue.d.ts +0 -44
- package/dist/ui-vue.es.js +0 -2985
- 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 -49
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- package/src/components/VvInputText/useInputPassword.ts +0 -38
- 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 -55
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/composables/focus/useComponentFocus.ts +0 -22
- package/src/composables/icons/useComponentIcons.ts +0 -52
- package/src/composables/options/useOptions.ts +0 -27
- 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 -15
- 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/TextareaAutocomplete.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaError.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaFloating.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIcon.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaLabel.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaLoading.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaValid.stories.mdx +0 -19
- package/src/stories/stories.scss +0 -24
- package/src/stories/volver-ui-vue.stories.mdx +0 -71
- package/src/types/.README +0 -0
|
@@ -1,596 +0,0 @@
|
|
|
1
|
-
import { computed as f, unref as a, defineComponent as J, ref as x, toRefs as V, inject as Ce, openBlock as I, createBlock as K, mergeProps as D, createCommentVNode as $, h as be, watch as Q, useSlots as we, useAttrs as De, onMounted as xe, createElementBlock as w, toDisplayString as Ne, createElementVNode as b, renderSlot as G, normalizeProps as X, createVNode as R, withDirectives as Re, vModelDynamic as Be, guardReactiveProps as ke, withModifiers as B } from "vue";
|
|
2
|
-
import { iconExists as k, Icon as Fe, addIcon as $e } from "@iconify/vue";
|
|
3
|
-
import { useFocus as He, refDebounced as Me } from "@vueuse/core";
|
|
4
|
-
const E = {
|
|
5
|
-
equals(e, t, n) {
|
|
6
|
-
return n ? this.resolveFieldData(e, n) === this.resolveFieldData(t, n) : this.deepEquals(e, t);
|
|
7
|
-
},
|
|
8
|
-
deepEquals(e, t) {
|
|
9
|
-
if (e === t)
|
|
10
|
-
return !0;
|
|
11
|
-
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
12
|
-
const n = Array.isArray(e), o = Array.isArray(t);
|
|
13
|
-
let r, i, u;
|
|
14
|
-
if (n && o) {
|
|
15
|
-
if (i = e.length, i != t.length)
|
|
16
|
-
return !1;
|
|
17
|
-
for (r = i; r-- !== 0; )
|
|
18
|
-
if (!this.deepEquals(e[r], t[r]))
|
|
19
|
-
return !1;
|
|
20
|
-
return !0;
|
|
21
|
-
}
|
|
22
|
-
if (n != o)
|
|
23
|
-
return !1;
|
|
24
|
-
const s = e instanceof Date, v = t instanceof Date;
|
|
25
|
-
if (s != v)
|
|
26
|
-
return !1;
|
|
27
|
-
if (s && v)
|
|
28
|
-
return e.getTime() == t.getTime();
|
|
29
|
-
const m = e instanceof RegExp, l = t instanceof RegExp;
|
|
30
|
-
if (m != l)
|
|
31
|
-
return !1;
|
|
32
|
-
if (m && l)
|
|
33
|
-
return e.toString() == t.toString();
|
|
34
|
-
const c = Object.keys(e);
|
|
35
|
-
if (i = c.length, i !== Object.keys(t).length)
|
|
36
|
-
return !1;
|
|
37
|
-
for (r = i; r-- !== 0; )
|
|
38
|
-
if (!Object.prototype.hasOwnProperty.call(t, c[r]))
|
|
39
|
-
return !1;
|
|
40
|
-
for (r = i; r-- !== 0; )
|
|
41
|
-
if (u = c[r], !this.deepEquals(e[u], t[u]))
|
|
42
|
-
return !1;
|
|
43
|
-
return !0;
|
|
44
|
-
}
|
|
45
|
-
return e !== e && t !== t;
|
|
46
|
-
},
|
|
47
|
-
resolveFieldData(e, t) {
|
|
48
|
-
if (e && Object.keys(e).length && t) {
|
|
49
|
-
if (t.indexOf(".") === -1)
|
|
50
|
-
return e[t];
|
|
51
|
-
{
|
|
52
|
-
const n = t.split(".");
|
|
53
|
-
let o = e;
|
|
54
|
-
for (let r = 0, i = n.length; r < i; ++r) {
|
|
55
|
-
if (e == null)
|
|
56
|
-
return null;
|
|
57
|
-
o = o[n[r]];
|
|
58
|
-
}
|
|
59
|
-
return o;
|
|
60
|
-
}
|
|
61
|
-
} else
|
|
62
|
-
return null;
|
|
63
|
-
},
|
|
64
|
-
isFunction(e) {
|
|
65
|
-
return !!(e && e.constructor && e.call && e.apply);
|
|
66
|
-
},
|
|
67
|
-
findIndexInList(e, t) {
|
|
68
|
-
let n = -1;
|
|
69
|
-
if (t) {
|
|
70
|
-
for (let o = 0; o < t.length; o++)
|
|
71
|
-
if (this.equals(t[o], e)) {
|
|
72
|
-
n = o;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return n;
|
|
77
|
-
},
|
|
78
|
-
contains(e, t) {
|
|
79
|
-
if (e != null && t && t.length) {
|
|
80
|
-
for (const n of t)
|
|
81
|
-
if (this.equals(e, n))
|
|
82
|
-
return !0;
|
|
83
|
-
}
|
|
84
|
-
return !1;
|
|
85
|
-
},
|
|
86
|
-
isEmpty(e) {
|
|
87
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
|
88
|
-
},
|
|
89
|
-
isNotEmpty(e) {
|
|
90
|
-
return !this.isEmpty(e);
|
|
91
|
-
},
|
|
92
|
-
pickBy(e, t) {
|
|
93
|
-
return Object.fromEntries(
|
|
94
|
-
Object.entries(e).filter(([n]) => t(n))
|
|
95
|
-
);
|
|
96
|
-
},
|
|
97
|
-
removeFromList(e, t) {
|
|
98
|
-
const n = this.findIndexInList(e, t);
|
|
99
|
-
return n > -1 ? t.filter((o, r) => r !== n) : t;
|
|
100
|
-
},
|
|
101
|
-
isString(e) {
|
|
102
|
-
return typeof e == "string" || e instanceof String;
|
|
103
|
-
},
|
|
104
|
-
propsToObject(e) {
|
|
105
|
-
return Object.keys(e).reduce((t, n) => {
|
|
106
|
-
var o, r, i, u, s;
|
|
107
|
-
return this.isFunction(e[n]) ? t[n] = e[n]() : Array.isArray(e[n]) ? t[n] = e[n][0]() : (o = e[n]) != null && o.type && (Array.isArray(e[n].type) ? t[n] = ((r = e[n]) == null ? void 0 : r.default) || ((i = e[n]) == null ? void 0 : i.type[0]()) : t[n] = ((u = e[n]) == null ? void 0 : u.default) || ((s = e[n]) == null ? void 0 : s.type())), t;
|
|
108
|
-
}, {});
|
|
109
|
-
},
|
|
110
|
-
filterArray(e, t, n) {
|
|
111
|
-
return e.filter((o) => t.some((r) => typeof r == "string" ? o[n] == r : this.equals(
|
|
112
|
-
o[n],
|
|
113
|
-
r[n]
|
|
114
|
-
)));
|
|
115
|
-
},
|
|
116
|
-
kebabCase(e) {
|
|
117
|
-
var t, n;
|
|
118
|
-
if (e)
|
|
119
|
-
return (n = (t = e.match(
|
|
120
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
121
|
-
)) == null ? void 0 : t.join("-")) == null ? void 0 : n.toLowerCase();
|
|
122
|
-
}
|
|
123
|
-
}, Ve = {
|
|
124
|
-
valid: Boolean,
|
|
125
|
-
validLabel: [String, Array]
|
|
126
|
-
}, Ye = {
|
|
127
|
-
error: Boolean,
|
|
128
|
-
errorLabel: [String, Array]
|
|
129
|
-
}, je = {
|
|
130
|
-
loading: Boolean,
|
|
131
|
-
loadingLabel: String
|
|
132
|
-
}, qe = {
|
|
133
|
-
hintLabel: { type: String, default: "" }
|
|
134
|
-
}, H = {
|
|
135
|
-
TEXT: "text",
|
|
136
|
-
PASSWORD: "password",
|
|
137
|
-
DATE: "date",
|
|
138
|
-
DATETIME_LOCAL: "datetime-local",
|
|
139
|
-
NUMBER: "number",
|
|
140
|
-
TIME: "time",
|
|
141
|
-
EMAIL: "email",
|
|
142
|
-
TEL: "tel",
|
|
143
|
-
URL: "url",
|
|
144
|
-
COLOR: "color",
|
|
145
|
-
SEARCH: "search",
|
|
146
|
-
FILE: "file"
|
|
147
|
-
}, M = {
|
|
148
|
-
LEFT: "left",
|
|
149
|
-
RIGHT: "right"
|
|
150
|
-
}, Ue = {
|
|
151
|
-
PASSWORD_ON: "eye-on",
|
|
152
|
-
PASSWORD_OFF: "eye-off",
|
|
153
|
-
DATE: "calendar",
|
|
154
|
-
TIME: "time",
|
|
155
|
-
COLOR: "color",
|
|
156
|
-
SEARCH: "search"
|
|
157
|
-
}, S = {
|
|
158
|
-
TYPES: H,
|
|
159
|
-
ICON_POSITIONS: M,
|
|
160
|
-
TYPES_ICON: Ue
|
|
161
|
-
}, We = ["update:modelValue", "focus", "blur"], Le = {
|
|
162
|
-
...Ve,
|
|
163
|
-
...Ye,
|
|
164
|
-
...qe,
|
|
165
|
-
...je,
|
|
166
|
-
modelValue: null,
|
|
167
|
-
type: {
|
|
168
|
-
type: String,
|
|
169
|
-
default: H.TEXT,
|
|
170
|
-
validator: (e) => Object.values(H).includes(e)
|
|
171
|
-
},
|
|
172
|
-
id: String,
|
|
173
|
-
name: { type: String, required: !0 },
|
|
174
|
-
autocomplete: { type: String, default: "off" },
|
|
175
|
-
autofocus: Boolean,
|
|
176
|
-
minlength: Number,
|
|
177
|
-
maxlength: Number,
|
|
178
|
-
min: [Number, Date],
|
|
179
|
-
max: [Number, Date],
|
|
180
|
-
step: Number,
|
|
181
|
-
label: String,
|
|
182
|
-
disabled: Boolean,
|
|
183
|
-
readonly: Boolean,
|
|
184
|
-
placeholder: String,
|
|
185
|
-
icon: { type: String, default: "" },
|
|
186
|
-
iconPosition: {
|
|
187
|
-
type: String,
|
|
188
|
-
validation: (e) => Object.values(M).includes(e),
|
|
189
|
-
default: M.RIGHT
|
|
190
|
-
},
|
|
191
|
-
floating: Boolean,
|
|
192
|
-
debounce: Number
|
|
193
|
-
}, ze = {
|
|
194
|
-
color: String,
|
|
195
|
-
width: {
|
|
196
|
-
type: [String, Number]
|
|
197
|
-
},
|
|
198
|
-
height: {
|
|
199
|
-
type: [String, Number]
|
|
200
|
-
},
|
|
201
|
-
name: {
|
|
202
|
-
type: String,
|
|
203
|
-
required: !0
|
|
204
|
-
},
|
|
205
|
-
provider: {
|
|
206
|
-
type: String
|
|
207
|
-
},
|
|
208
|
-
prefix: {
|
|
209
|
-
type: String,
|
|
210
|
-
default: "normal"
|
|
211
|
-
},
|
|
212
|
-
src: String,
|
|
213
|
-
horizontalFlip: Boolean,
|
|
214
|
-
verticalFlip: Boolean,
|
|
215
|
-
flip: String,
|
|
216
|
-
mode: String,
|
|
217
|
-
inline: Boolean,
|
|
218
|
-
rotate: [Number, String],
|
|
219
|
-
onLoad: Function,
|
|
220
|
-
svg: String,
|
|
221
|
-
modifiers: {
|
|
222
|
-
type: [String, Array]
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
function ee(e, t) {
|
|
226
|
-
const n = { [`${e}`]: !0 };
|
|
227
|
-
return {
|
|
228
|
-
bemCssClasses: f(() => Object.keys(t).reduce((r, i) => {
|
|
229
|
-
const u = a(t[i]) || !1;
|
|
230
|
-
if (!u)
|
|
231
|
-
return r;
|
|
232
|
-
if (i === "modifiers") {
|
|
233
|
-
const s = Array.isArray(u) ? u : [u];
|
|
234
|
-
return {
|
|
235
|
-
...r,
|
|
236
|
-
...s.reduce(
|
|
237
|
-
(v, m) => ({
|
|
238
|
-
...v,
|
|
239
|
-
[`${e}--${E.kebabCase(
|
|
240
|
-
m
|
|
241
|
-
)}`]: !0
|
|
242
|
-
}),
|
|
243
|
-
{}
|
|
244
|
-
)
|
|
245
|
-
};
|
|
246
|
-
} else
|
|
247
|
-
return {
|
|
248
|
-
...r,
|
|
249
|
-
[`${e}--${E.kebabCase(i)}`]: u
|
|
250
|
-
};
|
|
251
|
-
}, n) || {})
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
const F = /* @__PURE__ */ J({
|
|
255
|
-
__name: "VvIcon",
|
|
256
|
-
props: ze,
|
|
257
|
-
setup(e) {
|
|
258
|
-
const t = e, n = x(!0), { modifiers: o } = V(t), r = Ce("ds"), { bemCssClasses: i } = ee("vv-icon", {
|
|
259
|
-
modifiers: o
|
|
260
|
-
}), u = f(() => t.provider || (r == null ? void 0 : r.provider)), s = f(() => {
|
|
261
|
-
const l = t.name || "", c = `@${u.value}:${t.prefix}:${t.name}`;
|
|
262
|
-
return k(l) ? l : k(c) ? c : (r == null ? void 0 : r.iconsCollections.find((d) => {
|
|
263
|
-
const y = `@${u.value}:${d.prefix}:${l}`;
|
|
264
|
-
if (k(y))
|
|
265
|
-
return y;
|
|
266
|
-
})) || l;
|
|
267
|
-
});
|
|
268
|
-
function v(l) {
|
|
269
|
-
let c = null;
|
|
270
|
-
if (typeof window > "u") {
|
|
271
|
-
const { JSDOM: T } = require("jsdom");
|
|
272
|
-
c = new T().window;
|
|
273
|
-
}
|
|
274
|
-
return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
|
|
275
|
-
}
|
|
276
|
-
function m(l) {
|
|
277
|
-
const c = v(l), d = (c == null ? void 0 : c.innerHTML.trim()) || "";
|
|
278
|
-
c && d && $e(`@${u.value}:${t.prefix}:${t.name}`, {
|
|
279
|
-
body: d,
|
|
280
|
-
height: c.viewBox.baseVal.height,
|
|
281
|
-
width: c.viewBox.baseVal.width
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
return r && (t.src ? (n.value = !1, r.fetchIcon(t.src).then((l) => {
|
|
285
|
-
l && (m(l), n.value = !0);
|
|
286
|
-
}).catch((l) => {
|
|
287
|
-
throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
|
|
288
|
-
})) : t.svg && m(t.svg)), (l, c) => n.value ? (I(), K(a(Fe), D({
|
|
289
|
-
key: 0,
|
|
290
|
-
class: a(i)
|
|
291
|
-
}, {
|
|
292
|
-
...l.$props,
|
|
293
|
-
provider: a(u),
|
|
294
|
-
icon: a(s)
|
|
295
|
-
}), null, 16, ["class"])) : $("", !0);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
function Ze(e) {
|
|
299
|
-
return Array.isArray(e) ? e.filter((t) => E.isString(t)).reduce((t, n) => t.length > 0 ? t + `
|
|
300
|
-
` + n : n, "") : e;
|
|
301
|
-
}
|
|
302
|
-
function Ge(e, t) {
|
|
303
|
-
return {
|
|
304
|
-
name: "HintSlot",
|
|
305
|
-
setup() {
|
|
306
|
-
const n = V(e), {
|
|
307
|
-
error: o,
|
|
308
|
-
valid: r,
|
|
309
|
-
hint: i,
|
|
310
|
-
loading: u
|
|
311
|
-
} = t, {
|
|
312
|
-
hintLabel: s,
|
|
313
|
-
modelValue: v,
|
|
314
|
-
valid: m,
|
|
315
|
-
validLabel: l,
|
|
316
|
-
error: c,
|
|
317
|
-
errorLabel: d
|
|
318
|
-
} = n, y = E.resolveFieldData(n, "loading"), P = E.resolveFieldData(
|
|
319
|
-
n,
|
|
320
|
-
"loadingLabel"
|
|
321
|
-
), T = f(() => c.value ? !!(c.value && o || (d == null ? void 0 : d.value) && Array.isArray(d.value) && d.value.length > 0 || (d == null ? void 0 : d.value) && E.isNotEmpty(d.value)) : !1), A = f(() => !!(s && s.value || i || r || l && l.value || T.value || (y == null ? void 0 : y.value) && u || (y == null ? void 0 : y.value) && (P == null ? void 0 : P.value))), O = f(() => Array.isArray(d == null ? void 0 : d.value) ? Ze((d == null ? void 0 : d.value) || "") : d == null ? void 0 : d.value), C = f(() => {
|
|
322
|
-
const _ = { modelValue: v, error: c, valid: m };
|
|
323
|
-
return c != null && c.value ? (o == null ? void 0 : o(_)) || (O == null ? void 0 : O.value) || (s == null ? void 0 : s.value) : m != null && m.value ? (r == null ? void 0 : r(_)) || (l == null ? void 0 : l.value) || (s == null ? void 0 : s.value) : y != null && y.value ? (u == null ? void 0 : u(_)) || (P == null ? void 0 : P.value) || (s == null ? void 0 : s.value) : (i == null ? void 0 : i(_)) || (s == null ? void 0 : s.value) || (s == null ? void 0 : s.value);
|
|
324
|
-
});
|
|
325
|
-
return {
|
|
326
|
-
hasHint: A,
|
|
327
|
-
hintContent: C
|
|
328
|
-
};
|
|
329
|
-
},
|
|
330
|
-
render() {
|
|
331
|
-
if (this.hasHint)
|
|
332
|
-
return be("span", null, this.hintContent);
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
function Xe(e) {
|
|
337
|
-
const { type: t, disabled: n, readonly: o } = e, r = x(!0), i = f(() => t.value === S.TYPES.PASSWORD), u = f(() => !r.value), s = f(
|
|
338
|
-
() => u.value ? S.TYPES_ICON.PASSWORD_OFF : S.TYPES_ICON.PASSWORD_ON
|
|
339
|
-
);
|
|
340
|
-
function v() {
|
|
341
|
-
!n.value && !o.value && (r.value = !r.value);
|
|
342
|
-
}
|
|
343
|
-
return {
|
|
344
|
-
isPassword: i,
|
|
345
|
-
isPasswordVisible: u,
|
|
346
|
-
passwordButtonIcon: s,
|
|
347
|
-
toggleShowHidePassword: v
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
function Je(e, t) {
|
|
351
|
-
const { type: n, disabled: o, readonly: r, inputTemplateRef: i } = t, u = f(() => n.value === S.TYPES.NUMBER);
|
|
352
|
-
function s() {
|
|
353
|
-
!o.value && !r.value && (i.value.stepUp(), e.value = a(i.value).value);
|
|
354
|
-
}
|
|
355
|
-
function v() {
|
|
356
|
-
!o.value && !r.value && (i.value.stepDown(), e.value = a(i.value).value);
|
|
357
|
-
}
|
|
358
|
-
return {
|
|
359
|
-
isNumber: u,
|
|
360
|
-
stepUp: s,
|
|
361
|
-
stepDown: v
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function Ke(e, t) {
|
|
365
|
-
const { icon: n, iconPosition: o } = e, r = f(
|
|
366
|
-
() => !!(n.value && o.value === "left" || t.iconLeft)
|
|
367
|
-
), i = f(
|
|
368
|
-
() => !!(n.value && o.value === "right" || t.iconRight)
|
|
369
|
-
), u = f(
|
|
370
|
-
() => !!(n.value && o.value === "top" || t.iconTop)
|
|
371
|
-
), s = f(
|
|
372
|
-
() => !!(n.value && o.value === "bottom" || t.iconBottom)
|
|
373
|
-
);
|
|
374
|
-
return {
|
|
375
|
-
icon: n,
|
|
376
|
-
iconPosition: o,
|
|
377
|
-
hasIconLeft: r,
|
|
378
|
-
hasIconRight: i,
|
|
379
|
-
hasIconTop: u,
|
|
380
|
-
hasIconBottom: s
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
function Qe(e, t) {
|
|
384
|
-
const { focused: n } = He(e);
|
|
385
|
-
return Q(n, (o) => {
|
|
386
|
-
t(o ? "focus" : "blur", e.value);
|
|
387
|
-
}), {
|
|
388
|
-
focused: n
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
const et = ["for"], tt = { class: "vv-input-text__wrapper" }, nt = {
|
|
392
|
-
key: 0,
|
|
393
|
-
class: "vv-input-text__actions-group"
|
|
394
|
-
}, rt = ["disabled"], ot = {
|
|
395
|
-
key: 1,
|
|
396
|
-
class: "vv-input-text__actions-group"
|
|
397
|
-
}, st = ["disabled"], it = ["disabled"], ut = {
|
|
398
|
-
inheritAttrs: !1
|
|
399
|
-
}, dt = /* @__PURE__ */ J({
|
|
400
|
-
...ut,
|
|
401
|
-
__name: "VvInputText",
|
|
402
|
-
props: Le,
|
|
403
|
-
emits: We,
|
|
404
|
-
setup(e, { emit: t }) {
|
|
405
|
-
const n = e, o = we(), r = De(), i = x(), u = x(n.modelValue), {
|
|
406
|
-
disabled: s,
|
|
407
|
-
readonly: v,
|
|
408
|
-
type: m,
|
|
409
|
-
icon: l,
|
|
410
|
-
iconPosition: c,
|
|
411
|
-
valid: d,
|
|
412
|
-
error: y,
|
|
413
|
-
loading: P,
|
|
414
|
-
floating: T,
|
|
415
|
-
label: A,
|
|
416
|
-
modelValue: O
|
|
417
|
-
} = V(n), C = f(() => s.value || v.value), _ = Me(u, n.debounce || 0);
|
|
418
|
-
Q(_, (g) => t("update:modelValue", g));
|
|
419
|
-
const te = { icon: l, iconPosition: c }, ne = {
|
|
420
|
-
iconLeft: o["icon-left"],
|
|
421
|
-
iconRight: o["icon-right"]
|
|
422
|
-
}, { hasIconLeft: Y, hasIconRight: re } = Ke(te, ne), N = f(() => {
|
|
423
|
-
if (re.value)
|
|
424
|
-
return n.icon;
|
|
425
|
-
switch (n.type) {
|
|
426
|
-
case S.TYPES.PASSWORD:
|
|
427
|
-
return ie.value;
|
|
428
|
-
case S.TYPES.COLOR:
|
|
429
|
-
return S.TYPES_ICON.COLOR;
|
|
430
|
-
case S.TYPES.DATE:
|
|
431
|
-
case S.TYPES.DATETIME_LOCAL:
|
|
432
|
-
return S.TYPES_ICON.DATE;
|
|
433
|
-
case S.TYPES.TIME:
|
|
434
|
-
return S.TYPES_ICON.TIME;
|
|
435
|
-
case S.TYPES.SEARCH:
|
|
436
|
-
return S.TYPES_ICON.SEARCH;
|
|
437
|
-
default:
|
|
438
|
-
return "";
|
|
439
|
-
}
|
|
440
|
-
}), oe = {
|
|
441
|
-
type: m,
|
|
442
|
-
disabled: s,
|
|
443
|
-
readonly: v
|
|
444
|
-
}, {
|
|
445
|
-
isPassword: j,
|
|
446
|
-
isPasswordVisible: se,
|
|
447
|
-
passwordButtonIcon: ie,
|
|
448
|
-
toggleShowHidePassword: q
|
|
449
|
-
} = Xe(oe), ue = {
|
|
450
|
-
disabled: s,
|
|
451
|
-
readonly: v,
|
|
452
|
-
type: m,
|
|
453
|
-
inputTemplateRef: i
|
|
454
|
-
}, { isNumber: ae, stepUp: le, stepDown: ce } = Je(
|
|
455
|
-
u,
|
|
456
|
-
ue
|
|
457
|
-
), { focused: U } = Qe(i, t), { bemCssClasses: de } = ee("vv-input-text", {
|
|
458
|
-
readonly: v,
|
|
459
|
-
valid: d,
|
|
460
|
-
invalid: y,
|
|
461
|
-
loading: P,
|
|
462
|
-
iconLeft: Y,
|
|
463
|
-
iconRight: f(() => E.isNotEmpty(N.value)),
|
|
464
|
-
floating: f(
|
|
465
|
-
() => T.value && E.isNotEmpty(A == null ? void 0 : A.value)
|
|
466
|
-
),
|
|
467
|
-
dirty: f(() => E.isNotEmpty(O))
|
|
468
|
-
}), fe = f(() => {
|
|
469
|
-
const { class: g } = r;
|
|
470
|
-
return {
|
|
471
|
-
class: g,
|
|
472
|
-
...de.value
|
|
473
|
-
};
|
|
474
|
-
}), pe = f(() => {
|
|
475
|
-
const { style: g } = r, p = E.pickBy(
|
|
476
|
-
r,
|
|
477
|
-
(h) => h.startsWith("data-")
|
|
478
|
-
);
|
|
479
|
-
return {
|
|
480
|
-
style: g,
|
|
481
|
-
...p
|
|
482
|
-
};
|
|
483
|
-
}), W = f(() => {
|
|
484
|
-
const {
|
|
485
|
-
id: g,
|
|
486
|
-
name: p,
|
|
487
|
-
type: h,
|
|
488
|
-
autocomplete: me,
|
|
489
|
-
minlength: ye,
|
|
490
|
-
maxlength: ge,
|
|
491
|
-
min: he,
|
|
492
|
-
max: Se,
|
|
493
|
-
step: Ee,
|
|
494
|
-
disabled: Pe,
|
|
495
|
-
readonly: Ae,
|
|
496
|
-
floating: _e,
|
|
497
|
-
placeholder: Z
|
|
498
|
-
} = n, Ie = g || p, Te = j.value && se.value ? "text" : h, Oe = _e && E.isEmpty(Z) ? " " : Z;
|
|
499
|
-
return {
|
|
500
|
-
id: Ie,
|
|
501
|
-
type: Te,
|
|
502
|
-
placeholder: Oe,
|
|
503
|
-
name: p,
|
|
504
|
-
autocomplete: me,
|
|
505
|
-
disabled: Pe,
|
|
506
|
-
readonly: Ae,
|
|
507
|
-
minlength: ye,
|
|
508
|
-
maxlength: ge,
|
|
509
|
-
min: he,
|
|
510
|
-
max: Se,
|
|
511
|
-
step: Ee,
|
|
512
|
-
...L.value
|
|
513
|
-
};
|
|
514
|
-
}), L = f(() => {
|
|
515
|
-
const { name: g } = r, p = E.pickBy(
|
|
516
|
-
r,
|
|
517
|
-
(h) => h.startsWith("aria-")
|
|
518
|
-
);
|
|
519
|
-
return {
|
|
520
|
-
"aria-label": g,
|
|
521
|
-
"aria-describedby": `${g}-hint`,
|
|
522
|
-
"aria-invalid": n.error,
|
|
523
|
-
...p
|
|
524
|
-
};
|
|
525
|
-
}), z = f(() => {
|
|
526
|
-
const { modelValue: g, valid: p, error: h } = n;
|
|
527
|
-
return {
|
|
528
|
-
valid: p,
|
|
529
|
-
error: h,
|
|
530
|
-
modelValue: g
|
|
531
|
-
};
|
|
532
|
-
}), ve = Ge(n, o);
|
|
533
|
-
return xe(() => {
|
|
534
|
-
n.autofocus && (U.value = !0), console.log("Focused", U.value);
|
|
535
|
-
}), (g, p) => (I(), w("div", D(a(pe), { class: a(fe) }), [
|
|
536
|
-
a(A) ? (I(), w("label", {
|
|
537
|
-
key: 0,
|
|
538
|
-
for: a(W).id
|
|
539
|
-
}, Ne(a(A)), 9, et)) : $("", !0),
|
|
540
|
-
b("div", tt, [
|
|
541
|
-
a(Y) ? G(g.$slots, "icon-left", X(D({ key: 0 }, a(z))), () => [
|
|
542
|
-
R(F, {
|
|
543
|
-
class: "vv-input-text__icon-left",
|
|
544
|
-
name: a(l)
|
|
545
|
-
}, null, 8, ["name"])
|
|
546
|
-
]) : $("", !0),
|
|
547
|
-
Re(b("input", D({
|
|
548
|
-
ref_key: "input",
|
|
549
|
-
ref: i
|
|
550
|
-
}, a(W), {
|
|
551
|
-
"onUpdate:modelValue": p[0] || (p[0] = (h) => u.value = h),
|
|
552
|
-
onInput: p[1] || (p[1] = (h) => t("input", h))
|
|
553
|
-
}), null, 16), [
|
|
554
|
-
[Be, u.value]
|
|
555
|
-
]),
|
|
556
|
-
G(g.$slots, "icon-right", X(ke(a(z))), () => [
|
|
557
|
-
a(j) ? (I(), w("div", nt, [
|
|
558
|
-
b("button", {
|
|
559
|
-
class: "vv-input-text__action",
|
|
560
|
-
disabled: a(C),
|
|
561
|
-
onClick: p[2] || (p[2] = B(
|
|
562
|
-
(...h) => a(q) && a(q)(...h),
|
|
563
|
-
["prevent"]
|
|
564
|
-
))
|
|
565
|
-
}, [
|
|
566
|
-
R(F, { name: a(N) }, null, 8, ["name"])
|
|
567
|
-
], 8, rt)
|
|
568
|
-
])) : a(ae) ? (I(), w("div", ot, [
|
|
569
|
-
b("button", {
|
|
570
|
-
type: "button",
|
|
571
|
-
class: "vv-input-text__action-chevron vv-input-text__action-chevron-up",
|
|
572
|
-
disabled: a(C),
|
|
573
|
-
onClick: p[3] || (p[3] = B((h) => a(le)(), ["prevent"]))
|
|
574
|
-
}, null, 8, st),
|
|
575
|
-
b("button", {
|
|
576
|
-
type: "button",
|
|
577
|
-
class: "vv-input-text__action-chevron",
|
|
578
|
-
disabled: a(C),
|
|
579
|
-
onClick: p[4] || (p[4] = B((h) => a(ce)(), ["prevent"]))
|
|
580
|
-
}, null, 8, it)
|
|
581
|
-
])) : (I(), K(F, {
|
|
582
|
-
key: 2,
|
|
583
|
-
name: a(N)
|
|
584
|
-
}, null, 8, ["name"]))
|
|
585
|
-
])
|
|
586
|
-
]),
|
|
587
|
-
R(a(ve), {
|
|
588
|
-
id: a(L)["aria-describedby"],
|
|
589
|
-
class: "vv-input-text__hint"
|
|
590
|
-
}, null, 8, ["id"])
|
|
591
|
-
], 16));
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
export {
|
|
595
|
-
dt as default
|
|
596
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
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,D){"use strict";const E={equals(t,n,r){return r?this.resolveFieldData(t,r)===this.resolveFieldData(n,r):this.deepEquals(t,n)},deepEquals(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){const r=Array.isArray(t),s=Array.isArray(n);let o,c,a;if(r&&s){if(c=t.length,c!=n.length)return!1;for(o=c;o--!==0;)if(!this.deepEquals(t[o],n[o]))return!1;return!0}if(r!=s)return!1;const i=t instanceof Date,p=n instanceof Date;if(i!=p)return!1;if(i&&p)return t.getTime()==n.getTime();const m=t instanceof RegExp,l=n instanceof RegExp;if(m!=l)return!1;if(m&&l)return t.toString()==n.toString();const u=Object.keys(t);if(c=u.length,c!==Object.keys(n).length)return!1;for(o=c;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,u[o]))return!1;for(o=c;o--!==0;)if(a=u[o],!this.deepEquals(t[a],n[a]))return!1;return!0}return t!==t&&n!==n},resolveFieldData(t,n){if(t&&Object.keys(t).length&&n){if(n.indexOf(".")===-1)return t[n];{const r=n.split(".");let s=t;for(let o=0,c=r.length;o<c;++o){if(t==null)return null;s=s[r[o]]}return s}}else return null},isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},findIndexInList(t,n){let r=-1;if(n){for(let s=0;s<n.length;s++)if(this.equals(n[s],t)){r=s;break}}return r},contains(t,n){if(t!=null&&n&&n.length){for(const r of n)if(this.equals(t,r))return!0}return!1},isEmpty(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0},isNotEmpty(t){return!this.isEmpty(t)},pickBy(t,n){return Object.fromEntries(Object.entries(t).filter(([r])=>n(r)))},removeFromList(t,n){const r=this.findIndexInList(t,n);return r>-1?n.filter((s,o)=>o!==r):n},isString(t){return typeof t=="string"||t instanceof String},propsToObject(t){return Object.keys(t).reduce((n,r)=>{var s,o,c,a,i;return this.isFunction(t[r])?n[r]=t[r]():Array.isArray(t[r])?n[r]=t[r][0]():(s=t[r])!=null&&s.type&&(Array.isArray(t[r].type)?n[r]=((o=t[r])==null?void 0:o.default)||((c=t[r])==null?void 0:c.type[0]()):n[r]=((a=t[r])==null?void 0:a.default)||((i=t[r])==null?void 0:i.type())),n},{})},filterArray(t,n,r){return t.filter(s=>n.some(o=>typeof o=="string"?s[r]==o:this.equals(s[r],o[r])))},kebabCase(t){var n,r;if(t)return(r=(n=t.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:r.toLowerCase()}},j={valid:Boolean,validLabel:[String,Array]},H={error:Boolean,errorLabel:[String,Array]},q={loading:Boolean,loadingLabel:String},U={hintLabel:{type:String,default:""}},N={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"},S={TYPES:N,ICON_POSITIONS:b,TYPES_ICON:{PASSWORD_ON:"eye-on",PASSWORD_OFF:"eye-off",DATE:"calendar",TIME:"time",COLOR:"color",SEARCH:"search"}},W=["update:modelValue","focus","blur"],L={...j,...H,...U,...q,modelValue:null,type:{type:String,default:N.TEXT,validator:t=>Object.values(N).includes(t)},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:t=>Object.values(b).includes(t),default:b.RIGHT},floating:Boolean,debounce:Number},z={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 B(t,n){const r={[`${t}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(n).reduce((o,c)=>{const a=e.unref(n[c])||!1;if(!a)return o;if(c==="modifiers"){const i=Array.isArray(a)?a:[a];return{...o,...i.reduce((p,m)=>({...p,[`${t}--${E.kebabCase(m)}`]:!0}),{})}}else return{...o,[`${t}--${E.kebabCase(c)}`]:a}},r)||{})}}const w=e.defineComponent({__name:"VvIcon",props:z,setup(t){const n=t,r=e.ref(!0),{modifiers:s}=e.toRefs(n),o=e.inject("ds"),{bemCssClasses:c}=B("vv-icon",{modifiers:s}),a=e.computed(()=>n.provider||(o==null?void 0:o.provider)),i=e.computed(()=>{const l=n.name||"",u=`@${a.value}:${n.prefix}:${n.name}`;return P.iconExists(l)?l:P.iconExists(u)?u:(o==null?void 0:o.iconsCollections.find(d=>{const y=`@${a.value}:${d.prefix}:${l}`;if(P.iconExists(y))return y}))||l});function p(l){let u=null;if(typeof window>"u"){const{JSDOM:T}=require("jsdom");u=new T().window}return(u?new u.DOMParser:new window.DOMParser).parseFromString(l,"text/html").querySelector("svg")}function m(l){const u=p(l),d=(u==null?void 0:u.innerHTML.trim())||"";u&&d&&P.addIcon(`@${a.value}:${n.prefix}:${n.name}`,{body:d,height:u.viewBox.baseVal.height,width:u.viewBox.baseVal.width})}return o&&(n.src?(r.value=!1,o.fetchIcon(n.src).then(l=>{l&&(m(l),r.value=!0)}).catch(l=>{throw new Error(`During fetch icon: ${l==null?void 0:l.message}`)})):n.svg&&m(n.svg)),(l,u)=>r.value?(e.openBlock(),e.createBlock(e.unref(P.Icon),e.mergeProps({key:0,class:e.unref(c)},{...l.$props,provider:e.unref(a),icon:e.unref(i)}),null,16,["class"])):e.createCommentVNode("",!0)}});function Z(t){return Array.isArray(t)?t.filter(n=>E.isString(n)).reduce((n,r)=>n.length>0?n+`
|
|
2
|
-
`+r:r,""):t}function G(t,n){return{name:"HintSlot",setup(){const r=e.toRefs(t),{error:s,valid:o,hint:c,loading:a}=n,{hintLabel:i,modelValue:p,valid:m,validLabel:l,error:u,errorLabel:d}=r,y=E.resolveFieldData(r,"loading"),_=E.resolveFieldData(r,"loadingLabel"),T=e.computed(()=>u.value?!!(u.value&&s||(d==null?void 0:d.value)&&Array.isArray(d.value)&&d.value.length>0||(d==null?void 0:d.value)&&E.isNotEmpty(d.value)):!1),A=e.computed(()=>!!(i&&i.value||c||o||l&&l.value||T.value||(y==null?void 0:y.value)&&a||(y==null?void 0:y.value)&&(_==null?void 0:_.value))),C=e.computed(()=>Array.isArray(d==null?void 0:d.value)?Z((d==null?void 0:d.value)||""):d==null?void 0:d.value),O=e.computed(()=>{const I={modelValue:p,error:u,valid:m};return u!=null&&u.value?(s==null?void 0:s(I))||(C==null?void 0:C.value)||(i==null?void 0:i.value):m!=null&&m.value?(o==null?void 0:o(I))||(l==null?void 0:l.value)||(i==null?void 0:i.value):y!=null&&y.value?(a==null?void 0:a(I))||(_==null?void 0:_.value)||(i==null?void 0:i.value):(c==null?void 0:c(I))||(i==null?void 0:i.value)||(i==null?void 0:i.value)});return{hasHint:A,hintContent:O}},render(){if(this.hasHint)return e.h("span",null,this.hintContent)}}}function X(t){const{type:n,disabled:r,readonly:s}=t,o=e.ref(!0),c=e.computed(()=>n.value===S.TYPES.PASSWORD),a=e.computed(()=>!o.value),i=e.computed(()=>a.value?S.TYPES_ICON.PASSWORD_OFF:S.TYPES_ICON.PASSWORD_ON);function p(){!r.value&&!s.value&&(o.value=!o.value)}return{isPassword:c,isPasswordVisible:a,passwordButtonIcon:i,toggleShowHidePassword:p}}function J(t,n){const{type:r,disabled:s,readonly:o,inputTemplateRef:c}=n,a=e.computed(()=>r.value===S.TYPES.NUMBER);function i(){!s.value&&!o.value&&(c.value.stepUp(),t.value=e.unref(c.value).value)}function p(){!s.value&&!o.value&&(c.value.stepDown(),t.value=e.unref(c.value).value)}return{isNumber:a,stepUp:i,stepDown:p}}function K(t,n){const{icon:r,iconPosition:s}=t,o=e.computed(()=>!!(r.value&&s.value==="left"||n.iconLeft)),c=e.computed(()=>!!(r.value&&s.value==="right"||n.iconRight)),a=e.computed(()=>!!(r.value&&s.value==="top"||n.iconTop)),i=e.computed(()=>!!(r.value&&s.value==="bottom"||n.iconBottom));return{icon:r,iconPosition:s,hasIconLeft:o,hasIconRight:c,hasIconTop:a,hasIconBottom:i}}function Q(t,n){const{focused:r}=D.useFocus(t);return e.watch(r,s=>{n(s?"focus":"blur",t.value)}),{focused:r}}const ee=["for"],te={class:"vv-input-text__wrapper"},ne={key:0,class:"vv-input-text__actions-group"},re=["disabled"],oe={key:1,class:"vv-input-text__actions-group"},se=["disabled"],ie=["disabled"],ce={inheritAttrs:!1};return e.defineComponent({...ce,__name:"VvInputText",props:L,emits:W,setup(t,{emit:n}){const r=t,s=e.useSlots(),o=e.useAttrs(),c=e.ref(),a=e.ref(r.modelValue),{disabled:i,readonly:p,type:m,icon:l,iconPosition:u,valid:d,error:y,loading:_,floating:T,label:A,modelValue:C}=e.toRefs(r),O=e.computed(()=>i.value||p.value),I=D.refDebounced(a,r.debounce||0);e.watch(I,g=>n("update:modelValue",g));const ae={icon:l,iconPosition:u},le={iconLeft:s["icon-left"],iconRight:s["icon-right"]},{hasIconLeft:v,hasIconRight:ue}=K(ae,le),x=e.computed(()=>{if(ue.value)return r.icon;switch(r.type){case S.TYPES.PASSWORD:return pe.value;case S.TYPES.COLOR:return S.TYPES_ICON.COLOR;case S.TYPES.DATE:case S.TYPES.DATETIME_LOCAL:return S.TYPES_ICON.DATE;case S.TYPES.TIME:return S.TYPES_ICON.TIME;case S.TYPES.SEARCH:return S.TYPES_ICON.SEARCH;default:return""}}),de={type:m,disabled:i,readonly:p},{isPassword:k,isPasswordVisible:fe,passwordButtonIcon:pe,toggleShowHidePassword:R}=X(de),me={disabled:i,readonly:p,type:m,inputTemplateRef:c},{isNumber:ye,stepUp:ge,stepDown:he}=J(a,me),{focused:V}=Q(c,n),{bemCssClasses:Se}=B("vv-input-text",{readonly:p,valid:d,invalid:y,loading:_,iconLeft:v,iconRight:e.computed(()=>E.isNotEmpty(x.value)),floating:e.computed(()=>T.value&&E.isNotEmpty(A==null?void 0:A.value)),dirty:e.computed(()=>E.isNotEmpty(C))}),Ee=e.computed(()=>{const{class:g}=o;return{class:g,...Se.value}}),Pe=e.computed(()=>{const{style:g}=o,f=E.pickBy(o,h=>h.startsWith("data-"));return{style:g,...f}}),F=e.computed(()=>{const{id:g,name:f,type:h,autocomplete:Ae,minlength:Ie,maxlength:Te,min:Ce,max:Oe,step:Ne,disabled:be,readonly:we,floating:xe,placeholder:Y}=r,De=g||f,Be=k.value&&fe.value?"text":h,ve=xe&&E.isEmpty(Y)?" ":Y;return{id:De,type:Be,placeholder:ve,name:f,autocomplete:Ae,disabled:be,readonly:we,minlength:Ie,maxlength:Te,min:Ce,max:Oe,step:Ne,...$.value}}),$=e.computed(()=>{const{name:g}=o,f=E.pickBy(o,h=>h.startsWith("aria-"));return{"aria-label":g,"aria-describedby":`${g}-hint`,"aria-invalid":r.error,...f}}),M=e.computed(()=>{const{modelValue:g,valid:f,error:h}=r;return{valid:f,error:h,modelValue:g}}),_e=G(r,s);return e.onMounted(()=>{r.autofocus&&(V.value=!0),console.log("Focused",V.value)}),(g,f)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(e.unref(Pe),{class:e.unref(Ee)}),[e.unref(A)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(F).id},e.toDisplayString(e.unref(A)),9,ee)):e.createCommentVNode("",!0),e.createElementVNode("div",te,[e.unref(v)?e.renderSlot(g.$slots,"icon-left",e.normalizeProps(e.mergeProps({key:0},e.unref(M))),()=>[e.createVNode(w,{class:"vv-input-text__icon-left",name:e.unref(l)},null,8,["name"])]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({ref_key:"input",ref:c},e.unref(F),{"onUpdate:modelValue":f[0]||(f[0]=h=>a.value=h),onInput:f[1]||(f[1]=h=>n("input",h))}),null,16),[[e.vModelDynamic,a.value]]),e.renderSlot(g.$slots,"icon-right",e.normalizeProps(e.guardReactiveProps(e.unref(M))),()=>[e.unref(k)?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("button",{class:"vv-input-text__action",disabled:e.unref(O),onClick:f[2]||(f[2]=e.withModifiers((...h)=>e.unref(R)&&e.unref(R)(...h),["prevent"]))},[e.createVNode(w,{name:e.unref(x)},null,8,["name"])],8,re)])):e.unref(ye)?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("button",{type:"button",class:"vv-input-text__action-chevron vv-input-text__action-chevron-up",disabled:e.unref(O),onClick:f[3]||(f[3]=e.withModifiers(h=>e.unref(ge)(),["prevent"]))},null,8,se),e.createElementVNode("button",{type:"button",class:"vv-input-text__action-chevron",disabled:e.unref(O),onClick:f[4]||(f[4]=e.withModifiers(h=>e.unref(he)(),["prevent"]))},null,8,ie)])):(e.openBlock(),e.createBlock(w,{key:2,name:e.unref(x)},null,8,["name"]))])]),e.createVNode(e.unref(_e),{id:e.unref($)["aria-describedby"],class:"vv-input-text__hint"},null,8,["id"])],16))}})});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
export interface Option {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}
|
|
5
|
-
export declare const VvNativeSelectProps: {
|
|
6
|
-
/**
|
|
7
|
-
* modelValue can be an Object, a String or an Array of Object/String
|
|
8
|
-
*/
|
|
9
|
-
modelValue: {
|
|
10
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
11
|
-
required: boolean;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Select input label
|
|
15
|
-
*/
|
|
16
|
-
label: StringConstructor;
|
|
17
|
-
/**
|
|
18
|
-
* Select input placeholder
|
|
19
|
-
*/
|
|
20
|
-
placeholder: StringConstructor;
|
|
21
|
-
/**
|
|
22
|
-
* Select options, can be an Array of string or an array of objects
|
|
23
|
-
*/
|
|
24
|
-
options: {
|
|
25
|
-
type: PropType<(string | Option)[]>;
|
|
26
|
-
required: boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Use objects as modelValue (object or object[])
|
|
30
|
-
*/
|
|
31
|
-
useObject: BooleanConstructor;
|
|
32
|
-
/**
|
|
33
|
-
* Used when options are objects: key to use for option label
|
|
34
|
-
*/
|
|
35
|
-
labelKey: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Used when options are objects: key to use for option label
|
|
41
|
-
*/
|
|
42
|
-
valueKey: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
default: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Icon name of icon in left position
|
|
48
|
-
*/
|
|
49
|
-
iconLeft: StringConstructor;
|
|
50
|
-
/**
|
|
51
|
-
* Icon name of icon in right position
|
|
52
|
-
*/
|
|
53
|
-
iconRight: StringConstructor;
|
|
54
|
-
/**
|
|
55
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-native-select--'
|
|
56
|
-
*/
|
|
57
|
-
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
58
|
-
readonly: BooleanConstructor;
|
|
59
|
-
disabled: BooleanConstructor;
|
|
60
|
-
loading: BooleanConstructor;
|
|
61
|
-
loadingLabel: StringConstructor;
|
|
62
|
-
hintLabel: {
|
|
63
|
-
type: StringConstructor;
|
|
64
|
-
default: string;
|
|
65
|
-
};
|
|
66
|
-
error: BooleanConstructor;
|
|
67
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
68
|
-
valid: BooleanConstructor;
|
|
69
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
70
|
-
};
|