@skiddph/prui 0.4.1 → 0.4.2

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/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Link as e, NavLink as t, Navigate as o, Outlet as r, Route as p, Routes as u } from "react-router-dom";
2
- import { A as m, a as P, b as S, c as l, C as h, F as n, R as M, S as R, d as g, e as A, f, g as c, h as d, i as k, r as v, s as N, j as T, k as b, u as w } from "./chunks/auth-shell-BYG_ozPZ.js";
2
+ import { A as m, a as P, b as S, c as l, C as h, F as n, R as M, S as R, d as g, e as A, f, g as c, h as d, i as k, r as v, s as N, j as T, k as b, u as w } from "./chunks/auth-shell-DSG2wWTh.js";
3
3
  export {
4
4
  m as App,
5
5
  P as AppShell,
@@ -5,32 +5,32 @@ import { X as Ie, Menu as _e, Search as qe, Palette as Be, ChevronDown as Ke, Pe
5
5
  import { cn as E } from "../core/cn.js";
6
6
  import { Dropdown as He } from "../core/dropdown.js";
7
7
  import { Button as A } from "../core/button.js";
8
- import { resolveThemeName as We, themeMode as Xe, readPersistedTheme as Ge, applyTheme as te, listThemes as Qe } from "../theme.js";
9
- import { Modal as ie, confirmModal as Ze } from "../core/modal.js";
10
- import { b as et, D as tt, a as rt } from "./data-table-toolbar-BUy2EWPy.js";
11
- import { Textarea as at, Input as V } from "../core/input.js";
12
- import { Label as nt } from "../core/label.js";
8
+ import { resolveThemeName as We, themeMode as Xe, readPersistedTheme as Ge, applyTheme as te, listThemes as Qe, clearAppliedTokens as Ze } from "../theme.js";
9
+ import { Modal as ie, confirmModal as et } from "../core/modal.js";
10
+ import { b as tt, D as rt, a as at } from "./data-table-toolbar-BUy2EWPy.js";
11
+ import { Textarea as nt, Input as V } from "../core/input.js";
12
+ import { Label as lt } from "../core/label.js";
13
13
  import { Select as oe } from "../core/select.js";
14
14
  import { Switch as ue } from "../core/switch.js";
15
15
  import { Card as ce, CardHeader as de, CardDescription as me, CardTitle as pe, CardContent as fe } from "../core/card.js";
16
- const lt = [
16
+ const st = [
17
17
  { path: "/login", name: "login" },
18
18
  { path: "/register", name: "register" },
19
19
  { path: "/forgot-password", name: "forgotPassword" },
20
20
  { path: "/reset-password", name: "resetPassword" },
21
21
  { path: "/otp", name: "otp" },
22
22
  { path: "/logout", name: "logout" }
23
- ], st = [
23
+ ], it = [
24
24
  { path: "/404", name: "notFound" },
25
25
  { path: "/error", name: "error" },
26
26
  { path: "/profile", name: "profile" },
27
27
  { path: "/settings", name: "settings" },
28
28
  { path: "/admin-setup", name: "adminSetup" }
29
29
  ];
30
- function it({ mode: t, config: a, children: n }) {
30
+ function ot({ mode: t, config: a, children: n }) {
31
31
  const r = t === "auth" || t === "auth+utility", l = t === "utility" || t === "auth+utility", m = [
32
- ...r ? lt : [],
33
- ...l ? st : []
32
+ ...r ? st : [],
33
+ ...l ? it : []
34
34
  ], [p, v] = i.useState(null);
35
35
  return i.useEffect(() => {
36
36
  let h = !1;
@@ -48,10 +48,10 @@ function it({ mode: t, config: a, children: n }) {
48
48
  r ? /* @__PURE__ */ e(ee, { path: "*", element: /* @__PURE__ */ e($e, { to: "/login", replace: !0 }) }) : null
49
49
  ] }) : /* @__PURE__ */ e("div", { className: "p-8 text-center text-sm text-[var(--prui-dim)]", children: "Loading…" });
50
50
  }
51
- const ot = i.lazy(
52
- () => Promise.resolve().then(() => Ct).then((t) => ({ default: t.SessionTimeout }))
51
+ const ut = i.lazy(
52
+ () => Promise.resolve().then(() => Tt).then((t) => ({ default: t.SessionTimeout }))
53
53
  );
54
- function ut(t) {
54
+ function ct(t) {
55
55
  const a = t !== !1, n = typeof t == "object" ? t : {}, r = n.persist !== !1, l = We(n.default ?? "control"), m = Xe(l), [p, v] = i.useState(() => (r ? Ge() : null) ?? { theme: l, mode: m }), h = i.useCallback(
56
56
  (f) => {
57
57
  v(f), te({ theme: f.theme, mode: f.mode, storageKey: r ? "prui:theme" : null });
@@ -62,8 +62,8 @@ function ut(t) {
62
62
  te({ theme: p.theme, mode: p.mode, storageKey: r ? "prui:theme" : null });
63
63
  }, [p, r]), { enabled: a, state: p, setTheme: h };
64
64
  }
65
- function ct({ config: t }) {
66
- const { enabled: a, state: n, setTheme: r } = ut(t);
65
+ function dt({ config: t }) {
66
+ const { enabled: a, state: n, setTheme: r } = ct(t);
67
67
  return a ? /* @__PURE__ */ e(
68
68
  He,
69
69
  {
@@ -81,7 +81,9 @@ function ct({ config: t }) {
81
81
  ),
82
82
  items: Qe().map((l) => ({
83
83
  label: `${l}${l === n.theme ? " (active)" : ""}`,
84
- onSelect: () => r({ theme: l, mode: l === "daylight" ? "light" : "dark" })
84
+ onSelect: () => {
85
+ Ze(), r({ theme: l, mode: l === "daylight" ? "light" : "dark" });
86
+ }
85
87
  }))
86
88
  }
87
89
  ) : null;
@@ -89,7 +91,7 @@ function ct({ config: t }) {
89
91
  function re(t, a) {
90
92
  return a === "/" ? t === "/" : t === a || t.startsWith(a + "/");
91
93
  }
92
- function dt({ item: t, onNavigate: a, expandAllOn: n }) {
94
+ function mt({ item: t, onNavigate: a, expandAllOn: n }) {
93
95
  const { pathname: r } = se(), l = (t.items ?? []).some(
94
96
  (h) => h.href ? re(r, h.href) : (h.items ?? []).some((f) => f.href && re(r, f.href))
95
97
  ), [m, p] = i.useState(l || n !== void 0 && r === n);
@@ -118,11 +120,11 @@ function dt({ item: t, onNavigate: a, expandAllOn: n }) {
118
120
  m ? /* @__PURE__ */ e("ul", { className: "ml-4 mt-0.5 flex flex-col gap-0.5 border-l border-[var(--prui-line)] pl-2", children: (t.items ?? []).map((h) => /* @__PURE__ */ e(he, { item: h, onNavigate: a, nested: !0, expandAllOn: n }, h.href ?? h.label)) }) : null
119
121
  ] });
120
122
  }
121
- function mt({ label: t }) {
123
+ function pt({ label: t }) {
122
124
  return /* @__PURE__ */ e("li", { className: "px-2.5 pb-1 pt-3 text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--prui-dim)]", "data-testid": "nav-subgroup", children: t });
123
125
  }
124
126
  function he({ item: t, onNavigate: a, nested: n, expandAllOn: r }) {
125
- return t.items && t.items.length > 0 ? /* @__PURE__ */ e(dt, { item: t, onNavigate: a, expandAllOn: r }) : t.heading || !t.href && !t.items ? /* @__PURE__ */ e(mt, { label: t.label }) : t.href ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
127
+ return t.items && t.items.length > 0 ? /* @__PURE__ */ e(mt, { item: t, onNavigate: a, expandAllOn: r }) : t.heading || !t.href && !t.items ? /* @__PURE__ */ e(pt, { label: t.label }) : t.href ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
126
128
  Le,
127
129
  {
128
130
  to: t.href,
@@ -142,7 +144,7 @@ function he({ item: t, onNavigate: a, nested: n, expandAllOn: r }) {
142
144
  function ae({ nav: t, onNavigate: a, expandAllOn: n }) {
143
145
  return /* @__PURE__ */ e("nav", { "aria-label": "Main", className: "prui-app-nav", children: /* @__PURE__ */ e("ul", { className: "flex flex-col gap-0.5", children: t.map((r) => /* @__PURE__ */ e(he, { item: r, onNavigate: a, expandAllOn: n }, r.href ?? r.label)) }) });
144
146
  }
145
- function pt({ brand: t }) {
147
+ function ft({ brand: t }) {
146
148
  if (!t) return null;
147
149
  const a = /* @__PURE__ */ d(je, { children: [
148
150
  t.mark ? /* @__PURE__ */ e("img", { src: t.mark, alt: "", className: "h-6 w-6 rounded-[var(--prui-radius-1)] object-cover" }) : null,
@@ -150,7 +152,7 @@ function pt({ brand: t }) {
150
152
  ] }), n = "flex items-center gap-2 px-1 py-1 min-w-0";
151
153
  return t.href === null ? /* @__PURE__ */ e("div", { className: n, children: a }) : /* @__PURE__ */ e(Fe, { to: t.href ?? "/", className: n, "aria-label": t.name, children: a });
152
154
  }
153
- function ft({
155
+ function ht({
154
156
  open: t,
155
157
  onOpenChange: a,
156
158
  entries: n,
@@ -228,7 +230,7 @@ function ft({
228
230
  }
229
231
  );
230
232
  }
231
- function ht(t) {
233
+ function bt(t) {
232
234
  const {
233
235
  brand: a,
234
236
  nav: n = [],
@@ -336,7 +338,7 @@ function ht(t) {
336
338
  children: /* @__PURE__ */ e(_e, { className: "h-4 w-4", "aria-hidden": !0 })
337
339
  }
338
340
  ) : null,
339
- /* @__PURE__ */ e("div", { className: "min-w-0 justify-self-start", children: /* @__PURE__ */ e(pt, { brand: a }) }),
341
+ /* @__PURE__ */ e("div", { className: "min-w-0 justify-self-start", children: /* @__PURE__ */ e(ft, { brand: a }) }),
340
342
  M ? /* @__PURE__ */ d(
341
343
  "button",
342
344
  {
@@ -353,29 +355,29 @@ function ht(t) {
353
355
  ) : null,
354
356
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 justify-self-end", children: [
355
357
  v,
356
- /* @__PURE__ */ e(ct, { config: l })
358
+ /* @__PURE__ */ e(dt, { config: l })
357
359
  ] })
358
360
  ]
359
361
  }
360
362
  ),
361
- /* @__PURE__ */ e("main", { className: "flex-1 p-4 md:p-6", children: h ? /* @__PURE__ */ e(it, { mode: h, config: f, children: u }) : u ?? /* @__PURE__ */ e(De, {}) })
363
+ /* @__PURE__ */ e("main", { className: "flex-1 p-4 md:p-6", children: h ? /* @__PURE__ */ e(ot, { mode: h, config: f, children: u }) : u ?? /* @__PURE__ */ e(De, {}) })
362
364
  ] }),
363
365
  s ? /* @__PURE__ */ e(i.Suspense, { fallback: null, children: /* @__PURE__ */ e(
364
- ot,
366
+ ut,
365
367
  {
366
368
  timeout: s.sessionTimeout,
367
369
  warningTime: s.warningTime,
368
370
  onTimeout: g
369
371
  }
370
372
  ) }) : null,
371
- M ? /* @__PURE__ */ e(ft, { open: R, onOpenChange: C, entries: x, placeholder: b.placeholder, onNavigate: w }) : null
373
+ M ? /* @__PURE__ */ e(ht, { open: R, onOpenChange: C, entries: x, placeholder: b.placeholder, onNavigate: w }) : null
372
374
  ] });
373
375
  }
374
- function _t(t) {
376
+ function qt(t) {
375
377
  const { router: a = "browser", initialEntries: n } = t;
376
- return /* @__PURE__ */ e(a === "memory" ? Oe : ze, { initialEntries: n, children: /* @__PURE__ */ e(ht, { ...t }) });
378
+ return /* @__PURE__ */ e(a === "memory" ? Oe : ze, { initialEntries: n, children: /* @__PURE__ */ e(bt, { ...t }) });
377
379
  }
378
- const qt = {
380
+ const Bt = {
379
381
  name: "App",
380
382
  props: [
381
383
  { name: "brand", type: "{ name, mark?, href? }", default: "undefined", control: "object" },
@@ -392,10 +394,10 @@ const qt = {
392
394
  { name: "children", type: "ReactNode", default: "Outlet", control: "none" }
393
395
  ]
394
396
  };
395
- function bt(t) {
397
+ function gt(t) {
396
398
  return Array.isArray(t) ? { fields: t } : t;
397
399
  }
398
- function gt(t) {
400
+ function vt(t) {
399
401
  if (t)
400
402
  return t.map((a) => typeof a == "string" || typeof a == "number" ? { label: String(a), value: String(a) } : a);
401
403
  }
@@ -405,7 +407,7 @@ function ne(t, a) {
405
407
  a && r.name in a ? n[r.name] = a[r.name] : r.defaultValue !== void 0 ? n[r.name] = r.defaultValue : r.type === "boolean" ? n[r.name] = !1 : n[r.name] = "";
406
408
  return n;
407
409
  }
408
- function vt({
410
+ function xt({
409
411
  schema: t,
410
412
  initialValues: a,
411
413
  defaultValues: n,
@@ -416,7 +418,7 @@ function vt({
416
418
  error: v,
417
419
  className: h
418
420
  }) {
419
- const f = i.useMemo(() => bt(t), [t]), k = a ?? n, [u, b] = i.useState(() => ne(f, k)), [M, P] = i.useState({}), [O, y] = i.useState(null), [T, R] = i.useState(!1);
421
+ const f = i.useMemo(() => gt(t), [t]), k = a ?? n, [u, b] = i.useState(() => ne(f, k)), [M, P] = i.useState({}), [O, y] = i.useState(null), [T, R] = i.useState(!1);
420
422
  i.useEffect(() => {
421
423
  b(ne(f, k));
422
424
  }, [JSON.stringify(f), JSON.stringify(k ?? {})]);
@@ -458,12 +460,12 @@ function vt({
458
460
  "aria-describedby": g ? `prui-form-${s.name}-error` : void 0
459
461
  };
460
462
  return /* @__PURE__ */ d("div", { className: E("flex flex-col gap-1.5", s.colSpan === 2 && "md:col-span-2", s.className), children: [
461
- /* @__PURE__ */ d(nt, { htmlFor: x.id, children: [
463
+ /* @__PURE__ */ d(lt, { htmlFor: x.id, children: [
462
464
  s.label,
463
465
  s.required ? /* @__PURE__ */ e("span", { className: "ml-0.5 text-[var(--prui-danger)]", children: "*" }) : null
464
466
  ] }),
465
467
  s.type === "textarea" ? /* @__PURE__ */ e(
466
- at,
468
+ nt,
467
469
  {
468
470
  ...x,
469
471
  placeholder: s.placeholder,
@@ -475,7 +477,7 @@ function vt({
475
477
  oe,
476
478
  {
477
479
  ...x,
478
- options: gt(s.options),
480
+ options: vt(s.options),
479
481
  placeholder: s.placeholder,
480
482
  disabled: s.disabled || w,
481
483
  value: String(u[s.name] ?? ""),
@@ -520,7 +522,7 @@ function vt({
520
522
  ] })
521
523
  ] });
522
524
  }
523
- const Bt = {
525
+ const Kt = {
524
526
  name: "Form",
525
527
  props: [
526
528
  { name: "schema", type: "FormSchema", default: null, control: "object" },
@@ -535,22 +537,22 @@ function be(t) {
535
537
  if (t)
536
538
  return t.map((a) => typeof a == "string" || typeof a == "number" ? { label: String(a), value: String(a) } : a);
537
539
  }
538
- function xt(t, a) {
540
+ function yt(t, a) {
539
541
  return { fields: t.filter((r) => r.formField !== !1 && !r.hidden).filter((r) => r.key !== "id" && r.key !== "actions").map((r) => {
540
542
  var l;
541
543
  return {
542
544
  name: r.key,
543
545
  label: typeof r.label == "string" ? r.label : r.key,
544
- type: yt(r, a),
546
+ type: Nt(r, a),
545
547
  options: (l = be(r.filterOptions ?? r.options)) == null ? void 0 : l.map((m) => ({ label: m.label, value: m.value })),
546
548
  required: !1
547
549
  };
548
550
  }), submitLabel: a ? "Save" : "Create" };
549
551
  }
550
- function yt(t, a) {
552
+ function Nt(t, a) {
551
553
  return t.filter === "select" ? "select" : typeof (a == null ? void 0 : a[t.key]) == "number" || t.filter === "number" || t.filter === "numberrange" || t.filter === "price" ? "number" : t.filter === "date" || t.filter === "daterange" ? "date" : "text";
552
554
  }
553
- function Kt({
555
+ function Vt({
554
556
  name: t,
555
557
  columns: a,
556
558
  list: n,
@@ -594,7 +596,7 @@ function Kt({
594
596
  }, ke = (o) => {
595
597
  H(o), L(!0);
596
598
  }, Ce = async (o) => {
597
- if (!(!await Ze({
599
+ if (!(!await et({
598
600
  title: `Delete ${F}?`,
599
601
  message: "This action cannot be undone.",
600
602
  confirmText: "Delete",
@@ -630,13 +632,13 @@ function Kt({
630
632
  ] })
631
633
  }
632
634
  ] : []
633
- ], Q = f ?? xt(a, D), Ee = D ? Object.fromEntries(
635
+ ], Q = f ?? yt(a, D), Ee = D ? Object.fromEntries(
634
636
  Q.fields.map((o) => [o.name, D[o.name] ?? ""])
635
637
  ) : void 0, F = t.replace(/s$/, "");
636
638
  return /* @__PURE__ */ d("div", { className: E("prui-resource flex flex-col gap-2", M), "data-testid": "resource", children: [
637
639
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h1", { className: "text-xl font-semibold capitalize text-[var(--prui-fg)]", children: t }) }),
638
640
  /* @__PURE__ */ e(
639
- et,
641
+ tt,
640
642
  {
641
643
  searchPlaceholder: u ?? `Search ${t}...`,
642
644
  searchValue: N,
@@ -652,9 +654,9 @@ function Kt({
652
654
  }
653
655
  ),
654
656
  J ? /* @__PURE__ */ e("div", { role: "alert", "data-testid": "resource-error", className: "rounded-[var(--prui-radius)] border border-[var(--prui-danger)]/40 bg-[var(--prui-danger)]/10 px-3 py-2 text-sm text-[var(--prui-danger)]", children: J }) : null,
655
- /* @__PURE__ */ e(tt, { columns: Pe, rows: T, rowKey: k, sort: B, onSortChange: ge, loading: ve }),
657
+ /* @__PURE__ */ e(rt, { columns: Pe, rows: T, rowKey: k, sort: B, onSortChange: ge, loading: ve }),
656
658
  /* @__PURE__ */ e(
657
- rt,
659
+ at,
658
660
  {
659
661
  page: w,
660
662
  pageSize: g,
@@ -667,7 +669,7 @@ function Kt({
667
669
  /* @__PURE__ */ d(ie, { open: xe, onClose: () => L(!1), size: "sm", ariaLabel: D ? `Edit ${F}` : `New ${F}`, noPadding: !0, children: [
668
670
  /* @__PURE__ */ e("div", { className: "px-8 pt-8 pb-2", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", style: { color: "var(--prui-fg)" }, children: D ? `Edit ${F}` : `New ${F}` }) }),
669
671
  /* @__PURE__ */ e("div", { className: "px-8 pb-8", children: h ?? /* @__PURE__ */ e(
670
- vt,
672
+ xt,
671
673
  {
672
674
  schema: Q,
673
675
  initialValues: Ee,
@@ -680,7 +682,7 @@ function Kt({
680
682
  ] })
681
683
  ] });
682
684
  }
683
- const Vt = {
685
+ const Ut = {
684
686
  name: "Resource",
685
687
  props: [
686
688
  { name: "name", type: "string", default: null, control: "text" },
@@ -696,7 +698,7 @@ const Vt = {
696
698
  { name: "pageSize", type: "number", default: "20", control: "number" }
697
699
  ]
698
700
  };
699
- function Ut({ items: t, className: a }) {
701
+ function Jt({ items: t, className: a }) {
700
702
  return /* @__PURE__ */ e("div", { className: E("prui-stat-row grid gap-3 sm:grid-cols-2 lg:grid-cols-4", a), children: t.map((n, r) => {
701
703
  const l = n.icon;
702
704
  return /* @__PURE__ */ d(ce, { "data-testid": "stat-card", children: [
@@ -722,18 +724,18 @@ function Ut({ items: t, className: a }) {
722
724
  ] }, `${n.label}-${r}`);
723
725
  }) });
724
726
  }
725
- const Jt = {
727
+ const Yt = {
726
728
  name: "StatRow",
727
729
  props: [
728
730
  { name: "items", type: "StatItem[]", default: null, control: "object" },
729
731
  { name: "className", type: "string", default: "undefined", control: "text" }
730
732
  ]
731
733
  };
732
- function Nt(t) {
734
+ function wt(t) {
733
735
  if (t)
734
736
  return t.map((a) => typeof a == "string" || typeof a == "number" ? { label: String(a), value: String(a) } : a);
735
737
  }
736
- function wt({ field: t }) {
738
+ function St({ field: t }) {
737
739
  const { name: a, type: n, value: r, onChange: l } = t;
738
740
  if (!n || !a) return null;
739
741
  const m = `prui-settings-${a}`;
@@ -750,7 +752,7 @@ function wt({ field: t }) {
750
752
  {
751
753
  id: m,
752
754
  className: "w-56",
753
- options: Nt(t.options) ?? [],
755
+ options: wt(t.options) ?? [],
754
756
  value: String(r ?? ""),
755
757
  onChange: (p) => l == null ? void 0 : l(p),
756
758
  "aria-label": t.label
@@ -767,7 +769,7 @@ function wt({ field: t }) {
767
769
  }
768
770
  );
769
771
  }
770
- function Yt({ title: t = "Settings", sections: a, className: n }) {
772
+ function Ht({ title: t = "Settings", sections: a, className: n }) {
771
773
  return /* @__PURE__ */ d("div", { className: E("prui-settings mx-auto flex w-full max-w-4xl flex-col gap-6", n), children: [
772
774
  /* @__PURE__ */ e("h1", { className: "text-xl font-semibold text-[var(--prui-fg)]", children: t }),
773
775
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-6 md:flex-row", children: [
@@ -789,20 +791,20 @@ function Yt({ title: t = "Settings", sections: a, className: n }) {
789
791
  /* @__PURE__ */ e("dt", { className: "text-sm font-medium text-[var(--prui-fg)]", children: l.label }),
790
792
  l.description ? /* @__PURE__ */ e("dd", { className: "text-xs text-[var(--prui-dim)]", children: l.description }) : null
791
793
  ] }),
792
- /* @__PURE__ */ e("div", { className: "shrink-0", children: l.control ?? /* @__PURE__ */ e(wt, { field: l }) })
794
+ /* @__PURE__ */ e("div", { className: "shrink-0", children: l.control ?? /* @__PURE__ */ e(St, { field: l }) })
793
795
  ] }, `${l.label}-${m}`)) }) })
794
796
  ] }, r.id)) })
795
797
  ] })
796
798
  ] });
797
799
  }
798
- const Ht = {
800
+ const Wt = {
799
801
  name: "Settings",
800
802
  props: [
801
803
  { name: "title", type: "string", default: "'Settings'", control: "text" },
802
804
  { name: "sections", type: "SettingsSection[]", default: null, control: "object" }
803
805
  ]
804
806
  }, le = ["mousedown", "keydown", "scroll", "touchstart", "click"];
805
- function St({
807
+ function kt({
806
808
  timeout: t = 15,
807
809
  warningTime: a = 2,
808
810
  onTimeout: n,
@@ -857,7 +859,7 @@ function St({
857
859
  }
858
860
  );
859
861
  }
860
- const kt = {
862
+ const Ct = {
861
863
  name: "SessionTimeout",
862
864
  props: [
863
865
  { name: "timeout", type: "number", default: "15", control: "number" },
@@ -865,12 +867,12 @@ const kt = {
865
867
  { name: "onTimeout", type: "() => void", default: null, control: "none" },
866
868
  { name: "onExtend", type: "() => void", default: null, control: "none" }
867
869
  ]
868
- }, Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
870
+ }, Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
869
871
  __proto__: null,
870
- SessionTimeout: St,
871
- sessionTimeoutPropsMeta: kt
872
+ SessionTimeout: kt,
873
+ sessionTimeoutPropsMeta: Ct
872
874
  }, Symbol.toStringTag, { value: "Module" }));
873
- function Wt({ title: t, description: a, brand: n, width: r = "max-w-sm", footer: l, children: m, className: p }) {
875
+ function Xt({ title: t, description: a, brand: n, width: r = "max-w-sm", footer: l, children: m, className: p }) {
874
876
  return /* @__PURE__ */ e("div", { className: E("prui-auth-shell flex min-h-[100dvh] items-center justify-center bg-[var(--prui-background)] p-4", p), "data-testid": "auth-shell", children: /* @__PURE__ */ d("div", { className: E("w-full", r), children: [
875
877
  n ? /* @__PURE__ */ d("div", { className: "mb-6 flex items-center justify-center gap-2", "data-testid": "auth-shell-brand", children: [
876
878
  n.mark ? /* @__PURE__ */ e("img", { src: n.mark, alt: "", className: "h-8 w-8 rounded-[var(--prui-radius-1)] object-cover" }) : null,
@@ -886,7 +888,7 @@ function Wt({ title: t, description: a, brand: n, width: r = "max-w-sm", footer:
886
888
  ] })
887
889
  ] }) });
888
890
  }
889
- const Xt = {
891
+ const Gt = {
890
892
  name: "AuthShell",
891
893
  props: [
892
894
  { name: "title", type: "string", default: null, control: "text" },
@@ -898,23 +900,23 @@ const Xt = {
898
900
  ]
899
901
  };
900
902
  export {
901
- _t as A,
902
- ft as C,
903
- vt as F,
904
- Kt as R,
905
- St as S,
906
- ht as a,
907
- Wt as b,
908
- it as c,
909
- Yt as d,
903
+ qt as A,
904
+ ht as C,
905
+ xt as F,
906
+ Vt as R,
907
+ kt as S,
908
+ bt as a,
909
+ Xt as b,
910
+ ot as c,
911
+ Ht as d,
910
912
  ae as e,
911
- Ut as f,
912
- qt as g,
913
- Xt as h,
914
- Bt as i,
915
- Ht as j,
916
- Jt as k,
917
- Vt as r,
918
- kt as s,
919
- ut as u
913
+ Jt as f,
914
+ Bt as g,
915
+ Gt as h,
916
+ Kt as i,
917
+ Wt as j,
918
+ Yt as k,
919
+ Ut as r,
920
+ Ct as s,
921
+ ct as u
920
922
  };
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { ScrollArea as se, scrollAreaPropsMeta as pe } from "./core/scroll-area.
13
13
  import { Modal as ie, confirmModal as le, confirmModalPropsMeta as ge, modalPropsMeta as me } from "./core/modal.js";
14
14
  import { D as Me, a as de, b as Te, c as fe, d as ue, F as Se, N as ce, P as he, T as xe, e as be, f as Fe, g as De } from "./chunks/data-table-toolbar-BUy2EWPy.js";
15
15
  import { Link as Ae, NavLink as Ce, Navigate as we, Outlet as Ne, Route as ke, Routes as ve } from "react-router-dom";
16
- import { A as Ie, a as ye, b as Ee, c as Be, C as He, F as Oe, R as Ge, S as Ue, d as _e, e as je, f as Ke, g as Ve, h as qe, i as ze, r as Je, s as Qe, j as We, k as Xe, u as Ye } from "./chunks/auth-shell-BYG_ozPZ.js";
16
+ import { A as Ie, a as ye, b as Ee, c as Be, C as He, F as Oe, R as Ge, S as Ue, d as _e, e as je, f as Ke, g as Ve, h as qe, i as ze, r as Je, s as Qe, j as We, k as Xe, u as Ye } from "./chunks/auth-shell-DSG2wWTh.js";
17
17
  import { AdminSetup as $e, EmptyState as ea, ErrorPage as aa, ForgotPasswordPage as ta, LoginPage as oa, LogoutPage as ra, NotFoundPage as sa, OtpPage as pa, PagesRegistry as Pa, ProfilePage as ia, RegisterPage as la, ResetPasswordPage as ga, SettingsPage as ma, adminSetupPropsMeta as na, emptyStatePropsMeta as Ma, errorPagePropsMeta as da, forgotPasswordPagePropsMeta as Ta, loginPagePropsMeta as fa, logoutPagePropsMeta as ua, notFoundPagePropsMeta as Sa, otpPagePropsMeta as ca, profilePagePropsMeta as ha, registerPagePropsMeta as xa, resetPasswordPagePropsMeta as ba, settingsPagePropsMeta as Fa } from "./pages.js";
18
18
  import { PRUI_THEMES as Ra, PRUI_TOKENS as Aa, applyTheme as Ca, applyThemeTokens as wa, clearAppliedTokens as Na, defineTheme as ka, isDarkTheme as va, isLightTheme as La, listThemes as Ia, nextTheme as ya, readPersistedTheme as Ea, resolveThemeName as Ba, restoreAppliedTokens as Ha, themeMeta as Oa, themeMode as Ga } from "./theme.js";
19
19
  import { FormButton as _a, FormGroup as ja, FormInput as Ka, formButtonPropsMeta as Va, formGroupPropsMeta as qa, formInputPropsMeta as za, getFormApi as Ja, registerForm as Qa, useFormApi as Wa } from "./forms.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skiddph/prui",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "PRUI component system: primitives, app-layer super-components, pages, and themes",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",