iryx-ui 0.10.2 → 0.12.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 (54) hide show
  1. package/README.md +593 -496
  2. package/dist/component-names.d.ts +1 -1
  3. package/dist/component-names.js +1 -1
  4. package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +42 -42
  5. package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
  6. package/dist/components/BarChart.vue.d.ts +13 -0
  7. package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +174 -132
  8. package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
  9. package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
  10. package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
  11. package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
  12. package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
  13. package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
  14. package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +34 -34
  15. package/dist/components/Drawer.js +5 -0
  16. package/dist/components/Drawer.vue.d.ts +94 -0
  17. package/dist/components/Drawer.vue_vue_type_script_setup_true_lang.js +144 -0
  18. package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +42 -42
  19. package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +77 -77
  20. package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -11
  21. package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
  22. package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
  23. package/dist/components/Pagination.vue.d.ts +1 -1
  24. package/dist/components/Pagination.vue_vue_type_script_setup_true_lang.js +37 -37
  25. package/dist/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +37 -37
  26. package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +34 -31
  27. package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
  28. package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +27 -27
  29. package/dist/components/Stepper.vue_vue_type_script_setup_true_lang.js +38 -38
  30. package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +9 -2
  31. package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +87 -87
  32. package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
  33. package/dist/components/index.d.ts +1 -0
  34. package/dist/components/index.js +54 -52
  35. package/dist/composables/date.js +12 -15
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +55 -54
  38. package/dist/theme/drawer.d.ts +110 -0
  39. package/dist/theme/drawer.js +100 -0
  40. package/dist/theme/index.d.ts +1 -0
  41. package/package.json +3 -2
  42. package/theme.css +114 -0
  43. package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +0 -377
  44. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/_virtual/_plugin-vue_export-helper.js +0 -8
  45. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue.js +0 -25
  46. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue2.js +0 -63
  47. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -122
  48. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +0 -84
  49. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -91
  50. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +0 -107
  51. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +0 -159
  52. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +0 -29
  53. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +0 -37
  54. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +0 -6
@@ -1,12 +1,12 @@
1
- import { ArrowDown01Icon as e, ArrowUp01Icon as t } from "../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
2
- import { useIryxUiConfig as n } from "../config.js";
3
- import r from "./Icon.js";
4
- import { useFormField as i } from "../composables/form.js";
5
- import { addDecimals as a, clampDecimal as o, compareDecimals as s, formatForLocale as c, isDecimal as l, parseFromLocale as u, roundDecimal as d, toEditable as f } from "../composables/decimal.js";
6
- import { numberInputTheme as p } from "../theme/number-input.js";
7
- import { computed as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, mergeModels as b, normalizeClass as x, openBlock as S, ref as C, unref as w, useModel as T, vModelText as E, watch as D, withDirectives as O, withKeys as k, withModifiers as A } from "vue";
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import { useFormField as n } from "../composables/form.js";
4
+ import { addDecimals as r, clampDecimal as i, compareDecimals as a, formatForLocale as o, isDecimal as s, parseFromLocale as c, roundDecimal as l, toEditable as u } from "../composables/decimal.js";
5
+ import { numberInputTheme as d } from "../theme/number-input.js";
6
+ import { computed as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as b, openBlock as x, ref as S, unref as C, useModel as w, vModelText as T, watch as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
7
+ import { ArrowDown01Icon as A, ArrowUp01Icon as j } from "@hugeicons/core-free-icons";
8
8
  //#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
9
- var j = [
9
+ var M = [
10
10
  "id",
11
11
  "aria-valuenow",
12
12
  "aria-valuemin",
@@ -16,9 +16,10 @@ var j = [
16
16
  "required",
17
17
  "aria-invalid",
18
18
  "aria-describedby"
19
- ], M = ["aria-label", "disabled"], N = ["aria-label", "disabled"], P = /*@__PURE__*/ y({
19
+ ], N = ["aria-label", "disabled"], P = ["aria-label", "disabled"], F = /*@__PURE__*/ _({
20
+ inheritAttrs: !1,
20
21
  __name: "NumberInput",
21
- props: /*@__PURE__*/ b({
22
+ props: /*@__PURE__*/ v({
22
23
  min: {},
23
24
  max: {},
24
25
  step: { default: "1" },
@@ -50,87 +51,88 @@ var j = [
50
51
  modelModifiers: {}
51
52
  }),
52
53
  emits: ["update:modelValue"],
53
- setup(y) {
54
- let b = y, P = T(y, "modelValue"), F = i(), I = m(() => b.id ?? F?.id.value), L = m(() => b.invalid ?? F?.invalid.value ?? !1), R = n(), z = m(() => b.unstyled ?? R.unstyled), B = C(""), V = C(!1);
55
- function H(e) {
56
- return e ? b.locale ? c(e, b.locale, b.precision) : b.precision == null ? e : d(e, b.precision) ?? e : "";
54
+ setup(_) {
55
+ let v = _, F = w(_, "modelValue"), I = n(), L = f(() => v.id ?? I?.id.value), R = f(() => v.invalid ?? I?.invalid.value ?? !1), z = e(), B = f(() => v.unstyled ?? z.unstyled), V = S(""), H = S(!1);
56
+ function U(e) {
57
+ return e ? v.locale ? o(e, v.locale, v.precision) : v.precision == null ? e : l(e, v.precision) ?? e : "";
57
58
  }
58
- D(() => P.value, (e) => {
59
- V.value || (B.value = H(e));
59
+ E(() => F.value, (e) => {
60
+ H.value || (V.value = U(e));
60
61
  }, { immediate: !0 });
61
- function U(e) {
62
+ function W(e) {
62
63
  let t = e.trim();
63
64
  if (!t) {
64
- P.value = "", B.value = "";
65
+ F.value = "", V.value = "";
65
66
  return;
66
67
  }
67
- let n = b.locale ? u(t, b.locale) : l(t) ? t : void 0;
68
+ let n = v.locale ? c(t, v.locale) : s(t) ? t : void 0;
68
69
  if (n == null) {
69
- B.value = H(P.value);
70
+ V.value = U(F.value);
70
71
  return;
71
72
  }
72
- let r = o(n, b.min, b.max), i = b.precision == null ? r : d(r, b.precision) ?? r;
73
- P.value = i, B.value = H(i);
74
- }
75
- function W() {
76
- V.value = !0, B.value = f(P.value, b.locale);
73
+ let r = i(n, v.min, v.max), a = v.precision == null ? r : l(r, v.precision) ?? r;
74
+ F.value = a, V.value = U(a);
77
75
  }
78
76
  function G() {
79
- V.value = !1, U(B.value);
77
+ H.value = !0, V.value = u(F.value, v.locale);
78
+ }
79
+ function K() {
80
+ H.value = !1, W(V.value);
80
81
  }
81
- function K(e) {
82
- let t = a(P.value || "0", e === 1 ? b.step : `-${b.step}`);
82
+ function q(e) {
83
+ let t = r(F.value || "0", e === 1 ? v.step : `-${v.step}`);
83
84
  if (t == null) return;
84
- let n = o(t, b.min, b.max), r = b.precision == null ? n : d(n, b.precision) ?? n;
85
- P.value = r, B.value = V.value ? f(r, b.locale) : H(r);
85
+ let n = i(t, v.min, v.max), a = v.precision == null ? n : l(n, v.precision) ?? n;
86
+ F.value = a, V.value = H.value ? u(a, v.locale) : U(a);
86
87
  }
87
- let q = m(() => b.min != null && P.value !== "" && s(P.value, b.min) <= 0), J = m(() => b.max != null && P.value !== "" && s(P.value, b.max) >= 0), Y = m(() => p({
88
- size: b.size,
89
- invalid: L.value,
90
- withStepper: b.stepper
88
+ let J = f(() => v.min != null && F.value !== "" && a(F.value, v.min) <= 0), Y = f(() => v.max != null && F.value !== "" && a(F.value, v.max) >= 0), X = f(() => d({
89
+ size: v.size,
90
+ invalid: R.value,
91
+ withStepper: v.stepper
91
92
  }));
92
- function X(e, t) {
93
- let n = b.ui?.[e];
94
- return z.value ? [n, t] : Y.value[e]({ class: [n, t] });
93
+ function Z(e, t) {
94
+ let n = v.ui?.[e];
95
+ return B.value ? [n, t] : X.value[e]({ class: [n, t] });
95
96
  }
96
- return (n, i) => (S(), g("div", { class: x(X("root")) }, [O(_("input", {
97
- id: I.value,
98
- "onUpdate:modelValue": i[0] ||= (e) => B.value = e,
97
+ return (e, n) => (x(), m("div", { class: b(Z("root")) }, [D(h("input", y({
98
+ id: L.value,
99
+ "onUpdate:modelValue": n[0] ||= (e) => V.value = e
100
+ }, e.$attrs, {
99
101
  type: "text",
100
102
  inputmode: "decimal",
101
103
  autocomplete: "off",
102
104
  role: "spinbutton",
103
- "aria-valuenow": P.value || void 0,
104
- "aria-valuemin": b.min,
105
- "aria-valuemax": b.max,
106
- placeholder: b.placeholder,
107
- disabled: b.disabled,
108
- required: b.required,
109
- "aria-invalid": L.value || void 0,
110
- "aria-describedby": w(F)?.describedBy.value,
111
- class: x(z.value ? [b.ui?.input, b.class] : Y.value.input({ class: [b.ui?.input, b.class] })),
112
- onFocus: W,
113
- onBlur: G,
114
- onKeydown: [i[1] ||= k(A((e) => K(1), ["prevent"]), ["up"]), i[2] ||= k(A((e) => K(-1), ["prevent"]), ["down"])]
115
- }, null, 42, j), [[E, B.value]]), b.stepper ? (S(), g("div", {
105
+ "aria-valuenow": F.value || void 0,
106
+ "aria-valuemin": v.min,
107
+ "aria-valuemax": v.max,
108
+ placeholder: v.placeholder,
109
+ disabled: v.disabled,
110
+ required: v.required,
111
+ "aria-invalid": R.value || void 0,
112
+ "aria-describedby": C(I)?.describedBy.value,
113
+ class: B.value ? [v.ui?.input, v.class] : X.value.input({ class: [v.ui?.input, v.class] }),
114
+ onFocus: G,
115
+ onBlur: K,
116
+ onKeydown: [n[1] ||= O(k((e) => q(1), ["prevent"]), ["up"]), n[2] ||= O(k((e) => q(-1), ["prevent"]), ["down"])]
117
+ }), null, 16, M), [[T, V.value]]), v.stepper ? (x(), m("div", {
116
118
  key: 0,
117
- class: x(X("stepper"))
118
- }, [_("button", {
119
+ class: b(Z("stepper"))
120
+ }, [h("button", {
119
121
  type: "button",
120
122
  tabindex: "-1",
121
- "aria-label": b.incrementLabel,
122
- disabled: b.disabled || J.value,
123
- class: x(X("step")),
124
- onClick: i[3] ||= (e) => K(1)
125
- }, [v(r, { icon: w(t) }, null, 8, ["icon"])], 10, M), _("button", {
123
+ "aria-label": v.incrementLabel,
124
+ disabled: v.disabled || Y.value,
125
+ class: b(Z("step")),
126
+ onClick: n[3] ||= (e) => q(1)
127
+ }, [g(t, { icon: C(j) }, null, 8, ["icon"])], 10, N), h("button", {
126
128
  type: "button",
127
129
  tabindex: "-1",
128
- "aria-label": b.decrementLabel,
129
- disabled: b.disabled || q.value,
130
- class: x(X("step")),
131
- onClick: i[4] ||= (e) => K(-1)
132
- }, [v(r, { icon: w(e) }, null, 8, ["icon"])], 10, N)], 2)) : h("", !0)], 2));
130
+ "aria-label": v.decrementLabel,
131
+ disabled: v.disabled || J.value,
132
+ class: b(Z("step")),
133
+ onClick: n[4] ||= (e) => q(-1)
134
+ }, [g(t, { icon: C(A) }, null, 8, ["icon"])], 10, P)], 2)) : p("", !0)], 2));
133
135
  }
134
136
  });
135
137
  //#endregion
136
- export { P as default };
138
+ export { F as default };
@@ -42,8 +42,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
42
42
  }>, {
43
43
  unstyled: boolean;
44
44
  label: string;
45
- nextLabel: string;
46
45
  total: number;
46
+ nextLabel: string;
47
47
  itemsPerPage: number;
48
48
  siblingCount: number;
49
49
  showEdges: boolean;
@@ -1,13 +1,13 @@
1
- import { ArrowLeft01Icon as e, ArrowRight01Icon as t } from "../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
2
- import { useIryxUiConfig as n } from "../config.js";
3
- import r from "./Icon.js";
4
- import { paginationTheme as i } from "../theme/pagination.js";
5
- import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useModel as y, withCtx as b } from "vue";
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import { paginationTheme as n } from "../theme/pagination.js";
4
+ import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, withCtx as v } from "vue";
5
+ import { ArrowLeft01Icon as y, ArrowRight01Icon as b } from "@hugeicons/core-free-icons";
6
6
  import { PaginationEllipsis as x, PaginationList as S, PaginationListItem as C, PaginationNext as w, PaginationPrev as T, PaginationRoot as E } from "reka-ui";
7
7
  //#region src/components/Pagination.vue?vue&type=script&setup=true&lang.ts
8
- var D = /*@__PURE__*/ d({
8
+ var D = /*@__PURE__*/ l({
9
9
  __name: "Pagination",
10
- props: /*@__PURE__*/ f({
10
+ props: /*@__PURE__*/ u({
11
11
  total: { default: 0 },
12
12
  itemsPerPage: { default: 10 },
13
13
  siblingCount: { default: 1 },
@@ -31,52 +31,52 @@ var D = /*@__PURE__*/ d({
31
31
  pageModifiers: {}
32
32
  }),
33
33
  emits: ["update:page"],
34
- setup(d) {
35
- let f = d, D = y(d, "page"), O = n(), k = o(() => f.unstyled ?? O.unstyled), A = o(() => i({
36
- size: f.size,
37
- align: f.align
38
- })), j = o(() => k.value ? [f.ui?.root, f.class] : A.value.root({ class: [f.ui?.root, f.class] })), M = o(() => k.value ? f.ui?.list : A.value.list({ class: f.ui?.list })), N = o(() => k.value ? f.ui?.ellipsis : A.value.ellipsis({ class: f.ui?.ellipsis }));
34
+ setup(l) {
35
+ let u = l, D = _(l, "page"), O = e(), k = i(() => u.unstyled ?? O.unstyled), A = i(() => n({
36
+ size: u.size,
37
+ align: u.align
38
+ })), j = i(() => k.value ? [u.ui?.root, u.class] : A.value.root({ class: [u.ui?.root, u.class] })), M = i(() => k.value ? u.ui?.list : A.value.list({ class: u.ui?.list })), N = i(() => k.value ? u.ui?.ellipsis : A.value.ellipsis({ class: u.ui?.ellipsis }));
39
39
  function P(e) {
40
- return k.value ? f.ui?.item : [A.value.item({ class: f.ui?.item }), e ? A.value.active() : A.value.inactive()];
40
+ return k.value ? u.ui?.item : [A.value.item({ class: u.ui?.item }), e ? A.value.active() : A.value.inactive()];
41
41
  }
42
- return (n, i) => (m(), s(v(E), {
42
+ return (e, n) => (f(), a(g(E), {
43
43
  page: D.value,
44
- "onUpdate:page": i[0] ||= (e) => D.value = e,
45
- total: f.total,
46
- "items-per-page": f.itemsPerPage,
47
- "sibling-count": f.siblingCount,
48
- "show-edges": f.showEdges,
49
- "aria-label": f.label,
50
- class: p(j.value)
44
+ "onUpdate:page": n[0] ||= (e) => D.value = e,
45
+ total: u.total,
46
+ "items-per-page": u.itemsPerPage,
47
+ "sibling-count": u.siblingCount,
48
+ "show-edges": u.showEdges,
49
+ "aria-label": u.label,
50
+ class: d(j.value)
51
51
  }, {
52
- default: b(() => [u(v(S), { class: p(M.value) }, {
53
- default: b(({ items: o }) => [
54
- u(v(T), {
55
- "aria-label": f.prevLabel,
56
- class: p(P(!1))
52
+ default: v(() => [c(g(S), { class: d(M.value) }, {
53
+ default: v(({ items: i }) => [
54
+ c(g(T), {
55
+ "aria-label": u.prevLabel,
56
+ class: d(P(!1))
57
57
  }, {
58
- default: b(() => [g(n.$slots, "prev", {}, () => [u(r, { icon: v(e) }, null, 8, ["icon"])])]),
58
+ default: v(() => [m(e.$slots, "prev", {}, () => [c(t, { icon: g(y) }, null, 8, ["icon"])])]),
59
59
  _: 3
60
60
  }, 8, ["aria-label", "class"]),
61
- (m(!0), c(a, null, h(o, (e, t) => (m(), c(a, { key: t }, [e.type === "page" ? (m(), s(v(C), {
61
+ (f(!0), o(r, null, p(i, (e, t) => (f(), o(r, { key: t }, [e.type === "page" ? (f(), a(g(C), {
62
62
  key: 0,
63
63
  value: e.value,
64
- class: p(P(e.value === D.value))
64
+ class: d(P(e.value === D.value))
65
65
  }, {
66
- default: b(() => [l(_(e.value), 1)]),
66
+ default: v(() => [s(h(e.value), 1)]),
67
67
  _: 2
68
- }, 1032, ["value", "class"])) : (m(), s(v(x), {
68
+ }, 1032, ["value", "class"])) : (f(), a(g(x), {
69
69
  key: 1,
70
- class: p(N.value)
70
+ class: d(N.value)
71
71
  }, {
72
- default: b(() => [...i[1] ||= [l(" … ", -1)]]),
72
+ default: v(() => [...n[1] ||= [s(" … ", -1)]]),
73
73
  _: 1
74
74
  }, 8, ["class"]))], 64))), 128)),
75
- u(v(w), {
76
- "aria-label": f.nextLabel,
77
- class: p(P(!1))
75
+ c(g(w), {
76
+ "aria-label": u.nextLabel,
77
+ class: d(P(!1))
78
78
  }, {
79
- default: b(() => [g(n.$slots, "next", {}, () => [u(r, { icon: v(t) }, null, 8, ["icon"])])]),
79
+ default: v(() => [m(e.$slots, "next", {}, () => [c(t, { icon: g(b) }, null, 8, ["icon"])])]),
80
80
  _: 3
81
81
  }, 8, ["aria-label", "class"])
82
82
  ]),
@@ -1,18 +1,18 @@
1
- import { ViewIcon as e, ViewOffIcon as t } from "../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
2
- import { useIryxUiConfig as n } from "../config.js";
3
- import r from "./Icon.js";
4
- import i from "./Input.js";
5
- import { passwordInputTheme as a } from "../theme/password-input.js";
6
- import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, normalizeClass as g, openBlock as _, ref as v, renderList as y, toDisplayString as b, unref as x, useModel as S, withCtx as C } from "vue";
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import n from "./Input.js";
4
+ import { passwordInputTheme as r } from "../theme/password-input.js";
5
+ import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
6
+ import { ViewIcon as S, ViewOffIcon as C } from "@hugeicons/core-free-icons";
7
7
  //#region src/components/PasswordInput.vue?vue&type=script&setup=true&lang.ts
8
8
  var w = [
9
9
  "aria-label",
10
10
  "aria-pressed",
11
11
  "disabled"
12
- ], T = ["data-filled"], E = /*@__PURE__*/ p({
12
+ ], T = ["data-filled"], E = /*@__PURE__*/ d({
13
13
  inheritAttrs: !1,
14
14
  __name: "PasswordInput",
15
- props: /*@__PURE__*/ m({
15
+ props: /*@__PURE__*/ f({
16
16
  size: {},
17
17
  placeholder: {},
18
18
  disabled: { type: Boolean },
@@ -46,41 +46,41 @@ var w = [
46
46
  modelModifiers: {}
47
47
  }),
48
48
  emits: ["update:modelValue"],
49
- setup(p) {
50
- let m = p, E = S(p, "modelValue"), D = n(), O = s(() => m.unstyled ?? D.unstyled), k = v(!1), A = s(() => {
49
+ setup(d) {
50
+ let f = d, E = b(d, "modelValue"), D = e(), O = a(() => f.unstyled ?? D.unstyled), k = g(!1), A = a(() => {
51
51
  let e = E.value;
52
52
  if (!e) return 0;
53
53
  let t = 0;
54
54
  return e.length >= 8 && t++, e.length >= 12 && t++, /[a-z]/.test(e) && /[A-Z]/.test(e) && t++, /\d/.test(e) && t++, /[^\w\s]/.test(e) && t++, Math.max(1, Math.min(t, 4));
55
- }), j = s(() => m.strength && E.value.length > 0), M = s(() => a({ score: A.value })), N = s(() => O.value ? m.ui?.input : M.value.input({ class: m.ui?.input }));
55
+ }), j = a(() => f.strength && E.value.length > 0), M = a(() => r({ score: A.value })), N = a(() => O.value ? f.ui?.input : M.value.input({ class: f.ui?.input }));
56
56
  function P(e, t) {
57
- let n = m.ui?.[e];
57
+ let n = f.ui?.[e];
58
58
  return O.value ? [n, t] : M.value[e]({ class: [n, t] });
59
59
  }
60
- return (n, a) => (_(), l("div", { class: g(P("root", m.class)) }, [f(i, h({
61
- id: m.id,
60
+ return (e, r) => (h(), s("div", { class: m(P("root", f.class)) }, [u(n, p({
61
+ id: f.id,
62
62
  modelValue: E.value,
63
- "onUpdate:modelValue": a[1] ||= (e) => E.value = e,
63
+ "onUpdate:modelValue": r[1] ||= (e) => E.value = e,
64
64
  type: k.value ? "text" : "password",
65
- size: m.size,
66
- placeholder: m.placeholder,
67
- disabled: m.disabled,
68
- required: m.required,
69
- invalid: m.invalid,
70
- unstyled: m.unstyled,
65
+ size: f.size,
66
+ placeholder: f.placeholder,
67
+ disabled: f.disabled,
68
+ required: f.required,
69
+ invalid: f.invalid,
70
+ unstyled: f.unstyled,
71
71
  ui: { input: N.value },
72
72
  autocomplete: "current-password"
73
- }, n.$attrs), d({ _: 2 }, [m.toggle ? {
73
+ }, e.$attrs), l({ _: 2 }, [f.toggle ? {
74
74
  name: "trailing",
75
- fn: C(() => [u("button", {
75
+ fn: x(() => [c("button", {
76
76
  type: "button",
77
77
  tabindex: "-1",
78
- "aria-label": k.value ? m.hideLabel : m.showLabel,
78
+ "aria-label": k.value ? f.hideLabel : f.showLabel,
79
79
  "aria-pressed": k.value,
80
- disabled: m.disabled,
81
- class: g(P("toggle")),
82
- onClick: a[0] ||= (e) => k.value = !k.value
83
- }, [f(r, { icon: k.value ? x(t) : x(e) }, null, 8, ["icon"])], 10, w)]),
80
+ disabled: f.disabled,
81
+ class: m(P("toggle")),
82
+ onClick: r[0] ||= (e) => k.value = !k.value
83
+ }, [u(t, { icon: k.value ? y(C) : y(S) }, null, 8, ["icon"])], 10, w)]),
84
84
  key: "0"
85
85
  } : void 0]), 1040, [
86
86
  "id",
@@ -93,20 +93,20 @@ var w = [
93
93
  "invalid",
94
94
  "unstyled",
95
95
  "ui"
96
- ]), j.value ? (_(), l("div", {
96
+ ]), j.value ? (h(), s("div", {
97
97
  key: 0,
98
- class: g(P("meter"))
99
- }, [u("div", {
100
- class: g(P("track")),
98
+ class: m(P("meter"))
99
+ }, [c("div", {
100
+ class: m(P("track")),
101
101
  "aria-hidden": "true"
102
- }, [(_(), l(o, null, y(4, (e) => u("span", {
102
+ }, [(h(), s(i, null, _(4, (e) => c("span", {
103
103
  key: e,
104
104
  "data-filled": e <= A.value ? "" : void 0,
105
- class: g(P("segment"))
106
- }, null, 10, T)), 64))], 2), u("span", {
107
- class: g(P("label")),
105
+ class: m(P("segment"))
106
+ }, null, 10, T)), 64))], 2), c("span", {
107
+ class: m(P("label")),
108
108
  role: "status"
109
- }, b(m.strengthLabels[A.value - 1]), 3)], 2)) : c("", !0)], 2));
109
+ }, v(f.strengthLabels[A.value - 1]), 3)], 2)) : o("", !0)], 2));
110
110
  }
111
111
  });
112
112
  //#endregion
@@ -1,9 +1,10 @@
1
1
  import { useIryxUiConfig as e } from "../config.js";
2
2
  import { progressTheme as t } from "../theme/progress.js";
3
- import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
4
- import { ProgressIndicator as h, ProgressRoot as g } from "reka-ui";
3
+ import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, toDisplayString as p, unref as m, useSlots as h, withCtx as g } from "vue";
4
+ import { ProgressIndicator as _, ProgressRoot as v, useId as y } from "reka-ui";
5
5
  //#region src/components/Progress.vue?vue&type=script&setup=true&lang.ts
6
- var _ = /*@__PURE__*/ s({
6
+ var b = ["id"], x = /*@__PURE__*/ s({
7
+ inheritAttrs: !1,
7
8
  __name: "Progress",
8
9
  props: {
9
10
  modelValue: {},
@@ -22,44 +23,46 @@ var _ = /*@__PURE__*/ s({
22
23
  ui: {}
23
24
  },
24
25
  setup(s) {
25
- let _ = s, v = n(() => _.indeterminate || _.modelValue == null), y = n(() => v.value ? null : Math.min(Math.max(_.modelValue ?? 0, 0), _.max)), b = n(() => y.value == null ? 0 : y.value / _.max * 100), x = n(() => {
26
- if (y.value != null) return _.formatValue ? _.formatValue(y.value, _.max) : `${Math.round(b.value)}%`;
27
- }), S = n(() => !!(_.label || _.showValue && x.value)), C = e(), w = n(() => _.unstyled ?? C.unstyled), T = n(() => t({
28
- variant: _.variant,
29
- size: _.size,
30
- indeterminate: v.value
31
- })), E = n(() => w.value ? [_.ui?.root, _.class] : T.value.root({ class: [_.ui?.root, _.class] })), D = n(() => w.value ? _.ui?.header : T.value.header({ class: _.ui?.header })), O = n(() => w.value ? _.ui?.label : T.value.label({ class: _.ui?.label })), k = n(() => w.value ? _.ui?.value : T.value.value({ class: _.ui?.value })), A = n(() => w.value ? _.ui?.track : T.value.track({ class: _.ui?.track })), j = n(() => w.value ? _.ui?.indicator : T.value.indicator({ class: _.ui?.indicator })), M = n(() => v.value ? void 0 : { transform: `translateX(-${100 - b.value}%)` });
32
- return (e, t) => (u(), i("div", { class: c(E.value) }, [S.value ? (u(), i("div", {
26
+ let x = s, S = h(), C = y(), w = n(() => !!(x.label || S.label)), T = n(() => x.indeterminate || x.modelValue == null), E = n(() => T.value ? null : Math.min(Math.max(x.modelValue ?? 0, 0), x.max)), D = n(() => E.value == null ? 0 : E.value / x.max * 100), O = n(() => {
27
+ if (E.value != null) return x.formatValue ? x.formatValue(E.value, x.max) : `${Math.round(D.value)}%`;
28
+ }), k = n(() => !!(x.label || x.showValue && O.value)), A = e(), j = n(() => x.unstyled ?? A.unstyled), M = n(() => t({
29
+ variant: x.variant,
30
+ size: x.size,
31
+ indeterminate: T.value
32
+ })), N = n(() => j.value ? [x.ui?.root, x.class] : M.value.root({ class: [x.ui?.root, x.class] })), P = n(() => j.value ? x.ui?.header : M.value.header({ class: x.ui?.header })), F = n(() => j.value ? x.ui?.label : M.value.label({ class: x.ui?.label })), I = n(() => j.value ? x.ui?.value : M.value.value({ class: x.ui?.value })), L = n(() => j.value ? x.ui?.track : M.value.track({ class: x.ui?.track })), R = n(() => j.value ? x.ui?.indicator : M.value.indicator({ class: x.ui?.indicator })), z = n(() => T.value ? void 0 : { transform: `translateX(-${100 - D.value}%)` });
33
+ return (e, t) => (d(), i("div", { class: l(N.value) }, [k.value ? (d(), i("div", {
33
34
  key: 0,
34
- class: c(D.value)
35
- }, [_.label || e.$slots.label ? (u(), i("span", {
35
+ class: l(P.value)
36
+ }, [w.value ? (d(), i("span", {
36
37
  key: 0,
37
- class: c(O.value)
38
- }, [d(e.$slots, "label", {}, () => [a(f(_.label), 1)])], 2)) : r("", !0), _.showValue && x.value ? (u(), i("span", {
38
+ id: m(C),
39
+ class: l(F.value)
40
+ }, [f(e.$slots, "label", {}, () => [a(p(x.label), 1)])], 10, b)) : r("", !0), x.showValue && O.value ? (d(), i("span", {
39
41
  key: 1,
40
- class: c(k.value)
41
- }, [d(e.$slots, "value", {
42
- value: y.value,
43
- percent: b.value,
44
- formatted: x.value
45
- }, () => [a(f(x.value), 1)])], 2)) : r("", !0)], 2)) : r("", !0), o(p(g), {
46
- "model-value": y.value,
47
- max: _.max,
48
- "get-value-label": () => x.value ?? "",
49
- class: c(A.value)
50
- }, {
51
- default: m(() => [o(p(h), {
52
- class: c(j.value),
53
- style: l(M.value)
42
+ class: l(I.value)
43
+ }, [f(e.$slots, "value", {
44
+ value: E.value,
45
+ percent: D.value,
46
+ formatted: O.value
47
+ }, () => [a(p(O.value), 1)])], 2)) : r("", !0)], 2)) : r("", !0), o(m(v), c({
48
+ "model-value": E.value,
49
+ max: x.max,
50
+ "get-value-label": () => O.value ?? "",
51
+ "aria-labelledby": w.value ? m(C) : void 0
52
+ }, e.$attrs, { class: L.value }), {
53
+ default: g(() => [o(m(_), {
54
+ class: l(R.value),
55
+ style: u(z.value)
54
56
  }, null, 8, ["class", "style"])]),
55
57
  _: 1
56
- }, 8, [
58
+ }, 16, [
57
59
  "model-value",
58
60
  "max",
59
61
  "get-value-label",
62
+ "aria-labelledby",
60
63
  "class"
61
64
  ])], 2));
62
65
  }
63
66
  });
64
67
  //#endregion
65
- export { _ as default };
68
+ export { x as default };