@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.
- package/dist/app/app.d.ts +19 -9
- package/dist/app/auth-shell.d.ts +52 -0
- package/dist/app/form.d.ts +12 -6
- package/dist/app/index.d.ts +4 -2
- package/dist/app/resource.d.ts +17 -8
- package/dist/app/session-timeout.d.ts +45 -0
- package/dist/app/settings.d.ts +19 -2
- package/dist/app.js +13 -9
- package/dist/chunks/auth-shell-DsAwGqf8.js +917 -0
- package/dist/chunks/data-table-toolbar-BUy2EWPy.js +581 -0
- package/dist/core/modal.js +8 -8
- package/dist/core/select.d.ts +1 -1
- package/dist/core/select.js +37 -35
- package/dist/data-table/data-table-date-filter.d.ts +13 -0
- package/dist/data-table/data-table-price-filter.d.ts +16 -0
- package/dist/data-table/data-table-time-range-filter.d.ts +14 -0
- package/dist/data-table/data-table-toolbar.d.ts +6 -2
- package/dist/data-table/index.d.ts +3 -0
- package/dist/data-table.js +11 -8
- package/dist/index.js +92 -84
- package/dist/pages/forgot-password.d.ts +3 -3
- package/dist/pages/login.d.ts +5 -5
- package/dist/pages/register.d.ts +3 -3
- package/dist/pages/reset-password.d.ts +2 -2
- package/dist/pages/shared.d.ts +9 -2
- package/dist/pages.js +256 -233
- package/dist/theme/index.d.ts +10 -3
- package/dist/theme.js +33 -28
- package/package.json +7 -3
- package/dist/chunks/data-table-toolbar-C9likJBN.js +0 -430
- package/dist/chunks/settings-DUz5nyX-.js +0 -731
package/dist/core/select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as b, jsx as s, Fragment as
|
|
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
|
|
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
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
id: u,
|
|
19
|
+
onChange: l,
|
|
20
|
+
onOpenChange: p,
|
|
21
|
+
children: f,
|
|
22
|
+
...c
|
|
21
23
|
}) => {
|
|
22
|
-
const [
|
|
23
|
-
a === void 0 &&
|
|
24
|
-
},
|
|
25
|
-
|
|
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:
|
|
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(
|
|
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
|
-
|
|
43
|
+
F.displayName = "Select";
|
|
42
44
|
const h = o.forwardRef(
|
|
43
|
-
({ className: r, children: a, onClick: t, disabled: i, id: e, ...d },
|
|
44
|
-
const { open: l, setOpen:
|
|
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 &&
|
|
47
|
-
}, [e,
|
|
48
|
+
e && f(e);
|
|
49
|
+
}, [e, f]), /* @__PURE__ */ b(
|
|
48
50
|
"button",
|
|
49
51
|
{
|
|
50
|
-
ref:
|
|
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: (
|
|
66
|
-
t == null || t(
|
|
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(
|
|
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:
|
|
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":
|
|
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 },
|
|
110
|
-
const { value: l, setValue:
|
|
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:
|
|
116
|
+
ref: u,
|
|
115
117
|
role: "option",
|
|
116
|
-
"aria-selected":
|
|
118
|
+
"aria-selected": c,
|
|
117
119
|
"aria-disabled": t,
|
|
118
|
-
"data-selected":
|
|
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
|
-
|
|
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) && (
|
|
129
|
+
e == null || e(v), !(v.defaultPrevented || t) && (p(a), f(!1));
|
|
128
130
|
},
|
|
129
131
|
...d,
|
|
130
132
|
children: [
|
|
131
133
|
i,
|
|
132
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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';
|
package/dist/data-table.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { D as t, a as
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
10
|
-
|
|
11
|
-
n as
|
|
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
|
|
5
|
-
import { Select as
|
|
6
|
-
import { Switch as
|
|
7
|
-
import { Tabs as
|
|
8
|
-
import { Avatar as
|
|
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
|
|
14
|
-
import { A as
|
|
15
|
-
import { AdminSetup as
|
|
16
|
-
import { PRUI_THEMES as
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
35
|
-
ne as
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
m as Label,
|
|
52
|
+
Ke as LoginPage,
|
|
53
|
+
Qe as LogoutPage,
|
|
52
54
|
se as Modal,
|
|
53
|
-
|
|
55
|
+
We as NotFoundPage,
|
|
54
56
|
fe as NumberRangeFilter,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
66
|
+
S as Select,
|
|
64
67
|
c as SelectContent,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
b as SelectItem,
|
|
69
|
+
u as SelectTrigger,
|
|
70
|
+
x as SelectValue,
|
|
68
71
|
n as Separator,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
81
|
+
N as TabsTrigger,
|
|
78
82
|
g as Textarea,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
be as dataTablePaginationPropsMeta,
|
|
96
|
+
ue as dataTablePropsMeta,
|
|
97
|
+
xe as dataTableToolbarPropsMeta,
|
|
92
98
|
Y as dialogPropsMeta,
|
|
93
99
|
ee as dropdownPropsMeta,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
oa as emptyStatePropsMeta,
|
|
101
|
+
ra as errorPagePropsMeta,
|
|
102
|
+
sa as forgotPasswordPagePropsMeta,
|
|
103
|
+
ke as formPropsMeta,
|
|
98
104
|
i as inputPropsMeta,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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 {
|
|
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?:
|
|
11
|
-
register?:
|
|
10
|
+
login?: PageLinkInput | false;
|
|
11
|
+
register?: PageLinkInput | false;
|
|
12
12
|
};
|
|
13
13
|
brand?: BrandConfig;
|
|
14
14
|
submitLabel?: string;
|
package/dist/pages/login.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { PropsMeta } from '../core/props-meta';
|
|
2
|
-
import { PageField,
|
|
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?:
|
|
7
|
-
register?:
|
|
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?:
|
|
16
|
+
oauth?: OAuthProviderInput[];
|
|
17
17
|
brand?: BrandConfig;
|
|
18
18
|
submitLabel?: string;
|
|
19
19
|
loading?: boolean;
|
package/dist/pages/register.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsMeta } from '../core/props-meta';
|
|
2
|
-
import { PageField,
|
|
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?:
|
|
10
|
+
login?: PageLinkInput | false;
|
|
11
11
|
};
|
|
12
|
-
oauth?:
|
|
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 {
|
|
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?:
|
|
12
|
+
login?: PageLinkInput | false;
|
|
13
13
|
};
|
|
14
14
|
brand?: BrandConfig;
|
|
15
15
|
submitLabel?: string;
|
package/dist/pages/shared.d.ts
CHANGED
|
@@ -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?:
|
|
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[];
|