@skiddph/prui 0.1.1 → 0.2.1

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.
@@ -1,6 +1,6 @@
1
- import { jsxs as b, jsx as s, Fragment as O } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as s, Fragment as P } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import { ChevronDown as E, Check as P } from "lucide-react";
3
+ import { ChevronDown as z, Check as D } from "lucide-react";
4
4
  import { cn as m } from "./cn.js";
5
5
  const S = o.createContext(null);
6
6
  function g() {
@@ -8,46 +8,48 @@ function g() {
8
8
  if (!r) throw new Error("Select parts must be used inside <Select>");
9
9
  return r;
10
10
  }
11
- const z = ({
11
+ const F = ({
12
12
  options: r,
13
13
  value: a,
14
14
  defaultValue: t,
15
15
  placeholder: i = "Select...",
16
16
  disabled: e,
17
17
  name: d,
18
- onChange: c,
19
- onOpenChange: l,
20
- children: f
18
+ id: u,
19
+ onChange: l,
20
+ onOpenChange: p,
21
+ children: f,
22
+ ...c
21
23
  }) => {
22
- const [p, u] = o.useState(t ?? ""), [v, I] = o.useState(!1), [R, T] = o.useState(), x = a !== void 0 ? a : p, V = (n) => {
23
- a === void 0 && u(n), c == null || c(n);
24
- }, j = (n) => {
25
- I(n), l == null || l(n);
24
+ const [v, I] = o.useState(t ?? ""), [R, T] = o.useState(!1), [V, j] = o.useState(), x = a !== void 0 ? a : v, O = (n) => {
25
+ a === void 0 && I(n), l == null || l(n);
26
+ }, E = (n) => {
27
+ T(n), p == null || p(n);
26
28
  };
27
29
  return /* @__PURE__ */ b(
28
30
  S.Provider,
29
31
  {
30
- value: { value: x, open: v, triggerId: R, setValue: V, setOpen: j, registerTrigger: T },
32
+ value: { value: x, open: R, triggerId: V, setValue: O, setOpen: E, registerTrigger: j },
31
33
  children: [
32
34
  d ? /* @__PURE__ */ s("input", { type: "hidden", name: d, value: x }) : null,
33
- f ?? /* @__PURE__ */ b(O, { children: [
34
- /* @__PURE__ */ s(h, { disabled: e, children: /* @__PURE__ */ s(y, { placeholder: i }) }),
35
+ f ?? /* @__PURE__ */ b(P, { children: [
36
+ /* @__PURE__ */ s(h, { disabled: e, id: u, ...c, children: /* @__PURE__ */ s(y, { placeholder: i }) }),
35
37
  /* @__PURE__ */ s(w, { children: (r ?? []).map((n) => /* @__PURE__ */ s(N, { value: n.value, disabled: n.disabled, children: n.label }, n.value)) })
36
38
  ] })
37
39
  ]
38
40
  }
39
41
  );
40
42
  };
41
- z.displayName = "Select";
43
+ F.displayName = "Select";
42
44
  const h = o.forwardRef(
43
- ({ className: r, children: a, onClick: t, disabled: i, id: e, ...d }, c) => {
44
- const { open: l, setOpen: f, registerTrigger: p } = g();
45
+ ({ className: r, children: a, onClick: t, disabled: i, id: e, ...d }, u) => {
46
+ const { open: l, setOpen: p, registerTrigger: f } = g();
45
47
  return o.useEffect(() => {
46
- e && p(e);
47
- }, [e, p]), /* @__PURE__ */ b(
48
+ e && f(e);
49
+ }, [e, f]), /* @__PURE__ */ b(
48
50
  "button",
49
51
  {
50
- ref: c,
52
+ ref: u,
51
53
  id: e,
52
54
  type: "button",
53
55
  role: "combobox",
@@ -62,13 +64,13 @@ const h = o.forwardRef(
62
64
  "disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
63
65
  r
64
66
  ),
65
- onClick: (u) => {
66
- t == null || t(u), u.defaultPrevented || f(!l);
67
+ onClick: (c) => {
68
+ t == null || t(c), c.defaultPrevented || p(!l);
67
69
  },
68
70
  ...d,
69
71
  children: [
70
72
  a,
71
- /* @__PURE__ */ s(E, { className: m("h-4 w-4 shrink-0 text-[var(--prui-dim)] transition-transform", l && "rotate-180"), "aria-hidden": !0 })
73
+ /* @__PURE__ */ s(z, { className: m("h-4 w-4 shrink-0 text-[var(--prui-dim)] transition-transform", l && "rotate-180"), "aria-hidden": !0 })
72
74
  ]
73
75
  }
74
76
  );
@@ -84,13 +86,13 @@ const y = o.forwardRef(
84
86
  y.displayName = "SelectValue";
85
87
  const w = o.forwardRef(
86
88
  ({ className: r, children: a, ...t }, i) => {
87
- const { open: e, setOpen: d, triggerId: c } = g();
89
+ const { open: e, setOpen: d, triggerId: u } = g();
88
90
  return e ? /* @__PURE__ */ s(
89
91
  "div",
90
92
  {
91
93
  ref: i,
92
94
  role: "listbox",
93
- "aria-labelledby": c,
95
+ "aria-labelledby": u,
94
96
  tabIndex: -1,
95
97
  "data-state": e ? "open" : "closed",
96
98
  className: m(
@@ -106,37 +108,37 @@ const w = o.forwardRef(
106
108
  );
107
109
  w.displayName = "SelectContent";
108
110
  const N = o.forwardRef(
109
- ({ className: r, value: a, disabled: t, children: i, onClick: e, ...d }, c) => {
110
- const { value: l, setValue: f, setOpen: p } = g(), u = l === a;
111
+ ({ className: r, value: a, disabled: t, children: i, onClick: e, ...d }, u) => {
112
+ const { value: l, setValue: p, setOpen: f } = g(), c = l === a;
111
113
  return /* @__PURE__ */ b(
112
114
  "div",
113
115
  {
114
- ref: c,
116
+ ref: u,
115
117
  role: "option",
116
- "aria-selected": u,
118
+ "aria-selected": c,
117
119
  "aria-disabled": t,
118
- "data-selected": u || void 0,
120
+ "data-selected": c || void 0,
119
121
  className: m(
120
122
  "prui-select-item relative flex cursor-pointer items-center gap-2 rounded-[calc(var(--prui-radius)-1px)]",
121
123
  "py-1.5 pl-3 pr-8 text-sm text-[var(--prui-fg)] hover:bg-[var(--prui-raise)]",
122
- u && "font-medium",
124
+ c && "font-medium",
123
125
  t && "opacity-50 pointer-events-none",
124
126
  r
125
127
  ),
126
128
  onClick: (v) => {
127
- e == null || e(v), !(v.defaultPrevented || t) && (f(a), p(!1));
129
+ e == null || e(v), !(v.defaultPrevented || t) && (p(a), f(!1));
128
130
  },
129
131
  ...d,
130
132
  children: [
131
133
  i,
132
- u ? /* @__PURE__ */ s(P, { className: "absolute right-2 h-4 w-4 text-[var(--prui-brand)]", "aria-hidden": !0 }) : null
134
+ c ? /* @__PURE__ */ s(D, { className: "absolute right-2 h-4 w-4 text-[var(--prui-brand)]", "aria-hidden": !0 }) : null
133
135
  ]
134
136
  }
135
137
  );
136
138
  }
137
139
  );
138
140
  N.displayName = "SelectItem";
139
- const U = {
141
+ const A = {
140
142
  name: "Select",
141
143
  props: [
142
144
  { name: "options", type: "SelectOption[]", default: "[]", control: "object" },
@@ -148,10 +150,10 @@ const U = {
148
150
  ]
149
151
  };
150
152
  export {
151
- z as Select,
153
+ F as Select,
152
154
  w as SelectContent,
153
155
  N as SelectItem,
154
156
  h as SelectTrigger,
155
157
  y as SelectValue,
156
- U as selectPropsMeta
158
+ A as selectPropsMeta
157
159
  };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ /** Single-date filter: one date input (exact day match). */
3
+ export interface DateValue {
4
+ date?: string;
5
+ }
6
+ export interface DateFilterProps {
7
+ label?: string;
8
+ value?: DateValue;
9
+ defaultValue?: DateValue;
10
+ onChange?: (value: DateValue) => void;
11
+ className?: string;
12
+ }
13
+ export declare function DateFilter({ label, value: valueProp, defaultValue, onChange, className, }: DateFilterProps): React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ /** Price range filter: min and max with a currency symbol. */
3
+ export interface PriceRangeValue {
4
+ min?: number;
5
+ max?: number;
6
+ }
7
+ export interface PriceFilterProps {
8
+ label?: string;
9
+ value?: PriceRangeValue;
10
+ defaultValue?: PriceRangeValue;
11
+ onChange?: (value: PriceRangeValue) => void;
12
+ /** Currency symbol shown inside the inputs. */
13
+ currency?: string;
14
+ className?: string;
15
+ }
16
+ export declare function PriceFilter({ label, value: valueProp, defaultValue, onChange, currency, className, }: PriceFilterProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ /** Time range filter: start and end as HH:MM strings. */
3
+ export interface TimeRangeValue {
4
+ from?: string;
5
+ to?: string;
6
+ }
7
+ export interface TimeRangeFilterProps {
8
+ label?: string;
9
+ value?: TimeRangeValue;
10
+ defaultValue?: TimeRangeValue;
11
+ onChange?: (value: TimeRangeValue) => void;
12
+ className?: string;
13
+ }
14
+ export declare function TimeRangeFilter({ label, value: valueProp, defaultValue, onChange, className, }: TimeRangeFilterProps): React.JSX.Element;
@@ -5,8 +5,10 @@ import * as React from "react";
5
5
  * Toolbar: search input plus declarative filters.
6
6
  * Filter config entries are column keys with a type; the toolbar renders the
7
7
  * matching filter control and reports values through onFilterChange.
8
+ * Type names mirror the icanhelp filter family: faceted select, date,
9
+ * daterange, number, price, time.
8
10
  */
9
- export type ToolbarFilterType = "select" | "daterange" | "numberrange";
11
+ export type ToolbarFilterType = "select" | "date" | "daterange" | "number" | "numberrange" | "price" | "time";
10
12
  export interface ToolbarFilterConfig {
11
13
  key: string;
12
14
  label: string;
@@ -14,9 +16,11 @@ export interface ToolbarFilterConfig {
14
16
  /** Options for type select. */
15
17
  options?: FacetOption[];
16
18
  }
17
- export type ToolbarFilterValue = string[] | {
19
+ export type ToolbarFilterValue = string[] | string | {
18
20
  from?: string;
19
21
  to?: string;
22
+ } | {
23
+ date?: string;
20
24
  } | {
21
25
  min?: number;
22
26
  max?: number;
@@ -4,4 +4,7 @@ export { DataTablePagination, dataTablePaginationPropsMeta, type DataTablePagina
4
4
  export { DataTableToolbar, dataTableToolbarPropsMeta, type DataTableToolbarProps, type ToolbarFilterConfig, type ToolbarFilterType, type ToolbarFilterValue, type ToolbarFilterValues, } from './data-table-toolbar';
5
5
  export { FacetedFilter, type FacetedFilterProps, type FacetOption } from './data-table-faceted-filter';
6
6
  export { DateRangeFilter, type DateRangeFilterProps, type DateRangeValue } from './data-table-daterange-filter';
7
+ export { DateFilter, type DateFilterProps, type DateValue } from './data-table-date-filter';
7
8
  export { NumberRangeFilter, type NumberRangeFilterProps, type NumberRangeValue } from './data-table-number-range-filter';
9
+ export { PriceFilter, type PriceFilterProps, type PriceRangeValue } from './data-table-price-filter';
10
+ export { TimeRangeFilter, type TimeRangeFilterProps, type TimeRangeValue } from './data-table-time-range-filter';
@@ -1,12 +1,15 @@
1
- import { D as t, a as s, b as l, c as o, F as r, N as b, d as T, e as i, f as n } from "./chunks/data-table-toolbar-C9likJBN.js";
1
+ import { D as t, a as r, b as s, c as l, d as i, F as o, N as b, P as T, T as F, e as n, f as P, g } from "./chunks/data-table-toolbar-BUy2EWPy.js";
2
2
  export {
3
3
  t as DataTable,
4
- s as DataTablePagination,
5
- l as DataTableToolbar,
6
- o as DateRangeFilter,
7
- r as FacetedFilter,
4
+ r as DataTablePagination,
5
+ s as DataTableToolbar,
6
+ l as DateFilter,
7
+ i as DateRangeFilter,
8
+ o as FacetedFilter,
8
9
  b as NumberRangeFilter,
9
- T as dataTablePaginationPropsMeta,
10
- i as dataTablePropsMeta,
11
- n as dataTableToolbarPropsMeta
10
+ T as PriceFilter,
11
+ F as TimeRangeFilter,
12
+ n as dataTablePaginationPropsMeta,
13
+ P as dataTablePropsMeta,
14
+ g as dataTableToolbarPropsMeta
12
15
  };
package/dist/index.js CHANGED
@@ -1,38 +1,41 @@
1
1
  import { cn as t } from "./core/cn.js";
2
2
  import { Button as r, buttonPropsMeta as s } from "./core/button.js";
3
- import { Input as P, Textarea as g, inputPropsMeta as i, textareaPropsMeta as l } from "./core/input.js";
4
- import { Label as d, Separator as n, labelPropsMeta as m, separatorPropsMeta as f } from "./core/label.js";
5
- import { Select as b, SelectContent as c, SelectItem as S, SelectTrigger as x, SelectValue as u, selectPropsMeta as D } from "./core/select.js";
6
- import { Switch as C, switchPropsMeta as F } from "./core/switch.js";
7
- import { Tabs as R, TabsContent as A, TabsList as L, TabsTrigger as y, tabsPropsMeta as E } from "./core/tabs.js";
8
- import { Avatar as v, Badge as H, Card as I, CardContent as B, CardDescription as k, CardFooter as O, CardHeader as U, CardTitle as V, avatarPropsMeta as _, badgePropsMeta as j, cardPropsMeta as q } from "./core/card.js";
3
+ import { Input as P, Textarea as i, inputPropsMeta as g, textareaPropsMeta as l } from "./core/input.js";
4
+ import { Label as m, Separator as n, labelPropsMeta as d, separatorPropsMeta as T } from "./core/label.js";
5
+ import { Select as u, SelectContent as S, SelectItem as c, SelectTrigger as b, SelectValue as x, selectPropsMeta as h } from "./core/select.js";
6
+ import { Switch as F, switchPropsMeta as R } from "./core/switch.js";
7
+ import { Tabs as w, TabsContent as A, TabsList as L, TabsTrigger as N, tabsPropsMeta as v } from "./core/tabs.js";
8
+ import { Avatar as y, Badge as E, Card as H, CardContent as I, CardDescription as B, CardFooter as O, CardHeader as j, CardTitle as U, avatarPropsMeta as V, badgePropsMeta as _, cardPropsMeta as q } from "./core/card.js";
9
9
  import { Dialog as G, DialogContent as J, DialogDescription as K, DialogFooter as Q, DialogHeader as W, DialogTitle as X, dialogPropsMeta as Y } from "./core/dialog.js";
10
10
  import { Dropdown as $, dropdownPropsMeta as ee } from "./core/dropdown.js";
11
11
  import { ScrollArea as te, scrollAreaPropsMeta as oe } from "./core/scroll-area.js";
12
- import { Modal as se, confirmModal as pe, confirmModalPropsMeta as Pe, modalPropsMeta as ge } from "./core/modal.js";
13
- import { D as le, a as Me, b as de, c as ne, F as me, N as fe, d as Te, e as be, f as ce } from "./chunks/data-table-toolbar-C9likJBN.js";
14
- import { A as xe, a as ue, b as De, C as he, F as Ce, R as Fe, S as we, c as Re, d as Ae, e as Le, f as ye, r as Ee, s as Ne, g as ve, u as He } from "./chunks/settings-DUz5nyX-.js";
15
- import { AdminSetup as Be, EmptyState as ke, ErrorPage as Oe, ForgotPasswordPage as Ue, LoginPage as Ve, LogoutPage as _e, NotFoundPage as je, OtpPage as qe, PagesRegistry as ze, ProfilePage as Ge, RegisterPage as Je, ResetPasswordPage as Ke, SettingsPage as Qe, adminSetupPropsMeta as We, emptyStatePropsMeta as Xe, errorPagePropsMeta as Ye, forgotPasswordPagePropsMeta as Ze, loginPagePropsMeta as $e, logoutPagePropsMeta as ea, notFoundPagePropsMeta as aa, otpPagePropsMeta as ta, profilePagePropsMeta as oa, registerPagePropsMeta as ra, resetPasswordPagePropsMeta as sa, settingsPagePropsMeta as pa } from "./pages.js";
16
- import { PRUI_THEMES as ga, applyTheme as ia, isDarkTheme as la, isLightTheme as Ma, nextTheme as da, readPersistedTheme as na, themeMeta as ma, themeMode as fa } from "./theme.js";
12
+ import { Modal as se, confirmModal as pe, confirmModalPropsMeta as Pe, modalPropsMeta as ie } from "./core/modal.js";
13
+ import { D as le, a as Me, b as me, c as ne, d as de, F as Te, N as fe, P as ue, T as Se, e as ce, f as be, g as xe } from "./chunks/data-table-toolbar-BUy2EWPy.js";
14
+ import { Link as De, NavLink as Fe, Navigate as Re, Outlet as Ce, Route as we, Routes as Ae } from "react-router-dom";
15
+ import { A as Ne, a as ve, b as ke, c as ye, C as Ee, F as He, R as Ie, S as Be, d as Oe, e as je, f as Ue, g as Ve, h as _e, i as qe, r as ze, s as Ge, j as Je, k as Ke, u as Qe } from "./chunks/auth-shell-DsAwGqf8.js";
16
+ import { AdminSetup as Xe, EmptyState as Ye, ErrorPage as Ze, ForgotPasswordPage as $e, LoginPage as ea, LogoutPage as aa, NotFoundPage as ta, OtpPage as oa, PagesRegistry as ra, ProfilePage as sa, RegisterPage as pa, ResetPasswordPage as Pa, SettingsPage as ia, adminSetupPropsMeta as ga, emptyStatePropsMeta as la, errorPagePropsMeta as Ma, forgotPasswordPagePropsMeta as ma, loginPagePropsMeta as na, logoutPagePropsMeta as da, notFoundPagePropsMeta as Ta, otpPagePropsMeta as fa, profilePagePropsMeta as ua, registerPagePropsMeta as Sa, resetPasswordPagePropsMeta as ca, settingsPagePropsMeta as ba } from "./pages.js";
17
+ import { PRUI_THEMES as ha, applyTheme as Da, isDarkTheme as Fa, isLightTheme as Ra, nextTheme as Ca, readPersistedTheme as wa, resolveThemeName as Aa, themeMeta as La, themeMode as Na } from "./theme.js";
17
18
  export {
18
- Be as AdminSetup,
19
- xe as App,
20
- ue as AppShell,
21
- De as AutoPages,
22
- v as Avatar,
23
- H as Badge,
19
+ Xe as AdminSetup,
20
+ Ne as App,
21
+ ve as AppShell,
22
+ ke as AuthShell,
23
+ ye as AutoPages,
24
+ y as Avatar,
25
+ E as Badge,
24
26
  r as Button,
25
- I as Card,
26
- B as CardContent,
27
- k as CardDescription,
27
+ H as Card,
28
+ I as CardContent,
29
+ B as CardDescription,
28
30
  O as CardFooter,
29
- U as CardHeader,
30
- V as CardTitle,
31
- he as CommandPalette,
31
+ j as CardHeader,
32
+ U as CardTitle,
33
+ Ee as CommandPalette,
32
34
  le as DataTable,
33
35
  Me as DataTablePagination,
34
- de as DataTableToolbar,
35
- ne as DateRangeFilter,
36
+ me as DataTableToolbar,
37
+ ne as DateFilter,
38
+ de as DateRangeFilter,
36
39
  G as Dialog,
37
40
  J as DialogContent,
38
41
  K as DialogDescription,
@@ -40,86 +43,98 @@ export {
40
43
  W as DialogHeader,
41
44
  X as DialogTitle,
42
45
  $ as Dropdown,
43
- ke as EmptyState,
44
- Oe as ErrorPage,
45
- me as FacetedFilter,
46
- Ue as ForgotPasswordPage,
47
- Ce as Form,
46
+ Ye as EmptyState,
47
+ Ze as ErrorPage,
48
+ Te as FacetedFilter,
49
+ $e as ForgotPasswordPage,
50
+ He as Form,
48
51
  P as Input,
49
- d as Label,
50
- Ve as LoginPage,
51
- _e as LogoutPage,
52
+ m as Label,
53
+ De as Link,
54
+ ea as LoginPage,
55
+ aa as LogoutPage,
52
56
  se as Modal,
53
- je as NotFoundPage,
57
+ Fe as NavLink,
58
+ Re as Navigate,
59
+ ta as NotFoundPage,
54
60
  fe as NumberRangeFilter,
55
- qe as OtpPage,
56
- ga as PRUI_THEMES,
57
- ze as PagesRegistry,
58
- Ge as ProfilePage,
59
- Je as RegisterPage,
60
- Ke as ResetPasswordPage,
61
- Fe as Resource,
61
+ oa as OtpPage,
62
+ Ce as Outlet,
63
+ ha as PRUI_THEMES,
64
+ ra as PagesRegistry,
65
+ ue as PriceFilter,
66
+ sa as ProfilePage,
67
+ pa as RegisterPage,
68
+ Pa as ResetPasswordPage,
69
+ Ie as Resource,
70
+ we as Route,
71
+ Ae as Routes,
62
72
  te as ScrollArea,
63
- b as Select,
64
- c as SelectContent,
65
- S as SelectItem,
66
- x as SelectTrigger,
67
- u as SelectValue,
73
+ u as Select,
74
+ S as SelectContent,
75
+ c as SelectItem,
76
+ b as SelectTrigger,
77
+ x as SelectValue,
68
78
  n as Separator,
69
- we as Settings,
70
- Qe as SettingsPage,
71
- Re as SidebarNav,
72
- Ae as StatRow,
73
- C as Switch,
74
- R as Tabs,
79
+ Be as SessionTimeout,
80
+ Oe as Settings,
81
+ ia as SettingsPage,
82
+ je as SidebarNav,
83
+ Ue as StatRow,
84
+ F as Switch,
85
+ w as Tabs,
75
86
  A as TabsContent,
76
87
  L as TabsList,
77
- y as TabsTrigger,
78
- g as Textarea,
79
- We as adminSetupPropsMeta,
80
- Le as appPropsMeta,
81
- ia as applyTheme,
82
- _ as avatarPropsMeta,
83
- j as badgePropsMeta,
88
+ N as TabsTrigger,
89
+ i as Textarea,
90
+ Se as TimeRangeFilter,
91
+ ga as adminSetupPropsMeta,
92
+ Ve as appPropsMeta,
93
+ Da as applyTheme,
94
+ _e as authShellPropsMeta,
95
+ V as avatarPropsMeta,
96
+ _ as badgePropsMeta,
84
97
  s as buttonPropsMeta,
85
98
  q as cardPropsMeta,
86
99
  t as cn,
87
100
  pe as confirmModal,
88
101
  Pe as confirmModalPropsMeta,
89
- Te as dataTablePaginationPropsMeta,
102
+ ce as dataTablePaginationPropsMeta,
90
103
  be as dataTablePropsMeta,
91
- ce as dataTableToolbarPropsMeta,
104
+ xe as dataTableToolbarPropsMeta,
92
105
  Y as dialogPropsMeta,
93
106
  ee as dropdownPropsMeta,
94
- Xe as emptyStatePropsMeta,
95
- Ye as errorPagePropsMeta,
96
- Ze as forgotPasswordPagePropsMeta,
97
- ye as formPropsMeta,
98
- i as inputPropsMeta,
99
- la as isDarkTheme,
100
- Ma as isLightTheme,
101
- m as labelPropsMeta,
102
- $e as loginPagePropsMeta,
103
- ea as logoutPagePropsMeta,
104
- ge as modalPropsMeta,
105
- da as nextTheme,
106
- aa as notFoundPagePropsMeta,
107
- ta as otpPagePropsMeta,
108
- oa as profilePagePropsMeta,
109
- na as readPersistedTheme,
110
- ra as registerPagePropsMeta,
111
- sa as resetPasswordPagePropsMeta,
112
- Ee as resourcePropsMeta,
107
+ la as emptyStatePropsMeta,
108
+ Ma as errorPagePropsMeta,
109
+ ma as forgotPasswordPagePropsMeta,
110
+ qe as formPropsMeta,
111
+ g as inputPropsMeta,
112
+ Fa as isDarkTheme,
113
+ Ra as isLightTheme,
114
+ d as labelPropsMeta,
115
+ na as loginPagePropsMeta,
116
+ da as logoutPagePropsMeta,
117
+ ie as modalPropsMeta,
118
+ Ca as nextTheme,
119
+ Ta as notFoundPagePropsMeta,
120
+ fa as otpPagePropsMeta,
121
+ ua as profilePagePropsMeta,
122
+ wa as readPersistedTheme,
123
+ Sa as registerPagePropsMeta,
124
+ ca as resetPasswordPagePropsMeta,
125
+ Aa as resolveThemeName,
126
+ ze as resourcePropsMeta,
113
127
  oe as scrollAreaPropsMeta,
114
- D as selectPropsMeta,
115
- f as separatorPropsMeta,
116
- pa as settingsPagePropsMeta,
117
- Ne as settingsPropsMeta,
118
- ve as statRowPropsMeta,
119
- F as switchPropsMeta,
120
- E as tabsPropsMeta,
128
+ h as selectPropsMeta,
129
+ T as separatorPropsMeta,
130
+ Ge as sessionTimeoutPropsMeta,
131
+ ba as settingsPagePropsMeta,
132
+ Je as settingsPropsMeta,
133
+ Ke as statRowPropsMeta,
134
+ R as switchPropsMeta,
135
+ v as tabsPropsMeta,
121
136
  l as textareaPropsMeta,
122
- ma as themeMeta,
123
- fa as themeMode,
124
- He as useThemeState
137
+ La as themeMeta,
138
+ Na as themeMode,
139
+ Qe as useThemeState
125
140
  };
@@ -1,5 +1,5 @@
1
1
  import { PropsMeta } from '../core/props-meta';
2
- import { PageLink } from './shared';
2
+ import { PageLinkInput } from './shared';
3
3
  import { BrandConfig } from '../app/app';
4
4
  import * as React from "react";
5
5
  export interface ForgotPasswordPageProps {
@@ -7,8 +7,8 @@ export interface ForgotPasswordPageProps {
7
7
  email: string;
8
8
  }) => void | Promise<void>;
9
9
  links?: {
10
- login?: PageLink | false;
11
- register?: PageLink | false;
10
+ login?: PageLinkInput | false;
11
+ register?: PageLinkInput | false;
12
12
  };
13
13
  brand?: BrandConfig;
14
14
  submitLabel?: string;
@@ -1,19 +1,19 @@
1
1
  import { PropsMeta } from '../core/props-meta';
2
- import { PageField, PageLink, OAuthProvider } from './shared';
2
+ import { PageField, PageLinkInput, OAuthProviderInput } from './shared';
3
3
  import { BrandConfig } from '../app/app';
4
4
  import * as React from "react";
5
5
  export interface LoginLinks {
6
- forgot?: PageLink | false;
7
- register?: PageLink | false;
6
+ forgot?: PageLinkInput | false;
7
+ register?: PageLinkInput | false;
8
8
  }
9
9
  export interface LoginPageProps {
10
10
  onSubmit?: (values: Record<string, string>) => void | Promise<void>;
11
11
  /** Per-field show/hide: keys match field names, true renders the field. */
12
- fields?: Partial<Record<"email" | "password" | "remember", boolean>>;
12
+ fields?: Partial<Record<"username" | "email" | "password" | "remember", boolean>>;
13
13
  /** Extra fields appended to the defaults. */
14
14
  extraFields?: PageField[];
15
15
  links?: LoginLinks;
16
- oauth?: OAuthProvider[];
16
+ oauth?: OAuthProviderInput[];
17
17
  brand?: BrandConfig;
18
18
  submitLabel?: string;
19
19
  loading?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { PropsMeta } from '../core/props-meta';
2
- import { PageField, PageLink, OAuthProvider } from './shared';
2
+ import { PageField, PageLinkInput, OAuthProviderInput } from './shared';
3
3
  import { BrandConfig } from '../app/app';
4
4
  import * as React from "react";
5
5
  export interface RegisterPageProps {
@@ -7,9 +7,9 @@ export interface RegisterPageProps {
7
7
  fields?: Partial<Record<"name" | "email" | "password" | "confirm", boolean>>;
8
8
  extraFields?: PageField[];
9
9
  links?: {
10
- login?: PageLink | false;
10
+ login?: PageLinkInput | false;
11
11
  };
12
- oauth?: OAuthProvider[];
12
+ oauth?: OAuthProviderInput[];
13
13
  brand?: BrandConfig;
14
14
  submitLabel?: string;
15
15
  loading?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { PropsMeta } from '../core/props-meta';
2
- import { PageLink } from './shared';
2
+ import { PageLinkInput } from './shared';
3
3
  import { BrandConfig } from '../app/app';
4
4
  import * as React from "react";
5
5
  export interface ResetPasswordPageProps {
@@ -9,7 +9,7 @@ export interface ResetPasswordPageProps {
9
9
  }) => void | Promise<void>;
10
10
  fields?: Partial<Record<"password" | "confirm", boolean>>;
11
11
  links?: {
12
- login?: PageLink | false;
12
+ login?: PageLinkInput | false;
13
13
  };
14
14
  brand?: BrandConfig;
15
15
  submitLabel?: string;
@@ -25,6 +25,13 @@ export interface OAuthProvider {
25
25
  className?: string;
26
26
  }>;
27
27
  }
28
+ /** Well-known providers may be passed as plain ids. */
29
+ export type OAuthProviderInput = OAuthProvider | "google" | "github" | "microsoft";
30
+ export declare function normalizeProviders(providers?: OAuthProviderInput[]): OAuthProvider[];
31
+ /** Links accept a plain href string or a {label, href} object. */
32
+ export type PageLinkInput = PageLink | string;
33
+ export declare function linkHref(link: PageLinkInput): string;
34
+ export declare function linkLabel(link: PageLinkInput, fallback: string): string;
28
35
  export interface PageSubmitState {
29
36
  loading?: boolean;
30
37
  error?: string | null;
@@ -47,8 +54,8 @@ export declare function LoadingButtonLabel({ loading, children }: {
47
54
  loading?: boolean;
48
55
  children: React.ReactNode;
49
56
  }): React.JSX.Element;
50
- export declare function OAuthButtons({ providers }: {
51
- providers?: OAuthProvider[];
57
+ export declare function OAuthButtons({ providers: rawProviders }: {
58
+ providers?: OAuthProviderInput[];
52
59
  }): React.JSX.Element | null;
53
60
  /** Default field sets per page; pages merge with caller overrides via the fields prop. */
54
61
  export declare const defaultLoginFields: PageField[];