@volverjs/ui-vue 0.0.1-beta.6 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +101 -7
- package/bin/icons.cjs +73 -0
- package/bin/icons.js +75 -0
- package/dist/{DesignSystem.d.ts → Volver.d.ts} +22 -18
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -0
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
- package/dist/components/VvAccordion/index.d.ts +46 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +77 -151
- package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +30 -13
- package/dist/components/VvBadge/VvBadge.es.js +62 -0
- package/dist/components/VvBadge/VvBadge.umd.js +1 -0
- package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -54
- package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +93 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +33 -107
- package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +2 -3
- package/dist/components/VvButton/VvButton.es.js +427 -0
- package/dist/components/VvButton/VvButton.umd.js +1 -0
- package/dist/components/VvButton/VvButton.vue.d.ts +108 -199
- package/dist/components/VvButton/index.d.ts +132 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +108 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +89 -183
- package/dist/components/VvButtonGroup/index.d.ts +54 -0
- package/dist/components/VvCard/VvCard.es.js +77 -0
- package/dist/components/VvCard/VvCard.umd.js +1 -0
- package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
- package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +357 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +74 -0
- package/dist/components/VvCheckbox/index.d.ts +54 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +435 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +82 -0
- package/dist/components/VvCheckboxGroup/index.d.ts +32 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +594 -0
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -0
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +153 -0
- package/dist/components/{VvSelect/VvSelect.d.ts → VvCombobox/index.d.ts} +33 -36
- package/dist/components/VvDialog/VvDialog.es.js +200 -0
- package/dist/components/VvDialog/VvDialog.umd.js +1 -0
- package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
- package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
- package/dist/components/VvDropdown/VvDropdown.es.js +218 -0
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -0
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +41 -147
- package/dist/components/VvDropdown/index.d.ts +37 -0
- package/dist/components/VvIcon/VvIcon.es.js +124 -0
- package/dist/components/VvIcon/VvIcon.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
- package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
- package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
- package/dist/components/VvInputText/VvInputText.es.js +764 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +214 -256
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- package/dist/components/VvInputText/index.d.ts +182 -0
- package/dist/components/VvProgress/VvProgress.es.js +71 -0
- package/dist/components/VvProgress/VvProgress.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.vue.d.ts +20 -107
- package/dist/components/VvProgress/index.d.ts +30 -0
- package/dist/components/VvRadio/VvRadio.es.js +320 -0
- package/dist/components/VvRadio/VvRadio.umd.js +1 -0
- package/dist/components/VvRadio/VvRadio.vue.d.ts +55 -125
- package/dist/components/VvRadio/index.d.ts +40 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +398 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +56 -238
- package/dist/components/VvRadioGroup/index.d.ts +32 -0
- package/dist/components/VvSelect/VvSelect.es.js +415 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -0
- package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -262
- package/dist/components/VvSelect/index.d.ts +96 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +463 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -0
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +147 -273
- package/dist/components/VvTextarea/index.d.ts +102 -0
- package/dist/components/common/HintSlot.d.ts +12 -6
- package/dist/components/index.d.ts +19 -12
- package/dist/components/index.es.js +2309 -0
- package/dist/components/index.umd.js +1 -0
- package/dist/composables/group/types/IAccordionGroupState.d.ts +3 -4
- package/dist/composables/group/types/IButtonGroupState.d.ts +5 -11
- package/dist/composables/group/types/IGroupState.d.ts +3 -6
- package/dist/composables/group/types/IInputGroup.d.ts +1 -4
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
- package/dist/composables/group/useProvideGroupState.d.ts +2 -2
- package/dist/composables/useComponentFocus.d.ts +4 -0
- package/dist/composables/{icons/useComponentIcons.d.ts → useComponentIcons.d.ts} +8 -1
- package/dist/composables/useDebouncedInput.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- package/dist/composables/useOptions.d.ts +6 -0
- package/dist/composables/useTextCount.d.ts +10 -0
- package/dist/constants.d.ts +4 -4
- package/dist/icons.d.ts +1881 -0
- package/dist/icons.es.js +12 -14
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.es.js +2350 -0
- package/dist/index.umd.js +1 -0
- package/dist/props/index.d.ts +322 -13
- package/dist/resolvers/unplugin.d.ts +27 -0
- package/dist/resolvers/unplugin.es.js +40 -0
- package/dist/resolvers/unplugin.umd.js +1 -0
- package/dist/stories/Accordion/Accordion.settings.d.ts +63 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +58 -0
- package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/stories/Badge/Badge.settings.d.ts +32 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +29 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Button/Button.settings.d.ts +200 -0
- package/dist/stories/Button/Button.test.d.ts +1 -10
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +38 -0
- package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
- package/dist/stories/Card/Card.settings.d.ts +70 -0
- package/dist/stories/Card/Card.test.d.ts +2 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +165 -0
- package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +164 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +267 -0
- package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +55 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +75 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Icon/Icon.settings.d.ts +74 -0
- package/dist/stories/InputText/InputText.settings.d.ts +445 -0
- package/dist/stories/InputText/InputText.test.d.ts +2 -0
- package/dist/stories/Progress/Progress.settings.d.ts +38 -0
- package/dist/stories/Progress/Progress.test.d.ts +2 -0
- package/dist/stories/Radio/Radio.settings.d.ts +139 -0
- package/dist/stories/Radio/Radio.test.d.ts +2 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +164 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/dist/stories/Select/Select.settings.d.ts +265 -0
- package/dist/stories/Select/Select.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +336 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
- package/dist/stories/argTypes.d.ts +793 -0
- package/dist/test/expect.d.ts +3 -0
- package/dist/test/options.d.ts +1 -0
- package/dist/test/sleep.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +82 -95
- package/env.d.ts +1 -0
- package/package.json +198 -124
- package/src/{DesignSystem.ts → Volver.ts} +57 -29
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +94 -78
- package/src/components/VvAccordion/index.ts +72 -0
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +93 -53
- package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +18 -14
- package/src/components/VvBadge/VvBadge.vue +17 -8
- package/src/components/VvBadge/index.ts +6 -0
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +26 -24
- package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -2
- package/src/components/VvButton/VvButton.vue +174 -154
- package/src/components/VvButton/index.ts +171 -0
- package/src/components/VvButtonGroup/VvButtonGroup.vue +76 -48
- package/src/components/VvButtonGroup/index.ts +19 -0
- package/src/components/VvCard/VvCard.vue +20 -22
- package/src/components/VvCard/{VvCard.ts → index.ts} +1 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +172 -0
- package/src/components/VvCheckbox/index.ts +60 -0
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +85 -0
- package/src/components/VvCheckboxGroup/index.ts +5 -0
- package/src/components/VvCombobox/VvCombobox.vue +227 -0
- package/src/components/VvCombobox/index.ts +82 -0
- package/src/components/VvDialog/VvDialog.vue +69 -67
- package/src/components/VvDialog/index.ts +10 -0
- package/src/components/VvDropdown/VvDropdown.vue +112 -114
- package/src/components/VvDropdown/index.ts +25 -0
- package/src/components/VvIcon/README.md +64 -0
- package/src/components/VvIcon/VvIcon.vue +122 -107
- package/src/components/VvIcon/{VvIcon.ts → index.ts} +17 -8
- package/src/components/VvInputText/VvInputClearAction.ts +53 -0
- package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
- package/src/components/VvInputText/VvInputStepAction.ts +49 -0
- package/src/components/VvInputText/VvInputText.vue +293 -252
- package/src/components/VvInputText/VvInputTextActions.ts +100 -0
- package/src/components/VvInputText/index.ts +140 -0
- package/src/components/VvProgress/VvProgress.vue +29 -29
- package/src/components/VvProgress/index.ts +32 -0
- package/src/components/VvRadio/VvRadio.vue +90 -119
- package/src/components/VvRadio/index.ts +40 -0
- package/src/components/VvRadioGroup/VvRadioGroup.vue +76 -69
- package/src/components/VvRadioGroup/index.ts +5 -0
- package/src/components/VvSelect/VvSelect.vue +165 -186
- package/src/components/VvSelect/index.ts +74 -0
- package/src/components/VvTextarea/VvTextarea.vue +188 -180
- package/src/components/VvTextarea/index.ts +50 -0
- package/src/components/common/HintSlot.ts +169 -121
- package/src/components/index.ts +19 -12
- package/src/composables/group/types/IAccordionGroupState.ts +3 -4
- package/src/composables/group/types/IButtonGroupState.ts +5 -11
- package/src/composables/group/types/IGroupState.ts +4 -6
- package/src/composables/group/types/IInputGroup.ts +1 -4
- package/src/composables/group/useInjectedGroupState.ts +21 -33
- package/src/composables/group/useProvideGroupState.ts +5 -7
- package/src/composables/useComponentFocus.ts +17 -0
- package/src/composables/useComponentIcons.ts +96 -0
- package/src/composables/useDebouncedInput.ts +25 -0
- package/src/composables/useModifiers.ts +58 -14
- package/src/composables/useOptions.ts +31 -0
- package/src/composables/useTextCount.ts +57 -0
- package/src/constants.ts +5 -7
- package/src/directives/{.README → .gitkeep} +0 -0
- package/src/icons.ts +7 -0
- package/src/index.ts +12 -5
- package/src/props/index.ts +204 -15
- package/src/resolvers/unplugin.ts +103 -0
- package/src/shims.d.ts +13 -0
- package/src/stories/Accordion/Accordion.settings.ts +46 -0
- package/src/stories/Accordion/Accordion.stories.mdx +21 -21
- package/src/stories/Accordion/Accordion.test.ts +61 -0
- package/src/stories/Accordion/AccordionSlots.stories.mdx +46 -70
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +55 -0
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +24 -27
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +50 -0
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +56 -0
- package/src/stories/Badge/Badge.settings.ts +26 -0
- package/src/stories/Badge/Badge.stories.mdx +36 -24
- package/src/stories/Badge/Badge.test.ts +12 -0
- package/src/stories/Badge/BadgeSlots.stories.mdx +20 -0
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +41 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +32 -29
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +50 -0
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +43 -0
- package/src/stories/Button/Button.settings.ts +150 -0
- package/src/stories/Button/Button.stories.mdx +20 -54
- package/src/stories/Button/Button.test.ts +35 -46
- package/src/stories/Button/ButtonIcon.stories.mdx +139 -29
- package/src/stories/Button/ButtonLink.stories.mdx +58 -111
- package/src/stories/Button/ButtonLoading.stories.mdx +89 -62
- package/src/stories/Button/ButtonModifiers.stories.mdx +198 -121
- package/src/stories/Button/ButtonSlots.stories.mdx +83 -95
- package/src/stories/Button/ButtonState.stories.mdx +75 -0
- package/src/stories/Button/ButtonToggle.stories.mdx +50 -0
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +28 -0
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +16 -18
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +35 -0
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +52 -0
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +45 -114
- package/src/stories/Card/Card.settings.ts +55 -0
- package/src/stories/Card/Card.stories.mdx +27 -11
- package/src/stories/Card/Card.test.ts +23 -0
- package/src/stories/Card/CardSlots.stories.mdx +80 -24
- package/src/stories/Checkbox/Checkbox.settings.ts +43 -0
- package/src/stories/Checkbox/Checkbox.stories.mdx +163 -0
- package/src/stories/Checkbox/Checkbox.test.ts +81 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +68 -0
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +46 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +15 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +134 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +83 -0
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +100 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +67 -0
- package/src/stories/Combobox/Combobox.settings.ts +122 -0
- package/src/stories/Combobox/Combobox.stories.mdx +153 -0
- package/src/stories/Combobox/Combobox.test.ts +96 -0
- package/src/stories/Combobox/ComboboxMultiple.stories.mdx +74 -0
- package/src/stories/Combobox/ComboboxOptions.stories.mdx +100 -0
- package/src/stories/Combobox/ComboboxSlots.stories.mdx +48 -0
- package/src/stories/Dialog/Dialog.settings.ts +45 -0
- package/src/stories/Dialog/Dialog.stories.mdx +42 -16
- package/src/stories/Dialog/Dialog.test.ts +69 -0
- package/src/stories/Dialog/DialogSlots.stories.mdx +63 -0
- package/src/stories/Dropdown/Dropdown.settings.ts +42 -0
- package/src/stories/Dropdown/Dropdown.stories.mdx +85 -29
- package/src/stories/Dropdown/Dropdown.test.ts +43 -0
- package/src/stories/Dropdown/DropdownOptions.stories.mdx +87 -67
- package/src/stories/Icon/Icon.settings.ts +72 -0
- package/src/stories/Icon/Icon.stories.mdx +76 -59
- package/src/stories/Icon/IconsCollection.stories.mdx +68 -0
- package/src/stories/InputText/InputText.settings.ts +221 -0
- package/src/stories/InputText/InputText.stories.mdx +142 -69
- package/src/stories/InputText/InputText.test.ts +125 -0
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +63 -16
- package/src/stories/InputText/InputTextLength.stories.mdx +110 -0
- package/src/stories/InputText/InputTextMinMax.stories.mdx +112 -0
- package/src/stories/InputText/InputTextSlots.stories.mdx +61 -22
- package/src/stories/InputText/InputTextType.stories.mdx +207 -29
- package/src/stories/Progress/Progress.settings.ts +33 -0
- package/src/stories/Progress/Progress.stories.mdx +12 -14
- package/src/stories/Progress/Progress.test.ts +9 -0
- package/src/stories/Radio/Radio.settings.ts +15 -0
- package/src/stories/Radio/Radio.stories.mdx +102 -42
- package/src/stories/Radio/Radio.test.ts +70 -0
- package/src/stories/Radio/RadioSlots.stories.mdx +39 -22
- package/src/stories/RadioGroup/RadioGroup.settings.ts +15 -0
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +115 -54
- package/src/stories/RadioGroup/RadioGroup.test.ts +83 -0
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +83 -41
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +49 -144
- package/src/stories/Select/Select.settings.ts +100 -0
- package/src/stories/Select/Select.stories.mdx +113 -33
- package/src/stories/Select/Select.test.ts +82 -0
- package/src/stories/Select/SelectOptions.stories.mdx +91 -69
- package/src/stories/Select/SelectSlots.stories.mdx +48 -0
- package/src/stories/Textarea/Textarea.settings.ts +96 -0
- package/src/stories/Textarea/Textarea.stories.mdx +160 -58
- package/src/stories/Textarea/Textarea.test.ts +90 -0
- package/src/stories/Textarea/TextareaLength.stories.mdx +110 -0
- package/src/stories/Textarea/TextareaSlots.stories.mdx +61 -23
- package/src/stories/Textarea/TextareatIconPosition.stories.mdx +78 -0
- package/src/stories/argTypes.ts +433 -0
- package/src/test/expect.ts +27 -6
- package/src/test/options.ts +17 -0
- package/src/test/sleep.ts +2 -0
- package/src/test/types.d.ts +14 -0
- package/src/types/generic.d.ts +5 -0
- package/src/utils/ObjectUtilities.ts +253 -244
- package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
- package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
- package/dist/components/VvAccordion/vv-accordion.es.js +0 -262
- package/dist/components/VvAccordion/vv-accordion.umd.js +0 -1
- package/dist/components/VvAccordionGroup/vv-accordion-group.es.js +0 -315
- package/dist/components/VvAccordionGroup/vv-accordion-group.umd.js +0 -1
- package/dist/components/VvBadge/vv-badge.es.js +0 -18
- package/dist/components/VvBadge/vv-badge.umd.js +0 -1
- package/dist/components/VvBreadcrumb/vv-breadcrumb.es.js +0 -206
- package/dist/components/VvBreadcrumb/vv-breadcrumb.umd.js +0 -1
- package/dist/components/VvButton/VvButton.d.ts +0 -115
- package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -23
- package/dist/components/VvButton/vv-button.es.js +0 -424
- package/dist/components/VvButton/vv-button.umd.js +0 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.d.ts +0 -57
- package/dist/components/VvButtonGroup/vv-button-group.es.js +0 -210
- package/dist/components/VvButtonGroup/vv-button-group.umd.js +0 -1
- package/dist/components/VvCard/vv-card.es.js +0 -188
- package/dist/components/VvCard/vv-card.umd.js +0 -1
- package/dist/components/VvCheck/VvCheck.d.ts +0 -47
- package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
- package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
- package/dist/components/VvCheck/vv-check.es.js +0 -321
- package/dist/components/VvCheck/vv-check.umd.js +0 -1
- package/dist/components/VvCheckGroup/VvCheckGroup.d.ts +0 -65
- package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
- package/dist/components/VvCheckGroup/vv-check-group.es.js +0 -434
- package/dist/components/VvCheckGroup/vv-check-group.umd.js +0 -2
- package/dist/components/VvDialog/constants.d.ts +0 -5
- package/dist/components/VvDialog/vv-dialog.es.js +0 -315
- package/dist/components/VvDialog/vv-dialog.umd.js +0 -1
- package/dist/components/VvDropdown/VvDropdown.d.ts +0 -52
- package/dist/components/VvDropdown/vv-dropdown.es.js +0 -236
- package/dist/components/VvDropdown/vv-dropdown.umd.js +0 -1
- package/dist/components/VvIcon/vv-icon.es.js +0 -229
- package/dist/components/VvIcon/vv-icon.umd.js +0 -1
- package/dist/components/VvInputText/VvInputText.d.ts +0 -59
- package/dist/components/VvInputText/constants.d.ts +0 -55
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/dist/components/VvInputText/vv-input-text.es.js +0 -596
- package/dist/components/VvInputText/vv-input-text.umd.js +0 -2
- package/dist/components/VvNativeSelect/VvNativeSelect.d.ts +0 -70
- package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +0 -228
- package/dist/components/VvNativeSelect/vv-native-select.es.js +0 -395
- package/dist/components/VvNativeSelect/vv-native-select.umd.js +0 -2
- package/dist/components/VvProgress/VvProgress.d.ts +0 -29
- package/dist/components/VvProgress/vv-progress.es.js +0 -185
- package/dist/components/VvProgress/vv-progress.umd.js +0 -1
- package/dist/components/VvRadio/VvRadio.d.ts +0 -22
- package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
- package/dist/components/VvRadio/vv-radio.es.js +0 -309
- package/dist/components/VvRadio/vv-radio.umd.js +0 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.d.ts +0 -54
- package/dist/components/VvRadioGroup/vv-radio-group.es.js +0 -423
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +0 -2
- package/dist/components/VvSelect/vv-select.es.js +0 -427
- package/dist/components/VvSelect/vv-select.umd.js +0 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +0 -67
- package/dist/components/VvTextarea/constants.d.ts +0 -19
- package/dist/components/VvTextarea/vv-textarea.es.js +0 -472
- package/dist/components/VvTextarea/vv-textarea.umd.js +0 -2
- package/dist/composables/focus/useComponentFocus.d.ts +0 -7
- package/dist/composables/options/useOptions.d.ts +0 -5
- package/dist/stories/Icon/IconList.vue.d.ts +0 -44
- package/dist/ui-vue.es.js +0 -2985
- package/dist/ui-vue.umd.js +0 -2
- package/src/assets/icons/index.js +0 -7
- package/src/components/VvAccordion/VvAccordion.ts +0 -34
- package/src/components/VvAccordion/useAccordionProps.ts +0 -45
- package/src/components/VvBadge/VvBadge.ts +0 -4
- package/src/components/VvButton/VvButton.ts +0 -117
- package/src/components/VvButton/useButtonGroupProps.ts +0 -51
- package/src/components/VvButtonGroup/VvButtonGroup.ts +0 -37
- package/src/components/VvCheck/VvCheck.ts +0 -48
- package/src/components/VvCheck/VvCheck.vue +0 -149
- package/src/components/VvCheck/useCheckProps.ts +0 -41
- package/src/components/VvCheckGroup/VvCheckGroup.ts +0 -34
- package/src/components/VvCheckGroup/VvCheckGroup.vue +0 -84
- package/src/components/VvDialog/VvDialog.ts +0 -17
- package/src/components/VvDialog/constants.ts +0 -5
- package/src/components/VvDropdown/VvDropdown.ts +0 -46
- package/src/components/VvInputText/VvInputText.ts +0 -49
- package/src/components/VvInputText/constants.ts +0 -34
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- package/src/components/VvInputText/useInputPassword.ts +0 -38
- package/src/components/VvNativeSelect/VvNativeSelect.ts +0 -70
- package/src/components/VvNativeSelect/VvNativeSelect.vue +0 -106
- package/src/components/VvProgress/VvProgress.ts +0 -28
- package/src/components/VvRadio/VvRadio.ts +0 -25
- package/src/components/VvRadio/useRadioProps.ts +0 -40
- package/src/components/VvRadioGroup/VvRadioGroup.ts +0 -25
- package/src/components/VvSelect/VvSelect.ts +0 -91
- package/src/components/VvTextarea/VvTextarea.ts +0 -55
- package/src/components/VvTextarea/constants.ts +0 -14
- package/src/composables/focus/useComponentFocus.ts +0 -22
- package/src/composables/icons/useComponentIcons.ts +0 -52
- package/src/composables/options/useOptions.ts +0 -27
- package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
- package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
- package/src/stories/Accordion/accordionTest.js +0 -36
- package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
- package/src/stories/AccordionGroup/AccordionItems.stories.mdx +0 -51
- package/src/stories/AccordionGroup/accordionGroupTest.js +0 -51
- package/src/stories/Badge/BadgeColor.stories.mdx +0 -54
- package/src/stories/Badge/BadgeDot.stories.mdx +0 -20
- package/src/stories/Badge/BadgeTest.js +0 -21
- package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +0 -41
- package/src/stories/Button/ButtonBadge.stories.mdx +0 -34
- package/src/stories/Button/ButtonIconPosition.stories.mdx +0 -106
- package/src/stories/Button/ButtonVariant.stories.mdx +0 -205
- package/src/stories/Button/test.js +0 -41
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +0 -83
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +0 -50
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +0 -40
- package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +0 -38
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +0 -77
- package/src/stories/ButtonGroup/ButtonGroupTest.js +0 -61
- package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +0 -38
- package/src/stories/Card/CardVariant.stories.mdx +0 -37
- package/src/stories/Check/Check.stories.mdx +0 -62
- package/src/stories/Check/CheckBinary.stories.mdx +0 -80
- package/src/stories/Check/CheckDisabled.stories.mdx +0 -30
- package/src/stories/Check/CheckError.stories.mdx +0 -64
- package/src/stories/Check/CheckErrorTests.js +0 -72
- package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
- package/src/stories/Check/CheckPropertyTest.js +0 -101
- package/src/stories/Check/CheckReadonly.stories.mdx +0 -30
- package/src/stories/Check/CheckSlots.stories.mdx +0 -51
- package/src/stories/Check/CheckSwitch.stories.mdx +0 -30
- package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
- package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
- package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupOptionLabel.stories.mdx +0 -48
- package/src/stories/CheckGroup/CheckGroupOptionValue.stories.mdx +0 -48
- package/src/stories/CheckGroup/CheckGroupOptions.stories.mdx +0 -40
- package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
- package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
- package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
- package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
- package/src/stories/Dialog/DialogAutoClose.stories.mdx +0 -18
- package/src/stories/Dialog/DialogSize.stories.mdx +0 -36
- package/src/stories/Dropdown/DropdownDisabled.stories.mdx +0 -25
- package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +0 -25
- package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +0 -26
- package/src/stories/Dropdown/DropdownMultiple.stories.mdx +0 -56
- package/src/stories/Dropdown/DropdownUseObject.stories.mdx +0 -58
- package/src/stories/Icon/IconList.vue +0 -34
- package/src/stories/Icon/IconPrefix.stories.mdx +0 -79
- package/src/stories/Icon/IconRemote.stories.mdx +0 -39
- package/src/stories/Icon/IconTest.js +0 -27
- package/src/stories/Icon/IconsList.stories.mdx +0 -35
- package/src/stories/InputText/InputTextAutocomplete.stories.mdx +0 -15
- package/src/stories/InputText/InputTextAutofocus.stories.mdx +0 -20
- package/src/stories/InputText/InputTextDisabled.stories.mdx +0 -19
- package/src/stories/InputText/InputTextError.stories.mdx +0 -19
- package/src/stories/InputText/InputTextFloating.stories.mdx +0 -20
- package/src/stories/InputText/InputTextHintLabel.stories.mdx +0 -18
- package/src/stories/InputText/InputTextIcon.stories.mdx +0 -18
- package/src/stories/InputText/InputTextLabel.stories.mdx +0 -15
- package/src/stories/InputText/InputTextLoading.stories.mdx +0 -19
- package/src/stories/InputText/InputTextMax.stories.mdx +0 -31
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +0 -15
- package/src/stories/InputText/InputTextMin.stories.mdx +0 -31
- package/src/stories/InputText/InputTextMinLength.stories.mdx +0 -15
- package/src/stories/InputText/InputTextPlaceholder.stories.mdx +0 -15
- package/src/stories/InputText/InputTextReadonly.stories.mdx +0 -19
- package/src/stories/InputText/InputTextStep.stories.mdx +0 -31
- package/src/stories/InputText/InputTextValid.stories.mdx +0 -19
- package/src/stories/NativeSelect/NativeSelect.stories.mdx +0 -53
- package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +0 -32
- package/src/stories/NativeSelect/NativeSelectError.stories.mdx +0 -36
- package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +0 -34
- package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +0 -42
- package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +0 -27
- package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +0 -78
- package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +0 -34
- package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +0 -66
- package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +0 -36
- package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +0 -66
- package/src/stories/Progress/ProgressDeterminate.stories.mdx +0 -19
- package/src/stories/Radio/RadioDisabled.stories.mdx +0 -30
- package/src/stories/Radio/RadioError.stories.mdx +0 -64
- package/src/stories/Radio/RadioHintLabel.stories.mdx +0 -30
- package/src/stories/Radio/RadioTest.js +0 -89
- package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupError.stories.mdx +0 -31
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +0 -28
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +0 -65
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +0 -65
- package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +0 -31
- package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +0 -29
- package/src/stories/RadioGroup/RadioOptionsTest.js +0 -78
- package/src/stories/RadioGroup/RadioPropertyTest.js +0 -131
- package/src/stories/RadioGroup/RadioSlotsTest.js +0 -20
- package/src/stories/Select/SelectDisabled.stories.mdx +0 -32
- package/src/stories/Select/SelectMaxValues.stories.mdx +0 -33
- package/src/stories/Select/SelectMultiple.stories.mdx +0 -64
- package/src/stories/Select/SelectSearchable.stories.mdx +0 -80
- package/src/stories/Select/SelectSeparator.stories.mdx +0 -64
- package/src/stories/Select/SelectUseObject.stories.mdx +0 -66
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaError.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaFloating.stories.mdx +0 -20
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIcon.stories.mdx +0 -18
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaLabel.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaLoading.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +0 -15
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +0 -19
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +0 -31
- package/src/stories/Textarea/TextareaValid.stories.mdx +0 -19
- package/src/stories/stories.scss +0 -24
- package/src/stories/volver-ui-vue.stories.mdx +0 -71
- package/src/types/.README +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { VvAccordionPropsTypes } from './VvAccordion';
|
|
2
|
-
import type IAccordionGroupState from '@/composables/group/types/IAccordionGroupState';
|
|
3
|
-
/**
|
|
4
|
-
* Estreae tutte le prop del componente VvButton che possono essere
|
|
5
|
-
* "sovrascritte" quando il buttone si trova in un gruppo.
|
|
6
|
-
*/
|
|
7
|
-
export declare function toAccordionRefs(props: VvAccordionPropsTypes, emit: (event: any, ...args: any[]) => void): {
|
|
8
|
-
modelValue: import("vue").WritableComputedRef<any>;
|
|
9
|
-
disabled: import("vue").WritableComputedRef<any>;
|
|
10
|
-
bordered: import("vue").WritableComputedRef<any>;
|
|
11
|
-
iconRight: import("vue").WritableComputedRef<any>;
|
|
12
|
-
isInGroup: import("vue").ComputedRef<boolean>;
|
|
13
|
-
group: import("vue").Ref<IAccordionGroupState> | undefined;
|
|
14
|
-
accordion: import("vue").WritableComputedRef<any>;
|
|
15
|
-
modifiers: import("vue").Ref<string | unknown[] | undefined> | undefined;
|
|
16
|
-
};
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import { inject as E, computed as m, unref as d, toRef as j, toRefs as k, defineComponent as B, useAttrs as I, ref as S, openBlock as D, createElementBlock as q, normalizeClass as $, createElementVNode as A, renderSlot as O, createTextVNode as C, toDisplayString as v } from "vue";
|
|
2
|
-
import { v4 as x } from "uuid";
|
|
3
|
-
const G = {
|
|
4
|
-
title: String,
|
|
5
|
-
content: String,
|
|
6
|
-
open: Boolean,
|
|
7
|
-
iconRight: Boolean,
|
|
8
|
-
bordered: Boolean,
|
|
9
|
-
modifiers: [String, Array],
|
|
10
|
-
disabled: Boolean
|
|
11
|
-
}, F = ["update:open"], y = {
|
|
12
|
-
equals(e, t, r) {
|
|
13
|
-
return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
|
|
14
|
-
},
|
|
15
|
-
deepEquals(e, t) {
|
|
16
|
-
if (e === t)
|
|
17
|
-
return !0;
|
|
18
|
-
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
19
|
-
const r = Array.isArray(e), s = Array.isArray(t);
|
|
20
|
-
let n, o, i;
|
|
21
|
-
if (r && s) {
|
|
22
|
-
if (o = e.length, o != t.length)
|
|
23
|
-
return !1;
|
|
24
|
-
for (n = o; n-- !== 0; )
|
|
25
|
-
if (!this.deepEquals(e[n], t[n]))
|
|
26
|
-
return !1;
|
|
27
|
-
return !0;
|
|
28
|
-
}
|
|
29
|
-
if (r != s)
|
|
30
|
-
return !1;
|
|
31
|
-
const c = e instanceof Date, l = t instanceof Date;
|
|
32
|
-
if (c != l)
|
|
33
|
-
return !1;
|
|
34
|
-
if (c && l)
|
|
35
|
-
return e.getTime() == t.getTime();
|
|
36
|
-
const a = e instanceof RegExp, f = t instanceof RegExp;
|
|
37
|
-
if (a != f)
|
|
38
|
-
return !1;
|
|
39
|
-
if (a && f)
|
|
40
|
-
return e.toString() == t.toString();
|
|
41
|
-
const g = Object.keys(e);
|
|
42
|
-
if (o = g.length, o !== Object.keys(t).length)
|
|
43
|
-
return !1;
|
|
44
|
-
for (n = o; n-- !== 0; )
|
|
45
|
-
if (!Object.prototype.hasOwnProperty.call(t, g[n]))
|
|
46
|
-
return !1;
|
|
47
|
-
for (n = o; n-- !== 0; )
|
|
48
|
-
if (i = g[n], !this.deepEquals(e[i], t[i]))
|
|
49
|
-
return !1;
|
|
50
|
-
return !0;
|
|
51
|
-
}
|
|
52
|
-
return e !== e && t !== t;
|
|
53
|
-
},
|
|
54
|
-
resolveFieldData(e, t) {
|
|
55
|
-
if (e && Object.keys(e).length && t) {
|
|
56
|
-
if (t.indexOf(".") === -1)
|
|
57
|
-
return e[t];
|
|
58
|
-
{
|
|
59
|
-
const r = t.split(".");
|
|
60
|
-
let s = e;
|
|
61
|
-
for (let n = 0, o = r.length; n < o; ++n) {
|
|
62
|
-
if (e == null)
|
|
63
|
-
return null;
|
|
64
|
-
s = s[r[n]];
|
|
65
|
-
}
|
|
66
|
-
return s;
|
|
67
|
-
}
|
|
68
|
-
} else
|
|
69
|
-
return null;
|
|
70
|
-
},
|
|
71
|
-
isFunction(e) {
|
|
72
|
-
return !!(e && e.constructor && e.call && e.apply);
|
|
73
|
-
},
|
|
74
|
-
findIndexInList(e, t) {
|
|
75
|
-
let r = -1;
|
|
76
|
-
if (t) {
|
|
77
|
-
for (let s = 0; s < t.length; s++)
|
|
78
|
-
if (this.equals(t[s], e)) {
|
|
79
|
-
r = s;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return r;
|
|
84
|
-
},
|
|
85
|
-
contains(e, t) {
|
|
86
|
-
if (e != null && t && t.length) {
|
|
87
|
-
for (const r of t)
|
|
88
|
-
if (this.equals(e, r))
|
|
89
|
-
return !0;
|
|
90
|
-
}
|
|
91
|
-
return !1;
|
|
92
|
-
},
|
|
93
|
-
isEmpty(e) {
|
|
94
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
|
95
|
-
},
|
|
96
|
-
isNotEmpty(e) {
|
|
97
|
-
return !this.isEmpty(e);
|
|
98
|
-
},
|
|
99
|
-
pickBy(e, t) {
|
|
100
|
-
return Object.fromEntries(
|
|
101
|
-
Object.entries(e).filter(([r]) => t(r))
|
|
102
|
-
);
|
|
103
|
-
},
|
|
104
|
-
removeFromList(e, t) {
|
|
105
|
-
const r = this.findIndexInList(e, t);
|
|
106
|
-
return r > -1 ? t.filter((s, n) => n !== r) : t;
|
|
107
|
-
},
|
|
108
|
-
isString(e) {
|
|
109
|
-
return typeof e == "string" || e instanceof String;
|
|
110
|
-
},
|
|
111
|
-
propsToObject(e) {
|
|
112
|
-
return Object.keys(e).reduce((t, r) => {
|
|
113
|
-
var s, n, o, i, c;
|
|
114
|
-
return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (s = e[r]) != null && s.type && (Array.isArray(e[r].type) ? t[r] = ((n = e[r]) == null ? void 0 : n.default) || ((o = e[r]) == null ? void 0 : o.type[0]()) : t[r] = ((i = e[r]) == null ? void 0 : i.default) || ((c = e[r]) == null ? void 0 : c.type())), t;
|
|
115
|
-
}, {});
|
|
116
|
-
},
|
|
117
|
-
filterArray(e, t, r) {
|
|
118
|
-
return e.filter((s) => t.some((n) => typeof n == "string" ? s[r] == n : this.equals(
|
|
119
|
-
s[r],
|
|
120
|
-
n[r]
|
|
121
|
-
)));
|
|
122
|
-
},
|
|
123
|
-
kebabCase(e) {
|
|
124
|
-
var t, r;
|
|
125
|
-
if (e)
|
|
126
|
-
return (r = (t = e.match(
|
|
127
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
128
|
-
)) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
function L(e) {
|
|
132
|
-
const t = E(e, void 0);
|
|
133
|
-
console.log("Inject - ", t);
|
|
134
|
-
const r = m(() => y.isNotEmpty(t));
|
|
135
|
-
function s(n, o, i) {
|
|
136
|
-
if (t != null && t.value) {
|
|
137
|
-
const c = d(t.value)[n];
|
|
138
|
-
return m({
|
|
139
|
-
get() {
|
|
140
|
-
return c == null ? void 0 : c.value;
|
|
141
|
-
},
|
|
142
|
-
set(l) {
|
|
143
|
-
c.value = l;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
} else {
|
|
147
|
-
const c = j(o, n);
|
|
148
|
-
return m({
|
|
149
|
-
get() {
|
|
150
|
-
return c.value;
|
|
151
|
-
},
|
|
152
|
-
set(l) {
|
|
153
|
-
i && i(`update:${n}`, l);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
group: t,
|
|
160
|
-
isInGroup: r,
|
|
161
|
-
getGroupOrLocalRef: s
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const V = Symbol("VV_ACCORDION_GROUP");
|
|
165
|
-
function T(e, t) {
|
|
166
|
-
const { group: r, isInGroup: s, getGroupOrLocalRef: n } = L(V), { modifiers: o } = k(e), i = n("modelValue", e, t), c = n("bordered", e), l = n("disabled", e), a = n("iconRight", e), f = n("accordion", e);
|
|
167
|
-
return {
|
|
168
|
-
modelValue: i,
|
|
169
|
-
disabled: l,
|
|
170
|
-
bordered: c,
|
|
171
|
-
iconRight: a,
|
|
172
|
-
isInGroup: s,
|
|
173
|
-
group: r,
|
|
174
|
-
accordion: f,
|
|
175
|
-
modifiers: o
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function N(e, t) {
|
|
179
|
-
const r = { [`${e}`]: !0 };
|
|
180
|
-
return {
|
|
181
|
-
bemCssClasses: m(() => Object.keys(t).reduce((n, o) => {
|
|
182
|
-
const i = d(t[o]) || !1;
|
|
183
|
-
if (!i)
|
|
184
|
-
return n;
|
|
185
|
-
if (o === "modifiers") {
|
|
186
|
-
const c = Array.isArray(i) ? i : [i];
|
|
187
|
-
return {
|
|
188
|
-
...n,
|
|
189
|
-
...c.reduce(
|
|
190
|
-
(l, a) => ({
|
|
191
|
-
...l,
|
|
192
|
-
[`${e}--${y.kebabCase(
|
|
193
|
-
a
|
|
194
|
-
)}`]: !0
|
|
195
|
-
}),
|
|
196
|
-
{}
|
|
197
|
-
)
|
|
198
|
-
};
|
|
199
|
-
} else
|
|
200
|
-
return {
|
|
201
|
-
...n,
|
|
202
|
-
[`${e}--${y.kebabCase(o)}`]: i
|
|
203
|
-
};
|
|
204
|
-
}, r) || {})
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const Z = ["open"], z = ["aria-controls", "aria-expanded"], P = ["aria-hidden"], M = /* @__PURE__ */ B({
|
|
208
|
-
__name: "VvAccordion",
|
|
209
|
-
props: G,
|
|
210
|
-
emits: F,
|
|
211
|
-
setup(e, { emit: t }) {
|
|
212
|
-
const r = e, s = I(), n = (s == null ? void 0 : s.name) || x(), {
|
|
213
|
-
modelValue: o,
|
|
214
|
-
modifiers: i,
|
|
215
|
-
bordered: c,
|
|
216
|
-
disabled: l = S(!1),
|
|
217
|
-
iconRight: a,
|
|
218
|
-
isInGroup: f,
|
|
219
|
-
accordion: g
|
|
220
|
-
} = T(r, t), h = m(() => f.value ? g.value ? y.equals(n, o.value) : y.contains(n, o.value) : r.open), { bemCssClasses: R } = N("vv-accordion", {
|
|
221
|
-
modifiers: i,
|
|
222
|
-
disabled: l,
|
|
223
|
-
markerRight: m(() => a.value),
|
|
224
|
-
bordered: c
|
|
225
|
-
}), _ = (u) => {
|
|
226
|
-
const p = u.target;
|
|
227
|
-
t("update:open", p.open);
|
|
228
|
-
}, b = (u) => {
|
|
229
|
-
f.value && (g.value ? o.value = h.value ? null : n : o.value = h.value ? y.removeFromList(
|
|
230
|
-
n,
|
|
231
|
-
o.value
|
|
232
|
-
) : [...o.value, n], u.preventDefault());
|
|
233
|
-
};
|
|
234
|
-
return (u, p) => (D(), q("details", {
|
|
235
|
-
class: $(d(R)),
|
|
236
|
-
open: d(h),
|
|
237
|
-
onToggle: _,
|
|
238
|
-
onClick: b
|
|
239
|
-
}, [
|
|
240
|
-
A("summary", {
|
|
241
|
-
"aria-controls": `#${d(n)}`,
|
|
242
|
-
"aria-expanded": d(h),
|
|
243
|
-
class: "vv-collapse__summary"
|
|
244
|
-
}, [
|
|
245
|
-
O(u.$slots, "header", {}, () => [
|
|
246
|
-
C(v(u.title), 1)
|
|
247
|
-
])
|
|
248
|
-
], 8, z),
|
|
249
|
-
A("div", {
|
|
250
|
-
"aria-hidden": !d(h),
|
|
251
|
-
class: "vv-collapse__content"
|
|
252
|
-
}, [
|
|
253
|
-
O(u.$slots, "details", {}, () => [
|
|
254
|
-
C(v(u.content), 1)
|
|
255
|
-
])
|
|
256
|
-
], 8, P)
|
|
257
|
-
], 42, Z));
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
export {
|
|
261
|
-
M as default
|
|
262
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("vue"),require("uuid")):typeof define=="function"&&define.amd?define(["vue","uuid"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.VvAccordion=g(s.vue,s.uuid))})(this,function(s,g){"use strict";const A={title:String,content:String,open:Boolean,iconRight:Boolean,bordered:Boolean,modifiers:[String,Array],disabled:Boolean},O=["update:open"],m={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),o=Array.isArray(t);let r,i,c;if(n&&o){if(i=e.length,i!=t.length)return!1;for(r=i;r--!==0;)if(!this.deepEquals(e[r],t[r]))return!1;return!0}if(n!=o)return!1;const l=e instanceof Date,a=t instanceof Date;if(l!=a)return!1;if(l&&a)return e.getTime()==t.getTime();const f=e instanceof RegExp,d=t instanceof RegExp;if(f!=d)return!1;if(f&&d)return e.toString()==t.toString();const y=Object.keys(e);if(i=y.length,i!==Object.keys(t).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,y[r]))return!1;for(r=i;r--!==0;)if(c=y[r],!this.deepEquals(e[c],t[c]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let o=e;for(let r=0,i=n.length;r<i;++r){if(e==null)return null;o=o[n[r]]}return o}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let o=0;o<t.length;o++)if(this.equals(t[o],e)){n=o;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((o,r)=>r!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var o,r,i,c,l;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(o=e[n])!=null&&o.type&&(Array.isArray(e[n].type)?t[n]=((r=e[n])==null?void 0:r.default)||((i=e[n])==null?void 0:i.type[0]()):t[n]=((c=e[n])==null?void 0:c.default)||((l=e[n])==null?void 0:l.type())),t},{})},filterArray(e,t,n){return e.filter(o=>t.some(r=>typeof r=="string"?o[n]==r:this.equals(o[n],r[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.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:t.join("-"))==null?void 0:n.toLowerCase()}};function C(e){const t=s.inject(e,void 0);console.log("Inject - ",t);const n=s.computed(()=>m.isNotEmpty(t));function o(r,i,c){if(t!=null&&t.value){const l=s.unref(t.value)[r];return s.computed({get(){return l==null?void 0:l.value},set(a){l.value=a}})}else{const l=s.toRef(i,r);return s.computed({get(){return l.value},set(a){c&&c(`update:${r}`,a)}})}}return{group:t,isInGroup:n,getGroupOrLocalRef:o}}const _=Symbol("VV_ACCORDION_GROUP");function R(e,t){const{group:n,isInGroup:o,getGroupOrLocalRef:r}=C(_),{modifiers:i}=s.toRefs(e),c=r("modelValue",e,t),l=r("bordered",e),a=r("disabled",e),f=r("iconRight",e),d=r("accordion",e);return{modelValue:c,disabled:a,bordered:l,iconRight:f,isInGroup:o,group:n,accordion:d,modifiers:i}}function E(e,t){const n={[`${e}`]:!0};return{bemCssClasses:s.computed(()=>Object.keys(t).reduce((r,i)=>{const c=s.unref(t[i])||!1;if(!c)return r;if(i==="modifiers"){const l=Array.isArray(c)?c:[c];return{...r,...l.reduce((a,f)=>({...a,[`${e}--${m.kebabCase(f)}`]:!0}),{})}}else return{...r,[`${e}--${m.kebabCase(i)}`]:c}},n)||{})}}const b=["open"],j=["aria-controls","aria-expanded"],k=["aria-hidden"];return s.defineComponent({__name:"VvAccordion",props:A,emits:O,setup(e,{emit:t}){const n=e,o=s.useAttrs(),r=(o==null?void 0:o.name)||g.v4(),{modelValue:i,modifiers:c,bordered:l,disabled:a=s.ref(!1),iconRight:f,isInGroup:d,accordion:y}=R(n,t),h=s.computed(()=>d.value?y.value?m.equals(r,i.value):m.contains(r,i.value):n.open),{bemCssClasses:S}=E("vv-accordion",{modifiers:c,disabled:a,markerRight:s.computed(()=>f.value),bordered:l}),q=u=>{const p=u.target;t("update:open",p.open)},B=u=>{d.value&&(y.value?i.value=h.value?null:r:i.value=h.value?m.removeFromList(r,i.value):[...i.value,r],u.preventDefault())};return(u,p)=>(s.openBlock(),s.createElementBlock("details",{class:s.normalizeClass(s.unref(S)),open:s.unref(h),onToggle:q,onClick:B},[s.createElementVNode("summary",{"aria-controls":`#${s.unref(r)}`,"aria-expanded":s.unref(h),class:"vv-collapse__summary"},[s.renderSlot(u.$slots,"header",{},()=>[s.createTextVNode(s.toDisplayString(u.title),1)])],8,j),s.createElementVNode("div",{"aria-hidden":!s.unref(h),class:"vv-collapse__content"},[s.renderSlot(u.$slots,"details",{},()=>[s.createTextVNode(s.toDisplayString(u.content),1)])],8,k)],42,b))}})});
|
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
import { inject as I, computed as p, unref as u, toRef as $, toRefs as B, defineComponent as G, useAttrs as D, ref as q, openBlock as v, createElementBlock as O, normalizeClass as j, createElementVNode as R, renderSlot as C, createTextVNode as k, toDisplayString as E, isRef as x, provide as F, Fragment as L, renderList as P, createBlock as T, mergeProps as N } from "vue";
|
|
2
|
-
import { v4 as Z } from "uuid";
|
|
3
|
-
import { useVModel as w } from "@vueuse/core";
|
|
4
|
-
const V = Symbol("VV_ACCORDION_GROUP"), z = {
|
|
5
|
-
title: String,
|
|
6
|
-
content: String,
|
|
7
|
-
open: Boolean,
|
|
8
|
-
iconRight: Boolean,
|
|
9
|
-
bordered: Boolean,
|
|
10
|
-
modifiers: [String, Array],
|
|
11
|
-
disabled: Boolean
|
|
12
|
-
}, M = ["update:open"], h = {
|
|
13
|
-
equals(e, t, r) {
|
|
14
|
-
return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
|
|
15
|
-
},
|
|
16
|
-
deepEquals(e, t) {
|
|
17
|
-
if (e === t)
|
|
18
|
-
return !0;
|
|
19
|
-
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
20
|
-
const r = Array.isArray(e), o = Array.isArray(t);
|
|
21
|
-
let n, s, i;
|
|
22
|
-
if (r && o) {
|
|
23
|
-
if (s = e.length, s != t.length)
|
|
24
|
-
return !1;
|
|
25
|
-
for (n = s; n-- !== 0; )
|
|
26
|
-
if (!this.deepEquals(e[n], t[n]))
|
|
27
|
-
return !1;
|
|
28
|
-
return !0;
|
|
29
|
-
}
|
|
30
|
-
if (r != o)
|
|
31
|
-
return !1;
|
|
32
|
-
const c = e instanceof Date, a = t instanceof Date;
|
|
33
|
-
if (c != a)
|
|
34
|
-
return !1;
|
|
35
|
-
if (c && a)
|
|
36
|
-
return e.getTime() == t.getTime();
|
|
37
|
-
const l = e instanceof RegExp, d = t instanceof RegExp;
|
|
38
|
-
if (l != d)
|
|
39
|
-
return !1;
|
|
40
|
-
if (l && d)
|
|
41
|
-
return e.toString() == t.toString();
|
|
42
|
-
const f = Object.keys(e);
|
|
43
|
-
if (s = f.length, s !== Object.keys(t).length)
|
|
44
|
-
return !1;
|
|
45
|
-
for (n = s; n-- !== 0; )
|
|
46
|
-
if (!Object.prototype.hasOwnProperty.call(t, f[n]))
|
|
47
|
-
return !1;
|
|
48
|
-
for (n = s; n-- !== 0; )
|
|
49
|
-
if (i = f[n], !this.deepEquals(e[i], t[i]))
|
|
50
|
-
return !1;
|
|
51
|
-
return !0;
|
|
52
|
-
}
|
|
53
|
-
return e !== e && t !== t;
|
|
54
|
-
},
|
|
55
|
-
resolveFieldData(e, t) {
|
|
56
|
-
if (e && Object.keys(e).length && t) {
|
|
57
|
-
if (t.indexOf(".") === -1)
|
|
58
|
-
return e[t];
|
|
59
|
-
{
|
|
60
|
-
const r = t.split(".");
|
|
61
|
-
let o = e;
|
|
62
|
-
for (let n = 0, s = r.length; n < s; ++n) {
|
|
63
|
-
if (e == null)
|
|
64
|
-
return null;
|
|
65
|
-
o = o[r[n]];
|
|
66
|
-
}
|
|
67
|
-
return o;
|
|
68
|
-
}
|
|
69
|
-
} else
|
|
70
|
-
return null;
|
|
71
|
-
},
|
|
72
|
-
isFunction(e) {
|
|
73
|
-
return !!(e && e.constructor && e.call && e.apply);
|
|
74
|
-
},
|
|
75
|
-
findIndexInList(e, t) {
|
|
76
|
-
let r = -1;
|
|
77
|
-
if (t) {
|
|
78
|
-
for (let o = 0; o < t.length; o++)
|
|
79
|
-
if (this.equals(t[o], e)) {
|
|
80
|
-
r = o;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return r;
|
|
85
|
-
},
|
|
86
|
-
contains(e, t) {
|
|
87
|
-
if (e != null && t && t.length) {
|
|
88
|
-
for (const r of t)
|
|
89
|
-
if (this.equals(e, r))
|
|
90
|
-
return !0;
|
|
91
|
-
}
|
|
92
|
-
return !1;
|
|
93
|
-
},
|
|
94
|
-
isEmpty(e) {
|
|
95
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
|
96
|
-
},
|
|
97
|
-
isNotEmpty(e) {
|
|
98
|
-
return !this.isEmpty(e);
|
|
99
|
-
},
|
|
100
|
-
pickBy(e, t) {
|
|
101
|
-
return Object.fromEntries(
|
|
102
|
-
Object.entries(e).filter(([r]) => t(r))
|
|
103
|
-
);
|
|
104
|
-
},
|
|
105
|
-
removeFromList(e, t) {
|
|
106
|
-
const r = this.findIndexInList(e, t);
|
|
107
|
-
return r > -1 ? t.filter((o, n) => n !== r) : t;
|
|
108
|
-
},
|
|
109
|
-
isString(e) {
|
|
110
|
-
return typeof e == "string" || e instanceof String;
|
|
111
|
-
},
|
|
112
|
-
propsToObject(e) {
|
|
113
|
-
return Object.keys(e).reduce((t, r) => {
|
|
114
|
-
var o, n, s, i, c;
|
|
115
|
-
return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (o = e[r]) != null && o.type && (Array.isArray(e[r].type) ? t[r] = ((n = e[r]) == null ? void 0 : n.default) || ((s = e[r]) == null ? void 0 : s.type[0]()) : t[r] = ((i = e[r]) == null ? void 0 : i.default) || ((c = e[r]) == null ? void 0 : c.type())), t;
|
|
116
|
-
}, {});
|
|
117
|
-
},
|
|
118
|
-
filterArray(e, t, r) {
|
|
119
|
-
return e.filter((o) => t.some((n) => typeof n == "string" ? o[r] == n : this.equals(
|
|
120
|
-
o[r],
|
|
121
|
-
n[r]
|
|
122
|
-
)));
|
|
123
|
-
},
|
|
124
|
-
kebabCase(e) {
|
|
125
|
-
var t, r;
|
|
126
|
-
if (e)
|
|
127
|
-
return (r = (t = e.match(
|
|
128
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
129
|
-
)) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
function U(e) {
|
|
133
|
-
const t = I(e, void 0);
|
|
134
|
-
console.log("Inject - ", t);
|
|
135
|
-
const r = p(() => h.isNotEmpty(t));
|
|
136
|
-
function o(n, s, i) {
|
|
137
|
-
if (t != null && t.value) {
|
|
138
|
-
const c = u(t.value)[n];
|
|
139
|
-
return p({
|
|
140
|
-
get() {
|
|
141
|
-
return c == null ? void 0 : c.value;
|
|
142
|
-
},
|
|
143
|
-
set(a) {
|
|
144
|
-
c.value = a;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
} else {
|
|
148
|
-
const c = $(s, n);
|
|
149
|
-
return p({
|
|
150
|
-
get() {
|
|
151
|
-
return c.value;
|
|
152
|
-
},
|
|
153
|
-
set(a) {
|
|
154
|
-
i && i(`update:${n}`, a);
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
group: t,
|
|
161
|
-
isInGroup: r,
|
|
162
|
-
getGroupOrLocalRef: o
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function H(e, t) {
|
|
166
|
-
const { group: r, isInGroup: o, getGroupOrLocalRef: n } = U(V), { modifiers: s } = B(e), i = n("modelValue", e, t), c = n("bordered", e), a = n("disabled", e), l = n("iconRight", e), d = n("accordion", e);
|
|
167
|
-
return {
|
|
168
|
-
modelValue: i,
|
|
169
|
-
disabled: a,
|
|
170
|
-
bordered: c,
|
|
171
|
-
iconRight: l,
|
|
172
|
-
isInGroup: o,
|
|
173
|
-
group: r,
|
|
174
|
-
accordion: d,
|
|
175
|
-
modifiers: s
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function S(e, t) {
|
|
179
|
-
const r = { [`${e}`]: !0 };
|
|
180
|
-
return {
|
|
181
|
-
bemCssClasses: p(() => Object.keys(t).reduce((n, s) => {
|
|
182
|
-
const i = u(t[s]) || !1;
|
|
183
|
-
if (!i)
|
|
184
|
-
return n;
|
|
185
|
-
if (s === "modifiers") {
|
|
186
|
-
const c = Array.isArray(i) ? i : [i];
|
|
187
|
-
return {
|
|
188
|
-
...n,
|
|
189
|
-
...c.reduce(
|
|
190
|
-
(a, l) => ({
|
|
191
|
-
...a,
|
|
192
|
-
[`${e}--${h.kebabCase(
|
|
193
|
-
l
|
|
194
|
-
)}`]: !0
|
|
195
|
-
}),
|
|
196
|
-
{}
|
|
197
|
-
)
|
|
198
|
-
};
|
|
199
|
-
} else
|
|
200
|
-
return {
|
|
201
|
-
...n,
|
|
202
|
-
[`${e}--${h.kebabCase(s)}`]: i
|
|
203
|
-
};
|
|
204
|
-
}, r) || {})
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const J = ["open"], K = ["aria-controls", "aria-expanded"], Q = ["aria-hidden"], W = /* @__PURE__ */ G({
|
|
208
|
-
__name: "VvAccordion",
|
|
209
|
-
props: z,
|
|
210
|
-
emits: M,
|
|
211
|
-
setup(e, { emit: t }) {
|
|
212
|
-
const r = e, o = D(), n = (o == null ? void 0 : o.name) || Z(), {
|
|
213
|
-
modelValue: s,
|
|
214
|
-
modifiers: i,
|
|
215
|
-
bordered: c,
|
|
216
|
-
disabled: a = q(!1),
|
|
217
|
-
iconRight: l,
|
|
218
|
-
isInGroup: d,
|
|
219
|
-
accordion: f
|
|
220
|
-
} = H(r, t), y = p(() => d.value ? f.value ? h.equals(n, s.value) : h.contains(n, s.value) : r.open), { bemCssClasses: _ } = S("vv-accordion", {
|
|
221
|
-
modifiers: i,
|
|
222
|
-
disabled: a,
|
|
223
|
-
markerRight: p(() => l.value),
|
|
224
|
-
bordered: c
|
|
225
|
-
}), A = (m) => {
|
|
226
|
-
const b = m.target;
|
|
227
|
-
t("update:open", b.open);
|
|
228
|
-
}, g = (m) => {
|
|
229
|
-
d.value && (f.value ? s.value = y.value ? null : n : s.value = y.value ? h.removeFromList(
|
|
230
|
-
n,
|
|
231
|
-
s.value
|
|
232
|
-
) : [...s.value, n], m.preventDefault());
|
|
233
|
-
};
|
|
234
|
-
return (m, b) => (v(), O("details", {
|
|
235
|
-
class: j(u(_)),
|
|
236
|
-
open: u(y),
|
|
237
|
-
onToggle: A,
|
|
238
|
-
onClick: g
|
|
239
|
-
}, [
|
|
240
|
-
R("summary", {
|
|
241
|
-
"aria-controls": `#${u(n)}`,
|
|
242
|
-
"aria-expanded": u(y),
|
|
243
|
-
class: "vv-collapse__summary"
|
|
244
|
-
}, [
|
|
245
|
-
C(m.$slots, "header", {}, () => [
|
|
246
|
-
k(E(m.title), 1)
|
|
247
|
-
])
|
|
248
|
-
], 8, K),
|
|
249
|
-
R("div", {
|
|
250
|
-
"aria-hidden": !u(y),
|
|
251
|
-
class: "vv-collapse__content"
|
|
252
|
-
}, [
|
|
253
|
-
C(m.$slots, "details", {}, () => [
|
|
254
|
-
k(E(m.content), 1)
|
|
255
|
-
])
|
|
256
|
-
], 8, Q)
|
|
257
|
-
], 42, J));
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
function X(e) {
|
|
261
|
-
if (Object.keys(e).some(
|
|
262
|
-
(t) => t !== "key" && !x(e[t])
|
|
263
|
-
))
|
|
264
|
-
throw Error("One or more groupState props aren't ref.");
|
|
265
|
-
console.log("PRovide - ", e), F(
|
|
266
|
-
e.key,
|
|
267
|
-
p(() => e)
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
const Y = {
|
|
271
|
-
modelValue: [String, Array],
|
|
272
|
-
iconRight: Boolean,
|
|
273
|
-
bordered: Boolean,
|
|
274
|
-
items: { type: Array, default: () => [] },
|
|
275
|
-
accordion: Boolean,
|
|
276
|
-
modifiers: [String, Array],
|
|
277
|
-
disabled: Boolean
|
|
278
|
-
}, ee = ["update:open"], oe = /* @__PURE__ */ G({
|
|
279
|
-
__name: "VvAccordionGroup",
|
|
280
|
-
props: Y,
|
|
281
|
-
emits: ee,
|
|
282
|
-
setup(e, { emit: t }) {
|
|
283
|
-
const r = e, o = w(r, "modelValue", t), { disabled: n, bordered: s, iconRight: i, accordion: c, modifiers: a, items: l } = B(r);
|
|
284
|
-
X({
|
|
285
|
-
key: V,
|
|
286
|
-
modelValue: o,
|
|
287
|
-
disabled: n,
|
|
288
|
-
bordered: s,
|
|
289
|
-
iconRight: i,
|
|
290
|
-
accordion: c
|
|
291
|
-
});
|
|
292
|
-
const { bemCssClasses: f } = S("vv-accordion-group", {
|
|
293
|
-
modifiers: a,
|
|
294
|
-
disabled: n
|
|
295
|
-
});
|
|
296
|
-
return (y, _) => {
|
|
297
|
-
var A;
|
|
298
|
-
return v(), O("div", {
|
|
299
|
-
class: j(u(f))
|
|
300
|
-
}, [
|
|
301
|
-
((A = r.items) == null ? void 0 : A.length) > 0 ? (v(!0), O(L, { key: 0 }, P(u(l), (g) => (v(), T(W, N({
|
|
302
|
-
key: g.title
|
|
303
|
-
}, {
|
|
304
|
-
name: g.name,
|
|
305
|
-
title: g.title,
|
|
306
|
-
content: g.content,
|
|
307
|
-
...r
|
|
308
|
-
}), null, 16))), 128)) : C(y.$slots, "default", { key: 1 })
|
|
309
|
-
], 2);
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
export {
|
|
314
|
-
oe as default
|
|
315
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(r,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("vue"),require("uuid"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","uuid","@vueuse/core"],h):(r=typeof globalThis<"u"?globalThis:r||self,r.VvAccordionGroup=h(r.vue,r.uuid,r.core))})(this,function(r,h,R){"use strict";const k=Symbol("VV_ACCORDION_GROUP"),B={title:String,content:String,open:Boolean,iconRight:Boolean,bordered:Boolean,modifiers:[String,Array],disabled:Boolean},b=["update:open"],y={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),s=Array.isArray(t);let o,i,c;if(n&&s){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!this.deepEquals(e[o],t[o]))return!1;return!0}if(n!=s)return!1;const l=e instanceof Date,a=t instanceof Date;if(l!=a)return!1;if(l&&a)return e.getTime()==t.getTime();const d=e instanceof RegExp,f=t instanceof RegExp;if(d!=f)return!1;if(d&&f)return e.toString()==t.toString();const u=Object.keys(e);if(i=u.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[o]))return!1;for(o=i;o--!==0;)if(c=u[o],!this.deepEquals(e[c],t[c]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let s=e;for(let o=0,i=n.length;o<i;++o){if(e==null)return null;s=s[n[o]]}return s}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let s=0;s<t.length;s++)if(this.equals(t[s],e)){n=s;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((s,o)=>o!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var s,o,i,c,l;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(s=e[n])!=null&&s.type&&(Array.isArray(e[n].type)?t[n]=((o=e[n])==null?void 0:o.default)||((i=e[n])==null?void 0:i.type[0]()):t[n]=((c=e[n])==null?void 0:c.default)||((l=e[n])==null?void 0:l.type())),t},{})},filterArray(e,t,n){return e.filter(s=>t.some(o=>typeof o=="string"?s[n]==o:this.equals(s[n],o[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.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:t.join("-"))==null?void 0:n.toLowerCase()}};function E(e){const t=r.inject(e,void 0);console.log("Inject - ",t);const n=r.computed(()=>y.isNotEmpty(t));function s(o,i,c){if(t!=null&&t.value){const l=r.unref(t.value)[o];return r.computed({get(){return l==null?void 0:l.value},set(a){l.value=a}})}else{const l=r.toRef(i,o);return r.computed({get(){return l.value},set(a){c&&c(`update:${o}`,a)}})}}return{group:t,isInGroup:n,getGroupOrLocalRef:s}}function V(e,t){const{group:n,isInGroup:s,getGroupOrLocalRef:o}=E(k),{modifiers:i}=r.toRefs(e),c=o("modelValue",e,t),l=o("bordered",e),a=o("disabled",e),d=o("iconRight",e),f=o("accordion",e);return{modelValue:c,disabled:a,bordered:l,iconRight:d,isInGroup:s,group:n,accordion:f,modifiers:i}}function C(e,t){const n={[`${e}`]:!0};return{bemCssClasses:r.computed(()=>Object.keys(t).reduce((o,i)=>{const c=r.unref(t[i])||!1;if(!c)return o;if(i==="modifiers"){const l=Array.isArray(c)?c:[c];return{...o,...l.reduce((a,d)=>({...a,[`${e}--${y.kebabCase(d)}`]:!0}),{})}}else return{...o,[`${e}--${y.kebabCase(i)}`]:c}},n)||{})}}const G=["open"],S=["aria-controls","aria-expanded"],j=["aria-hidden"],q=r.defineComponent({__name:"VvAccordion",props:B,emits:b,setup(e,{emit:t}){const n=e,s=r.useAttrs(),o=(s==null?void 0:s.name)||h.v4(),{modelValue:i,modifiers:c,bordered:l,disabled:a=r.ref(!1),iconRight:d,isInGroup:f,accordion:u}=V(n,t),p=r.computed(()=>f.value?u.value?y.equals(o,i.value):y.contains(o,i.value):n.open),{bemCssClasses:_}=C("vv-accordion",{modifiers:c,disabled:a,markerRight:r.computed(()=>d.value),bordered:l}),A=m=>{const O=m.target;t("update:open",O.open)},g=m=>{f.value&&(u.value?i.value=p.value?null:o:i.value=p.value?y.removeFromList(o,i.value):[...i.value,o],m.preventDefault())};return(m,O)=>(r.openBlock(),r.createElementBlock("details",{class:r.normalizeClass(r.unref(_)),open:r.unref(p),onToggle:A,onClick:g},[r.createElementVNode("summary",{"aria-controls":`#${r.unref(o)}`,"aria-expanded":r.unref(p),class:"vv-collapse__summary"},[r.renderSlot(m.$slots,"header",{},()=>[r.createTextVNode(r.toDisplayString(m.title),1)])],8,S),r.createElementVNode("div",{"aria-hidden":!r.unref(p),class:"vv-collapse__content"},[r.renderSlot(m.$slots,"details",{},()=>[r.createTextVNode(r.toDisplayString(m.content),1)])],8,j)],42,G))}});function D(e){if(Object.keys(e).some(t=>t!=="key"&&!r.isRef(e[t])))throw Error("One or more groupState props aren't ref.");console.log("PRovide - ",e),r.provide(e.key,r.computed(()=>e))}const I={modelValue:[String,Array],iconRight:Boolean,bordered:Boolean,items:{type:Array,default:()=>[]},accordion:Boolean,modifiers:[String,Array],disabled:Boolean},$=["update:open"];return r.defineComponent({__name:"VvAccordionGroup",props:I,emits:$,setup(e,{emit:t}){const n=e,s=R.useVModel(n,"modelValue",t),{disabled:o,bordered:i,iconRight:c,accordion:l,modifiers:a,items:d}=r.toRefs(n);D({key:k,modelValue:s,disabled:o,bordered:i,iconRight:c,accordion:l});const{bemCssClasses:u}=C("vv-accordion-group",{modifiers:a,disabled:o});return(p,_)=>{var A;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(u))},[((A=n.items)==null?void 0:A.length)>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(d),g=>(r.openBlock(),r.createBlock(q,r.mergeProps({key:g.title},{name:g.name,title:g.title,content:g.content,...n}),null,16))),128)):r.renderSlot(p.$slots,"default",{key:1})],2)}}})});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, computed as t, openBlock as n, createElementBlock as c, normalizeClass as l, unref as p, toDisplayString as u } from "vue";
|
|
2
|
-
const m = {
|
|
3
|
-
value: [String, Number],
|
|
4
|
-
color: String
|
|
5
|
-
}, d = /* @__PURE__ */ a({
|
|
6
|
-
__name: "VvBadge",
|
|
7
|
-
props: m,
|
|
8
|
-
setup(o) {
|
|
9
|
-
const e = o, r = t(() => e.color ? `vv-badge--${e.color}` : "");
|
|
10
|
-
return (s, i) => (n(), c("span", {
|
|
11
|
-
class: l(["vv-badge", p(r)]),
|
|
12
|
-
role: "status"
|
|
13
|
-
}, u(s.value), 3));
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export {
|
|
17
|
-
d as default
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBadge=n(e.vue))})(this,function(e){"use strict";const n={value:[String,Number],color:String};return e.defineComponent({__name:"VvBadge",props:n,setup(s){const o=s,t=e.computed(()=>o.color?`vv-badge--${o.color}`:"");return(r,c)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["vv-badge",e.unref(t)]),role:"status"},e.toDisplayString(r.value),3))}})});
|