iryx-ui 0.6.0 → 0.7.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 (40) hide show
  1. package/README.md +150 -2
  2. package/dist/component-names.d.ts +1 -1
  3. package/dist/components/DatePicker.vue.d.ts +52 -0
  4. package/dist/components/DateRangePicker.vue.d.ts +60 -0
  5. package/dist/components/Input.vue.d.ts +39 -1
  6. package/dist/components/Pagination.vue.d.ts +1 -1
  7. package/dist/components/PasswordInput.vue.d.ts +54 -0
  8. package/dist/components/Textarea.vue.d.ts +16 -1
  9. package/dist/components/index.d.ts +3 -0
  10. package/dist/composables/date.d.ts +21 -0
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.js +51 -44
  13. package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +91 -8
  14. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +122 -0
  15. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +84 -0
  16. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +91 -0
  17. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +107 -0
  18. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +159 -0
  19. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +29 -0
  20. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +37 -0
  21. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +6 -0
  22. package/dist/packages/iryx-ui/src/component-names.js +1 -1
  23. package/dist/packages/iryx-ui/src/components/DatePicker.js +5 -0
  24. package/dist/packages/iryx-ui/src/components/DatePicker.vue_vue_type_script_setup_true_lang.js +186 -0
  25. package/dist/packages/iryx-ui/src/components/DateRangePicker.js +5 -0
  26. package/dist/packages/iryx-ui/src/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +210 -0
  27. package/dist/packages/iryx-ui/src/components/Input.vue_vue_type_script_setup_true_lang.js +94 -25
  28. package/dist/packages/iryx-ui/src/components/PasswordInput.js +5 -0
  29. package/dist/packages/iryx-ui/src/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +113 -0
  30. package/dist/packages/iryx-ui/src/components/Textarea.vue_vue_type_script_setup_true_lang.js +47 -21
  31. package/dist/packages/iryx-ui/src/components/index.js +50 -44
  32. package/dist/packages/iryx-ui/src/composables/date.js +25 -0
  33. package/dist/packages/iryx-ui/src/theme/date-picker.js +45 -0
  34. package/dist/packages/iryx-ui/src/theme/input.js +22 -6
  35. package/dist/packages/iryx-ui/src/theme/password-input.js +22 -0
  36. package/dist/theme/date-picker.d.ts +254 -0
  37. package/dist/theme/index.d.ts +2 -0
  38. package/dist/theme/input.d.ts +94 -15
  39. package/dist/theme/password-input.d.ts +79 -0
  40. package/package.json +2 -1
@@ -1,19 +1,23 @@
1
- import { useIryxUiConfig as e } from "../config.js";
2
- import { useFormField as t } from "../composables/form.js";
3
- import { inputTheme as n } from "../theme/input.js";
4
- import { computed as r, createElementBlock as i, defineComponent as a, mergeModels as o, normalizeClass as s, openBlock as c, unref as l, useModel as u, vModelDynamic as d, withDirectives as f } from "vue";
1
+ import { Cancel01Icon as e, Loading03Icon 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 { inputTheme as a } from "../theme/input.js";
6
+ import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, normalizeClass as h, onBeforeUnmount as g, openBlock as _, ref as v, renderSlot as y, unref as b, useModel as x, useSlots as S, watch as C, withKeys as w } from "vue";
5
7
  //#region src/components/Input.vue?vue&type=script&setup=true&lang.ts
6
- var p = [
8
+ var T = [
7
9
  "id",
10
+ "value",
8
11
  "type",
9
12
  "placeholder",
10
13
  "disabled",
11
14
  "required",
12
15
  "aria-invalid",
13
16
  "aria-describedby"
14
- ], m = /*@__PURE__*/ a({
17
+ ], E = ["aria-label"], D = /*@__PURE__*/ f({
18
+ inheritAttrs: !1,
15
19
  __name: "Input",
16
- props: /*@__PURE__*/ o({
20
+ props: /*@__PURE__*/ p({
17
21
  type: { default: "text" },
18
22
  size: {},
19
23
  placeholder: {},
@@ -24,34 +28,99 @@ var p = [
24
28
  default: void 0
25
29
  },
26
30
  id: {},
31
+ clearable: { type: Boolean },
32
+ loading: { type: Boolean },
33
+ debounce: { default: 0 },
34
+ clearLabel: { default: "Clear" },
27
35
  unstyled: {
28
36
  type: Boolean,
29
37
  default: void 0
30
38
  },
31
- class: {}
39
+ class: {},
40
+ ui: {}
32
41
  }, {
33
42
  modelValue: {},
34
43
  modelModifiers: {}
35
44
  }),
36
45
  emits: ["update:modelValue"],
37
- setup(a) {
38
- let o = a, m = u(a, "modelValue"), h = t(), g = r(() => o.id ?? h?.id.value), _ = r(() => o.invalid ?? h?.invalid.value ?? !1), v = e(), y = r(() => o.unstyled ?? v.unstyled), b = r(() => y.value ? o.class : n({
39
- size: o.size,
40
- invalid: _.value,
41
- class: o.class
46
+ setup(f, { expose: p }) {
47
+ let D = f, O = x(f, "modelValue"), k = S(), A = i(), j = o(() => D.id ?? A?.id.value), M = o(() => D.invalid ?? A?.invalid.value ?? !1), N = n(), P = o(() => D.unstyled ?? N.unstyled), F = v(O.value), I;
48
+ function L() {
49
+ I !== void 0 && (clearTimeout(I), I = void 0);
50
+ }
51
+ C(O, (e) => {
52
+ L(), F.value = e;
53
+ });
54
+ function R(e) {
55
+ let t = e.target.value;
56
+ if (F.value = t, L(), !D.debounce) {
57
+ O.value = t;
58
+ return;
59
+ }
60
+ I = setTimeout(() => {
61
+ I = void 0, O.value = t;
62
+ }, D.debounce);
63
+ }
64
+ function z() {
65
+ I !== void 0 && (L(), O.value = F.value);
66
+ }
67
+ g(L);
68
+ let B = v();
69
+ function V() {
70
+ L(), F.value = "", O.value = "", B.value?.focus();
71
+ }
72
+ p({ input: B });
73
+ let H = o(() => F.value !== "" && F.value != null), U = o(() => D.clearable && H.value && !D.disabled), W = o(() => D.loading || U.value || !!k.trailing), G = o(() => a({
74
+ size: D.size,
75
+ invalid: M.value
42
76
  }));
43
- return (e, t) => f((c(), i("input", {
44
- id: g.value,
45
- "onUpdate:modelValue": t[0] ||= (e) => m.value = e,
46
- type: o.type,
47
- placeholder: o.placeholder,
48
- disabled: o.disabled,
49
- required: o.required,
50
- "aria-invalid": _.value || void 0,
51
- "aria-describedby": l(h)?.describedBy.value,
52
- class: s(b.value)
53
- }, null, 10, p)), [[d, m.value]]);
77
+ function K(e, t) {
78
+ let n = D.ui?.[e];
79
+ return P.value ? [n, t] : G.value[e]({ class: [n, t] });
80
+ }
81
+ return (n, i) => (_(), l("div", { class: h(K("root", D.class)) }, [
82
+ b(k).leading ? (_(), l("span", {
83
+ key: 0,
84
+ class: h(K("leading"))
85
+ }, [y(n.$slots, "leading")], 2)) : c("", !0),
86
+ u("input", m({
87
+ id: j.value,
88
+ ref_key: "inputEl",
89
+ ref: B,
90
+ value: F.value,
91
+ type: D.type,
92
+ placeholder: D.placeholder,
93
+ disabled: D.disabled,
94
+ required: D.required,
95
+ "aria-invalid": M.value || void 0,
96
+ "aria-describedby": b(A)?.describedBy.value,
97
+ class: K("input")
98
+ }, n.$attrs, {
99
+ onInput: R,
100
+ onBlur: z,
101
+ onKeydown: w(z, ["enter"])
102
+ }), null, 16, T),
103
+ W.value ? (_(), l("span", {
104
+ key: 1,
105
+ class: h(K("trailing"))
106
+ }, [
107
+ y(n.$slots, "trailing"),
108
+ U.value ? (_(), l("button", {
109
+ key: 0,
110
+ type: "button",
111
+ tabindex: "-1",
112
+ "aria-label": D.clearLabel,
113
+ class: h(K("clear")),
114
+ onClick: V
115
+ }, [d(r, { icon: b(e) }, null, 8, ["icon"])], 10, E)) : c("", !0),
116
+ D.loading ? (_(), s(r, {
117
+ key: 1,
118
+ icon: b(t),
119
+ class: "animate-spin"
120
+ }, null, 8, ["icon"])) : c("", !0)
121
+ ], 2)) : c("", !0)
122
+ ], 2));
54
123
  }
55
124
  });
56
125
  //#endregion
57
- export { m as default };
126
+ export { D as default };
@@ -0,0 +1,5 @@
1
+ import e from "./PasswordInput.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/PasswordInput.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,113 @@
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";
7
+ //#region src/components/PasswordInput.vue?vue&type=script&setup=true&lang.ts
8
+ var w = [
9
+ "aria-label",
10
+ "aria-pressed",
11
+ "disabled"
12
+ ], T = ["data-filled"], E = /*@__PURE__*/ p({
13
+ inheritAttrs: !1,
14
+ __name: "PasswordInput",
15
+ props: /*@__PURE__*/ m({
16
+ size: {},
17
+ placeholder: {},
18
+ disabled: { type: Boolean },
19
+ required: { type: Boolean },
20
+ invalid: {
21
+ type: Boolean,
22
+ default: void 0
23
+ },
24
+ id: {},
25
+ toggle: {
26
+ type: Boolean,
27
+ default: !0
28
+ },
29
+ strength: { type: Boolean },
30
+ showLabel: { default: "Show password" },
31
+ hideLabel: { default: "Hide password" },
32
+ strengthLabels: { default: () => [
33
+ "Weak",
34
+ "Fair",
35
+ "Good",
36
+ "Strong"
37
+ ] },
38
+ unstyled: {
39
+ type: Boolean,
40
+ default: void 0
41
+ },
42
+ class: {},
43
+ ui: {}
44
+ }, {
45
+ modelValue: { default: "" },
46
+ modelModifiers: {}
47
+ }),
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(() => {
51
+ let e = E.value;
52
+ if (!e) return 0;
53
+ let t = 0;
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 }));
56
+ function N(e, t) {
57
+ let n = m.ui?.[e];
58
+ return O.value ? [n, t] : M.value[e]({ class: [n, t] });
59
+ }
60
+ return (n, a) => (_(), l("div", { class: g(N("root", m.class)) }, [f(i, h({
61
+ id: m.id,
62
+ modelValue: E.value,
63
+ "onUpdate:modelValue": a[1] ||= (e) => E.value = e,
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,
71
+ ui: { input: m.ui?.input },
72
+ autocomplete: "current-password"
73
+ }, n.$attrs), d({ _: 2 }, [m.toggle ? {
74
+ name: "trailing",
75
+ fn: C(() => [u("button", {
76
+ type: "button",
77
+ tabindex: "-1",
78
+ "aria-label": k.value ? m.hideLabel : m.showLabel,
79
+ "aria-pressed": k.value,
80
+ disabled: m.disabled,
81
+ class: g(N("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)]),
84
+ key: "0"
85
+ } : void 0]), 1040, [
86
+ "id",
87
+ "modelValue",
88
+ "type",
89
+ "size",
90
+ "placeholder",
91
+ "disabled",
92
+ "required",
93
+ "invalid",
94
+ "unstyled",
95
+ "ui"
96
+ ]), j.value ? (_(), l("div", {
97
+ key: 0,
98
+ class: g(N("meter"))
99
+ }, [u("div", {
100
+ class: g(N("track")),
101
+ "aria-hidden": "true"
102
+ }, [(_(), l(o, null, y(4, (e) => u("span", {
103
+ key: e,
104
+ "data-filled": e <= A.value ? "" : void 0,
105
+ class: g(N("segment"))
106
+ }, null, 10, T)), 64))], 2), u("span", {
107
+ class: g(N("label")),
108
+ role: "status"
109
+ }, b(m.strengthLabels[A.value - 1]), 3)], 2)) : c("", !0)], 2));
110
+ }
111
+ });
112
+ //#endregion
113
+ export { E as default };
@@ -1,9 +1,9 @@
1
1
  import { useIryxUiConfig as e } from "../config.js";
2
2
  import { useFormField as t } from "../composables/form.js";
3
3
  import { textareaTheme as n } from "../theme/input.js";
4
- import { computed as r, createElementBlock as i, defineComponent as a, mergeModels as o, normalizeClass as s, openBlock as c, unref as l, useModel as u, vModelText as d, withDirectives as f } from "vue";
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";
5
5
  //#region src/components/Textarea.vue?vue&type=script&setup=true&lang.ts
6
- var p = [
6
+ var _ = [
7
7
  "id",
8
8
  "rows",
9
9
  "placeholder",
@@ -11,11 +11,12 @@ var p = [
11
11
  "required",
12
12
  "aria-invalid",
13
13
  "aria-describedby"
14
- ], m = /*@__PURE__*/ a({
14
+ ], v = /*@__PURE__*/ a({
15
15
  __name: "Textarea",
16
16
  props: /*@__PURE__*/ o({
17
17
  size: {},
18
18
  rows: {},
19
+ autosize: { type: [Boolean, Object] },
19
20
  placeholder: {},
20
21
  disabled: { type: Boolean },
21
22
  required: { type: Boolean },
@@ -34,24 +35,49 @@ var p = [
34
35
  modelModifiers: {}
35
36
  }),
36
37
  emits: ["update:modelValue"],
37
- setup(a) {
38
- let o = a, m = u(a, "modelValue"), h = t(), g = r(() => o.id ?? h?.id.value), _ = r(() => o.invalid ?? h?.invalid.value ?? !1), v = e(), y = r(() => o.unstyled ?? v.unstyled), b = r(() => y.value ? o.class : n({
39
- size: o.size,
40
- invalid: _.value,
41
- class: o.class
42
- }));
43
- return (e, t) => f((c(), i("textarea", {
44
- id: g.value,
45
- "onUpdate:modelValue": t[0] ||= (e) => m.value = e,
46
- rows: o.rows,
47
- placeholder: o.placeholder,
48
- disabled: o.disabled,
49
- required: o.required,
50
- "aria-invalid": _.value || void 0,
51
- "aria-describedby": l(h)?.describedBy.value,
52
- class: s(b.value)
53
- }, null, 10, p)), [[d, m.value]]);
38
+ setup(a, { expose: o }) {
39
+ let v = a, y = p(a, "modelValue"), b = t(), x = r(() => v.id ?? b?.id.value), S = r(() => v.invalid ?? b?.invalid.value ?? !1), C = e(), w = r(() => v.unstyled ?? C.unstyled), T = r(() => w.value ? v.class : n({
40
+ size: v.size,
41
+ invalid: S.value,
42
+ autosize: !!v.autosize,
43
+ class: v.class
44
+ })), E = d();
45
+ o({ textarea: E });
46
+ let D = r(() => typeof v.autosize == "object" ? v.autosize : {});
47
+ function O(e) {
48
+ return Number.parseFloat(e) || 0;
49
+ }
50
+ function k() {
51
+ let e = E.value;
52
+ if (!e || !v.autosize) return;
53
+ e.style.height = "auto";
54
+ 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;
55
+ if (n) {
56
+ let { min: e, max: t } = D.value;
57
+ e != null && (a = Math.max(a, e * n + r)), t != null && (a = Math.min(a, t * n + r));
58
+ }
59
+ e.style.height = `${a + i}px`, e.style.overflowY = D.value.max != null && e.scrollHeight > a ? "auto" : "hidden";
60
+ }
61
+ return l(() => {
62
+ v.autosize && s(k);
63
+ }), h(() => [
64
+ y.value,
65
+ v.autosize,
66
+ v.size
67
+ ], () => void s(k)), (e, t) => g((u(), i("textarea", {
68
+ id: x.value,
69
+ ref_key: "el",
70
+ ref: E,
71
+ "onUpdate:modelValue": t[0] ||= (e) => y.value = e,
72
+ rows: v.autosize ? D.value.min : v.rows,
73
+ placeholder: v.placeholder,
74
+ disabled: v.disabled,
75
+ required: v.required,
76
+ "aria-invalid": S.value || void 0,
77
+ "aria-describedby": f(b)?.describedBy.value,
78
+ class: c(T.value)
79
+ }, null, 10, _)), [[m, y.value]]);
54
80
  }
55
81
  });
56
82
  //#endregion
57
- export { m as default };
83
+ export { v as default };
@@ -11,29 +11,32 @@ import l from "./Checkbox.js";
11
11
  import u from "./Combobox.js";
12
12
  import d from "./Dialog.js";
13
13
  import f from "./ConfirmDialog.js";
14
- import p from "./DropdownMenu.js";
15
- import m from "./EmptyState.js";
16
- import h from "./Form.js";
17
- import g from "./Label.js";
18
- import _ from "./FormField.js";
19
- import v from "./Input.js";
20
- import y from "./NumberInput.js";
21
- import b from "./Pagination.js";
22
- import x from "./Progress.js";
23
- import S from "./RadioGroup.js";
24
- import C from "./Select.js";
25
- import w from "./Separator.js";
26
- import T from "./Skeleton.js";
27
- import E from "./Stat.js";
28
- import D from "./Stepper.js";
29
- import O from "./Switch.js";
30
- import k from "./Table.js";
31
- import A from "./Tabs.js";
32
- import j from "./Textarea.js";
33
- import M from "./Toaster.js";
34
- import N from "./Tooltip.js";
14
+ import p from "./DatePicker.js";
15
+ import m from "./DateRangePicker.js";
16
+ import h from "./DropdownMenu.js";
17
+ import g from "./EmptyState.js";
18
+ import _ from "./Form.js";
19
+ import v from "./Label.js";
20
+ import y from "./FormField.js";
21
+ import b from "./Input.js";
22
+ import x from "./NumberInput.js";
23
+ import S from "./Pagination.js";
24
+ import C from "./PasswordInput.js";
25
+ import w from "./Progress.js";
26
+ import T from "./RadioGroup.js";
27
+ import E from "./Select.js";
28
+ import D from "./Separator.js";
29
+ import O from "./Skeleton.js";
30
+ import k from "./Stat.js";
31
+ import A from "./Stepper.js";
32
+ import j from "./Switch.js";
33
+ import M from "./Table.js";
34
+ import N from "./Tabs.js";
35
+ import P from "./Textarea.js";
36
+ import F from "./Toaster.js";
37
+ import I from "./Tooltip.js";
35
38
  //#region src/components/index.ts
36
- var P = /* @__PURE__ */ e({
39
+ var L = /* @__PURE__ */ e({
37
40
  Alert: () => t,
38
41
  App: () => n,
39
42
  Badge: () => r,
@@ -45,28 +48,31 @@ var P = /* @__PURE__ */ e({
45
48
  Checkbox: () => l,
46
49
  Combobox: () => u,
47
50
  ConfirmDialog: () => f,
51
+ DatePicker: () => p,
52
+ DateRangePicker: () => m,
48
53
  Dialog: () => d,
49
- DropdownMenu: () => p,
50
- EmptyState: () => m,
51
- Form: () => h,
52
- FormField: () => _,
53
- Input: () => v,
54
- Label: () => g,
55
- NumberInput: () => y,
56
- Pagination: () => b,
57
- Progress: () => x,
58
- RadioGroup: () => S,
59
- Select: () => C,
60
- Separator: () => w,
61
- Skeleton: () => T,
62
- Stat: () => E,
63
- Stepper: () => D,
64
- Switch: () => O,
65
- Table: () => k,
66
- Tabs: () => A,
67
- Textarea: () => j,
68
- Toaster: () => M,
69
- Tooltip: () => N
54
+ DropdownMenu: () => h,
55
+ EmptyState: () => g,
56
+ Form: () => _,
57
+ FormField: () => y,
58
+ Input: () => b,
59
+ Label: () => v,
60
+ NumberInput: () => x,
61
+ Pagination: () => S,
62
+ PasswordInput: () => C,
63
+ Progress: () => w,
64
+ RadioGroup: () => T,
65
+ Select: () => E,
66
+ Separator: () => D,
67
+ Skeleton: () => O,
68
+ Stat: () => k,
69
+ Stepper: () => A,
70
+ Switch: () => j,
71
+ Table: () => M,
72
+ Tabs: () => N,
73
+ Textarea: () => P,
74
+ Toaster: () => F,
75
+ Tooltip: () => I
70
76
  });
71
77
  //#endregion
72
- export { P as components_exports };
78
+ export { L as components_exports };
@@ -0,0 +1,25 @@
1
+ import { $ad063034c8620db8$export$aa8b41735afcabd2 as e, $ad063034c8620db8$export$d0bdf45af03a6ea3 as t } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js";
2
+ import { $58246871e4652552$export$6b862160d295c8e as n } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js";
3
+ import "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js";
4
+ import { $12a3c853105e5a70$export$ad991b66133851cf as r } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js";
5
+ //#region src/composables/date.ts
6
+ var i = /^\d{4}-\d{2}-\d{2}$/;
7
+ function a(e) {
8
+ if (!(!e || !i.test(e))) try {
9
+ return n(e);
10
+ } catch {
11
+ return;
12
+ }
13
+ }
14
+ function o(e) {
15
+ return e ? `${e.year.toString().padStart(4, "0")}-${e.month.toString().padStart(2, "0")}-${e.day.toString().padStart(2, "0")}` : null;
16
+ }
17
+ function s() {
18
+ return o(t(e()));
19
+ }
20
+ function c(t, n, i = { dateStyle: "medium" }) {
21
+ let o = a(t);
22
+ return o ? new r(n ?? "en-US", i).format(o.toDate(e())) : "";
23
+ }
24
+ //#endregion
25
+ export { c as formatIsoDate, s as isoToday, a as toCalendarDate, o as toIsoDate };
@@ -0,0 +1,45 @@
1
+ import { fieldBase as e } from "./input.js";
2
+ import { tv as t } from "tailwind-variants";
3
+ //#region src/theme/date-picker.ts
4
+ var n = t({
5
+ slots: {
6
+ trigger: `flex items-center justify-between gap-2 ${e} cursor-pointer [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-60`,
7
+ placeholder: "text-muted-foreground",
8
+ content: "z-50 rounded-xl border border-border bg-background p-3 text-foreground shadow-md",
9
+ header: "flex items-center justify-between gap-2 pb-3",
10
+ heading: "text-sm font-medium",
11
+ nav: "flex size-7 items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4",
12
+ months: "flex items-start gap-4",
13
+ grid: "w-full border-collapse select-none",
14
+ headCell: "pb-1 text-xs font-normal text-muted-foreground",
15
+ cell: "p-0 transition-colors",
16
+ cellTrigger: "flex h-8 w-full min-w-8 items-center justify-center rounded-lg text-sm transition-colors outline-none not-data-[selected]:hover:bg-accent not-data-[selected]:hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 data-[disabled]:pointer-events-none data-[disabled]:opacity-30 data-[outside-view]:text-muted-foreground/50 data-[today]:font-semibold data-[today]:text-primary data-[unavailable]:pointer-events-none data-[unavailable]:line-through data-[unavailable]:opacity-40",
17
+ footer: "flex items-center justify-between gap-2 pt-3",
18
+ action: "rounded-lg px-2 py-1 text-sm text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50"
19
+ },
20
+ variants: {
21
+ size: {
22
+ sm: { trigger: "h-8 px-2.5 text-sm" },
23
+ md: { trigger: "h-9 px-3 text-sm" },
24
+ lg: { trigger: "h-10 px-4 text-base" }
25
+ },
26
+ invalid: { true: { trigger: "border-red-500 focus-visible:ring-red-500/40" } },
27
+ range: {
28
+ false: { cellTrigger: "data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:data-[today]:text-primary-foreground" },
29
+ true: {
30
+ cell: [
31
+ "has-data-[selected]:bg-primary/15",
32
+ "has-data-[selection-start]:rounded-s-lg",
33
+ "has-data-[selection-end]:rounded-e-lg"
34
+ ].join(" "),
35
+ cellTrigger: ["data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary", "data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary"].join(" ")
36
+ }
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ size: "md",
41
+ range: !1
42
+ }
43
+ });
44
+ //#endregion
45
+ export { n as datePickerTheme };
@@ -1,14 +1,29 @@
1
1
  import { tv as e } from "tailwind-variants";
2
2
  //#region src/theme/input.ts
3
3
  var t = "w-full rounded-xl border border-border bg-input text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50", n = e({
4
- base: `flex ${t}`,
4
+ slots: {
5
+ root: `flex items-center ${t} focus-within:ring-2 focus-within:ring-primary/50 has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50`,
6
+ input: "w-full min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
7
+ leading: "flex shrink-0 items-center text-muted-foreground [&_svg]:size-4",
8
+ trailing: "flex shrink-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-4",
9
+ clear: "flex items-center rounded-md text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-3.5"
10
+ },
5
11
  variants: {
6
12
  size: {
7
- sm: "h-8 px-2.5 text-sm",
8
- md: "h-9 px-3 text-sm",
9
- lg: "h-10 px-4 text-base"
13
+ sm: {
14
+ root: "h-8 gap-1.5 px-2.5",
15
+ input: "text-sm"
16
+ },
17
+ md: {
18
+ root: "h-9 gap-2 px-3",
19
+ input: "text-sm"
20
+ },
21
+ lg: {
22
+ root: "h-10 gap-2 px-4",
23
+ input: "text-base"
24
+ }
10
25
  },
11
- invalid: { true: "border-red-500 focus-visible:ring-red-500/40" }
26
+ invalid: { true: { root: "border-red-500 focus-within:ring-red-500/40" } }
12
27
  },
13
28
  defaultVariants: { size: "md" }
14
29
  }), r = e({
@@ -19,7 +34,8 @@ var t = "w-full rounded-xl border border-border bg-input text-foreground transit
19
34
  md: "min-h-20 px-3 py-2 text-sm",
20
35
  lg: "min-h-24 px-4 py-2.5 text-base"
21
36
  },
22
- invalid: { true: "border-red-500 focus-visible:ring-red-500/40" }
37
+ invalid: { true: "border-red-500 focus-visible:ring-red-500/40" },
38
+ autosize: { true: "min-h-0 resize-none" }
23
39
  },
24
40
  defaultVariants: { size: "md" }
25
41
  });
@@ -0,0 +1,22 @@
1
+ import { tv as e } from "tailwind-variants";
2
+ //#region src/theme/password-input.ts
3
+ var t = e({
4
+ slots: {
5
+ root: "flex w-full flex-col gap-2",
6
+ toggle: "flex items-center rounded-md text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4",
7
+ meter: "flex items-center gap-2",
8
+ track: "flex h-1 flex-1 gap-1",
9
+ segment: "h-full flex-1 rounded-full bg-muted transition-colors",
10
+ label: "shrink-0 text-xs text-muted-foreground tabular-nums"
11
+ },
12
+ variants: { score: {
13
+ 0: {},
14
+ 1: { segment: "data-[filled]:bg-danger" },
15
+ 2: { segment: "data-[filled]:bg-warning" },
16
+ 3: { segment: "data-[filled]:bg-info" },
17
+ 4: { segment: "data-[filled]:bg-success" }
18
+ } },
19
+ defaultVariants: { score: 0 }
20
+ });
21
+ //#endregion
22
+ export { t as passwordInputTheme };