@volverjs/ui-vue 0.0.10 → 0.0.12

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 (94) hide show
  1. package/bin/icons.js +1 -93
  2. package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
  6. package/dist/components/VvAction/VvAction.es.js +1 -302
  7. package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
  8. package/dist/components/VvAlert/VvAlert.es.js +1 -527
  9. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
  11. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
  12. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  13. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
  15. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +1 -131
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
  22. package/dist/components/VvButton/VvButton.es.js +1 -882
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
  26. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
  27. package/dist/components/VvCard/VvCard.es.js +1 -152
  28. package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
  29. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
  30. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
  32. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
  33. package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
  36. package/dist/components/VvDialog/VvDialog.es.js +1 -317
  37. package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
  39. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
  40. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
  41. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
  42. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
  43. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
  45. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
  47. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
  49. package/dist/components/VvIcon/VvIcon.es.js +1 -143
  50. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  51. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
  52. package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
  53. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  54. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +4 -2790
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
  58. package/dist/components/VvNav/VvNav.es.js +1 -438
  59. package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
  60. package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
  61. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
  62. package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
  63. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
  64. package/dist/components/VvProgress/VvProgress.es.js +1 -163
  65. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
  66. package/dist/components/VvRadio/VvRadio.es.js +1 -661
  67. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
  68. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
  69. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
  70. package/dist/components/VvSelect/VvSelect.es.js +1 -1103
  71. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  72. package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
  73. package/dist/components/VvTab/VvTab.es.js +1 -558
  74. package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
  75. package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
  76. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  77. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
  78. package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
  79. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
  80. package/dist/components/index.es.js +6 -8558
  81. package/dist/components/index.umd.js +1 -1
  82. package/dist/composables/index.es.js +2 -247
  83. package/dist/composables/index.umd.js +1 -1
  84. package/dist/directives/index.es.js +2 -311
  85. package/dist/directives/index.umd.js +1 -1
  86. package/dist/directives/v-contextmenu.es.js +2 -142
  87. package/dist/directives/v-contextmenu.umd.js +1 -1
  88. package/dist/directives/v-tooltip.es.js +1 -172
  89. package/dist/icons.es.js +1 -39
  90. package/dist/icons.umd.js +1 -1
  91. package/dist/index.es.js +1 -219
  92. package/dist/resolvers/unplugin.es.js +1 -187
  93. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
  94. package/package.json +37 -37
package/dist/index.es.js CHANGED
@@ -1,219 +1 @@
1
- import { addCollection, addIcon, addAPIProvider } from "@iconify/vue";
2
- import { ref } from "vue";
3
- const SPLIT_LOWER_UPPER_RE = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu");
4
- const SPLIT_UPPER_UPPER_RE = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu");
5
- const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u");
6
- const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
7
- const SPLIT_REPLACE_VALUE = "$1\0$2";
8
- const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
9
- function split(value) {
10
- let result = value.trim();
11
- result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
12
- result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
13
- let start = 0;
14
- let end = result.length;
15
- while (result.charAt(start) === "\0")
16
- start++;
17
- if (start === end)
18
- return [];
19
- while (result.charAt(end - 1) === "\0")
20
- end--;
21
- return result.slice(start, end).split(/\0/g);
22
- }
23
- function splitSeparateNumbers(value) {
24
- const words = split(value);
25
- for (let i = 0; i < words.length; i++) {
26
- const word = words[i];
27
- const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
28
- if (match) {
29
- const offset = match.index + (match[1] ?? match[2]).length;
30
- words.splice(i, 1, word.slice(0, offset), word.slice(offset));
31
- }
32
- }
33
- return words;
34
- }
35
- function noCase(input, options) {
36
- const [prefix, words, suffix] = splitPrefixSuffix(input, options);
37
- return prefix + words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? " ") + suffix;
38
- }
39
- function kebabCase(input, options) {
40
- return noCase(input, { delimiter: "-", ...options });
41
- }
42
- function lowerFactory(locale) {
43
- return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
44
- }
45
- function splitPrefixSuffix(input, options = {}) {
46
- const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
47
- const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
48
- const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
49
- let prefixIndex = 0;
50
- let suffixIndex = input.length;
51
- while (prefixIndex < input.length) {
52
- const char = input.charAt(prefixIndex);
53
- if (!prefixCharacters.includes(char))
54
- break;
55
- prefixIndex++;
56
- }
57
- while (suffixIndex > prefixIndex) {
58
- const index = suffixIndex - 1;
59
- const char = input.charAt(index);
60
- if (!suffixCharacters.includes(char))
61
- break;
62
- suffixIndex = index;
63
- }
64
- return [
65
- input.slice(0, prefixIndex),
66
- splitFn(input.slice(prefixIndex, suffixIndex)),
67
- input.slice(suffixIndex)
68
- ];
69
- }
70
- const DEFAULT_ICONIFY_PROVIDER = "vv";
71
- const INJECTION_KEY_VOLVER = Symbol.for("volver");
72
- function useDefaultProps(component, defaults, name) {
73
- const componentName = name || component.name;
74
- if (!componentName) {
75
- return component;
76
- }
77
- const componentDefaults = defaults?.[componentName];
78
- const props = component.props;
79
- if (!componentDefaults || !props) {
80
- return { ...component, name: componentName };
81
- }
82
- return {
83
- ...component,
84
- name: componentName,
85
- props: Object.keys(props).reduce(
86
- (acc, key) => {
87
- if (!(key in componentDefaults)) {
88
- acc[key] = props[key];
89
- return acc;
90
- }
91
- const customDefault = componentDefaults[key];
92
- if (typeof props[key] === "function" || Array.isArray(props[key])) {
93
- acc[key] = {
94
- type: props[key],
95
- default: customDefault
96
- };
97
- return acc;
98
- }
99
- acc[key] = {
100
- ...props[key],
101
- default: customDefault
102
- };
103
- return acc;
104
- },
105
- {}
106
- )
107
- };
108
- }
109
- class Volver {
110
- _fetchOptions = {};
111
- _iconsCollections = [];
112
- _iconsProvider = DEFAULT_ICONIFY_PROVIDER;
113
- _nuxt = false;
114
- _experimentalFeatures = {};
115
- defaults = ref({});
116
- constructor({
117
- fetchWithCredentials,
118
- fetchOptions,
119
- iconsProvider,
120
- nuxt,
121
- iconsCollections,
122
- defaults,
123
- experimentalFeatures
124
- } = {}) {
125
- if (fetchOptions) {
126
- this._fetchOptions = fetchOptions;
127
- }
128
- if (fetchWithCredentials) {
129
- this._fetchOptions = {
130
- ...this._fetchOptions,
131
- credentials: "include"
132
- };
133
- }
134
- if (iconsProvider) {
135
- this._iconsProvider = iconsProvider;
136
- }
137
- if (nuxt) {
138
- this._nuxt = nuxt;
139
- }
140
- if (iconsCollections && Array.isArray(iconsCollections)) {
141
- iconsCollections.forEach((iconsCollection) => {
142
- this.addCollection(iconsCollection, this._iconsProvider);
143
- });
144
- }
145
- if (defaults) {
146
- this.defaults.value = defaults;
147
- }
148
- if (experimentalFeatures) {
149
- this._experimentalFeatures = experimentalFeatures;
150
- }
151
- }
152
- get nuxt() {
153
- return this._nuxt;
154
- }
155
- get iconsProvider() {
156
- return this._iconsProvider;
157
- }
158
- get iconsCollections() {
159
- return this._iconsCollections;
160
- }
161
- get experimentalFeatures() {
162
- return this._experimentalFeatures;
163
- }
164
- addCollection(collection, providerName = this._iconsProvider) {
165
- this._iconsCollections.push(collection);
166
- return addCollection(collection, providerName);
167
- }
168
- addIcon(name, data) {
169
- return addIcon(name, data);
170
- }
171
- addIconsAPIProvider(provider, customConfig) {
172
- return addAPIProvider(provider, customConfig);
173
- }
174
- fetchIcon(src, options = { cache: "force-cache" }) {
175
- return new Promise((resolve, reject) => {
176
- fetch(src, { ...this._fetchOptions, ...options }).catch((e) => reject(e)).then((response) => response?.text()).then((svg) => resolve(svg));
177
- });
178
- }
179
- }
180
- const VolverPlugin = {
181
- /**
182
- * Vue.use() hook
183
- * @param {App} app
184
- * @param {object} options
185
- */
186
- install(app, options = {}) {
187
- const volver = new Volver(options);
188
- app.config.globalProperties.$vv = volver;
189
- if (options.components) {
190
- Object.entries(options.components).forEach(([name, component]) => {
191
- app.component(
192
- name,
193
- useDefaultProps(component, options.defaults)
194
- );
195
- });
196
- }
197
- if (options.aliases) {
198
- Object.entries(options.aliases).forEach(([name, component]) => {
199
- app.component(
200
- name,
201
- useDefaultProps(component, options.defaults, name)
202
- );
203
- });
204
- }
205
- if (options.directives) {
206
- Object.entries(options.directives).forEach(([name, directive]) => {
207
- const kebabName = kebabCase(name);
208
- if (kebabName.startsWith("v-")) {
209
- name = kebabName.substring(2).toLocaleLowerCase();
210
- }
211
- app.directive(name, directive);
212
- });
213
- }
214
- app.provide(INJECTION_KEY_VOLVER, volver);
215
- }
216
- };
217
- export {
218
- VolverPlugin
219
- };
1
+ import{addCollection as e,addIcon as t,addAPIProvider as r}from"@iconify/vue";import{ref as n}from"vue";const i=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),s=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),o=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),c=/[^\p{L}\d]+/giu,l="$1\0$2";function a(e){let t=e.trim();t=t.replace(i,l).replace(s,l),t=t.replace(c,"\0");let r=0,n=t.length;for(;"\0"===t.charAt(r);)r++;if(r===n)return[];for(;"\0"===t.charAt(n-1);)n--;return t.slice(r,n).split(/\0/g)}function u(e){const t=a(e);for(let r=0;r<t.length;r++){const e=t[r],n=o.exec(e);if(n){const i=n.index+(n[1]??n[2]).length;t.splice(r,1,e.slice(0,i),e.slice(i))}}return t}function f(e,t){const[r,n,i]=function(e,t={}){const r=t.split??(t.separateNumbers?u:a),n=t.prefixCharacters??"",i=t.suffixCharacters??"";let s=0,o=e.length;for(;s<e.length;){const t=e.charAt(s);if(!n.includes(t))break;s++}for(;o>s;){const t=o-1,r=e.charAt(t);if(!i.includes(r))break;o=t}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}(e,t);return r+n.map((s=t?.locale,!1===s?e=>e.toLowerCase():e=>e.toLocaleLowerCase(s))).join(t?.delimiter??" ")+i;var s}const h=Symbol.for("volver");function p(e,t,r){const n=r||e.name;if(!n)return e;const i=t?.[n],s=e.props;return i&&s?{...e,name:n,props:Object.keys(s).reduce((e,t)=>{if(!(t in i))return e[t]=s[t],e;const r=i[t];return"function"==typeof s[t]||Array.isArray(s[t])?(e[t]={type:s[t],default:r},e):(e[t]={...s[t],default:r},e)},{})}:{...e,name:n}}class d{_fetchOptions={};_iconsCollections=[];_iconsProvider="vv";_nuxt=!1;_experimentalFeatures={};defaults=n({});constructor({fetchWithCredentials:e,fetchOptions:t,iconsProvider:r,nuxt:n,iconsCollections:i,defaults:s,experimentalFeatures:o}={}){t&&(this._fetchOptions=t),e&&(this._fetchOptions={...this._fetchOptions,credentials:"include"}),r&&(this._iconsProvider=r),n&&(this._nuxt=n),i&&Array.isArray(i)&&i.forEach(e=>{this.addCollection(e,this._iconsProvider)}),s&&(this.defaults.value=s),o&&(this._experimentalFeatures=o)}get nuxt(){return this._nuxt}get iconsProvider(){return this._iconsProvider}get iconsCollections(){return this._iconsCollections}get experimentalFeatures(){return this._experimentalFeatures}addCollection(t,r=this._iconsProvider){return this._iconsCollections.push(t),e(t,r)}addIcon(e,r){return t(e,r)}addIconsAPIProvider(e,t){return r(e,t)}fetchIcon(e,t={cache:"force-cache"}){return new Promise((r,n)=>{fetch(e,{...this._fetchOptions,...t}).catch(e=>n(e)).then(e=>e?.text()).then(e=>r(e))})}}const m={install(e,t={}){const r=new d(t);e.config.globalProperties.$vv=r,t.components&&Object.entries(t.components).forEach(([r,n])=>{e.component(r,p(n,t.defaults))}),t.aliases&&Object.entries(t.aliases).forEach(([r,n])=>{e.component(r,p(n,t.defaults,r))}),t.directives&&Object.entries(t.directives).forEach(([t,r])=>{const n=function(e,t){return f(e,{delimiter:"-",...t})}(t);n.startsWith("v-")&&(t=n.substring(2).toLocaleLowerCase()),e.directive(t,r)}),e.provide(h,r)}};export{m as VolverPlugin};
@@ -1,187 +1 @@
1
- const SPLIT_LOWER_UPPER_RE = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu");
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");
4
- const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
5
- const SPLIT_REPLACE_VALUE = "$1\0$2";
6
- const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
7
- function split(value) {
8
- let result = value.trim();
9
- result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
10
- result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
11
- let start = 0;
12
- let end = result.length;
13
- while (result.charAt(start) === "\0")
14
- start++;
15
- if (start === end)
16
- return [];
17
- while (result.charAt(end - 1) === "\0")
18
- end--;
19
- return result.slice(start, end).split(/\0/g);
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
- const offset = match.index + (match[1] ?? match[2]).length;
28
- words.splice(i, 1, word.slice(0, offset), word.slice(offset));
29
- }
30
- }
31
- return words;
32
- }
33
- function noCase(input, options) {
34
- const [prefix, words, suffix] = splitPrefixSuffix(input, options);
35
- return prefix + words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? " ") + suffix;
36
- }
37
- function kebabCase(input, options) {
38
- return noCase(input, { delimiter: "-", ...options });
39
- }
40
- function lowerFactory(locale) {
41
- return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
42
- }
43
- function splitPrefixSuffix(input, options = {}) {
44
- const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
45
- const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
46
- const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
47
- let prefixIndex = 0;
48
- let suffixIndex = input.length;
49
- while (prefixIndex < input.length) {
50
- const char = input.charAt(prefixIndex);
51
- if (!prefixCharacters.includes(char))
52
- break;
53
- prefixIndex++;
54
- }
55
- while (suffixIndex > prefixIndex) {
56
- const index = suffixIndex - 1;
57
- const char = input.charAt(index);
58
- if (!suffixCharacters.includes(char))
59
- break;
60
- suffixIndex = index;
61
- }
62
- return [
63
- input.slice(0, prefixIndex),
64
- splitFn(input.slice(prefixIndex, suffixIndex)),
65
- input.slice(suffixIndex)
66
- ];
67
- }
68
- const STYLE_EXCLUDE = ["vv-icon", "vv-action"];
69
- const VOLVER_PREFIX = "vv";
70
- const DIRECTIVES = ["v-tooltip", "v-contextmenu"];
71
- function getStyleNames(kebabName) {
72
- if (STYLE_EXCLUDE.includes(kebabName)) {
73
- return void 0;
74
- }
75
- if (kebabName === "vv-dropdown") {
76
- return ["vv-dropdown", "vv-dropdown-option", "vv-dropdown-action"];
77
- }
78
- if (kebabName === "vv-combobox") {
79
- return [
80
- "vv-select",
81
- "vv-dropdown-option",
82
- "vv-dropdown-optgroup",
83
- "vv-dropdown",
84
- "vv-dropdown-action"
85
- ];
86
- }
87
- if (kebabName === "vv-button-group") {
88
- return ["vv-button", "vv-button-group"];
89
- }
90
- if (kebabName === "vv-accordion-group") {
91
- return ["vv-accordion", "vv-accordion-group"];
92
- }
93
- if (kebabName === "vv-checkbox-group") {
94
- return ["vv-checkbox", "vv-checkbox-group"];
95
- }
96
- if (kebabName === "vv-radio-group") {
97
- return ["vv-radio", "vv-radio-group"];
98
- }
99
- if (kebabName === "vv-alert-group") {
100
- return ["vv-alert", "vv-alert-group"];
101
- }
102
- if (kebabName === "v-tooltip") {
103
- return ["vv-tooltip"];
104
- }
105
- return [kebabName];
106
- }
107
- function getSideEffects(kebabName, importStyle) {
108
- const sideEffects = [];
109
- if (!importStyle) {
110
- return sideEffects;
111
- }
112
- const styleNames = getStyleNames(kebabName);
113
- if (styleNames) {
114
- styleNames.forEach((name) => {
115
- sideEffects.push(
116
- `@volverjs/style/${importStyle === "scss" ? "scss/" : ""}components/${name}`
117
- );
118
- });
119
- }
120
- return sideEffects;
121
- }
122
- function VolverResolver({
123
- prefix = VOLVER_PREFIX,
124
- importStyle,
125
- directives,
126
- ignore,
127
- cherryPick
128
- } = {}) {
129
- return [
130
- {
131
- type: "component",
132
- resolve: (name) => {
133
- if (!prefix || !name.toLowerCase().startsWith(prefix.toLowerCase())) {
134
- return;
135
- }
136
- const kebabName = kebabCase(name).replace(
137
- `${prefix}-`,
138
- `${VOLVER_PREFIX}-`
139
- );
140
- if (ignore && ignore.includes(kebabName)) {
141
- return;
142
- }
143
- if (cherryPick) {
144
- return {
145
- from: `@volverjs/ui-vue/${kebabName}`,
146
- sideEffects: getSideEffects(kebabName, importStyle)
147
- };
148
- }
149
- return {
150
- from: "@volverjs/ui-vue/components",
151
- sideEffects: getSideEffects(kebabName, importStyle),
152
- name
153
- };
154
- }
155
- },
156
- {
157
- type: "directive",
158
- resolve: (name) => {
159
- if (!directives) {
160
- return;
161
- }
162
- const kebabName = `v-${kebabCase(name)}`;
163
- if (!DIRECTIVES.includes(kebabName)) {
164
- return;
165
- }
166
- if (ignore && ignore.includes(kebabName)) {
167
- return;
168
- }
169
- if (cherryPick) {
170
- return {
171
- from: `@volverjs/ui-vue/${kebabName}`,
172
- sideEffects: getSideEffects(kebabName, importStyle)
173
- };
174
- }
175
- return {
176
- from: "@volverjs/ui-vue/directives",
177
- sideEffects: getSideEffects(kebabName, importStyle),
178
- name: `v${name}`
179
- };
180
- }
181
- }
182
- ];
183
- }
184
- export {
185
- VolverResolver,
186
- getStyleNames
187
- };
1
+ const e=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),o=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),r=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),t=/[^\p{L}\d]+/giu,n="$1\0$2";function v(r){let v=r.trim();v=v.replace(e,n).replace(o,n),v=v.replace(t,"\0");let c=0,i=v.length;for(;"\0"===v.charAt(c);)c++;if(c===i)return[];for(;"\0"===v.charAt(i-1);)i--;return v.slice(c,i).split(/\0/g)}function c(e){const o=v(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 i(e,o){const[r,t,n]=function(e,o={}){const r=o.split??(o.separateNumbers?c:v),t=o.prefixCharacters??"",n=o.suffixCharacters??"";let i=0,s=e.length;for(;i<e.length;){const o=e.charAt(i);if(!t.includes(o))break;i++}for(;s>i;){const o=s-1,r=e.charAt(o);if(!n.includes(r))break;s=o}return[e.slice(0,i),r(e.slice(i,s)),e.slice(s)]}(e,o);return r+t.map((i=o?.locale,!1===i?e=>e.toLowerCase():e=>e.toLocaleLowerCase(i))).join(o?.delimiter??" ")+n;var i}function s(e,o){return i(e,{delimiter:"-",...o})}const u=["vv-icon","vv-action"],p=["v-tooltip","v-contextmenu"];function l(e){if(!u.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]}function d(e,o){const r=[];if(!o)return r;const t=l(e);return t&&t.forEach(e=>{r.push(`@volverjs/style/${"scss"===o?"scss/":""}components/${e}`)}),r}function a({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:d(v,o)}:{from:"@volverjs/ui-vue/components",sideEffects:d(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:d(v,o)}:{from:"@volverjs/ui-vue/directives",sideEffects:d(v,o),name:`v${e}`}}}]}export{a as VolverResolver,l as getStyleNames};
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  default?: ((props: {
28
28
  expandedAccordions: Set<string>;
29
29
  expand: (name?: string | string[]) => void;
30
- collapse: boolean & ((name?: string | string[]) => void);
30
+ collapse: (name?: string | string[]) => void;
31
31
  }) => any) | import("vue").VNodeChild;
32
32
  }>, "props"> | undefined;
33
33
  subcomponents?: Record<string, Omit<import("vue").ConcreteComponent<any>, "props">> | undefined;
@@ -181,7 +181,7 @@ declare const _default: {
181
181
  default?: (props: {
182
182
  expandedAccordions: Set<string>;
183
183
  expand: (name?: string | string[]) => void;
184
- collapse: boolean & ((name?: string | string[]) => void);
184
+ collapse: (name?: string | string[]) => void;
185
185
  }) => any;
186
186
  };
187
187
  })>> | undefined;
@@ -211,7 +211,7 @@ declare const _default: {
211
211
  default?: ((props: {
212
212
  expandedAccordions: Set<string>;
213
213
  expand: (name?: string | string[]) => void;
214
- collapse: boolean & ((name?: string | string[]) => void);
214
+ collapse: (name?: string | string[]) => void;
215
215
  }) => any) | import("vue").VNodeChild;
216
216
  }> | import("storybook/internal/csf").DecoratorFunction<import("@storybook/vue3").VueRenderer, {
217
217
  collapse?: boolean | undefined;
@@ -238,7 +238,7 @@ declare const _default: {
238
238
  default?: ((props: {
239
239
  expandedAccordions: Set<string>;
240
240
  expand: (name?: string | string[]) => void;
241
- collapse: boolean & ((name?: string | string[]) => void);
241
+ collapse: (name?: string | string[]) => void;
242
242
  }) => any) | import("vue").VNodeChild;
243
243
  }>[] | undefined;
244
244
  parameters?: import("@storybook/vue3").Parameters | undefined;
@@ -392,7 +392,7 @@ declare const _default: {
392
392
  default?: (props: {
393
393
  expandedAccordions: Set<string>;
394
394
  expand: (name?: string | string[]) => void;
395
- collapse: boolean & ((name?: string | string[]) => void);
395
+ collapse: (name?: string | string[]) => void;
396
396
  }) => any;
397
397
  };
398
398
  })>> | undefined;
@@ -546,7 +546,7 @@ declare const _default: {
546
546
  default?: (props: {
547
547
  expandedAccordions: Set<string>;
548
548
  expand: (name?: string | string[]) => void;
549
- collapse: boolean & ((name?: string | string[]) => void);
549
+ collapse: (name?: string | string[]) => void;
550
550
  }) => any;
551
551
  };
552
552
  })>>> | undefined;
@@ -700,7 +700,7 @@ declare const _default: {
700
700
  default?: (props: {
701
701
  expandedAccordions: Set<string>;
702
702
  expand: (name?: string | string[]) => void;
703
- collapse: boolean & ((name?: string | string[]) => void);
703
+ collapse: (name?: string | string[]) => void;
704
704
  }) => any;
705
705
  };
706
706
  })>> | import("storybook/internal/csf").LoaderFunction<import("@storybook/vue3").VueRenderer, import("@storybook/vue3").ComponentPropsAndSlots<{
@@ -853,7 +853,7 @@ declare const _default: {
853
853
  default?: (props: {
854
854
  expandedAccordions: Set<string>;
855
855
  expand: (name?: string | string[]) => void;
856
- collapse: boolean & ((name?: string | string[]) => void);
856
+ collapse: (name?: string | string[]) => void;
857
857
  }) => any;
858
858
  };
859
859
  })>>[] | undefined;
@@ -1007,7 +1007,7 @@ declare const _default: {
1007
1007
  default?: (props: {
1008
1008
  expandedAccordions: Set<string>;
1009
1009
  expand: (name?: string | string[]) => void;
1010
- collapse: boolean & ((name?: string | string[]) => void);
1010
+ collapse: (name?: string | string[]) => void;
1011
1011
  }) => any;
1012
1012
  };
1013
1013
  })>> | import("storybook/internal/csf").BeforeEach<import("@storybook/vue3").VueRenderer, import("@storybook/vue3").ComponentPropsAndSlots<{
@@ -1160,7 +1160,7 @@ declare const _default: {
1160
1160
  default?: (props: {
1161
1161
  expandedAccordions: Set<string>;
1162
1162
  expand: (name?: string | string[]) => void;
1163
- collapse: boolean & ((name?: string | string[]) => void);
1163
+ collapse: (name?: string | string[]) => void;
1164
1164
  }) => any;
1165
1165
  };
1166
1166
  })>>[] | undefined;
@@ -1314,7 +1314,7 @@ declare const _default: {
1314
1314
  default?: (props: {
1315
1315
  expandedAccordions: Set<string>;
1316
1316
  expand: (name?: string | string[]) => void;
1317
- collapse: boolean & ((name?: string | string[]) => void);
1317
+ collapse: (name?: string | string[]) => void;
1318
1318
  }) => any;
1319
1319
  };
1320
1320
  })>> | import("storybook/internal/csf").AfterEach<import("@storybook/vue3").VueRenderer, import("@storybook/vue3").ComponentPropsAndSlots<{
@@ -1467,7 +1467,7 @@ declare const _default: {
1467
1467
  default?: (props: {
1468
1468
  expandedAccordions: Set<string>;
1469
1469
  expand: (name?: string | string[]) => void;
1470
- collapse: boolean & ((name?: string | string[]) => void);
1470
+ collapse: (name?: string | string[]) => void;
1471
1471
  }) => any;
1472
1472
  };
1473
1473
  })>>[] | undefined;
@@ -1621,7 +1621,7 @@ declare const _default: {
1621
1621
  default?: (props: {
1622
1622
  expandedAccordions: Set<string>;
1623
1623
  expand: (name?: string | string[]) => void;
1624
- collapse: boolean & ((name?: string | string[]) => void);
1624
+ collapse: (name?: string | string[]) => void;
1625
1625
  }) => any;
1626
1626
  };
1627
1627
  })>> | undefined;
@@ -1776,7 +1776,7 @@ declare const _default: {
1776
1776
  default?: (props: {
1777
1777
  expandedAccordions: Set<string>;
1778
1778
  expand: (name?: string | string[]) => void;
1779
- collapse: boolean & ((name?: string | string[]) => void);
1779
+ collapse: (name?: string | string[]) => void;
1780
1780
  }) => any;
1781
1781
  };
1782
1782
  })>>) => (Component?: import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions> | import("vue").FunctionalComponent<any, {}, any, {}>, options?: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@volverjs/ui-vue",
3
3
  "type": "module",
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "description": "@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.",
6
6
  "author": "8 wave S.r.l.",
7
7
  "license": "MIT",
@@ -377,18 +377,18 @@
377
377
  ],
378
378
  "peerDependencies": {
379
379
  "@volverjs/style": "0.x",
380
- "@vueuse/core": "^13.x",
380
+ "@vueuse/core": "^14.x",
381
381
  "vue": "^3.5.x"
382
382
  },
383
383
  "dependencies": {
384
384
  "@floating-ui/vue": "^1.1.9",
385
- "@iconify/tools": "^4.1.3",
385
+ "@iconify/tools": "^4.1.4",
386
386
  "@iconify/vue": "^5.0.0",
387
387
  "blurhash": "^2.0.5",
388
388
  "chokidar": "^4.0.3",
389
389
  "comlink": "^4.4.2",
390
- "dot-prop": "^10.0.0",
391
- "jsdom": "^27.0.0",
390
+ "dot-prop": "^10.1.0",
391
+ "jsdom": "^27.2.0",
392
392
  "mitt": "^3.0.1",
393
393
  "pica": "^9.0.1",
394
394
  "vue-imask": "^7.6.1",
@@ -396,53 +396,53 @@
396
396
  "yargs": "^18.0.0"
397
397
  },
398
398
  "devDependencies": {
399
- "@antfu/eslint-config": "5.4.1",
400
- "@babel/core": "^7.28.4",
401
- "@babel/preset-env": "^7.28.3",
402
- "@babel/preset-typescript": "^7.27.1",
399
+ "@antfu/eslint-config": "6.2.0",
400
+ "@babel/core": "^7.28.5",
401
+ "@babel/preset-env": "^7.28.5",
402
+ "@babel/preset-typescript": "^7.28.5",
403
403
  "@iconify/types": "^2.0.0",
404
404
  "@iconify/utils": "^3.0.2",
405
405
  "@nabla/vite-plugin-eslint": "^2.0.6",
406
- "@storybook/addon-a11y": "^9.1.8",
407
- "@storybook/addon-docs": "^9.1.8",
408
- "@storybook/addon-links": "^9.1.8",
409
- "@storybook/cli": "^9.1.8",
410
- "@storybook/test-runner": "^0.23.0",
411
- "@storybook/vue3-vite": "^9.1.8",
412
- "@tsconfig/node18": "^18.2.4",
406
+ "@storybook/addon-a11y": "^10.0.8",
407
+ "@storybook/addon-docs": "^10.0.8",
408
+ "@storybook/addon-links": "^10.0.8",
409
+ "@storybook/cli": "^10.0.8",
410
+ "@storybook/test-runner": "^0.24.1",
411
+ "@storybook/vue3-vite": "^10.0.8",
412
+ "@tsconfig/node18": "^18.2.6",
413
413
  "@types/jest-axe": "^3.5.9",
414
- "@types/jsdom": "^21.1.7",
415
- "@types/node": "^24.5.2",
414
+ "@types/jsdom": "^27.0.0",
415
+ "@types/node": "^24.10.1",
416
416
  "@types/pica": "^9.0.5",
417
- "@types/yargs": "^17.0.33",
418
- "@vitejs/plugin-vue": "^6.0.1",
419
- "@volverjs/style": "^0.1.22",
420
- "@vue/compiler-sfc": "^3.5.21",
417
+ "@types/yargs": "^17.0.35",
418
+ "@vitejs/plugin-vue": "^6.0.2",
419
+ "@volverjs/style": "^0.1.23",
420
+ "@vue/compiler-sfc": "^3.5.25",
421
421
  "@vue/eslint-config-typescript": "^14.6.0",
422
422
  "@vue/test-utils": "^2.4.6",
423
423
  "@vue/tsconfig": "^0.8.1",
424
- "@vueless/storybook-dark-mode": "^9.0.8",
425
- "@vueuse/core": "^13.9.0",
424
+ "@vueless/storybook-dark-mode": "^10.0.3",
425
+ "@vueuse/core": "^14.0.0",
426
426
  "change-case": "^5.4.4",
427
- "eslint": "^9.36.0",
428
- "glob": "^11.0.3",
427
+ "eslint": "^9.39.1",
428
+ "glob": "^13.0.0",
429
429
  "jest-axe": "^10.0.0",
430
- "jsdom": "^27.0.0",
430
+ "jsdom": "^27.2.0",
431
431
  "npm-run-all": "^4.1.5",
432
432
  "prettier": "^3.6.2",
433
433
  "remark": "^15.0.1",
434
- "sass-embedded": "1.93.1",
435
- "storybook": "^9.1.8",
434
+ "sass-embedded": "1.93.3",
435
+ "storybook": "^10.0.8",
436
436
  "storybook-addon-markdown-docs": "^2.0.0",
437
- "terser": "^5.44.0",
437
+ "terser": "^5.44.1",
438
438
  "ts-node": "^10.9.2",
439
- "typescript": "~5.9.2",
440
- "unplugin-auto-import": "^20.1.0",
441
- "unplugin-vue-components": "^29.1.0",
442
- "vite": "^7.1.7",
443
- "vite-plugin-externalize-deps": "^0.9.0",
444
- "vue": "^3.5.21",
445
- "vue-tsc": "^3.0.8"
439
+ "typescript": "~5.9.3",
440
+ "unplugin-auto-import": "^20.2.0",
441
+ "unplugin-vue-components": "^30.0.0",
442
+ "vite": "^7.2.4",
443
+ "vite-plugin-externalize-deps": "^0.10.0",
444
+ "vue": "^3.5.25",
445
+ "vue-tsc": "^3.1.5"
446
446
  },
447
447
  "scripts": {
448
448
  "dev": "storybook dev -p 6006",