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

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 (67) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +1 -3
  2. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +1 -6
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  5. package/dist/components/VvAction/VvAction.es.js +1 -2
  6. package/dist/components/VvAction/VvAction.umd.js +1 -1
  7. package/dist/components/VvAlert/VvAlert.es.js +0 -7
  8. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  9. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +0 -10
  10. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  11. package/dist/components/VvBadge/VvBadge.es.js +1 -2
  12. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  13. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -3
  14. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  15. package/dist/components/VvButton/VvButton.es.js +15 -33
  16. package/dist/components/VvButton/VvButton.umd.js +1 -1
  17. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -2
  18. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  19. package/dist/components/VvCard/VvCard.es.js +1 -5
  20. package/dist/components/VvCard/VvCard.umd.js +1 -1
  21. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -2
  22. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  23. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +2 -13
  24. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  25. package/dist/components/VvCombobox/VvCombobox.es.js +15 -48
  26. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  27. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +26 -26
  28. package/dist/components/VvCombobox/index.d.ts +8 -8
  29. package/dist/components/VvDialog/VvDialog.es.js +0 -3
  30. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  31. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +29 -29
  32. package/dist/components/VvDropdown/index.d.ts +8 -8
  33. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -2
  34. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  35. package/dist/components/VvInputFile/VvInputFile.es.js +37 -34
  36. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  37. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +43 -4
  38. package/dist/components/VvInputFile/index.d.ts +14 -2
  39. package/dist/components/VvInputText/VvInputText.es.js +0 -6
  40. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  41. package/dist/components/VvNav/VvNav.es.js +1 -2
  42. package/dist/components/VvNav/VvNav.umd.js +1 -1
  43. package/dist/components/VvNavItem/VvNavItem.es.js +1 -2
  44. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  45. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -13
  46. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  47. package/dist/components/VvSelect/VvSelect.es.js +0 -4
  48. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  49. package/dist/components/VvTab/VvTab.es.js +2 -7
  50. package/dist/components/VvTab/VvTab.umd.js +1 -1
  51. package/dist/components/VvTextarea/VvTextarea.es.js +0 -4
  52. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  53. package/dist/components/index.es.js +41 -114
  54. package/dist/components/index.umd.js +1 -1
  55. package/dist/icons.es.js +3 -3
  56. package/dist/icons.umd.js +1 -1
  57. package/dist/index.es.js +20 -12
  58. package/dist/index.umd.js +1 -1
  59. package/dist/props/index.d.ts +8 -14
  60. package/dist/resolvers/unplugin.es.js +20 -12
  61. package/dist/resolvers/unplugin.umd.js +1 -1
  62. package/package.json +31 -31
  63. package/src/assets/icons/detailed.json +1 -1
  64. package/src/assets/icons/normal.json +1 -1
  65. package/src/assets/icons/simple.json +1 -1
  66. package/src/components/VvInputFile/VvInputFile.vue +7 -1
  67. package/src/components/VvInputFile/index.ts +20 -2
package/dist/index.es.js CHANGED
@@ -8,17 +8,13 @@ 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_NUMBER_LOWER_RE = new RegExp("(\\d)(\\p{Ll})", "gu");
12
- const SPLIT_LETTER_NUMBER_RE = new RegExp("(\\p{L})(\\d)", "gu");
11
+ const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)", "u");
13
12
  const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
14
13
  const SPLIT_REPLACE_VALUE = "$1\0$2";
15
14
  const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
16
- function split(value, options) {
15
+ function split(value) {
17
16
  let result = value.trim();
18
17
  result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
19
- if (options == null ? void 0 : options.separateNumbers) {
20
- result = result.replace(SPLIT_NUMBER_LOWER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_LETTER_NUMBER_RE, SPLIT_REPLACE_VALUE);
21
- }
22
18
  result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
23
19
  let start = 0;
24
20
  let end = result.length;
@@ -30,9 +26,20 @@ function split(value, options) {
30
26
  end--;
31
27
  return result.slice(start, end).split(/\0/g);
32
28
  }
29
+ function splitSeparateNumbers(value) {
30
+ const words = split(value);
31
+ for (let i = 0; i < words.length; i++) {
32
+ const word = words[i];
33
+ const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
34
+ if (match) {
35
+ words.splice(i, 1, word.slice(0, match.index), word.slice(match.index));
36
+ }
37
+ }
38
+ return words;
39
+ }
33
40
  function noCase(input, options) {
34
- const [prefix, value, suffix] = splitPrefixSuffix(input, options);
35
- return prefix + split(value, options).map(lowerFactory(options == null ? void 0 : options.locale)).join((options == null ? void 0 : options.delimiter) ?? " ") + suffix;
41
+ const [prefix, words, suffix] = splitPrefixSuffix(input, options);
42
+ return prefix + words.map(lowerFactory(options == null ? void 0 : options.locale)).join((options == null ? void 0 : options.delimiter) ?? " ") + suffix;
36
43
  }
37
44
  function kebabCase(input, options) {
38
45
  return noCase(input, { delimiter: "-", ...options });
@@ -40,9 +47,10 @@ function kebabCase(input, options) {
40
47
  function lowerFactory(locale) {
41
48
  return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
42
49
  }
43
- function splitPrefixSuffix(input, options) {
44
- const prefixCharacters = (options == null ? void 0 : options.prefixCharacters) ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
45
- const suffixCharacters = (options == null ? void 0 : options.suffixCharacters) ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
50
+ function splitPrefixSuffix(input, options = {}) {
51
+ const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
52
+ const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
53
+ const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
46
54
  let prefixIndex = 0;
47
55
  let suffixIndex = input.length;
48
56
  while (prefixIndex < input.length) {
@@ -60,7 +68,7 @@ function splitPrefixSuffix(input, options) {
60
68
  }
61
69
  return [
62
70
  input.slice(0, prefixIndex),
63
- input.slice(prefixIndex, suffixIndex),
71
+ splitFn(input.slice(prefixIndex, suffixIndex)),
64
72
  input.slice(suffixIndex)
65
73
  ];
66
74
  }
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})","gu"),l=new RegExp("(\\p{L})(\\d)","gu"),u=/[^\p{L}\d]+/giu,a="$1\0$2",d="";function f(e,t){const[n,i,o]=function(e,t){const n=(null==t?void 0:t.prefixCharacters)??d,i=(null==t?void 0:t.suffixCharacters)??d;let o=0,r=e.length;for(;o<e.length;){const t=e.charAt(o);if(!n.includes(t))break;o++}for(;r>o;){const t=r-1,n=e.charAt(t);if(!i.includes(n))break;r=t}return[e.slice(0,o),e.slice(o,r),e.slice(r)]}(e,t);return n+function(e,t){let n=e.trim();n=n.replace(r,a).replace(s,a),(null==t?void 0:t.separateNumbers)&&(n=n.replace(c,a).replace(l,a)),n=n.replace(u,"\0");let i=0,o=n.length;for(;"\0"===n.charAt(i);)i++;if(i===o)return[];for(;"\0"===n.charAt(o-1);)o--;return n.slice(i,o).split(/\0/g)}(i,t).map((f=null==t?void 0:t.locale,!1===f?e=>e.toLowerCase():e=>e.toLocaleLowerCase(f))).join((null==t?void 0:t.delimiter)??" ")+o;var f}const h=Symbol.for("volver");function p(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 v{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 g={install(e,t={}){const n=new v(t);e.config.globalProperties.$vv=n,t.components&&Object.entries(t.components).forEach((([n,i])=>{e.component(n,p(i,t.defaults))})),t.aliases&&Object.entries(t.aliases).forEach((([n,i])=>{e.component(n,p(i,t.defaults,n))})),t.directives&&Object.entries(t.directives).forEach((([t,n])=>{const i=function(e,t){return f(e,{delimiter:"-",...t})}(t);i.startsWith("v-")&&(t=i.substring(2).toLocaleLowerCase()),e.directive(t,n)})),e.provide(h,n)}};e.VolverPlugin=g,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 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"})}));
@@ -304,11 +304,11 @@ export declare const DropdownProps: {
304
304
  crossAxis?: boolean | undefined;
305
305
  mainAxis?: boolean | undefined;
306
306
  limiter?: {
307
- fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
307
+ fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
308
308
  options?: any;
309
309
  } | undefined;
310
310
  boundary?: import("@floating-ui/dom").Boundary | undefined;
311
- } | import("@floating-ui/dom").Derivable<{
311
+ } | import("@floating-ui/core").Derivable<{
312
312
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
313
313
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
314
314
  altBoundary?: boolean | undefined;
@@ -316,7 +316,7 @@ export declare const DropdownProps: {
316
316
  crossAxis?: boolean | undefined;
317
317
  mainAxis?: boolean | undefined;
318
318
  limiter?: {
319
- fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
319
+ fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
320
320
  options?: any;
321
321
  } | undefined;
322
322
  boundary?: import("@floating-ui/dom").Boundary | undefined;
@@ -336,11 +336,11 @@ export declare const DropdownProps: {
336
336
  crossAxis?: boolean | undefined;
337
337
  mainAxis?: boolean | undefined;
338
338
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
339
- fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
339
+ fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
340
340
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
341
341
  flipAlignment?: boolean | undefined;
342
342
  boundary?: import("@floating-ui/dom").Boundary | undefined;
343
- } | import("@floating-ui/dom").Derivable<{
343
+ } | import("@floating-ui/core").Derivable<{
344
344
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
345
345
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
346
346
  altBoundary?: boolean | undefined;
@@ -348,7 +348,7 @@ export declare const DropdownProps: {
348
348
  crossAxis?: boolean | undefined;
349
349
  mainAxis?: boolean | undefined;
350
350
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
351
- fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
351
+ fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
352
352
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
353
353
  flipAlignment?: boolean | undefined;
354
354
  boundary?: import("@floating-ui/dom").Boundary | undefined;
@@ -378,12 +378,9 @@ export declare const DropdownProps: {
378
378
  elements: import("@floating-ui/dom").Elements;
379
379
  } & {
380
380
  availableWidth: number;
381
- /**
382
- * Milliseconds to wait before emitting the input event
383
- */
384
381
  availableHeight: number;
385
382
  }) => void | Promise<void>) | undefined;
386
- } | import("@floating-ui/dom").Derivable<{
383
+ } | import("@floating-ui/core").Derivable<{
387
384
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
388
385
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
389
386
  altBoundary?: boolean | undefined;
@@ -401,9 +398,6 @@ export declare const DropdownProps: {
401
398
  elements: import("@floating-ui/dom").Elements;
402
399
  } & {
403
400
  availableWidth: number;
404
- /**
405
- * Milliseconds to wait before emitting the input event
406
- */
407
401
  availableHeight: number;
408
402
  }) => void | Promise<void>) | undefined;
409
403
  }> | undefined>;
@@ -426,7 +420,7 @@ export declare const DropdownProps: {
426
420
  autoAlignment?: boolean | undefined;
427
421
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
428
422
  boundary?: import("@floating-ui/dom").Boundary | undefined;
429
- } | import("@floating-ui/dom").Derivable<{
423
+ } | import("@floating-ui/core").Derivable<{
430
424
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
431
425
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
432
426
  altBoundary?: boolean | undefined;
@@ -1,16 +1,12 @@
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_NUMBER_LOWER_RE = new RegExp("(\\d)(\\p{Ll})", "gu");
4
- const SPLIT_LETTER_NUMBER_RE = new RegExp("(\\p{L})(\\d)", "gu");
3
+ const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(?<=\\d)(\\p{Ll})|(?<=\\p{L})(\\d)", "u");
5
4
  const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
6
5
  const SPLIT_REPLACE_VALUE = "$1\0$2";
7
6
  const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
8
- function split(value, options) {
7
+ function split(value) {
9
8
  let result = value.trim();
10
9
  result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
11
- if (options == null ? void 0 : options.separateNumbers) {
12
- result = result.replace(SPLIT_NUMBER_LOWER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_LETTER_NUMBER_RE, SPLIT_REPLACE_VALUE);
13
- }
14
10
  result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
15
11
  let start = 0;
16
12
  let end = result.length;
@@ -22,9 +18,20 @@ function split(value, options) {
22
18
  end--;
23
19
  return result.slice(start, end).split(/\0/g);
24
20
  }
21
+ function splitSeparateNumbers(value) {
22
+ const words = split(value);
23
+ for (let i = 0; i < words.length; i++) {
24
+ const word = words[i];
25
+ const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
26
+ if (match) {
27
+ words.splice(i, 1, word.slice(0, match.index), word.slice(match.index));
28
+ }
29
+ }
30
+ return words;
31
+ }
25
32
  function noCase(input, options) {
26
- const [prefix, value, suffix] = splitPrefixSuffix(input, options);
27
- return prefix + split(value, options).map(lowerFactory(options == null ? void 0 : options.locale)).join((options == null ? void 0 : options.delimiter) ?? " ") + suffix;
33
+ const [prefix, words, suffix] = splitPrefixSuffix(input, options);
34
+ return prefix + words.map(lowerFactory(options == null ? void 0 : options.locale)).join((options == null ? void 0 : options.delimiter) ?? " ") + suffix;
28
35
  }
29
36
  function kebabCase(input, options) {
30
37
  return noCase(input, { delimiter: "-", ...options });
@@ -32,9 +39,10 @@ function kebabCase(input, options) {
32
39
  function lowerFactory(locale) {
33
40
  return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
34
41
  }
35
- function splitPrefixSuffix(input, options) {
36
- const prefixCharacters = (options == null ? void 0 : options.prefixCharacters) ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
37
- const suffixCharacters = (options == null ? void 0 : options.suffixCharacters) ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
42
+ function splitPrefixSuffix(input, options = {}) {
43
+ const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
44
+ const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
45
+ const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
38
46
  let prefixIndex = 0;
39
47
  let suffixIndex = input.length;
40
48
  while (prefixIndex < input.length) {
@@ -52,7 +60,7 @@ function splitPrefixSuffix(input, options) {
52
60
  }
53
61
  return [
54
62
  input.slice(0, prefixIndex),
55
- input.slice(prefixIndex, suffixIndex),
63
+ splitFn(input.slice(prefixIndex, suffixIndex)),
56
64
  input.slice(suffixIndex)
57
65
  ];
58
66
  }
@@ -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"),r=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),t=new RegExp("(\\d)(\\p{Ll})","gu"),n=new RegExp("(\\p{L})(\\d)","gu"),v=/[^\p{L}\d]+/giu,i="$1\0$2",c="";function u(e,u){const[s,l,p]=function(e,o){const r=(null==o?void 0:o.prefixCharacters)??c,t=(null==o?void 0:o.suffixCharacters)??c;let n=0,v=e.length;for(;n<e.length;){const o=e.charAt(n);if(!r.includes(o))break;n++}for(;v>n;){const o=v-1,r=e.charAt(o);if(!t.includes(r))break;v=o}return[e.slice(0,n),e.slice(n,v),e.slice(v)]}(e,u);return s+function(e,c){let u=e.trim();u=u.replace(o,i).replace(r,i),(null==c?void 0:c.separateNumbers)&&(u=u.replace(t,i).replace(n,i)),u=u.replace(v,"\0");let s=0,l=u.length;for(;"\0"===u.charAt(s);)s++;if(s===l)return[];for(;"\0"===u.charAt(l-1);)l--;return u.slice(s,l).split(/\0/g)}(l,u).map((d=null==u?void 0:u.locale,!1===d?e=>e.toLowerCase():e=>e.toLocaleLowerCase(d))).join((null==u?void 0:u.delimiter)??" ")+p;var d}function s(e,o){return u(e,{delimiter:"-",...o})}const l=["vv-icon","vv-action"],p=["v-tooltip","v-contextmenu"],d=function(e){if(!l.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]},f=function(e,o){const r=[];if(!o)return r;const t=d(e);return t&&t.forEach((e=>{r.push(`@volverjs/style/${"scss"===o?"scss/":""}components/${e}`)})),r};e.VolverResolver=function({prefix:e="vv",importStyle:o,directives:r,ignore:t,cherryPick:n}={}){return[{type:"component",resolve:r=>{if(!e||!r.toLowerCase().startsWith(e.toLowerCase()))return;const v=s(r).replace(`${e}-`,"vv-");return t&&t.includes(v)?void 0:n?{from:`@volverjs/ui-vue/${v}`,sideEffects:f(v,o)}:{from:"@volverjs/ui-vue/components",sideEffects:f(v,o),name:r}}},{type:"directive",resolve:e=>{if(!r)return;const v=`v-${s(e)}`;return!p.includes(v)||t&&t.includes(v)?void 0:n?{from:`@volverjs/ui-vue/${v}`,sideEffects:f(v,o)}:{from:"@volverjs/ui-vue/directives",sideEffects:f(v,o),name:`v${e}`}}}]},e.getStyleNames=d,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);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"})}));
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "bugs": {
20
20
  "url": "https://github.com/volverjs/ui-vue/issues"
21
21
  },
22
- "version": "0.0.10-beta.21",
22
+ "version": "0.0.10-beta.23",
23
23
  "packageManager": "pnpm@8.7.0",
24
24
  "type": "module",
25
25
  "main": "./dist/Volver.umd.js",
@@ -35,65 +35,65 @@
35
35
  "*.d.ts"
36
36
  ],
37
37
  "dependencies": {
38
- "@floating-ui/vue": "^1.0.2",
38
+ "@floating-ui/vue": "^1.0.3",
39
39
  "@iconify/tools": "^4.0.0",
40
40
  "@iconify/vue": "^4.1.1",
41
41
  "@vueuse/core": "^10.7.1",
42
42
  "blurhash": "^2.0.5",
43
43
  "comlink": "^4.4.1",
44
- "jsdom": "^23.0.1",
44
+ "jsdom": "^23.2.0",
45
45
  "mitt": "^3.0.1",
46
46
  "pica": "^9.0.1",
47
47
  "ts-dot-prop": "^2.1.3",
48
48
  "uid": "^2.0.2",
49
- "vue": "^3.4.0",
49
+ "vue": "^3.4.7",
50
50
  "vue-imask": "^7.3.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@volverjs/style": "0.*"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/core": "^7.23.6",
57
- "@babel/preset-env": "^7.23.6",
56
+ "@babel/core": "^7.23.7",
57
+ "@babel/preset-env": "^7.23.8",
58
58
  "@babel/preset-typescript": "^7.23.3",
59
59
  "@iconify/types": "^2.0.0",
60
60
  "@iconify/utils": "^2.1.14",
61
61
  "@mdx-js/react": "^3.0.0",
62
62
  "@rushstack/eslint-patch": "^1.6.1",
63
- "@storybook/addon-a11y": "^7.6.6",
64
- "@storybook/addon-actions": "^7.6.6",
65
- "@storybook/addon-docs": "^7.6.6",
66
- "@storybook/addon-essentials": "^7.6.6",
67
- "@storybook/addon-interactions": "^7.6.6",
68
- "@storybook/addon-links": "^7.6.6",
69
- "@storybook/channel-postmessage": "^7.6.6",
70
- "@storybook/channel-websocket": "^7.6.6",
71
- "@storybook/cli": "^7.6.6",
72
- "@storybook/client-api": "^7.6.6",
73
- "@storybook/client-logger": "^7.6.6",
74
- "@storybook/core-common": "^7.6.6",
63
+ "@storybook/addon-a11y": "^7.6.7",
64
+ "@storybook/addon-actions": "^7.6.7",
65
+ "@storybook/addon-docs": "^7.6.7",
66
+ "@storybook/addon-essentials": "^7.6.7",
67
+ "@storybook/addon-interactions": "^7.6.7",
68
+ "@storybook/addon-links": "^7.6.7",
69
+ "@storybook/channel-postmessage": "^7.6.7",
70
+ "@storybook/channel-websocket": "^7.6.7",
71
+ "@storybook/cli": "^7.6.7",
72
+ "@storybook/client-api": "^7.6.7",
73
+ "@storybook/client-logger": "^7.6.7",
74
+ "@storybook/core-common": "^7.6.7",
75
75
  "@storybook/jest": "^0.2.3",
76
- "@storybook/preview-api": "^7.6.6",
77
- "@storybook/preview-web": "^7.6.6",
76
+ "@storybook/preview-api": "^7.6.7",
77
+ "@storybook/preview-web": "^7.6.7",
78
78
  "@storybook/test-runner": "^0.16.0",
79
79
  "@storybook/testing-library": "^0.2.2",
80
- "@storybook/vue3": "^7.6.6",
81
- "@storybook/vue3-vite": "^7.6.6",
80
+ "@storybook/vue3": "^7.6.7",
81
+ "@storybook/vue3-vite": "^7.6.7",
82
82
  "@tsconfig/node18": "^18.2.2",
83
83
  "@types/jest-axe": "^3.5.9",
84
84
  "@types/jsdom": "^21.1.6",
85
- "@types/node": "^20.10.5",
85
+ "@types/node": "^20.10.7",
86
86
  "@types/pica": "^9.0.4",
87
- "@types/react": "^18.2.46",
87
+ "@types/react": "^18.2.47",
88
88
  "@types/yargs": "^17.0.32",
89
- "@vitejs/plugin-vue": "^5.0.0",
89
+ "@vitejs/plugin-vue": "^5.0.2",
90
90
  "@volverjs/style": "0.1.12-beta.15",
91
- "@vue/compiler-sfc": "^3.4.0",
91
+ "@vue/compiler-sfc": "^3.4.7",
92
92
  "@vue/eslint-config-prettier": "^9.0.0",
93
93
  "@vue/eslint-config-typescript": "^12.0.0",
94
94
  "@vue/test-utils": "^2.4.3",
95
95
  "@vue/tsconfig": "^0.5.1",
96
- "change-case": "^5.3.0",
96
+ "change-case": "^5.4.0",
97
97
  "chokidar": "^3.5.3",
98
98
  "eslint": "^8.56.0",
99
99
  "eslint-config-prettier": "^9.1.0",
@@ -106,15 +106,15 @@
106
106
  "jest-axe": "^8.0.0",
107
107
  "jest-diff": "^29.7.0",
108
108
  "jest-get-type": "^29.6.3",
109
- "jsdom": "^23.0.1",
109
+ "jsdom": "^23.2.0",
110
110
  "npm-run-all": "^4.1.5",
111
111
  "prettier": "^3.1.1",
112
112
  "pretty-format": "^29.7.0",
113
113
  "react": "^18.2.0",
114
114
  "react-dom": "^18.2.0",
115
115
  "remark": "^15.0.1",
116
- "sass": "^1.69.6",
117
- "storybook": "^7.6.6",
116
+ "sass": "^1.69.7",
117
+ "storybook": "^7.6.7",
118
118
  "storybook-addon-markdown-docs": "^2.0.0",
119
119
  "storybook-dark-mode": "^3.0.3",
120
120
  "storybook-version": "^0.1.1",
@@ -123,7 +123,7 @@
123
123
  "typescript": "~5.3.3",
124
124
  "unplugin-auto-import": "^0.17.3",
125
125
  "unplugin-vue-components": "^0.26.0",
126
- "vite": "^5.0.10",
126
+ "vite": "^5.0.11",
127
127
  "vite-plugin-eslint": "^1.8.1",
128
128
  "vite-plugin-externalize-deps": "^0.8.0",
129
129
  "vue-tsc": "^1.8.27",