@skiddph/prui 0.1.0 → 0.2.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.
@@ -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,40 @@
1
1
  import { cn as t } from "./core/cn.js";
2
2
  import { Button as r, buttonPropsMeta as s } from "./core/button.js";
3
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";
4
+ import { Label as m, Separator as n, labelPropsMeta as d, separatorPropsMeta as T } from "./core/label.js";
5
+ import { Select as S, SelectContent as c, SelectItem as b, SelectTrigger as u, SelectValue as x, selectPropsMeta as h } from "./core/select.js";
6
+ import { Switch as F, switchPropsMeta as C } 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 E, Badge as H, Card as I, CardContent as k, CardDescription as B, CardFooter as j, CardHeader as O, 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
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";
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 Se, T as ce, e as be, f as ue, g as xe } from "./chunks/data-table-toolbar-BUy2EWPy.js";
14
+ import { A as De, a as Fe, b as Ce, c as Re, C as we, F as Ae, R as Le, S as Ne, d as ve, e as ye, f as Ee, g as He, h as Ie, i as ke, r as Be, s as je, j as Oe, k as Ue, u as Ve } from "./chunks/auth-shell-DsAwGqf8.js";
15
+ import { AdminSetup as qe, EmptyState as ze, ErrorPage as Ge, ForgotPasswordPage as Je, LoginPage as Ke, LogoutPage as Qe, NotFoundPage as We, OtpPage as Xe, PagesRegistry as Ye, ProfilePage as Ze, RegisterPage as $e, ResetPasswordPage as ea, SettingsPage as aa, adminSetupPropsMeta as ta, emptyStatePropsMeta as oa, errorPagePropsMeta as ra, forgotPasswordPagePropsMeta as sa, loginPagePropsMeta as pa, logoutPagePropsMeta as Pa, notFoundPagePropsMeta as ga, otpPagePropsMeta as ia, profilePagePropsMeta as la, registerPagePropsMeta as Ma, resetPasswordPagePropsMeta as ma, settingsPagePropsMeta as na } from "./pages.js";
16
+ import { PRUI_THEMES as Ta, applyTheme as fa, isDarkTheme as Sa, isLightTheme as ca, nextTheme as ba, readPersistedTheme as ua, resolveThemeName as xa, themeMeta as ha, themeMode as Da } from "./theme.js";
17
17
  export {
18
- Be as AdminSetup,
19
- xe as App,
20
- ue as AppShell,
21
- De as AutoPages,
22
- v as Avatar,
18
+ qe as AdminSetup,
19
+ De as App,
20
+ Fe as AppShell,
21
+ Ce as AuthShell,
22
+ Re as AutoPages,
23
+ E as Avatar,
23
24
  H as Badge,
24
25
  r as Button,
25
26
  I as Card,
26
- B as CardContent,
27
- k as CardDescription,
28
- O as CardFooter,
29
- U as CardHeader,
30
- V as CardTitle,
31
- he as CommandPalette,
27
+ k as CardContent,
28
+ B as CardDescription,
29
+ j as CardFooter,
30
+ O as CardHeader,
31
+ U as CardTitle,
32
+ we as CommandPalette,
32
33
  le as DataTable,
33
34
  Me as DataTablePagination,
34
- de as DataTableToolbar,
35
- ne as DateRangeFilter,
35
+ me as DataTableToolbar,
36
+ ne as DateFilter,
37
+ de as DateRangeFilter,
36
38
  G as Dialog,
37
39
  J as DialogContent,
38
40
  K as DialogDescription,
@@ -40,86 +42,92 @@ export {
40
42
  W as DialogHeader,
41
43
  X as DialogTitle,
42
44
  $ as Dropdown,
43
- ke as EmptyState,
44
- Oe as ErrorPage,
45
- me as FacetedFilter,
46
- Ue as ForgotPasswordPage,
47
- Ce as Form,
45
+ ze as EmptyState,
46
+ Ge as ErrorPage,
47
+ Te as FacetedFilter,
48
+ Je as ForgotPasswordPage,
49
+ Ae as Form,
48
50
  P as Input,
49
- d as Label,
50
- Ve as LoginPage,
51
- _e as LogoutPage,
51
+ m as Label,
52
+ Ke as LoginPage,
53
+ Qe as LogoutPage,
52
54
  se as Modal,
53
- je as NotFoundPage,
55
+ We as NotFoundPage,
54
56
  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,
57
+ Xe as OtpPage,
58
+ Ta as PRUI_THEMES,
59
+ Ye as PagesRegistry,
60
+ Se as PriceFilter,
61
+ Ze as ProfilePage,
62
+ $e as RegisterPage,
63
+ ea as ResetPasswordPage,
64
+ Le as Resource,
62
65
  te as ScrollArea,
63
- b as Select,
66
+ S as Select,
64
67
  c as SelectContent,
65
- S as SelectItem,
66
- x as SelectTrigger,
67
- u as SelectValue,
68
+ b as SelectItem,
69
+ u as SelectTrigger,
70
+ x as SelectValue,
68
71
  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,
72
+ Ne as SessionTimeout,
73
+ ve as Settings,
74
+ aa as SettingsPage,
75
+ ye as SidebarNav,
76
+ Ee as StatRow,
77
+ F as Switch,
78
+ w as Tabs,
75
79
  A as TabsContent,
76
80
  L as TabsList,
77
- y as TabsTrigger,
81
+ N as TabsTrigger,
78
82
  g as Textarea,
79
- We as adminSetupPropsMeta,
80
- Le as appPropsMeta,
81
- ia as applyTheme,
82
- _ as avatarPropsMeta,
83
- j as badgePropsMeta,
83
+ ce as TimeRangeFilter,
84
+ ta as adminSetupPropsMeta,
85
+ He as appPropsMeta,
86
+ fa as applyTheme,
87
+ Ie as authShellPropsMeta,
88
+ V as avatarPropsMeta,
89
+ _ as badgePropsMeta,
84
90
  s as buttonPropsMeta,
85
91
  q as cardPropsMeta,
86
92
  t as cn,
87
93
  pe as confirmModal,
88
94
  Pe as confirmModalPropsMeta,
89
- Te as dataTablePaginationPropsMeta,
90
- be as dataTablePropsMeta,
91
- ce as dataTableToolbarPropsMeta,
95
+ be as dataTablePaginationPropsMeta,
96
+ ue as dataTablePropsMeta,
97
+ xe as dataTableToolbarPropsMeta,
92
98
  Y as dialogPropsMeta,
93
99
  ee as dropdownPropsMeta,
94
- Xe as emptyStatePropsMeta,
95
- Ye as errorPagePropsMeta,
96
- Ze as forgotPasswordPagePropsMeta,
97
- ye as formPropsMeta,
100
+ oa as emptyStatePropsMeta,
101
+ ra as errorPagePropsMeta,
102
+ sa as forgotPasswordPagePropsMeta,
103
+ ke as formPropsMeta,
98
104
  i as inputPropsMeta,
99
- la as isDarkTheme,
100
- Ma as isLightTheme,
101
- m as labelPropsMeta,
102
- $e as loginPagePropsMeta,
103
- ea as logoutPagePropsMeta,
105
+ Sa as isDarkTheme,
106
+ ca as isLightTheme,
107
+ d as labelPropsMeta,
108
+ pa as loginPagePropsMeta,
109
+ Pa as logoutPagePropsMeta,
104
110
  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,
111
+ ba as nextTheme,
112
+ ga as notFoundPagePropsMeta,
113
+ ia as otpPagePropsMeta,
114
+ la as profilePagePropsMeta,
115
+ ua as readPersistedTheme,
116
+ Ma as registerPagePropsMeta,
117
+ ma as resetPasswordPagePropsMeta,
118
+ xa as resolveThemeName,
119
+ Be as resourcePropsMeta,
113
120
  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,
121
+ h as selectPropsMeta,
122
+ T as separatorPropsMeta,
123
+ je as sessionTimeoutPropsMeta,
124
+ na as settingsPagePropsMeta,
125
+ Oe as settingsPropsMeta,
126
+ Ue as statRowPropsMeta,
127
+ C as switchPropsMeta,
128
+ v as tabsPropsMeta,
121
129
  l as textareaPropsMeta,
122
- ma as themeMeta,
123
- fa as themeMode,
124
- He as useThemeState
130
+ ha as themeMeta,
131
+ Da as themeMode,
132
+ Ve as useThemeState
125
133
  };
@@ -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[];