@skiddph/prui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +201 -0
  2. package/dist/app/app.d.ts +91 -0
  3. package/dist/app/auto-pages.d.ts +20 -0
  4. package/dist/app/form.d.ts +44 -0
  5. package/dist/app/index.d.ts +8 -0
  6. package/dist/app/resource.d.ts +61 -0
  7. package/dist/app/settings.d.ts +27 -0
  8. package/dist/app/stat-row.d.ts +20 -0
  9. package/dist/app.js +18 -0
  10. package/dist/chunks/data-table-toolbar-C9likJBN.js +430 -0
  11. package/dist/chunks/settings-DUz5nyX-.js +731 -0
  12. package/dist/core/button.d.ts +14 -0
  13. package/dist/core/button.js +58 -0
  14. package/dist/core/card.d.ts +24 -0
  15. package/dist/core/card.js +122 -0
  16. package/dist/core/cn.d.ts +3 -0
  17. package/dist/core/cn.js +8 -0
  18. package/dist/core/dialog.d.ts +25 -0
  19. package/dist/core/dialog.js +102 -0
  20. package/dist/core/dropdown.d.ts +24 -0
  21. package/dist/core/dropdown.js +89 -0
  22. package/dist/core/index.d.ts +14 -0
  23. package/dist/core/input.d.ts +8 -0
  24. package/dist/core/input.js +42 -0
  25. package/dist/core/label.d.ts +12 -0
  26. package/dist/core/label.js +52 -0
  27. package/dist/core/modal.d.ts +56 -0
  28. package/dist/core/modal.js +303 -0
  29. package/dist/core/props-meta.d.ts +26 -0
  30. package/dist/core/props-meta.js +1 -0
  31. package/dist/core/scroll-area.d.ts +8 -0
  32. package/dist/core/scroll-area.js +27 -0
  33. package/dist/core/select.d.ts +38 -0
  34. package/dist/core/select.js +157 -0
  35. package/dist/core/switch.d.ts +10 -0
  36. package/dist/core/switch.js +57 -0
  37. package/dist/core/tabs.d.ts +22 -0
  38. package/dist/core/tabs.js +94 -0
  39. package/dist/core.js +64 -0
  40. package/dist/data-table/data-table-daterange-filter.d.ts +14 -0
  41. package/dist/data-table/data-table-faceted-filter.d.ts +17 -0
  42. package/dist/data-table/data-table-number-range-filter.d.ts +14 -0
  43. package/dist/data-table/data-table-pagination.d.ts +24 -0
  44. package/dist/data-table/data-table-toolbar.d.ts +38 -0
  45. package/dist/data-table/data-table.d.ts +47 -0
  46. package/dist/data-table/index.d.ts +7 -0
  47. package/dist/data-table.js +12 -0
  48. package/dist/index.d.ts +5 -0
  49. package/dist/index.js +125 -0
  50. package/dist/pages/forgot-password.d.ts +21 -0
  51. package/dist/pages/index.d.ts +18 -0
  52. package/dist/pages/login.d.ts +24 -0
  53. package/dist/pages/logout.d.ts +12 -0
  54. package/dist/pages/otp.d.ts +18 -0
  55. package/dist/pages/profile-settings.d.ts +55 -0
  56. package/dist/pages/register.d.ts +19 -0
  57. package/dist/pages/reset-password.d.ts +20 -0
  58. package/dist/pages/shared.d.ts +55 -0
  59. package/dist/pages/status.d.ts +33 -0
  60. package/dist/pages.js +806 -0
  61. package/dist/prui.css +120 -0
  62. package/dist/theme/base.css +36 -0
  63. package/dist/theme/control.css +16 -0
  64. package/dist/theme/daylight.css +16 -0
  65. package/dist/theme/ember.css +16 -0
  66. package/dist/theme/index.d.ts +55 -0
  67. package/dist/theme/workshop.css +16 -0
  68. package/dist/theme.js +63 -0
  69. package/package.json +81 -0
@@ -0,0 +1,57 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { cn as s } from "./cn.js";
4
+ const h = l.forwardRef(
5
+ ({ className: c, checked: r, defaultChecked: d = !1, disabled: o, onChange: t, ...u }, f) => {
6
+ const [p, b] = l.useState(d), n = r !== void 0, e = n ? r : p;
7
+ return /* @__PURE__ */ i(
8
+ "button",
9
+ {
10
+ ref: f,
11
+ type: "button",
12
+ role: "switch",
13
+ "aria-checked": e,
14
+ "aria-disabled": o,
15
+ "data-state": e ? "checked" : "unchecked",
16
+ disabled: o,
17
+ onClick: () => {
18
+ if (o) return;
19
+ const a = !e;
20
+ n || b(a), t == null || t(a);
21
+ },
22
+ className: s(
23
+ "prui-switch inline-flex h-5 w-9 shrink-0 items-center rounded-[var(--prui-radius-full)] border border-transparent",
24
+ "transition-colors duration-150 cursor-pointer outline-none",
25
+ "focus-visible:ring-2 focus-visible:ring-[var(--prui-brand)] focus-visible:ring-offset-1",
26
+ e ? "bg-[var(--prui-brand)]" : "bg-[var(--prui-raise)] border-[var(--prui-line)]",
27
+ o && "opacity-50 cursor-not-allowed",
28
+ c
29
+ ),
30
+ ...u,
31
+ children: /* @__PURE__ */ i(
32
+ "span",
33
+ {
34
+ className: s(
35
+ "pointer-events-none block h-4 w-4 rounded-[var(--prui-radius-full)] bg-white shadow transition-transform",
36
+ e ? "translate-x-4" : "translate-x-0.5"
37
+ )
38
+ }
39
+ )
40
+ }
41
+ );
42
+ }
43
+ );
44
+ h.displayName = "Switch";
45
+ const k = {
46
+ name: "Switch",
47
+ props: [
48
+ { name: "checked", type: "boolean", default: "undefined", control: "boolean" },
49
+ { name: "defaultChecked", type: "boolean", default: "false", control: "boolean" },
50
+ { name: "disabled", type: "boolean", default: "false", control: "boolean" },
51
+ { name: "onChange", type: "(checked: boolean) => void", default: null, control: "none" }
52
+ ]
53
+ };
54
+ export {
55
+ h as Switch,
56
+ k as switchPropsMeta
57
+ };
@@ -0,0 +1,22 @@
1
+ import { PropsMeta } from './props-meta';
2
+ import * as React from "react";
3
+ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onChange?: (value: string) => void;
7
+ }
8
+ export declare const Tabs: {
9
+ ({ value: valueProp, defaultValue, onChange, className, children, ...props }: TabsProps): React.JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export type TabsListProps = React.HTMLAttributes<HTMLDivElement>;
13
+ export declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
14
+ export interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
15
+ value: string;
16
+ }
17
+ export declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
18
+ export interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ value: string;
20
+ }
21
+ export declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
22
+ export declare const tabsPropsMeta: PropsMeta;
@@ -0,0 +1,94 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { cn as c } from "./cn.js";
4
+ const f = r.createContext(null);
5
+ function m() {
6
+ const t = r.useContext(f);
7
+ if (!t) throw new Error("Tabs parts must be used inside <Tabs>");
8
+ return t;
9
+ }
10
+ const x = ({ value: t, defaultValue: e, onChange: a, className: i, children: o, ...s }) => {
11
+ const [b, u] = r.useState(e ?? ""), n = t !== void 0 ? t : b, d = r.useId(), v = (p) => {
12
+ t === void 0 && u(p), a == null || a(p);
13
+ };
14
+ return /* @__PURE__ */ l(f.Provider, { value: { value: n, setValue: v, baseId: d }, children: /* @__PURE__ */ l("div", { className: c("prui-tabs", i), ...s, children: o }) });
15
+ };
16
+ x.displayName = "Tabs";
17
+ const g = r.forwardRef(
18
+ ({ className: t, ...e }, a) => /* @__PURE__ */ l(
19
+ "div",
20
+ {
21
+ ref: a,
22
+ role: "tablist",
23
+ className: c(
24
+ "prui-tabs-list inline-flex h-9 items-center gap-1 rounded-[var(--prui-radius)] bg-[var(--prui-raise)] p-1",
25
+ t
26
+ ),
27
+ ...e
28
+ }
29
+ )
30
+ );
31
+ g.displayName = "TabsList";
32
+ const T = r.forwardRef(
33
+ ({ className: t, value: e, onClick: a, ...i }, o) => {
34
+ const { value: s, setValue: b, baseId: u } = m(), n = s === e;
35
+ return /* @__PURE__ */ l(
36
+ "button",
37
+ {
38
+ ref: o,
39
+ type: "button",
40
+ role: "tab",
41
+ id: `${u}-tab-${e}`,
42
+ "aria-selected": n,
43
+ "aria-controls": `${u}-panel-${e}`,
44
+ "data-state": n ? "active" : "inactive",
45
+ tabIndex: n ? 0 : -1,
46
+ className: c(
47
+ "prui-tabs-trigger inline-flex items-center justify-center whitespace-nowrap rounded-[calc(var(--prui-radius)-1px)]",
48
+ "px-3 py-1 text-sm font-medium transition-colors cursor-pointer outline-none",
49
+ "focus-visible:ring-2 focus-visible:ring-[var(--prui-brand)]",
50
+ n ? "bg-[var(--prui-background)] text-[var(--prui-fg)] shadow" : "text-[var(--prui-dim)] hover:text-[var(--prui-fg)]",
51
+ t
52
+ ),
53
+ onClick: (d) => {
54
+ a == null || a(d), d.defaultPrevented || b(e);
55
+ },
56
+ ...i
57
+ }
58
+ );
59
+ }
60
+ );
61
+ T.displayName = "TabsTrigger";
62
+ const y = r.forwardRef(
63
+ ({ className: t, value: e, ...a }, i) => {
64
+ const { value: o, baseId: s } = m();
65
+ return o !== e ? null : /* @__PURE__ */ l(
66
+ "div",
67
+ {
68
+ ref: i,
69
+ role: "tabpanel",
70
+ id: `${s}-panel-${e}`,
71
+ "aria-labelledby": `${s}-tab-${e}`,
72
+ tabIndex: 0,
73
+ className: c("prui-tabs-content mt-2 outline-none", t),
74
+ ...a
75
+ }
76
+ );
77
+ }
78
+ );
79
+ y.displayName = "TabsContent";
80
+ const $ = {
81
+ name: "Tabs",
82
+ props: [
83
+ { name: "value", type: "string", default: "undefined", control: "text" },
84
+ { name: "defaultValue", type: "string", default: "first tab", control: "text" },
85
+ { name: "onChange", type: "(value: string) => void", default: null, control: "none" }
86
+ ]
87
+ };
88
+ export {
89
+ x as Tabs,
90
+ y as TabsContent,
91
+ g as TabsList,
92
+ T as TabsTrigger,
93
+ $ as tabsPropsMeta
94
+ };
package/dist/core.js ADDED
@@ -0,0 +1,64 @@
1
+ import { cn as e } from "./core/cn.js";
2
+ import { Button as a, buttonPropsMeta as p } from "./core/button.js";
3
+ import { Input as l, Textarea as i, inputPropsMeta as d, textareaPropsMeta as n } from "./core/input.js";
4
+ import { Label as c, Separator as m, labelPropsMeta as P, separatorPropsMeta as f } from "./core/label.js";
5
+ import { Select as g, SelectContent as C, SelectItem as b, SelectTrigger as D, SelectValue as T, selectPropsMeta as S } from "./core/select.js";
6
+ import { Switch as w, switchPropsMeta as A } from "./core/switch.js";
7
+ import { Tabs as v, TabsContent as B, TabsList as F, TabsTrigger as H, tabsPropsMeta as I } from "./core/tabs.js";
8
+ import { Avatar as V, Badge as j, Card as k, CardContent as q, CardDescription as y, CardFooter as z, CardHeader as E, CardTitle as G, avatarPropsMeta as J, badgePropsMeta as K, cardPropsMeta as N } from "./core/card.js";
9
+ import { Dialog as Q, DialogContent as R, DialogDescription as U, DialogFooter as W, DialogHeader as X, DialogTitle as Y, dialogPropsMeta as Z } from "./core/dialog.js";
10
+ import { Dropdown as $, dropdownPropsMeta as oo } from "./core/dropdown.js";
11
+ import { ScrollArea as eo, scrollAreaPropsMeta as to } from "./core/scroll-area.js";
12
+ import { Modal as po, confirmModal as so, confirmModalPropsMeta as lo, modalPropsMeta as io } from "./core/modal.js";
13
+ export {
14
+ V as Avatar,
15
+ j as Badge,
16
+ a as Button,
17
+ k as Card,
18
+ q as CardContent,
19
+ y as CardDescription,
20
+ z as CardFooter,
21
+ E as CardHeader,
22
+ G as CardTitle,
23
+ Q as Dialog,
24
+ R as DialogContent,
25
+ U as DialogDescription,
26
+ W as DialogFooter,
27
+ X as DialogHeader,
28
+ Y as DialogTitle,
29
+ $ as Dropdown,
30
+ l as Input,
31
+ c as Label,
32
+ po as Modal,
33
+ eo as ScrollArea,
34
+ g as Select,
35
+ C as SelectContent,
36
+ b as SelectItem,
37
+ D as SelectTrigger,
38
+ T as SelectValue,
39
+ m as Separator,
40
+ w as Switch,
41
+ v as Tabs,
42
+ B as TabsContent,
43
+ F as TabsList,
44
+ H as TabsTrigger,
45
+ i as Textarea,
46
+ J as avatarPropsMeta,
47
+ K as badgePropsMeta,
48
+ p as buttonPropsMeta,
49
+ N as cardPropsMeta,
50
+ e as cn,
51
+ so as confirmModal,
52
+ lo as confirmModalPropsMeta,
53
+ Z as dialogPropsMeta,
54
+ oo as dropdownPropsMeta,
55
+ d as inputPropsMeta,
56
+ P as labelPropsMeta,
57
+ io as modalPropsMeta,
58
+ to as scrollAreaPropsMeta,
59
+ S as selectPropsMeta,
60
+ f as separatorPropsMeta,
61
+ A as switchPropsMeta,
62
+ I as tabsPropsMeta,
63
+ n as textareaPropsMeta
64
+ };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ /** Date range filter: from and to date inputs. */
3
+ export interface DateRangeValue {
4
+ from?: string;
5
+ to?: string;
6
+ }
7
+ export interface DateRangeFilterProps {
8
+ label?: string;
9
+ value?: DateRangeValue;
10
+ defaultValue?: DateRangeValue;
11
+ onChange?: (value: DateRangeValue) => void;
12
+ className?: string;
13
+ }
14
+ export declare function DateRangeFilter({ label, value: valueProp, defaultValue, onChange, className, }: DateRangeFilterProps): React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ /** Faceted select filter: multi-select of named options with counts. */
3
+ export interface FacetOption {
4
+ label: string;
5
+ value: string;
6
+ count?: number;
7
+ }
8
+ export interface FacetedFilterProps {
9
+ /** Column title shown on the trigger badge. */
10
+ label: string;
11
+ options: FacetOption[];
12
+ value?: string[];
13
+ defaultValue?: string[];
14
+ onChange?: (values: string[]) => void;
15
+ className?: string;
16
+ }
17
+ export declare function FacetedFilter({ label, options, value: valueProp, defaultValue, onChange, className, }: FacetedFilterProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ /** Number range filter: min and max numeric inputs. */
3
+ export interface NumberRangeValue {
4
+ min?: number;
5
+ max?: number;
6
+ }
7
+ export interface NumberRangeFilterProps {
8
+ label?: string;
9
+ value?: NumberRangeValue;
10
+ defaultValue?: NumberRangeValue;
11
+ onChange?: (value: NumberRangeValue) => void;
12
+ className?: string;
13
+ }
14
+ export declare function NumberRangeFilter({ label, value: valueProp, defaultValue, onChange, className, }: NumberRangeFilterProps): React.JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ /**
3
+ * Cursor pagination. The list contract returns { rows, nextCursor, prevCursor };
4
+ * callers hold cursors and pass them back through onCursorChange.
5
+ */
6
+ export interface CursorPaginationState {
7
+ nextCursor?: string | null;
8
+ prevCursor?: string | null;
9
+ }
10
+ export interface DataTablePaginationProps {
11
+ /** 1-based logical page number, maintained by the caller from cursor movements. */
12
+ page: number;
13
+ pageSize?: number;
14
+ /** Whether a next page exists (nextCursor truthy). */
15
+ hasNextPage: boolean;
16
+ /** Whether a previous page exists. */
17
+ hasPreviousPage: boolean;
18
+ onPageChange?: (page: number, direction: "next" | "prev") => void;
19
+ onPageSizeChange?: (size: number) => void;
20
+ pageSizeOptions?: number[];
21
+ className?: string;
22
+ }
23
+ export declare function DataTablePagination({ page, pageSize, hasNextPage, hasPreviousPage, onPageChange, onPageSizeChange, pageSizeOptions, className, }: DataTablePaginationProps): import("react").JSX.Element;
24
+ export declare const dataTablePaginationPropsMeta: PropsMeta;
@@ -0,0 +1,38 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import { FacetOption } from './data-table-faceted-filter';
3
+ import * as React from "react";
4
+ /**
5
+ * Toolbar: search input plus declarative filters.
6
+ * Filter config entries are column keys with a type; the toolbar renders the
7
+ * matching filter control and reports values through onFilterChange.
8
+ */
9
+ export type ToolbarFilterType = "select" | "daterange" | "numberrange";
10
+ export interface ToolbarFilterConfig {
11
+ key: string;
12
+ label: string;
13
+ type: ToolbarFilterType;
14
+ /** Options for type select. */
15
+ options?: FacetOption[];
16
+ }
17
+ export type ToolbarFilterValue = string[] | {
18
+ from?: string;
19
+ to?: string;
20
+ } | {
21
+ min?: number;
22
+ max?: number;
23
+ } | undefined;
24
+ export type ToolbarFilterValues = Record<string, ToolbarFilterValue>;
25
+ export interface DataTableToolbarProps {
26
+ /** Global search placeholder. */
27
+ searchPlaceholder?: string;
28
+ searchValue?: string;
29
+ onSearchChange?: (value: string) => void;
30
+ filters?: ToolbarFilterConfig[];
31
+ filterValues?: ToolbarFilterValues;
32
+ onFilterChange?: (key: string, value: ToolbarFilterValue) => void;
33
+ /** Right-side actions slot (e.g. create button). */
34
+ actions?: React.ReactNode;
35
+ className?: string;
36
+ }
37
+ export declare function DataTableToolbar({ searchPlaceholder, searchValue, onSearchChange, filters, filterValues, onFilterChange, actions, className, }: DataTableToolbarProps): React.JSX.Element;
38
+ export declare const dataTableToolbarPropsMeta: PropsMeta;
@@ -0,0 +1,47 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import * as React from "react";
3
+ /**
4
+ * DataTable family: column config, sorting, cursor pagination.
5
+ * Callers provide rows plus an optional cursor contract; filtering helpers
6
+ * live in the toolbar/filter components.
7
+ */
8
+ export type SortDirection = "asc" | "desc";
9
+ export interface Column<T> {
10
+ /** Row field key. */
11
+ key: string;
12
+ /** Header label. */
13
+ label: React.ReactNode;
14
+ sortable?: boolean;
15
+ align?: "left" | "right" | "center";
16
+ /** Fixed width or min width hint. */
17
+ width?: number | string;
18
+ /** Custom cell renderer; defaults to String(row[key]). */
19
+ render?: (row: T) => React.ReactNode;
20
+ /** Hidden from the table but available to filters. */
21
+ hidden?: boolean;
22
+ className?: string;
23
+ }
24
+ export interface DataTableProps<T> {
25
+ columns: Column<T>[];
26
+ rows: T[];
27
+ rowKey?: (row: T, index: number) => string;
28
+ /** Sort state; when provided the table is controlled. */
29
+ sort?: {
30
+ key: string;
31
+ direction: SortDirection;
32
+ } | null;
33
+ onSortChange?: (sort: {
34
+ key: string;
35
+ direction: SortDirection;
36
+ } | null) => void;
37
+ defaultSort?: {
38
+ key: string;
39
+ direction: SortDirection;
40
+ } | null;
41
+ loading?: boolean;
42
+ emptyMessage?: React.ReactNode;
43
+ onRowClick?: (row: T, index: number) => void;
44
+ className?: string;
45
+ }
46
+ export declare function DataTable<T extends Record<string, unknown>>({ columns, rows, rowKey, sort: sortProp, onSortChange, defaultSort, loading, emptyMessage, onRowClick, className, }: DataTableProps<T>): React.JSX.Element;
47
+ export declare const dataTablePropsMeta: PropsMeta;
@@ -0,0 +1,7 @@
1
+ /** PRUI DataTable family for direct composition. */
2
+ export { DataTable, dataTablePropsMeta, type DataTableProps, type Column, type SortDirection, } from './data-table';
3
+ export { DataTablePagination, dataTablePaginationPropsMeta, type DataTablePaginationProps, } from './data-table-pagination';
4
+ export { DataTableToolbar, dataTableToolbarPropsMeta, type DataTableToolbarProps, type ToolbarFilterConfig, type ToolbarFilterType, type ToolbarFilterValue, type ToolbarFilterValues, } from './data-table-toolbar';
5
+ export { FacetedFilter, type FacetedFilterProps, type FacetOption } from './data-table-faceted-filter';
6
+ export { DateRangeFilter, type DateRangeFilterProps, type DateRangeValue } from './data-table-daterange-filter';
7
+ export { NumberRangeFilter, type NumberRangeFilterProps, type NumberRangeValue } from './data-table-number-range-filter';
@@ -0,0 +1,12 @@
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";
2
+ export {
3
+ t as DataTable,
4
+ s as DataTablePagination,
5
+ l as DataTableToolbar,
6
+ o as DateRangeFilter,
7
+ r as FacetedFilter,
8
+ b as NumberRangeFilter,
9
+ T as dataTablePaginationPropsMeta,
10
+ i as dataTablePropsMeta,
11
+ n as dataTableToolbarPropsMeta
12
+ };
@@ -0,0 +1,5 @@
1
+ export * from './core';
2
+ export * from './data-table';
3
+ export * from './app';
4
+ export * from './pages';
5
+ export * from './theme';
package/dist/index.js ADDED
@@ -0,0 +1,125 @@
1
+ import { cn as t } from "./core/cn.js";
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";
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
+ import { Dropdown as $, dropdownPropsMeta as ee } from "./core/dropdown.js";
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";
17
+ 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,
24
+ r as Button,
25
+ 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,
32
+ le as DataTable,
33
+ Me as DataTablePagination,
34
+ de as DataTableToolbar,
35
+ ne as DateRangeFilter,
36
+ G as Dialog,
37
+ J as DialogContent,
38
+ K as DialogDescription,
39
+ Q as DialogFooter,
40
+ W as DialogHeader,
41
+ X as DialogTitle,
42
+ $ as Dropdown,
43
+ ke as EmptyState,
44
+ Oe as ErrorPage,
45
+ me as FacetedFilter,
46
+ Ue as ForgotPasswordPage,
47
+ Ce as Form,
48
+ P as Input,
49
+ d as Label,
50
+ Ve as LoginPage,
51
+ _e as LogoutPage,
52
+ se as Modal,
53
+ je as NotFoundPage,
54
+ 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,
62
+ te as ScrollArea,
63
+ b as Select,
64
+ c as SelectContent,
65
+ S as SelectItem,
66
+ x as SelectTrigger,
67
+ u as SelectValue,
68
+ 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,
75
+ A as TabsContent,
76
+ 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,
84
+ s as buttonPropsMeta,
85
+ q as cardPropsMeta,
86
+ t as cn,
87
+ pe as confirmModal,
88
+ Pe as confirmModalPropsMeta,
89
+ Te as dataTablePaginationPropsMeta,
90
+ be as dataTablePropsMeta,
91
+ ce as dataTableToolbarPropsMeta,
92
+ Y as dialogPropsMeta,
93
+ 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,
113
+ 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
+ l as textareaPropsMeta,
122
+ ma as themeMeta,
123
+ fa as themeMode,
124
+ He as useThemeState
125
+ };
@@ -0,0 +1,21 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import { PageLink } from './shared';
3
+ import { BrandConfig } from '../app/app';
4
+ import * as React from "react";
5
+ export interface ForgotPasswordPageProps {
6
+ onSubmit?: (values: {
7
+ email: string;
8
+ }) => void | Promise<void>;
9
+ links?: {
10
+ login?: PageLink | false;
11
+ register?: PageLink | false;
12
+ };
13
+ brand?: BrandConfig;
14
+ submitLabel?: string;
15
+ loading?: boolean;
16
+ error?: string | null;
17
+ /** Show the "check your email" success state instead of the form. */
18
+ sent?: boolean;
19
+ }
20
+ export declare function ForgotPasswordPage({ onSubmit, links, brand, submitLabel, loading, error, sent, }: ForgotPasswordPageProps): React.JSX.Element;
21
+ export declare const forgotPasswordPagePropsMeta: PropsMeta;
@@ -0,0 +1,18 @@
1
+ import { ComponentType } from 'react';
2
+ import { PageSetName } from '../app/auto-pages';
3
+ /** PRUI pre-made page components. */
4
+ export { LoginPage, loginPagePropsMeta, type LoginPageProps, type LoginLinks, } from './login';
5
+ export { RegisterPage, registerPagePropsMeta, type RegisterPageProps, } from './register';
6
+ export { ForgotPasswordPage, forgotPasswordPagePropsMeta, type ForgotPasswordPageProps, } from './forgot-password';
7
+ export { ResetPasswordPage, resetPasswordPagePropsMeta, type ResetPasswordPageProps, } from './reset-password';
8
+ export { OtpPage, otpPagePropsMeta, type OtpPageProps, } from './otp';
9
+ export { LogoutPage, logoutPagePropsMeta, type LogoutPageProps, } from './logout';
10
+ export { NotFoundPage, notFoundPagePropsMeta, ErrorPage, errorPagePropsMeta, EmptyState, emptyStatePropsMeta, type NotFoundPageProps, type ErrorPageProps, type EmptyStateProps, } from './status';
11
+ export { ProfilePage, profilePagePropsMeta, SettingsPage, settingsPagePropsMeta, AdminSetup, adminSetupPropsMeta, type ProfilePageProps, type SettingsPageProps, type SettingsToggle, type AdminSetupProps, } from './profile-settings';
12
+ export type { PageField, PageLink, OAuthProvider, PageSubmitState, } from './shared';
13
+ /**
14
+ * Registry of pre-made pages keyed by PageSetName; consumed by AutoPages.
15
+ * Assembled here (not in app/) so the app layer never statically imports
16
+ * the pages bundle.
17
+ */
18
+ export declare const PagesRegistry: Record<PageSetName, ComponentType<Record<string, unknown>>>;
@@ -0,0 +1,24 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import { PageField, PageLink, OAuthProvider } from './shared';
3
+ import { BrandConfig } from '../app/app';
4
+ import * as React from "react";
5
+ export interface LoginLinks {
6
+ forgot?: PageLink | false;
7
+ register?: PageLink | false;
8
+ }
9
+ export interface LoginPageProps {
10
+ onSubmit?: (values: Record<string, string>) => void | Promise<void>;
11
+ /** Per-field show/hide: keys match field names, true renders the field. */
12
+ fields?: Partial<Record<"email" | "password" | "remember", boolean>>;
13
+ /** Extra fields appended to the defaults. */
14
+ extraFields?: PageField[];
15
+ links?: LoginLinks;
16
+ oauth?: OAuthProvider[];
17
+ brand?: BrandConfig;
18
+ submitLabel?: string;
19
+ loading?: boolean;
20
+ error?: string | null;
21
+ className?: string;
22
+ }
23
+ export declare function LoginPage({ onSubmit, fields, extraFields, links, oauth, brand, submitLabel, loading, error, className, }: LoginPageProps): React.JSX.Element;
24
+ export declare const loginPagePropsMeta: PropsMeta;
@@ -0,0 +1,12 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import { BrandConfig } from '../app/app';
3
+ import * as React from "react";
4
+ export interface LogoutPageProps {
5
+ onLogout?: () => void | Promise<void>;
6
+ brand?: BrandConfig;
7
+ /** Message shown while the logout runs; defaults to a generic one. */
8
+ message?: React.ReactNode;
9
+ loading?: boolean;
10
+ }
11
+ export declare function LogoutPage({ onLogout, brand, message, loading }: LogoutPageProps): React.JSX.Element;
12
+ export declare const logoutPagePropsMeta: PropsMeta;
@@ -0,0 +1,18 @@
1
+ import { PropsMeta } from '../core/props-meta';
2
+ import { BrandConfig } from '../app/app';
3
+ import * as React from "react";
4
+ /** OTP code entry: segmented inputs, paste support, auto-submit on last digit. */
5
+ export interface OtpPageProps {
6
+ onSubmit?: (code: string) => void | Promise<void>;
7
+ length?: number;
8
+ title?: string;
9
+ description?: React.ReactNode;
10
+ brand?: BrandConfig;
11
+ submitLabel?: string;
12
+ loading?: boolean;
13
+ error?: string | null;
14
+ onResend?: () => void | Promise<void>;
15
+ resendLabel?: string;
16
+ }
17
+ export declare function OtpPage({ onSubmit, length, title, description, brand, submitLabel, loading, error, onResend, resendLabel, }: OtpPageProps): React.JSX.Element;
18
+ export declare const otpPagePropsMeta: PropsMeta;