@volverjs/ui-vue 0.0.4 → 0.0.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +2 -2
  2. package/auto-imports.d.ts +12 -3
  3. package/bin/icons.cjs +1 -73
  4. package/dist/Volver.d.ts +19 -11
  5. package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
  6. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  8. package/dist/components/VvAccordion/index.d.ts +8 -3
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  12. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  13. package/dist/components/VvAction/VvAction.es.js +276 -98
  14. package/dist/components/VvAction/VvAction.umd.js +1 -1
  15. package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
  16. package/dist/components/VvAction/index.d.ts +2 -2
  17. package/dist/components/VvBadge/VvBadge.es.js +213 -44
  18. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  20. package/dist/components/VvBadge/index.d.ts +1 -1
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +247 -75
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  24. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  25. package/dist/components/VvButton/VvButton.es.js +646 -360
  26. package/dist/components/VvButton/VvButton.umd.js +1 -1
  27. package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
  28. package/dist/components/VvButton/index.d.ts +13 -13
  29. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +261 -79
  30. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  31. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  32. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  33. package/dist/components/VvCard/VvCard.es.js +57 -38
  34. package/dist/components/VvCard/VvCard.umd.js +1 -1
  35. package/dist/components/VvCheckbox/VvCheckbox.es.js +562 -274
  36. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  37. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
  38. package/dist/components/VvCheckbox/index.d.ts +5 -5
  39. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +661 -340
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
  42. package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
  43. package/dist/components/VvCombobox/VvCombobox.es.js +1546 -983
  44. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  45. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +138 -51
  46. package/dist/components/VvCombobox/index.d.ts +41 -10
  47. package/dist/components/VvDialog/VvDialog.es.js +387 -141
  48. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  49. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  50. package/dist/components/VvDialog/index.d.ts +4 -1
  51. package/dist/components/VvDropdown/VvDropdown.es.js +452 -244
  52. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  53. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +130 -42
  54. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
  55. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
  56. package/dist/components/VvDropdown/index.d.ts +40 -11
  57. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +373 -160
  58. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  59. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
  60. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  61. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +285 -90
  62. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  63. package/dist/components/VvIcon/VvIcon.es.js +113 -65
  64. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  65. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  66. package/dist/components/VvIcon/index.d.ts +2 -2
  67. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  69. package/dist/components/VvInputText/VvInputText.es.js +986 -462
  70. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  71. package/dist/components/VvInputText/VvInputText.vue.d.ts +100 -20
  72. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  73. package/dist/components/VvInputText/index.d.ts +66 -13
  74. package/dist/components/VvProgress/VvProgress.es.js +216 -45
  75. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  76. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  77. package/dist/components/VvProgress/index.d.ts +1 -1
  78. package/dist/components/VvRadio/VvRadio.es.js +499 -238
  79. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  80. package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
  81. package/dist/components/VvRadio/index.d.ts +5 -5
  82. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +598 -304
  83. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  84. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
  85. package/dist/components/VvRadioGroup/index.d.ts +3 -3
  86. package/dist/components/VvSelect/VvSelect.es.js +631 -324
  87. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  88. package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
  89. package/dist/components/VvSelect/index.d.ts +3 -3
  90. package/dist/components/VvTextarea/VvTextarea.es.js +676 -355
  91. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  92. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +20 -20
  93. package/dist/components/VvTextarea/index.d.ts +4 -4
  94. package/dist/components/VvTooltip/VvTooltip.es.js +215 -47
  95. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  96. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  97. package/dist/components/VvTooltip/index.d.ts +2 -2
  98. package/dist/components/index.es.js +3522 -2231
  99. package/dist/components/index.umd.js +1 -1
  100. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  101. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  102. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  103. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  104. package/dist/composables/useComponentFocus.d.ts +1 -1
  105. package/dist/composables/useComponentIcon.d.ts +7 -7
  106. package/dist/composables/useDebouncedInput.d.ts +4 -1
  107. package/dist/composables/useDefaults.d.ts +2 -0
  108. package/dist/composables/useModifiers.d.ts +1 -1
  109. package/dist/composables/useOptions.d.ts +2 -2
  110. package/dist/composables/useTextCount.d.ts +3 -3
  111. package/dist/composables/useUniqueId.d.ts +1 -1
  112. package/dist/composables/useVolver.d.ts +1 -1
  113. package/dist/directives/index.d.ts +1 -0
  114. package/dist/directives/index.es.js +264 -55
  115. package/dist/directives/index.umd.js +1 -1
  116. package/dist/directives/v-contextmenu.d.ts +3 -0
  117. package/dist/directives/v-contextmenu.es.js +42 -0
  118. package/dist/directives/v-contextmenu.umd.js +1 -0
  119. package/dist/directives/v-tooltip.es.js +222 -53
  120. package/dist/directives/v-tooltip.umd.js +1 -1
  121. package/dist/icons.d.ts +3 -1
  122. package/dist/icons.es.js +40 -23
  123. package/dist/icons.umd.js +1 -1
  124. package/dist/index.d.ts +0 -1
  125. package/dist/index.es.js +112 -3607
  126. package/dist/index.umd.js +1 -1
  127. package/dist/props/index.d.ts +50 -18
  128. package/dist/resolvers/unplugin.d.ts +7 -1
  129. package/dist/resolvers/unplugin.es.js +77 -37
  130. package/dist/resolvers/unplugin.umd.js +1 -1
  131. package/dist/stories/Combobox/Combobox.settings.d.ts +12 -0
  132. package/dist/stories/Dropdown/Dropdown.settings.d.ts +12 -0
  133. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  134. package/dist/stories/argTypes.d.ts +13 -1
  135. package/package.json +126 -40
  136. package/src/Volver.ts +49 -22
  137. package/src/assets/icons/detailed.json +1 -1
  138. package/src/assets/icons/normal.json +1 -1
  139. package/src/assets/icons/simple.json +1 -1
  140. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  141. package/src/components/VvAccordion/index.ts +12 -4
  142. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  143. package/src/components/VvAccordionGroup/index.ts +8 -0
  144. package/src/components/VvAction/VvAction.vue +7 -7
  145. package/src/components/VvAction/index.ts +1 -1
  146. package/src/components/VvBadge/VvBadge.vue +2 -2
  147. package/src/components/VvBadge/index.ts +1 -1
  148. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  149. package/src/components/VvButton/VvButton.vue +11 -11
  150. package/src/components/VvButton/index.ts +10 -9
  151. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  152. package/src/components/VvButtonGroup/index.ts +1 -1
  153. package/src/components/VvCard/VvCard.vue +2 -2
  154. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  155. package/src/components/VvCheckbox/index.ts +11 -7
  156. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  157. package/src/components/VvCheckboxGroup/index.ts +1 -1
  158. package/src/components/VvCombobox/VvCombobox.vue +44 -26
  159. package/src/components/VvCombobox/index.ts +1 -1
  160. package/src/components/VvDialog/VvDialog.vue +28 -11
  161. package/src/components/VvDialog/index.ts +5 -2
  162. package/src/components/VvDropdown/VvDropdown.vue +7 -5
  163. package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
  164. package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
  165. package/src/components/VvDropdown/index.ts +3 -3
  166. package/src/components/VvIcon/VvIcon.vue +3 -3
  167. package/src/components/VvIcon/index.ts +3 -3
  168. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  169. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  170. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  171. package/src/components/VvInputText/VvInputText.vue +130 -37
  172. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  173. package/src/components/VvInputText/index.ts +62 -1
  174. package/src/components/VvProgress/VvProgress.vue +2 -2
  175. package/src/components/VvProgress/index.ts +1 -1
  176. package/src/components/VvRadio/VvRadio.vue +3 -7
  177. package/src/components/VvRadio/index.ts +11 -7
  178. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  179. package/src/components/VvRadioGroup/index.ts +1 -1
  180. package/src/components/VvSelect/VvSelect.vue +4 -4
  181. package/src/components/VvSelect/index.ts +1 -1
  182. package/src/components/VvTextarea/VvTextarea.vue +6 -6
  183. package/src/components/VvTextarea/index.ts +1 -1
  184. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  185. package/src/components/VvTooltip/index.ts +3 -3
  186. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  187. package/src/composables/dropdown/useProvideDropdown.ts +2 -2
  188. package/src/composables/group/useInjectedGroupState.ts +1 -1
  189. package/src/composables/group/useProvideGroupState.ts +1 -1
  190. package/src/composables/useComponentIcon.ts +1 -1
  191. package/src/composables/useDebouncedInput.ts +10 -3
  192. package/src/composables/useDefaults.ts +89 -0
  193. package/src/composables/useModifiers.ts +4 -2
  194. package/src/composables/useOptions.ts +1 -1
  195. package/src/composables/useVolver.ts +2 -2
  196. package/src/directives/index.ts +3 -1
  197. package/src/directives/v-contextmenu.ts +40 -0
  198. package/src/directives/v-tooltip.ts +2 -2
  199. package/src/icons.ts +1 -1
  200. package/src/index.ts +0 -2
  201. package/src/props/index.ts +20 -10
  202. package/src/resolvers/unplugin.ts +15 -1
  203. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  204. package/src/stories/Accordion/Accordion.test.ts +21 -15
  205. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  206. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  207. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  208. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
  209. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +41 -0
  210. package/src/stories/InputText/InputText.settings.ts +53 -0
  211. package/src/stories/InputText/InputText.stories.mdx +40 -0
  212. package/src/stories/InputText/InputText.test.ts +5 -2
  213. package/src/stories/Tooltip/TooltipDirective.stories.mdx +1 -1
  214. package/src/stories/argTypes.ts +12 -2
  215. package/src/types/group.d.ts +5 -0
@@ -1,41 +1,43 @@
1
- import { unref as l, inject as M, computed as d, toRef as N, toRefs as k, defineComponent as R, useAttrs as D, ref as S, openBlock as g, createElementBlock as h, normalizeClass as B, withModifiers as L, createElementVNode as G, renderSlot as A, normalizeProps as V, guardReactiveProps as b, createTextVNode as C, toDisplayString as E, isRef as T, provide as z, watchEffect as F, Fragment as J, renderList as K, createBlock as U, mergeProps as Y, withCtx as O } from "vue";
2
- import { nanoid as q } from "nanoid";
3
- import { useToggle as x } from "@vueuse/core";
4
- const I = Symbol.for("accordionGroup");
5
- function H(t) {
6
- return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(l(t));
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
7
  }
8
- function Q(t) {
9
- const e = M(t, void 0), r = d(() => !H(e));
10
- function s(o, c, v) {
11
- if (e != null && e.value) {
12
- const i = l(e.value)[o];
13
- return d({
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({
14
15
  get() {
15
- return i == null ? void 0 : i.value;
16
+ return groupPropValue == null ? void 0 : groupPropValue.value;
16
17
  },
17
- set(f) {
18
- i.value = f;
18
+ set(value) {
19
+ groupPropValue.value = value;
19
20
  }
20
21
  });
21
22
  }
22
- const m = N(c, o);
23
- return d({
23
+ const propRef = toRef(props, propName);
24
+ return computed({
24
25
  get() {
25
- return m.value;
26
+ return propRef.value;
26
27
  },
27
- set(i) {
28
- v && v(`update:${o}`, i);
28
+ set(value) {
29
+ if (emit)
30
+ emit(`update:${propName}`, value);
29
31
  }
30
32
  });
31
33
  }
32
34
  return {
33
- group: e,
34
- isInGroup: r,
35
- getGroupOrLocalRef: s
35
+ group,
36
+ isInGroup,
37
+ getGroupOrLocalRef
36
38
  };
37
39
  }
38
- const W = {
40
+ const VvAccordionProps = {
39
41
  /**
40
42
  * Accordion name
41
43
  */
@@ -62,110 +64,168 @@ const W = {
62
64
  /**
63
65
  * If true, the accordion will be disabled
64
66
  */
65
- disabled: Boolean
66
- }, X = ["update:modelValue"];
67
- function Z(t, e) {
68
- const { group: r, isInGroup: s, getGroupOrLocalRef: o } = Q(
69
- I
70
- ), { title: c, content: v } = k(t), m = o("modelValue", t, e), i = o("disabled", t), f = o("collapse", t), n = o("modifiers", t);
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
+ );
71
89
  return {
72
90
  // group props
73
- modelValue: m,
74
- disabled: i,
75
- isInGroup: s,
76
- group: r,
77
- collapse: f,
78
- modifiers: n,
91
+ modelValue,
92
+ not,
93
+ isInGroup,
94
+ group,
95
+ collapse,
96
+ modifiers,
97
+ disabled,
79
98
  // local props
80
- title: c,
81
- content: v
99
+ title,
100
+ content
82
101
  };
83
102
  }
84
- function P(t, e, r) {
85
- return d(() => {
86
- const s = {
87
- [t]: !0
88
- }, o = typeof (e == null ? void 0 : e.value) == "string" ? e.value.split(" ") : e == null ? void 0 : e.value;
89
- return o && Array.isArray(o) && o.forEach((c) => {
90
- s[`${t}--${c}`] = !0;
91
- }), r && Object.keys(r.value).forEach((c) => {
92
- s[`${t}--${c}`] = l(r.value[c]);
93
- }), s;
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;
94
124
  });
95
125
  }
96
- const w = ["id", "open"], ee = ["aria-controls", "aria-expanded"], oe = ["aria-hidden"], te = {
126
+ const _hoisted_1 = ["id", "open"];
127
+ const _hoisted_2 = ["aria-controls", "aria-expanded"];
128
+ const _hoisted_3 = ["aria-hidden"];
129
+ const __default__$1 = {
97
130
  name: "VvAccordion"
98
- }, re = /* @__PURE__ */ R({
99
- ...te,
100
- props: W,
101
- emits: X,
102
- setup(t, { emit: e }) {
103
- const r = t, s = D(), o = d(
104
- () => r.name || (s == null ? void 0 : s.id) || q()
105
- ), {
106
- modifiers: c,
107
- title: v,
108
- content: m,
109
- disabled: i,
110
- collapse: f,
111
- modelValue: n,
112
- isInGroup: a
113
- } = Z(r, e), $ = S(!1), u = d({
114
- get: () => a.value ? f.value && Array.isArray(n.value) ? n.value.includes(o.value) : n.value === o.value : n.value === void 0 ? $.value : n.value,
115
- set: (p) => {
116
- if (a.value) {
117
- if (f.value && Array.isArray(n.value)) {
118
- if (p) {
119
- n.value.push(o.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);
120
175
  return;
121
176
  }
122
- n.value = n.value.filter(
123
- (_) => _ !== o.value
177
+ modelValue.value = modelValue.value.filter(
178
+ (name) => name !== accordionName.value
124
179
  );
125
180
  return;
126
181
  }
127
- n.value = p ? o.value : null;
182
+ modelValue.value = newValue ? accordionName.value : null;
128
183
  return;
129
184
  }
130
- if (n.value === void 0 && typeof p == "boolean") {
131
- $.value = p;
185
+ if (modelValue.value === void 0 && typeof newValue === "boolean") {
186
+ localModelValue.value = newValue;
132
187
  return;
133
188
  }
134
- n.value = p;
189
+ modelValue.value = newValue;
135
190
  }
136
- }), y = P(
191
+ });
192
+ const bemCssClasses = useModifiers(
137
193
  "vv-accordion",
138
- c,
139
- d(() => ({
140
- disabled: i.value
194
+ modifiers,
195
+ computed(() => ({
196
+ disabled: disabled.value
141
197
  }))
142
- ), j = x(u);
143
- return (p, _) => (g(), h("details", {
144
- id: l(o),
145
- class: B(l(y)),
146
- open: l(u),
147
- onClick: _[0] || (_[0] = L((ie) => l(j)(), ["prevent"]))
148
- }, [
149
- G("summary", {
150
- "aria-controls": l(o),
151
- "aria-expanded": l(u),
152
- class: "vv-collapse__summary"
153
- }, [
154
- A(p.$slots, "summary", V(b({ open: l(u) })), () => [
155
- C(E(l(v)), 1)
156
- ])
157
- ], 8, ee),
158
- G("div", {
159
- "aria-hidden": !l(u),
160
- 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)
161
205
  }, [
162
- A(p.$slots, "details", V(b({ open: l(u) })), () => [
163
- C(E(l(m)), 1)
164
- ])
165
- ], 8, oe)
166
- ], 10, w));
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
+ };
167
226
  }
168
- }), ae = {
227
+ });
228
+ const VvAccordionGroupProps = {
169
229
  /**
170
230
  * VModel
171
231
  */
@@ -193,79 +253,119 @@ const w = ["id", "open"], ee = ["aria-controls", "aria-expanded"], oe = ["aria-h
193
253
  /**
194
254
  * If true, the accordion items will be disabled
195
255
  */
196
- disabled: Boolean
197
- }, ne = ["update:modelValue"];
198
- function le(t) {
199
- if (Object.keys(t).some(
200
- (e) => e !== "key" && !T(t[e])
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])
201
270
  ))
202
271
  throw Error("One or more groupState props aren't ref.");
203
- z(
204
- t.key,
205
- d(() => t)
272
+ provide(
273
+ groupState.key,
274
+ computed(() => groupState)
206
275
  );
207
276
  }
208
- const se = {
277
+ const __default__ = {
209
278
  name: "VvAccordionGroup"
210
- }, ve = /* @__PURE__ */ R({
211
- ...se,
212
- props: ae,
213
- emits: ne,
214
- setup(t, { emit: e }) {
215
- const r = t, { disabled: s, collapse: o, modifiers: c, itemModifiers: v, items: m } = k(r);
216
- F(() => {
217
- typeof r.modelValue == "string" && o.value && console.warn(
218
- "[VvAccordionGroup]: modelValue is a string but collapse is true."
219
- );
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);
287
+ watchEffect(() => {
288
+ if (typeof props.modelValue === "string" && collapse.value) {
289
+ console.warn(
290
+ `[VvAccordionGroup]: modelValue is a string but collapse is true.`
291
+ );
292
+ }
220
293
  });
221
- const i = S([]), f = d({
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({
222
307
  get: () => {
223
- var a;
224
- return r.modelValue !== void 0 ? o.value ? r.modelValue : Array.isArray(r.modelValue) ? r.modelValue[0] : r.modelValue : o.value ? i.value : (a = i.value) == null ? void 0 : a[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;
225
316
  },
226
- set: (a) => {
227
- if (r.modelValue !== void 0)
228
- return (Array.isArray(r.modelValue) || o.value) && !Array.isArray(a) && (a = [a]), e("update:modelValue", a);
229
- i.value = Array.isArray(a) ? a : [a];
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];
230
325
  }
231
326
  });
232
- le({
233
- key: I,
234
- modelValue: f,
235
- disabled: s,
236
- collapse: o,
237
- modifiers: v
327
+ useProvideGroupState({
328
+ key: INJECTION_KEY_ACCORDION_GROUP,
329
+ modelValue,
330
+ disabled,
331
+ collapse,
332
+ modifiers: itemModifiers,
333
+ not
238
334
  });
239
- const n = P(
335
+ const bemCssClasses = useModifiers(
240
336
  "vv-accordion-group",
241
- c,
242
- d(() => ({
243
- disabled: s.value
337
+ modifiers,
338
+ computed(() => ({
339
+ disabled: disabled.value
244
340
  }))
245
341
  );
246
- return (a, $) => (g(), h("div", {
247
- class: B(l(n))
248
- }, [
249
- A(a.$slots, "default", {}, () => [
250
- (g(!0), h(J, null, K(l(m), (u) => (g(), U(re, Y({
251
- key: u.title
252
- }, {
253
- name: u.name,
254
- title: u.title,
255
- content: u.content
256
- }), {
257
- header: O((y) => [
258
- A(a.$slots, `header::${u.name}`, V(b(y)))
259
- ]),
260
- details: O((y) => [
261
- A(a.$slots, `details::${u.name}`, V(b(y)))
262
- ]),
263
- _: 2
264
- }, 1040))), 128))
265
- ])
266
- ], 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
+ };
267
367
  }
268
368
  });
269
369
  export {
270
- ve as default
370
+ _sfc_main as default
271
371
  };
@@ -1 +1 @@
1
- (function(e,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("vue"),require("nanoid"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","nanoid","@vueuse/core"],y):(e=typeof globalThis<"u"?globalThis:e||self,e.VvAccordionGroup=y(e.vue,e.nanoid,e.core))})(this,function(e,y,b){"use strict";const V=Symbol.for("accordionGroup");function k(t){return(o=>o==null||o===""||Array.isArray(o)&&o.length===0||!(o instanceof Date)&&typeof o=="object"&&Object.keys(o).length===0)(e.unref(t))}function C(t){const o=e.inject(t,void 0),n=e.computed(()=>!k(o));function l(r,d,u){if(o!=null&&o.value){const i=e.unref(o.value)[r];return e.computed({get(){return i==null?void 0:i.value},set(f){i.value=f}})}const m=e.toRef(d,r);return e.computed({get(){return m.value},set(i){u&&u(`update:${r}`,i)}})}return{group:o,isInGroup:n,getGroupOrLocalRef:l}}const G={name:String,title:String,content:String,modelValue:{type:Boolean,default:void 0},modifiers:[String,Array],disabled:Boolean},S=["update:modelValue"];function $(t,o){const{group:n,isInGroup:l,getGroupOrLocalRef:r}=C(V),{title:d,content:u}=e.toRefs(t),m=r("modelValue",t,o),i=r("disabled",t),f=r("collapse",t),s=r("modifiers",t);return{modelValue:m,disabled:i,isInGroup:l,group:n,collapse:f,modifiers:s,title:d,content:u}}function h(t,o,n){return e.computed(()=>{const l={[t]:!0},r=typeof(o==null?void 0:o.value)=="string"?o.value.split(" "):o==null?void 0:o.value;return r&&Array.isArray(r)&&r.forEach(d=>{l[`${t}--${d}`]=!0}),n&&Object.keys(n.value).forEach(d=>{l[`${t}--${d}`]=e.unref(n.value[d])}),l})}const E=["id","open"],R=["aria-controls","aria-expanded"],B=["aria-hidden"],P={name:"VvAccordion"},O=e.defineComponent({...P,props:G,emits:S,setup(t,{emit:o}){const n=t,l=e.useAttrs(),r=e.computed(()=>n.name||(l==null?void 0:l.id)||y.nanoid()),{modifiers:d,title:u,content:m,disabled:i,collapse:f,modelValue:s,isInGroup:a}=$(n,o),g=e.ref(!1),c=e.computed({get:()=>a.value?f.value&&Array.isArray(s.value)?s.value.includes(r.value):s.value===r.value:s.value===void 0?g.value:s.value,set:p=>{if(a.value){if(f.value&&Array.isArray(s.value)){if(p){s.value.push(r.value);return}s.value=s.value.filter(_=>_!==r.value);return}s.value=p?r.value:null;return}if(s.value===void 0&&typeof p=="boolean"){g.value=p;return}s.value=p}}),A=h("vv-accordion",d,e.computed(()=>({disabled:i.value}))),N=b.useToggle(c);return(p,_)=>(e.openBlock(),e.createElementBlock("details",{id:e.unref(r),class:e.normalizeClass(e.unref(A)),open:e.unref(c),onClick:_[0]||(_[0]=e.withModifiers(D=>e.unref(N)(),["prevent"]))},[e.createElementVNode("summary",{"aria-controls":e.unref(r),"aria-expanded":e.unref(c),class:"vv-collapse__summary"},[e.renderSlot(p.$slots,"summary",e.normalizeProps(e.guardReactiveProps({open:e.unref(c)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)])],8,R),e.createElementVNode("div",{"aria-hidden":!e.unref(c),class:"vv-collapse__content"},[e.renderSlot(p.$slots,"details",e.normalizeProps(e.guardReactiveProps({open:e.unref(c)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(m)),1)])],8,B)],10,E))}}),j={modelValue:[String,Array],items:{type:Array,default:()=>[]},collapse:Boolean,modifiers:[String,Array],itemModifiers:{type:[String,Array],default:""},disabled:Boolean},I=["update:modelValue"];function z(t){if(Object.keys(t).some(o=>o!=="key"&&!e.isRef(t[o])))throw Error("One or more groupState props aren't ref.");e.provide(t.key,e.computed(()=>t))}const M={name:"VvAccordionGroup"};return e.defineComponent({...M,props:j,emits:I,setup(t,{emit:o}){const n=t,{disabled:l,collapse:r,modifiers:d,itemModifiers:u,items:m}=e.toRefs(n);e.watchEffect(()=>{typeof n.modelValue=="string"&&r.value&&console.warn("[VvAccordionGroup]: modelValue is a string but collapse is true.")});const i=e.ref([]),f=e.computed({get:()=>{var a;return n.modelValue!==void 0?r.value?n.modelValue:Array.isArray(n.modelValue)?n.modelValue[0]:n.modelValue:r.value?i.value:(a=i.value)==null?void 0:a[0]},set:a=>{if(n.modelValue!==void 0)return(Array.isArray(n.modelValue)||r.value)&&!Array.isArray(a)&&(a=[a]),o("update:modelValue",a);i.value=Array.isArray(a)?a:[a]}});z({key:V,modelValue:f,disabled:l,collapse:r,modifiers:u});const s=h("vv-accordion-group",d,e.computed(()=>({disabled:l.value})));return(a,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s))},[e.renderSlot(a.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),c=>(e.openBlock(),e.createBlock(O,e.mergeProps({key:c.title},{name:c.name,title:c.title,content:c.content}),{header:e.withCtx(A=>[e.renderSlot(a.$slots,`header::${c.name}`,e.normalizeProps(e.guardReactiveProps(A)))]),details:e.withCtx(A=>[e.renderSlot(a.$slots,`details::${c.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[];