iryx-ui 0.24.0 → 0.25.0
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/AvatarGroup.vue.d.ts +8 -2
- package/dist/components/AvatarGroup.vue_vue_type_script_setup_true_lang.js +57 -23
- package/dist/components/Breadcrumb.vue.d.ts +10 -2
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +66 -34
- package/dist/components/ConfirmPopover.vue.d.ts +1 -1
- package/dist/components/FileUpload.vue.d.ts +23 -1
- package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +139 -96
- package/dist/components/Input.vue.d.ts +14 -0
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +86 -69
- package/dist/components/SignaturePad.vue.d.ts +1 -1
- package/dist/components/Textarea.vue.d.ts +14 -0
- package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +90 -42
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +42 -41
- package/dist/components/index.js +144 -144
- package/dist/composables/character-count.d.ts +6 -0
- package/dist/composables/character-count.js +18 -0
- package/dist/composables/toast.d.ts +16 -1
- package/dist/composables/toast.js +23 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +154 -154
- package/dist/theme/avatar.d.ts +21 -0
- package/dist/theme/avatar.js +28 -21
- package/dist/theme/bar-chart.d.ts +3 -3
- package/dist/theme/calendar.js +1 -1
- package/dist/theme/code.js +1 -1
- package/dist/theme/donut-chart.d.ts +3 -3
- package/dist/theme/file-upload.d.ts +24 -0
- package/dist/theme/file-upload.js +6 -2
- package/dist/theme/input.d.ts +46 -0
- package/dist/theme/input.js +10 -2
- package/dist/theme/kbd.js +1 -1
- package/dist/theme/line-chart.d.ts +3 -3
- package/dist/theme/rating.js +1 -1
- package/dist/theme/table.js +1 -1
- package/dist/theme/toast.d.ts +9 -0
- package/dist/theme/toast.js +2 -1
- package/package.json +1 -1
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { useFormField as t } from "../composables/form.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { textareaCountTheme as n, textareaTheme as r } from "../theme/input.js";
|
|
4
|
+
import { defaultCountLabel as i, useCharacterCount as a } from "../composables/character-count.js";
|
|
5
|
+
import { computed as o, createElementBlock as s, createElementVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, onMounted as m, openBlock as h, ref as g, toDisplayString as _, unref as v, useModel as y, vModelText as b, watch as x, withDirectives as S } from "vue";
|
|
5
6
|
//#region src/components/Textarea.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var C = [
|
|
7
8
|
"id",
|
|
8
9
|
"rows",
|
|
10
|
+
"maxlength",
|
|
9
11
|
"placeholder",
|
|
10
12
|
"disabled",
|
|
11
13
|
"required",
|
|
12
14
|
"aria-invalid",
|
|
13
15
|
"aria-describedby"
|
|
14
|
-
],
|
|
16
|
+
], w = {
|
|
17
|
+
class: "sr-only",
|
|
18
|
+
"aria-live": "polite"
|
|
19
|
+
}, T = [
|
|
20
|
+
"id",
|
|
21
|
+
"rows",
|
|
22
|
+
"maxlength",
|
|
23
|
+
"placeholder",
|
|
24
|
+
"disabled",
|
|
25
|
+
"required",
|
|
26
|
+
"aria-invalid",
|
|
27
|
+
"aria-describedby"
|
|
28
|
+
], E = /*@__PURE__*/ l({
|
|
29
|
+
inheritAttrs: !1,
|
|
15
30
|
__name: "Textarea",
|
|
16
|
-
props: /*@__PURE__*/
|
|
31
|
+
props: /*@__PURE__*/ u({
|
|
17
32
|
size: {},
|
|
18
33
|
rows: {},
|
|
19
34
|
autosize: { type: [Boolean, Object] },
|
|
@@ -24,6 +39,12 @@ var _ = [
|
|
|
24
39
|
type: Boolean,
|
|
25
40
|
default: void 0
|
|
26
41
|
},
|
|
42
|
+
maxlength: {},
|
|
43
|
+
showCount: { type: Boolean },
|
|
44
|
+
countLabel: {
|
|
45
|
+
type: Function,
|
|
46
|
+
default: i
|
|
47
|
+
},
|
|
27
48
|
id: {},
|
|
28
49
|
unstyled: {
|
|
29
50
|
type: Boolean,
|
|
@@ -40,51 +61,78 @@ var _ = [
|
|
|
40
61
|
modelModifiers: {}
|
|
41
62
|
}),
|
|
42
63
|
emits: ["update:modelValue"],
|
|
43
|
-
setup(
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
size:
|
|
48
|
-
invalid:
|
|
49
|
-
autosize: !!
|
|
50
|
-
class:
|
|
51
|
-
})), E =
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
function
|
|
64
|
+
setup(i, { expose: l }) {
|
|
65
|
+
let u = i, E = y(i, "modelValue"), D = t(), O = o(() => u.id ?? D?.id.value);
|
|
66
|
+
D && u.id && (D.id.value = u.id);
|
|
67
|
+
let k = o(() => u.invalid ?? D?.invalid.value ?? !1), A = e(), j = o(() => u.unstyled ?? A.unstyled), M = o(() => j.value ? u.class : r({
|
|
68
|
+
size: u.size,
|
|
69
|
+
invalid: k.value,
|
|
70
|
+
autosize: !!u.autosize,
|
|
71
|
+
class: u.showCount ? void 0 : u.class
|
|
72
|
+
})), { remaining: N, nearLimit: P, text: F } = a(() => E.value, () => u.maxlength), I = o(() => n({ nearLimit: P.value })), L = o(() => j.value ? u.class : I.value.root({ class: u.class })), R = o(() => j.value ? void 0 : I.value.count()), z = g();
|
|
73
|
+
l({ textarea: z });
|
|
74
|
+
let B = o(() => typeof u.autosize == "object" ? u.autosize : {});
|
|
75
|
+
function V(e) {
|
|
55
76
|
return Number.parseFloat(e) || 0;
|
|
56
77
|
}
|
|
57
|
-
function
|
|
58
|
-
let e =
|
|
59
|
-
if (!e || !
|
|
78
|
+
function H() {
|
|
79
|
+
let e = z.value;
|
|
80
|
+
if (!e || !u.autosize) return;
|
|
60
81
|
e.style.height = "auto";
|
|
61
|
-
let t = window.getComputedStyle(e), n =
|
|
82
|
+
let t = window.getComputedStyle(e), n = V(t.lineHeight), r = V(t.paddingTop) + V(t.paddingBottom), i = V(t.borderTopWidth) + V(t.borderBottomWidth), a = e.scrollHeight;
|
|
62
83
|
if (n) {
|
|
63
|
-
let { min: e, max: t } =
|
|
84
|
+
let { min: e, max: t } = B.value;
|
|
64
85
|
e != null && (a = Math.max(a, e * n + r)), t != null && (a = Math.min(a, t * n + r));
|
|
65
86
|
}
|
|
66
|
-
e.style.height = `${a + i}px`, e.style.overflowY =
|
|
87
|
+
e.style.height = `${a + i}px`, e.style.overflowY = B.value.max != null && e.scrollHeight > a ? "auto" : "hidden";
|
|
67
88
|
}
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
], () => void
|
|
75
|
-
|
|
89
|
+
return m(() => {
|
|
90
|
+
u.autosize && f(H);
|
|
91
|
+
}), x(() => [
|
|
92
|
+
E.value,
|
|
93
|
+
u.autosize,
|
|
94
|
+
u.size
|
|
95
|
+
], () => void f(H)), (e, t) => u.showCount ? (h(), s("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: p(L.value)
|
|
98
|
+
}, [
|
|
99
|
+
S(c("textarea", d({
|
|
100
|
+
id: O.value,
|
|
101
|
+
ref_key: "el",
|
|
102
|
+
ref: z
|
|
103
|
+
}, e.$attrs, {
|
|
104
|
+
"onUpdate:modelValue": t[0] ||= (e) => E.value = e,
|
|
105
|
+
rows: u.autosize ? B.value.min : u.rows,
|
|
106
|
+
maxlength: u.maxlength,
|
|
107
|
+
placeholder: u.placeholder,
|
|
108
|
+
disabled: u.disabled,
|
|
109
|
+
required: u.required,
|
|
110
|
+
"aria-invalid": k.value || void 0,
|
|
111
|
+
"aria-describedby": v(D)?.describedBy.value,
|
|
112
|
+
class: M.value
|
|
113
|
+
}), null, 16, C), [[b, E.value]]),
|
|
114
|
+
c("span", {
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
class: p(R.value)
|
|
117
|
+
}, _(v(F)), 3),
|
|
118
|
+
c("span", w, _(v(P) ? u.countLabel(v(N)) : ""), 1)
|
|
119
|
+
], 2)) : S((h(), s("textarea", d({
|
|
120
|
+
key: 1,
|
|
121
|
+
id: O.value,
|
|
76
122
|
ref_key: "el",
|
|
77
|
-
ref:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
123
|
+
ref: z
|
|
124
|
+
}, e.$attrs, {
|
|
125
|
+
"onUpdate:modelValue": t[1] ||= (e) => E.value = e,
|
|
126
|
+
rows: u.autosize ? B.value.min : u.rows,
|
|
127
|
+
maxlength: u.maxlength,
|
|
128
|
+
placeholder: u.placeholder,
|
|
129
|
+
disabled: u.disabled,
|
|
130
|
+
required: u.required,
|
|
131
|
+
"aria-invalid": k.value || void 0,
|
|
132
|
+
"aria-describedby": v(D)?.describedBy.value,
|
|
133
|
+
class: M.value
|
|
134
|
+
}), null, 16, T)), [[b, E.value]]);
|
|
87
135
|
}
|
|
88
136
|
});
|
|
89
137
|
//#endregion
|
|
90
|
-
export {
|
|
138
|
+
export { E as default };
|
|
@@ -3,10 +3,10 @@ import t from "./Icon.js";
|
|
|
3
3
|
import { useToast as n, useToastState as r } from "../composables/toast.js";
|
|
4
4
|
import { toastTheme as i } from "../theme/toast.js";
|
|
5
5
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, renderList as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
|
-
import { Alert02Icon as b, AlertCircleIcon as x, Cancel01Icon as S, CheckmarkCircle02Icon as C, InformationCircleIcon as w } from "@hugeicons/core-free-icons";
|
|
7
|
-
import { ToastAction as
|
|
6
|
+
import { Alert02Icon as b, AlertCircleIcon as x, Cancel01Icon as S, CheckmarkCircle02Icon as C, InformationCircleIcon as w, Loading03Icon as T } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { ToastAction as E, ToastClose as D, ToastDescription as O, ToastPortal as k, ToastProvider as A, ToastRoot as j, ToastTitle as M, ToastViewport as N } from "reka-ui";
|
|
8
8
|
//#region src/components/Toaster.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var P = /*@__PURE__*/ p({
|
|
10
10
|
__name: "Toaster",
|
|
11
11
|
props: {
|
|
12
12
|
position: {},
|
|
@@ -25,68 +25,69 @@ var N = /*@__PURE__*/ p({
|
|
|
25
25
|
ui: {}
|
|
26
26
|
},
|
|
27
27
|
setup(p) {
|
|
28
|
-
let
|
|
28
|
+
let P = p, F = r(), { dismiss: I } = n(), L = {
|
|
29
29
|
success: C,
|
|
30
30
|
warning: b,
|
|
31
31
|
danger: x,
|
|
32
|
-
info: w
|
|
32
|
+
info: w,
|
|
33
|
+
loading: T
|
|
33
34
|
};
|
|
34
|
-
function L(e) {
|
|
35
|
-
return e.variant && e.variant !== "neutral" ? I[e.variant] : void 0;
|
|
36
|
-
}
|
|
37
35
|
function R(e) {
|
|
38
|
-
|
|
36
|
+
return e.variant && e.variant !== "neutral" ? L[e.variant] : void 0;
|
|
37
|
+
}
|
|
38
|
+
function z(e) {
|
|
39
|
+
let t = e.duration ?? P.duration;
|
|
39
40
|
return t === 0 ? Infinity : t;
|
|
40
41
|
}
|
|
41
|
-
let
|
|
42
|
-
function
|
|
42
|
+
let B = e(), V = o(() => P.unstyled ?? B.unstyled);
|
|
43
|
+
function H(e) {
|
|
43
44
|
return i({
|
|
44
45
|
variant: e.variant,
|
|
45
|
-
position:
|
|
46
|
+
position: P.position,
|
|
46
47
|
withTitle: !!e.title
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
let
|
|
50
|
-
let e = i({ position:
|
|
51
|
-
return
|
|
50
|
+
let U = o(() => {
|
|
51
|
+
let e = i({ position: P.position });
|
|
52
|
+
return V.value ? [P.ui?.viewport, P.class] : e.viewport({ class: [P.ui?.viewport, P.class] });
|
|
52
53
|
});
|
|
53
|
-
function
|
|
54
|
-
let n =
|
|
55
|
-
return
|
|
54
|
+
function W(e, t) {
|
|
55
|
+
let n = P.ui?.[t];
|
|
56
|
+
return V.value ? n : H(e)[t]({ class: n });
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
e.action?.onClick(),
|
|
58
|
+
function G(e) {
|
|
59
|
+
e.action?.onClick(), I(e.id);
|
|
59
60
|
}
|
|
60
|
-
return (e, n) => (h(), s(v(
|
|
61
|
-
default: y(() => [(h(!0), l(a, null, g(v(
|
|
61
|
+
return (e, n) => (h(), s(v(A), null, {
|
|
62
|
+
default: y(() => [(h(!0), l(a, null, g(v(F), (e) => (h(), s(v(j), {
|
|
62
63
|
key: e.id,
|
|
63
|
-
duration:
|
|
64
|
-
class: m(
|
|
65
|
-
"onUpdate:open": (t) => !t && v(
|
|
64
|
+
duration: z(e),
|
|
65
|
+
class: m(W(e, "root")),
|
|
66
|
+
"onUpdate:open": (t) => !t && v(I)(e.id)
|
|
66
67
|
}, {
|
|
67
68
|
default: y(() => [
|
|
68
|
-
|
|
69
|
+
R(e) ? (h(), l("div", {
|
|
69
70
|
key: 0,
|
|
70
|
-
class: m(
|
|
71
|
-
}, [f(t, { icon:
|
|
72
|
-
u("div", { class: m(
|
|
71
|
+
class: m(W(e, "icon"))
|
|
72
|
+
}, [f(t, { icon: R(e) }, null, 8, ["icon"])], 2)) : c("", !0),
|
|
73
|
+
u("div", { class: m(W(e, "content")) }, [e.title ? (h(), s(v(M), {
|
|
73
74
|
key: 0,
|
|
74
|
-
class: m(
|
|
75
|
+
class: m(W(e, "title"))
|
|
75
76
|
}, {
|
|
76
77
|
default: y(() => [d(_(e.title), 1)]),
|
|
77
78
|
_: 2
|
|
78
|
-
}, 1032, ["class"])) : c("", !0), e.description ? (h(), s(v(
|
|
79
|
+
}, 1032, ["class"])) : c("", !0), e.description ? (h(), s(v(O), {
|
|
79
80
|
key: 1,
|
|
80
|
-
class: m(
|
|
81
|
+
class: m(W(e, "description"))
|
|
81
82
|
}, {
|
|
82
83
|
default: y(() => [d(_(e.description), 1)]),
|
|
83
84
|
_: 2
|
|
84
85
|
}, 1032, ["class"])) : c("", !0)], 2),
|
|
85
|
-
e.action ? (h(), s(v(
|
|
86
|
+
e.action ? (h(), s(v(E), {
|
|
86
87
|
key: 1,
|
|
87
88
|
"alt-text": e.action.label,
|
|
88
|
-
class: m(
|
|
89
|
-
onClick: (t) =>
|
|
89
|
+
class: m(W(e, "action")),
|
|
90
|
+
onClick: (t) => G(e)
|
|
90
91
|
}, {
|
|
91
92
|
default: y(() => [d(_(e.action.label), 1)]),
|
|
92
93
|
_: 2
|
|
@@ -95,9 +96,9 @@ var N = /*@__PURE__*/ p({
|
|
|
95
96
|
"class",
|
|
96
97
|
"onClick"
|
|
97
98
|
])) : c("", !0),
|
|
98
|
-
f(v(
|
|
99
|
-
"aria-label":
|
|
100
|
-
class: m(
|
|
99
|
+
f(v(D), {
|
|
100
|
+
"aria-label": P.closeLabel,
|
|
101
|
+
class: m(W(e, "close"))
|
|
101
102
|
}, {
|
|
102
103
|
default: y(() => [f(t, { icon: v(S) }, null, 8, ["icon"])]),
|
|
103
104
|
_: 1
|
|
@@ -108,8 +109,8 @@ var N = /*@__PURE__*/ p({
|
|
|
108
109
|
"duration",
|
|
109
110
|
"class",
|
|
110
111
|
"onUpdate:open"
|
|
111
|
-
]))), 128)), f(v(
|
|
112
|
-
default: y(() => [f(v(
|
|
112
|
+
]))), 128)), f(v(k), null, {
|
|
113
|
+
default: y(() => [f(v(N), { class: m(U.value) }, null, 8, ["class"])]),
|
|
113
114
|
_: 1
|
|
114
115
|
})]),
|
|
115
116
|
_: 1
|
|
@@ -117,4 +118,4 @@ var N = /*@__PURE__*/ p({
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
//#endregion
|
|
120
|
-
export {
|
|
121
|
+
export { P as default };
|
package/dist/components/index.js
CHANGED
|
@@ -9,78 +9,78 @@ import s from "./AspectRatio.js";
|
|
|
9
9
|
import c from "./Button.js";
|
|
10
10
|
import l from "./AuthProviders.js";
|
|
11
11
|
import u from "./Avatar.js";
|
|
12
|
-
import d from "./
|
|
13
|
-
import f from "./
|
|
14
|
-
import p from "./
|
|
15
|
-
import m from "./
|
|
16
|
-
import h from "./
|
|
17
|
-
import g from "./
|
|
18
|
-
import _ from "./
|
|
19
|
-
import v from "./
|
|
20
|
-
import y from "./
|
|
21
|
-
import b from "./
|
|
22
|
-
import x from "./
|
|
23
|
-
import S from "./
|
|
24
|
-
import C from "./
|
|
25
|
-
import w from "./
|
|
26
|
-
import T from "./
|
|
27
|
-
import E from "./
|
|
28
|
-
import D from "./
|
|
29
|
-
import O from "./
|
|
30
|
-
import k from "./
|
|
31
|
-
import A from "./
|
|
32
|
-
import j from "./
|
|
33
|
-
import M from "./
|
|
34
|
-
import N from "./
|
|
35
|
-
import P from "./
|
|
36
|
-
import F from "./
|
|
37
|
-
import I from "./
|
|
38
|
-
import L from "./
|
|
39
|
-
import R from "./
|
|
40
|
-
import z from "./
|
|
41
|
-
import B from "./
|
|
42
|
-
import V from "./
|
|
43
|
-
import H from "./
|
|
44
|
-
import U from "./
|
|
45
|
-
import W from "./
|
|
46
|
-
import G from "./
|
|
47
|
-
import K from "./
|
|
48
|
-
import q from "./
|
|
49
|
-
import J from "./
|
|
50
|
-
import Y from "./
|
|
51
|
-
import X from "./
|
|
52
|
-
import Z from "./
|
|
53
|
-
import Q from "./
|
|
54
|
-
import $ from "./
|
|
55
|
-
import ee from "./
|
|
56
|
-
import te from "./
|
|
57
|
-
import ne from "./
|
|
58
|
-
import re from "./
|
|
59
|
-
import ie from "./
|
|
60
|
-
import ae from "./
|
|
61
|
-
import oe from "./
|
|
62
|
-
import se from "./
|
|
63
|
-
import ce from "./
|
|
64
|
-
import le from "./
|
|
65
|
-
import ue from "./
|
|
66
|
-
import de from "./
|
|
67
|
-
import fe from "./
|
|
68
|
-
import pe from "./
|
|
69
|
-
import me from "./
|
|
70
|
-
import he from "./
|
|
71
|
-
import ge from "./
|
|
72
|
-
import _e from "./
|
|
73
|
-
import ve from "./
|
|
74
|
-
import ye from "./
|
|
75
|
-
import be from "./
|
|
76
|
-
import xe from "./
|
|
77
|
-
import Se from "./
|
|
78
|
-
import Ce from "./
|
|
79
|
-
import we from "./
|
|
80
|
-
import Te from "./
|
|
81
|
-
import Ee from "./
|
|
82
|
-
import De from "./
|
|
83
|
-
import Oe from "./
|
|
12
|
+
import d from "./Tooltip.js";
|
|
13
|
+
import f from "./AvatarGroup.js";
|
|
14
|
+
import p from "./Badge.js";
|
|
15
|
+
import m from "./Banner.js";
|
|
16
|
+
import h from "./ChartLegend.js";
|
|
17
|
+
import g from "./BarChart.js";
|
|
18
|
+
import _ from "./DropdownMenu.js";
|
|
19
|
+
import v from "./Breadcrumb.js";
|
|
20
|
+
import y from "./ButtonGroup.js";
|
|
21
|
+
import b from "./Calendar.js";
|
|
22
|
+
import x from "./Card.js";
|
|
23
|
+
import S from "./Carousel.js";
|
|
24
|
+
import C from "./Checkbox.js";
|
|
25
|
+
import w from "./Code.js";
|
|
26
|
+
import T from "./Collapsible.js";
|
|
27
|
+
import E from "./ColorPicker.js";
|
|
28
|
+
import D from "./Combobox.js";
|
|
29
|
+
import O from "./Kbd.js";
|
|
30
|
+
import k from "./CommandPalette.js";
|
|
31
|
+
import A from "./Dialog.js";
|
|
32
|
+
import j from "./ConfirmDialog.js";
|
|
33
|
+
import M from "./Popover.js";
|
|
34
|
+
import N from "./ConfirmPopover.js";
|
|
35
|
+
import P from "./Container.js";
|
|
36
|
+
import F from "./ContextMenu.js";
|
|
37
|
+
import I from "./DateField.js";
|
|
38
|
+
import L from "./DatePicker.js";
|
|
39
|
+
import R from "./DateRangePicker.js";
|
|
40
|
+
import z from "./DescriptionList.js";
|
|
41
|
+
import B from "./DonutChart.js";
|
|
42
|
+
import V from "./Editable.js";
|
|
43
|
+
import H from "./EmptyState.js";
|
|
44
|
+
import U from "./Progress.js";
|
|
45
|
+
import W from "./FileUpload.js";
|
|
46
|
+
import G from "./Form.js";
|
|
47
|
+
import K from "./Label.js";
|
|
48
|
+
import q from "./FormField.js";
|
|
49
|
+
import J from "./HoverCard.js";
|
|
50
|
+
import Y from "./Input.js";
|
|
51
|
+
import X from "./LineChart.js";
|
|
52
|
+
import Z from "./Menubar.js";
|
|
53
|
+
import Q from "./NavigationMenu.js";
|
|
54
|
+
import $ from "./NumberInput.js";
|
|
55
|
+
import ee from "./PageHeader.js";
|
|
56
|
+
import te from "./Pagination.js";
|
|
57
|
+
import ne from "./PasswordInput.js";
|
|
58
|
+
import re from "./PinInput.js";
|
|
59
|
+
import ie from "./RadioGroup.js";
|
|
60
|
+
import ae from "./Rating.js";
|
|
61
|
+
import oe from "./ScrollArea.js";
|
|
62
|
+
import se from "./ScrollFade.js";
|
|
63
|
+
import ce from "./Select.js";
|
|
64
|
+
import le from "./Separator.js";
|
|
65
|
+
import ue from "./Sidebar.js";
|
|
66
|
+
import de from "./SignaturePad.js";
|
|
67
|
+
import fe from "./Skeleton.js";
|
|
68
|
+
import pe from "./Slider.js";
|
|
69
|
+
import me from "./Sparkline.js";
|
|
70
|
+
import he from "./Splitter.js";
|
|
71
|
+
import ge from "./Stat.js";
|
|
72
|
+
import _e from "./Stepper.js";
|
|
73
|
+
import ve from "./Switch.js";
|
|
74
|
+
import ye from "./Table.js";
|
|
75
|
+
import be from "./Tabs.js";
|
|
76
|
+
import xe from "./TagsInput.js";
|
|
77
|
+
import Se from "./Textarea.js";
|
|
78
|
+
import Ce from "./TimeField.js";
|
|
79
|
+
import we from "./Timeline.js";
|
|
80
|
+
import Te from "./Toaster.js";
|
|
81
|
+
import Ee from "./Toggle.js";
|
|
82
|
+
import De from "./ToggleGroup.js";
|
|
83
|
+
import Oe from "./Toolbar.js";
|
|
84
84
|
import ke from "./Tree.js";
|
|
85
85
|
//#region src/components/index.ts
|
|
86
86
|
var Ae = /* @__PURE__ */ e({
|
|
@@ -91,81 +91,81 @@ var Ae = /* @__PURE__ */ e({
|
|
|
91
91
|
AspectRatio: () => s,
|
|
92
92
|
AuthProviders: () => l,
|
|
93
93
|
Avatar: () => u,
|
|
94
|
-
AvatarGroup: () =>
|
|
95
|
-
Badge: () =>
|
|
96
|
-
Banner: () =>
|
|
97
|
-
BarChart: () =>
|
|
98
|
-
Breadcrumb: () =>
|
|
94
|
+
AvatarGroup: () => f,
|
|
95
|
+
Badge: () => p,
|
|
96
|
+
Banner: () => m,
|
|
97
|
+
BarChart: () => g,
|
|
98
|
+
Breadcrumb: () => v,
|
|
99
99
|
Button: () => c,
|
|
100
|
-
ButtonGroup: () =>
|
|
101
|
-
Calendar: () =>
|
|
102
|
-
Card: () =>
|
|
103
|
-
Carousel: () =>
|
|
104
|
-
ChartLegend: () =>
|
|
105
|
-
Checkbox: () =>
|
|
106
|
-
Code: () =>
|
|
107
|
-
Collapsible: () =>
|
|
108
|
-
ColorPicker: () =>
|
|
109
|
-
Combobox: () =>
|
|
110
|
-
CommandPalette: () =>
|
|
111
|
-
ConfirmDialog: () =>
|
|
112
|
-
ConfirmPopover: () =>
|
|
113
|
-
Container: () =>
|
|
114
|
-
ContextMenu: () =>
|
|
115
|
-
DateField: () =>
|
|
116
|
-
DatePicker: () =>
|
|
117
|
-
DateRangePicker: () =>
|
|
118
|
-
DescriptionList: () =>
|
|
119
|
-
Dialog: () =>
|
|
120
|
-
DonutChart: () =>
|
|
100
|
+
ButtonGroup: () => y,
|
|
101
|
+
Calendar: () => b,
|
|
102
|
+
Card: () => x,
|
|
103
|
+
Carousel: () => S,
|
|
104
|
+
ChartLegend: () => h,
|
|
105
|
+
Checkbox: () => C,
|
|
106
|
+
Code: () => w,
|
|
107
|
+
Collapsible: () => T,
|
|
108
|
+
ColorPicker: () => E,
|
|
109
|
+
Combobox: () => D,
|
|
110
|
+
CommandPalette: () => k,
|
|
111
|
+
ConfirmDialog: () => j,
|
|
112
|
+
ConfirmPopover: () => N,
|
|
113
|
+
Container: () => P,
|
|
114
|
+
ContextMenu: () => F,
|
|
115
|
+
DateField: () => I,
|
|
116
|
+
DatePicker: () => L,
|
|
117
|
+
DateRangePicker: () => R,
|
|
118
|
+
DescriptionList: () => z,
|
|
119
|
+
Dialog: () => A,
|
|
120
|
+
DonutChart: () => B,
|
|
121
121
|
Drawer: () => a,
|
|
122
|
-
DropdownMenu: () =>
|
|
123
|
-
Editable: () =>
|
|
124
|
-
EmptyState: () =>
|
|
125
|
-
FileUpload: () =>
|
|
126
|
-
Form: () =>
|
|
127
|
-
FormField: () =>
|
|
128
|
-
HoverCard: () =>
|
|
122
|
+
DropdownMenu: () => _,
|
|
123
|
+
Editable: () => V,
|
|
124
|
+
EmptyState: () => H,
|
|
125
|
+
FileUpload: () => W,
|
|
126
|
+
Form: () => G,
|
|
127
|
+
FormField: () => q,
|
|
128
|
+
HoverCard: () => J,
|
|
129
129
|
Icon: () => t,
|
|
130
|
-
Input: () =>
|
|
131
|
-
Kbd: () =>
|
|
132
|
-
Label: () =>
|
|
133
|
-
LineChart: () =>
|
|
134
|
-
Menubar: () =>
|
|
135
|
-
NavigationMenu: () =>
|
|
136
|
-
NumberInput: () =>
|
|
137
|
-
PageHeader: () =>
|
|
138
|
-
Pagination: () =>
|
|
139
|
-
PasswordInput: () =>
|
|
140
|
-
PinInput: () =>
|
|
141
|
-
Popover: () =>
|
|
142
|
-
Progress: () =>
|
|
143
|
-
RadioGroup: () =>
|
|
144
|
-
Rating: () =>
|
|
145
|
-
ScrollArea: () =>
|
|
146
|
-
ScrollFade: () =>
|
|
147
|
-
Select: () =>
|
|
148
|
-
Separator: () =>
|
|
149
|
-
Sidebar: () =>
|
|
150
|
-
SignaturePad: () =>
|
|
151
|
-
Skeleton: () =>
|
|
152
|
-
Slider: () =>
|
|
153
|
-
Sparkline: () =>
|
|
154
|
-
Splitter: () =>
|
|
155
|
-
Stat: () =>
|
|
156
|
-
Stepper: () =>
|
|
157
|
-
Switch: () =>
|
|
158
|
-
Table: () =>
|
|
159
|
-
Tabs: () =>
|
|
160
|
-
TagsInput: () =>
|
|
161
|
-
Textarea: () =>
|
|
162
|
-
TimeField: () =>
|
|
163
|
-
Timeline: () =>
|
|
164
|
-
Toaster: () =>
|
|
165
|
-
Toggle: () =>
|
|
166
|
-
ToggleGroup: () =>
|
|
167
|
-
Toolbar: () =>
|
|
168
|
-
Tooltip: () =>
|
|
130
|
+
Input: () => Y,
|
|
131
|
+
Kbd: () => O,
|
|
132
|
+
Label: () => K,
|
|
133
|
+
LineChart: () => X,
|
|
134
|
+
Menubar: () => Z,
|
|
135
|
+
NavigationMenu: () => Q,
|
|
136
|
+
NumberInput: () => $,
|
|
137
|
+
PageHeader: () => ee,
|
|
138
|
+
Pagination: () => te,
|
|
139
|
+
PasswordInput: () => ne,
|
|
140
|
+
PinInput: () => re,
|
|
141
|
+
Popover: () => M,
|
|
142
|
+
Progress: () => U,
|
|
143
|
+
RadioGroup: () => ie,
|
|
144
|
+
Rating: () => ae,
|
|
145
|
+
ScrollArea: () => oe,
|
|
146
|
+
ScrollFade: () => se,
|
|
147
|
+
Select: () => ce,
|
|
148
|
+
Separator: () => le,
|
|
149
|
+
Sidebar: () => ue,
|
|
150
|
+
SignaturePad: () => de,
|
|
151
|
+
Skeleton: () => fe,
|
|
152
|
+
Slider: () => pe,
|
|
153
|
+
Sparkline: () => me,
|
|
154
|
+
Splitter: () => he,
|
|
155
|
+
Stat: () => ge,
|
|
156
|
+
Stepper: () => _e,
|
|
157
|
+
Switch: () => ve,
|
|
158
|
+
Table: () => ye,
|
|
159
|
+
Tabs: () => be,
|
|
160
|
+
TagsInput: () => xe,
|
|
161
|
+
Textarea: () => Se,
|
|
162
|
+
TimeField: () => Ce,
|
|
163
|
+
Timeline: () => we,
|
|
164
|
+
Toaster: () => Te,
|
|
165
|
+
Toggle: () => Ee,
|
|
166
|
+
ToggleGroup: () => De,
|
|
167
|
+
Toolbar: () => Oe,
|
|
168
|
+
Tooltip: () => d,
|
|
169
169
|
Tree: () => ke
|
|
170
170
|
});
|
|
171
171
|
//#endregion
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function defaultCountLabel(remaining: number): string;
|
|
2
|
+
export declare function useCharacterCount(value: () => string | number | null | undefined, max: () => number | undefined): {
|
|
3
|
+
remaining: import("vue").ComputedRef<number | undefined>;
|
|
4
|
+
nearLimit: import("vue").ComputedRef<boolean>;
|
|
5
|
+
text: import("vue").ComputedRef<string>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { computed as e } from "vue";
|
|
2
|
+
//#region src/composables/character-count.ts
|
|
3
|
+
function t(e) {
|
|
4
|
+
return `${e} ${e === 1 ? "character" : "characters"} left`;
|
|
5
|
+
}
|
|
6
|
+
function n(t, n) {
|
|
7
|
+
let r = e(() => String(t() ?? "").length), i = e(() => {
|
|
8
|
+
let e = n();
|
|
9
|
+
return e == null ? void 0 : e - r.value;
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
remaining: i,
|
|
13
|
+
nearLimit: e(() => i.value != null && i.value <= Math.ceil(n() * .1)),
|
|
14
|
+
text: e(() => n() == null ? `${r.value}` : `${r.value}/${n()}`)
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as defaultCountLabel, n as useCharacterCount };
|