@volverjs/ui-vue 0.0.10-beta.20 → 0.0.10-beta.22
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.
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +67 -67
- package/dist/components/VvCombobox/index.d.ts +8 -8
- package/dist/components/VvDialog/VvDialog.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +70 -70
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
- package/dist/components/VvDropdown/index.d.ts +8 -8
- package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
- package/dist/components/VvIcon/index.d.ts +12 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +231 -67
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +152 -29
- package/dist/components/VvInputFile/index.d.ts +119 -14
- package/dist/components/VvInputText/VvInputClearAction.d.ts +6 -4
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +73 -65
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/index.d.ts +6 -15
- package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.es.js +247 -96
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +20 -12
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +8 -14
- package/dist/resolvers/unplugin.es.js +20 -12
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/InputFile/InputFile.stories.d.ts +1 -2
- package/dist/stories/InputFile/{InputFileModifiers.stories.d.ts → InputFileDropArea.stories.d.ts} +4 -4
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +1 -0
- package/dist/types/input-file.d.ts +2 -0
- package/package.json +49 -49
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvIcon/index.ts +13 -0
- package/src/components/VvInputFile/VvInputFile.vue +108 -40
- package/src/components/VvInputFile/index.ts +88 -10
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +6 -6
- package/src/components/VvInputText/index.ts +7 -15
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +7 -16
- package/src/stories/InputFile/{InputFileModifiers.stories.ts → InputFileDropArea.stories.ts} +18 -13
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +11 -3
- package/src/types/input-file.ts +4 -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
|
|
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
|
|
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,
|
|
35
|
-
return prefix +
|
|
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
|
|
45
|
-
const
|
|
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("(
|
|
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"})}));
|
package/dist/props/index.d.ts
CHANGED
|
@@ -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/
|
|
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/
|
|
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/
|
|
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?: "
|
|
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/
|
|
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?: "
|
|
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/
|
|
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/
|
|
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
|
|
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
|
|
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,
|
|
27
|
-
return prefix +
|
|
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
|
|
37
|
-
const
|
|
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"),
|
|
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"})}));
|
|
@@ -9,5 +9,4 @@ export declare const Valid: Story;
|
|
|
9
9
|
export declare const Invalid: Story;
|
|
10
10
|
export declare const Hint: Story;
|
|
11
11
|
export declare const Loading: Story;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const IconRight: Story;
|
|
12
|
+
export declare const Progress: Story;
|
package/dist/stories/InputFile/{InputFileModifiers.stories.d.ts → InputFileDropArea.stories.d.ts}
RENAMED
|
@@ -3,7 +3,7 @@ import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
|
3
3
|
declare const meta: Meta<typeof VvInputFile>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const InputHidden: Story;
|
|
8
|
+
export declare const Square: Story;
|
|
9
|
+
export declare const Circle: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
|
|
3
|
+
declare const meta: Meta<typeof VvInputFile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof VvInputFile>;
|
|
6
|
+
export declare const DefaultPosition: Story;
|
|
7
|
+
export declare const After: Story;
|
|
8
|
+
export declare const Src: Story;
|
|
@@ -3,12 +3,14 @@ export type UploadedFile<Source = undefined> = Source extends undefined ? {
|
|
|
3
3
|
size: number;
|
|
4
4
|
type: string;
|
|
5
5
|
url: string;
|
|
6
|
+
thumbnailUrl?: string;
|
|
6
7
|
lastModified?: number;
|
|
7
8
|
} : {
|
|
8
9
|
name: string;
|
|
9
10
|
size: number;
|
|
10
11
|
type: string;
|
|
11
12
|
url: string;
|
|
13
|
+
thumbnailUrl?: string;
|
|
12
14
|
lastModified?: number;
|
|
13
15
|
source: Source;
|
|
14
16
|
};
|
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.
|
|
22
|
+
"version": "0.0.10-beta.22",
|
|
23
23
|
"packageManager": "pnpm@8.7.0",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "./dist/Volver.umd.js",
|
|
@@ -35,98 +35,98 @@
|
|
|
35
35
|
"*.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@floating-ui/vue": "^1.0.
|
|
39
|
-
"@iconify/tools": "^
|
|
38
|
+
"@floating-ui/vue": "^1.0.3",
|
|
39
|
+
"@iconify/tools": "^4.0.0",
|
|
40
40
|
"@iconify/vue": "^4.1.1",
|
|
41
|
-
"@vueuse/core": "^10.7.
|
|
41
|
+
"@vueuse/core": "^10.7.1",
|
|
42
42
|
"blurhash": "^2.0.5",
|
|
43
43
|
"comlink": "^4.4.1",
|
|
44
|
-
"jsdom": "^23.0
|
|
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.
|
|
50
|
-
"vue-imask": "^7.
|
|
49
|
+
"vue": "^3.4.7",
|
|
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.
|
|
57
|
-
"@babel/preset-env": "^7.23.
|
|
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
|
-
"@iconify/utils": "^2.1.
|
|
60
|
+
"@iconify/utils": "^2.1.14",
|
|
61
61
|
"@mdx-js/react": "^3.0.0",
|
|
62
|
-
"@rushstack/eslint-patch": "^1.6.
|
|
63
|
-
"@storybook/addon-a11y": "^7.6.
|
|
64
|
-
"@storybook/addon-actions": "^7.6.
|
|
65
|
-
"@storybook/addon-docs": "^7.6.
|
|
66
|
-
"@storybook/addon-essentials": "^7.6.
|
|
67
|
-
"@storybook/addon-interactions": "^7.6.
|
|
68
|
-
"@storybook/addon-links": "^7.6.
|
|
69
|
-
"@storybook/channel-postmessage": "^7.6.
|
|
70
|
-
"@storybook/channel-websocket": "^7.6.
|
|
71
|
-
"@storybook/cli": "^7.6.
|
|
72
|
-
"@storybook/client-api": "^7.6.
|
|
73
|
-
"@storybook/client-logger": "^7.6.
|
|
74
|
-
"@storybook/core-common": "^7.6.
|
|
62
|
+
"@rushstack/eslint-patch": "^1.6.1",
|
|
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.
|
|
77
|
-
"@storybook/preview-web": "^7.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.
|
|
81
|
-
"@storybook/vue3-vite": "^7.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.
|
|
85
|
+
"@types/node": "^20.10.7",
|
|
86
86
|
"@types/pica": "^9.0.4",
|
|
87
|
-
"@types/react": "^18.2.
|
|
87
|
+
"@types/react": "^18.2.47",
|
|
88
88
|
"@types/yargs": "^17.0.32",
|
|
89
|
-
"@vitejs/plugin-vue": "^
|
|
90
|
-
"@volverjs/style": "0.1.12-beta.
|
|
91
|
-
"@vue/compiler-sfc": "^3.
|
|
92
|
-
"@vue/eslint-config-prettier": "^
|
|
89
|
+
"@vitejs/plugin-vue": "^5.0.2",
|
|
90
|
+
"@volverjs/style": "0.1.12-beta.15",
|
|
91
|
+
"@vue/compiler-sfc": "^3.4.7",
|
|
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
|
-
"@vue/tsconfig": "^0.
|
|
96
|
-
"change-case": "^5.
|
|
95
|
+
"@vue/tsconfig": "^0.5.1",
|
|
96
|
+
"change-case": "^5.4.0",
|
|
97
97
|
"chokidar": "^3.5.3",
|
|
98
|
-
"eslint": "^8.
|
|
98
|
+
"eslint": "^8.56.0",
|
|
99
99
|
"eslint-config-prettier": "^9.1.0",
|
|
100
|
-
"eslint-mdx": "^
|
|
101
|
-
"eslint-plugin-mdx": "^
|
|
102
|
-
"eslint-plugin-prettier": "^5.
|
|
100
|
+
"eslint-mdx": "^3.1.1",
|
|
101
|
+
"eslint-plugin-mdx": "^3.1.1",
|
|
102
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
103
103
|
"eslint-plugin-storybook": "^0.6.15",
|
|
104
104
|
"eslint-plugin-vue": "^9.19.2",
|
|
105
105
|
"glob": "7.2.3",
|
|
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
|
|
109
|
+
"jsdom": "^23.2.0",
|
|
110
110
|
"npm-run-all": "^4.1.5",
|
|
111
|
-
"prettier": "^3.1.
|
|
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.
|
|
117
|
-
"storybook": "^7.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",
|
|
121
|
-
"terser": "^5.
|
|
122
|
-
"ts-node": "^10.9.
|
|
123
|
-
"typescript": "~5.3.
|
|
124
|
-
"unplugin-auto-import": "^0.17.
|
|
121
|
+
"terser": "^5.26.0",
|
|
122
|
+
"ts-node": "^10.9.2",
|
|
123
|
+
"typescript": "~5.3.3",
|
|
124
|
+
"unplugin-auto-import": "^0.17.3",
|
|
125
125
|
"unplugin-vue-components": "^0.26.0",
|
|
126
|
-
"vite": "^5.0.
|
|
126
|
+
"vite": "^5.0.11",
|
|
127
127
|
"vite-plugin-eslint": "^1.8.1",
|
|
128
128
|
"vite-plugin-externalize-deps": "^0.8.0",
|
|
129
|
-
"vue-tsc": "^1.8.
|
|
129
|
+
"vue-tsc": "^1.8.27",
|
|
130
130
|
"yargs": "^17.7.2"
|
|
131
131
|
},
|
|
132
132
|
"typesVersions": {
|