@paraxe/vue 1.0.2 → 1.0.3
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/forms/Checkbox.d.ts +1 -1
- package/dist/forms/ChoiceGroup.d.ts +1 -1
- package/dist/forms/Input.d.ts +5 -7
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Textarea.d.ts +1 -1
- package/dist/index.js +92 -87
- package/package.json +1 -1
- package/pnpm-workspace.yaml +0 -0
- package/src/forms/Input.vue +10 -9
- package/dist/.loba-build.json +0 -5
package/dist/forms/Checkbox.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
14
14
|
onChange?: ((value: boolean) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
disabled: boolean;
|
|
17
|
-
value: boolean;
|
|
18
17
|
required: boolean;
|
|
18
|
+
value: boolean;
|
|
19
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -19,8 +19,8 @@ declare const __VLS_base: import('vue').DefineComponent<ChoiceGroupProps, {}, {}
|
|
|
19
19
|
"onUpdate:modelValue"?: ((value: string | number | (string | number)[] | null) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
disabled: boolean;
|
|
22
|
-
multiple: boolean;
|
|
23
22
|
modelValue: string | number | Array<string | number> | null;
|
|
23
|
+
multiple: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
package/dist/forms/Input.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputType } from '@paraxe/core';
|
|
2
2
|
interface Props {
|
|
3
|
-
type
|
|
3
|
+
type?: InputType;
|
|
4
4
|
placeholder?: string;
|
|
5
|
-
|
|
5
|
+
modelValue?: string;
|
|
6
6
|
required?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
readonly?: boolean;
|
|
@@ -10,16 +10,14 @@ interface Props {
|
|
|
10
10
|
success?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
-
|
|
14
|
-
change: (value: string) => any;
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
15
14
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
-
|
|
17
|
-
onChange?: ((value: string) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
16
|
}>, {
|
|
19
17
|
disabled: boolean;
|
|
20
18
|
type: InputType;
|
|
21
19
|
placeholder: string;
|
|
22
|
-
|
|
20
|
+
modelValue: string;
|
|
23
21
|
required: boolean;
|
|
24
22
|
readonly: boolean;
|
|
25
23
|
error: boolean;
|
package/dist/forms/Select.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
14
14
|
onChange?: ((value: string) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
disabled: boolean;
|
|
17
|
-
value: string;
|
|
18
17
|
error: boolean;
|
|
19
18
|
success: boolean;
|
|
19
|
+
value: string;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
package/dist/forms/Textarea.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {},
|
|
|
14
14
|
onChange?: ((value: string) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
disabled: boolean;
|
|
17
|
-
value: string;
|
|
18
17
|
readonly: boolean;
|
|
19
18
|
error: boolean;
|
|
20
19
|
success: boolean;
|
|
20
|
+
value: string;
|
|
21
21
|
maxlength: number;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, computed as b, openBlock as n, createElementBlock as d, normalizeClass as f, renderSlot as u, createBlock as T, resolveDynamicComponent as A, withCtx as
|
|
2
|
-
const oe = ["disabled"],
|
|
1
|
+
import { defineComponent as m, computed as b, openBlock as n, createElementBlock as d, normalizeClass as f, renderSlot as u, createBlock as T, resolveDynamicComponent as A, withCtx as L, createCommentVNode as $, createElementVNode as p, createTextVNode as R, toDisplayString as S, ref as V, provide as M, inject as z, withDirectives as te, vShow as ae, useModel as se, watch as K, mergeModels as Q, withKeys as j, withModifiers as Y, unref as N, Fragment as q, renderList as G, normalizeStyle as W, useSlots as le, onMounted as J, onBeforeUnmount as O, Teleport as U, nextTick as Z } from "vue";
|
|
2
|
+
const oe = ["disabled"], It = /* @__PURE__ */ m({
|
|
3
3
|
__name: "Button",
|
|
4
4
|
props: {
|
|
5
5
|
variant: { default: "primary" },
|
|
@@ -28,7 +28,7 @@ const oe = ["disabled"], Lt = /* @__PURE__ */ m({
|
|
|
28
28
|
u(r.$slots, "default")
|
|
29
29
|
], 10, oe));
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), Lt = /* @__PURE__ */ m({
|
|
32
32
|
__name: "Card",
|
|
33
33
|
props: {
|
|
34
34
|
variant: { default: "default" },
|
|
@@ -42,7 +42,7 @@ const oe = ["disabled"], Lt = /* @__PURE__ */ m({
|
|
|
42
42
|
return (s, l) => (n(), T(A(e.as), {
|
|
43
43
|
class: f(t.value)
|
|
44
44
|
}, {
|
|
45
|
-
default:
|
|
45
|
+
default: L(() => [
|
|
46
46
|
u(s.$slots, "default")
|
|
47
47
|
]),
|
|
48
48
|
_: 3
|
|
@@ -53,29 +53,34 @@ const oe = ["disabled"], Lt = /* @__PURE__ */ m({
|
|
|
53
53
|
props: {
|
|
54
54
|
type: { default: "text" },
|
|
55
55
|
placeholder: { default: "" },
|
|
56
|
-
|
|
56
|
+
modelValue: { default: "" },
|
|
57
57
|
required: { type: Boolean, default: !1 },
|
|
58
58
|
disabled: { type: Boolean, default: !1 },
|
|
59
59
|
readonly: { type: Boolean, default: !1 },
|
|
60
60
|
error: { type: Boolean, default: !1 },
|
|
61
61
|
success: { type: Boolean, default: !1 }
|
|
62
62
|
},
|
|
63
|
-
emits: ["
|
|
63
|
+
emits: ["update:modelValue"],
|
|
64
64
|
setup(a, { emit: e }) {
|
|
65
65
|
const t = a, s = e, l = b(() => ({
|
|
66
66
|
"input-error": t.error,
|
|
67
67
|
"input-success": t.success
|
|
68
68
|
}));
|
|
69
|
-
|
|
69
|
+
function o(r) {
|
|
70
|
+
s(
|
|
71
|
+
"update:modelValue",
|
|
72
|
+
r.target.value
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
return (r, i) => (n(), d("input", {
|
|
70
76
|
class: f(["input", l.value]),
|
|
71
77
|
type: t.type,
|
|
72
78
|
placeholder: t.placeholder,
|
|
73
|
-
value: t.
|
|
79
|
+
value: t.modelValue,
|
|
74
80
|
required: t.required,
|
|
75
81
|
disabled: t.disabled,
|
|
76
82
|
readonly: t.readonly,
|
|
77
|
-
onInput:
|
|
78
|
-
onChange: r[1] || (r[1] = (i) => s("change", i.target.value))
|
|
83
|
+
onInput: o
|
|
79
84
|
}, null, 42, ne));
|
|
80
85
|
}
|
|
81
86
|
}), H = (a, e) => {
|
|
@@ -159,7 +164,7 @@ const At = /* @__PURE__ */ H(ie, [["render", de]]), Mt = /* @__PURE__ */ m({
|
|
|
159
164
|
return (s, l) => (n(), T(A(a.level), {
|
|
160
165
|
class: f(t.value)
|
|
161
166
|
}, {
|
|
162
|
-
default:
|
|
167
|
+
default: L(() => [
|
|
163
168
|
u(s.$slots, "default")
|
|
164
169
|
]),
|
|
165
170
|
_: 3
|
|
@@ -183,7 +188,7 @@ const At = /* @__PURE__ */ H(ie, [["render", de]]), Mt = /* @__PURE__ */ m({
|
|
|
183
188
|
return (s, l) => (n(), T(A(e.as), {
|
|
184
189
|
class: f(t.value)
|
|
185
190
|
}, {
|
|
186
|
-
default:
|
|
191
|
+
default: L(() => [
|
|
187
192
|
u(s.$slots, "default")
|
|
188
193
|
]),
|
|
189
194
|
_: 3
|
|
@@ -240,7 +245,7 @@ function be(a, e) {
|
|
|
240
245
|
const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
241
246
|
key: 0,
|
|
242
247
|
"aria-hidden": "true"
|
|
243
|
-
}, _e = { key: 1 },
|
|
248
|
+
}, _e = { key: 1 }, ye = /* @__PURE__ */ m({
|
|
244
249
|
__name: "Label",
|
|
245
250
|
props: {
|
|
246
251
|
for: { default: void 0 },
|
|
@@ -260,7 +265,7 @@ const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
|
260
265
|
e.required ? (n(), d("span", he, "*")) : e.optional ? (n(), d("span", _e, "(optional)")) : $("", !0)
|
|
261
266
|
], 10, ve));
|
|
262
267
|
}
|
|
263
|
-
}),
|
|
268
|
+
}), ge = ["src", "alt"], jt = /* @__PURE__ */ m({
|
|
264
269
|
__name: "Image",
|
|
265
270
|
props: {
|
|
266
271
|
src: {},
|
|
@@ -282,7 +287,7 @@ const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
|
282
287
|
p("img", {
|
|
283
288
|
src: e.src,
|
|
284
289
|
alt: e.alt
|
|
285
|
-
}, null, 8,
|
|
290
|
+
}, null, 8, ge)
|
|
286
291
|
], 2));
|
|
287
292
|
}
|
|
288
293
|
}), $e = { class: "form-field" }, Ht = /* @__PURE__ */ m({
|
|
@@ -299,14 +304,14 @@ const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
|
299
304
|
setup(a) {
|
|
300
305
|
const e = a;
|
|
301
306
|
return (t, s) => (n(), d("div", $e, [
|
|
302
|
-
e.label ? (n(), T(
|
|
307
|
+
e.label ? (n(), T(ye, {
|
|
303
308
|
key: 0,
|
|
304
309
|
for: e.id,
|
|
305
310
|
required: e.required,
|
|
306
311
|
optional: e.optional,
|
|
307
312
|
disabled: e.disabled
|
|
308
313
|
}, {
|
|
309
|
-
default:
|
|
314
|
+
default: L(() => [
|
|
310
315
|
R(S(e.label), 1)
|
|
311
316
|
]),
|
|
312
317
|
_: 1
|
|
@@ -316,7 +321,7 @@ const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
|
316
321
|
key: 1,
|
|
317
322
|
tone: "muted"
|
|
318
323
|
}, {
|
|
319
|
-
default:
|
|
324
|
+
default: L(() => [
|
|
320
325
|
R(S(e.description), 1)
|
|
321
326
|
]),
|
|
322
327
|
_: 1
|
|
@@ -325,7 +330,7 @@ const Gt = /* @__PURE__ */ H(fe, [["render", be]]), ve = ["for"], he = {
|
|
|
325
330
|
key: 2,
|
|
326
331
|
tone: "accent"
|
|
327
332
|
}, {
|
|
328
|
-
default:
|
|
333
|
+
default: L(() => [
|
|
329
334
|
R(S(e.error), 1)
|
|
330
335
|
]),
|
|
331
336
|
_: 1
|
|
@@ -495,7 +500,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
495
500
|
}), Te = {
|
|
496
501
|
key: 0,
|
|
497
502
|
class: "empty-state-icon"
|
|
498
|
-
}, De = { class: "empty-state-content" },
|
|
503
|
+
}, De = { class: "empty-state-content" }, Ie = {
|
|
499
504
|
key: 1,
|
|
500
505
|
class: "empty-state-actions"
|
|
501
506
|
}, Yt = /* @__PURE__ */ m({
|
|
@@ -510,21 +515,21 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
510
515
|
return (s, l) => (n(), T(A(e.as), {
|
|
511
516
|
class: f(t.value)
|
|
512
517
|
}, {
|
|
513
|
-
default:
|
|
518
|
+
default: L(() => [
|
|
514
519
|
s.$slots.icon ? (n(), d("div", Te, [
|
|
515
520
|
u(s.$slots, "icon")
|
|
516
521
|
])) : $("", !0),
|
|
517
522
|
p("div", De, [
|
|
518
523
|
u(s.$slots, "default")
|
|
519
524
|
]),
|
|
520
|
-
s.$slots.actions ? (n(), d("div",
|
|
525
|
+
s.$slots.actions ? (n(), d("div", Ie, [
|
|
521
526
|
u(s.$slots, "actions")
|
|
522
527
|
])) : $("", !0)
|
|
523
528
|
]),
|
|
524
529
|
_: 3
|
|
525
530
|
}, 8, ["class"]));
|
|
526
531
|
}
|
|
527
|
-
}),
|
|
532
|
+
}), Le = { class: "list" }, Zt = /* @__PURE__ */ m({
|
|
528
533
|
__name: "List",
|
|
529
534
|
props: /* @__PURE__ */ Q({
|
|
530
535
|
selectable: { type: Boolean, default: !1 },
|
|
@@ -561,15 +566,15 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
561
566
|
s.value
|
|
562
567
|
);
|
|
563
568
|
t.multiple ? c.has(i) ? c.delete(i) : c.add(i) : c.has(i) ? c.clear() : (c.clear(), c.add(i)), s.value = c;
|
|
564
|
-
const
|
|
565
|
-
l.value = t.multiple ?
|
|
569
|
+
const y = [...c];
|
|
570
|
+
l.value = t.multiple ? y : y[0] ?? null;
|
|
566
571
|
}
|
|
567
572
|
return M("loba-list", {
|
|
568
573
|
selectable: t.selectable,
|
|
569
574
|
multiple: t.multiple,
|
|
570
575
|
isSelected: o,
|
|
571
576
|
toggleSelection: r
|
|
572
|
-
}), (i, c) => (n(), d("div",
|
|
577
|
+
}), (i, c) => (n(), d("div", Le, [
|
|
573
578
|
u(i.$slots, "default")
|
|
574
579
|
]));
|
|
575
580
|
}
|
|
@@ -643,13 +648,13 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
643
648
|
l.value
|
|
644
649
|
)
|
|
645
650
|
), r = b(() => {
|
|
646
|
-
const
|
|
651
|
+
const g = l.value, B = o.value, k = Math.max(
|
|
647
652
|
0,
|
|
648
653
|
t.siblingCount
|
|
649
654
|
);
|
|
650
|
-
if (
|
|
655
|
+
if (g <= 7)
|
|
651
656
|
return Array.from(
|
|
652
|
-
{ length:
|
|
657
|
+
{ length: g },
|
|
653
658
|
(F, ee) => ee + 1
|
|
654
659
|
);
|
|
655
660
|
const _ = Math.max(
|
|
@@ -657,20 +662,20 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
657
662
|
1
|
|
658
663
|
), w = Math.min(
|
|
659
664
|
B + k,
|
|
660
|
-
|
|
661
|
-
), v = _ > 2, C = w <
|
|
665
|
+
g
|
|
666
|
+
), v = _ > 2, C = w < g - 1, x = [1];
|
|
662
667
|
v && x.push("...");
|
|
663
|
-
const
|
|
664
|
-
for (let F =
|
|
668
|
+
const I = v ? _ : 2, P = C ? w : g - 1;
|
|
669
|
+
for (let F = I; F <= P; F++)
|
|
665
670
|
x.push(F);
|
|
666
|
-
return C && x.push("..."), x.push(
|
|
671
|
+
return C && x.push("..."), x.push(g), x;
|
|
667
672
|
}), i = b(() => ({
|
|
668
673
|
pagination: !0,
|
|
669
674
|
"pagination-compact": t.compact
|
|
670
675
|
}));
|
|
671
|
-
function c(
|
|
676
|
+
function c(g) {
|
|
672
677
|
const B = Math.min(
|
|
673
|
-
Math.max(
|
|
678
|
+
Math.max(g, 1),
|
|
674
679
|
l.value
|
|
675
680
|
);
|
|
676
681
|
B !== o.value && s(
|
|
@@ -678,7 +683,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
678
683
|
B
|
|
679
684
|
);
|
|
680
685
|
}
|
|
681
|
-
function
|
|
686
|
+
function y() {
|
|
682
687
|
c(o.value - 1);
|
|
683
688
|
}
|
|
684
689
|
function D() {
|
|
@@ -690,7 +695,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
690
695
|
function h() {
|
|
691
696
|
c(l.value);
|
|
692
697
|
}
|
|
693
|
-
return (
|
|
698
|
+
return (g, B) => (n(), d("nav", {
|
|
694
699
|
class: f(i.value),
|
|
695
700
|
"aria-label": "Pagination"
|
|
696
701
|
}, [
|
|
@@ -711,7 +716,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
711
716
|
type: "button",
|
|
712
717
|
disabled: o.value === 1,
|
|
713
718
|
"aria-label": "Previous page",
|
|
714
|
-
onClick:
|
|
719
|
+
onClick: y
|
|
715
720
|
}, " ‹ ", 10, ze)
|
|
716
721
|
]),
|
|
717
722
|
p("div", Ke, [
|
|
@@ -785,7 +790,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
785
790
|
);
|
|
786
791
|
return typeof w == "string" || typeof w == "number" ? w : t.rows.indexOf(_);
|
|
787
792
|
}
|
|
788
|
-
function
|
|
793
|
+
function y(_) {
|
|
789
794
|
return r.value.has(
|
|
790
795
|
c(_)
|
|
791
796
|
);
|
|
@@ -796,17 +801,17 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
796
801
|
const _ = l.value, w = o.value;
|
|
797
802
|
return [...t.rows].sort(
|
|
798
803
|
(v, C) => {
|
|
799
|
-
const x = i(v, _),
|
|
800
|
-
if (x ===
|
|
804
|
+
const x = i(v, _), I = i(C, _);
|
|
805
|
+
if (x === I)
|
|
801
806
|
return 0;
|
|
802
807
|
if (x == null)
|
|
803
808
|
return 1;
|
|
804
|
-
if (
|
|
809
|
+
if (I == null)
|
|
805
810
|
return -1;
|
|
806
|
-
if (typeof x == "number" && typeof
|
|
807
|
-
return w === "asc" ? x -
|
|
811
|
+
if (typeof x == "number" && typeof I == "number")
|
|
812
|
+
return w === "asc" ? x - I : I - x;
|
|
808
813
|
const P = String(x).localeCompare(
|
|
809
|
-
String(
|
|
814
|
+
String(I),
|
|
810
815
|
void 0,
|
|
811
816
|
{
|
|
812
817
|
numeric: !0,
|
|
@@ -836,7 +841,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
836
841
|
)
|
|
837
842
|
);
|
|
838
843
|
}
|
|
839
|
-
function
|
|
844
|
+
function g(_) {
|
|
840
845
|
return l.value !== _.key ? "" : o.value === "asc" ? "↑" : "↓";
|
|
841
846
|
}
|
|
842
847
|
function B(_) {
|
|
@@ -872,7 +877,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
872
877
|
]
|
|
873
878
|
}, [
|
|
874
879
|
p("span", null, S(v.label), 1),
|
|
875
|
-
a.sortable && v.sortable ? (n(), d("span", Ne, S(
|
|
880
|
+
a.sortable && v.sortable ? (n(), d("span", Ne, S(g(v)), 1)) : $("", !0)
|
|
876
881
|
], 46, He))), 128))
|
|
877
882
|
])
|
|
878
883
|
]),
|
|
@@ -880,7 +885,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
880
885
|
(n(!0), d(q, null, G(D.value, (v) => (n(), d("tr", {
|
|
881
886
|
key: c(v),
|
|
882
887
|
class: f({
|
|
883
|
-
"table-row--selected":
|
|
888
|
+
"table-row--selected": y(v)
|
|
884
889
|
}),
|
|
885
890
|
onClick: (C) => a.selectable && h(v)
|
|
886
891
|
}, [
|
|
@@ -1053,12 +1058,12 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1053
1058
|
function i(c) {
|
|
1054
1059
|
if (!t.disabled) {
|
|
1055
1060
|
if (t.multiple) {
|
|
1056
|
-
const
|
|
1061
|
+
const y = new Set(
|
|
1057
1062
|
o.value
|
|
1058
1063
|
);
|
|
1059
|
-
|
|
1064
|
+
y.has(c) ? y.delete(c) : y.add(c), s(
|
|
1060
1065
|
"update:modelValue",
|
|
1061
|
-
[...
|
|
1066
|
+
[...y]
|
|
1062
1067
|
);
|
|
1063
1068
|
return;
|
|
1064
1069
|
}
|
|
@@ -1076,7 +1081,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1076
1081
|
isSelected: r,
|
|
1077
1082
|
toggleChoice: i
|
|
1078
1083
|
}
|
|
1079
|
-
), (c,
|
|
1084
|
+
), (c, y) => (n(), d("div", {
|
|
1080
1085
|
class: f(l.value),
|
|
1081
1086
|
role: "group"
|
|
1082
1087
|
}, [
|
|
@@ -1109,7 +1114,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1109
1114
|
function i() {
|
|
1110
1115
|
o.value || s.toggleChoice(e.value);
|
|
1111
1116
|
}
|
|
1112
|
-
return (c,
|
|
1117
|
+
return (c, y) => (n(), d("button", {
|
|
1113
1118
|
type: "button",
|
|
1114
1119
|
class: f(r.value),
|
|
1115
1120
|
disabled: o.value,
|
|
@@ -1214,7 +1219,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1214
1219
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
1215
1220
|
onClick: r
|
|
1216
1221
|
}, {
|
|
1217
|
-
default:
|
|
1222
|
+
default: L(() => [
|
|
1218
1223
|
i.$slots.icon ? (n(), d("span", nt, [
|
|
1219
1224
|
u(i.$slots, "icon")
|
|
1220
1225
|
])) : $("", !0),
|
|
@@ -1387,7 +1392,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1387
1392
|
function c() {
|
|
1388
1393
|
t.closeOnBackdrop && i();
|
|
1389
1394
|
}
|
|
1390
|
-
function
|
|
1395
|
+
function y(h) {
|
|
1391
1396
|
if (!t.modelValue || !l.value)
|
|
1392
1397
|
return;
|
|
1393
1398
|
if (h.key === "Escape" && t.closeOnEscape) {
|
|
@@ -1396,16 +1401,16 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1396
1401
|
}
|
|
1397
1402
|
if (h.key !== "Tab")
|
|
1398
1403
|
return;
|
|
1399
|
-
const
|
|
1404
|
+
const g = Array.from(
|
|
1400
1405
|
l.value.querySelectorAll(
|
|
1401
1406
|
r
|
|
1402
1407
|
)
|
|
1403
1408
|
);
|
|
1404
|
-
if (
|
|
1409
|
+
if (g.length === 0) {
|
|
1405
1410
|
h.preventDefault();
|
|
1406
1411
|
return;
|
|
1407
1412
|
}
|
|
1408
|
-
const B =
|
|
1413
|
+
const B = g[0], k = g[g.length - 1];
|
|
1409
1414
|
if (h.shiftKey && document.activeElement === B) {
|
|
1410
1415
|
h.preventDefault(), k.focus();
|
|
1411
1416
|
return;
|
|
@@ -1428,14 +1433,14 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1428
1433
|
), J(() => {
|
|
1429
1434
|
t.modelValue && D(), document.addEventListener(
|
|
1430
1435
|
"keydown",
|
|
1431
|
-
|
|
1436
|
+
y
|
|
1432
1437
|
);
|
|
1433
1438
|
}), O(() => {
|
|
1434
1439
|
document.removeEventListener(
|
|
1435
1440
|
"keydown",
|
|
1436
|
-
|
|
1441
|
+
y
|
|
1437
1442
|
), E();
|
|
1438
|
-
}), (h,
|
|
1443
|
+
}), (h, g) => (n(), T(U, { to: "body" }, [
|
|
1439
1444
|
a.modelValue ? (n(), d("div", _t, [
|
|
1440
1445
|
p("button", {
|
|
1441
1446
|
class: "dialog-backdrop",
|
|
@@ -1456,7 +1461,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1456
1461
|
])) : $("", !0)
|
|
1457
1462
|
]));
|
|
1458
1463
|
}
|
|
1459
|
-
}),
|
|
1464
|
+
}), yt = { class: "drawer-content" }, va = /* @__PURE__ */ m({
|
|
1460
1465
|
__name: "Drawer",
|
|
1461
1466
|
props: {
|
|
1462
1467
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1482,7 +1487,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1482
1487
|
function c() {
|
|
1483
1488
|
t.closeOnBackdrop && i();
|
|
1484
1489
|
}
|
|
1485
|
-
function
|
|
1490
|
+
function y(h) {
|
|
1486
1491
|
if (!t.modelValue || !l.value)
|
|
1487
1492
|
return;
|
|
1488
1493
|
if (h.key === "Escape" && t.closeOnEscape) {
|
|
@@ -1491,16 +1496,16 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1491
1496
|
}
|
|
1492
1497
|
if (h.key !== "Tab")
|
|
1493
1498
|
return;
|
|
1494
|
-
const
|
|
1499
|
+
const g = Array.from(
|
|
1495
1500
|
l.value.querySelectorAll(
|
|
1496
1501
|
r
|
|
1497
1502
|
)
|
|
1498
1503
|
);
|
|
1499
|
-
if (
|
|
1504
|
+
if (g.length === 0) {
|
|
1500
1505
|
h.preventDefault();
|
|
1501
1506
|
return;
|
|
1502
1507
|
}
|
|
1503
|
-
const B =
|
|
1508
|
+
const B = g[0], k = g[g.length - 1];
|
|
1504
1509
|
if (h.shiftKey && document.activeElement === B) {
|
|
1505
1510
|
h.preventDefault(), k.focus();
|
|
1506
1511
|
return;
|
|
@@ -1523,14 +1528,14 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1523
1528
|
), J(() => {
|
|
1524
1529
|
document.addEventListener(
|
|
1525
1530
|
"keydown",
|
|
1526
|
-
|
|
1531
|
+
y
|
|
1527
1532
|
), t.modelValue && D();
|
|
1528
1533
|
}), O(() => {
|
|
1529
1534
|
document.removeEventListener(
|
|
1530
1535
|
"keydown",
|
|
1531
|
-
|
|
1536
|
+
y
|
|
1532
1537
|
), E();
|
|
1533
|
-
}), (h,
|
|
1538
|
+
}), (h, g) => (n(), T(U, { to: "body" }, [
|
|
1534
1539
|
a.modelValue ? (n(), d("div", {
|
|
1535
1540
|
key: 0,
|
|
1536
1541
|
class: f(["drawer", {
|
|
@@ -1554,14 +1559,14 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1554
1559
|
role: "dialog",
|
|
1555
1560
|
"aria-modal": "true"
|
|
1556
1561
|
}, [
|
|
1557
|
-
p("div",
|
|
1562
|
+
p("div", yt, [
|
|
1558
1563
|
u(h.$slots, "default")
|
|
1559
1564
|
])
|
|
1560
1565
|
], 512)
|
|
1561
1566
|
], 2)) : $("", !0)
|
|
1562
1567
|
]));
|
|
1563
1568
|
}
|
|
1564
|
-
}),
|
|
1569
|
+
}), gt = {
|
|
1565
1570
|
key: 0,
|
|
1566
1571
|
class: "popover-content",
|
|
1567
1572
|
role: "dialog"
|
|
@@ -1581,8 +1586,8 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1581
1586
|
function r(c) {
|
|
1582
1587
|
if (!s.value)
|
|
1583
1588
|
return;
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1589
|
+
const y = c.target;
|
|
1590
|
+
y instanceof Node && !s.value.contains(y) && o();
|
|
1586
1591
|
}
|
|
1587
1592
|
function i(c) {
|
|
1588
1593
|
c.key === "Escape" && o();
|
|
@@ -1603,7 +1608,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1603
1608
|
"keydown",
|
|
1604
1609
|
i
|
|
1605
1610
|
);
|
|
1606
|
-
}), (c,
|
|
1611
|
+
}), (c, y) => (n(), d("div", {
|
|
1607
1612
|
ref_key: "popover",
|
|
1608
1613
|
ref: s,
|
|
1609
1614
|
class: f(["popover", {
|
|
@@ -1617,7 +1622,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1617
1622
|
}, [
|
|
1618
1623
|
u(c.$slots, "trigger")
|
|
1619
1624
|
]),
|
|
1620
|
-
t.value ? (n(), d("div",
|
|
1625
|
+
t.value ? (n(), d("div", gt, [
|
|
1621
1626
|
u(c.$slots, "default")
|
|
1622
1627
|
])) : $("", !0)
|
|
1623
1628
|
], 2));
|
|
@@ -1664,7 +1669,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1664
1669
|
}), wt = { class: "alert-content" }, Ct = {
|
|
1665
1670
|
key: 0,
|
|
1666
1671
|
class: "alert-actions"
|
|
1667
|
-
},
|
|
1672
|
+
}, ya = /* @__PURE__ */ m({
|
|
1668
1673
|
__name: "Alert",
|
|
1669
1674
|
props: {
|
|
1670
1675
|
variant: { default: "info" },
|
|
@@ -1701,7 +1706,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1701
1706
|
}), Bt = ["aria-valuemin", "aria-valuemax", "aria-valuenow"], xt = { class: "progress-track" }, Vt = {
|
|
1702
1707
|
key: 0,
|
|
1703
1708
|
class: "progress-label"
|
|
1704
|
-
},
|
|
1709
|
+
}, ga = /* @__PURE__ */ m({
|
|
1705
1710
|
__name: "Progress",
|
|
1706
1711
|
props: {
|
|
1707
1712
|
value: { default: 0 },
|
|
@@ -1802,15 +1807,15 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1802
1807
|
}
|
|
1803
1808
|
return K(
|
|
1804
1809
|
() => t.modelValue,
|
|
1805
|
-
(
|
|
1806
|
-
l.value =
|
|
1810
|
+
(y) => {
|
|
1811
|
+
l.value = y, y ? c() : r();
|
|
1807
1812
|
},
|
|
1808
1813
|
{
|
|
1809
1814
|
immediate: !0
|
|
1810
1815
|
}
|
|
1811
1816
|
), O(() => {
|
|
1812
1817
|
r();
|
|
1813
|
-
}), (
|
|
1818
|
+
}), (y, D) => (n(), T(U, { to: "body" }, [
|
|
1814
1819
|
l.value ? (n(), d("div", {
|
|
1815
1820
|
key: 0,
|
|
1816
1821
|
class: f(["toast", {
|
|
@@ -1823,7 +1828,7 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1823
1828
|
p("div", St, [
|
|
1824
1829
|
a.title ? (n(), d("div", Et, S(a.title), 1)) : $("", !0),
|
|
1825
1830
|
p("div", Tt, [
|
|
1826
|
-
u(
|
|
1831
|
+
u(y.$slots, "default")
|
|
1827
1832
|
])
|
|
1828
1833
|
]),
|
|
1829
1834
|
a.dismissible ? (n(), d("button", {
|
|
@@ -1840,13 +1845,13 @@ const Qt = /* @__PURE__ */ H(Ve, [["render", Ee]]), Xt = /* @__PURE__ */ m({
|
|
|
1840
1845
|
export {
|
|
1841
1846
|
Jt as Accordion,
|
|
1842
1847
|
Ut as AccordionItem,
|
|
1843
|
-
|
|
1848
|
+
ya as Alert,
|
|
1844
1849
|
Xt as Badge,
|
|
1845
1850
|
fa as Breadcrumb,
|
|
1846
1851
|
ma as Breadcrumbs,
|
|
1847
|
-
|
|
1852
|
+
It as Button,
|
|
1848
1853
|
Rt as ButtonGroup,
|
|
1849
|
-
|
|
1854
|
+
Lt as Card,
|
|
1850
1855
|
sa as Checkbox,
|
|
1851
1856
|
ia as Choice,
|
|
1852
1857
|
na as ChoiceGroup,
|
|
@@ -1861,12 +1866,12 @@ export {
|
|
|
1861
1866
|
Ot as Heading,
|
|
1862
1867
|
jt as Image,
|
|
1863
1868
|
qt as Input,
|
|
1864
|
-
|
|
1869
|
+
ye as Label,
|
|
1865
1870
|
Zt as List,
|
|
1866
1871
|
ea as ListItem,
|
|
1867
1872
|
ta as Pagination,
|
|
1868
1873
|
ha as Popover,
|
|
1869
|
-
|
|
1874
|
+
ga as Progress,
|
|
1870
1875
|
la as Radio,
|
|
1871
1876
|
At as Section,
|
|
1872
1877
|
Ft as SectionHeader,
|
package/package.json
CHANGED
|
File without changes
|
package/src/forms/Input.vue
CHANGED
|
@@ -3,7 +3,7 @@ import { computed } from "vue";
|
|
|
3
3
|
import type { InputType } from "@paraxe/core";
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
type
|
|
6
|
+
type?: InputType;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
modelValue?: string;
|
|
9
9
|
required?: boolean;
|
|
@@ -32,23 +32,24 @@ const inputClasses = computed(() => ({
|
|
|
32
32
|
"input-error": props.error,
|
|
33
33
|
"input-success": props.success,
|
|
34
34
|
}));
|
|
35
|
+
|
|
36
|
+
function handleInput(event: Event): void {
|
|
37
|
+
emit(
|
|
38
|
+
"update:modelValue",
|
|
39
|
+
(event.target as HTMLInputElement).value,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
35
42
|
</script>
|
|
36
43
|
|
|
37
44
|
<template>
|
|
38
45
|
<input
|
|
39
|
-
class="input"
|
|
40
|
-
:class="inputClasses"
|
|
46
|
+
:class="['input', inputClasses]"
|
|
41
47
|
:type="props.type"
|
|
42
48
|
:placeholder="props.placeholder"
|
|
43
49
|
:value="props.modelValue"
|
|
44
50
|
:required="props.required"
|
|
45
51
|
:disabled="props.disabled"
|
|
46
52
|
:readonly="props.readonly"
|
|
47
|
-
@input="
|
|
48
|
-
emit(
|
|
49
|
-
'update:modelValue',
|
|
50
|
-
($event.target as HTMLInputElement).value,
|
|
51
|
-
)
|
|
52
|
-
"
|
|
53
|
+
@input="handleInput"
|
|
53
54
|
/>
|
|
54
55
|
</template>
|