@okjt/dashboard 0.8.0 → 0.10.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.
@@ -48,7 +48,7 @@ function AccountMenu({ compactLinks = [], links = [], roleText, extra, fallbackN
48
48
  /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 border-b border-tone-100 mb-1", children: [
49
49
  /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-tone-800 truncate", children: user?.name || fallbackName }),
50
50
  user?.email && /* @__PURE__ */ jsx("p", { className: "text-xs text-tone-500 truncate", children: user.email }),
51
- roleText && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-accent font-medium mt-0.5", children: roleText })
51
+ roleText && /* @__PURE__ */ jsx("p", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] text-accent font-medium mt-0.5", children: roleText })
52
52
  ] }),
53
53
  extra?.({ itemClass, close }),
54
54
  compactLinks.length > 0 && /* @__PURE__ */ jsx("div", { className: "md:hidden border-b border-tone-100 pb-1 mb-1", children: compactLinks.map((link) => /* @__PURE__ */ jsxs(Link, { to: link.path, role: "menuitem", onClick: close, className: itemClass, children: [
@@ -18,7 +18,7 @@ function ActivityPanel() {
18
18
  });
19
19
  return /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
20
20
  /* @__PURE__ */ jsxs("section", { className: "space-y-2", children: [
21
- /* @__PURE__ */ jsx("h3", { className: "text-[11px] font-bold uppercase tracking-wider text-tone-500", children: "On this page" }),
21
+ /* @__PURE__ */ jsx("h3", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] font-bold uppercase tracking-wider text-tone-500", children: "On this page" }),
22
22
  othersHere.length ? /* @__PURE__ */ jsxs("ul", { className: "space-y-1.5", children: [
23
23
  othersHere.map((person) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 text-sm text-tone-700", children: [
24
24
  /* @__PURE__ */ jsx(CollaboratorAvatar, { person, size: "xs" }),
@@ -29,14 +29,14 @@ function ActivityPanel() {
29
29
  ] }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-tone-500", children: "Only you right now." })
30
30
  ] }),
31
31
  /* @__PURE__ */ jsxs("section", { className: "space-y-2", children: [
32
- /* @__PURE__ */ jsx("h3", { className: "text-[11px] font-bold uppercase tracking-wider text-tone-500", children: "Recent changes" }),
32
+ /* @__PURE__ */ jsx("h3", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] font-bold uppercase tracking-wider text-tone-500", children: "Recent changes" }),
33
33
  isLoading ? /* @__PURE__ */ jsx("p", { className: "text-xs text-tone-400", children: "Loading\u2026" }) : recent.length ? /* @__PURE__ */ jsx("ul", { className: "space-y-2", children: recent.map((r) => /* @__PURE__ */ jsxs("li", { className: "text-xs text-tone-600 leading-snug", children: [
34
34
  /* @__PURE__ */ jsx("span", { className: "font-medium text-tone-800", children: r.user?.name || anonymousName }),
35
35
  " ",
36
36
  ACTION_WORDS[r.action] || r.action,
37
37
  " ",
38
38
  /* @__PURE__ */ jsx("span", { className: "font-medium text-tone-800", children: r.subject_label }),
39
- /* @__PURE__ */ jsx("span", { className: "block text-[11px] text-tone-400", children: formatDistanceToNow(new Date(r.updated_at || r.created_at), { addSuffix: true }) })
39
+ /* @__PURE__ */ jsx("span", { className: "block text-[length:max(11px,var(--okjt-min-text,0px))] text-tone-400", children: formatDistanceToNow(new Date(r.updated_at || r.created_at), { addSuffix: true }) })
40
40
  ] }, r.id)) }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-tone-500", children: "No changes recorded here yet." }),
41
41
  /* @__PURE__ */ jsx(Button, { size: "sm", icon: History, fullWidth: true, onClick: openHistory, children: "Version history" })
42
42
  ] }),
@@ -0,0 +1,275 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import {
4
+ useReactTable,
5
+ getCoreRowModel,
6
+ getFilteredRowModel,
7
+ getPaginationRowModel,
8
+ getSortedRowModel,
9
+ flexRender
10
+ } from "@tanstack/react-table";
11
+ import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Search, ArrowUpDown, Eye } from "lucide-react";
12
+ import { Modal } from "@okjt/ui";
13
+ import EmptyState from "./EmptyState.js";
14
+ const columnLabel = (column) => column.columnDef.meta?.label ?? (typeof column.columnDef.header === "string" ? column.columnDef.header : column.id);
15
+ const ACTION_VARIANTS = {
16
+ success: "hover:bg-positive/10 hover:text-positive-dark",
17
+ warning: "hover:bg-amber-500/10 hover:text-amber-700",
18
+ danger: "hover:bg-red-500/10 hover:text-red-600"
19
+ };
20
+ const DETAIL_ACTION_VARIANTS = {
21
+ default: "bg-contrast/5 text-ink hover:bg-contrast/10",
22
+ success: "bg-positive/10 text-positive-dark hover:bg-positive/20",
23
+ warning: "bg-amber-500/10 text-amber-700 hover:bg-amber-500/20",
24
+ danger: "bg-red-500/10 text-red-600 hover:bg-red-500/20"
25
+ };
26
+ const identity = (text) => text;
27
+ const cx = (...parts) => parts.filter(Boolean).join(" ");
28
+ const checkboxClass = "h-4 w-4 cursor-pointer rounded border-contrast/20 text-accent focus:ring-accent/20 focus:ring-offset-0";
29
+ const pageButtonClass = "rounded-lg p-2 hover:bg-contrast/5 disabled:cursor-not-allowed disabled:opacity-30";
30
+ function AdminDataTable({
31
+ data,
32
+ columns,
33
+ title = null,
34
+ searchPlaceholder = "Search...",
35
+ searchValue = "",
36
+ serverPagination = null,
37
+ onPageChange,
38
+ onSearch = null,
39
+ enableSelection = false,
40
+ selectedIds = null,
41
+ onSelectionChange = null,
42
+ getRowId = (row) => row.id,
43
+ emptyMessage = "No results found",
44
+ emptyIcon,
45
+ emptyAction = null,
46
+ rowActions = [],
47
+ detailTitle = null,
48
+ translate = identity
49
+ }) {
50
+ const t = translate;
51
+ const [sorting, setSorting] = useState([]);
52
+ const [globalFilter, setGlobalFilter] = useState("");
53
+ const [rowSelection, setRowSelection] = useState({});
54
+ const isSelectionControlled = Array.isArray(selectedIds);
55
+ const selectionState = isSelectionControlled ? Object.fromEntries(selectedIds.map((id) => [String(id), true])) : rowSelection;
56
+ const handleRowSelectionChange = (updater) => {
57
+ const next = typeof updater === "function" ? updater(selectionState) : updater;
58
+ if (!isSelectionControlled) {
59
+ setRowSelection(next);
60
+ return;
61
+ }
62
+ onSelectionChange?.(data.map(getRowId).filter((id) => next[String(id)]));
63
+ };
64
+ const selectionColumn = enableSelection ? [{
65
+ id: "select",
66
+ header: ({ table: table2 }) => /* @__PURE__ */ jsx(
67
+ "input",
68
+ {
69
+ type: "checkbox",
70
+ "aria-label": "Select all",
71
+ checked: table2.getIsAllPageRowsSelected(),
72
+ onChange: (e) => table2.toggleAllPageRowsSelected(e.target.checked),
73
+ className: checkboxClass
74
+ }
75
+ ),
76
+ cell: ({ row }) => /* @__PURE__ */ jsx(
77
+ "input",
78
+ {
79
+ type: "checkbox",
80
+ "aria-label": "Select row",
81
+ checked: row.getIsSelected(),
82
+ onChange: (e) => row.toggleSelected(e.target.checked),
83
+ className: checkboxClass
84
+ }
85
+ ),
86
+ size: 40,
87
+ enableSorting: false,
88
+ enableHiding: false
89
+ }] : [];
90
+ const [detailRow, setDetailRow] = useState(null);
91
+ const actionColumn = rowActions.length > 0 || detailTitle ? [{
92
+ id: "actions",
93
+ header: "Actions",
94
+ enableSorting: false,
95
+ enableGlobalFilter: false,
96
+ cell: ({ row }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1 lg:justify-start", children: [
97
+ detailTitle && /* @__PURE__ */ jsx("button", { type: "button", className: "rounded-lg p-2 text-soft transition-colors hover:bg-contrast/5 hover:text-ink", title: "View details", "aria-label": "View details", onClick: () => setDetailRow(row.original), children: /* @__PURE__ */ jsx(Eye, { size: 14 }) }),
98
+ rowActions.map((action) => /* @__PURE__ */ jsx(
99
+ "button",
100
+ {
101
+ type: "button",
102
+ className: cx("rounded-lg p-2 text-soft transition-colors", ACTION_VARIANTS[action.variant] ?? "hover:bg-contrast/5 hover:text-ink"),
103
+ title: t(action.label),
104
+ "aria-label": t(action.label),
105
+ onClick: () => action.onClick(row.original),
106
+ children: action.icon
107
+ },
108
+ action.key
109
+ ))
110
+ ] })
111
+ }] : [];
112
+ const allColumns = [...selectionColumn, ...columns, ...actionColumn];
113
+ const columnVisibility = Object.fromEntries(columns.filter((c) => c.meta?.detailOnly).map((c) => [c.id ?? c.accessorKey, false]));
114
+ const table = useReactTable({
115
+ data,
116
+ columns: allColumns,
117
+ state: {
118
+ sorting,
119
+ globalFilter,
120
+ columnVisibility,
121
+ ...enableSelection ? { rowSelection: selectionState } : {}
122
+ },
123
+ onSortingChange: setSorting,
124
+ onGlobalFilterChange: setGlobalFilter,
125
+ ...enableSelection ? { onRowSelectionChange: handleRowSelectionChange } : {},
126
+ getCoreRowModel: getCoreRowModel(),
127
+ getFilteredRowModel: getFilteredRowModel(),
128
+ getPaginationRowModel: serverPagination ? void 0 : getPaginationRowModel(),
129
+ getSortedRowModel: getSortedRowModel(),
130
+ manualPagination: !!serverPagination,
131
+ pageCount: serverPagination ? serverPagination.last_page : void 0,
132
+ getRowId
133
+ });
134
+ useEffect(() => {
135
+ if (enableSelection && onSelectionChange && !isSelectionControlled) {
136
+ onSelectionChange(table.getSelectedRowModel().rows.map((r) => r.original));
137
+ }
138
+ }, [rowSelection]);
139
+ const typed = useRef(false);
140
+ useEffect(() => {
141
+ if (!typed.current) {
142
+ typed.current = true;
143
+ return void 0;
144
+ }
145
+ if (!onSearch || serverPagination) return void 0;
146
+ const timeout = setTimeout(() => onSearch(globalFilter), 300);
147
+ return () => clearTimeout(timeout);
148
+ }, [globalFilter]);
149
+ const goToPage = (page) => {
150
+ if (serverPagination) onPageChange?.(page);
151
+ };
152
+ const rows = table.getRowModel().rows;
153
+ const render = (cell) => flexRender(cell.column.columnDef.cell, cell.getContext());
154
+ return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-4", children: [
155
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 border-b border-contrast/5 p-4", children: [
156
+ title && /* @__PURE__ */ jsx("h3", { className: "text-sm font-bold text-ink", children: t(title) }),
157
+ /* @__PURE__ */ jsxs("label", { className: "flex w-full items-center gap-2 rounded-xl bg-contrast/5 px-3 py-2 sm:w-64", children: [
158
+ /* @__PURE__ */ jsx(Search, { size: 16, className: "text-muted", "aria-hidden": "true" }),
159
+ serverPagination && onSearch ? /* @__PURE__ */ jsx(
160
+ "input",
161
+ {
162
+ type: "search",
163
+ defaultValue: searchValue,
164
+ onChange: (e) => onSearch(e.target.value),
165
+ placeholder: searchPlaceholder,
166
+ "aria-label": searchPlaceholder,
167
+ className: "w-full border-none bg-transparent p-0 text-sm font-bold placeholder:text-muted focus:ring-0"
168
+ }
169
+ ) : /* @__PURE__ */ jsx(
170
+ "input",
171
+ {
172
+ type: "search",
173
+ value: globalFilter ?? "",
174
+ onChange: (e) => setGlobalFilter(e.target.value),
175
+ placeholder: searchPlaceholder,
176
+ "aria-label": searchPlaceholder,
177
+ className: "w-full border-none bg-transparent p-0 text-sm font-bold placeholder:text-muted focus:ring-0"
178
+ }
179
+ )
180
+ ] })
181
+ ] }),
182
+ rows.length === 0 && /* @__PURE__ */ jsx(EmptyState, { icon: emptyIcon, message: emptyMessage, action: emptyAction }),
183
+ rows.length > 0 && /* @__PURE__ */ jsx("div", { className: "hidden overflow-x-auto lg:block", "data-view": "table", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
184
+ /* @__PURE__ */ jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "border-b border-contrast/5 bg-contrast/[0.02]", children: headerGroup.headers.map((header) => {
185
+ const checkbox = header.id === "select";
186
+ const sortable = !checkbox && header.column.getCanSort();
187
+ return /* @__PURE__ */ jsx(
188
+ "th",
189
+ {
190
+ scope: "col",
191
+ "aria-sort": { asc: "ascending", desc: "descending" }[header.column.getIsSorted()],
192
+ className: cx("px-4 py-3 text-left text-xs font-semibold text-soft select-none", checkbox ? "w-10 cursor-default text-center" : sortable && "cursor-pointer transition-colors hover:bg-contrast/5"),
193
+ onClick: sortable ? header.column.getToggleSortingHandler() : void 0,
194
+ children: /* @__PURE__ */ jsxs("div", { className: "group flex items-center gap-2", children: [
195
+ flexRender(header.column.columnDef.header, header.getContext()),
196
+ sortable && ({
197
+ asc: /* @__PURE__ */ jsx(ArrowUpDown, { size: 12, className: "rotate-180" }),
198
+ desc: /* @__PURE__ */ jsx(ArrowUpDown, { size: 12 })
199
+ }[header.column.getIsSorted()] ?? /* @__PURE__ */ jsx(ArrowUpDown, { size: 12, className: "opacity-0 group-hover:opacity-50" }))
200
+ ] })
201
+ },
202
+ header.id
203
+ );
204
+ }) }, headerGroup.id)) }),
205
+ /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-contrast/5", children: rows.map((row) => /* @__PURE__ */ jsx("tr", { className: cx("transition-colors", row.getIsSelected() ? "bg-accent/5 hover:bg-accent/10" : "hover:bg-contrast/[0.02]"), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", { className: cx("px-4 py-3 text-sm font-medium text-body", cell.column.id === "select" && "w-10 text-center"), children: render(cell) }, cell.id)) }, row.id)) })
206
+ ] }) }),
207
+ rows.length > 0 && /* @__PURE__ */ jsx("ul", { className: "space-y-3 px-4 lg:hidden", "data-view": "cards", children: rows.map((row) => {
208
+ const cells = row.getVisibleCells();
209
+ const select = cells.find((c) => c.column.id === "select");
210
+ const actions = cells.find((c) => c.column.id === "actions");
211
+ const [primary, ...fields] = cells.filter((c) => c !== select && c !== actions);
212
+ return /* @__PURE__ */ jsxs("li", { className: cx("rounded-2xl border p-4", row.getIsSelected() ? "border-accent/30 bg-accent/5" : "border-contrast/5 bg-surface"), children: [
213
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
214
+ select && /* @__PURE__ */ jsx("div", { className: "pt-1", children: render(select) }),
215
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-semibold text-ink", children: primary && render(primary) })
216
+ ] }),
217
+ fields.map((cell) => /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-between gap-4 border-t border-contrast/5 py-2", children: [
218
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase tracking-widest text-muted", children: t(columnLabel(cell.column)) }),
219
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 text-right text-sm font-semibold text-body [overflow-wrap:anywhere]", children: render(cell) })
220
+ ] }, cell.id)),
221
+ actions && /* @__PURE__ */ jsx("div", { className: "mt-2 flex justify-end border-t border-contrast/5 pt-2", children: render(actions) })
222
+ ] }, row.id);
223
+ }) }),
224
+ detailTitle && /* @__PURE__ */ jsx(Modal, { open: !!detailRow, onClose: () => setDetailRow(null), title: t(detailTitle), maxWidth: "lg", children: detailRow && (() => {
225
+ const row = table.getCoreRowModel().rows.find((r) => r.original === detailRow);
226
+ const cells = row ? row.getAllCells().filter((c) => !["select", "actions"].includes(c.column.id)) : [];
227
+ return /* @__PURE__ */ jsxs("div", { children: [
228
+ /* @__PURE__ */ jsx("dl", { className: "divide-y divide-contrast/5", children: cells.map((cell) => /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 py-3", children: [
229
+ /* @__PURE__ */ jsx("dt", { className: "text-xs font-semibold uppercase tracking-widest text-muted", children: t(columnLabel(cell.column)) }),
230
+ /* @__PURE__ */ jsx("dd", { className: "min-w-0 text-right text-sm font-semibold text-body [overflow-wrap:anywhere]", children: render(cell) })
231
+ ] }, cell.id)) }),
232
+ rowActions.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-wrap justify-end gap-2", children: rowActions.map((action) => /* @__PURE__ */ jsxs(
233
+ "button",
234
+ {
235
+ type: "button",
236
+ className: cx("inline-flex items-center gap-2 rounded-xl px-4 py-2 text-sm font-semibold transition-colors", DETAIL_ACTION_VARIANTS[action.variant] ?? DETAIL_ACTION_VARIANTS.default),
237
+ onClick: () => {
238
+ setDetailRow(null);
239
+ action.onClick(detailRow);
240
+ },
241
+ children: [
242
+ action.icon,
243
+ " ",
244
+ t(action.label)
245
+ ]
246
+ },
247
+ action.key
248
+ )) })
249
+ ] });
250
+ })() }),
251
+ rows.length > 0 && /* @__PURE__ */ jsxs("nav", { "aria-label": "Pages", className: "flex flex-wrap items-center justify-between gap-2 border-t border-contrast/5 px-4 py-4", children: [
252
+ /* @__PURE__ */ jsx("div", { className: "flex-1 text-xs font-bold text-soft", children: serverPagination ? `Showing ${serverPagination.from}-${serverPagination.to} of ${serverPagination.total}` : `Page ${table.getState().pagination.pageIndex + 1} of ${table.getPageCount()}` }),
253
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: serverPagination ? /* @__PURE__ */ jsxs(Fragment, { children: [
254
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "First page", className: pageButtonClass, onClick: () => goToPage(1), disabled: !serverPagination.prev_page_url, children: /* @__PURE__ */ jsx(ChevronsLeft, { size: 16 }) }),
255
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Previous page", className: pageButtonClass, onClick: () => goToPage(serverPagination.current_page - 1), disabled: !serverPagination.prev_page_url, children: /* @__PURE__ */ jsx(ChevronLeft, { size: 16 }) }),
256
+ /* @__PURE__ */ jsxs("span", { className: "px-4 py-2 text-xs font-semibold text-soft", children: [
257
+ "Page ",
258
+ serverPagination.current_page,
259
+ " of ",
260
+ serverPagination.last_page
261
+ ] }),
262
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Next page", className: pageButtonClass, onClick: () => goToPage(serverPagination.current_page + 1), disabled: !serverPagination.next_page_url, children: /* @__PURE__ */ jsx(ChevronRight, { size: 16 }) }),
263
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Last page", className: pageButtonClass, onClick: () => goToPage(serverPagination.last_page), disabled: !serverPagination.next_page_url, children: /* @__PURE__ */ jsx(ChevronsRight, { size: 16 }) })
264
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
265
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "First page", className: pageButtonClass, onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: /* @__PURE__ */ jsx(ChevronsLeft, { size: 16 }) }),
266
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Previous page", className: pageButtonClass, onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: /* @__PURE__ */ jsx(ChevronLeft, { size: 16 }) }),
267
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Next page", className: pageButtonClass, onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: /* @__PURE__ */ jsx(ChevronRight, { size: 16 }) }),
268
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Last page", className: pageButtonClass, onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: /* @__PURE__ */ jsx(ChevronsRight, { size: 16 }) })
269
+ ] }) })
270
+ ] })
271
+ ] });
272
+ }
273
+ export {
274
+ AdminDataTable as default
275
+ };
@@ -44,7 +44,7 @@ function PlainPageHero({ title, description, breadcrumb, icon }) {
44
44
  children: [
45
45
  icon && /* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg flex items-center justify-center shrink-0", style: { background: "color-mix(in srgb, var(--color-accent) 10%, transparent)" }, children: icon }),
46
46
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 leading-tight", children: [
47
- parent && /* @__PURE__ */ jsx("p", { className: "hidden sm:block text-[11px] text-tone-400 truncate", children: parent.path ? /* @__PURE__ */ jsx(Link, { to: parent.path, className: "hover:text-accent", children: parent.label }) : parent.label }),
47
+ parent && /* @__PURE__ */ jsx("p", { className: "hidden sm:block text-[length:max(11px,var(--okjt-min-text,0px))] text-tone-400 truncate", children: parent.path ? /* @__PURE__ */ jsx(Link, { to: parent.path, className: "hover:text-accent", children: parent.label }) : parent.label }),
48
48
  /* @__PURE__ */ jsx("p", { className: "text-base font-semibold text-body truncate", children: title })
49
49
  ] }),
50
50
  /* @__PURE__ */ jsx(
@@ -127,7 +127,7 @@ function BoldPageHero({ title, subtitle, description, breadcrumbs = [], breadcru
127
127
  className: "flex items-center gap-3 min-w-0",
128
128
  children: [
129
129
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 leading-tight", children: [
130
- parent && /* @__PURE__ */ jsx("p", { className: "hidden sm:block text-[11px] text-soft truncate", children: parentTo ? /* @__PURE__ */ jsx(Link, { to: parentTo, className: "hover:text-ink transition", children: parent.label }) : parent.label }),
130
+ parent && /* @__PURE__ */ jsx("p", { className: "hidden sm:block text-[length:max(11px,var(--okjt-min-text,0px))] text-soft truncate", children: parentTo ? /* @__PURE__ */ jsx(Link, { to: parentTo, className: "hover:text-ink transition", children: parent.label }) : parent.label }),
131
131
  /* @__PURE__ */ jsx("p", { className: "text-ink font-semibold truncate", children: title })
132
132
  ] }),
133
133
  /* @__PURE__ */ jsxs(
@@ -10,7 +10,7 @@ const Named = ({ name, fallback: Fallback, className }) => /* @__PURE__ */ jsx(D
10
10
  function Badge({ item }) {
11
11
  if (useLook() === "bold") return /* @__PURE__ */ jsx(BoldBadge, { item });
12
12
  if (item.badge > 0) {
13
- return /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 min-w-[1.25rem] h-5 px-1.5 rounded-full bg-accent/15 text-accent-dark text-[11px] font-semibold flex items-center justify-center", children: item.badge > 99 ? "99+" : item.badge });
13
+ return /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 min-w-[1.25rem] h-5 px-1.5 rounded-full bg-accent/15 text-accent-dark text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold flex items-center justify-center", children: item.badge > 99 ? "99+" : item.badge });
14
14
  }
15
15
  if (item.dot) {
16
16
  return /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 w-2 h-2 rounded-full bg-amber-500", "aria-label": "Unsaved changes" });
@@ -22,7 +22,7 @@ function Badge({ item }) {
22
22
  }
23
23
  function BoldBadge({ item }) {
24
24
  if (item.badge > 0) {
25
- return /* @__PURE__ */ jsx("span", { className: "ml-auto flex h-5 min-w-[1.25rem] shrink-0 items-center justify-center rounded-full bg-accent/15 px-1.5 text-[11px] font-semibold text-accent-dark", children: item.badge > 99 ? "99+" : item.badge });
25
+ return /* @__PURE__ */ jsx("span", { className: "ml-auto flex h-5 min-w-[1.25rem] shrink-0 items-center justify-center rounded-full bg-accent/15 px-1.5 text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold text-accent-dark", children: item.badge > 99 ? "99+" : item.badge });
26
26
  }
27
27
  if (item.dot) return /* @__PURE__ */ jsx("span", { className: "ml-auto h-2 w-2 shrink-0 rounded-full bg-amber-400", "aria-label": "Unsaved changes" });
28
28
  if (item.count != null) return /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-tone-400", children: item.count });
@@ -48,7 +48,7 @@ function SidePanelNav({ panel, onPicked, selection, manage = {} }) {
48
48
  role: "tab",
49
49
  "aria-selected": active,
50
50
  onClick: () => pick(item.id),
51
- className: `relative flex flex-col items-center gap-1 py-2 px-0.5 rounded-xl text-[10px] font-semibold uppercase tracking-wide transition-colors border ${active ? "bg-accent/10 border-accent/30 text-accent-dark" : "border-transparent text-tone-500 hover:bg-tone-50 hover:text-tone-700"}`,
51
+ className: `relative flex flex-col items-center gap-1 py-2 px-0.5 rounded-xl text-[length:max(10px,var(--okjt-min-text,0px))] font-semibold uppercase tracking-wide transition-colors border ${active ? "bg-accent/10 border-accent/30 text-accent-dark" : "border-transparent text-tone-500 hover:bg-tone-50 hover:text-tone-700"}`,
52
52
  children: [
53
53
  Icon && /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4", "aria-hidden": "true" }),
54
54
  item.label,
@@ -68,7 +68,7 @@ function SidePanelNav({ panel, onPicked, selection, manage = {} }) {
68
68
  const selecting = !!selection?.selecting;
69
69
  const canReorder = !!manage.canReorder && !selecting && movable.length > 1;
70
70
  const row = ({ item, groupStart }, leading) => /* @__PURE__ */ jsxs(Fragment, { children: [
71
- groupStart && /* @__PURE__ */ jsx("p", { className: `${look === "bold" ? "px-2.5 pb-1 text-xs font-semibold capitalize text-tone-400" : "px-2 pb-1 text-[10px] font-bold uppercase tracking-[0.16em] text-tone-400"} ${groupStart === "later" ? "pt-3" : ""}`, children: item.group }),
71
+ groupStart && /* @__PURE__ */ jsx("p", { className: `${look === "bold" ? "px-2.5 pb-1 text-xs font-semibold capitalize text-tone-400" : "px-2 pb-1 text-[length:max(10px,var(--okjt-min-text,0px))] font-bold uppercase tracking-[0.16em] text-tone-400"} ${groupStart === "later" ? "pt-3" : ""}`, children: item.group }),
72
72
  /* @__PURE__ */ jsx(
73
73
  ItemRow,
74
74
  {
@@ -93,7 +93,7 @@ function BoldStatCard({ icon, label, value, trend, hint, onClick, active = false
93
93
  {
94
94
  icon: up ? "trend-up" : down ? "trend-down" : "trend-flat",
95
95
  fallback: up ? TrendingUp : down ? TrendingDown : Minus,
96
- className: `${trendColor} text-[10px]`
96
+ className: `${trendColor} text-[length:max(10px,var(--okjt-min-text,0px))]`
97
97
  }
98
98
  ),
99
99
  /* @__PURE__ */ jsxs("span", { className: `text-xs font-medium ${trendColor}`, children: [
@@ -60,7 +60,7 @@ function AdminToolbarFilters({ filters }) {
60
60
  children: [
61
61
  /* @__PURE__ */ jsx(SlidersHorizontal, { className: "w-4 h-4" }),
62
62
  /* @__PURE__ */ jsx("span", { className: "hidden sm:inline max-w-[10rem] truncate", children: buttonLabel }),
63
- activeCount > 0 && /* @__PURE__ */ jsx("span", { className: "min-w-5 h-5 px-1 rounded-full bg-accent text-white text-[10px] font-bold flex items-center justify-center", children: activeCount })
63
+ activeCount > 0 && /* @__PURE__ */ jsx("span", { className: "min-w-5 h-5 px-1 rounded-full bg-accent text-white text-[length:max(10px,var(--okjt-min-text,0px))] font-bold flex items-center justify-center", children: activeCount })
64
64
  ]
65
65
  }
66
66
  ),
@@ -76,7 +76,7 @@ function AdminToolbarFilters({ filters }) {
76
76
  className: "absolute bottom-full left-0 mb-3 w-[min(20rem,calc(100vw-2rem))] max-h-[60vh] overflow-y-auto bg-surface rounded-2xl shadow-2xl border border-tone-100 p-4 space-y-4 text-left",
77
77
  children: [
78
78
  groups.map((group) => /* @__PURE__ */ jsxs("div", { children: [
79
- /* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: group.label || "Show" }),
79
+ /* @__PURE__ */ jsx("p", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: group.label || "Show" }),
80
80
  /* @__PURE__ */ jsx(
81
81
  SegmentedControl,
82
82
  {
@@ -100,7 +100,7 @@ function AdminToolbarFilters({ filters }) {
100
100
  )
101
101
  ] }, group.id)),
102
102
  sort && /* @__PURE__ */ jsxs("div", { children: [
103
- /* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: sort.label || "Sort by" }),
103
+ /* @__PURE__ */ jsx("p", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: sort.label || "Sort by" }),
104
104
  /* @__PURE__ */ jsx(
105
105
  "select",
106
106
  {
@@ -114,7 +114,7 @@ function AdminToolbarFilters({ filters }) {
114
114
  ] }),
115
115
  filters.extra && /* @__PURE__ */ jsx("div", { className: "space-y-2", children: filters.extra }),
116
116
  views && /* @__PURE__ */ jsxs("div", { children: [
117
- /* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: "Saved views" }),
117
+ /* @__PURE__ */ jsx("p", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold uppercase tracking-wider text-tone-500 mb-2", children: "Saved views" }),
118
118
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
119
119
  views.items.map((view2) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center rounded-lg bg-tone-50 text-sm text-tone-700", children: [
120
120
  /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => {
@@ -203,7 +203,7 @@ function AdminTutorial({ steps: allSteps, onComplete, isRestarted = false, open,
203
203
  /* @__PURE__ */ jsx("div", { className: "p-6 pb-0", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start mb-4", children: [
204
204
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
205
205
  /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center", children: currentStep === steps.length - 1 ? /* @__PURE__ */ jsx(Trophy, { className: "w-5 h-5 text-accent" }) : /* @__PURE__ */ jsx("span", { className: "text-accent font-bold text-base", children: currentStep + 1 }) }),
206
- currentStep === 0 && /* @__PURE__ */ jsx("span", { className: "bg-accent/10 text-accent text-[10px] uppercase tracking-wider font-bold px-2 py-1 rounded-md", children: "New Feature" })
206
+ currentStep === 0 && /* @__PURE__ */ jsx("span", { className: "bg-accent/10 text-accent text-[length:max(10px,var(--okjt-min-text,0px))] uppercase tracking-wider font-bold px-2 py-1 rounded-md", children: "New Feature" })
207
207
  ] }),
208
208
  /* @__PURE__ */ jsx(
209
209
  "button",
@@ -74,7 +74,7 @@ function FiltersMenu({ filters, search, storageKey }) {
74
74
  children: [
75
75
  /* @__PURE__ */ jsx(Named, { name: "filters", fallback: SlidersHorizontal }),
76
76
  /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "Filters" }),
77
- active > 0 && /* @__PURE__ */ jsx("span", { className: "min-w-[1.25rem] h-5 px-1 rounded-full bg-accent text-[11px] leading-5 text-white text-center", children: active })
77
+ active > 0 && /* @__PURE__ */ jsx("span", { className: "min-w-[1.25rem] h-5 px-1 rounded-full bg-accent text-[length:max(11px,var(--okjt-min-text,0px))] leading-5 text-white text-center", children: active })
78
78
  ]
79
79
  }
80
80
  ),
@@ -210,7 +210,7 @@ function BoldToolbar({ search, filters = [], view, actions = [], selection, chil
210
210
  className: "w-40 sm:w-56 sm:focus:w-72 rounded-xl border border-contrast/10 bg-contrast/5 py-2 pl-9 pr-9 text-sm transition-all"
211
211
  }
212
212
  ),
213
- /* @__PURE__ */ jsx("kbd", { className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 hidden sm:block rounded border border-contrast/15 px-1.5 text-[10px] text-soft", children: "/" })
213
+ /* @__PURE__ */ jsx("kbd", { className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 hidden sm:block rounded border border-contrast/15 px-1.5 text-[length:max(10px,var(--okjt-min-text,0px))] text-soft", children: "/" })
214
214
  ] }),
215
215
  filters.length > 0 && /* @__PURE__ */ jsx(FiltersMenu, { filters, search, storageKey }),
216
216
  view && view.modes?.length > 1 && /* @__PURE__ */ jsx("div", { className: "flex gap-1 rounded-xl border border-contrast/10 bg-ink-deep/30 p-1", children: view.modes.map((mode) => /* @__PURE__ */ jsx(
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { collaboratorColor, initials, useModules } from "./modules.js";
3
3
  const SIZES = {
4
- xs: "w-5 h-5 text-[9px]",
5
- sm: "w-7 h-7 text-[11px]",
4
+ xs: "w-5 h-5 text-[length:max(9px,var(--okjt-min-text,0px))]",
5
+ sm: "w-7 h-7 text-[length:max(11px,var(--okjt-min-text,0px))]",
6
6
  md: "w-9 h-9 text-xs"
7
7
  };
8
8
  function CollaboratorAvatar({ person, size = "sm", className = "" }) {
@@ -41,7 +41,7 @@ const DEFAULT_SHELL = {
41
41
  logoBoxClass: "p-4",
42
42
  logoClass: "h-10 w-auto",
43
43
  railLogoClass: "h-9 w-12 object-contain",
44
- navTitleClass: "px-3 mb-1 text-[10px] font-bold uppercase tracking-[0.18em] text-white/50",
44
+ navTitleClass: "px-3 mb-1 text-[length:max(10px,var(--okjt-min-text,0px))] font-bold uppercase tracking-[0.18em] text-white/50",
45
45
  navItemClass: "px-3 py-2 rounded-lg",
46
46
  navActiveClass: "text-accent-dark bg-white shadow-sm",
47
47
  navIdleClass: "text-white/75 hover:text-accent-dark hover:bg-white",
@@ -78,7 +78,7 @@ function DashboardSidebar({ isOpen, onClose, collapsed = false }) {
78
78
  !rail && /* @__PURE__ */ jsx("span", { className: shell.navLabelClass, children: item.label }),
79
79
  !rail && (here.length > 0 || newCount > 0) && /* @__PURE__ */ jsxs("span", { className: "ml-auto flex items-center gap-1.5 shrink-0", "aria-hidden": "true", children: [
80
80
  /* @__PURE__ */ jsx(CollaboratorAvatars, { people: here, size: "xs", max: 2 }),
81
- newCount > 0 && /* @__PURE__ */ jsx("span", { className: `min-w-[1.25rem] h-5 px-1.5 rounded-full ${shell.badgeClass} text-[10px] font-bold flex items-center justify-center`, children: newCount > 99 ? "99+" : newCount })
81
+ newCount > 0 && /* @__PURE__ */ jsx("span", { className: `min-w-[1.25rem] h-5 px-1.5 rounded-full ${shell.badgeClass} text-[length:max(10px,var(--okjt-min-text,0px))] font-bold flex items-center justify-center`, children: newCount > 99 ? "99+" : newCount })
82
82
  ] }),
83
83
  isActive && !rail && /* @__PURE__ */ jsx(
84
84
  motion.div,
@@ -196,7 +196,7 @@ function ShareModal({ isOpen, onClose }) {
196
196
  className: selectClass,
197
197
  children: ROLES.map((r) => /* @__PURE__ */ jsx("option", { value: r.value, children: r.label }, r.value))
198
198
  }
199
- ) : /* @__PURE__ */ jsx("span", { className: "px-2 py-0.5 rounded-full bg-tone-100 text-[11px] font-medium text-tone-600", children: roleLabel(person.role) }),
199
+ ) : /* @__PURE__ */ jsx("span", { className: "px-2 py-0.5 rounded-full bg-tone-100 text-[length:max(11px,var(--okjt-min-text,0px))] font-medium text-tone-600", children: roleLabel(person.role) }),
200
200
  isOwner && person.pending && /* @__PURE__ */ jsx(
201
201
  Button,
202
202
  {
@@ -46,7 +46,7 @@ function TwoPaneDialog({ open, title, subtitle, sections, active, onSelect, onCl
46
46
  "aria-current": on ? "step" : void 0,
47
47
  className: `flex w-full items-start gap-3 rounded-xl px-3 py-2 text-left transition-colors ${on ? "bg-ink text-white" : "text-body hover:bg-tint"}`,
48
48
  children: [
49
- /* @__PURE__ */ jsx("span", { className: `mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full text-[11px] font-semibold ${on ? "bg-white/20" : s.done ? "bg-positive text-white" : "bg-line text-soft"}`, children: s.done && !on ? "\u2713" : i + 1 }),
49
+ /* @__PURE__ */ jsx("span", { className: `mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full text-[length:max(11px,var(--okjt-min-text,0px))] font-semibold ${on ? "bg-white/20" : s.done ? "bg-positive text-white" : "bg-line text-soft"}`, children: s.done && !on ? "\u2713" : i + 1 }),
50
50
  /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
51
51
  /* @__PURE__ */ jsx("span", { className: "block text-sm font-semibold", children: s.label }),
52
52
  s.hint && /* @__PURE__ */ jsx("span", { className: `hidden text-xs sm:block ${on ? "text-white/70" : "text-tone-500"}`, children: s.hint })
@@ -38,13 +38,13 @@ function Entry({ revision, batchSize, showModule, onRestore, restoring, canResto
38
38
  " ",
39
39
  /* @__PURE__ */ jsx("span", { className: "font-medium text-tone-900", children: revision.subject_label || revision.subject_type })
40
40
  ] }),
41
- /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-tone-500 flex flex-wrap gap-x-2", children: [
41
+ /* @__PURE__ */ jsxs("p", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] text-tone-500 flex flex-wrap gap-x-2", children: [
42
42
  /* @__PURE__ */ jsx("span", { title: format(when, "PPpp"), children: formatDistanceToNow(when, { addSuffix: true }) }),
43
43
  showModule && /* @__PURE__ */ jsx("span", { className: "px-1.5 rounded bg-tone-100 text-tone-600", children: moduleLabel })
44
44
  ] }),
45
45
  revision.changes?.length > 0 && /* @__PURE__ */ jsxs("ul", { className: "space-y-0.5 pt-0.5", children: [
46
46
  revision.changes.slice(0, 4).map((change) => /* @__PURE__ */ jsx(Change, { change }, change.field)),
47
- revision.changes.length > 4 && /* @__PURE__ */ jsxs("li", { className: "text-[11px] text-tone-400", children: [
47
+ revision.changes.length > 4 && /* @__PURE__ */ jsxs("li", { className: "text-[length:max(11px,var(--okjt-min-text,0px))] text-tone-400", children: [
48
48
  "+",
49
49
  revision.changes.length - 4,
50
50
  " more fields"
@@ -147,7 +147,7 @@ function VersionHistoryDrawer({ module, onClose, onRestored }) {
147
147
  const header = day !== lastDay ? day : null;
148
148
  lastDay = day;
149
149
  return /* @__PURE__ */ jsxs("li", { children: [
150
- header && /* @__PURE__ */ jsx("h3", { className: "sticky top-0 z-10 bg-surface/95 backdrop-blur pt-3 pb-1 text-[11px] font-bold uppercase tracking-wider text-tone-500", children: header }),
150
+ header && /* @__PURE__ */ jsx("h3", { className: "sticky top-0 z-10 bg-surface/95 backdrop-blur pt-3 pb-1 text-[length:max(11px,var(--okjt-min-text,0px))] font-bold uppercase tracking-wider text-tone-500", children: header }),
151
151
  /* @__PURE__ */ jsx("ul", { className: "divide-y divide-tone-100", children: /* @__PURE__ */ jsx(
152
152
  Entry,
153
153
  {
@@ -1,18 +1,19 @@
1
- import { useCallback, useMemo, useRef, useState } from "react";
2
- import { useQueryClient } from "@tanstack/react-query";
1
+ import { useCallback, useContext, useMemo, useRef, useState } from "react";
2
+ import { QueryClientContext } from "@tanstack/react-query";
3
3
  import { toast } from "react-hot-toast";
4
4
  import { usePermissions, confirmAction, notifyError, notifySuccess } from "@okjt/ui";
5
- import { useDashboard } from "./DashboardProvider.js";
5
+ import { useComponentDefaults, useDashboard } from "./DashboardProvider.js";
6
6
  const resolve = (value, ...args) => typeof value === "function" ? value(...args) : value;
7
7
  const deniedByRole = (err) => err?.response?.status === 403 && err.response.data?.reason === "role";
8
8
  function useAdminAction(fn, options = {}) {
9
9
  const { canEdit, isOwner } = usePermissions();
10
10
  const allowed = options.role === "owner" ? isOwner : canEdit;
11
- const queryClient = useQueryClient();
11
+ const queryClient = useContext(QueryClientContext);
12
+ const defaults = useComponentDefaults("AdminAction", {});
12
13
  const refreshCollaboration = useDashboard().useAfterChange();
13
14
  const [pendingKeys, setPendingKeys] = useState(() => /* @__PURE__ */ new Set());
14
15
  const latest = useRef({ fn, options });
15
- latest.current = { fn, options };
16
+ latest.current = { fn, options: { ...defaults, ...options } };
16
17
  const run = useCallback(async (...args) => {
17
18
  const { fn: write, options: opts } = latest.current;
18
19
  if (!allowed) {
@@ -27,10 +28,12 @@ function useAdminAction(fn, options = {}) {
27
28
  const result = await write(...args);
28
29
  const message = resolve(opts.success, result, ...args);
29
30
  if (message) notifySuccess(message);
30
- await Promise.all([
31
- ...(opts.invalidate || []).map((queryKey) => queryClient.invalidateQueries({ queryKey })),
32
- queryClient.invalidateQueries({ queryKey: ["revisions"] })
33
- ]);
31
+ if (queryClient) {
32
+ await Promise.all([
33
+ ...(opts.invalidate || []).map((queryKey) => queryClient.invalidateQueries({ queryKey })),
34
+ ...opts.refreshHistory === false ? [] : [queryClient.invalidateQueries({ queryKey: ["revisions"] })]
35
+ ]);
36
+ }
34
37
  refreshCollaboration?.();
35
38
  opts.onSuccess?.(result, ...args);
36
39
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okjt/dashboard",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Dashboard pages for OKJTech projects: page layout, hero, summary cards, floating toolbar with search and filters, side panel, lists, bulk actions, one way to save, and working together: presence, version history, sharing; the dashboard shell, sign-in pages and account menu",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "exports": {
13
13
  ".": "./dist/index.js",
14
- "./toolbar-glass.css": "./dist/toolbar-glass.css"
14
+ "./toolbar-glass.css": "./dist/toolbar-glass.css",
15
+ "./table": "./dist/AdminDataTable.js"
15
16
  },
16
17
  "files": [
17
18
  "dist",
@@ -26,7 +27,7 @@
26
27
  "test": "node build.mjs && vitest run"
27
28
  },
28
29
  "dependencies": {
29
- "@okjt/ui": "^0.4.0"
30
+ "@okjt/ui": "^0.5.0"
30
31
  },
31
32
  "peerDependencies": {
32
33
  "@tanstack/react-query": ">=5",
@@ -37,9 +38,18 @@
37
38
  "react-dom": ">=18",
38
39
  "react-hook-form": ">=7",
39
40
  "react-hot-toast": ">=2",
40
- "react-router-dom": ">=6.4"
41
+ "react-router-dom": ">=6.4",
42
+ "@tanstack/react-table": ">=8"
41
43
  },
42
44
  "publishConfig": {
43
45
  "access": "public"
46
+ },
47
+ "devDependencies": {
48
+ "@tanstack/react-table": "^8.21.3"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "@tanstack/react-table": {
52
+ "optional": true
53
+ }
44
54
  }
45
55
  }