@volverjs/ui-vue 0.0.1-beta.12 → 0.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/icons.cjs +73 -0
- package/bin/icons.js +75 -0
- package/dist/Volver.d.ts +15 -2
- package/dist/components/VvAccordion/VvAccordion.es.js +133 -236
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
- package/dist/components/VvAccordion/index.d.ts +46 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +199 -277
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +44 -151
- package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +9 -13
- package/dist/components/VvBadge/VvBadge.es.js +42 -151
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -53
- package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +0 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +55 -168
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +24 -104
- package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +1 -1
- package/dist/components/VvButton/VvButton.es.js +298 -312
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +91 -163
- package/dist/components/VvButton/{VvButton.d.ts → index.d.ts} +46 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +59 -172
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +30 -125
- package/dist/components/VvButtonGroup/{VvButtonGroup.d.ts → index.d.ts} +0 -0
- package/dist/components/VvCard/VvCard.es.js +55 -166
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
- package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +344 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +87 -0
- package/dist/components/VvCheckbox/index.d.ts +86 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +415 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +113 -0
- package/dist/components/{VvCheckGroup/VvCheckGroup.d.ts → VvCheckboxGroup/index.d.ts} +10 -10
- package/dist/components/VvDialog/VvDialog.es.js +108 -230
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
- package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
- package/dist/components/VvDropdown/VvDropdown.es.js +167 -186
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +34 -136
- package/dist/components/VvDropdown/{VvDropdown.d.ts → index.d.ts} +7 -3
- package/dist/components/VvIcon/VvIcon.es.js +62 -174
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
- package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
- package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
- package/dist/components/VvInputText/VvInputText.es.js +586 -577
- package/dist/components/VvInputText/VvInputText.umd.js +1 -2
- package/dist/components/VvInputText/VvInputText.vue.d.ts +187 -275
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +175 -0
- package/dist/components/VvNativeSelect/VvNativeSelect.es.js +299 -347
- package/dist/components/VvNativeSelect/VvNativeSelect.umd.js +1 -2
- package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +78 -190
- package/dist/components/VvNativeSelect/{VvNativeSelect.d.ts → index.d.ts} +35 -8
- package/dist/components/VvProgress/VvProgress.es.js +45 -162
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +17 -103
- package/dist/components/VvProgress/{VvProgress.d.ts → index.d.ts} +1 -7
- package/dist/components/VvRadio/VvRadio.es.js +292 -267
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +52 -122
- package/dist/components/VvRadio/index.d.ts +64 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +342 -380
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +58 -213
- package/dist/components/VvRadioGroup/{VvRadioGroup.d.ts → index.d.ts} +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +556 -510
- package/dist/components/VvSelect/VvSelect.umd.js +1 -2
- package/dist/components/VvSelect/VvSelect.vue.d.ts +75 -240
- package/dist/components/VvSelect/{VvSelect.d.ts → index.d.ts} +12 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +372 -481
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -2
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +103 -299
- package/dist/components/VvTextarea/{VvTextarea.d.ts → index.d.ts} +36 -13
- package/dist/components/common/HintSlot.d.ts +10 -4
- package/dist/components/index.d.ts +13 -6
- package/dist/components/index.es.js +2070 -895
- package/dist/components/index.umd.js +1 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -2
- package/dist/composables/focus/useComponentFocus.d.ts +3 -3
- package/dist/composables/group/types/IAccordionGroupState.d.ts +1 -3
- package/dist/composables/group/types/IGroupState.d.ts +2 -2
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/icons/useComponentIcons.d.ts +2 -2
- package/dist/composables/textLimit/useTextLimit.d.ts +0 -3
- package/dist/constants.d.ts +4 -4
- package/dist/icons.d.ts +1881 -0
- package/dist/icons.es.js +4 -6
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2113 -932
- package/dist/index.umd.js +1 -2
- package/dist/props/index.d.ts +9 -3
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +40 -0
- package/dist/resolvers/unplugin.umd.js +1 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +4 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Button/Button.test.d.ts +3 -8
- package/dist/stories/Card/Card.test.d.ts +3 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Icon/IconList.vue.d.ts +1 -43
- package/dist/stories/InputText/InputText.test.d.ts +6 -0
- package/dist/stories/Radio/Radio.test.d.ts +3 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +8 -0
- package/dist/stories/Select/Select.test.d.ts +3 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +8 -0
- package/dist/stories/utils.d.ts +1 -3
- package/dist/test/sleep.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +82 -95
- package/env.d.ts +1 -0
- package/package.json +103 -68
- package/src/Volver.ts +32 -3
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +80 -76
- package/src/components/VvAccordion/index.ts +69 -0
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +77 -41
- package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +8 -12
- package/src/components/VvBadge/VvBadge.vue +14 -10
- package/src/components/VvBadge/{VvBadge.ts → index.ts} +0 -0
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +18 -19
- package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -1
- package/src/components/VvButton/VvButton.vue +123 -113
- package/src/components/VvButton/index.ts +147 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +21 -17
- package/src/components/VvButtonGroup/{VvButtonGroup.ts → index.ts} +0 -0
- package/src/components/VvCard/VvCard.vue +20 -22
- package/src/components/VvCard/{VvCard.ts → index.ts} +0 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +124 -0
- package/src/components/VvCheckbox/index.ts +94 -0
- package/src/components/{VvCheckGroup/VvCheckGroup.vue → VvCheckboxGroup/VvCheckboxGroup.vue} +49 -54
- package/src/components/{VvCheckGroup/VvCheckGroup.ts → VvCheckboxGroup/index.ts} +9 -9
- package/src/components/VvDialog/VvDialog.vue +47 -50
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +61 -40
- package/src/components/VvDropdown/{VvDropdown.ts → index.ts} +8 -4
- package/src/components/VvIcon/VvIcon.vue +31 -25
- package/src/components/VvIcon/{VvIcon.ts → index.ts} +9 -0
- package/src/components/VvInputText/VvInputClearAction.ts +53 -0
- package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
- package/src/components/VvInputText/VvInputStepAction.ts +49 -0
- package/src/components/VvInputText/VvInputText.vue +168 -170
- package/src/components/VvInputText/VvInputTextActions.ts +54 -108
- package/src/components/VvInputText/index.ts +135 -0
- package/src/components/VvNativeSelect/VvNativeSelect.vue +130 -68
- package/src/components/VvNativeSelect/{VvNativeSelect.ts → index.ts} +26 -7
- package/src/components/VvProgress/VvProgress.vue +25 -26
- package/src/components/VvProgress/{VvProgress.ts → index.ts} +4 -7
- package/src/components/VvRadio/VvRadio.vue +81 -108
- package/src/components/VvRadio/index.ts +78 -0
- package/src/components/VvRadioGroup/VvRadioGroup.vue +45 -45
- package/src/components/VvRadioGroup/{VvRadioGroup.ts → index.ts} +1 -1
- package/src/components/VvSelect/VvSelect.vue +90 -69
- package/src/components/VvSelect/{VvSelect.ts → index.ts} +12 -5
- package/src/components/VvTextarea/VvTextarea.vue +121 -128
- package/src/components/VvTextarea/{VvTextarea.ts → index.ts} +31 -11
- package/src/components/common/HintSlot.ts +157 -136
- package/src/components/index.ts +13 -6
- package/src/composables/debouncedInput/useDebouncedInput.ts +21 -15
- package/src/composables/focus/useComponentFocus.ts +6 -8
- package/src/composables/group/types/IAccordionGroupState.ts +1 -3
- package/src/composables/group/types/IGroupState.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +20 -30
- package/src/composables/group/useProvideGroupState.ts +1 -2
- package/src/composables/icons/useComponentIcons.ts +2 -3
- package/src/composables/options/useOptions.ts +3 -0
- package/src/composables/textLimit/useTextLimit.ts +1 -4
- package/src/composables/useModifiers.ts +13 -15
- package/src/constants.ts +5 -7
- package/src/directives/{.README → .gitkeep} +0 -0
- package/src/icons.ts +7 -0
- package/src/index.ts +0 -1
- package/src/props/index.ts +7 -1
- package/src/resolvers/unplugin.ts +103 -0
- package/src/shims.d.ts +11 -0
- package/src/stories/Accordion/Accordion.stories.mdx +10 -9
- package/src/stories/Accordion/Accordion.test.ts +37 -0
- package/src/stories/Accordion/AccordionSlots.stories.mdx +40 -25
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +10 -16
- package/src/stories/AccordionGroup/{accordionGroupTest.js → AccordionGroup.test.js} +15 -17
- package/src/stories/AccordionGroup/AccordionGroupCollapse.stories.mdx +38 -0
- package/src/stories/AccordionGroup/{AccordionItems.stories.mdx → AccordionGroupItems.stories.mdx} +7 -13
- package/src/stories/Badge/Badge.stories.mdx +8 -8
- package/src/stories/Badge/Badge.test.ts +16 -0
- package/src/stories/Badge/BadgeColor.stories.mdx +6 -7
- package/src/stories/Badge/BadgeDot.stories.mdx +4 -3
- package/src/stories/Badge/BadgeModifiers.stories.mdx +7 -6
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +15 -7
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +49 -0
- package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +15 -7
- package/src/stories/Button/Button.stories.mdx +16 -17
- package/src/stories/Button/Button.test.ts +8 -12
- package/src/stories/Button/ButtonActive.stories.mdx +2 -1
- package/src/stories/Button/ButtonBadge.stories.mdx +2 -2
- package/src/stories/Button/ButtonDisabled.stories.mdx +1 -1
- package/src/stories/Button/ButtonIcon.stories.mdx +6 -3
- package/src/stories/Button/ButtonIconPosition.stories.mdx +1 -1
- package/src/stories/Button/ButtonLink.stories.mdx +1 -19
- package/src/stories/Button/ButtonLoading.stories.mdx +4 -4
- package/src/stories/Button/ButtonModifiers.stories.mdx +1 -1
- package/src/stories/Button/ButtonPressed.stories.mdx +31 -0
- package/src/stories/Button/ButtonSlots.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +5 -6
- package/src/stories/ButtonGroup/{ButtonGroupTest.js → ButtonGroup.test.js} +6 -28
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +5 -6
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +3 -4
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +11 -12
- package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +3 -4
- package/src/stories/Card/Card.stories.mdx +7 -5
- package/src/stories/Card/Card.test.ts +26 -0
- package/src/stories/Card/CardSlots.stories.mdx +5 -5
- package/src/stories/Card/CardVariant.stories.mdx +5 -4
- package/src/stories/Checkbox/Checkbox.stories.mdx +51 -0
- package/src/stories/Checkbox/Checkbox.test.js +115 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +76 -0
- package/src/stories/{Check/CheckDisabled.stories.mdx → Checkbox/CheckboxDisabled.stories.mdx} +7 -7
- package/src/stories/Checkbox/CheckboxError.stories.mdx +43 -0
- package/src/stories/Checkbox/CheckboxHintLabel.stories.mdx +35 -0
- package/src/stories/{Check/CheckReadonly.stories.mdx → Checkbox/CheckboxReadonly.stories.mdx} +6 -8
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +69 -0
- package/src/stories/{Check/CheckSwitch.stories.mdx → Checkbox/CheckboxSwitch.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +69 -0
- package/src/stories/CheckboxGroup/CheckboxGroupDisabled.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupError.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupHintLabel.stories.mdx +27 -0
- package/src/stories/CheckboxGroup/CheckboxGroupLabel.stories.mdx +26 -0
- package/src/stories/{CheckGroup/CheckGroupOptionLabel.stories.mdx → CheckboxGroup/CheckboxGroupOptionLabel.stories.mdx} +14 -11
- package/src/stories/{CheckGroup/CheckGroupOptionValue.stories.mdx → CheckboxGroup/CheckboxGroupOptionValue.stories.mdx} +13 -10
- package/src/stories/{CheckGroup/CheckGroupOptions.stories.mdx → CheckboxGroup/CheckboxGroupOptions.stories.mdx} +8 -8
- package/src/stories/CheckboxGroup/CheckboxGroupReadonly.stories.mdx +26 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +152 -0
- package/src/stories/CheckboxGroup/CheckboxGroupValid.stories.mdx +28 -0
- package/src/stories/CheckboxGroup/CheckboxGroupVertical.stories.mdx +26 -0
- package/src/stories/Dialog/Dialog.stories.mdx +5 -5
- package/src/stories/Dialog/Dialog.test.ts +26 -0
- package/src/stories/Dialog/DialogAutoClose.stories.mdx +1 -1
- package/src/stories/Dialog/DialogSize.stories.mdx +1 -1
- package/src/stories/Dropdown/Dropdown.stories.mdx +11 -7
- package/src/stories/Dropdown/Dropdown.test.ts +80 -0
- package/src/stories/Dropdown/DropdownDisabled.stories.mdx +9 -2
- package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +2 -2
- package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownMultiple.stories.mdx +4 -2
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +4 -4
- package/src/stories/Dropdown/DropdownUseObject.stories.mdx +4 -2
- package/src/stories/Icon/Icon.stories.mdx +8 -8
- package/src/stories/Icon/{IconTest.js → Icon.test.js} +2 -5
- package/src/stories/Icon/IconList.vue +5 -6
- package/src/stories/Icon/IconPrefix.stories.mdx +2 -2
- package/src/stories/Icon/IconRemote.stories.mdx +2 -2
- package/src/stories/Icon/IconsList.stories.mdx +2 -18
- package/src/stories/InputText/InputText.stories.mdx +25 -19
- package/src/stories/InputText/InputText.test.ts +156 -0
- package/src/stories/InputText/InputTextAutocomplete.stories.mdx +9 -2
- package/src/stories/InputText/InputTextAutofocus.stories.mdx +6 -3
- package/src/stories/InputText/InputTextDisabled.stories.mdx +10 -2
- package/src/stories/InputText/InputTextError.stories.mdx +10 -2
- package/src/stories/InputText/InputTextFloating.stories.mdx +10 -3
- package/src/stories/InputText/InputTextHintLabel.stories.mdx +10 -2
- package/src/stories/InputText/InputTextIcon.stories.mdx +6 -2
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +10 -3
- package/src/stories/InputText/InputTextLabel.stories.mdx +8 -2
- package/src/stories/InputText/InputTextLoading.stories.mdx +10 -2
- package/src/stories/InputText/InputTextMax.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +22 -5
- package/src/stories/InputText/InputTextMin.stories.mdx +10 -3
- package/src/stories/InputText/InputTextMinLength.stories.mdx +9 -2
- package/src/stories/InputText/InputTextPlaceholder.stories.mdx +8 -2
- package/src/stories/InputText/InputTextReadonly.stories.mdx +6 -2
- package/src/stories/InputText/InputTextSlots.stories.mdx +4 -5
- package/src/stories/InputText/InputTextStep.stories.mdx +9 -3
- package/src/stories/InputText/InputTextType.stories.mdx +110 -13
- package/src/stories/InputText/InputTextValid.stories.mdx +10 -2
- package/src/stories/NativeSelect/NativeSelect.stories.mdx +15 -11
- package/src/stories/NativeSelect/NativeSelect.test.js +151 -0
- package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +6 -7
- package/src/stories/NativeSelect/NativeSelectError.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +14 -12
- package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +44 -38
- package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +19 -11
- package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +26 -30
- package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +7 -3
- package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +30 -30
- package/src/stories/Progress/Progress.stories.mdx +8 -11
- package/src/stories/Progress/{ProgressTest.js → Progress.test.js} +4 -10
- package/src/stories/Progress/ProgressDeterminate.stories.mdx +3 -6
- package/src/stories/Radio/Radio.stories.mdx +11 -17
- package/src/stories/Radio/Radio.test.ts +52 -0
- package/src/stories/Radio/RadioDisabled.stories.mdx +4 -7
- package/src/stories/Radio/RadioError.stories.mdx +8 -28
- package/src/stories/Radio/RadioHintLabel.stories.mdx +6 -7
- package/src/stories/Radio/RadioSlots.stories.mdx +21 -7
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +20 -27
- package/src/stories/RadioGroup/RadioGroup.test.ts +139 -0
- package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupError.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +8 -10
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +11 -13
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +7 -9
- package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +6 -8
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +39 -62
- package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +9 -11
- package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +6 -8
- package/src/stories/Select/Select.stories.mdx +32 -29
- package/src/stories/Select/Select.test.ts +104 -0
- package/src/stories/Select/SelectDisabled.stories.mdx +3 -3
- package/src/stories/Select/SelectMaxValues.stories.mdx +3 -3
- package/src/stories/Select/SelectMultiple.stories.mdx +5 -6
- package/src/stories/Select/SelectNative.stories.mdx +6 -8
- package/src/stories/Select/SelectOptions.stories.mdx +4 -4
- package/src/stories/Select/SelectSearchable.stories.mdx +13 -12
- package/src/stories/Select/SelectSeparator.stories.mdx +3 -3
- package/src/stories/Select/SelectUseObject.stories.mdx +3 -3
- package/src/stories/Textarea/Textarea.stories.mdx +6 -10
- package/src/stories/Textarea/Textarea.test.ts +204 -0
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +7 -6
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaError.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +12 -2
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaIcon.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaId.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLabel.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaLimit.stories.mdx +5 -2
- package/src/stories/Textarea/TextareaLoading.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +9 -3
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +5 -4
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaName.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +4 -3
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +8 -3
- package/src/stories/Textarea/TextareaRequired.stories.mdx +3 -2
- package/src/stories/Textarea/TextareaResizable.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +4 -2
- package/src/stories/Textarea/TextareaSlots.stories.mdx +7 -8
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -1
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +14 -4
- package/src/stories/utils.ts +1 -1
- package/src/stories/volver-ui-vue.stories.mdx +1 -1
- package/src/test/expect.ts +3 -1
- package/src/test/sleep.ts +2 -0
- package/src/test/types.d.ts +14 -1
- package/src/types/{.README → .gitkeep} +0 -0
- package/src/utils/ObjectUtilities.ts +247 -241
- package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
- package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
- package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -18
- package/dist/components/VvCheck/VvCheck.d.ts +0 -47
- package/dist/components/VvCheck/VvCheck.es.js +0 -318
- package/dist/components/VvCheck/VvCheck.umd.js +0 -1
- package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
- package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
- package/dist/components/VvCheckGroup/VvCheckGroup.es.js +0 -451
- package/dist/components/VvCheckGroup/VvCheckGroup.umd.js +0 -2
- package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
- package/dist/components/VvDialog/constants.d.ts +0 -5
- package/dist/components/VvInputText/VvInputText.d.ts +0 -73
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvRadio/VvRadio.d.ts +0 -22
- package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/stories/RadioGroup/RadioOption.test.d.ts +0 -4
- package/dist/stories/RadioGroup/RadioProperty.test.d.ts +0 -12
- package/dist/stories/RadioGroup/RadioSlots.test.d.ts +0 -6
- package/src/assets/icons/index.js +0 -7
- package/src/components/VvAccordion/VvAccordion.ts +0 -34
- package/src/components/VvAccordion/useAccordionProps.ts +0 -45
- package/src/components/VvButton/VvButton.ts +0 -87
- package/src/components/VvButton/useButtonGroupProps.ts +0 -43
- package/src/components/VvCheck/VvCheck.ts +0 -48
- package/src/components/VvCheck/VvCheck.vue +0 -147
- package/src/components/VvCheck/useCheckProps.ts +0 -41
- package/src/components/VvDialog/VvDialog.ts +0 -17
- package/src/components/VvDialog/constants.ts +0 -5
- package/src/components/VvInputText/VvInputText.ts +0 -66
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvRadio/VvRadio.ts +0 -25
- package/src/components/VvRadio/useRadioProps.ts +0 -40
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
- package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
- package/src/stories/Accordion/accordionTest.js +0 -36
- package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
- package/src/stories/Badge/BadgeTest.js +0 -21
- package/src/stories/Button/ButtonSelected.stories.mdx +0 -30
- package/src/stories/Check/Check.stories.mdx +0 -62
- package/src/stories/Check/CheckBinary.stories.mdx +0 -75
- package/src/stories/Check/CheckError.stories.mdx +0 -64
- package/src/stories/Check/CheckErrorTests.js +0 -74
- package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
- package/src/stories/Check/CheckPropertyTest.js +0 -102
- package/src/stories/Check/CheckSlots.stories.mdx +0 -51
- package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
- package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
- package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
- package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
- package/src/stories/RadioGroup/RadioOption.test.ts +0 -45
- package/src/stories/RadioGroup/RadioProperty.test.ts +0 -87
- package/src/stories/RadioGroup/RadioSlots.test.ts +0 -29
- package/src/stories/stories.scss +0 -13
|
@@ -1,2 +1 @@
|
|
|
1
|
-
(function(e,A){typeof exports=="object"&&typeof module<"u"?module.exports=A(require("vue"),require("@vueuse/core"),require("uuid"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core","uuid","@iconify/vue"],A):(e=typeof globalThis<"u"?globalThis:e||self,e.VvSelect=A(e.vue,e.core,e.uuid,e.vue$1))})(this,function(e,A,K,O){"use strict";const V={equals(r,n,t){return t?this.resolveFieldData(r,t)===this.resolveFieldData(n,t):this.deepEquals(r,n)},deepEquals(r,n){if(r===n)return!0;if(r&&n&&typeof r=="object"&&typeof n=="object"){const t=Array.isArray(r),u=Array.isArray(n);let l,a,d;if(t&&u){if(a=r.length,a!=n.length)return!1;for(l=a;l--!==0;)if(!this.deepEquals(r[l],n[l]))return!1;return!0}if(t!=u)return!1;const y=r instanceof Date,i=n instanceof Date;if(y!=i)return!1;if(y&&i)return r.getTime()==n.getTime();const S=r instanceof RegExp,c=n instanceof RegExp;if(S!=c)return!1;if(S&&c)return r.toString()==n.toString();const o=Object.keys(r);if(a=o.length,a!==Object.keys(n).length)return!1;for(l=a;l--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[l]))return!1;for(l=a;l--!==0;)if(d=o[l],!this.deepEquals(r[d],n[d]))return!1;return!0}return r!==r&&n!==n},resolveFieldData(r,n){if(r&&Object.keys(r).length&&n){if(n.indexOf(".")===-1)return r[n];{const t=n.split(".");let u=r;for(let l=0,a=t.length;l<a;++l){if(r==null)return null;u=u[t[l]]}return u}}else return null},isFunction(r){return!!(r&&r.constructor&&r.call&&r.apply)},findIndexInList(r,n){let t=-1;if(n){for(let u=0;u<n.length;u++)if(this.equals(n[u],r)){t=u;break}}return t},contains(r,n){if(r!=null&&n&&n.length){for(const t of n)if(this.equals(r,t))return!0}return!1},isEmpty(r){return r==null||r===""||Array.isArray(r)&&r.length===0||!(r instanceof Date)&&typeof r=="object"&&Object.keys(r).length===0},isNotEmpty(r){return!this.isEmpty(r)},pickBy(r,n){return Object.fromEntries(Object.entries(r).filter(([t])=>n(t)))},removeFromList(r,n){const t=this.findIndexInList(r,n);return t>-1?n.filter((u,l)=>l!==t):n},isString(r){return typeof r=="string"||r instanceof String},propsToObject(r){return Object.keys(r).reduce((n,t)=>{var u,l,a,d,y;return this.isFunction(r[t])?n[t]=r[t]():Array.isArray(r[t])?n[t]=r[t][0]():(u=r[t])!=null&&u.type&&(Array.isArray(r[t].type)?n[t]=((l=r[t])==null?void 0:l.default)||((a=r[t])==null?void 0:a.type[0]()):n[t]=((d=r[t])==null?void 0:d.default)||((y=r[t])==null?void 0:y.type())),n},{})},filterArray(r,n,t){return r.filter(u=>n.some(l=>typeof l=="string"?u[t]==l:this.equals(u[t],l[t])))},kebabCase(r){var n,t;if(r)return(t=(n=r.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:n.join("-"))==null?void 0:t.toLowerCase()}},R={valid:Boolean,validLabel:[String,Array]},I={error:Boolean,errorLabel:[String,Array]},T={loading:Boolean,loadingLabel:String},q={disabled:Boolean},x={readonly:Boolean},F={modifiers:[String,Array]},L={hintLabel:{type:String,default:""}},z={...R,...I,...L,...T,...q,...x,...F,modelValue:[String,Array,Object],label:String,labelNoResult:{type:String,default:"No results"},placeholder:String,searchable:Boolean,searchPlaceholder:String,debounceSearch:{type:[Number,String],default:0},options:{type:Array,required:!0},useObject:Boolean,multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},iconLeft:String,iconRight:String,native:Boolean};function D(r){return Array.isArray(r)?r.filter(n=>V.isString(n)).reduce((n,t)=>n.length>0?n+`
|
|
2
|
-
`+t:t,""):r}function H(r,n){return{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(t){const u=e.toRefs(r),{error:l,valid:a,hint:d,loading:y}=n,{hintLabel:i,modelValue:S,valid:c,validLabel:o,error:g,errorLabel:s}=u,m=V.resolveFieldData(u,"loading"),b=V.resolveFieldData(u,"loadingLabel"),k=e.computed(()=>g.value?!!(g.value&&l||(s==null?void 0:s.value)&&Array.isArray(s.value)&&s.value.length>0||(s==null?void 0:s.value)&&V.isNotEmpty(s.value)):!1),w=e.computed(()=>!!(i&&i.value||d||a||o&&o.value||k.value||(m==null?void 0:m.value)&&y||(m==null?void 0:m.value)&&(b==null?void 0:b.value))),f=e.computed(()=>{const C=A.toReactive({hintLabel:i,modelValue:S,valid:c,validLabel:o,error:g,errorLabel:s,loading:m,loadingLabel:b,...t.params});return g!=null&&g.value?(l==null?void 0:l(C))||D(s==null?void 0:s.value)||(i==null?void 0:i.value):c!=null&&c.value?(a==null?void 0:a(C))||D(o==null?void 0:o.value)||(i==null?void 0:i.value):m!=null&&m.value?(y==null?void 0:y(C))||D(b==null?void 0:b.value)||(i==null?void 0:i.value):(d==null?void 0:d(C))||D(i==null?void 0:i.value)||(i==null?void 0:i.value)});return{hasHint:w,hintContent:f}},render(){if(this.hasHint)return e.h("pre",{style:{"white-space":"pre"}},this.hintContent)}}}function P(r,n){const t={[`${r}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(n).reduce((l,a)=>{const d=e.unref(n[a])||!1;if(!d)return l;if(a==="modifiers"){const y=Array.isArray(d)?d:[d];return{...l,...y.reduce((i,S)=>({...i,[`${r}--${V.kebabCase(S)}`]:!0}),{})}}else return{...l,[`${r}--${V.kebabCase(a)}`]:d}},t)||{})}}const U={...q,...F,modelValue:[String,Array,Object],labelNoResult:{type:String,default:"No results"},options:{type:Array,required:!0},useObject:Boolean,multiple:Boolean,maxValues:[Number,String],labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},Z={key:0},J=["for"],X=["id","type","value","checked","disabled"],G=e.defineComponent({__name:"VvDropdown",props:U,emits:["update:modelValue"],setup(r,{emit:n}){const t=r,u=K.v4(),{modifiers:l,disabled:a}=e.toRefs(t),{bemCssClasses:d}=P("vv-dropdown",{modifiers:l,disabled:a});function y(o){return Array.isArray(t.modelValue)?V.contains(o,t.modelValue)||V.contains(i(o),t.modelValue):V.equals(o,t.modelValue)||V.equals(i(o),t.modelValue)}function i(o){return typeof o=="string"?o:String(o[t.valueKey])}function S(o){return typeof o=="string"?o:o[t.labelKey]}function c(o){var b,k;const g=o.target;let s=g.value;if(s=(t.useObject?(b=t.options)==null?void 0:b.find(w=>w[t.valueKey]==s):null)||s,t.multiple){if(typeof t.maxValues<"u"&&t.maxValues>=0&&((k=t.modelValue)==null?void 0:k.length)>=t.maxValues&&(Array.isArray(t.modelValue)&&!V.contains(s,t.modelValue)||t.maxValues==0)){g.checked=!1;return}Array.isArray(t.modelValue)?s=V.contains(s,t.modelValue)?V.removeFromList(s,t.modelValue):[...t.modelValue,s]:s=[s]}n("update:modelValue",s)}return(o,g)=>{var s;return e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(d)),role:"listbox"},[(s=o.options)!=null&&s.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Z,[e.createElementVNode("label",null,e.toDisplayString(o.labelNoResult),1)])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,(m,b)=>{var k;return e.openBlock(),e.createElementBlock("li",{key:b},[e.createElementVNode("label",{for:`dropdown-${b}-${e.unref(u)}`},[e.createElementVNode("input",{id:`dropdown-${b}-${e.unref(u)}`,type:o.multiple?"checkbox":"radio",value:i(m),checked:y(m),disabled:typeof m=="object"&&(k=m.disabled)!=null?k:e.unref(a),onInput:c},null,40,X),e.createTextVNode(" "+e.toDisplayString(S(m)),1)],8,J)])}),128))],2)}}}),Q={...R,...I,...L,...T,...q,...x,...F,modelValue:{type:[String,Object],required:!0},label:String,placeholder:String,options:{type:Array,required:!0},useObject:Boolean,labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},iconLeft:String,iconRight:String,modifiers:[String,Array]},W="ds",Y={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]}},M=e.defineComponent({__name:"VvIcon",props:Y,setup(r){const n=r,t=e.ref(!0),{modifiers:u}=e.toRefs(n),l=e.inject(W),{bemCssClasses:a}=P("vv-icon",{modifiers:u}),d=e.computed(()=>n.provider||(l==null?void 0:l.provider)),y=e.computed(()=>{const c=n.name||"",o=`@${d.value}:${n.prefix}:${n.name}`;return O.iconExists(c)?c:O.iconExists(o)?o:(l==null?void 0:l.iconsCollections.find(g=>{const s=`@${d.value}:${g.prefix}:${c}`;if(O.iconExists(s))return s}))||c});function i(c){let o=null;if(typeof window>"u"){const{JSDOM:b}=require("jsdom");o=new b().window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(c,"text/html").querySelector("svg")}function S(c){const o=i(c),g=(o==null?void 0:o.innerHTML.trim())||"";o&&g&&O.addIcon(`@${d.value}:${n.prefix}:${n.name}`,{body:g,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return l&&(n.src?(t.value=!1,l.fetchIcon(n.src).then(c=>{c&&(S(c),t.value=!0)}).catch(c=>{throw new Error(`During fetch icon: ${c==null?void 0:c.message}`)})):n.svg&&S(n.svg)),(c,o)=>t.value?(e.openBlock(),e.createBlock(e.unref(O.Icon),e.mergeProps({key:0,class:e.unref(a)},{...c.$props,provider:e.unref(d),icon:e.unref(y)}),null,16,["class"])):e.createCommentVNode("",!0)}}),v=["for"],ee={class:"vv-select__wrapper"},te=["id","value","disabled"],re={key:0,value:"",disabled:"",selected:""},ne=["disabled","value"],oe=e.defineComponent({__name:"VvNativeSelect",props:Q,emits:["update:modelValue"],setup(r,{emit:n}){const t=r,u=e.useSlots(),l=H(t,u),{modifiers:a,disabled:d,readonly:y,loading:i,iconLeft:S,iconRight:c,error:o,valid:g}=e.toRefs(t),s=K.v4(),{bemCssClasses:m}=P("vv-select",{modifiers:a,loading:i,readonly:y,iconLeft:S,iconRight:c,valid:g,invalid:o,dirty:e.computed(()=>V.isNotEmpty(t.modelValue))});function b(f){return typeof f=="string"?f:f[t.valueKey]}function k(f){return typeof f=="string"?f:f[t.labelKey]}function w(f){var N;const C=f.target,E=(t.useObject?(N=t.options)==null?void 0:N.find(j=>j[t.valueKey]==C.value):null)||C.value;n("update:modelValue",E)}return(f,C)=>{var _;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(m))},[f.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(s)},e.toDisplayString(f.label),9,v)):e.createCommentVNode("",!0),e.createElementVNode("div",ee,[e.renderSlot(f.$slots,"icon-left",{},()=>[e.unref(S)?(e.openBlock(),e.createBlock(M,{key:0,name:e.unref(S)},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("select",{id:e.unref(s),value:typeof f.modelValue=="string"?f.modelValue:(_=f.modelValue)==null?void 0:_[f.valueKey],disabled:e.unref(d)||e.unref(y),onInput:w},[f.placeholder?(e.openBlock(),e.createElementBlock("option",re,e.toDisplayString(f.placeholder),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.options,(E,N)=>{var j;return e.openBlock(),e.createElementBlock("option",{key:N,disabled:typeof E=="object"&&(j=E.disabled)!=null?j:e.unref(d),value:b(E)},e.toDisplayString(k(E)),9,ne)}),128))],40,te),e.renderSlot(f.$slots,"icon-right",{},()=>[e.unref(c)?(e.openBlock(),e.createBlock(M,{key:0,name:e.unref(c)},null,8,["name"])):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(l),{class:"vv-select__hint"})],2)}}}),le=["id"],se={key:0,for:"select"},ae=["placeholder"];return e.defineComponent({__name:"VvSelect",props:z,emits:["update:modelValue","change:search"],setup(r,{emit:n}){const t=r,u=e.useSlots(),l=H(t,u),a=e.ref(),d=e.ref();A.useFocus(d,{initialValue:!0});const y=K.v4(),i=e.ref(""),S=A.refDebounced(i,Number(t.debounceSearch)),c=e.ref(!1),{modifiers:o,disabled:g,readonly:s,loading:m,iconLeft:b,iconRight:k,valid:w,error:f}=e.toRefs(t);e.watch(S,()=>n("change:search",S.value));const{bemCssClasses:C}=P("vv-select",{modifiers:o,disabled:g,loading:m,readonly:s,iconLeft:b,iconRight:k,valid:w,invalid:f,dirty:e.computed(()=>V.isNotEmpty(t.modelValue))}),_=e.computed(()=>{var p;return(p=t.options)==null?void 0:p.every(h=>typeof h=="object")}),E=e.computed(()=>t.searchable?N.value:t.options),N=e.computed(()=>{var p;return(p=t.options)==null?void 0:p.filter(h=>typeof h=="string"?h.toLowerCase().includes(S.value.toLowerCase().trim()):h[t.labelKey].toLowerCase().includes(S.value.toLowerCase().trim()))}),j=e.computed(()=>{var h,B;if(t.multiple&&((h=t.modelValue)==null?void 0:h.length)&&Array.isArray(t.modelValue))return _.value?V.filterArray(t.options,t.modelValue,t.valueKey).map($=>$[t.labelKey]).join(t.separator):t.modelValue.join(t.separator);const p=t.useObject?t.modelValue:(B=t.options)==null?void 0:B.find($=>typeof $=="object"?$[t.valueKey]==t.modelValue:$==t.modelValue);return typeof p=="object"?p==null?void 0:p[t.labelKey]:p});A.onClickOutside(a,()=>{a.value.open=!1});function ie(p){const h=p.target;c.value=h.open}function ce(p){a.value&&!t.multiple&&(a.value.open=!1),n("update:modelValue",p)}return(p,h)=>p.native?(e.openBlock(),e.createBlock(oe,e.mergeProps({key:1},t,{"onUpdate:modelValue":h[4]||(h[4]=B=>n("update:modelValue",B))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(y),class:e.normalizeClass(e.unref(C))},[p.label?(e.openBlock(),e.createElementBlock("label",se,e.toDisplayString(p.label),1)):e.createCommentVNode("",!0),e.createElementVNode("details",{ref_key:"dropdown",ref:a,role:"list",class:"vv-select__wrapper",onClick:h[2]||(h[2]=B=>e.unref(g)||e.unref(s)?B.preventDefault():null),onKeyup:h[3]||(h[3]=e.withKeys(B=>a.value.open=!1,["esc"])),onToggle:ie},[e.createElementVNode("summary",{class:"vv-select__input","aria-haspopup":"listbox",onKeyup:h[1]||(h[1]=e.withKeys(B=>p.searchable?B.preventDefault():null,["space"]))},[p.searchable&&c.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputSearch",ref:d,"onUpdate:modelValue":h[0]||(h[0]=B=>i.value=B),placeholder:p.searchPlaceholder},null,8,ae)),[[e.vModelText,i.value]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(j)||p.placeholder),1)],64))],32),e.createVNode(G,e.mergeProps({...t,options:e.unref(E)},{"onUpdate:modelValue":ce}),null,16)],544),e.createVNode(e.unref(l),{class:"vv-select__hint"})],10,le))}})});
|
|
1
|
+
(function(e,C){typeof exports=="object"&&typeof module<"u"?module.exports=C(require("vue"),require("nanoid"),require("@vueuse/core"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","nanoid","@vueuse/core","@iconify/vue"],C):(e=typeof globalThis<"u"?globalThis:e||self,e.VvSelect=C(e.vue,e.nanoid,e.core,e.vue$1))})(this,function(e,C,P,N){"use strict";function $(n,r,t){return t?x(n,t)===x(r,t):T(n,r)}function T(n,r){if(n===r)return!0;if(n&&r&&typeof n=="object"&&typeof r=="object"){const t=Array.isArray(n),u=Array.isArray(r);let o,c,l;if(t&&u){if(c=n.length,c!=r.length)return!1;for(o=c;o--!==0;)if(!T(n[o],r[o]))return!1;return!0}if(t!=u)return!1;const b=n instanceof Date,h=r instanceof Date;if(b!=h)return!1;if(b&&h)return n.getTime()==r.getTime();const g=n instanceof RegExp,i=r instanceof RegExp;if(g!=i)return!1;if(g&&i)return n.toString()==r.toString();const s=Object.keys(n);if(c=s.length,c!==Object.keys(r).length)return!1;for(o=c;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=c;o--!==0;)if(l=s[o],!T(n[l],r[l]))return!1;return!0}return n!==n&&r!==r}function x(n,r){if(n&&Object.keys(n).length&&r){if(r.indexOf(".")===-1)return n[r];{const t=r.split(".");let u=n;for(let o=0,c=t.length;o<c;++o){if(n==null)return null;u=u[t[o]]}return u}}else return null}function Y(n,r){let t=-1;if(r){for(let u=0;u<r.length;u++)if($(r[u],n)){t=u;break}}return t}function K(n,r){if(n!=null&&r&&r.length){for(const t of r)if($(n,t))return!0}return!1}function F(n){return(r=>r==null||r===""||Array.isArray(r)&&r.length===0||!(r instanceof Date)&&typeof r=="object"&&Object.keys(r).length===0)(e.unref(n))}function ee(n,r){const t=Y(n,r);return t>-1?r.filter((u,o)=>o!==t):r}function te(n){return typeof n=="string"||n instanceof String}function re(n,r,t){return n.filter(u=>r.some(o=>typeof o=="string"?u[t]==o:$(u[t],o[t])))}function z(n){var r,t;if(n)return(t=(r=n.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:r.join("-"))==null?void 0:t.toLowerCase()}function R(n,r){const t={[`${n}`]:!0};return{bemCssClasses:e.computed(()=>Object.keys(r).reduce((o,c)=>{const l=e.unref(r[c])||!1;if(!l)return o;if(c==="modifiers"){const b=Array.isArray(l)?l:l.split(" ");return{...o,...b.reduce((h,g)=>({...h,[`${n}--${z(g)}`]:!0}),{})}}else return{...o,[`${n}--${z(c)}`]:l}},t)||{})}}function q(n){return Array.isArray(n)?n.filter(r=>te(r)).join(" "):n}function U(n,r){const{error:t,valid:u,hint:o,loading:c}=r,{hintLabel:l,modelValue:b,valid:h,validLabel:g,error:i,errorLabel:s,...a}=e.toRefs(n),y=x(a,"loading"),m=x(a,"loadingLabel"),V=e.computed(()=>i.value?!!(i.value&&t||s!=null&&s.value&&Array.isArray(s.value)&&s.value.length>0||s!=null&&s.value&&!F(s)):!1),S=e.computed(()=>!!(l&&l.value||o)),B=e.computed(()=>!!(g&&g.value||u)),_=e.computed(()=>!!(y!=null&&y.value&&c||y!=null&&y.value&&(m!=null&&m.value))),w=e.computed(()=>S.value||B||V.value||_.value);return{hasErrors:V,hasHint:S,hasValid:B,hasLoading:_,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(E){const j=e.computed(()=>{const A=P.toReactive({hintLabel:l,modelValue:b,valid:h,validLabel:g,error:i,errorLabel:s,loading:y,loadingLabel:m,...E.params});return i!=null&&i.value?(t==null?void 0:t(A))||q(s==null?void 0:s.value)||(l==null?void 0:l.value):h!=null&&h.value?(u==null?void 0:u(A))||q(g==null?void 0:g.value)||(l==null?void 0:l.value):y!=null&&y.value?(c==null?void 0:c(A))||q(m==null?void 0:m.value)||(l==null?void 0:l.value):(o==null?void 0:o(A))||q(l==null?void 0:l.value)||(l==null?void 0:l.value)});return{isVisible:w,hasErrors:V,hasValid:B,hintContent:j}},render(){if(this.isVisible)return e.h("small",{role:this.hasErrors||this.hasValid?"alert":void 0},this.hintContent)}}}}const Z={valid:Boolean,validLabel:[String,Array]},J={error:Boolean,errorLabel:[String,Array]},X={loading:Boolean,loadingLabel:String},I={disabled:Boolean},G={readonly:Boolean},M={modifiers:[String,Array]},Q={hintLabel:{type:String,default:""}},ne={...I,...M,modelValue:{type:[String,Number,Boolean,Object,Array],required:!0},labelNoResult:{type:String,default:"No results"},options:{type:Array,required:!0},useObject:Boolean,multiple:Boolean,maxValues:[Number,String],labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},oe={key:0,role:"option"},le=["aria-selected"],se=["for"],ae=["id","type","value","checked","disabled"],ie={name:"VvDropdown"},ce=e.defineComponent({...ie,props:ne,emits:["update:modelValue"],setup(n,{emit:r}){const t=n,u=C.nanoid(),{modifiers:o,disabled:c}=e.toRefs(t),{bemCssClasses:l}=R("vv-dropdown",{modifiers:o,disabled:c});function b(a){return Array.isArray(t.modelValue)?K(a,t.modelValue)||K(h(a),t.modelValue):$(a,t.modelValue)||$(h(a),t.modelValue)}function h(a){return typeof a=="string"?a:String(a[t.valueKey])}function g(a){return typeof a=="string"?a:a[t.labelKey]}function i(a){return typeof a=="string"||a.disabled===void 0?c.value:a.disabled}function s(a){var S,B;const y=a.target;let m=y.value;if(m=(t.useObject?(S=t.options)==null?void 0:S.find(_=>_[t.valueKey]==m):null)||m,t.multiple){if(typeof t.maxValues<"u"&&t.maxValues>=0&&Array.isArray(t.modelValue)&&((B=t.modelValue)==null?void 0:B.length)>=t.maxValues&&(Array.isArray(t.modelValue)&&!K(m,t.modelValue)||t.maxValues==0)){y.checked=!1;return}Array.isArray(t.modelValue)?m=K(m,t.modelValue)?ee(m,t.modelValue):[...t.modelValue,m]:m=[m]}r("update:modelValue",m)}return(a,y)=>{var m;return e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(l)),role:"listbox"},[(m=a.options)!=null&&m.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",oe,[e.createElementVNode("label",null,e.toDisplayString(a.labelNoResult),1)])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options,(V,S)=>(e.openBlock(),e.createElementBlock("li",{key:S,role:"option","aria-selected":b(V)},[e.createElementVNode("label",{for:`dropdown-${S}-${e.unref(u)}`},[e.createElementVNode("input",{id:`dropdown-${S}-${e.unref(u)}`,type:a.multiple?"checkbox":"radio",value:h(V),checked:b(V),disabled:i(V),tabindex:"-1","aria-hidden":"true",onInput:s},null,40,ae),e.createTextVNode(" "+e.toDisplayString(g(V)),1)],8,se)],8,le))),128))],2)}}}),de="ds",ue={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]}},fe={name:"VvIcon"},W=e.defineComponent({...fe,props:ue,setup(n){const r=n,t=e.ref(!0),{modifiers:u}=e.toRefs(r),o=e.inject(de),{bemCssClasses:c}=R("vv-icon",{modifiers:u}),l=e.computed(()=>r.provider||(o==null?void 0:o.provider)),b=e.computed(()=>{const i=r.name||"",s=`@${l.value}:${r.prefix}:${r.name}`;return N.iconExists(i)?i:N.iconExists(s)?s:(o==null?void 0:o.iconsCollections.find(a=>{const y=`@${l.value}:${a.prefix}:${i}`;if(N.iconExists(y))return y}))||i});function h(i){let s=null;if(typeof window>"u"){const{JSDOM:V}=require("jsdom");s=new V().window}return(s?new s.DOMParser:new window.DOMParser).parseFromString(i,"text/html").querySelector("svg")}function g(i){const s=h(i),a=(s==null?void 0:s.innerHTML.trim())||"";s&&a&&N.addIcon(`@${l.value}:${r.prefix}:${r.name}`,{body:a,height:s.viewBox.baseVal.height,width:s.viewBox.baseVal.width})}return o&&(r.src&&!N.iconExists(`@${l.value}:${r.prefix}:${r.name}`)?(t.value=!1,o.fetchIcon(r.src).then(i=>{i&&(g(i),t.value=!0)}).catch(i=>{throw new Error(`During fetch icon: ${i==null?void 0:i.message}`)})):r.svg&&g(r.svg)),(i,s)=>t.value?(e.openBlock(),e.createBlock(e.unref(N.Icon),e.mergeProps({key:0,class:e.unref(c)},{...i.$props,provider:e.unref(l),icon:e.unref(b)}),null,16,["class"])):e.createCommentVNode("",!0)}}),pe={...Z,...J,...Q,...X,...I,...G,...M,id:[String,Number],name:{type:String,required:!0},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},label:String,required:Boolean,placeholder:String,options:{type:Array,required:!0},useObject:Boolean,labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},iconLeft:String,iconRight:String,modifiers:[String,Array],tabindex:{type:[String,Number],default:0}},me=["update:modelValue"],ye=["for"],ge={class:"vv-select__wrapper"},he=["id","disabled","required"],be={key:0,value:void 0,disabled:""},Ve=["disabled","value"],Se={name:"VvNativeSelect"},ke=e.defineComponent({...Se,props:pe,emits:me,setup(n,{emit:r}){const t=n,u=e.useSlots(),{HintSlot:o,hasHint:c,hasErrors:l}=U(t,u),{modifiers:b,disabled:h,readonly:g,loading:i,iconLeft:s,iconRight:a,error:y,valid:m}=e.toRefs(t),V=e.computed(()=>String(t.id||C.nanoid())),S=e.computed(()=>`${V.value}-hint`),B=e.computed(()=>!F(t.modelValue)),_=e.computed(()=>t.disabled||t.readonly),w=e.computed(()=>_.value?-1:t.tabindex),E=e.computed(()=>{if(t.error===!0)return!0;if(t.valid===!0)return!1}),{bemCssClasses:j}=R("vv-select",{modifiers:b,loading:i,readonly:g,iconLeft:s,iconRight:a,valid:m,invalid:y,dirty:B}),A=e.computed(()=>({name:t.name,tabindex:w.value,"aria-invalid":E.value,"aria-describedby":!l.value&&c.value?S.value:void 0,"aria-errormessage":l.value?S.value:void 0}));function H(p){return typeof p=="string"?p:p[t.valueKey]}function L(p){return typeof p=="string"?p:p[t.labelKey]}function v(p){return typeof p=="string"||p.disabled===void 0?h.value:p.disabled}const D=e.computed({get:()=>{var p;return typeof t.modelValue=="object"?(p=t.modelValue)==null?void 0:p[t.valueKey]:t.modelValue},set:p=>{var d;const f=t.useObject?(d=t.options)==null?void 0:d.find(k=>k[t.valueKey]===p):void 0;r("update:modelValue",f??p)}});return(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(j))},[p.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(V)},e.toDisplayString(p.label),9,ye)):e.createCommentVNode("",!0),e.createElementVNode("div",ge,[e.renderSlot(p.$slots,"icon-left",{},()=>[e.unref(s)?(e.openBlock(),e.createBlock(W,{key:0,name:e.unref(s)},null,8,["name"])):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(V),"onUpdate:modelValue":f[0]||(f[0]=d=>e.isRef(D)?D.value=d:null)},e.unref(A),{disabled:e.unref(_),required:p.required}),[p.placeholder?(e.openBlock(),e.createElementBlock("option",be,e.toDisplayString(p.placeholder),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.options,(d,k)=>(e.openBlock(),e.createElementBlock("option",{key:k,disabled:v(d),value:H(d)},e.toDisplayString(L(d)),9,Ve))),128))],16,he),[[e.vModelSelect,e.unref(D)]]),e.renderSlot(p.$slots,"icon-right",{},()=>[e.unref(a)?(e.openBlock(),e.createBlock(W,{key:0,name:e.unref(a)},null,8,["name"])):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(o),{id:e.unref(S),class:"vv-select__hint"},null,8,["id"])],2))}}),Be={...Z,...J,...Q,...X,...I,...G,...M,modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},label:String,labelNoResult:{type:String,default:"No results"},placeholder:String,searchable:Boolean,searchPlaceholder:String,debounceSearch:{type:[Number,String],default:0},options:{type:Array,required:!0},useObject:Boolean,multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},iconLeft:String,iconRight:String,native:Boolean,tabindex:{type:[Number,String],default:0}},_e=["id"],Ae=["id","for"],Ce=["tabindex"],Ne=["id","placeholder"],$e={name:"VvSelect"};return e.defineComponent({...$e,props:Be,emits:["update:modelValue","change:search"],setup(n,{emit:r}){const t=n,u=e.useSlots(),{HintSlot:o}=U(t,u),c=e.ref(),l=e.ref();P.useFocus(l,{initialValue:!0});const b=C.nanoid(),h=e.ref(""),g=P.refDebounced(h,Number(t.debounceSearch)),i=e.ref(!1),{modifiers:s,disabled:a,readonly:y,loading:m,iconLeft:V,iconRight:S,valid:B,error:_}=e.toRefs(t);e.watch(g,()=>r("change:search",g.value));const w=e.computed(()=>!F(t.modelValue)),E=e.computed(()=>a.value||y.value?-1:t.tabindex),{bemCssClasses:j}=R("vv-select",{modifiers:s,disabled:a,loading:m,readonly:y,iconLeft:V,iconRight:S,valid:B,invalid:_,dirty:w}),A=e.computed(()=>{var f;return(f=t.options)==null?void 0:f.every(d=>typeof d=="object")}),H=e.computed(()=>t.searchable?L.value:t.options),L=e.computed(()=>{var f;return(f=t.options)==null?void 0:f.filter(d=>typeof d=="string"?d.toLowerCase().includes(g.value.toLowerCase().trim()):typeof d[t.labelKey]=="string"?d[t.labelKey].toLowerCase().includes(g.value.toLowerCase().trim()):!1)}),v=e.computed(()=>{var d,k;if(t.multiple&&Array.isArray(t.modelValue)&&((d=t.modelValue)!=null&&d.length))return A.value?re(t.options,t.modelValue,t.valueKey).map(O=>O[t.labelKey]).join(t.separator):t.modelValue.join(t.separator);const f=t.useObject?t.modelValue:(k=t.options)==null?void 0:k.find(O=>typeof O=="object"?O[t.valueKey]==t.modelValue:O==t.modelValue);return typeof f=="object"?f==null?void 0:f[t.labelKey]:f});P.onClickOutside(c,()=>{c.value.open=!1});function D(f){const d=f.target;i.value=d.open}function p(f){c.value&&!t.multiple&&(c.value.open=!1),r("update:modelValue",f)}return(f,d)=>f.native?(e.openBlock(),e.createBlock(ke,e.mergeProps({key:1},t,{"onUpdate:modelValue":d[4]||(d[4]=k=>r("update:modelValue",k))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(b),class:e.normalizeClass(e.unref(j))},[f.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:`${e.unref(b)}-label`,for:f.searchable&&i.value?`${e.unref(b)}-input`:void 0},e.toDisplayString(f.label),9,Ae)):e.createCommentVNode("",!0),e.createElementVNode("details",{ref_key:"dropdown",ref:c,class:"vv-select__wrapper",onClick:d[2]||(d[2]=k=>e.unref(a)||e.unref(y)?k.preventDefault():null),onKeyup:d[3]||(d[3]=e.withKeys(k=>c.value.open=!1,["esc"])),onToggle:D},[e.createElementVNode("summary",{class:"vv-select__input",tabindex:e.unref(E),onKeyup:d[1]||(d[1]=e.withKeys(k=>f.searchable?k.preventDefault():null,["space"]))},[f.searchable&&i.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:`${e.unref(b)}-input`,ref_key:"inputSearch",ref:l,"onUpdate:modelValue":d[0]||(d[0]=k=>h.value=k),role:"combobox",placeholder:f.searchPlaceholder},null,8,Ne)),[[e.vModelText,h.value]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(v)||f.placeholder),1)],64))],40,Ce),e.createVNode(ce,e.mergeProps({id:`${e.unref(b)}-dropdown`},{...t,options:e.unref(H)},{"onUpdate:modelValue":p}),null,16,["id"])],544),e.createVNode(e.unref(o),{class:"vv-select__hint"})],10,_e))}})});
|
|
@@ -1,236 +1,9 @@
|
|
|
1
|
-
import type { Option } from '
|
|
2
|
-
declare const _default: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
readonly: boolean;
|
|
9
|
-
loading: boolean;
|
|
10
|
-
error: boolean;
|
|
11
|
-
valid: boolean;
|
|
12
|
-
hintLabel: string;
|
|
13
|
-
labelNoResult: string;
|
|
14
|
-
useObject: boolean;
|
|
15
|
-
multiple: boolean;
|
|
16
|
-
labelKey: string;
|
|
17
|
-
valueKey: string;
|
|
18
|
-
searchable: boolean;
|
|
19
|
-
debounceSearch: string | number;
|
|
20
|
-
separator: string;
|
|
21
|
-
native: boolean;
|
|
22
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
-
modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
|
|
24
|
-
label: StringConstructor;
|
|
25
|
-
labelNoResult: {
|
|
26
|
-
type: StringConstructor;
|
|
27
|
-
default: string;
|
|
28
|
-
};
|
|
29
|
-
placeholder: StringConstructor;
|
|
30
|
-
searchable: BooleanConstructor;
|
|
31
|
-
searchPlaceholder: StringConstructor;
|
|
32
|
-
debounceSearch: {
|
|
33
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
34
|
-
default: number;
|
|
35
|
-
};
|
|
36
|
-
options: {
|
|
37
|
-
type: import("vue").PropType<(string | Option)[]>;
|
|
38
|
-
required: boolean;
|
|
39
|
-
};
|
|
40
|
-
useObject: BooleanConstructor;
|
|
41
|
-
multiple: BooleanConstructor;
|
|
42
|
-
maxValues: (StringConstructor | NumberConstructor)[];
|
|
43
|
-
separator: {
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
default: string;
|
|
46
|
-
};
|
|
47
|
-
labelKey: {
|
|
48
|
-
type: StringConstructor;
|
|
49
|
-
default: string;
|
|
50
|
-
};
|
|
51
|
-
valueKey: {
|
|
52
|
-
type: StringConstructor;
|
|
53
|
-
default: string;
|
|
54
|
-
};
|
|
55
|
-
iconLeft: StringConstructor;
|
|
56
|
-
iconRight: StringConstructor;
|
|
57
|
-
native: BooleanConstructor;
|
|
58
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
59
|
-
readonly: BooleanConstructor;
|
|
60
|
-
disabled: BooleanConstructor;
|
|
61
|
-
loading: BooleanConstructor;
|
|
62
|
-
loadingLabel: StringConstructor;
|
|
63
|
-
hintLabel: {
|
|
64
|
-
type: StringConstructor;
|
|
65
|
-
default: string;
|
|
66
|
-
};
|
|
67
|
-
error: BooleanConstructor;
|
|
68
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
69
|
-
valid: BooleanConstructor;
|
|
70
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
71
|
-
}>> & {
|
|
72
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
73
|
-
"onChange:search"?: ((...args: any[]) => any) | undefined;
|
|
74
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "readonly" | "loading" | "error" | "valid" | "hintLabel" | "labelNoResult" | "useObject" | "multiple" | "labelKey" | "valueKey" | "searchable" | "debounceSearch" | "separator" | "native">;
|
|
75
|
-
$attrs: {
|
|
76
|
-
[x: string]: unknown;
|
|
77
|
-
};
|
|
78
|
-
$refs: {
|
|
79
|
-
[x: string]: unknown;
|
|
80
|
-
};
|
|
81
|
-
$slots: Readonly<{
|
|
82
|
-
[name: string]: import("vue").Slot | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
85
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
86
|
-
$emit: (event: "update:modelValue" | "change:search", ...args: any[]) => void;
|
|
87
|
-
$el: any;
|
|
88
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
-
modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
|
|
90
|
-
label: StringConstructor;
|
|
91
|
-
labelNoResult: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
placeholder: StringConstructor;
|
|
96
|
-
searchable: BooleanConstructor;
|
|
97
|
-
searchPlaceholder: StringConstructor;
|
|
98
|
-
debounceSearch: {
|
|
99
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
100
|
-
default: number;
|
|
101
|
-
};
|
|
102
|
-
options: {
|
|
103
|
-
type: import("vue").PropType<(string | Option)[]>;
|
|
104
|
-
required: boolean;
|
|
105
|
-
};
|
|
106
|
-
useObject: BooleanConstructor;
|
|
107
|
-
multiple: BooleanConstructor;
|
|
108
|
-
maxValues: (StringConstructor | NumberConstructor)[];
|
|
109
|
-
separator: {
|
|
110
|
-
type: StringConstructor;
|
|
111
|
-
default: string;
|
|
112
|
-
};
|
|
113
|
-
labelKey: {
|
|
114
|
-
type: StringConstructor;
|
|
115
|
-
default: string;
|
|
116
|
-
};
|
|
117
|
-
valueKey: {
|
|
118
|
-
type: StringConstructor;
|
|
119
|
-
default: string;
|
|
120
|
-
};
|
|
121
|
-
iconLeft: StringConstructor;
|
|
122
|
-
iconRight: StringConstructor;
|
|
123
|
-
native: BooleanConstructor;
|
|
124
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
125
|
-
readonly: BooleanConstructor;
|
|
126
|
-
disabled: BooleanConstructor;
|
|
127
|
-
loading: BooleanConstructor;
|
|
128
|
-
loadingLabel: StringConstructor;
|
|
129
|
-
hintLabel: {
|
|
130
|
-
type: StringConstructor;
|
|
131
|
-
default: string;
|
|
132
|
-
};
|
|
133
|
-
error: BooleanConstructor;
|
|
134
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
135
|
-
valid: BooleanConstructor;
|
|
136
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
137
|
-
}>> & {
|
|
138
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
139
|
-
"onChange:search"?: ((...args: any[]) => any) | undefined;
|
|
140
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change:search")[], string, {
|
|
141
|
-
disabled: boolean;
|
|
142
|
-
readonly: boolean;
|
|
143
|
-
loading: boolean;
|
|
144
|
-
error: boolean;
|
|
145
|
-
valid: boolean;
|
|
146
|
-
hintLabel: string;
|
|
147
|
-
labelNoResult: string;
|
|
148
|
-
useObject: boolean;
|
|
149
|
-
multiple: boolean;
|
|
150
|
-
labelKey: string;
|
|
151
|
-
valueKey: string;
|
|
152
|
-
searchable: boolean;
|
|
153
|
-
debounceSearch: string | number;
|
|
154
|
-
separator: string;
|
|
155
|
-
native: boolean;
|
|
156
|
-
}, {}, string> & {
|
|
157
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
158
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
159
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
160
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
161
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
162
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
163
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
164
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
165
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
166
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
167
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
168
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
169
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
170
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
171
|
-
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;
|
|
172
|
-
};
|
|
173
|
-
$forceUpdate: () => void;
|
|
174
|
-
$nextTick: typeof import("vue").nextTick;
|
|
175
|
-
$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;
|
|
176
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
177
|
-
modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
|
|
178
|
-
label: StringConstructor;
|
|
179
|
-
labelNoResult: {
|
|
180
|
-
type: StringConstructor;
|
|
181
|
-
default: string;
|
|
182
|
-
};
|
|
183
|
-
placeholder: StringConstructor;
|
|
184
|
-
searchable: BooleanConstructor;
|
|
185
|
-
searchPlaceholder: StringConstructor;
|
|
186
|
-
debounceSearch: {
|
|
187
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
188
|
-
default: number;
|
|
189
|
-
};
|
|
190
|
-
options: {
|
|
191
|
-
type: import("vue").PropType<(string | Option)[]>;
|
|
192
|
-
required: boolean;
|
|
193
|
-
};
|
|
194
|
-
useObject: BooleanConstructor;
|
|
195
|
-
multiple: BooleanConstructor;
|
|
196
|
-
maxValues: (StringConstructor | NumberConstructor)[];
|
|
197
|
-
separator: {
|
|
198
|
-
type: StringConstructor;
|
|
199
|
-
default: string;
|
|
200
|
-
};
|
|
201
|
-
labelKey: {
|
|
202
|
-
type: StringConstructor;
|
|
203
|
-
default: string;
|
|
204
|
-
};
|
|
205
|
-
valueKey: {
|
|
206
|
-
type: StringConstructor;
|
|
207
|
-
default: string;
|
|
208
|
-
};
|
|
209
|
-
iconLeft: StringConstructor;
|
|
210
|
-
iconRight: StringConstructor;
|
|
211
|
-
native: BooleanConstructor;
|
|
212
|
-
modifiers: import("vue").PropType<string | string[]>;
|
|
213
|
-
readonly: BooleanConstructor;
|
|
214
|
-
disabled: BooleanConstructor;
|
|
215
|
-
loading: BooleanConstructor;
|
|
216
|
-
loadingLabel: StringConstructor;
|
|
217
|
-
hintLabel: {
|
|
218
|
-
type: StringConstructor;
|
|
219
|
-
default: string;
|
|
220
|
-
};
|
|
221
|
-
error: BooleanConstructor;
|
|
222
|
-
errorLabel: (StringConstructor | ArrayConstructor)[];
|
|
223
|
-
valid: BooleanConstructor;
|
|
224
|
-
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
225
|
-
}>> & {
|
|
226
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
227
|
-
"onChange:search"?: ((...args: any[]) => any) | undefined;
|
|
228
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
229
|
-
__isFragment?: undefined;
|
|
230
|
-
__isTeleport?: undefined;
|
|
231
|
-
__isSuspense?: undefined;
|
|
232
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
233
|
-
modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
|
|
1
|
+
import type { Option } from '@/components/VvDropdown';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: (ArrayConstructor | ObjectConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
234
7
|
label: StringConstructor;
|
|
235
8
|
labelNoResult: {
|
|
236
9
|
type: StringConstructor;
|
|
@@ -265,6 +38,10 @@ declare const _default: {
|
|
|
265
38
|
iconLeft: StringConstructor;
|
|
266
39
|
iconRight: StringConstructor;
|
|
267
40
|
native: BooleanConstructor;
|
|
41
|
+
tabindex: {
|
|
42
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
268
45
|
modifiers: import("vue").PropType<string | string[]>;
|
|
269
46
|
readonly: BooleanConstructor;
|
|
270
47
|
disabled: BooleanConstructor;
|
|
@@ -275,19 +52,77 @@ declare const _default: {
|
|
|
275
52
|
default: string;
|
|
276
53
|
};
|
|
277
54
|
error: BooleanConstructor;
|
|
278
|
-
errorLabel: (
|
|
55
|
+
errorLabel: (ArrayConstructor | StringConstructor)[];
|
|
279
56
|
valid: BooleanConstructor;
|
|
280
|
-
validLabel: (
|
|
57
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
58
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change:search")[], "update:modelValue" | "change:search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
modelValue: {
|
|
60
|
+
type: (ArrayConstructor | ObjectConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
label: StringConstructor;
|
|
64
|
+
labelNoResult: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
placeholder: StringConstructor;
|
|
69
|
+
searchable: BooleanConstructor;
|
|
70
|
+
searchPlaceholder: StringConstructor;
|
|
71
|
+
debounceSearch: {
|
|
72
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
options: {
|
|
76
|
+
type: import("vue").PropType<(string | Option)[]>;
|
|
77
|
+
required: boolean;
|
|
78
|
+
};
|
|
79
|
+
useObject: BooleanConstructor;
|
|
80
|
+
multiple: BooleanConstructor;
|
|
81
|
+
maxValues: (StringConstructor | NumberConstructor)[];
|
|
82
|
+
separator: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
labelKey: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
valueKey: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
iconLeft: StringConstructor;
|
|
95
|
+
iconRight: StringConstructor;
|
|
96
|
+
native: BooleanConstructor;
|
|
97
|
+
tabindex: {
|
|
98
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
99
|
+
default: number;
|
|
100
|
+
};
|
|
101
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
102
|
+
readonly: BooleanConstructor;
|
|
103
|
+
disabled: BooleanConstructor;
|
|
104
|
+
loading: BooleanConstructor;
|
|
105
|
+
loadingLabel: StringConstructor;
|
|
106
|
+
hintLabel: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
error: BooleanConstructor;
|
|
111
|
+
errorLabel: (ArrayConstructor | StringConstructor)[];
|
|
112
|
+
valid: BooleanConstructor;
|
|
113
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
281
114
|
}>> & {
|
|
282
115
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
283
116
|
"onChange:search"?: ((...args: any[]) => any) | undefined;
|
|
284
|
-
}, {
|
|
117
|
+
}, {
|
|
118
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
285
119
|
disabled: boolean;
|
|
286
|
-
readonly: boolean;
|
|
287
|
-
loading: boolean;
|
|
288
120
|
error: boolean;
|
|
289
|
-
|
|
121
|
+
loading: boolean;
|
|
122
|
+
readonly: boolean;
|
|
123
|
+
tabindex: string | number;
|
|
290
124
|
hintLabel: string;
|
|
125
|
+
valid: boolean;
|
|
291
126
|
labelNoResult: string;
|
|
292
127
|
useObject: boolean;
|
|
293
128
|
multiple: boolean;
|
|
@@ -297,5 +132,5 @@ declare const _default: {
|
|
|
297
132
|
debounceSearch: string | number;
|
|
298
133
|
separator: string;
|
|
299
134
|
native: boolean;
|
|
300
|
-
}
|
|
135
|
+
}>;
|
|
301
136
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Option } from '
|
|
2
|
+
import type { Option } from '@/components/VvDropdown';
|
|
3
3
|
export declare const VvSelectProps: {
|
|
4
4
|
/**
|
|
5
|
-
* modelValue can be
|
|
5
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
6
6
|
*/
|
|
7
|
-
modelValue:
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: (ArrayConstructor | ObjectConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
8
11
|
/**
|
|
9
12
|
* Select input label
|
|
10
13
|
*/
|
|
@@ -87,6 +90,10 @@ export declare const VvSelectProps: {
|
|
|
87
90
|
* Icon name of icon in right position
|
|
88
91
|
*/
|
|
89
92
|
native: BooleanConstructor;
|
|
93
|
+
tabindex: {
|
|
94
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
95
|
+
default: number;
|
|
96
|
+
};
|
|
90
97
|
modifiers: PropType<string | string[]>;
|
|
91
98
|
readonly: BooleanConstructor;
|
|
92
99
|
disabled: BooleanConstructor;
|
|
@@ -97,7 +104,7 @@ export declare const VvSelectProps: {
|
|
|
97
104
|
default: string;
|
|
98
105
|
};
|
|
99
106
|
error: BooleanConstructor;
|
|
100
|
-
errorLabel: (
|
|
107
|
+
errorLabel: (ArrayConstructor | StringConstructor)[];
|
|
101
108
|
valid: BooleanConstructor;
|
|
102
|
-
validLabel: (
|
|
109
|
+
validLabel: (ArrayConstructor | StringConstructor)[];
|
|
103
110
|
};
|