@volverjs/ui-vue 0.0.3 → 0.0.5-beta.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.
Files changed (236) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +54 -15
  3. package/auto-imports.d.ts +12 -3
  4. package/bin/icons.cjs +1 -73
  5. package/dist/Volver.d.ts +23 -11
  6. package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  8. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  9. package/dist/components/VvAccordion/index.d.ts +8 -3
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +280 -122
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  13. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  14. package/dist/components/VvAction/VvAction.es.js +338 -0
  15. package/dist/components/VvAction/VvAction.umd.js +1 -0
  16. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  17. package/dist/components/VvAction/index.d.ts +24 -0
  18. package/dist/components/VvBadge/VvBadge.es.js +251 -22
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  21. package/dist/components/VvBadge/index.d.ts +1 -1
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +280 -62
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  24. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  25. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  26. package/dist/components/VvButton/VvButton.es.js +720 -261
  27. package/dist/components/VvButton/VvButton.umd.js +1 -1
  28. package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
  29. package/dist/components/VvButton/index.d.ts +30 -75
  30. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
  31. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  32. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  33. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  34. package/dist/components/VvCard/VvCard.es.js +60 -28
  35. package/dist/components/VvCard/VvCard.umd.js +1 -1
  36. package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
  37. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  38. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  39. package/dist/components/VvCheckbox/index.d.ts +6 -6
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  42. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
  43. package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
  44. package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
  45. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  46. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
  47. package/dist/components/VvCombobox/index.d.ts +54 -23
  48. package/dist/components/VvDialog/VvDialog.es.js +426 -115
  49. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  50. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  51. package/dist/components/VvDialog/index.d.ts +4 -1
  52. package/dist/components/VvDropdown/VvDropdown.es.js +504 -190
  53. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  54. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
  55. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  56. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  57. package/dist/components/VvDropdown/index.d.ts +35 -14
  58. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
  59. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  60. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
  61. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  62. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
  63. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  64. package/dist/components/VvIcon/VvIcon.es.js +116 -52
  65. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  66. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  67. package/dist/components/VvIcon/index.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  69. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  70. package/dist/components/VvInputText/VvInputText.es.js +1054 -376
  71. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  72. package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
  73. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  74. package/dist/components/VvInputText/index.d.ts +67 -3
  75. package/dist/components/VvProgress/VvProgress.es.js +254 -23
  76. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  77. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  78. package/dist/components/VvProgress/index.d.ts +1 -1
  79. package/dist/components/VvRadio/VvRadio.es.js +568 -137
  80. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  81. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  82. package/dist/components/VvRadio/index.d.ts +6 -6
  83. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
  84. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  85. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
  86. package/dist/components/VvRadioGroup/index.d.ts +4 -4
  87. package/dist/components/VvSelect/VvSelect.es.js +703 -251
  88. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  89. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
  90. package/dist/components/VvSelect/index.d.ts +8 -8
  91. package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
  92. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  93. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
  94. package/dist/components/VvTextarea/index.d.ts +7 -7
  95. package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
  96. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  97. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  98. package/dist/components/VvTooltip/index.d.ts +2 -2
  99. package/dist/components/index.es.js +3676 -2007
  100. package/dist/components/index.umd.js +1 -1
  101. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  102. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  103. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  104. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  105. package/dist/composables/useComponentFocus.d.ts +1 -1
  106. package/dist/composables/useComponentIcon.d.ts +7 -7
  107. package/dist/composables/useDebouncedInput.d.ts +4 -1
  108. package/dist/composables/useDefaults.d.ts +2 -0
  109. package/dist/composables/useModifiers.d.ts +1 -1
  110. package/dist/composables/useOptions.d.ts +2 -2
  111. package/dist/composables/useTextCount.d.ts +3 -3
  112. package/dist/composables/useUniqueId.d.ts +1 -1
  113. package/dist/composables/useVolver.d.ts +1 -1
  114. package/dist/constants.d.ts +30 -0
  115. package/dist/directives/index.es.js +288 -0
  116. package/dist/directives/index.umd.js +1 -0
  117. package/dist/directives/v-tooltip.es.js +285 -0
  118. package/dist/directives/v-tooltip.umd.js +1 -0
  119. package/dist/icons.es.js +38 -23
  120. package/dist/icons.umd.js +1 -1
  121. package/dist/index.d.ts +0 -1
  122. package/dist/index.es.js +115 -3269
  123. package/dist/index.umd.js +1 -1
  124. package/dist/props/index.d.ts +215 -23
  125. package/dist/resolvers/unplugin.d.ts +14 -8
  126. package/dist/resolvers/unplugin.es.js +94 -33
  127. package/dist/resolvers/unplugin.umd.js +1 -1
  128. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  129. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  130. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  131. package/dist/stories/argTypes.d.ts +1 -1
  132. package/package.json +167 -63
  133. package/src/Volver.ts +60 -26
  134. package/src/assets/icons/detailed.json +1 -1
  135. package/src/assets/icons/normal.json +1 -1
  136. package/src/assets/icons/simple.json +1 -1
  137. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  138. package/src/components/VvAccordion/index.ts +12 -4
  139. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  140. package/src/components/VvAccordionGroup/index.ts +8 -0
  141. package/src/components/VvAction/VvAction.vue +144 -0
  142. package/src/components/VvAction/index.ts +5 -0
  143. package/src/components/VvBadge/VvBadge.vue +2 -2
  144. package/src/components/VvBadge/index.ts +1 -1
  145. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  146. package/src/components/VvButton/VvButton.vue +41 -124
  147. package/src/components/VvButton/index.ts +16 -88
  148. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  149. package/src/components/VvButtonGroup/index.ts +1 -1
  150. package/src/components/VvCard/VvCard.vue +2 -2
  151. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  152. package/src/components/VvCheckbox/index.ts +11 -7
  153. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  154. package/src/components/VvCheckboxGroup/index.ts +1 -1
  155. package/src/components/VvCombobox/VvCombobox.vue +85 -57
  156. package/src/components/VvCombobox/index.ts +12 -10
  157. package/src/components/VvDialog/VvDialog.vue +28 -11
  158. package/src/components/VvDialog/index.ts +5 -2
  159. package/src/components/VvDropdown/VvDropdown.vue +6 -5
  160. package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
  161. package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
  162. package/src/components/VvDropdown/index.ts +6 -11
  163. package/src/components/VvIcon/VvIcon.vue +3 -3
  164. package/src/components/VvIcon/index.ts +3 -3
  165. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  166. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  167. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  168. package/src/components/VvInputText/VvInputText.vue +128 -35
  169. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  170. package/src/components/VvInputText/index.ts +62 -1
  171. package/src/components/VvProgress/VvProgress.vue +2 -2
  172. package/src/components/VvProgress/index.ts +1 -1
  173. package/src/components/VvRadio/VvRadio.vue +3 -7
  174. package/src/components/VvRadio/index.ts +11 -7
  175. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  176. package/src/components/VvRadioGroup/index.ts +1 -1
  177. package/src/components/VvSelect/VvSelect.vue +4 -4
  178. package/src/components/VvSelect/index.ts +3 -5
  179. package/src/components/VvTextarea/VvTextarea.vue +4 -4
  180. package/src/components/VvTextarea/index.ts +1 -1
  181. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  182. package/src/components/VvTooltip/index.ts +3 -3
  183. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  184. package/src/composables/dropdown/useProvideDropdown.ts +9 -11
  185. package/src/composables/group/useInjectedGroupState.ts +1 -1
  186. package/src/composables/group/useProvideGroupState.ts +1 -1
  187. package/src/composables/useComponentIcon.ts +1 -1
  188. package/src/composables/useDebouncedInput.ts +10 -3
  189. package/src/composables/useDefaults.ts +89 -0
  190. package/src/composables/useModifiers.ts +8 -9
  191. package/src/composables/useOptions.ts +1 -1
  192. package/src/composables/useVolver.ts +2 -2
  193. package/src/constants.ts +36 -0
  194. package/src/directives/index.ts +1 -1
  195. package/src/directives/v-tooltip.ts +2 -2
  196. package/src/index.ts +0 -2
  197. package/src/props/index.ts +111 -19
  198. package/src/resolvers/unplugin.ts +96 -49
  199. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  200. package/src/stories/Accordion/Accordion.test.ts +21 -15
  201. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  202. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  203. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  204. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +3 -2
  205. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  206. package/src/stories/Button/Button.stories.mdx +4 -2
  207. package/src/stories/Button/Button.test.ts +3 -1
  208. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  209. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  210. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  211. package/src/stories/Card/Card.stories.mdx +2 -1
  212. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  213. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  214. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  215. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  216. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  217. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  218. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  219. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  220. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  221. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  222. package/src/stories/Icon/Icon.stories.mdx +2 -1
  223. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  224. package/src/stories/InputText/InputText.settings.ts +53 -0
  225. package/src/stories/InputText/InputText.stories.mdx +42 -1
  226. package/src/stories/InputText/InputText.test.ts +5 -2
  227. package/src/stories/Progress/Progress.stories.mdx +2 -1
  228. package/src/stories/Radio/Radio.stories.mdx +2 -1
  229. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  230. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  231. package/src/stories/Select/Select.stories.mdx +2 -1
  232. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  233. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  234. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
  235. package/src/stories/argTypes.ts +2 -2
  236. package/src/types/group.d.ts +5 -0
@@ -8,6 +8,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
8
8
  };
9
9
  modifiers: (StringConstructor | ArrayConstructor)[];
10
10
  disabled: BooleanConstructor;
11
+ not: BooleanConstructor;
11
12
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
13
  name: StringConstructor;
13
14
  title: StringConstructor;
@@ -18,16 +19,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
18
19
  };
19
20
  modifiers: (StringConstructor | ArrayConstructor)[];
20
21
  disabled: BooleanConstructor;
22
+ not: BooleanConstructor;
21
23
  }>> & {
22
24
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
23
25
  }, {
24
26
  modelValue: boolean;
25
27
  disabled: boolean;
28
+ not: boolean;
26
29
  }>, {
27
30
  summary: (_: {
28
31
  open: boolean;
29
32
  }) => any;
30
- details: (_: {
33
+ default: (_: {
31
34
  open: boolean;
32
35
  }) => any;
33
36
  }>;
@@ -1,5 +1,5 @@
1
1
  import type { ExtractPropTypes, Ref } from 'vue';
2
- import type { AccordionGroupState } from '@/types/group';
2
+ import type { AccordionGroupState } from '../../types/group';
3
3
  export declare const VvAccordionProps: {
4
4
  /**
5
5
  * Accordion name
@@ -28,6 +28,10 @@ export declare const VvAccordionProps: {
28
28
  * If true, the accordion will be disabled
29
29
  */
30
30
  disabled: BooleanConstructor;
31
+ /**
32
+ * If true, the accordion will be opened by default
33
+ */
34
+ not: BooleanConstructor;
31
35
  };
32
36
  export declare const VvAccordionEvents: string[];
33
37
  export type VvAccordionPropsTypes = ExtractPropTypes<typeof VvAccordionProps>;
@@ -36,11 +40,12 @@ export type VvAccordionPropsTypes = ExtractPropTypes<typeof VvAccordionProps>;
36
40
  */
37
41
  export declare function useGroupProps(props: VvAccordionPropsTypes, emit: (event: string, value: unknown) => void): {
38
42
  modelValue: import("vue").WritableComputedRef<unknown>;
39
- disabled: Ref<boolean>;
40
- isInGroup: import("vue").ComputedRef<boolean>;
43
+ not: Ref<boolean>;
44
+ isInGroup: globalThis.ComputedRef<boolean>;
41
45
  group: Ref<AccordionGroupState> | undefined;
42
46
  collapse: Ref<boolean>;
43
47
  modifiers: Ref<string | string[]>;
48
+ disabled: globalThis.ComputedRef<boolean>;
44
49
  title: Ref<string | undefined> | undefined;
45
50
  content: Ref<string | undefined> | undefined;
46
51
  };
@@ -1,6 +1,43 @@
1
- import { defineComponent as B, openBlock as _, createElementBlock as C, unref as l, normalizeClass as P, withModifiers as M, createElementVNode as G, renderSlot as y, normalizeProps as g, guardReactiveProps as V, createTextVNode as S, toDisplayString as h, Fragment as I, renderList as N, createBlock as O, mergeProps as R, withCtx as $ } from "vue";
2
- import { nanoid as T } from "nanoid";
3
- const k = Symbol.for("accordionGroup"), x = {
1
+ import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx } from "vue";
2
+ import { nanoid } from "nanoid";
3
+ import { useToggle, useStorage } from "@vueuse/core";
4
+ const INJECTION_KEY_ACCORDION_GROUP = Symbol.for("accordionGroup");
5
+ function isEmpty(value) {
6
+ return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
7
+ }
8
+ function useInjectedGroupState(groupKey) {
9
+ const group = inject(groupKey, void 0);
10
+ const isInGroup = computed(() => !isEmpty(group));
11
+ function getGroupOrLocalRef(propName, props, emit) {
12
+ if (group == null ? void 0 : group.value) {
13
+ const groupPropValue = unref(group.value)[propName];
14
+ return computed({
15
+ get() {
16
+ return groupPropValue == null ? void 0 : groupPropValue.value;
17
+ },
18
+ set(value) {
19
+ groupPropValue.value = value;
20
+ }
21
+ });
22
+ }
23
+ const propRef = toRef(props, propName);
24
+ return computed({
25
+ get() {
26
+ return propRef.value;
27
+ },
28
+ set(value) {
29
+ if (emit)
30
+ emit(`update:${propName}`, value);
31
+ }
32
+ });
33
+ }
34
+ return {
35
+ group,
36
+ isInGroup,
37
+ getGroupOrLocalRef
38
+ };
39
+ }
40
+ const VvAccordionProps = {
4
41
  /**
5
42
  * Accordion name
6
43
  */
@@ -27,98 +64,168 @@ const k = Symbol.for("accordionGroup"), x = {
27
64
  /**
28
65
  * If true, the accordion will be disabled
29
66
  */
30
- disabled: Boolean
31
- }, z = ["update:modelValue"];
32
- function D(s, c) {
33
- const { group: t, isInGroup: n, getGroupOrLocalRef: e } = useInjectedGroupState(
34
- k
35
- ), { title: m, content: v } = toRefs(s), p = e("modelValue", s, c), d = e("disabled", s), u = e("collapse", s), r = e("modifiers", s);
67
+ disabled: Boolean,
68
+ /**
69
+ * If true, the accordion will be opened by default
70
+ */
71
+ not: Boolean
72
+ };
73
+ const VvAccordionEvents = ["update:modelValue"];
74
+ function useGroupProps(props, emit) {
75
+ const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(
76
+ INJECTION_KEY_ACCORDION_GROUP
77
+ );
78
+ const { title, content } = toRefs(props);
79
+ const modelValue = getGroupOrLocalRef("modelValue", props, emit);
80
+ const not = getGroupOrLocalRef("not", props);
81
+ const collapse = getGroupOrLocalRef("collapse", props);
82
+ const modifiers = getGroupOrLocalRef("modifiers", props);
83
+ const disabled = computed(
84
+ () => {
85
+ var _a;
86
+ return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
87
+ }
88
+ );
36
89
  return {
37
90
  // group props
38
- modelValue: p,
39
- disabled: d,
40
- isInGroup: n,
41
- group: t,
42
- collapse: u,
43
- modifiers: r,
91
+ modelValue,
92
+ not,
93
+ isInGroup,
94
+ group,
95
+ collapse,
96
+ modifiers,
97
+ disabled,
44
98
  // local props
45
- title: m,
46
- content: v
99
+ title,
100
+ content
47
101
  };
48
102
  }
49
- const L = ["id", "open"], j = ["aria-controls", "aria-expanded"], F = ["aria-hidden"], J = {
103
+ function useModifiers(prefix, modifiers, others) {
104
+ return computed(() => {
105
+ const toReturn = {
106
+ [prefix]: true
107
+ };
108
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
109
+ if (modifiersArray) {
110
+ if (Array.isArray(modifiersArray)) {
111
+ modifiersArray.forEach((modifier) => {
112
+ if (modifier) {
113
+ toReturn[`${prefix}--${modifier}`] = true;
114
+ }
115
+ });
116
+ }
117
+ }
118
+ if (others) {
119
+ Object.keys(others.value).forEach((key) => {
120
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
121
+ });
122
+ }
123
+ return toReturn;
124
+ });
125
+ }
126
+ const _hoisted_1 = ["id", "open"];
127
+ const _hoisted_2 = ["aria-controls", "aria-expanded"];
128
+ const _hoisted_3 = ["aria-hidden"];
129
+ const __default__$1 = {
50
130
  name: "VvAccordion"
51
- }, K = /* @__PURE__ */ B({
52
- ...J,
53
- props: x,
54
- emits: z,
55
- setup(s, { emit: c }) {
56
- const t = s, n = useAttrs(), e = computed(
57
- () => t.name || (n == null ? void 0 : n.id) || T()
58
- ), {
59
- modifiers: m,
60
- title: v,
61
- content: p,
62
- disabled: d,
63
- collapse: u,
64
- modelValue: r,
65
- isInGroup: o
66
- } = D(t, c), b = ref(!1), a = computed({
67
- get: () => o.value ? u.value && Array.isArray(r.value) ? r.value.includes(e.value) : r.value === e.value : r.value === void 0 ? b.value : r.value,
68
- set: (i) => {
69
- if (o.value) {
70
- if (u.value && Array.isArray(r.value)) {
71
- if (i) {
72
- r.value.push(e.value);
131
+ };
132
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
133
+ ...__default__$1,
134
+ props: VvAccordionProps,
135
+ emits: VvAccordionEvents,
136
+ setup(__props, { emit }) {
137
+ const props = __props;
138
+ const attrs = useAttrs();
139
+ const accordionName = computed(
140
+ () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
141
+ );
142
+ const {
143
+ modifiers,
144
+ title,
145
+ content,
146
+ disabled,
147
+ collapse,
148
+ modelValue,
149
+ isInGroup,
150
+ not
151
+ } = useGroupProps(props, emit);
152
+ const localModelValue = ref(false);
153
+ const isOpen = computed({
154
+ get: () => {
155
+ let toReturn = modelValue.value;
156
+ if (isInGroup.value) {
157
+ if (collapse.value && Array.isArray(modelValue.value)) {
158
+ toReturn = modelValue.value.includes(accordionName.value);
159
+ } else {
160
+ toReturn = modelValue.value === accordionName.value;
161
+ }
162
+ } else if (modelValue.value === void 0) {
163
+ toReturn = localModelValue.value;
164
+ }
165
+ return not.value ? !toReturn : toReturn;
166
+ },
167
+ set: (newValue) => {
168
+ if (not.value) {
169
+ newValue = !newValue;
170
+ }
171
+ if (isInGroup.value) {
172
+ if (collapse.value && Array.isArray(modelValue.value)) {
173
+ if (newValue) {
174
+ modelValue.value.push(accordionName.value);
73
175
  return;
74
176
  }
75
- r.value = r.value.filter(
76
- (A) => A !== e.value
177
+ modelValue.value = modelValue.value.filter(
178
+ (name) => name !== accordionName.value
77
179
  );
78
180
  return;
79
181
  }
80
- r.value = i ? e.value : null;
182
+ modelValue.value = newValue ? accordionName.value : null;
81
183
  return;
82
184
  }
83
- if (r.value === void 0 && typeof i == "boolean") {
84
- b.value = i;
185
+ if (modelValue.value === void 0 && typeof newValue === "boolean") {
186
+ localModelValue.value = newValue;
85
187
  return;
86
188
  }
87
- r.value = i;
189
+ modelValue.value = newValue;
88
190
  }
89
- }), f = useBemModifiers(
191
+ });
192
+ const bemCssClasses = useModifiers(
90
193
  "vv-accordion",
91
- m,
194
+ modifiers,
92
195
  computed(() => ({
93
- disabled: d.value
196
+ disabled: disabled.value
94
197
  }))
95
- ), E = useToggle(a);
96
- return (i, A) => (_(), C("details", {
97
- id: l(e),
98
- class: P(l(f)),
99
- open: l(a),
100
- onClick: A[0] || (A[0] = M((H) => l(E)(), ["prevent"]))
101
- }, [
102
- G("summary", {
103
- "aria-controls": l(e),
104
- "aria-expanded": l(a),
105
- class: "vv-collapse__summary"
106
- }, [
107
- y(i.$slots, "summary", g(V({ open: l(a) })), () => [
108
- S(h(l(v)), 1)
109
- ])
110
- ], 8, j),
111
- G("div", {
112
- "aria-hidden": !l(a),
113
- class: "vv-collapse__content"
198
+ );
199
+ const onClick = useToggle(isOpen);
200
+ return (_ctx, _cache) => {
201
+ return openBlock(), createElementBlock("details", {
202
+ id: unref(accordionName),
203
+ class: normalizeClass(unref(bemCssClasses)),
204
+ open: unref(isOpen)
114
205
  }, [
115
- y(i.$slots, "details", g(V({ open: l(a) })), () => [
116
- S(h(l(p)), 1)
117
- ])
118
- ], 8, F)
119
- ], 10, L));
206
+ createElementVNode("summary", {
207
+ "aria-controls": unref(accordionName),
208
+ "aria-expanded": unref(isOpen),
209
+ class: "vv-accordion__summary",
210
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
211
+ }, [
212
+ renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
213
+ createTextVNode(toDisplayString(unref(title)), 1)
214
+ ])
215
+ ], 8, _hoisted_2),
216
+ createElementVNode("div", {
217
+ "aria-hidden": !unref(isOpen),
218
+ class: "vv-accordion__content"
219
+ }, [
220
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
221
+ createTextVNode(toDisplayString(unref(content)), 1)
222
+ ])
223
+ ], 8, _hoisted_3)
224
+ ], 10, _hoisted_1);
225
+ };
120
226
  }
121
- }), U = {
227
+ });
228
+ const VvAccordionGroupProps = {
122
229
  /**
123
230
  * VModel
124
231
  */
@@ -146,68 +253,119 @@ const L = ["id", "open"], j = ["aria-controls", "aria-expanded"], F = ["aria-hid
146
253
  /**
147
254
  * If true, the accordion items will be disabled
148
255
  */
149
- disabled: Boolean
150
- }, Y = ["update:modelValue"], q = {
256
+ disabled: Boolean,
257
+ /**
258
+ * If true, the accordion items will be opened by default
259
+ */
260
+ not: Boolean,
261
+ /**
262
+ * Enable local storage persistence
263
+ */
264
+ storeKey: String
265
+ };
266
+ const VvAccordionGroupEvents = ["update:modelValue"];
267
+ function useProvideGroupState(groupState) {
268
+ if (Object.keys(groupState).some(
269
+ (k) => k !== "key" && !isRef(groupState[k])
270
+ ))
271
+ throw Error("One or more groupState props aren't ref.");
272
+ provide(
273
+ groupState.key,
274
+ computed(() => groupState)
275
+ );
276
+ }
277
+ const __default__ = {
151
278
  name: "VvAccordionGroup"
152
- }, X = /* @__PURE__ */ B({
153
- ...q,
154
- props: U,
155
- emits: Y,
156
- setup(s, { emit: c }) {
157
- const t = s, { disabled: n, collapse: e, modifiers: m, itemModifiers: v, items: p } = toRefs(t);
279
+ };
280
+ const _sfc_main = /* @__PURE__ */ defineComponent({
281
+ ...__default__,
282
+ props: VvAccordionGroupProps,
283
+ emits: VvAccordionGroupEvents,
284
+ setup(__props, { emit }) {
285
+ const props = __props;
286
+ const { disabled, collapse, modifiers, itemModifiers, items, not } = toRefs(props);
158
287
  watchEffect(() => {
159
- typeof t.modelValue == "string" && e.value && console.warn(
160
- "[VvAccordionGroup]: modelValue is a string but collapse is true."
161
- );
288
+ if (typeof props.modelValue === "string" && collapse.value) {
289
+ console.warn(
290
+ `[VvAccordionGroup]: modelValue is a string but collapse is true.`
291
+ );
292
+ }
162
293
  });
163
- const d = ref([]), u = computed({
294
+ let localModelValue = ref([]);
295
+ watch(
296
+ () => props.storeKey,
297
+ (newKey) => {
298
+ if (newKey) {
299
+ localModelValue = useStorage(newKey, localModelValue.value);
300
+ } else {
301
+ localModelValue = ref([]);
302
+ }
303
+ },
304
+ { immediate: true }
305
+ );
306
+ const modelValue = computed({
164
307
  get: () => {
165
- var o;
166
- return t.modelValue !== void 0 ? e.value ? t.modelValue : Array.isArray(t.modelValue) ? t.modelValue[0] : t.modelValue : e.value ? d.value : (o = d.value) == null ? void 0 : o[0];
308
+ var _a;
309
+ if (props.modelValue !== void 0) {
310
+ if (!collapse.value) {
311
+ return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
312
+ }
313
+ return props.modelValue;
314
+ }
315
+ return !collapse.value ? (_a = localModelValue.value) == null ? void 0 : _a[0] : localModelValue.value;
167
316
  },
168
- set: (o) => {
169
- if (t.modelValue !== void 0)
170
- return (Array.isArray(t.modelValue) || e.value) && !Array.isArray(o) && (o = [o]), c("update:modelValue", o);
171
- d.value = Array.isArray(o) ? o : [o];
317
+ set: (newValue) => {
318
+ if (props.modelValue !== void 0) {
319
+ if ((Array.isArray(props.modelValue) || collapse.value) && !Array.isArray(newValue)) {
320
+ newValue = [newValue];
321
+ }
322
+ return emit("update:modelValue", newValue);
323
+ }
324
+ localModelValue.value = Array.isArray(newValue) ? newValue : [newValue];
172
325
  }
173
326
  });
174
327
  useProvideGroupState({
175
- key: k,
176
- modelValue: u,
177
- disabled: n,
178
- collapse: e,
179
- modifiers: v
328
+ key: INJECTION_KEY_ACCORDION_GROUP,
329
+ modelValue,
330
+ disabled,
331
+ collapse,
332
+ modifiers: itemModifiers,
333
+ not
180
334
  });
181
- const r = useBemModifiers(
335
+ const bemCssClasses = useModifiers(
182
336
  "vv-accordion-group",
183
- m,
337
+ modifiers,
184
338
  computed(() => ({
185
- disabled: n.value
339
+ disabled: disabled.value
186
340
  }))
187
341
  );
188
- return (o, b) => (_(), C("div", {
189
- class: P(l(r))
190
- }, [
191
- y(o.$slots, "default", {}, () => [
192
- (_(!0), C(I, null, N(l(p), (a) => (_(), O(K, R({
193
- key: a.title
194
- }, {
195
- name: a.name,
196
- title: a.title,
197
- content: a.content
198
- }), {
199
- header: $((f) => [
200
- y(o.$slots, `header::${a.name}`, g(V(f)))
201
- ]),
202
- details: $((f) => [
203
- y(o.$slots, `details::${a.name}`, g(V(f)))
204
- ]),
205
- _: 2
206
- }, 1040))), 128))
207
- ])
208
- ], 2));
342
+ return (_ctx, _cache) => {
343
+ return openBlock(), createElementBlock("div", {
344
+ class: normalizeClass(unref(bemCssClasses))
345
+ }, [
346
+ renderSlot(_ctx.$slots, "default", {}, () => [
347
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
348
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({
349
+ key: item.title
350
+ }, {
351
+ name: item.name,
352
+ title: item.title,
353
+ content: item.content
354
+ }), {
355
+ header: withCtx((data) => [
356
+ renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
357
+ ]),
358
+ details: withCtx((data) => [
359
+ renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
360
+ ]),
361
+ _: 2
362
+ }, 1040);
363
+ }), 128))
364
+ ])
365
+ ], 2);
366
+ };
209
367
  }
210
368
  });
211
369
  export {
212
- X as default
370
+ _sfc_main as default
213
371
  };
@@ -1 +1 @@
1
- (function(e,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("vue"),require("nanoid")):typeof define=="function"&&define.amd?define(["vue","nanoid"],u):(e=typeof globalThis<"u"?globalThis:e||self,e.VvAccordionGroup=u(e.vue,e.nanoid))})(this,function(e,u){"use strict";const V=Symbol.for("accordionGroup"),v={name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},modifiers:[String,Array],disabled:Boolean},S=["update:modelValue"];function h(s,f){const{group:n,isInGroup:l,getGroupOrLocalRef:o}=useInjectedGroupState(V),{title:m,content:p}=toRefs(s),y=o("modelValue",s,f),d=o("disabled",s),c=o("collapse",s),t=o("modifiers",s);return{modelValue:y,disabled:d,isInGroup:l,group:n,collapse:c,modifiers:t,title:m,content:p}}const C=["id","open"],B=["aria-controls","aria-expanded"],P=["aria-hidden"],G={name:"VvAccordion"},b=e.defineComponent({...G,props:v,emits:S,setup(s,{emit:f}){const n=s,l=useAttrs(),o=computed(()=>n.name||(l==null?void 0:l.id)||u.nanoid()),{modifiers:m,title:p,content:y,disabled:d,collapse:c,modelValue:t,isInGroup:r}=h(n,f),g=ref(!1),a=computed({get:()=>r.value?c.value&&Array.isArray(t.value)?t.value.includes(o.value):t.value===o.value:t.value===void 0?g.value:t.value,set:i=>{if(r.value){if(c.value&&Array.isArray(t.value)){if(i){t.value.push(o.value);return}t.value=t.value.filter(_=>_!==o.value);return}t.value=i?o.value:null;return}if(t.value===void 0&&typeof i=="boolean"){g.value=i;return}t.value=i}}),A=useBemModifiers("vv-accordion",m,computed(()=>({disabled:d.value}))),R=useToggle(a);return(i,_)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(o),class:e.normalizeClass(e.unref(A)),open:e.unref(a),onClick:_[0]||(_[0]=e.withModifiers(M=>e.unref(R)(),["prevent"]))},[e.createElementVNode("summary",{"aria-controls":e.unref(o),"aria-expanded":e.unref(a),class:"vv-collapse__summary"},[e.renderSlot(i.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(a)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)])],8,B),e.createElementVNode("div",{"aria-hidden":!e.unref(a),class:"vv-collapse__content"},[e.renderSlot(i.$slots,"details",e.normalizeProps(e.guardReactiveProps({open:e.unref(a)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)])],8,P)],10,C))}}),k={modelValue:[String,Array],items:{type:Array,default:()=>[]},collapse:Boolean,modifiers:[String,Array],itemModifiers:{type:[String,Array],default:""},disabled:Boolean},E=["update:modelValue"],$={name:"VvAccordionGroup"};return e.defineComponent({...$,props:k,emits:E,setup(s,{emit:f}){const n=s,{disabled:l,collapse:o,modifiers:m,itemModifiers:p,items:y}=toRefs(n);watchEffect(()=>{typeof n.modelValue=="string"&&o.value&&console.warn("[VvAccordionGroup]: modelValue is a string but collapse is true.")});const d=ref([]),c=computed({get:()=>{var r;return n.modelValue!==void 0?o.value?n.modelValue:Array.isArray(n.modelValue)?n.modelValue[0]:n.modelValue:o.value?d.value:(r=d.value)==null?void 0:r[0]},set:r=>{if(n.modelValue!==void 0)return(Array.isArray(n.modelValue)||o.value)&&!Array.isArray(r)&&(r=[r]),f("update:modelValue",r);d.value=Array.isArray(r)?r:[r]}});useProvideGroupState({key:V,modelValue:c,disabled:l,collapse:o,modifiers:p});const t=useBemModifiers("vv-accordion-group",m,computed(()=>({disabled:l.value})));return(r,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t))},[e.renderSlot(r.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),a=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:a.title},{name:a.name,title:a.title,content:a.content}),{header:e.withCtx(A=>[e.renderSlot(r.$slots,`header::${a.name}`,e.normalizeProps(e.guardReactiveProps(A)))]),details:e.withCtx(A=>[e.renderSlot(r.$slots,`details::${a.name}`,e.normalizeProps(e.guardReactiveProps(A)))]),_:2},1040))),128))])],2))}})});
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAccordionGroup=o(e.vue,e.nanoid,e.core)}(this,(function(e,o,r){"use strict";const t=Symbol.for("accordionGroup");function l(o){const r=e.inject(o,void 0),t=e.computed((()=>{return o=r,!(null==(t=e.unref(o))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var o,t}));return{group:r,isInGroup:t,getGroupOrLocalRef:function(o,t,l){if(null==r?void 0:r.value){const t=e.unref(r.value)[o];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const a=e.toRef(t,o);return e.computed({get:()=>a.value,set(e){l&&l(`update:${o}`,e)}})}}}const a={name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},modifiers:[String,Array],disabled:Boolean,not:Boolean};function n(o,r,t){return e.computed((()=>{const l={[o]:!0},a="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${o}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((r=>{l[`${o}--${r}`]=e.unref(t.value[r])})),l}))}const u=["id","open"],i=["aria-controls","aria-expanded"],d=["aria-hidden"],s=e.defineComponent({name:"VvAccordion",props:a,emits:["update:modelValue"],setup(a,{emit:s}){const c=a,v=e.useAttrs(),p=e.computed((()=>c.name||(null==v?void 0:v.id)||o.nanoid())),{modifiers:m,title:f,content:y,disabled:g,collapse:A,modelValue:V,isInGroup:b,not:h}=function(o,r){const{group:a,isInGroup:n,getGroupOrLocalRef:u}=l(t),{title:i,content:d}=e.toRefs(o),s=u("modelValue",o,r),c=u("not",o),v=u("collapse",o),p=u("modifiers",o),m=e.computed((()=>{var e;return Boolean(o.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{modelValue:s,not:c,isInGroup:n,group:a,collapse:v,modifiers:p,disabled:m,title:i,content:d}}(c,s),S=e.ref(!1),k=e.computed({get:()=>{let e=V.value;return b.value?e=A.value&&Array.isArray(V.value)?V.value.includes(p.value):V.value===p.value:void 0===V.value&&(e=S.value),h.value?!e:e},set:e=>{if(h.value&&(e=!e),b.value)return A.value&&Array.isArray(V.value)?e?void V.value.push(p.value):void(V.value=V.value.filter((e=>e!==p.value))):void(V.value=e?p.value:null);void 0!==V.value||"boolean"!=typeof e?V.value=e:S.value=e}}),B=n("vv-accordion",m,e.computed((()=>({disabled:g.value})))),$=r.useToggle(k);return(o,r)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(p),class:e.normalizeClass(e.unref(B)),open:e.unref(k)},[e.createElementVNode("summary",{"aria-controls":e.unref(p),"aria-expanded":e.unref(k),class:"vv-accordion__summary",onClick:r[0]||(r[0]=e.withModifiers((o=>e.unref($)()),["prevent"]))},[e.renderSlot(o.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(k)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))],8,i),e.createElementVNode("div",{"aria-hidden":!e.unref(k),class:"vv-accordion__content"},[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({open:e.unref(k)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]))],8,d)],10,u))}}),c={modelValue:[String,Array],items:{type:Array,default:()=>[]},collapse:Boolean,modifiers:[String,Array],itemModifiers:{type:[String,Array],default:""},disabled:Boolean,not:Boolean,storeKey:String};return e.defineComponent({name:"VvAccordionGroup",props:c,emits:["update:modelValue"],setup(o,{emit:l}){const a=o,{disabled:u,collapse:i,modifiers:d,itemModifiers:c,items:v,not:p}=e.toRefs(a);e.watchEffect((()=>{"string"==typeof a.modelValue&&i.value&&console.warn("[VvAccordionGroup]: modelValue is a string but collapse is true.")}));let m=e.ref([]);e.watch((()=>a.storeKey),(o=>{m=o?r.useStorage(o,m.value):e.ref([])}),{immediate:!0});const f=e.computed({get:()=>{var e;return void 0!==a.modelValue?i.value?a.modelValue:Array.isArray(a.modelValue)?a.modelValue[0]:a.modelValue:i.value?m.value:null==(e=m.value)?void 0:e[0]},set:e=>{if(void 0!==a.modelValue)return!Array.isArray(a.modelValue)&&!i.value||Array.isArray(e)||(e=[e]),l("update:modelValue",e);m.value=Array.isArray(e)?e:[e]}});!function(o){if(Object.keys(o).some((r=>"key"!==r&&!e.isRef(o[r]))))throw Error("One or more groupState props aren't ref.");e.provide(o.key,e.computed((()=>o)))}({key:t,modelValue:f,disabled:u,collapse:i,modifiers:c,not:p});const y=n("vv-accordion-group",d,e.computed((()=>({disabled:u.value}))));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(y))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(r=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:r.title},{name:r.name,title:r.title,content:r.content}),{header:e.withCtx((t=>[e.renderSlot(o.$slots,`header::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),details:e.withCtx((t=>[e.renderSlot(o.$slots,`details::${r.name}`,e.normalizeProps(e.guardReactiveProps(t)))])),_:2},1040)))),128))]))],2))}})}));
@@ -2,10 +2,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  modelValue: (StringConstructor | ArrayConstructor)[];
3
3
  items: {
4
4
  type: {
5
- (arrayLength: number): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
6
- (...items: import("@/components/VvAccordionGroup/").VvAccordionGroupItem[]): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
7
- new (arrayLength: number): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
8
- new (...items: import("@/components/VvAccordionGroup/").VvAccordionGroupItem[]): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
5
+ (arrayLength: number): import(".").VvAccordionGroupItem[];
6
+ (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
7
+ new (arrayLength: number): import(".").VvAccordionGroupItem[];
8
+ new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
9
9
  isArray(arg: any): arg is any[];
10
10
  readonly prototype: any[];
11
11
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -37,14 +37,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
37
37
  default: string;
38
38
  };
39
39
  disabled: BooleanConstructor;
40
+ not: BooleanConstructor;
41
+ storeKey: StringConstructor;
40
42
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
43
  modelValue: (StringConstructor | ArrayConstructor)[];
42
44
  items: {
43
45
  type: {
44
- (arrayLength: number): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
45
- (...items: import("@/components/VvAccordionGroup/").VvAccordionGroupItem[]): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
46
- new (arrayLength: number): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
47
- new (...items: import("@/components/VvAccordionGroup/").VvAccordionGroupItem[]): import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
46
+ (arrayLength: number): import(".").VvAccordionGroupItem[];
47
+ (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
48
+ new (arrayLength: number): import(".").VvAccordionGroupItem[];
49
+ new (...items: import(".").VvAccordionGroupItem[]): import(".").VvAccordionGroupItem[];
48
50
  isArray(arg: any): arg is any[];
49
51
  readonly prototype: any[];
50
52
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -76,16 +78,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
76
78
  default: string;
77
79
  };
78
80
  disabled: BooleanConstructor;
81
+ not: BooleanConstructor;
82
+ storeKey: StringConstructor;
79
83
  }>> & {
80
84
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
81
85
  }, {
82
86
  disabled: boolean;
87
+ not: boolean;
83
88
  collapse: boolean;
84
- items: import("@/components/VvAccordionGroup/").VvAccordionGroupItem[];
89
+ items: import(".").VvAccordionGroupItem[];
85
90
  itemModifiers: string | string[];
86
- }>, Record<string, (_: any) => any> & Record<string, (_: {
87
- open: boolean;
88
- }) => any> & {
91
+ }>, Record<string, (_: any) => any> & Record<string, (_: any) => any> & {
89
92
  default: (_: {}) => any;
90
93
  }>;
91
94
  export default _default;
@@ -63,5 +63,13 @@ export declare const VvAccordionGroupProps: {
63
63
  * If true, the accordion items will be disabled
64
64
  */
65
65
  disabled: BooleanConstructor;
66
+ /**
67
+ * If true, the accordion items will be opened by default
68
+ */
69
+ not: BooleanConstructor;
70
+ /**
71
+ * Enable local storage persistence
72
+ */
73
+ storeKey: StringConstructor;
66
74
  };
67
75
  export declare const VvAccordionGroupEvents: string[];