@volverjs/ui-vue 0.0.14 → 0.0.15
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/Volver.d.ts +5 -5
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/index.d.ts +1 -44
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -78
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +1 -1
- package/dist/components/VvCombobox/index.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
- package/dist/components/VvInputText/index.d.ts +3 -3
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -78
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvSelect/index.d.ts +2 -2
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/props/index.d.ts +1 -1
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/types/alert.d.ts +1 -1
- package/dist/types/nav.d.ts +1 -1
- package/dist/utils/ObjectUtilities.d.ts +0 -6
- package/package.json +1 -1
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Fragment as pe, computed as
|
|
2
|
-
import { Icon as
|
|
1
|
+
import { Fragment as pe, computed as l, createBlock as w, createCommentVNode as k, createElementBlock as T, createTextVNode as ee, defineComponent as x, getCurrentInstance as ge, inject as L, mergeDefaults as ye, mergeProps as E, openBlock as B, ref as M, renderSlot as I, resolveComponent as be, resolveDynamicComponent as me, toDisplayString as F, toRef as he, toRefs as te, unref as v, useAttrs as Se, useId as Be, useSlots as Ie, watch as Pe, withCtx as re } from "vue";
|
|
2
|
+
import { Icon as Oe, addIcon as ke, iconLoaded as D } from "@iconify/vue";
|
|
3
3
|
var W = /* @__PURE__ */ (function(e) {
|
|
4
4
|
return e.local = "local", e.session = "session", e;
|
|
5
|
-
})({}),
|
|
5
|
+
})({}), we = /* @__PURE__ */ (function(e) {
|
|
6
6
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
7
|
-
})({}),
|
|
7
|
+
})({}), b = /* @__PURE__ */ (function(e) {
|
|
8
8
|
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
9
9
|
})({}), Ae = /* @__PURE__ */ (function(e) {
|
|
10
10
|
return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
|
|
11
|
-
})({}),
|
|
11
|
+
})({}), _ = /* @__PURE__ */ (function(e) {
|
|
12
12
|
return e.before = "before", e.after = "after", e;
|
|
13
13
|
})({}), H = /* @__PURE__ */ (function(e) {
|
|
14
14
|
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
15
15
|
})({}), h = /* @__PURE__ */ (function(e) {
|
|
16
16
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
17
|
-
})({}), Ce = /* @__PURE__ */ Symbol.for("volver"), Ne = /* @__PURE__ */ Symbol.for("buttonGroup"),
|
|
17
|
+
})({}), Ce = /* @__PURE__ */ Symbol.for("volver"), Ne = /* @__PURE__ */ Symbol.for("buttonGroup"), Ee = /* @__PURE__ */ Symbol.for("dropdownTrigger"), _e = /* @__PURE__ */ Symbol.for("dropdownAction"), Le = {
|
|
18
18
|
showPassword: "eye-on",
|
|
19
19
|
hidePassword: "eye-off",
|
|
20
20
|
showDatePicker: "calendar",
|
|
@@ -33,7 +33,7 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
33
33
|
type: String,
|
|
34
34
|
default: "noopener noreferrer"
|
|
35
35
|
}
|
|
36
|
-
},
|
|
36
|
+
}, G = {
|
|
37
37
|
valid: {
|
|
38
38
|
type: Boolean,
|
|
39
39
|
default: !1
|
|
@@ -42,7 +42,7 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
42
42
|
type: [String, Array],
|
|
43
43
|
default: void 0
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, q = {
|
|
46
46
|
invalid: {
|
|
47
47
|
type: Boolean,
|
|
48
48
|
default: !1
|
|
@@ -72,7 +72,7 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
72
72
|
} }, Re = { current: {
|
|
73
73
|
type: Boolean,
|
|
74
74
|
default: !1
|
|
75
|
-
} },
|
|
75
|
+
} }, pt = {
|
|
76
76
|
showClearAction: {
|
|
77
77
|
type: Boolean,
|
|
78
78
|
default: !1
|
|
@@ -85,22 +85,22 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
85
85
|
type: String,
|
|
86
86
|
default: "Clear"
|
|
87
87
|
}
|
|
88
|
-
},
|
|
88
|
+
}, Te = { pressed: {
|
|
89
89
|
type: Boolean,
|
|
90
90
|
default: !1
|
|
91
91
|
} }, j = { label: {
|
|
92
92
|
type: [String, Number],
|
|
93
93
|
default: void 0
|
|
94
|
-
} },
|
|
94
|
+
} }, K = { readonly: {
|
|
95
95
|
type: Boolean,
|
|
96
96
|
default: !1
|
|
97
97
|
} }, R = { modifiers: {
|
|
98
98
|
type: [String, Array],
|
|
99
99
|
default: void 0
|
|
100
|
-
} },
|
|
100
|
+
} }, z = { hintLabel: {
|
|
101
101
|
type: String,
|
|
102
102
|
default: ""
|
|
103
|
-
} },
|
|
103
|
+
} }, De = {
|
|
104
104
|
options: {
|
|
105
105
|
type: Array,
|
|
106
106
|
default: () => []
|
|
@@ -136,8 +136,8 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
136
136
|
},
|
|
137
137
|
iconPosition: {
|
|
138
138
|
type: String,
|
|
139
|
-
default:
|
|
140
|
-
validation: (e) => Object.values(
|
|
139
|
+
default: _.before,
|
|
140
|
+
validation: (e) => Object.values(_).includes(e)
|
|
141
141
|
}
|
|
142
142
|
}, ne = { tabindex: {
|
|
143
143
|
type: [String, Number],
|
|
@@ -148,16 +148,16 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
148
148
|
} }, Ge = { unselectable: {
|
|
149
149
|
type: Boolean,
|
|
150
150
|
default: !0
|
|
151
|
-
} }, le = { id: [String, Number] },
|
|
151
|
+
} }, le = { id: [String, Number] }, gt = {
|
|
152
152
|
placement: {
|
|
153
153
|
type: String,
|
|
154
|
-
default:
|
|
155
|
-
validator: (e) => Object.values(
|
|
154
|
+
default: b.bottom,
|
|
155
|
+
validator: (e) => Object.values(b).includes(e) || Object.values(Ae).includes(e)
|
|
156
156
|
},
|
|
157
157
|
strategy: {
|
|
158
158
|
type: String,
|
|
159
159
|
default: void 0,
|
|
160
|
-
validator: (e) => Object.values(
|
|
160
|
+
validator: (e) => Object.values(we).includes(e)
|
|
161
161
|
},
|
|
162
162
|
transitionName: {
|
|
163
163
|
type: String,
|
|
@@ -215,16 +215,16 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
215
215
|
} }, Ke = { autocomplete: {
|
|
216
216
|
type: String,
|
|
217
217
|
default: "off"
|
|
218
|
-
} },
|
|
218
|
+
} }, yt = {
|
|
219
219
|
...ue,
|
|
220
220
|
...qe,
|
|
221
221
|
...Ke,
|
|
222
222
|
...ne,
|
|
223
223
|
...$,
|
|
224
|
-
...z,
|
|
225
|
-
...q,
|
|
226
224
|
...K,
|
|
227
|
-
...
|
|
225
|
+
...G,
|
|
226
|
+
...q,
|
|
227
|
+
...z,
|
|
228
228
|
...V,
|
|
229
229
|
...R,
|
|
230
230
|
...Fe,
|
|
@@ -245,14 +245,14 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
245
245
|
default: void 0
|
|
246
246
|
},
|
|
247
247
|
...oe
|
|
248
|
-
},
|
|
248
|
+
}, bt = {
|
|
249
249
|
...ue,
|
|
250
250
|
...ne,
|
|
251
|
+
...G,
|
|
251
252
|
...q,
|
|
252
|
-
...K,
|
|
253
|
-
...J,
|
|
254
|
-
...$,
|
|
255
253
|
...z,
|
|
254
|
+
...$,
|
|
255
|
+
...K,
|
|
256
256
|
...R,
|
|
257
257
|
...j,
|
|
258
258
|
...V,
|
|
@@ -273,13 +273,13 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
273
273
|
],
|
|
274
274
|
default: void 0
|
|
275
275
|
}
|
|
276
|
-
},
|
|
276
|
+
}, mt = {
|
|
277
|
+
...G,
|
|
277
278
|
...q,
|
|
278
|
-
...
|
|
279
|
-
...Te,
|
|
280
|
-
...J,
|
|
281
|
-
...$,
|
|
279
|
+
...De,
|
|
282
280
|
...z,
|
|
281
|
+
...$,
|
|
282
|
+
...K,
|
|
283
283
|
...R,
|
|
284
284
|
...j,
|
|
285
285
|
...V,
|
|
@@ -305,7 +305,7 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
305
305
|
}, ie = {
|
|
306
306
|
...$,
|
|
307
307
|
...j,
|
|
308
|
-
...
|
|
308
|
+
...Te,
|
|
309
309
|
...je,
|
|
310
310
|
...Re,
|
|
311
311
|
...$e,
|
|
@@ -322,7 +322,7 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
322
322
|
type: String,
|
|
323
323
|
default: h.button
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, ht = {
|
|
326
326
|
storageType: {
|
|
327
327
|
type: String,
|
|
328
328
|
default: W.local,
|
|
@@ -331,10 +331,10 @@ var W = /* @__PURE__ */ (function(e) {
|
|
|
331
331
|
storageKey: String
|
|
332
332
|
};
|
|
333
333
|
function ze(e) {
|
|
334
|
-
const t = L(e, void 0),
|
|
335
|
-
function r(
|
|
336
|
-
const d = t?.[
|
|
337
|
-
if (d) return
|
|
334
|
+
const t = L(e, void 0), o = l(() => t !== void 0);
|
|
335
|
+
function r(a, u, p) {
|
|
336
|
+
const d = t?.[a];
|
|
337
|
+
if (d) return l({
|
|
338
338
|
get() {
|
|
339
339
|
return d.value;
|
|
340
340
|
},
|
|
@@ -342,19 +342,19 @@ function ze(e) {
|
|
|
342
342
|
d.value = c;
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
|
-
const
|
|
346
|
-
return
|
|
345
|
+
const m = he(u, a);
|
|
346
|
+
return l({
|
|
347
347
|
get() {
|
|
348
|
-
return
|
|
348
|
+
return m.value;
|
|
349
349
|
},
|
|
350
350
|
set(c) {
|
|
351
|
-
|
|
351
|
+
p && p(`update:${a}`, c);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
return {
|
|
356
356
|
group: t,
|
|
357
|
-
isInGroup:
|
|
357
|
+
isInGroup: o,
|
|
358
358
|
getGroupOrLocalRef: r
|
|
359
359
|
};
|
|
360
360
|
}
|
|
@@ -367,8 +367,8 @@ var Je = ["update:modelValue"], Ue = {
|
|
|
367
367
|
...ae,
|
|
368
368
|
iconPosition: {
|
|
369
369
|
type: String,
|
|
370
|
-
default:
|
|
371
|
-
validator: (e) => Object.values(
|
|
370
|
+
default: b.left,
|
|
371
|
+
validator: (e) => Object.values(b).includes(e)
|
|
372
372
|
},
|
|
373
373
|
loadingIcon: {
|
|
374
374
|
type: String,
|
|
@@ -404,69 +404,69 @@ var Je = ["update:modelValue"], Ue = {
|
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
function Ye(e, t) {
|
|
407
|
-
const { group:
|
|
407
|
+
const { group: o, isInGroup: r, getGroupOrLocalRef: a } = ze(Ne), { id: u, iconPosition: p, icon: d, label: m, pressed: c } = te(e);
|
|
408
408
|
return {
|
|
409
|
-
group:
|
|
409
|
+
group: o,
|
|
410
410
|
isInGroup: r,
|
|
411
|
-
modelValue:
|
|
412
|
-
toggle:
|
|
413
|
-
unselectable:
|
|
414
|
-
multiple:
|
|
415
|
-
modifiers:
|
|
416
|
-
let
|
|
417
|
-
const
|
|
418
|
-
return
|
|
411
|
+
modelValue: a("modelValue", e, t),
|
|
412
|
+
toggle: a("toggle", e),
|
|
413
|
+
unselectable: a("unselectable", e),
|
|
414
|
+
multiple: l(() => o?.multiple.value ?? !1),
|
|
415
|
+
modifiers: l(() => {
|
|
416
|
+
let g = e.modifiers, i = o?.modifiers.value;
|
|
417
|
+
const n = /* @__PURE__ */ new Set();
|
|
418
|
+
return g && (Array.isArray(g) || (g = g.split(" ")), g.forEach((y) => n.add(y))), i && (Array.isArray(i) || (i = i.split(" ")), i.forEach((y) => n.add(y))), [...n];
|
|
419
419
|
}),
|
|
420
|
-
disabled:
|
|
420
|
+
disabled: l(() => !!(e.disabled || o?.disabled.value)),
|
|
421
421
|
id: u,
|
|
422
422
|
pressed: c,
|
|
423
|
-
iconPosition:
|
|
423
|
+
iconPosition: p,
|
|
424
424
|
icon: d,
|
|
425
|
-
label:
|
|
425
|
+
label: m
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
var We = [
|
|
429
429
|
"click",
|
|
430
430
|
"mouseover",
|
|
431
431
|
"mouseleave"
|
|
432
|
-
]
|
|
432
|
+
];
|
|
433
433
|
function se() {
|
|
434
434
|
return L(Ce, void 0);
|
|
435
435
|
}
|
|
436
|
+
function He() {
|
|
437
|
+
return L(Ee, {});
|
|
438
|
+
}
|
|
436
439
|
function Qe() {
|
|
437
440
|
return L(_e, {});
|
|
438
441
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
|
|
443
|
-
...Ze,
|
|
444
|
-
props: He,
|
|
442
|
+
var Xe = { name: "VvAction" }, Ze = /* @__PURE__ */ x({
|
|
443
|
+
...Xe,
|
|
444
|
+
props: ie,
|
|
445
445
|
emits: We,
|
|
446
|
-
setup(e, { expose: t, emit:
|
|
447
|
-
const r = e,
|
|
446
|
+
setup(e, { expose: t, emit: o }) {
|
|
447
|
+
const r = e, a = o, u = ge(), p = se(), d = M(null);
|
|
448
448
|
t({ $el: d });
|
|
449
|
-
const { reference:
|
|
449
|
+
const { reference: m, bus: c, aria: g, expanded: i } = He();
|
|
450
450
|
Pe(() => d.value, (s) => {
|
|
451
|
-
|
|
451
|
+
m && (m.value = s);
|
|
452
452
|
});
|
|
453
|
-
const
|
|
453
|
+
const n = l(() => r.pressed || i?.value), { role: y } = Qe(), S = l(() => {
|
|
454
454
|
switch (!0) {
|
|
455
455
|
case r.disabled:
|
|
456
456
|
return h.button;
|
|
457
457
|
case r.to !== void 0:
|
|
458
|
-
return
|
|
458
|
+
return p?.nuxt ? be(h.nuxtLink) : h.routerLink;
|
|
459
459
|
case r.href !== void 0:
|
|
460
460
|
return h.a;
|
|
461
461
|
default:
|
|
462
462
|
return r.defaultTag;
|
|
463
463
|
}
|
|
464
|
-
}), A =
|
|
464
|
+
}), A = l(() => {
|
|
465
465
|
const s = {
|
|
466
|
-
...
|
|
467
|
-
ariaPressed:
|
|
466
|
+
...g?.value,
|
|
467
|
+
ariaPressed: n.value ? !0 : void 0,
|
|
468
468
|
ariaLabel: r.ariaLabel,
|
|
469
|
-
role:
|
|
469
|
+
role: y?.value
|
|
470
470
|
};
|
|
471
471
|
switch (S.value) {
|
|
472
472
|
case h.a:
|
|
@@ -499,31 +499,31 @@ var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
|
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
501
|
if (u?.vnode.props?.onClick) {
|
|
502
|
-
|
|
502
|
+
a("click", s);
|
|
503
503
|
return;
|
|
504
504
|
}
|
|
505
505
|
c?.emit("click", s);
|
|
506
506
|
}
|
|
507
507
|
function P(s) {
|
|
508
508
|
if (u?.vnode.props?.onMouseover) {
|
|
509
|
-
|
|
509
|
+
a("mouseover", s);
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
512
|
c?.emit("mouseover", s);
|
|
513
513
|
}
|
|
514
514
|
function N(s) {
|
|
515
515
|
if (u?.vnode.props?.onMouseleave) {
|
|
516
|
-
|
|
516
|
+
a("mouseleave", s);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
519
|
c?.emit("mouseleave", s);
|
|
520
520
|
}
|
|
521
|
-
return (s, U) => (B(),
|
|
521
|
+
return (s, U) => (B(), w(me(v(S)), E(v(A), {
|
|
522
522
|
ref_key: "rootEl",
|
|
523
523
|
ref: d,
|
|
524
524
|
class: {
|
|
525
525
|
active: s.active,
|
|
526
|
-
pressed: v(
|
|
526
|
+
pressed: v(n),
|
|
527
527
|
disabled: s.disabled,
|
|
528
528
|
current: s.current
|
|
529
529
|
},
|
|
@@ -535,19 +535,19 @@ var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
|
|
|
535
535
|
_: 3
|
|
536
536
|
}, 16, ["class"]));
|
|
537
537
|
}
|
|
538
|
-
}),
|
|
539
|
-
function de(e, t,
|
|
540
|
-
return
|
|
541
|
-
const r = { [e]: !0 },
|
|
542
|
-
return
|
|
538
|
+
}), et = Ze;
|
|
539
|
+
function de(e, t, o) {
|
|
540
|
+
return l(() => {
|
|
541
|
+
const r = { [e]: !0 }, a = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
|
|
542
|
+
return a && Array.isArray(a) && a.forEach((u) => {
|
|
543
543
|
u && (r[`${e}--${u}`] = !0);
|
|
544
|
-
}),
|
|
545
|
-
r[`${e}--${u}`] = v(
|
|
544
|
+
}), o && Object.keys(o.value).forEach((u) => {
|
|
545
|
+
r[`${e}--${u}`] = v(o.value[u]);
|
|
546
546
|
}), r;
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
|
-
var
|
|
550
|
-
...
|
|
549
|
+
var tt = { name: "VvIcon" }, rt = /* @__PURE__ */ x({
|
|
550
|
+
...tt,
|
|
551
551
|
props: /* @__PURE__ */ ye({
|
|
552
552
|
name: {},
|
|
553
553
|
color: {},
|
|
@@ -567,31 +567,30 @@ var rt = { name: "VvIcon" }, ot = /* @__PURE__ */ M({
|
|
|
567
567
|
modifiers: {}
|
|
568
568
|
}, Ve),
|
|
569
569
|
setup(e) {
|
|
570
|
-
const t = e,
|
|
571
|
-
const
|
|
572
|
-
if (
|
|
573
|
-
const
|
|
574
|
-
return
|
|
570
|
+
const t = e, o = l(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = M(!0), a = se(), { modifiers: u } = te(t), p = de("vv-icon", u), d = l(() => t.provider || a?.iconsProvider), m = l(() => {
|
|
571
|
+
const i = t.name ?? "", n = `@${d.value}:${t.prefix}:${i}`;
|
|
572
|
+
if (D(n)) return n;
|
|
573
|
+
const y = a?.iconsCollections.find((S) => D(`@${d.value}:${S.prefix}:${i}`));
|
|
574
|
+
return y ? `@${d.value}:${y.prefix}:${i}` : i;
|
|
575
575
|
});
|
|
576
|
-
function c(
|
|
577
|
-
|
|
578
|
-
return l ? l.parseFromString(n, "text/html").querySelector("svg") : null;
|
|
576
|
+
function c(i) {
|
|
577
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(i, "text/html").querySelector("svg");
|
|
579
578
|
}
|
|
580
|
-
function
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
body:
|
|
584
|
-
height:
|
|
585
|
-
width:
|
|
579
|
+
function g(i) {
|
|
580
|
+
const n = c(i), y = n?.innerHTML.trim() || "";
|
|
581
|
+
n && y && ke(`@${d.value}:${t.prefix}:${t.name}`, {
|
|
582
|
+
body: y,
|
|
583
|
+
height: n.viewBox.baseVal.height,
|
|
584
|
+
width: n.viewBox.baseVal.width
|
|
586
585
|
});
|
|
587
586
|
}
|
|
588
|
-
return
|
|
589
|
-
|
|
590
|
-
}).catch((
|
|
591
|
-
throw r.value = !0, new Error(`Error during fetch icon: ${
|
|
592
|
-
})), t.svg &&
|
|
587
|
+
return a && t.src && !D(`@${d.value}:${t.prefix}:${t.name}`) && (r.value = !1, a.fetchIcon(t.src).then((i) => {
|
|
588
|
+
i && g(i), r.value = !0;
|
|
589
|
+
}).catch((i) => {
|
|
590
|
+
throw r.value = !0, new Error(`Error during fetch icon: ${i?.message}`);
|
|
591
|
+
})), t.svg && g(t.svg), (i, n) => v(r) ? (B(), w(v(Oe), E({
|
|
593
592
|
key: 0,
|
|
594
|
-
class: v(
|
|
593
|
+
class: v(p)
|
|
595
594
|
}, {
|
|
596
595
|
inline: e.inline,
|
|
597
596
|
width: e.width,
|
|
@@ -599,120 +598,120 @@ var rt = { name: "VvIcon" }, ot = /* @__PURE__ */ M({
|
|
|
599
598
|
horizontalFlip: e.horizontalFlip,
|
|
600
599
|
verticalFlip: e.verticalFlip,
|
|
601
600
|
flip: e.flip,
|
|
602
|
-
rotate: v(
|
|
601
|
+
rotate: v(o),
|
|
603
602
|
color: e.color,
|
|
604
|
-
icon: v(
|
|
605
|
-
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) :
|
|
603
|
+
icon: v(m)
|
|
604
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : k("v-if", !0);
|
|
606
605
|
}
|
|
607
|
-
}), Q =
|
|
608
|
-
function
|
|
609
|
-
return
|
|
606
|
+
}), Q = rt;
|
|
607
|
+
function ot(e) {
|
|
608
|
+
return l(() => String(e?.value || Be()));
|
|
610
609
|
}
|
|
611
|
-
function fe(e, t,
|
|
612
|
-
return
|
|
610
|
+
function fe(e, t, o) {
|
|
611
|
+
return o ? X(e, o) === X(t, o) : J(e, t);
|
|
613
612
|
}
|
|
614
|
-
function
|
|
615
|
-
if (e
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
if (d !== y) return !1;
|
|
627
|
-
if (d && y) return e.getTime() === t.getTime();
|
|
628
|
-
const c = e instanceof RegExp, p = t instanceof RegExp;
|
|
629
|
-
if (c !== p) return !1;
|
|
630
|
-
if (c && p) return e.toString() === t.toString();
|
|
631
|
-
const n = Object.keys(e);
|
|
632
|
-
if (u = n.length, u !== Object.keys(t).length) return !1;
|
|
633
|
-
for (o = u; o-- !== 0; ) if (!Object.hasOwn(t, n[o])) return !1;
|
|
634
|
-
for (o = u; o-- !== 0; )
|
|
635
|
-
if (g = n[o], !x(e[g], t[g])) return !1;
|
|
636
|
-
return !0;
|
|
613
|
+
function at(e, t) {
|
|
614
|
+
if (e.length !== t.length) return !1;
|
|
615
|
+
for (let o = e.length; o-- !== 0; ) if (!J(e[o], t[o])) return !1;
|
|
616
|
+
return !0;
|
|
617
|
+
}
|
|
618
|
+
function nt(e, t) {
|
|
619
|
+
const o = Object.keys(e), { length: r } = o;
|
|
620
|
+
if (r !== Object.keys(t).length) return !1;
|
|
621
|
+
for (let a = r; a-- !== 0; ) if (!Object.hasOwn(t, o[a])) return !1;
|
|
622
|
+
for (let a = r; a-- !== 0; ) {
|
|
623
|
+
const u = o[a];
|
|
624
|
+
if (!J(e[u], t[u])) return !1;
|
|
637
625
|
}
|
|
638
|
-
return
|
|
626
|
+
return !0;
|
|
627
|
+
}
|
|
628
|
+
function J(e, t) {
|
|
629
|
+
if (e === t) return !0;
|
|
630
|
+
if (!e || !t || typeof e != "object" || typeof t != "object") return Number.isNaN(e) && Number.isNaN(t);
|
|
631
|
+
const o = Array.isArray(e), r = Array.isArray(t);
|
|
632
|
+
if (o !== r) return !1;
|
|
633
|
+
if (o && r) return at(e, t);
|
|
634
|
+
const a = e instanceof Date, u = t instanceof Date;
|
|
635
|
+
if (a !== u) return !1;
|
|
636
|
+
if (a && u) return e.getTime() === t.getTime();
|
|
637
|
+
const p = e instanceof RegExp, d = t instanceof RegExp;
|
|
638
|
+
return p !== d ? !1 : p && d ? e.toString() === t.toString() : nt(e, t);
|
|
639
639
|
}
|
|
640
640
|
function X(e, t) {
|
|
641
|
-
if (e && Object.keys(e).length && t)
|
|
642
|
-
|
|
641
|
+
if (e && Object.keys(e).length && t) {
|
|
642
|
+
if (!t.includes(".")) return e[t];
|
|
643
|
+
const o = t.split(".");
|
|
643
644
|
let r = e;
|
|
644
|
-
for (let
|
|
645
|
-
if (
|
|
646
|
-
r = r[a
|
|
645
|
+
for (let a = 0, u = o.length; a < u; ++a) {
|
|
646
|
+
if (r == null) return null;
|
|
647
|
+
r = r[o[a]];
|
|
647
648
|
}
|
|
648
649
|
return r;
|
|
649
|
-
} else
|
|
650
|
-
return e[t];
|
|
651
|
-
else return null;
|
|
650
|
+
} else return null;
|
|
652
651
|
}
|
|
653
652
|
function Z(e, t) {
|
|
654
|
-
if (e != null && t
|
|
655
|
-
for (const
|
|
653
|
+
if (e != null && t?.length) {
|
|
654
|
+
for (const o of t) if (fe(e, o)) return !0;
|
|
656
655
|
}
|
|
657
656
|
return !1;
|
|
658
657
|
}
|
|
659
|
-
function
|
|
660
|
-
const
|
|
658
|
+
function lt(e, t) {
|
|
659
|
+
const o = l(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = l(() => t?.value === _.before ? o.value : void 0), a = l(() => t?.value === _.after ? o.value : void 0);
|
|
661
660
|
return {
|
|
662
|
-
hasIcon:
|
|
663
|
-
hasIconLeft:
|
|
664
|
-
hasIconRight:
|
|
665
|
-
hasIconTop:
|
|
666
|
-
hasIconBottom:
|
|
661
|
+
hasIcon: o,
|
|
662
|
+
hasIconLeft: l(() => t?.value === b.left ? o.value : void 0),
|
|
663
|
+
hasIconRight: l(() => t?.value === b.right ? o.value : void 0),
|
|
664
|
+
hasIconTop: l(() => t?.value === b.top ? o.value : void 0),
|
|
665
|
+
hasIconBottom: l(() => t?.value === b.bottom ? o.value : void 0),
|
|
667
666
|
hasIconBefore: r,
|
|
668
|
-
hasIconAfter:
|
|
667
|
+
hasIconAfter: a
|
|
669
668
|
};
|
|
670
669
|
}
|
|
671
|
-
var
|
|
670
|
+
var ut = {
|
|
672
671
|
key: 1,
|
|
673
672
|
class: "vv-button__label"
|
|
674
|
-
},
|
|
673
|
+
}, it = {
|
|
675
674
|
key: 1,
|
|
676
675
|
class: "vv-button__label"
|
|
677
|
-
},
|
|
676
|
+
}, st = {
|
|
678
677
|
name: "VvButton",
|
|
679
678
|
inheritAttrs: !1
|
|
680
|
-
},
|
|
681
|
-
...
|
|
679
|
+
}, dt = /* @__PURE__ */ x({
|
|
680
|
+
...st,
|
|
682
681
|
props: Ue,
|
|
683
682
|
emits: Je,
|
|
684
|
-
setup(e, { expose: t, emit:
|
|
685
|
-
const r = e,
|
|
686
|
-
t({ $el:
|
|
687
|
-
const s =
|
|
688
|
-
reverse: [
|
|
689
|
-
column: [
|
|
690
|
-
"icon-only": !!(
|
|
691
|
-
}))), { hasIcon: Y } =
|
|
683
|
+
setup(e, { expose: t, emit: o }) {
|
|
684
|
+
const r = e, a = o, u = Se(), p = Ie(), { id: d, modifiers: m, iconPosition: c, icon: g, label: i, modelValue: n, disabled: y, toggle: S, unselectable: A } = Ye(r, a), C = ot(d), P = l(() => u?.name || C.value), N = M(null);
|
|
685
|
+
t({ $el: l(() => N.value?.$el) });
|
|
686
|
+
const s = l(() => S.value ? Array.isArray(n.value) ? Z(P.value, n.value) : fe(P.value, n.value) : r.pressed), U = de("vv-button", m, l(() => ({
|
|
687
|
+
reverse: [b.right, b.bottom].includes(c.value),
|
|
688
|
+
column: [b.top, b.bottom].includes(c.value),
|
|
689
|
+
"icon-only": !!(g?.value && !i?.value && !p.default)
|
|
690
|
+
}))), { hasIcon: Y } = lt(g), O = l(() => r.value === void 0 ? P.value : r.value), ve = l(() => {
|
|
692
691
|
if (S.value)
|
|
693
692
|
return { onClick: ce };
|
|
694
693
|
});
|
|
695
694
|
function ce() {
|
|
696
695
|
if (S.value) {
|
|
697
|
-
if (Array.isArray(
|
|
698
|
-
if (Z(
|
|
699
|
-
A.value && (
|
|
696
|
+
if (Array.isArray(n.value)) {
|
|
697
|
+
if (Z(O.value, n.value)) {
|
|
698
|
+
A.value && (n.value = n.value.filter((f) => f !== O.value));
|
|
700
699
|
return;
|
|
701
700
|
}
|
|
702
|
-
|
|
701
|
+
n.value.push(O.value);
|
|
703
702
|
return;
|
|
704
703
|
}
|
|
705
|
-
if (
|
|
706
|
-
|
|
704
|
+
if (O.value === n.value && A.value) {
|
|
705
|
+
n.value = r.uncheckedValue;
|
|
707
706
|
return;
|
|
708
707
|
}
|
|
709
|
-
|
|
708
|
+
n.value = O.value;
|
|
710
709
|
}
|
|
711
710
|
}
|
|
712
|
-
return (f,
|
|
711
|
+
return (f, ft) => (B(), w(et, E({
|
|
713
712
|
...v(u),
|
|
714
713
|
...v(ve),
|
|
715
|
-
disabled: v(
|
|
714
|
+
disabled: v(y),
|
|
716
715
|
pressed: v(s),
|
|
717
716
|
active: f.active,
|
|
718
717
|
type: f.type,
|
|
@@ -727,20 +726,20 @@ var lt = {
|
|
|
727
726
|
ref: N,
|
|
728
727
|
class: v(U)
|
|
729
728
|
}), {
|
|
730
|
-
default: re(() => [I(f.$slots, "default", {}, () => [f.loading ? I(f.$slots, "loading", { key: 0 }, () => [f.loadingIcon ? (B(),
|
|
729
|
+
default: re(() => [I(f.$slots, "default", {}, () => [f.loading ? I(f.$slots, "loading", { key: 0 }, () => [f.loadingIcon ? (B(), w(Q, {
|
|
731
730
|
key: 0,
|
|
732
731
|
class: "vv-button__loading-icon",
|
|
733
732
|
name: f.loadingIcon
|
|
734
|
-
}, null, 8, ["name"])) :
|
|
733
|
+
}, null, 8, ["name"])) : k("v-if", !0), f.loadingLabel ? (B(), T("span", ut, F(f.loadingLabel), 1)) : k("v-if", !0)]) : (B(), T(pe, { key: 1 }, [
|
|
735
734
|
I(f.$slots, "before"),
|
|
736
|
-
v(Y) ? (B(),
|
|
737
|
-
v(
|
|
735
|
+
v(Y) ? (B(), w(Q, E({ key: 0 }, v(Y), { class: "vv-button__icon" }), null, 16)) : k("v-if", !0),
|
|
736
|
+
v(i) ? (B(), T("span", it, [I(f.$slots, "label", {}, () => [ee(F(v(i)), 1)])])) : k("v-if", !0),
|
|
738
737
|
I(f.$slots, "after")
|
|
739
738
|
], 64))])]),
|
|
740
739
|
_: 3
|
|
741
740
|
}, 16, ["id", "class"]));
|
|
742
741
|
}
|
|
743
|
-
}),
|
|
742
|
+
}), St = dt;
|
|
744
743
|
export {
|
|
745
|
-
|
|
744
|
+
St as default
|
|
746
745
|
};
|