@volverjs/ui-vue 0.0.10-beta.23 → 0.0.10-beta.25

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 (90) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +119 -79
  2. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +18 -4
  4. package/dist/components/VvAccordion/index.d.ts +4 -8
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +282 -124
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +34 -7
  8. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  9. package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
  11. package/dist/components/VvButton/VvButton.es.js +92 -98
  12. package/dist/components/VvButton/VvButton.umd.js +1 -1
  13. package/dist/components/VvButton/VvButton.vue.d.ts +7 -7
  14. package/dist/components/VvButton/index.d.ts +11 -11
  15. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -13
  16. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  17. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +3 -3
  18. package/dist/components/VvCheckbox/VvCheckbox.es.js +81 -87
  19. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  20. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +6 -6
  21. package/dist/components/VvCheckbox/index.d.ts +2 -2
  22. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +15 -29
  23. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  24. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +5 -5
  25. package/dist/components/VvCombobox/VvCombobox.es.js +13 -16
  26. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  27. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +11 -11
  28. package/dist/components/VvCombobox/index.d.ts +1 -1
  29. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +5 -5
  30. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
  31. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
  32. package/dist/components/VvDropdown/index.d.ts +1 -1
  33. package/dist/components/VvInputFile/VvInputFile.es.js +183 -168
  34. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  35. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +16 -9
  36. package/dist/components/VvInputFile/index.d.ts +12 -3
  37. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  38. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  39. package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
  40. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  41. package/dist/components/VvRadio/VvRadio.es.js +64 -70
  42. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  43. package/dist/components/VvRadio/VvRadio.vue.d.ts +6 -6
  44. package/dist/components/VvRadio/index.d.ts +6 -6
  45. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +15 -29
  46. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  47. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +5 -5
  48. package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
  49. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +5 -5
  50. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
  51. package/dist/components/VvTooltip/index.d.ts +1 -1
  52. package/dist/components/index.es.js +494 -328
  53. package/dist/components/index.umd.js +1 -1
  54. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  55. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  56. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  57. package/dist/constants.d.ts +6 -10
  58. package/dist/icons.es.js +3 -3
  59. package/dist/icons.umd.js +1 -1
  60. package/dist/index.es.js +3 -2
  61. package/dist/index.umd.js +1 -1
  62. package/dist/props/index.d.ts +1 -1
  63. package/dist/resolvers/unplugin.es.js +3 -2
  64. package/dist/resolvers/unplugin.umd.js +1 -1
  65. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +58 -15
  66. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +381 -107
  67. package/dist/types/group.d.ts +37 -15
  68. package/package.json +37 -36
  69. package/src/assets/icons/detailed.json +1 -1
  70. package/src/assets/icons/normal.json +1 -1
  71. package/src/assets/icons/simple.json +1 -1
  72. package/src/components/VvAccordion/VvAccordion.vue +119 -56
  73. package/src/components/VvAccordion/index.ts +8 -23
  74. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -42
  75. package/src/components/VvAccordionGroup/index.ts +4 -1
  76. package/src/components/VvButton/index.ts +7 -12
  77. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  78. package/src/components/VvCheckbox/index.ts +2 -2
  79. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  80. package/src/components/VvInputFile/VvInputFile.vue +71 -47
  81. package/src/components/VvInputFile/index.ts +5 -4
  82. package/src/components/VvRadio/index.ts +5 -5
  83. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  84. package/src/composables/group/useInjectedGroupState.ts +20 -16
  85. package/src/composables/group/useProvideGroupState.ts +10 -15
  86. package/src/constants.ts +19 -14
  87. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  88. package/src/stories/AccordionGroup/AccordionGroup.test.ts +16 -10
  89. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  90. package/src/types/group.ts +22 -14
package/dist/index.es.js CHANGED
@@ -8,7 +8,7 @@ import { addCollection, addIcon, addAPIProvider } from "@iconify/vue";
8
8
  import { ref } from "vue";
9
9
  const SPLIT_LOWER_UPPER_RE = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu");
10
10
  const SPLIT_UPPER_UPPER_RE = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu");
11
- const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)", "u");
11
+ const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u");
12
12
  const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
13
13
  const SPLIT_REPLACE_VALUE = "$1\0$2";
14
14
  const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
@@ -32,7 +32,8 @@ function splitSeparateNumbers(value) {
32
32
  const word = words[i];
33
33
  const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
34
34
  if (match) {
35
- words.splice(i, 1, word.slice(0, match.index), word.slice(match.index));
35
+ const offset = match.index + (match[1] ?? match[2]).length;
36
+ words.splice(i, 1, word.slice(0, offset), word.slice(offset));
36
37
  }
37
38
  }
38
39
  return words;
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@iconify/vue"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@iconify/vue","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).volver={},e.vue$1,e.vue)}(this,(function(e,t,n){"use strict";var i=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const r=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),s=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),c=new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)","u"),l=/[^\p{L}\d]+/giu,u="$1\0$2",a="";function d(e){let t=e.trim();t=t.replace(r,u).replace(s,u),t=t.replace(l,"\0");let n=0,i=t.length;for(;"\0"===t.charAt(n);)n++;if(n===i)return[];for(;"\0"===t.charAt(i-1);)i--;return t.slice(n,i).split(/\0/g)}function f(e){const t=d(e);for(let n=0;n<t.length;n++){const e=t[n],i=c.exec(e);i&&t.splice(n,1,e.slice(0,i.index),e.slice(i.index))}return t}function h(e,t){const[n,i,o]=function(e,t={}){const n=t.split??(t.separateNumbers?f:d),i=t.prefixCharacters??a,o=t.suffixCharacters??a;let r=0,s=e.length;for(;r<e.length;){const t=e.charAt(r);if(!i.includes(t))break;r++}for(;s>r;){const t=s-1,n=e.charAt(t);if(!o.includes(n))break;s=t}return[e.slice(0,r),n(e.slice(r,s)),e.slice(s)]}(e,t);return n+i.map((r=null==t?void 0:t.locale,!1===r?e=>e.toLowerCase():e=>e.toLocaleLowerCase(r))).join((null==t?void 0:t.delimiter)??" ")+o;var r}const p=Symbol.for("volver");function v(e,t,n){const i=n||e.name;if(!i)return e;const o=null==t?void 0:t[i],r=e.props;return o&&r?{...e,name:i,props:Object.keys(r).reduce(((e,t)=>{if(!(t in o))return e[t]=r[t],e;const n=o[t];return"function"==typeof r[t]||Array.isArray(r[t])?(e[t]={type:r[t],default:n},e):(e[t]={...r[t],default:n},e)}),{})}:{...e,name:i}}class g{constructor({fetchWithCredentials:e,fetchOptions:t,iconsProvider:i,nuxt:r,iconsCollections:s,defaults:c}={}){o(this,"_fetchOptions",{}),o(this,"_iconsCollections",[]),o(this,"_iconsProvider","vv"),o(this,"_nuxt",!1),o(this,"defaults",n.ref({})),t&&(this._fetchOptions=t),e&&(this._fetchOptions={...this._fetchOptions,credentials:"include"}),i&&(this._iconsProvider=i),r&&(this._nuxt=r),s&&Array.isArray(s)&&s.forEach((e=>{this.addCollection(e,this._iconsProvider)})),c&&(this.defaults.value=c)}get nuxt(){return this._nuxt}get iconsProvider(){return this._iconsProvider}get iconsCollections(){return this._iconsCollections}addCollection(e,n=this._iconsProvider){return this._iconsCollections.push(e),t.addCollection(e,n)}addIcon(e,n){return t.addIcon(e,n)}addIconsAPIProvider(e,n){return t.addAPIProvider(e,n)}fetchIcon(e,t={cache:"force-cache"}){return new Promise(((n,i)=>{fetch(e,{...this._fetchOptions,...t}).catch((e=>i(e))).then((e=>null==e?void 0:e.text())).then((e=>n(e)))}))}}const b={install(e,t={}){const n=new g(t);e.config.globalProperties.$vv=n,t.components&&Object.entries(t.components).forEach((([n,i])=>{e.component(n,v(i,t.defaults))})),t.aliases&&Object.entries(t.aliases).forEach((([n,i])=>{e.component(n,v(i,t.defaults,n))})),t.directives&&Object.entries(t.directives).forEach((([t,n])=>{const i=function(e,t){return h(e,{delimiter:"-",...t})}(t);i.startsWith("v-")&&(t=i.substring(2).toLocaleLowerCase()),e.directive(t,n)})),e.provide(p,n)}};e.VolverPlugin=b,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@iconify/vue"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@iconify/vue","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).volver={},e.vue$1,e.vue)}(this,(function(e,t,n){"use strict";var i=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const r=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),s=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),c=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),l=/[^\p{L}\d]+/giu,u="$1\0$2",a="";function f(e){let t=e.trim();t=t.replace(r,u).replace(s,u),t=t.replace(l,"\0");let n=0,i=t.length;for(;"\0"===t.charAt(n);)n++;if(n===i)return[];for(;"\0"===t.charAt(i-1);)i--;return t.slice(n,i).split(/\0/g)}function d(e){const t=f(e);for(let n=0;n<t.length;n++){const e=t[n],i=c.exec(e);if(i){const o=i.index+(i[1]??i[2]).length;t.splice(n,1,e.slice(0,o),e.slice(o))}}return t}function h(e,t){const[n,i,o]=function(e,t={}){const n=t.split??(t.separateNumbers?d:f),i=t.prefixCharacters??a,o=t.suffixCharacters??a;let r=0,s=e.length;for(;r<e.length;){const t=e.charAt(r);if(!i.includes(t))break;r++}for(;s>r;){const t=s-1,n=e.charAt(t);if(!o.includes(n))break;s=t}return[e.slice(0,r),n(e.slice(r,s)),e.slice(s)]}(e,t);return n+i.map((r=null==t?void 0:t.locale,!1===r?e=>e.toLowerCase():e=>e.toLocaleLowerCase(r))).join((null==t?void 0:t.delimiter)??" ")+o;var r}const p=Symbol.for("volver");function v(e,t,n){const i=n||e.name;if(!i)return e;const o=null==t?void 0:t[i],r=e.props;return o&&r?{...e,name:i,props:Object.keys(r).reduce(((e,t)=>{if(!(t in o))return e[t]=r[t],e;const n=o[t];return"function"==typeof r[t]||Array.isArray(r[t])?(e[t]={type:r[t],default:n},e):(e[t]={...r[t],default:n},e)}),{})}:{...e,name:i}}class g{constructor({fetchWithCredentials:e,fetchOptions:t,iconsProvider:i,nuxt:r,iconsCollections:s,defaults:c}={}){o(this,"_fetchOptions",{}),o(this,"_iconsCollections",[]),o(this,"_iconsProvider","vv"),o(this,"_nuxt",!1),o(this,"defaults",n.ref({})),t&&(this._fetchOptions=t),e&&(this._fetchOptions={...this._fetchOptions,credentials:"include"}),i&&(this._iconsProvider=i),r&&(this._nuxt=r),s&&Array.isArray(s)&&s.forEach((e=>{this.addCollection(e,this._iconsProvider)})),c&&(this.defaults.value=c)}get nuxt(){return this._nuxt}get iconsProvider(){return this._iconsProvider}get iconsCollections(){return this._iconsCollections}addCollection(e,n=this._iconsProvider){return this._iconsCollections.push(e),t.addCollection(e,n)}addIcon(e,n){return t.addIcon(e,n)}addIconsAPIProvider(e,n){return t.addAPIProvider(e,n)}fetchIcon(e,t={cache:"force-cache"}){return new Promise(((n,i)=>{fetch(e,{...this._fetchOptions,...t}).catch((e=>i(e))).then((e=>null==e?void 0:e.text())).then((e=>n(e)))}))}}const b={install(e,t={}){const n=new g(t);e.config.globalProperties.$vv=n,t.components&&Object.entries(t.components).forEach((([n,i])=>{e.component(n,v(i,t.defaults))})),t.aliases&&Object.entries(t.aliases).forEach((([n,i])=>{e.component(n,v(i,t.defaults,n))})),t.directives&&Object.entries(t.directives).forEach((([t,n])=>{const i=function(e,t){return h(e,{delimiter:"-",...t})}(t);i.startsWith("v-")&&(t=i.substring(2).toLocaleLowerCase()),e.directive(t,n)})),e.provide(p,n)}};e.VolverPlugin=b,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
@@ -264,7 +264,7 @@ export declare const DropdownProps: {
264
264
  * Dropdown placement
265
265
  */
266
266
  placement: {
267
- type: PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
267
+ type: PropType<"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end">;
268
268
  default: Side;
269
269
  validator: (value: Side & Placement) => boolean;
270
270
  };
@@ -1,6 +1,6 @@
1
1
  const SPLIT_LOWER_UPPER_RE = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu");
2
2
  const SPLIT_UPPER_UPPER_RE = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu");
3
- const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)", "u");
3
+ const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u");
4
4
  const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
5
5
  const SPLIT_REPLACE_VALUE = "$1\0$2";
6
6
  const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
@@ -24,7 +24,8 @@ function splitSeparateNumbers(value) {
24
24
  const word = words[i];
25
25
  const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
26
26
  if (match) {
27
- words.splice(i, 1, word.slice(0, match.index), word.slice(match.index));
27
+ const offset = match.index + (match[1] ?? match[2]).length;
28
+ words.splice(i, 1, word.slice(0, offset), word.slice(offset));
28
29
  }
29
30
  }
30
31
  return words;
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).components={})}(this,(function(e){"use strict";const o=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),t=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),r=new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)","u"),n=/[^\p{L}\d]+/giu,i="$1\0$2",v="";function c(e){let r=e.trim();r=r.replace(o,i).replace(t,i),r=r.replace(n,"\0");let v=0,c=r.length;for(;"\0"===r.charAt(v);)v++;if(v===c)return[];for(;"\0"===r.charAt(c-1);)c--;return r.slice(v,c).split(/\0/g)}function s(e){const o=c(e);for(let t=0;t<o.length;t++){const e=o[t],n=r.exec(e);n&&o.splice(t,1,e.slice(0,n.index),e.slice(n.index))}return o}function u(e,o){const[t,r,n]=function(e,o={}){const t=o.split??(o.separateNumbers?s:c),r=o.prefixCharacters??v,n=o.suffixCharacters??v;let i=0,u=e.length;for(;i<e.length;){const o=e.charAt(i);if(!r.includes(o))break;i++}for(;u>i;){const o=u-1,t=e.charAt(o);if(!n.includes(t))break;u=o}return[e.slice(0,i),t(e.slice(i,u)),e.slice(u)]}(e,o);return t+r.map((i=null==o?void 0:o.locale,!1===i?e=>e.toLowerCase():e=>e.toLocaleLowerCase(i))).join((null==o?void 0:o.delimiter)??" ")+n;var i}function l(e,o){return u(e,{delimiter:"-",...o})}const p=["vv-icon","vv-action"],d=["v-tooltip","v-contextmenu"],f=function(e){if(!p.includes(e))return"vv-dropdown"===e?["vv-dropdown","vv-dropdown-option","vv-dropdown-action"]:"vv-combobox"===e?["vv-select","vv-dropdown-option","vv-dropdown-optgroup","vv-dropdown","vv-dropdown-action"]:"vv-button-group"===e?["vv-button","vv-button-group"]:"vv-accordion-group"===e?["vv-accordion","vv-accordion-group"]:"vv-checkbox-group"===e?["vv-checkbox","vv-checkbox-group"]:"vv-radio-group"===e?["vv-radio","vv-radio-group"]:"vv-alert-group"===e?["vv-alert","vv-alert-group"]:"v-tooltip"===e?["vv-tooltip"]:[e]},a=function(e,o){const t=[];if(!o)return t;const r=f(e);return r&&r.forEach((e=>{t.push(`@volverjs/style/${"scss"===o?"scss/":""}components/${e}`)})),t};e.VolverResolver=function({prefix:e="vv",importStyle:o,directives:t,ignore:r,cherryPick:n}={}){return[{type:"component",resolve:t=>{if(!e||!t.toLowerCase().startsWith(e.toLowerCase()))return;const i=l(t).replace(`${e}-`,"vv-");return r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/components",sideEffects:a(i,o),name:t}}},{type:"directive",resolve:e=>{if(!t)return;const i=`v-${l(e)}`;return!d.includes(i)||r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/directives",sideEffects:a(i,o),name:`v${e}`}}}]},e.getStyleNames=f,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).components={})}(this,(function(e){"use strict";const o=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),t=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),r=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),n=/[^\p{L}\d]+/giu,i="$1\0$2",v="";function c(e){let r=e.trim();r=r.replace(o,i).replace(t,i),r=r.replace(n,"\0");let v=0,c=r.length;for(;"\0"===r.charAt(v);)v++;if(v===c)return[];for(;"\0"===r.charAt(c-1);)c--;return r.slice(v,c).split(/\0/g)}function s(e){const o=c(e);for(let t=0;t<o.length;t++){const e=o[t],n=r.exec(e);if(n){const r=n.index+(n[1]??n[2]).length;o.splice(t,1,e.slice(0,r),e.slice(r))}}return o}function u(e,o){const[t,r,n]=function(e,o={}){const t=o.split??(o.separateNumbers?s:c),r=o.prefixCharacters??v,n=o.suffixCharacters??v;let i=0,u=e.length;for(;i<e.length;){const o=e.charAt(i);if(!r.includes(o))break;i++}for(;u>i;){const o=u-1,t=e.charAt(o);if(!n.includes(t))break;u=o}return[e.slice(0,i),t(e.slice(i,u)),e.slice(u)]}(e,o);return t+r.map((i=null==o?void 0:o.locale,!1===i?e=>e.toLowerCase():e=>e.toLocaleLowerCase(i))).join((null==o?void 0:o.delimiter)??" ")+n;var i}function l(e,o){return u(e,{delimiter:"-",...o})}const p=["vv-icon","vv-action"],d=["v-tooltip","v-contextmenu"],f=function(e){if(!p.includes(e))return"vv-dropdown"===e?["vv-dropdown","vv-dropdown-option","vv-dropdown-action"]:"vv-combobox"===e?["vv-select","vv-dropdown-option","vv-dropdown-optgroup","vv-dropdown","vv-dropdown-action"]:"vv-button-group"===e?["vv-button","vv-button-group"]:"vv-accordion-group"===e?["vv-accordion","vv-accordion-group"]:"vv-checkbox-group"===e?["vv-checkbox","vv-checkbox-group"]:"vv-radio-group"===e?["vv-radio","vv-radio-group"]:"vv-alert-group"===e?["vv-alert","vv-alert-group"]:"v-tooltip"===e?["vv-tooltip"]:[e]},a=function(e,o){const t=[];if(!o)return t;const r=f(e);return r&&r.forEach((e=>{t.push(`@volverjs/style/${"scss"===o?"scss/":""}components/${e}`)})),t};e.VolverResolver=function({prefix:e="vv",importStyle:o,directives:t,ignore:r,cherryPick:n}={}){return[{type:"component",resolve:t=>{if(!e||!t.toLowerCase().startsWith(e.toLowerCase()))return;const i=l(t).replace(`${e}-`,"vv-");return r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/components",sideEffects:a(i,o),name:t}}},{type:"directive",resolve:e=>{if(!t)return;const i=`v-${l(e)}`;return!d.includes(i)||r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/directives",sideEffects:a(i,o),name:`v${e}`}}}]},e.getStyleNames=f,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
@@ -2,7 +2,10 @@ import type { Meta, StoryObj } from '@storybook/vue3';
2
2
  import VvAccordionGroup from '@/components/VvAccordionGroup/VvAccordionGroup.vue';
3
3
  declare const _default: Meta<{
4
4
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{
5
- modelValue: (ArrayConstructor | StringConstructor)[];
5
+ modelValue: {
6
+ type: globalThis.PropType<string | string[] | undefined>;
7
+ default: undefined;
8
+ };
6
9
  items: {
7
10
  type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
8
11
  default: () => never[];
@@ -19,10 +22,17 @@ declare const _default: Meta<{
19
22
  type: globalThis.PropType<string | string[]>;
20
23
  default: undefined;
21
24
  };
22
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ }>>, {
26
+ expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
27
+ expand: (name?: string | string[] | undefined) => void;
28
+ collapse: (name?: string | string[] | undefined) => void;
29
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
30
  [x: string]: (...args: any[]) => void;
24
31
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<globalThis.ExtractPropTypes<{
25
- modelValue: (ArrayConstructor | StringConstructor)[];
32
+ modelValue: {
33
+ type: globalThis.PropType<string | string[] | undefined>;
34
+ default: undefined;
35
+ };
26
36
  items: {
27
37
  type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
28
38
  default: () => never[];
@@ -40,10 +50,11 @@ declare const _default: Meta<{
40
50
  default: undefined;
41
51
  };
42
52
  }>>, {
43
- disabled: boolean;
44
- modifiers: string | string[];
45
53
  collapse: boolean;
54
+ disabled: boolean;
55
+ modelValue: string | string[] | undefined;
46
56
  not: boolean;
57
+ modifiers: string | string[];
47
58
  items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
48
59
  itemModifiers: string | string[];
49
60
  }, true, {}, {}, {
@@ -54,7 +65,10 @@ declare const _default: Meta<{
54
65
  M: {};
55
66
  Defaults: {};
56
67
  }, Readonly<globalThis.ExtractPropTypes<{
57
- modelValue: (ArrayConstructor | StringConstructor)[];
68
+ modelValue: {
69
+ type: globalThis.PropType<string | string[] | undefined>;
70
+ default: undefined;
71
+ };
58
72
  items: {
59
73
  type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
60
74
  default: () => never[];
@@ -71,11 +85,16 @@ declare const _default: Meta<{
71
85
  type: globalThis.PropType<string | string[]>;
72
86
  default: undefined;
73
87
  };
74
- }>>, {}, {}, {}, {}, {
75
- disabled: boolean;
76
- modifiers: string | string[];
88
+ }>>, {
89
+ expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
90
+ expand: (name?: string | string[] | undefined) => void;
91
+ collapse: (name?: string | string[] | undefined) => void;
92
+ }, {}, {}, {}, {
77
93
  collapse: boolean;
94
+ disabled: boolean;
95
+ modelValue: string | string[] | undefined;
78
96
  not: boolean;
97
+ modifiers: string | string[];
79
98
  items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
80
99
  itemModifiers: string | string[];
81
100
  }>;
@@ -83,7 +102,10 @@ declare const _default: Meta<{
83
102
  __isTeleport?: undefined;
84
103
  __isSuspense?: undefined;
85
104
  } & import("vue").ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
86
- modelValue: (ArrayConstructor | StringConstructor)[];
105
+ modelValue: {
106
+ type: globalThis.PropType<string | string[] | undefined>;
107
+ default: undefined;
108
+ };
87
109
  items: {
88
110
  type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
89
111
  default: () => never[];
@@ -100,18 +122,39 @@ declare const _default: Meta<{
100
122
  type: globalThis.PropType<string | string[]>;
101
123
  default: undefined;
102
124
  };
103
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
125
+ }>>, {
126
+ expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
127
+ expand: (name?: string | string[] | undefined) => void;
128
+ collapse: (name?: string | string[] | undefined) => void;
129
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
104
130
  [x: string]: (...args: any[]) => void;
105
131
  }, string, {
106
- disabled: boolean;
107
- modifiers: string | string[];
108
132
  collapse: boolean;
133
+ disabled: boolean;
134
+ modelValue: string | string[] | undefined;
109
135
  not: boolean;
136
+ modifiers: string | string[];
110
137
  items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
111
138
  itemModifiers: string | string[];
112
139
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
113
- $slots: Partial<Record<`header::${string}`, (_: any) => any>> & Partial<Record<`details::${string}`, (_: any) => any>> & {
114
- default?(_: {}): any;
140
+ $slots: Partial<Record<`summary::${string}`, (_: {
141
+ isExpanded: boolean;
142
+ expand: () => void;
143
+ collapse: () => void;
144
+ groupExpand: (name?: string | string[] | undefined) => void;
145
+ groupCollapse: (name?: string | string[] | undefined) => void;
146
+ }) => any>> & Partial<Record<`content::${string}`, (_: {
147
+ isExpanded: boolean;
148
+ expand: () => void;
149
+ collapse: () => void;
150
+ groupExpand: (name?: string | string[] | undefined) => void;
151
+ groupCollapse: (name?: string | string[] | undefined) => void;
152
+ }) => any>> & {
153
+ default?(_: {
154
+ expandedAccordions: Set<string>;
155
+ expand: (name?: string | string[] | undefined) => void;
156
+ collapse: (name?: string | string[] | undefined) => void;
157
+ }): any;
115
158
  };
116
159
  })>;
117
160
  export default _default;