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