@volverjs/ui-vue 0.0.1-beta.8 → 0.0.2
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 +108 -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 +439 -0
- package/dist/components/VvButton/VvButton.umd.js +1 -0
- package/dist/components/VvButton/VvButton.vue.d.ts +100 -199
- package/dist/components/VvButton/index.d.ts +132 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +107 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +92 -186
- 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 +775 -0
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -0
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +175 -0
- package/dist/components/VvCombobox/index.d.ts +108 -0
- 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 +227 -0
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -0
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +59 -146
- package/dist/components/VvDropdown/index.d.ts +49 -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 +772 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +211 -288
- 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 +434 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -0
- package/dist/components/VvSelect/VvSelect.vue.d.ts +125 -263
- package/dist/components/VvSelect/index.d.ts +89 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +471 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -0
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -321
- 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 +2379 -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 +2420 -0
- package/dist/index.umd.js +1 -0
- package/dist/props/index.d.ts +328 -30
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +42 -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 +198 -0
- package/dist/stories/Button/Button.test.d.ts +1 -10
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +47 -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 +286 -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 +85 -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 +284 -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 +842 -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 +199 -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 +189 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +76 -48
- package/src/components/VvButtonGroup/index.ts +16 -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 +261 -0
- package/src/components/VvCombobox/index.ts +88 -0
- package/src/components/VvDialog/VvDialog.vue +69 -67
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +115 -114
- package/src/components/VvDropdown/index.ts +35 -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 +307 -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 +187 -186
- package/src/components/VvSelect/index.ts +71 -0
- package/src/components/VvTextarea/VvTextarea.vue +188 -174
- 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 +23 -35
- 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 +204 -36
- package/src/resolvers/unplugin.ts +112 -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 +145 -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 +33 -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/ButtonGroupSlots.stories.mdx +37 -0
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +52 -110
- 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 +127 -0
- package/src/stories/Combobox/Combobox.stories.mdx +204 -0
- package/src/stories/Combobox/Combobox.test.ts +103 -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 +51 -0
- package/src/stories/Dropdown/Dropdown.stories.mdx +102 -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 +86 -0
- package/src/stories/Select/Select.stories.mdx +173 -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 +457 -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/VvSelect.d.ts +0 -99
- 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
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
import { computed as m, unref as l, defineComponent as z, ref as F, toRefs as L, inject as ee, openBlock as $, createBlock as te, mergeProps as w, createCommentVNode as _, h as re, watch as Z, useSlots as ne, useAttrs as oe, onMounted as se, createElementBlock as E, toDisplayString as q, createElementVNode as V, renderSlot as D, normalizeProps as R, createVNode as P, withDirectives as ie, isRef as ae, vModelText as le, createTextVNode as ue } from "vue";
|
|
2
|
-
import { iconExists as O, Icon as ce, addIcon as fe } from "@iconify/vue";
|
|
3
|
-
import { toReactive as de, useFocus as me, refDebounced as pe, isString as M } from "@vueuse/core";
|
|
4
|
-
const y = {
|
|
5
|
-
equals(e, r, t) {
|
|
6
|
-
return t ? this.resolveFieldData(e, t) === this.resolveFieldData(r, t) : this.deepEquals(e, r);
|
|
7
|
-
},
|
|
8
|
-
deepEquals(e, r) {
|
|
9
|
-
if (e === r)
|
|
10
|
-
return !0;
|
|
11
|
-
if (e && r && typeof e == "object" && typeof r == "object") {
|
|
12
|
-
const t = Array.isArray(e), o = Array.isArray(r);
|
|
13
|
-
let n, s, i;
|
|
14
|
-
if (t && o) {
|
|
15
|
-
if (s = e.length, s != r.length)
|
|
16
|
-
return !1;
|
|
17
|
-
for (n = s; n-- !== 0; )
|
|
18
|
-
if (!this.deepEquals(e[n], r[n]))
|
|
19
|
-
return !1;
|
|
20
|
-
return !0;
|
|
21
|
-
}
|
|
22
|
-
if (t != o)
|
|
23
|
-
return !1;
|
|
24
|
-
const d = e instanceof Date, a = r instanceof Date;
|
|
25
|
-
if (d != a)
|
|
26
|
-
return !1;
|
|
27
|
-
if (d && a)
|
|
28
|
-
return e.getTime() == r.getTime();
|
|
29
|
-
const h = e instanceof RegExp, u = r instanceof RegExp;
|
|
30
|
-
if (h != u)
|
|
31
|
-
return !1;
|
|
32
|
-
if (h && u)
|
|
33
|
-
return e.toString() == r.toString();
|
|
34
|
-
const c = Object.keys(e);
|
|
35
|
-
if (s = c.length, s !== Object.keys(r).length)
|
|
36
|
-
return !1;
|
|
37
|
-
for (n = s; n-- !== 0; )
|
|
38
|
-
if (!Object.prototype.hasOwnProperty.call(r, c[n]))
|
|
39
|
-
return !1;
|
|
40
|
-
for (n = s; n-- !== 0; )
|
|
41
|
-
if (i = c[n], !this.deepEquals(e[i], r[i]))
|
|
42
|
-
return !1;
|
|
43
|
-
return !0;
|
|
44
|
-
}
|
|
45
|
-
return e !== e && r !== r;
|
|
46
|
-
},
|
|
47
|
-
resolveFieldData(e, r) {
|
|
48
|
-
if (e && Object.keys(e).length && r) {
|
|
49
|
-
if (r.indexOf(".") === -1)
|
|
50
|
-
return e[r];
|
|
51
|
-
{
|
|
52
|
-
const t = r.split(".");
|
|
53
|
-
let o = e;
|
|
54
|
-
for (let n = 0, s = t.length; n < s; ++n) {
|
|
55
|
-
if (e == null)
|
|
56
|
-
return null;
|
|
57
|
-
o = o[t[n]];
|
|
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, r) {
|
|
68
|
-
let t = -1;
|
|
69
|
-
if (r) {
|
|
70
|
-
for (let o = 0; o < r.length; o++)
|
|
71
|
-
if (this.equals(r[o], e)) {
|
|
72
|
-
t = o;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return t;
|
|
77
|
-
},
|
|
78
|
-
contains(e, r) {
|
|
79
|
-
if (e != null && r && r.length) {
|
|
80
|
-
for (const t of r)
|
|
81
|
-
if (this.equals(e, t))
|
|
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, r) {
|
|
93
|
-
return Object.fromEntries(
|
|
94
|
-
Object.entries(e).filter(([t]) => r(t))
|
|
95
|
-
);
|
|
96
|
-
},
|
|
97
|
-
removeFromList(e, r) {
|
|
98
|
-
const t = this.findIndexInList(e, r);
|
|
99
|
-
return t > -1 ? r.filter((o, n) => n !== t) : r;
|
|
100
|
-
},
|
|
101
|
-
isString(e) {
|
|
102
|
-
return typeof e == "string" || e instanceof String;
|
|
103
|
-
},
|
|
104
|
-
propsToObject(e) {
|
|
105
|
-
return Object.keys(e).reduce((r, t) => {
|
|
106
|
-
var o, n, s, i, d;
|
|
107
|
-
return this.isFunction(e[t]) ? r[t] = e[t]() : Array.isArray(e[t]) ? r[t] = e[t][0]() : (o = e[t]) != null && o.type && (Array.isArray(e[t].type) ? r[t] = ((n = e[t]) == null ? void 0 : n.default) || ((s = e[t]) == null ? void 0 : s.type[0]()) : r[t] = ((i = e[t]) == null ? void 0 : i.default) || ((d = e[t]) == null ? void 0 : d.type())), r;
|
|
108
|
-
}, {});
|
|
109
|
-
},
|
|
110
|
-
filterArray(e, r, t) {
|
|
111
|
-
return e.filter((o) => r.some((n) => typeof n == "string" ? o[t] == n : this.equals(
|
|
112
|
-
o[t],
|
|
113
|
-
n[t]
|
|
114
|
-
)));
|
|
115
|
-
},
|
|
116
|
-
kebabCase(e) {
|
|
117
|
-
var r, t;
|
|
118
|
-
if (e)
|
|
119
|
-
return (t = (r = 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 : r.join("-")) == null ? void 0 : t.toLowerCase();
|
|
122
|
-
}
|
|
123
|
-
}, ge = {
|
|
124
|
-
valid: Boolean,
|
|
125
|
-
validLabel: [String, Array]
|
|
126
|
-
}, he = {
|
|
127
|
-
error: Boolean,
|
|
128
|
-
errorLabel: [String, Array]
|
|
129
|
-
}, ye = {
|
|
130
|
-
loading: Boolean,
|
|
131
|
-
loadingLabel: String
|
|
132
|
-
}, ve = {
|
|
133
|
-
modifiers: [String, Array]
|
|
134
|
-
}, be = {
|
|
135
|
-
hintLabel: { type: String, default: "" }
|
|
136
|
-
}, xe = {
|
|
137
|
-
limit: {
|
|
138
|
-
type: [Boolean, String],
|
|
139
|
-
default: !1,
|
|
140
|
-
validator: (e) => [!0, !1, "countdown"].includes(e)
|
|
141
|
-
}
|
|
142
|
-
}, Se = {
|
|
143
|
-
id: String,
|
|
144
|
-
name: { type: String, required: !0 },
|
|
145
|
-
autocomplete: { type: String, default: "off" },
|
|
146
|
-
autofocus: Boolean,
|
|
147
|
-
minlength: Number,
|
|
148
|
-
maxlength: Number,
|
|
149
|
-
label: String,
|
|
150
|
-
placeholder: String,
|
|
151
|
-
required: Boolean,
|
|
152
|
-
disabled: Boolean,
|
|
153
|
-
readonly: Boolean
|
|
154
|
-
}, Ae = {
|
|
155
|
-
debounce: Number
|
|
156
|
-
}, H = {
|
|
157
|
-
LEFT: "left",
|
|
158
|
-
RIGHT: "right"
|
|
159
|
-
}, _e = {
|
|
160
|
-
hard: "hard",
|
|
161
|
-
soft: "soft"
|
|
162
|
-
}, Be = ["update:modelValue", "focus", "blur"], $e = {
|
|
163
|
-
...ge,
|
|
164
|
-
...he,
|
|
165
|
-
...be,
|
|
166
|
-
...ye,
|
|
167
|
-
...ve,
|
|
168
|
-
...xe,
|
|
169
|
-
...Se,
|
|
170
|
-
...Ae,
|
|
171
|
-
modelValue: null,
|
|
172
|
-
cols: { type: Number, default: 50 },
|
|
173
|
-
rows: { type: Number, default: 5 },
|
|
174
|
-
icon: { type: String, default: "" },
|
|
175
|
-
iconPosition: {
|
|
176
|
-
type: String,
|
|
177
|
-
validation: (e) => Object.values(H).includes(e),
|
|
178
|
-
default: H.RIGHT
|
|
179
|
-
},
|
|
180
|
-
floating: Boolean,
|
|
181
|
-
wrap: { type: String, default: _e.soft },
|
|
182
|
-
autoclear: Boolean,
|
|
183
|
-
resizable: Boolean
|
|
184
|
-
}, we = {
|
|
185
|
-
color: String,
|
|
186
|
-
width: {
|
|
187
|
-
type: [String, Number]
|
|
188
|
-
},
|
|
189
|
-
height: {
|
|
190
|
-
type: [String, Number]
|
|
191
|
-
},
|
|
192
|
-
name: {
|
|
193
|
-
type: String,
|
|
194
|
-
required: !0
|
|
195
|
-
},
|
|
196
|
-
provider: {
|
|
197
|
-
type: String
|
|
198
|
-
},
|
|
199
|
-
prefix: {
|
|
200
|
-
type: String,
|
|
201
|
-
default: "normal"
|
|
202
|
-
},
|
|
203
|
-
src: String,
|
|
204
|
-
horizontalFlip: Boolean,
|
|
205
|
-
verticalFlip: Boolean,
|
|
206
|
-
flip: String,
|
|
207
|
-
mode: String,
|
|
208
|
-
inline: Boolean,
|
|
209
|
-
rotate: [Number, String],
|
|
210
|
-
onLoad: Function,
|
|
211
|
-
svg: String,
|
|
212
|
-
modifiers: {
|
|
213
|
-
type: [String, Array]
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
function Ce(e, r) {
|
|
217
|
-
const t = { [`${e}`]: !0 };
|
|
218
|
-
return {
|
|
219
|
-
bemCssClasses: m(() => Object.keys(r).reduce((n, s) => {
|
|
220
|
-
const i = l(r[s]) || !1;
|
|
221
|
-
if (!i)
|
|
222
|
-
return n;
|
|
223
|
-
if (s === "modifiers") {
|
|
224
|
-
const d = Array.isArray(i) ? i : [i];
|
|
225
|
-
return {
|
|
226
|
-
...n,
|
|
227
|
-
...d.reduce(
|
|
228
|
-
(a, h) => ({
|
|
229
|
-
...a,
|
|
230
|
-
[`${e}--${y.kebabCase(
|
|
231
|
-
h
|
|
232
|
-
)}`]: !0
|
|
233
|
-
}),
|
|
234
|
-
{}
|
|
235
|
-
)
|
|
236
|
-
};
|
|
237
|
-
} else
|
|
238
|
-
return {
|
|
239
|
-
...n,
|
|
240
|
-
[`${e}--${y.kebabCase(s)}`]: i
|
|
241
|
-
};
|
|
242
|
-
}, t) || {})
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function Ie(e, r) {
|
|
246
|
-
const t = { [`${e}`]: !0 };
|
|
247
|
-
return Object.keys(r).reduce((o, n) => {
|
|
248
|
-
const s = l(r[n]) || !1;
|
|
249
|
-
if (!s)
|
|
250
|
-
return o;
|
|
251
|
-
if (n === "modifiers") {
|
|
252
|
-
const i = Array.isArray(s) ? s : [s];
|
|
253
|
-
return {
|
|
254
|
-
...o,
|
|
255
|
-
...i.reduce(
|
|
256
|
-
(d, a) => ({
|
|
257
|
-
...d,
|
|
258
|
-
[`${e}--${y.kebabCase(
|
|
259
|
-
a
|
|
260
|
-
)}`]: !0
|
|
261
|
-
}),
|
|
262
|
-
{}
|
|
263
|
-
)
|
|
264
|
-
};
|
|
265
|
-
} else
|
|
266
|
-
return {
|
|
267
|
-
...o,
|
|
268
|
-
[`${e}--${y.kebabCase(n)}`]: s
|
|
269
|
-
};
|
|
270
|
-
}, t) || {};
|
|
271
|
-
}
|
|
272
|
-
const N = /* @__PURE__ */ z({
|
|
273
|
-
__name: "VvIcon",
|
|
274
|
-
props: we,
|
|
275
|
-
setup(e) {
|
|
276
|
-
const r = e, t = F(!0), { modifiers: o } = L(r), n = ee("ds"), { bemCssClasses: s } = Ce("vv-icon", {
|
|
277
|
-
modifiers: o
|
|
278
|
-
}), i = m(() => r.provider || (n == null ? void 0 : n.provider)), d = m(() => {
|
|
279
|
-
const u = r.name || "", c = `@${i.value}:${r.prefix}:${r.name}`;
|
|
280
|
-
return O(u) ? u : O(c) ? c : (n == null ? void 0 : n.iconsCollections.find((p) => {
|
|
281
|
-
const f = `@${i.value}:${p.prefix}:${u}`;
|
|
282
|
-
if (O(f))
|
|
283
|
-
return f;
|
|
284
|
-
})) || u;
|
|
285
|
-
});
|
|
286
|
-
function a(u) {
|
|
287
|
-
let c = null;
|
|
288
|
-
if (typeof window > "u") {
|
|
289
|
-
const { JSDOM: v } = require("jsdom");
|
|
290
|
-
c = new v().window;
|
|
291
|
-
}
|
|
292
|
-
return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(u, "text/html").querySelector("svg");
|
|
293
|
-
}
|
|
294
|
-
function h(u) {
|
|
295
|
-
const c = a(u), p = (c == null ? void 0 : c.innerHTML.trim()) || "";
|
|
296
|
-
c && p && fe(`@${i.value}:${r.prefix}:${r.name}`, {
|
|
297
|
-
body: p,
|
|
298
|
-
height: c.viewBox.baseVal.height,
|
|
299
|
-
width: c.viewBox.baseVal.width
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
return n && (r.src ? (t.value = !1, n.fetchIcon(r.src).then((u) => {
|
|
303
|
-
u && (h(u), t.value = !0);
|
|
304
|
-
}).catch((u) => {
|
|
305
|
-
throw new Error(`During fetch icon: ${u == null ? void 0 : u.message}`);
|
|
306
|
-
})) : r.svg && h(r.svg)), (u, c) => t.value ? ($(), te(l(ce), w({
|
|
307
|
-
key: 0,
|
|
308
|
-
class: l(s)
|
|
309
|
-
}, {
|
|
310
|
-
...u.$props,
|
|
311
|
-
provider: l(i),
|
|
312
|
-
icon: l(d)
|
|
313
|
-
}), null, 16, ["class"])) : _("", !0);
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
function k(e) {
|
|
317
|
-
return Array.isArray(e) ? e.filter((r) => y.isString(r)).reduce((r, t) => r.length > 0 ? r + `
|
|
318
|
-
` + t : t, "") : e;
|
|
319
|
-
}
|
|
320
|
-
function Ee(e, r) {
|
|
321
|
-
return {
|
|
322
|
-
name: "HintSlot",
|
|
323
|
-
props: {
|
|
324
|
-
params: { type: Object, default: () => {
|
|
325
|
-
} }
|
|
326
|
-
},
|
|
327
|
-
setup(t) {
|
|
328
|
-
const o = L(e), {
|
|
329
|
-
error: n,
|
|
330
|
-
valid: s,
|
|
331
|
-
hint: i,
|
|
332
|
-
loading: d
|
|
333
|
-
} = r, {
|
|
334
|
-
hintLabel: a,
|
|
335
|
-
modelValue: h,
|
|
336
|
-
valid: u,
|
|
337
|
-
validLabel: c,
|
|
338
|
-
error: p,
|
|
339
|
-
errorLabel: f
|
|
340
|
-
} = o, g = y.resolveFieldData(o, "loading"), v = y.resolveFieldData(
|
|
341
|
-
o,
|
|
342
|
-
"loadingLabel"
|
|
343
|
-
), S = m(() => p.value ? !!(p.value && n || (f == null ? void 0 : f.value) && Array.isArray(f.value) && f.value.length > 0 || (f == null ? void 0 : f.value) && y.isNotEmpty(f.value)) : !1), C = m(() => !!(a && a.value || i || s || c && c.value || S.value || (g == null ? void 0 : g.value) && d || (g == null ? void 0 : g.value) && (v == null ? void 0 : v.value))), I = m(() => {
|
|
344
|
-
const A = de({
|
|
345
|
-
hintLabel: a,
|
|
346
|
-
modelValue: h,
|
|
347
|
-
valid: u,
|
|
348
|
-
validLabel: c,
|
|
349
|
-
error: p,
|
|
350
|
-
errorLabel: f,
|
|
351
|
-
loading: g,
|
|
352
|
-
loadingLabel: v,
|
|
353
|
-
...t.params
|
|
354
|
-
});
|
|
355
|
-
return p != null && p.value ? (n == null ? void 0 : n(A)) || k(f == null ? void 0 : f.value) || (a == null ? void 0 : a.value) : u != null && u.value ? (s == null ? void 0 : s(A)) || k(c == null ? void 0 : c.value) || (a == null ? void 0 : a.value) : g != null && g.value ? (d == null ? void 0 : d(A)) || k(v == null ? void 0 : v.value) || (a == null ? void 0 : a.value) : (i == null ? void 0 : i(A)) || k(a == null ? void 0 : a.value) || (a == null ? void 0 : a.value);
|
|
356
|
-
});
|
|
357
|
-
return {
|
|
358
|
-
hasHint: C,
|
|
359
|
-
hintContent: I
|
|
360
|
-
};
|
|
361
|
-
},
|
|
362
|
-
render() {
|
|
363
|
-
if (this.hasHint)
|
|
364
|
-
return re(
|
|
365
|
-
"pre",
|
|
366
|
-
{ style: { "white-space": "pre" } },
|
|
367
|
-
this.hintContent
|
|
368
|
-
);
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
function Pe(e, r, t) {
|
|
373
|
-
const o = m(
|
|
374
|
-
() => !!(e.value && r.value === "left" || t.iconLeft)
|
|
375
|
-
), n = m(
|
|
376
|
-
() => !!(e.value && r.value === "right" || t.iconRight)
|
|
377
|
-
), s = m(
|
|
378
|
-
() => !!(e.value && r.value === "top" || t.iconTop)
|
|
379
|
-
), i = m(
|
|
380
|
-
() => !!(e.value && r.value === "bottom" || t.iconBottom)
|
|
381
|
-
);
|
|
382
|
-
return {
|
|
383
|
-
hasIconLeft: o,
|
|
384
|
-
hasIconRight: n,
|
|
385
|
-
hasIconTop: s,
|
|
386
|
-
hasIconBottom: i
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function ke(e, r) {
|
|
390
|
-
const { focused: t } = me(e);
|
|
391
|
-
return Z(t, (o) => {
|
|
392
|
-
r(o ? "focus" : "blur", e.value);
|
|
393
|
-
}), {
|
|
394
|
-
focused: t
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
function De(e, r, t) {
|
|
398
|
-
const o = F(e == null ? void 0 : e.value), n = pe(
|
|
399
|
-
o,
|
|
400
|
-
r || 0
|
|
401
|
-
);
|
|
402
|
-
return Z(n, (s) => t("update:modelValue", s)), o;
|
|
403
|
-
}
|
|
404
|
-
function Oe(e, r) {
|
|
405
|
-
const t = m(() => {
|
|
406
|
-
const s = l(e);
|
|
407
|
-
return M(s) ? s.length : 0;
|
|
408
|
-
}), o = m(() => {
|
|
409
|
-
const s = l(e) || "";
|
|
410
|
-
return !M(s) || r.mode === !1 ? 0 : r.mode === !0 ? s.length : l(r.upperLimit) - s.length;
|
|
411
|
-
}), n = m(() => r.mode === !1 ? "" : r.mode === !0 && r.upperLimit && r.upperLimit > 0 ? `${o.value}/${l(r.upperLimit)}` : o.value);
|
|
412
|
-
return {
|
|
413
|
-
textLength: t,
|
|
414
|
-
textLimitLength: o,
|
|
415
|
-
formattedTextLimitLength: n
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
const Ne = ["for"], Fe = { class: "vv-textarea__wrapper" }, Le = {
|
|
419
|
-
key: 3,
|
|
420
|
-
class: "vv-textarea__limit"
|
|
421
|
-
}, je = {
|
|
422
|
-
inheritAttrs: !1
|
|
423
|
-
}, Re = /* @__PURE__ */ z({
|
|
424
|
-
...je,
|
|
425
|
-
__name: "VvTextarea",
|
|
426
|
-
props: $e,
|
|
427
|
-
emits: Be,
|
|
428
|
-
setup(e, { emit: r }) {
|
|
429
|
-
const t = e, o = ne(), n = oe(), s = F(), { icon: i, iconPosition: d, label: a, modelValue: h, autoclear: u, limit: c } = L(t), p = t.id || t.name, f = `${t.name}-label`, g = `${t.name}-hint`, v = m(
|
|
430
|
-
() => t.floating && y.isEmpty(t.placeholder) ? " " : t.placeholder
|
|
431
|
-
), S = De(h, t.debounce, r), { hasIconLeft: C, hasIconRight: I } = Pe(i, d, {
|
|
432
|
-
iconLeft: o["icon-left"],
|
|
433
|
-
iconRight: o["icon-right"]
|
|
434
|
-
}), { focused: A } = ke(s, r), { textLength: j, formattedTextLimitLength: W } = Oe(S, {
|
|
435
|
-
mode: t.limit,
|
|
436
|
-
upperLimit: t.maxlength || 0
|
|
437
|
-
}), G = m(() => [
|
|
438
|
-
Ie("vv-textarea", {
|
|
439
|
-
modifiers: t.modifiers,
|
|
440
|
-
readonly: t.readonly,
|
|
441
|
-
valid: t.valid,
|
|
442
|
-
invalid: t.error,
|
|
443
|
-
loading: t.loading,
|
|
444
|
-
iconLeft: C,
|
|
445
|
-
iconRight: I,
|
|
446
|
-
floating: t.floating && y.isNotEmpty(t.label),
|
|
447
|
-
dirty: y.isNotEmpty(h == null ? void 0 : h.value),
|
|
448
|
-
resizable: t.resizable
|
|
449
|
-
}),
|
|
450
|
-
n.class
|
|
451
|
-
]), U = m(() => {
|
|
452
|
-
const x = y.pickBy(
|
|
453
|
-
n,
|
|
454
|
-
(b) => b.startsWith("data-")
|
|
455
|
-
);
|
|
456
|
-
return {
|
|
457
|
-
style: n.style,
|
|
458
|
-
...x
|
|
459
|
-
};
|
|
460
|
-
}), J = m(() => {
|
|
461
|
-
const x = y.pickBy(
|
|
462
|
-
n,
|
|
463
|
-
(b) => b.startsWith("aria-")
|
|
464
|
-
);
|
|
465
|
-
return {
|
|
466
|
-
id: p,
|
|
467
|
-
placeholder: v.value,
|
|
468
|
-
name: t.name,
|
|
469
|
-
autocomplete: t.autocomplete,
|
|
470
|
-
disabled: t.disabled,
|
|
471
|
-
readonly: t.readonly,
|
|
472
|
-
minlength: t.minlength,
|
|
473
|
-
maxlength: t.maxlength,
|
|
474
|
-
cols: t.cols,
|
|
475
|
-
rows: t.rows,
|
|
476
|
-
required: t.required,
|
|
477
|
-
tabindex: n.tabindex,
|
|
478
|
-
"aria-invalid": t.error,
|
|
479
|
-
"aria-valid": !t.valid,
|
|
480
|
-
"aria-labeledby": f,
|
|
481
|
-
"aria-describedby": g,
|
|
482
|
-
"aria-errormessage": g,
|
|
483
|
-
...x
|
|
484
|
-
};
|
|
485
|
-
}), T = m(() => {
|
|
486
|
-
const { modelValue: x, valid: b, error: B, maxlength: X, hintLabel: Y } = t;
|
|
487
|
-
return {
|
|
488
|
-
valid: b,
|
|
489
|
-
error: B,
|
|
490
|
-
modelValue: x,
|
|
491
|
-
hintLabel: Y,
|
|
492
|
-
maxlength: X,
|
|
493
|
-
textLength: j
|
|
494
|
-
};
|
|
495
|
-
}), K = Ee(t, o);
|
|
496
|
-
function Q() {
|
|
497
|
-
S.value = "";
|
|
498
|
-
}
|
|
499
|
-
return se(() => {
|
|
500
|
-
t.autofocus && (A.value = !0), console.log("Focused", A.value);
|
|
501
|
-
}), (x, b) => ($(), E("div", w(l(U), { class: l(G) }), [
|
|
502
|
-
l(a) ? ($(), E("label", {
|
|
503
|
-
key: 0,
|
|
504
|
-
id: f,
|
|
505
|
-
for: l(p)
|
|
506
|
-
}, q(l(a)), 9, Ne)) : _("", !0),
|
|
507
|
-
V("div", Fe, [
|
|
508
|
-
l(C) ? D(x.$slots, "icon-left", R(w({ key: 0 }, l(T))), () => [
|
|
509
|
-
P(N, {
|
|
510
|
-
class: "vv-textarea__icon-left",
|
|
511
|
-
name: l(i)
|
|
512
|
-
}, null, 8, ["name"])
|
|
513
|
-
]) : _("", !0),
|
|
514
|
-
ie(V("textarea", w({
|
|
515
|
-
ref_key: "input",
|
|
516
|
-
ref: s,
|
|
517
|
-
"onUpdate:modelValue": b[0] || (b[0] = (B) => ae(S) ? S.value = B : null)
|
|
518
|
-
}, l(J), {
|
|
519
|
-
onInput: b[1] || (b[1] = (B) => r("input", B))
|
|
520
|
-
}), null, 16), [
|
|
521
|
-
[le, l(S)]
|
|
522
|
-
]),
|
|
523
|
-
l(u) && l(j) > 0 ? ($(), E("button", {
|
|
524
|
-
key: 1,
|
|
525
|
-
class: "vv-button vv-button--ghost",
|
|
526
|
-
onClick: Q
|
|
527
|
-
}, [
|
|
528
|
-
P(N, { name: "clear-field" })
|
|
529
|
-
])) : _("", !0),
|
|
530
|
-
l(I) ? D(x.$slots, "icon-right", R(w({ key: 2 }, l(T))), () => [
|
|
531
|
-
P(N, { name: l(i) }, null, 8, ["name"])
|
|
532
|
-
]) : _("", !0),
|
|
533
|
-
l(c) ? ($(), E("span", Le, [
|
|
534
|
-
D(x.$slots, "limit", {}, () => [
|
|
535
|
-
ue(q(l(W)), 1)
|
|
536
|
-
])
|
|
537
|
-
])) : _("", !0)
|
|
538
|
-
]),
|
|
539
|
-
P(l(K), {
|
|
540
|
-
id: g,
|
|
541
|
-
class: "vv-textarea__hint"
|
|
542
|
-
})
|
|
543
|
-
], 16));
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
export {
|
|
547
|
-
Re as default
|
|
548
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(e,S){typeof exports=="object"&&typeof module<"u"?module.exports=S(require("vue"),require("@iconify/vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@vueuse/core"],S):(e=typeof globalThis<"u"?globalThis:e||self,e.VvTextarea=S(e.vue,e.vue$1,e.core))})(this,function(e,S,C){"use strict";const y={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,i,a;if(r&&s){if(i=t.length,i!=n.length)return!1;for(o=i;o--!==0;)if(!this.deepEquals(t[o],n[o]))return!1;return!0}if(r!=s)return!1;const d=t instanceof Date,l=n instanceof Date;if(d!=l)return!1;if(d&&l)return t.getTime()==n.getTime();const g=t instanceof RegExp,c=n instanceof RegExp;if(g!=c)return!1;if(g&&c)return t.toString()==n.toString();const u=Object.keys(t);if(i=u.length,i!==Object.keys(n).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,u[o]))return!1;for(o=i;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,i=r.length;o<i;++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,i,a,d;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)||((i=t[r])==null?void 0:i.type[0]()):n[r]=((a=t[r])==null?void 0:a.default)||((d=t[r])==null?void 0:d.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()}},D={valid:Boolean,validLabel:[String,Array]},V={error:Boolean,errorLabel:[String,Array]},O={loading:Boolean,loadingLabel:String},T={modifiers:[String,Array]},q={hintLabel:{type:String,default:""}},F={limit:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"countdown"].includes(t)}},L={id:String,name:{type:String,required:!0},autocomplete:{type:String,default:"off"},autofocus:Boolean,minlength:Number,maxlength:Number,label:String,placeholder:String,required:Boolean,disabled:Boolean,readonly:Boolean},j={debounce:Number},N={LEFT:"left",RIGHT:"right"},R={hard:"hard",soft:"soft"},M=["update:modelValue","focus","blur"],H={...D,...V,...q,...O,...T,...F,...L,...j,modelValue:null,cols:{type:Number,default:50},rows:{type:Number,default:5},icon:{type:String,default:""},iconPosition:{type:String,validation:t=>Object.values(N).includes(t),default:N.RIGHT},floating:Boolean,wrap:{type:String,default:R.soft},autoclear:Boolean,resizable:Boolean},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 Z(t,n){const r={[`${t}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(n).reduce((o,i)=>{const a=e.unref(n[i])||!1;if(!a)return o;if(i==="modifiers"){const d=Array.isArray(a)?a:[a];return{...o,...d.reduce((l,g)=>({...l,[`${t}--${y.kebabCase(g)}`]:!0}),{})}}else return{...o,[`${t}--${y.kebabCase(i)}`]:a}},r)||{})}}function W(t,n){const r={[`${t}`]:!0};return Object.keys(n).reduce((s,o)=>{const i=e.unref(n[o])||!1;if(!i)return s;if(o==="modifiers"){const a=Array.isArray(i)?i:[i];return{...s,...a.reduce((d,l)=>({...d,[`${t}--${y.kebabCase(l)}`]:!0}),{})}}else return{...s,[`${t}--${y.kebabCase(o)}`]:i}},r)||{}}const P=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:i}=Z("vv-icon",{modifiers:s}),a=e.computed(()=>n.provider||(o==null?void 0:o.provider)),d=e.computed(()=>{const c=n.name||"",u=`@${a.value}:${n.prefix}:${n.name}`;return S.iconExists(c)?c:S.iconExists(u)?u:(o==null?void 0:o.iconsCollections.find(m=>{const f=`@${a.value}:${m.prefix}:${c}`;if(S.iconExists(f))return f}))||c});function l(c){let u=null;if(typeof window>"u"){const{JSDOM:h}=require("jsdom");u=new h().window}return(u?new u.DOMParser:new window.DOMParser).parseFromString(c,"text/html").querySelector("svg")}function g(c){const u=l(c),m=(u==null?void 0:u.innerHTML.trim())||"";u&&m&&S.addIcon(`@${a.value}:${n.prefix}:${n.name}`,{body:m,height:u.viewBox.baseVal.height,width:u.viewBox.baseVal.width})}return o&&(n.src?(r.value=!1,o.fetchIcon(n.src).then(c=>{c&&(g(c),r.value=!0)}).catch(c=>{throw new Error(`During fetch icon: ${c==null?void 0:c.message}`)})):n.svg&&g(n.svg)),(c,u)=>r.value?(e.openBlock(),e.createBlock(e.unref(S.Icon),e.mergeProps({key:0,class:e.unref(i)},{...c.$props,provider:e.unref(a),icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}});function k(t){return Array.isArray(t)?t.filter(n=>y.isString(n)).reduce((n,r)=>n.length>0?n+`
|
|
2
|
-
`+r:r,""):t}function G(t,n){return{name:"HintSlot",props:{params:{type:Object,default:()=>{}}},setup(r){const s=e.toRefs(t),{error:o,valid:i,hint:a,loading:d}=n,{hintLabel:l,modelValue:g,valid:c,validLabel:u,error:m,errorLabel:f}=s,p=y.resolveFieldData(s,"loading"),h=y.resolveFieldData(s,"loadingLabel"),A=e.computed(()=>m.value?!!(m.value&&o||(f==null?void 0:f.value)&&Array.isArray(f.value)&&f.value.length>0||(f==null?void 0:f.value)&&y.isNotEmpty(f.value)):!1),E=e.computed(()=>!!(l&&l.value||a||i||u&&u.value||A.value||(p==null?void 0:p.value)&&d||(p==null?void 0:p.value)&&(h==null?void 0:h.value))),w=e.computed(()=>{const B=C.toReactive({hintLabel:l,modelValue:g,valid:c,validLabel:u,error:m,errorLabel:f,loading:p,loadingLabel:h,...r.params});return m!=null&&m.value?(o==null?void 0:o(B))||k(f==null?void 0:f.value)||(l==null?void 0:l.value):c!=null&&c.value?(i==null?void 0:i(B))||k(u==null?void 0:u.value)||(l==null?void 0:l.value):p!=null&&p.value?(d==null?void 0:d(B))||k(h==null?void 0:h.value)||(l==null?void 0:l.value):(a==null?void 0:a(B))||k(l==null?void 0:l.value)||(l==null?void 0:l.value)});return{hasHint:E,hintContent:w}},render(){if(this.hasHint)return e.h("pre",{style:{"white-space":"pre"}},this.hintContent)}}}function U(t,n,r){const s=e.computed(()=>!!(t.value&&n.value==="left"||r.iconLeft)),o=e.computed(()=>!!(t.value&&n.value==="right"||r.iconRight)),i=e.computed(()=>!!(t.value&&n.value==="top"||r.iconTop)),a=e.computed(()=>!!(t.value&&n.value==="bottom"||r.iconBottom));return{hasIconLeft:s,hasIconRight:o,hasIconTop:i,hasIconBottom:a}}function J(t,n){const{focused:r}=C.useFocus(t);return e.watch(r,s=>{n(s?"focus":"blur",t.value)}),{focused:r}}function K(t,n,r){const s=e.ref(t==null?void 0:t.value),o=C.refDebounced(s,n||0);return e.watch(o,i=>r("update:modelValue",i)),s}function Q(t,n){const r=e.computed(()=>{const i=e.unref(t);return C.isString(i)?i.length:0}),s=e.computed(()=>{const i=e.unref(t)||"";return!C.isString(i)||n.mode===!1?0:n.mode===!0?i.length:e.unref(n.upperLimit)-i.length}),o=e.computed(()=>n.mode===!1?"":n.mode===!0&&n.upperLimit&&n.upperLimit>0?`${s.value}/${e.unref(n.upperLimit)}`:s.value);return{textLength:r,textLimitLength:s,formattedTextLimitLength:o}}const X=["for"],Y={class:"vv-textarea__wrapper"},v={key:3,class:"vv-textarea__limit"},ee={inheritAttrs:!1};return e.defineComponent({...ee,__name:"VvTextarea",props:H,emits:M,setup(t,{emit:n}){const r=t,s=e.useSlots(),o=e.useAttrs(),i=e.ref(),{icon:a,iconPosition:d,label:l,modelValue:g,autoclear:c,limit:u}=e.toRefs(r),m=r.id||r.name,f=`${r.name}-label`,p=`${r.name}-hint`,h=e.computed(()=>r.floating&&y.isEmpty(r.placeholder)?" ":r.placeholder),A=K(g,r.debounce,n),{hasIconLeft:E,hasIconRight:w}=U(a,d,{iconLeft:s["icon-left"],iconRight:s["icon-right"]}),{focused:B}=J(i,n),{textLength:I,formattedTextLimitLength:te}=Q(A,{mode:r.limit,upperLimit:r.maxlength||0}),re=e.computed(()=>[W("vv-textarea",{modifiers:r.modifiers,readonly:r.readonly,valid:r.valid,invalid:r.error,loading:r.loading,iconLeft:E,iconRight:w,floating:r.floating&&y.isNotEmpty(r.label),dirty:y.isNotEmpty(g==null?void 0:g.value),resizable:r.resizable}),o.class]),ne=e.computed(()=>{const b=y.pickBy(o,x=>x.startsWith("data-"));return{style:o.style,...b}}),oe=e.computed(()=>{const b=y.pickBy(o,x=>x.startsWith("aria-"));return{id:m,placeholder:h.value,name:r.name,autocomplete:r.autocomplete,disabled:r.disabled,readonly:r.readonly,minlength:r.minlength,maxlength:r.maxlength,cols:r.cols,rows:r.rows,required:r.required,tabindex:o.tabindex,"aria-invalid":r.error,"aria-valid":!r.valid,"aria-labeledby":f,"aria-describedby":p,"aria-errormessage":p,...b}}),$=e.computed(()=>{const{modelValue:b,valid:x,error:_,maxlength:ae,hintLabel:le}=r;return{valid:x,error:_,modelValue:b,hintLabel:le,maxlength:ae,textLength:I}}),se=G(r,s);function ie(){A.value=""}return e.onMounted(()=>{r.autofocus&&(B.value=!0),console.log("Focused",B.value)}),(b,x)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(e.unref(ne),{class:e.unref(re)}),[e.unref(l)?(e.openBlock(),e.createElementBlock("label",{key:0,id:f,for:e.unref(m)},e.toDisplayString(e.unref(l)),9,X)):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.unref(E)?e.renderSlot(b.$slots,"icon-left",e.normalizeProps(e.mergeProps({key:0},e.unref($))),()=>[e.createVNode(P,{class:"vv-textarea__icon-left",name:e.unref(a)},null,8,["name"])]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({ref_key:"input",ref:i,"onUpdate:modelValue":x[0]||(x[0]=_=>e.isRef(A)?A.value=_:null)},e.unref(oe),{onInput:x[1]||(x[1]=_=>n("input",_))}),null,16),[[e.vModelText,e.unref(A)]]),e.unref(c)&&e.unref(I)>0?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vv-button vv-button--ghost",onClick:ie},[e.createVNode(P,{name:"clear-field"})])):e.createCommentVNode("",!0),e.unref(w)?e.renderSlot(b.$slots,"icon-right",e.normalizeProps(e.mergeProps({key:2},e.unref($))),()=>[e.createVNode(P,{name:e.unref(a)},null,8,["name"])]):e.createCommentVNode("",!0),e.unref(u)?(e.openBlock(),e.createElementBlock("span",v,[e.renderSlot(b.$slots,"limit",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(te)),1)])])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(se),{id:p,class:"vv-textarea__hint"})],16))}})});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
interface useTextOptions {
|
|
3
|
-
mode: string | boolean;
|
|
4
|
-
upperLimit: number;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare function useTextLimit(inputText: Ref<string>, options: useTextOptions): {
|
|
10
|
-
textLength: import("vue").ComputedRef<number>;
|
|
11
|
-
textLimitLength: import("vue").ComputedRef<number>;
|
|
12
|
-
formattedTextLimitLength: import("vue").ComputedRef<string | number>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
new (...args: any[]): {
|
|
3
|
-
$: import("vue").ComponentInternalInstance;
|
|
4
|
-
$data: {};
|
|
5
|
-
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
|
-
$attrs: {
|
|
7
|
-
[x: string]: unknown;
|
|
8
|
-
};
|
|
9
|
-
$refs: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
};
|
|
12
|
-
$slots: Readonly<{
|
|
13
|
-
[name: string]: import("vue").Slot | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
16
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
17
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
18
|
-
$el: any;
|
|
19
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
20
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
23
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
33
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
34
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
35
|
-
};
|
|
36
|
-
$forceUpdate: () => void;
|
|
37
|
-
$nextTick: typeof import("vue").nextTick;
|
|
38
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
-
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
40
|
-
__isFragment?: undefined;
|
|
41
|
-
__isTeleport?: undefined;
|
|
42
|
-
__isSuspense?: undefined;
|
|
43
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
44
|
-
export default _default;
|