tembro 4.2.1 → 6.0.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/CHANGELOG.md +29 -0
- package/dist/components/charts/progress-circle.d.ts +12 -3
- package/dist/components/data-table/data-table.d.ts +2 -2
- package/dist/components/feedback/index.d.ts +0 -2
- package/dist/components/layout/section.d.ts +1 -8
- package/dist/components/patterns/index.d.ts +0 -8
- package/dist/components/patterns/public.d.ts +0 -8
- package/dist/components/ui/hover-card/index.cjs +1 -0
- package/dist/components/ui/hover-card/index.d.ts +11 -0
- package/dist/components/ui/hover-card/index.js +1 -0
- package/dist/components/ui/menubar/index.cjs +1 -0
- package/dist/components/ui/menubar/index.d.ts +42 -0
- package/dist/components/ui/menubar/index.js +1 -0
- package/dist/components/ui/navigation-menu/index.cjs +1 -0
- package/dist/components/ui/navigation-menu/index.d.ts +20 -0
- package/dist/components/ui/navigation-menu/index.js +1 -0
- package/dist/components/ui/number-field/index.cjs +1 -0
- package/dist/components/ui/number-field/index.d.ts +18 -0
- package/dist/components/ui/number-field/index.js +1 -0
- package/dist/components/ui/toggle-group/index.cjs +1 -0
- package/dist/components/ui/toggle-group/index.d.ts +13 -0
- package/dist/components/ui/toggle-group/index.js +1 -0
- package/dist/components/ui/toolbar/index.cjs +1 -0
- package/dist/components/ui/toolbar/index.d.ts +14 -0
- package/dist/components/ui/toolbar/index.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/src/components/charts/progress-circle.cjs +1 -1
- package/dist/src/components/charts/progress-circle.js +57 -3
- package/dist/src/components/data-table/data-table.cjs +1 -1
- package/dist/src/components/data-table/data-table.js +102 -100
- package/dist/src/components/feedback/index.cjs +1 -1
- package/dist/src/components/feedback/index.js +2 -4
- package/dist/src/components/layout/index.cjs +1 -1
- package/dist/src/components/layout/index.js +3 -3
- package/dist/src/components/layout/public.cjs +1 -1
- package/dist/src/components/layout/public.js +3 -3
- package/dist/src/components/layout/section.cjs +1 -1
- package/dist/src/components/layout/section.js +2 -26
- package/dist/src/components/patterns/index.cjs +1 -1
- package/dist/src/components/patterns/index.js +2 -10
- package/dist/src/components/patterns/public.cjs +1 -1
- package/dist/src/components/patterns/public.js +2 -10
- package/dist/src/components/ui/hover-card/index.cjs +1 -0
- package/dist/src/components/ui/hover-card/index.js +50 -0
- package/dist/src/components/ui/menubar/index.cjs +1 -0
- package/dist/src/components/ui/menubar/index.js +132 -0
- package/dist/src/components/ui/navigation-menu/index.cjs +1 -0
- package/dist/src/components/ui/navigation-menu/index.js +73 -0
- package/dist/src/components/ui/number-field/index.cjs +1 -0
- package/dist/src/components/ui/number-field/index.js +73 -0
- package/dist/src/components/ui/toggle-group/index.cjs +1 -0
- package/dist/src/components/ui/toggle-group/index.js +32 -0
- package/dist/src/components/ui/toolbar/index.cjs +1 -0
- package/dist/src/components/ui/toolbar/index.js +50 -0
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.js +92 -95
- package/dist/src/public-component-surface.cjs +1 -1
- package/dist/src/public-component-surface.js +31 -42
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +112 -112
- package/packages/cli/vendor/src/components/charts/progress-circle.tsx +78 -3
- package/packages/cli/vendor/src/components/data-table/data-table.tsx +4 -4
- package/packages/cli/vendor/src/components/feedback/index.ts +0 -2
- package/packages/cli/vendor/src/components/layout/section.tsx +1 -28
- package/packages/cli/vendor/src/components/patterns/index.ts +0 -8
- package/packages/cli/vendor/src/components/patterns/public.ts +0 -8
- package/packages/cli/vendor/src/components/ui/hover-card/index.tsx +72 -0
- package/packages/cli/vendor/src/components/ui/menubar/index.tsx +140 -0
- package/packages/cli/vendor/src/components/ui/navigation-menu/index.tsx +100 -0
- package/packages/cli/vendor/src/components/ui/number-field/index.tsx +89 -0
- package/packages/cli/vendor/src/components/ui/toggle-group/index.tsx +72 -0
- package/packages/cli/vendor/src/components/ui/toolbar/index.tsx +67 -0
- package/packages/cli/vendor/src/index.ts +12 -5
- package/packages/cli/vendor/src/public-component-surface.ts +7 -10
- package/packages/cli/vendor/templates/showcase/src/showcase/data/registry.ts +14 -12
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/HeroSection.tsx +2 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/WorkbenchSidebar.tsx +1 -1
- package/packages/cli/vendor/templates/showcase/src/showcase/sections/ComponentLivePreview.tsx +2 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/sections/FormsSection.tsx +2 -2
- package/packages/cli/vendor/templates/styles/globals.css +5 -5
- package/registry.json +2630 -233
- package/dist/components/charts/progress-ring.cjs +0 -1
- package/dist/components/charts/progress-ring.d.ts +0 -13
- package/dist/components/charts/progress-ring.js +0 -1
- package/dist/components/feedback/loading-state.cjs +0 -1
- package/dist/components/feedback/loading-state.d.ts +0 -9
- package/dist/components/feedback/loading-state.js +0 -1
- package/dist/components/feedback/page-state.cjs +0 -1
- package/dist/components/feedback/page-state.d.ts +0 -18
- package/dist/components/feedback/page-state.js +0 -1
- package/dist/components/layout/page-container.cjs +0 -1
- package/dist/components/layout/page-container.d.ts +0 -7
- package/dist/components/layout/page-container.js +0 -1
- package/dist/components/layout/page-header.cjs +0 -1
- package/dist/components/layout/page-header.d.ts +0 -23
- package/dist/components/layout/page-header.js +0 -1
- package/dist/components/layout/section-header.cjs +0 -1
- package/dist/components/layout/section-header.d.ts +0 -14
- package/dist/components/layout/section-header.js +0 -1
- package/dist/components/layout/sidebar-nav.cjs +0 -1
- package/dist/components/layout/sidebar-nav.d.ts +0 -37
- package/dist/components/layout/sidebar-nav.js +0 -1
- package/dist/components/layout/sticky-footer-bar.cjs +0 -1
- package/dist/components/layout/sticky-footer-bar.d.ts +0 -7
- package/dist/components/layout/sticky-footer-bar.js +0 -1
- package/dist/components/patterns/bulk-action-bar.cjs +0 -1
- package/dist/components/patterns/bulk-action-bar.d.ts +0 -10
- package/dist/components/patterns/bulk-action-bar.js +0 -1
- package/dist/components/patterns/data-view.cjs +0 -1
- package/dist/components/patterns/data-view.d.ts +0 -17
- package/dist/components/patterns/data-view.js +0 -1
- package/dist/components/patterns/detail-layout.cjs +0 -1
- package/dist/components/patterns/detail-layout.d.ts +0 -16
- package/dist/components/patterns/detail-layout.js +0 -1
- package/dist/components/patterns/form-builder.cjs +0 -1
- package/dist/components/patterns/form-builder.d.ts +0 -110
- package/dist/components/patterns/form-builder.js +0 -1
- package/dist/components/patterns/page-toolbar.cjs +0 -1
- package/dist/components/patterns/page-toolbar.d.ts +0 -11
- package/dist/components/patterns/page-toolbar.js +0 -1
- package/dist/components/patterns/resource-detail-page.cjs +0 -1
- package/dist/components/patterns/resource-detail-page.d.ts +0 -39
- package/dist/components/patterns/resource-detail-page.js +0 -1
- package/dist/components/patterns/resource-page.cjs +0 -1
- package/dist/components/patterns/resource-page.d.ts +0 -30
- package/dist/components/patterns/resource-page.js +0 -1
- package/dist/components/patterns/settings-page.cjs +0 -1
- package/dist/components/patterns/settings-page.d.ts +0 -21
- package/dist/components/patterns/settings-page.js +0 -1
- package/dist/src/components/charts/progress-ring.cjs +0 -1
- package/dist/src/components/charts/progress-ring.js +0 -57
- package/dist/src/components/feedback/loading-state.cjs +0 -1
- package/dist/src/components/feedback/loading-state.js +0 -15
- package/dist/src/components/feedback/page-state.cjs +0 -1
- package/dist/src/components/feedback/page-state.js +0 -28
- package/dist/src/components/layout/page-container.cjs +0 -1
- package/dist/src/components/layout/page-container.js +0 -21
- package/dist/src/components/layout/page-header.cjs +0 -1
- package/dist/src/components/layout/page-header.js +0 -92
- package/dist/src/components/layout/section-header.cjs +0 -1
- package/dist/src/components/layout/section-header.js +0 -44
- package/dist/src/components/layout/sidebar-nav.cjs +0 -1
- package/dist/src/components/layout/sidebar-nav.js +0 -220
- package/dist/src/components/layout/sticky-footer-bar.cjs +0 -1
- package/dist/src/components/layout/sticky-footer-bar.js +0 -20
- package/dist/src/components/patterns/bulk-action-bar.cjs +0 -1
- package/dist/src/components/patterns/bulk-action-bar.js +0 -34
- package/dist/src/components/patterns/data-view.cjs +0 -1
- package/dist/src/components/patterns/data-view.js +0 -47
- package/dist/src/components/patterns/detail-layout.cjs +0 -1
- package/dist/src/components/patterns/detail-layout.js +0 -65
- package/dist/src/components/patterns/form-builder.cjs +0 -1
- package/dist/src/components/patterns/form-builder.js +0 -263
- package/dist/src/components/patterns/page-toolbar.cjs +0 -1
- package/dist/src/components/patterns/page-toolbar.js +0 -41
- package/dist/src/components/patterns/resource-detail-page.cjs +0 -1
- package/dist/src/components/patterns/resource-detail-page.js +0 -100
- package/dist/src/components/patterns/resource-page.cjs +0 -1
- package/dist/src/components/patterns/resource-page.js +0 -88
- package/dist/src/components/patterns/settings-page.cjs +0 -1
- package/dist/src/components/patterns/settings-page.js +0 -64
- package/packages/cli/vendor/src/components/charts/progress-ring.tsx +0 -56
- package/packages/cli/vendor/src/components/feedback/loading-state.tsx +0 -15
- package/packages/cli/vendor/src/components/feedback/page-state.tsx +0 -29
- package/packages/cli/vendor/src/components/layout/page-container.tsx +0 -30
- package/packages/cli/vendor/src/components/layout/page-header.tsx +0 -104
- package/packages/cli/vendor/src/components/layout/section-header.tsx +0 -56
- package/packages/cli/vendor/src/components/layout/sidebar-nav.tsx +0 -377
- package/packages/cli/vendor/src/components/layout/sticky-footer-bar.tsx +0 -23
- package/packages/cli/vendor/src/components/patterns/bulk-action-bar.tsx +0 -53
- package/packages/cli/vendor/src/components/patterns/data-view.tsx +0 -64
- package/packages/cli/vendor/src/components/patterns/detail-layout.tsx +0 -75
- package/packages/cli/vendor/src/components/patterns/form-builder.tsx +0 -472
- package/packages/cli/vendor/src/components/patterns/page-toolbar.tsx +0 -61
- package/packages/cli/vendor/src/components/patterns/resource-detail-page.tsx +0 -164
- package/packages/cli/vendor/src/components/patterns/resource-page.tsx +0 -149
- package/packages/cli/vendor/src/components/patterns/settings-page.tsx +0 -84
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { Button as t } from "../ui/button/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { StateView as n } from "../feedback/state-view.js";
|
|
5
|
+
import { Input as r } from "../ui/input/index.js";
|
|
6
|
+
import { createDataTableActionsColumn as i } from "./data-table-actions-column.js";
|
|
7
|
+
import { DataTableBulkActions as ee } from "./data-table-bulk-actions.js";
|
|
8
|
+
import { DataTableColumnVisibilityMenu as te } from "./data-table-column-visibility-menu.js";
|
|
9
|
+
import { DataTablePagination as ne } from "./data-table-pagination.js";
|
|
10
|
+
import { DataTableToolbar as re } from "./data-table-toolbar.js";
|
|
11
|
+
import { useVirtualizer as ie } from "../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
11
12
|
import { DataState as a } from "../display/data-state.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import { flexRender as f, getCoreRowModel as ue, getExpandedRowModel as de, getPaginationRowModel as fe, useReactTable as pe } from "@tanstack/react-table";
|
|
13
|
+
import { useIsMobile as ae } from "../../hooks/use-is-mobile.js";
|
|
14
|
+
import { Table as oe, TableBody as se, TableCell as o, TableHead as ce, TableHeader as le, TableRow as s } from "../ui/table/index.js";
|
|
15
|
+
import * as c from "react";
|
|
16
|
+
import { Fragment as ue, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
17
|
+
import { flexRender as d, getCoreRowModel as de, getExpandedRowModel as fe, getPaginationRowModel as pe, useReactTable as me } from "@tanstack/react-table";
|
|
18
18
|
//#region src/components/data-table/data-table.tsx
|
|
19
|
-
var
|
|
19
|
+
var he = {
|
|
20
20
|
compact: "h-8 px-2 py-1.5",
|
|
21
21
|
default: "h-10 px-2 py-2",
|
|
22
22
|
comfortable: "h-12 px-3 py-3"
|
|
23
|
-
},
|
|
23
|
+
}, ge = {
|
|
24
24
|
compact: "px-2 py-1.5",
|
|
25
25
|
default: "p-2",
|
|
26
26
|
comfortable: "px-3 py-3"
|
|
27
27
|
};
|
|
28
|
-
function ge(e, t) {
|
|
29
|
-
return typeof t == "function" ? t(e) : t;
|
|
30
|
-
}
|
|
31
28
|
function _e(e, t) {
|
|
32
29
|
return typeof t == "function" ? t(e) : t;
|
|
33
30
|
}
|
|
34
31
|
function ve(e, t) {
|
|
35
32
|
return typeof t == "function" ? t(e) : t;
|
|
36
33
|
}
|
|
37
|
-
function ye(e) {
|
|
38
|
-
return
|
|
34
|
+
function ye(e, t) {
|
|
35
|
+
return typeof t == "function" ? t(e) : t;
|
|
39
36
|
}
|
|
40
37
|
function be(e) {
|
|
38
|
+
return e == null || e === "";
|
|
39
|
+
}
|
|
40
|
+
function xe(e) {
|
|
41
41
|
let t = e.column.columnDef.header;
|
|
42
42
|
return typeof t == "string" ? t : typeof t == "number" ? String(t) : e.column.id === "actions" ? "Actions" : e.column.id;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
let nt =
|
|
46
|
-
let e =
|
|
47
|
-
return !
|
|
44
|
+
function Se({ className: Se, columns: Ce, data: f, title: p, description: m, features: h, search: g, filters: _, summary: v, toolbarActions: y, rowActions: b, bulkActions: we, onRefresh: x, onExport: S, refreshLabel: Te = "Refresh", exportLabel: Ee = "Export", getRowId: De, isLoading: C = !1, isError: Oe = !1, emptyState: ke, errorState: Ae, loadingState: w, loadingVariant: je = "skeleton", toolbar: T, toolbarProps: E, pagination: D, sorting: Me, onSortingChange: Ne, columnVisibility: Pe, onColumnVisibilityChange: Fe, rowSelection: Ie, onRowSelectionChange: Le, enableRowSelection: Re, renderMobileCard: O, mobileLayout: ze = "auto", onRowClick: k, onRowDoubleClick: Be, getRowDisabled: A, density: j = "default", striped: M = !1, bordered: N = !1, stickyHeader: P = !1, skeletonRows: Ve = 6, skeletonCellClassName: He, cellFallback: F = "-", tableClassName: Ue, tableWrapperClassName: We, headerCellClassName: Ge, cellClassName: Ke, rowClassName: qe, renderExpandedRow: Je, expanded: Ye, onExpandedChange: Xe, getRowCanExpand: Ze, columnPinning: Qe, onColumnPinningChange: $e, virtualization: et, ...tt }) {
|
|
45
|
+
let nt = c.useMemo(() => {
|
|
46
|
+
let e = Ce;
|
|
47
|
+
return !b || h?.rowActions === !1 ? e : [...e, i({ getActions: b })];
|
|
48
48
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
Ce,
|
|
50
|
+
h?.rowActions,
|
|
51
|
+
b
|
|
52
52
|
]), I = D === !1 ? void 0 : D, rt = I ? {
|
|
53
53
|
pageIndex: I.pageIndex,
|
|
54
54
|
pageSize: I.pageSize
|
|
55
|
-
} : void 0, it = !!(I && I.manual !== !1), at = Ie ?? {}, L =
|
|
56
|
-
data:
|
|
55
|
+
} : void 0, it = !!(I && I.manual !== !1), at = Ie ?? {}, L = me({
|
|
56
|
+
data: f,
|
|
57
57
|
columns: nt,
|
|
58
58
|
getRowId: De,
|
|
59
|
-
getCoreRowModel:
|
|
60
|
-
getPaginationRowModel: I && !it ?
|
|
59
|
+
getCoreRowModel: de(),
|
|
60
|
+
getPaginationRowModel: I && !it ? pe() : void 0,
|
|
61
61
|
manualPagination: it,
|
|
62
62
|
pageCount: I?.pageCount,
|
|
63
63
|
state: {
|
|
@@ -75,8 +75,8 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
75
75
|
onColumnPinningChange: $e,
|
|
76
76
|
enableRowSelection: Re,
|
|
77
77
|
getRowCanExpand: Ze,
|
|
78
|
-
getExpandedRowModel:
|
|
79
|
-
}), R = L.getRowModel().rows, ot =
|
|
78
|
+
getExpandedRowModel: fe()
|
|
79
|
+
}), R = L.getRowModel().rows, ot = c.useRef(null), z = et === !1 ? void 0 : et, B = !!(z && z.enabled !== !1 && R.length > 0), V = z?.height ?? 480, st = z?.onRangeChange, H = ie({
|
|
80
80
|
count: B ? R.length : 0,
|
|
81
81
|
getScrollElement: () => ot.current,
|
|
82
82
|
estimateSize: () => z?.estimateRowHeight ?? 48,
|
|
@@ -101,90 +101,91 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
101
101
|
end: (t + 1) * U,
|
|
102
102
|
size: U,
|
|
103
103
|
lane: 0
|
|
104
|
-
})), ut = W[0]?.start ?? 0, dt = W.length ? Math.max(H.getTotalSize() - W[W.length - 1].end, 0) : 0, G = L.getSelectedRowModel().rows.map((e) => e.original), ft = G.length, K =
|
|
104
|
+
})), ut = W[0]?.start ?? 0, dt = W.length ? Math.max(H.getTotalSize() - W[W.length - 1].end, 0) : 0, G = L.getSelectedRowModel().rows.map((e) => e.original), ft = G.length, K = c.useMemo(() => ({
|
|
105
105
|
table: L,
|
|
106
|
-
data:
|
|
106
|
+
data: f,
|
|
107
107
|
selectedRows: G
|
|
108
108
|
}), [
|
|
109
|
-
|
|
109
|
+
f,
|
|
110
110
|
G,
|
|
111
111
|
L
|
|
112
|
-
]), pt = L.getVisibleLeafColumns(), mt = Math.max(pt.length, 1), ht = typeof T == "function" ? T(L) : T, gt = typeof E == "function" ? E(L) : E, q = typeof
|
|
112
|
+
]), pt = L.getVisibleLeafColumns(), mt = Math.max(pt.length, 1), ht = typeof T == "function" ? T(L) : T, gt = typeof E == "function" ? E(L) : E, q = typeof _ == "function" ? _(K) : _, J = typeof v == "function" ? v(K) : v, _t = !!(g && h?.search !== !1), vt = !!(h?.columnVisibility && L.getAllLeafColumns().some((e) => e.getCanHide())), Y = !!(h?.refresh && x), X = !!(h?.export && S), yt = !!(h?.bulkActions !== !1 && we?.length), bt = vt && !!(p || m || g || q || J || y || Y || X), xt = _t && g ? /* @__PURE__ */ l(r, {
|
|
113
113
|
type: "search",
|
|
114
|
-
value:
|
|
115
|
-
onValueChange:
|
|
116
|
-
placeholder:
|
|
117
|
-
wrapperClassName:
|
|
118
|
-
inputClassName:
|
|
119
|
-
disabled:
|
|
120
|
-
clearable:
|
|
121
|
-
clearLabel:
|
|
122
|
-
searchIcon:
|
|
123
|
-
}) : void 0, St = /* @__PURE__ */
|
|
124
|
-
typeof
|
|
125
|
-
bt && /* @__PURE__ */
|
|
126
|
-
Y && /* @__PURE__ */
|
|
114
|
+
value: g.value,
|
|
115
|
+
onValueChange: g.onValueChange,
|
|
116
|
+
placeholder: g.placeholder ?? "Search...",
|
|
117
|
+
wrapperClassName: g.wrapperClassName ?? g.className,
|
|
118
|
+
inputClassName: g.inputClassName,
|
|
119
|
+
disabled: g.disabled,
|
|
120
|
+
clearable: g.clearable,
|
|
121
|
+
clearLabel: g.clearLabel,
|
|
122
|
+
searchIcon: g.searchIcon
|
|
123
|
+
}) : void 0, St = /* @__PURE__ */ u(ue, { children: [
|
|
124
|
+
typeof y == "function" ? y(K) : y,
|
|
125
|
+
bt && /* @__PURE__ */ l(te, { table: L }),
|
|
126
|
+
Y && /* @__PURE__ */ l(t, {
|
|
127
127
|
type: "button",
|
|
128
128
|
variant: "outline",
|
|
129
129
|
size: "sm",
|
|
130
130
|
disabled: C,
|
|
131
|
-
onClick: () =>
|
|
131
|
+
onClick: () => x?.(K),
|
|
132
132
|
children: Te
|
|
133
133
|
}),
|
|
134
|
-
X && /* @__PURE__ */
|
|
134
|
+
X && /* @__PURE__ */ l(t, {
|
|
135
135
|
type: "button",
|
|
136
136
|
variant: "outline",
|
|
137
137
|
size: "sm",
|
|
138
138
|
onClick: () => S?.(K),
|
|
139
139
|
children: Ee
|
|
140
140
|
})
|
|
141
|
-
] }), Ct = yt ? /* @__PURE__ */
|
|
141
|
+
] }), Ct = yt ? /* @__PURE__ */ l(ee, {
|
|
142
142
|
rows: G,
|
|
143
|
-
actions:
|
|
143
|
+
actions: we ?? [],
|
|
144
144
|
selectedLabel: () => "Actions",
|
|
145
145
|
clearLabel: null,
|
|
146
146
|
onClearSelection: () => L.resetRowSelection(),
|
|
147
147
|
hideWhenEmpty: !1
|
|
148
|
-
}) : void 0, wt = !!(ht || gt ||
|
|
148
|
+
}) : void 0, wt = !!(ht || gt || p || m || xt || q || J || y || bt || Y || X || Ct), Tt = !!(I && !I.hidden), Z = C && je === "skeleton", Et = ae(), Q = ze !== "scroll" && Et, Dt = (e, t) => t > 0 ? /* @__PURE__ */ l(s, {
|
|
149
149
|
"aria-hidden": "true",
|
|
150
150
|
className: "pointer-events-none border-0 hover:bg-transparent",
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ l(o, {
|
|
152
152
|
colSpan: mt,
|
|
153
153
|
className: "border-0 p-0",
|
|
154
154
|
style: { height: t }
|
|
155
155
|
})
|
|
156
|
-
}, e) : null, Ot = (e) => /* @__PURE__ */
|
|
156
|
+
}, e) : null, Ot = (e) => /* @__PURE__ */ l(s, { children: /* @__PURE__ */ l(o, {
|
|
157
157
|
colSpan: mt,
|
|
158
158
|
className: "p-0",
|
|
159
159
|
children: e
|
|
160
|
-
}) }), kt = () => Array.from({ length: Math.max(Ve, 1) }, (t, n) => /* @__PURE__ */
|
|
160
|
+
}) }), kt = () => Array.from({ length: Math.max(Ve, 1) }, (t, n) => /* @__PURE__ */ l(s, {
|
|
161
161
|
"aria-hidden": "true",
|
|
162
|
-
children: pt.map((t) => /* @__PURE__ */
|
|
163
|
-
className: e(
|
|
164
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: pt.map((t) => /* @__PURE__ */ l(o, {
|
|
163
|
+
className: e(ge[j], N && "border-r last:border-r-0"),
|
|
164
|
+
children: /* @__PURE__ */ l("div", { className: e("h-4 w-full max-w-40 animate-pulse rounded-md bg-muted", n % 3 == 1 && "max-w-24", n % 3 == 2 && "max-w-32", He) })
|
|
165
165
|
}, `${t.id}-${n}`))
|
|
166
|
-
}, `skeleton-${n}`)), $ = Z ? null : C ? /* @__PURE__ */
|
|
167
|
-
|
|
166
|
+
}, `skeleton-${n}`)), $ = Z ? null : C ? /* @__PURE__ */ l(n, {
|
|
167
|
+
status: "loading",
|
|
168
|
+
title: "Loading data...",
|
|
168
169
|
...w
|
|
169
|
-
}) : Oe ? /* @__PURE__ */
|
|
170
|
+
}) : Oe ? /* @__PURE__ */ l(a, {
|
|
170
171
|
status: "error",
|
|
171
172
|
title: "Could not load data",
|
|
172
173
|
description: "Please try again.",
|
|
173
174
|
variant: "plain",
|
|
174
175
|
...Ae
|
|
175
|
-
}) : R.length === 0 ? /* @__PURE__ */
|
|
176
|
+
}) : R.length === 0 ? /* @__PURE__ */ l(a, {
|
|
176
177
|
status: "empty",
|
|
177
178
|
variant: "plain",
|
|
178
179
|
...ke
|
|
179
180
|
}) : null, At = (t, n, r) => {
|
|
180
181
|
let i = A?.(t) ?? !1;
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ u(c.Fragment, { children: [/* @__PURE__ */ l(s, {
|
|
182
183
|
ref: r && z?.measureRows !== !1 ? H.measureElement : void 0,
|
|
183
184
|
"data-index": r?.index,
|
|
184
185
|
"data-state": t.getIsSelected() ? "selected" : void 0,
|
|
185
186
|
"data-striped": M && n % 2 == 1 ? "true" : void 0,
|
|
186
187
|
"data-disabled": i || void 0,
|
|
187
|
-
className: e(k && !i && "cursor-pointer", !i && "transition-colors hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_96%)] data-[state=selected]:bg-[color:color-mix(in_oklch,var(--primary),transparent_90%)]", i && "pointer-events-none opacity-55",
|
|
188
|
+
className: e(k && !i && "cursor-pointer", !i && "transition-colors hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_96%)] data-[state=selected]:bg-[color:color-mix(in_oklch,var(--primary),transparent_90%)]", i && "pointer-events-none opacity-55", _e(t, qe)),
|
|
188
189
|
onClick: () => {
|
|
189
190
|
i || k?.(t);
|
|
190
191
|
},
|
|
@@ -192,8 +193,8 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
192
193
|
i || Be?.(t);
|
|
193
194
|
},
|
|
194
195
|
children: t.getVisibleCells().map((t) => {
|
|
195
|
-
let n =
|
|
196
|
-
return /* @__PURE__ */
|
|
196
|
+
let n = d(t.column.columnDef.cell, t.getContext());
|
|
197
|
+
return /* @__PURE__ */ l(o, {
|
|
197
198
|
style: {
|
|
198
199
|
...t.column.getIsPinned() === "left" ? {
|
|
199
200
|
left: `${t.column.getStart("left")}px`,
|
|
@@ -206,24 +207,24 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
206
207
|
zIndex: 10
|
|
207
208
|
} : {}
|
|
208
209
|
},
|
|
209
|
-
className: e(
|
|
210
|
-
children:
|
|
210
|
+
className: e(ge[j], t.column.getIsPinned() && "bg-card shadow-[1px_0_0_var(--border)]", N && "border-r last:border-r-0", ye(t, Ke)),
|
|
211
|
+
children: be(n) ? F : n
|
|
211
212
|
}, t.id);
|
|
212
213
|
})
|
|
213
|
-
}), t.getIsExpanded() && Je ? /* @__PURE__ */
|
|
214
|
+
}), t.getIsExpanded() && Je ? /* @__PURE__ */ l(s, {
|
|
214
215
|
className: "bg-muted/50 hover:bg-muted/50",
|
|
215
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ l(o, {
|
|
216
217
|
colSpan: t.getVisibleCells().length,
|
|
217
218
|
children: Je(t)
|
|
218
219
|
})
|
|
219
220
|
}) : null] }, t.id);
|
|
220
221
|
}, jt = (t) => {
|
|
221
222
|
let n = A?.(t) ?? !1, r = t.getVisibleCells();
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ l("article", {
|
|
223
224
|
"data-slot": "data-table-mobile-card",
|
|
224
225
|
"data-state": t.getIsSelected() ? "selected" : void 0,
|
|
225
226
|
"data-disabled": n || void 0,
|
|
226
|
-
className: e("grid gap-3 rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-card p-3 shadow-[var(--aui-card-shadow,0_10px_24px_rgba(15,23,42,0.07))]", k && !n && "cursor-pointer transition-colors hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_96%)]", n && "pointer-events-none opacity-55",
|
|
227
|
+
className: e("grid gap-3 rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-card p-3 shadow-[var(--aui-card-shadow,0_10px_24px_rgba(15,23,42,0.07))]", k && !n && "cursor-pointer transition-colors hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_96%)]", n && "pointer-events-none opacity-55", _e(t, qe)),
|
|
227
228
|
role: k && !n ? "button" : void 0,
|
|
228
229
|
tabIndex: k && !n ? 0 : void 0,
|
|
229
230
|
onClick: () => {
|
|
@@ -233,54 +234,55 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
233
234
|
e.target !== e.currentTarget || n || !k || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), k(t));
|
|
234
235
|
},
|
|
235
236
|
children: r.map((e) => {
|
|
236
|
-
let t =
|
|
237
|
-
return /* @__PURE__ */
|
|
237
|
+
let t = d(e.column.columnDef.cell, e.getContext());
|
|
238
|
+
return /* @__PURE__ */ u("div", {
|
|
238
239
|
"data-slot": "data-table-mobile-cell",
|
|
239
240
|
className: "grid grid-cols-[minmax(7rem,0.42fr)_minmax(0,1fr)] items-start gap-3 text-sm",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ l("span", {
|
|
241
242
|
className: "min-w-0 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
242
|
-
children:
|
|
243
|
-
}), /* @__PURE__ */
|
|
243
|
+
children: xe(e)
|
|
244
|
+
}), /* @__PURE__ */ l("div", {
|
|
244
245
|
className: "min-w-0 text-right text-foreground/92 [&>*]:ml-auto",
|
|
245
|
-
children:
|
|
246
|
+
children: be(t) ? F : t
|
|
246
247
|
})]
|
|
247
248
|
}, e.id);
|
|
248
249
|
})
|
|
249
250
|
}, t.id);
|
|
250
251
|
};
|
|
251
|
-
return /* @__PURE__ */
|
|
252
|
+
return /* @__PURE__ */ u("div", {
|
|
252
253
|
"data-slot": "data-table",
|
|
253
|
-
className: e("grid gap-3",
|
|
254
|
+
className: e("grid gap-3", Se),
|
|
254
255
|
...tt,
|
|
255
256
|
children: [
|
|
256
|
-
wt && (ht ?? /* @__PURE__ */
|
|
257
|
-
title:
|
|
258
|
-
description:
|
|
257
|
+
wt && (ht ?? /* @__PURE__ */ l(re, {
|
|
258
|
+
title: p,
|
|
259
|
+
description: m,
|
|
259
260
|
search: xt,
|
|
260
261
|
filters: q,
|
|
261
262
|
summary: J,
|
|
262
263
|
actions: St,
|
|
263
264
|
selectionActions: Ct,
|
|
264
265
|
selectedCount: ft,
|
|
265
|
-
totalCount: I ? I.rowCount ??
|
|
266
|
+
totalCount: I ? I.rowCount ?? f.length : f.length,
|
|
266
267
|
variant: "plain",
|
|
267
268
|
...gt
|
|
268
269
|
})),
|
|
269
|
-
Q && /* @__PURE__ */
|
|
270
|
+
Q && /* @__PURE__ */ l("div", {
|
|
270
271
|
className: "grid gap-3",
|
|
271
|
-
children: $ ?? (Z ? /* @__PURE__ */
|
|
272
|
-
|
|
272
|
+
children: $ ?? (Z ? /* @__PURE__ */ l(n, {
|
|
273
|
+
status: "loading",
|
|
274
|
+
title: "Loading data...",
|
|
273
275
|
...w
|
|
274
|
-
}) : R.map((e) => /* @__PURE__ */
|
|
276
|
+
}) : R.map((e) => /* @__PURE__ */ l(c.Fragment, { children: O ? O(e) : jt(e) }, e.id)))
|
|
275
277
|
}),
|
|
276
|
-
!Q && /* @__PURE__ */
|
|
278
|
+
!Q && /* @__PURE__ */ u("div", {
|
|
277
279
|
"data-slot": "data-table-wrapper",
|
|
278
280
|
"data-density": j,
|
|
279
281
|
"data-striped": M || void 0,
|
|
280
282
|
"data-bordered": N || void 0,
|
|
281
283
|
"data-virtualized": B || void 0,
|
|
282
284
|
className: e("overflow-hidden rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-card shadow-[var(--aui-card-shadow,0_10px_24px_rgba(15,23,42,0.07))] backdrop-blur", We),
|
|
283
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ u(oe, {
|
|
284
286
|
containerRef: ot,
|
|
285
287
|
containerStyle: B ? {
|
|
286
288
|
height: V,
|
|
@@ -289,9 +291,9 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
289
291
|
containerClassName: e("rounded-none border-0 bg-transparent shadow-none ring-0", B && "overflow-auto"),
|
|
290
292
|
className: e("text-[0.95rem]", Ue),
|
|
291
293
|
"aria-rowcount": R.length,
|
|
292
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ l(le, {
|
|
293
295
|
className: e((P || B) && "sticky top-0 z-10 shadow-sm backdrop-blur"),
|
|
294
|
-
children: L.getHeaderGroups().map((t) => /* @__PURE__ */
|
|
296
|
+
children: L.getHeaderGroups().map((t) => /* @__PURE__ */ l(s, { children: t.headers.map((t) => /* @__PURE__ */ l(ce, {
|
|
295
297
|
style: {
|
|
296
298
|
width: t.getSize(),
|
|
297
299
|
...t.column.getIsPinned() === "left" ? {
|
|
@@ -305,15 +307,15 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
305
307
|
zIndex: P ? 20 : 11
|
|
306
308
|
} : {}
|
|
307
309
|
},
|
|
308
|
-
className: e(
|
|
309
|
-
children: t.isPlaceholder ? null :
|
|
310
|
+
className: e(he[j], "bg-[color:color-mix(in_oklch,var(--card),var(--background)_10%)] text-muted-foreground", (P || B) && "bg-[color:color-mix(in_oklch,var(--card),transparent_12%)] backdrop-blur", t.column.getIsPinned() && "bg-card shadow-[1px_0_0_var(--border)]", N && "border-r last:border-r-0", ve(t, Ge)),
|
|
311
|
+
children: t.isPlaceholder ? null : d(t.column.columnDef.header, t.getContext())
|
|
310
312
|
}, t.id)) }, t.id))
|
|
311
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ l(se, { children: $ ? Ot($) : Z ? kt() : B ? [
|
|
312
314
|
Dt("virtual-top", ut),
|
|
313
315
|
...W.map((e) => At(R[e.index], e.index, e)),
|
|
314
316
|
Dt("virtual-bottom", dt)
|
|
315
317
|
] : R.map((e, t) => At(e, t)) })]
|
|
316
|
-
}), Tt && I && /* @__PURE__ */
|
|
318
|
+
}), Tt && I && /* @__PURE__ */ l(ne, {
|
|
317
319
|
pageIndex: I.pageIndex,
|
|
318
320
|
pageSize: I.pageSize,
|
|
319
321
|
pageCount: I.pageCount,
|
|
@@ -330,4 +332,4 @@ function xe({ className: xe, columns: Se, data: p, title: m, description: h, fea
|
|
|
330
332
|
});
|
|
331
333
|
}
|
|
332
334
|
//#endregion
|
|
333
|
-
export {
|
|
335
|
+
export { Se as DataTable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./state-view.cjs"),t=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./state-view.cjs"),t=require("./alert.cjs");exports.Alert=t.Alert,exports.StateView=e.StateView;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { StateView as e } from "./state-view.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { InlineState as r, PageState as i } from "./page-state.js";
|
|
5
|
-
export { n as Alert, r as InlineState, t as LoadingState, i as PageState, e as StateView };
|
|
2
|
+
import { Alert as t } from "./alert.js";
|
|
3
|
+
export { t as Alert, e as StateView };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./breadcrumbs.cjs"),t=require("./workspace-header.cjs"),n=require("./sidebar-context.cjs"),r=require("./sidebar.cjs"),i=require("./section.cjs"),a=require("./workspace-layout.cjs");exports.Breadcrumbs=e.Breadcrumbs,exports.Section=i.Section,exports.Sidebar=r.Sidebar,exports.SidebarInset=r.SidebarInset,exports.SidebarProvider=n.SidebarProvider,exports.SidebarTrigger=n.SidebarTrigger,exports.SplitLayout=i.SplitLayout,exports.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./breadcrumbs.cjs"),t=require("./workspace-header.cjs"),n=require("./sidebar-context.cjs"),r=require("./sidebar.cjs"),i=require("./section.cjs"),a=require("./workspace-layout.cjs");exports.Breadcrumbs=e.Breadcrumbs,exports.Section=i.Section,exports.Sidebar=r.Sidebar,exports.SidebarInset=r.SidebarInset,exports.SidebarProvider=n.SidebarProvider,exports.SidebarTrigger=n.SidebarTrigger,exports.SplitLayout=i.SplitLayout,exports.WorkspaceContent=a.WorkspaceContent,exports.WorkspaceHeader=t.WorkspaceHeader,exports.WorkspaceLayout=a.WorkspaceLayout,exports.WorkspaceMain=a.WorkspaceMain,exports.useSidebar=n.useSidebar;
|
|
@@ -2,6 +2,6 @@ import { Breadcrumbs as e } from "./breadcrumbs.js";
|
|
|
2
2
|
import { WorkspaceHeader as t } from "./workspace-header.js";
|
|
3
3
|
import { SidebarProvider as n, SidebarTrigger as r, useSidebar as i } from "./sidebar-context.js";
|
|
4
4
|
import { Sidebar as a, SidebarInset as o } from "./sidebar.js";
|
|
5
|
-
import { Section as s, SplitLayout as c
|
|
6
|
-
import { WorkspaceContent as
|
|
7
|
-
export { e as Breadcrumbs, s as Section, a as Sidebar, o as SidebarInset, n as SidebarProvider, r as SidebarTrigger, c as SplitLayout, l as
|
|
5
|
+
import { Section as s, SplitLayout as c } from "./section.js";
|
|
6
|
+
import { WorkspaceContent as l, WorkspaceLayout as u, WorkspaceMain as d } from "./workspace-layout.js";
|
|
7
|
+
export { e as Breadcrumbs, s as Section, a as Sidebar, o as SidebarInset, n as SidebarProvider, r as SidebarTrigger, c as SplitLayout, l as WorkspaceContent, t as WorkspaceHeader, u as WorkspaceLayout, d as WorkspaceMain, i as useSidebar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./breadcrumbs.cjs"),t=require("./workspace-header.cjs"),n=require("./sidebar-context.cjs"),r=require("./sidebar.cjs"),i=require("./section.cjs"),a=require("./workspace-layout.cjs");exports.Breadcrumbs=e.Breadcrumbs,exports.Section=i.Section,exports.Sidebar=r.Sidebar,exports.SidebarInset=r.SidebarInset,exports.SidebarProvider=n.SidebarProvider,exports.SidebarTrigger=n.SidebarTrigger,exports.SplitLayout=i.SplitLayout,exports.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./breadcrumbs.cjs"),t=require("./workspace-header.cjs"),n=require("./sidebar-context.cjs"),r=require("./sidebar.cjs"),i=require("./section.cjs"),a=require("./workspace-layout.cjs");exports.Breadcrumbs=e.Breadcrumbs,exports.Section=i.Section,exports.Sidebar=r.Sidebar,exports.SidebarInset=r.SidebarInset,exports.SidebarProvider=n.SidebarProvider,exports.SidebarTrigger=n.SidebarTrigger,exports.SplitLayout=i.SplitLayout,exports.WorkspaceContent=a.WorkspaceContent,exports.WorkspaceHeader=t.WorkspaceHeader,exports.WorkspaceLayout=a.WorkspaceLayout,exports.WorkspaceMain=a.WorkspaceMain,exports.useSidebar=n.useSidebar;
|
|
@@ -2,6 +2,6 @@ import { Breadcrumbs as e } from "./breadcrumbs.js";
|
|
|
2
2
|
import { WorkspaceHeader as t } from "./workspace-header.js";
|
|
3
3
|
import { SidebarProvider as n, SidebarTrigger as r, useSidebar as i } from "./sidebar-context.js";
|
|
4
4
|
import { Sidebar as a, SidebarInset as o } from "./sidebar.js";
|
|
5
|
-
import { Section as s, SplitLayout as c
|
|
6
|
-
import { WorkspaceContent as
|
|
7
|
-
export { e as Breadcrumbs, s as Section, a as Sidebar, o as SidebarInset, n as SidebarProvider, r as SidebarTrigger, c as SplitLayout, l as
|
|
5
|
+
import { Section as s, SplitLayout as c } from "./section.js";
|
|
6
|
+
import { WorkspaceContent as l, WorkspaceLayout as u, WorkspaceMain as d } from "./workspace-layout.js";
|
|
7
|
+
export { e as Breadcrumbs, s as Section, a as Sidebar, o as SidebarInset, n as SidebarProvider, r as SidebarTrigger, c as SplitLayout, l as WorkspaceContent, t as WorkspaceHeader, u as WorkspaceLayout, d as WorkspaceMain, i as useSidebar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={compact:`gap-2`,default:`gap-4`,comfortable:`gap-6`},a={compact:`p-3`,default:`p-4`,comfortable:`p-6`};function o({title:e,description:n,actions:o,padded:s=!0,bordered:c=!1,variant:l=c?`panel`:`plain`,density:u=`default`,headerClassName:d,bodyClassName:f,className:p,children:m,...h}){let g=l===`panel`;return(0,r.jsxs)(`section`,{"data-slot":`section`,"data-variant":l,"data-density":u,className:t.cn(`grid min-w-0`,i[u],g&&`rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-card text-card-foreground shadow-[var(--aui-card-shadow,var(--aui-shadow-xs))]`,s&&g&&a[u],p),...h,children:[(e||n||o)&&(0,r.jsxs)(`div`,{"data-slot":`section-header`,className:t.cn(`flex flex-wrap items-start justify-between gap-3`,d),children:[(0,r.jsxs)(`div`,{className:`grid gap-1`,children:[e&&(0,r.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-foreground`,children:e}),n&&(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]}),o&&(0,r.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),(0,r.jsx)(`div`,{"data-slot":`section-content`,className:f,children:m})]})}function s({
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={compact:`gap-2`,default:`gap-4`,comfortable:`gap-6`},a={compact:`p-3`,default:`p-4`,comfortable:`p-6`};function o({title:e,description:n,actions:o,padded:s=!0,bordered:c=!1,variant:l=c?`panel`:`plain`,density:u=`default`,headerClassName:d,bodyClassName:f,className:p,children:m,...h}){let g=l===`panel`;return(0,r.jsxs)(`section`,{"data-slot":`section`,"data-variant":l,"data-density":u,className:t.cn(`grid min-w-0`,i[u],g&&`rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-card text-card-foreground shadow-[var(--aui-card-shadow,var(--aui-shadow-xs))]`,s&&g&&a[u],p),...h,children:[(e||n||o)&&(0,r.jsxs)(`div`,{"data-slot":`section-header`,className:t.cn(`flex flex-wrap items-start justify-between gap-3`,d),children:[(0,r.jsxs)(`div`,{className:`grid gap-1`,children:[e&&(0,r.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-foreground`,children:e}),n&&(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]}),o&&(0,r.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),(0,r.jsx)(`div`,{"data-slot":`section-content`,className:f,children:m})]})}function s({aside:e,asidePosition:n=`end`,asideClassName:i,contentClassName:a,asideWidth:o=`20rem`,className:s,children:c,style:l,...u}){let d=(0,r.jsx)(`aside`,{"data-slot":`split-layout-aside`,className:t.cn(`min-w-0`,i),children:e}),f=(0,r.jsx)(`main`,{"data-slot":`split-layout-content`,className:t.cn(`min-w-0`,a),children:c});return(0,r.jsxs)(`div`,{"data-slot":`split-layout`,className:t.cn(`grid gap-4 lg:grid-cols-[minmax(0,1fr)_var(--split-aside-width)]`,n===`start`&&`lg:grid-cols-[var(--split-aside-width)_minmax(0,1fr)]`,s),style:{"--split-aside-width":o,...l},...u,children:[n===`start`?d:f,n===`start`?f:d]})}exports.Section=o,exports.SplitLayout=s;
|
|
@@ -42,31 +42,7 @@ function a({ title: a, description: o, actions: s, padded: c = !0, bordered: l =
|
|
|
42
42
|
})]
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
function o({
|
|
46
|
-
return /* @__PURE__ */ n("div", {
|
|
47
|
-
"data-slot": "toolbar",
|
|
48
|
-
className: e("flex flex-wrap items-center justify-between gap-3", s),
|
|
49
|
-
...l,
|
|
50
|
-
children: [
|
|
51
|
-
(r || i) && /* @__PURE__ */ n("div", {
|
|
52
|
-
className: "grid gap-0.5",
|
|
53
|
-
children: [r && /* @__PURE__ */ t("div", {
|
|
54
|
-
className: "font-medium text-foreground",
|
|
55
|
-
children: r
|
|
56
|
-
}), i && /* @__PURE__ */ t("div", {
|
|
57
|
-
className: "text-sm text-muted-foreground",
|
|
58
|
-
children: i
|
|
59
|
-
})]
|
|
60
|
-
}),
|
|
61
|
-
c,
|
|
62
|
-
(a || o) && /* @__PURE__ */ n("div", {
|
|
63
|
-
className: "flex flex-wrap items-center gap-2",
|
|
64
|
-
children: [a, o]
|
|
65
|
-
})
|
|
66
|
-
]
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function s({ aside: r, asidePosition: i = "end", asideClassName: a, contentClassName: o, asideWidth: s = "20rem", className: c, children: l, style: u, ...d }) {
|
|
45
|
+
function o({ aside: r, asidePosition: i = "end", asideClassName: a, contentClassName: o, asideWidth: s = "20rem", className: c, children: l, style: u, ...d }) {
|
|
70
46
|
let f = /* @__PURE__ */ t("aside", {
|
|
71
47
|
"data-slot": "split-layout-aside",
|
|
72
48
|
className: e("min-w-0", a),
|
|
@@ -88,4 +64,4 @@ function s({ aside: r, asidePosition: i = "end", asideClassName: a, contentClass
|
|
|
88
64
|
});
|
|
89
65
|
}
|
|
90
66
|
//#endregion
|
|
91
|
-
export { a as Section,
|
|
67
|
+
export { a as Section, o as SplitLayout };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./empty-state.cjs");exports.EmptyState=e.EmptyState,exports.ErrorState=e.ErrorState;
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { PageToolbar as r } from "./page-toolbar.js";
|
|
4
|
-
import { DataView as i } from "./data-view.js";
|
|
5
|
-
import { DetailLayout as a } from "./detail-layout.js";
|
|
6
|
-
import { FormBuilder as o, asyncSelectField as s, customField as c, dateField as l, dateRangeField as u, formSection as d, inputField as f, numberField as p, phoneField as m, renderFormBuilderField as h, selectField as g, switchField as _, textareaField as v } from "./form-builder.js";
|
|
7
|
-
import { ResourcePage as y, ResourcePageSection as b } from "./resource-page.js";
|
|
8
|
-
import { ResourceDetailPage as x } from "./resource-detail-page.js";
|
|
9
|
-
import { SettingsPage as S } from "./settings-page.js";
|
|
10
|
-
export { e as BulkActionBar, i as DataView, a as DetailLayout, t as EmptyState, n as ErrorState, o as FormBuilder, r as PageToolbar, x as ResourceDetailPage, y as ResourcePage, b as ResourcePageSection, S as SettingsPage, s as asyncSelectField, c as customField, l as dateField, u as dateRangeField, d as formSection, f as inputField, p as numberField, m as phoneField, h as renderFormBuilderField, g as selectField, _ as switchField, v as textareaField };
|
|
1
|
+
import { EmptyState as e, ErrorState as t } from "./empty-state.js";
|
|
2
|
+
export { e as EmptyState, t as ErrorState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./empty-state.cjs");exports.EmptyState=e.EmptyState,exports.ErrorState=e.ErrorState;
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { PageToolbar as r } from "./page-toolbar.js";
|
|
4
|
-
import { DataView as i } from "./data-view.js";
|
|
5
|
-
import { DetailLayout as a } from "./detail-layout.js";
|
|
6
|
-
import { FormBuilder as o, asyncSelectField as s, customField as c, dateField as l, dateRangeField as u, formSection as d, inputField as f, numberField as p, phoneField as m, renderFormBuilderField as h, selectField as g, switchField as _, textareaField as v } from "./form-builder.js";
|
|
7
|
-
import { ResourcePage as y, ResourcePageSection as b } from "./resource-page.js";
|
|
8
|
-
import { ResourceDetailPage as x } from "./resource-detail-page.js";
|
|
9
|
-
import { SettingsPage as S } from "./settings-page.js";
|
|
10
|
-
export { e as BulkActionBar, i as DataView, a as DetailLayout, t as EmptyState, n as ErrorState, o as FormBuilder, r as PageToolbar, x as ResourceDetailPage, y as ResourcePage, b as ResourcePageSection, S as SettingsPage, s as asyncSelectField, c as customField, l as dateField, u as dateRangeField, d as formSection, f as inputField, p as numberField, m as phoneField, h as renderFormBuilderField, g as selectField, _ as switchField, v as textareaField };
|
|
1
|
+
import { EmptyState as e, ErrorState as t } from "./empty-state.js";
|
|
2
|
+
export { e as EmptyState, t as ErrorState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime"),i=require("@base-ui/react/preview-card");function a({...e}){return(0,r.jsx)(i.PreviewCard.Root,{"data-slot":`hover-card`,...e})}function o({...e}){if(!(`render`in e)&&n.isValidElement(e.children)){let{children:t,...n}=e;return(0,r.jsx)(i.PreviewCard.Trigger,{"data-slot":`hover-card-trigger`,render:t,...n})}return(0,r.jsx)(i.PreviewCard.Trigger,{"data-slot":`hover-card-trigger`,...e})}function s({className:e,align:n=`center`,alignOffset:a=0,collisionPadding:o=12,side:s=`bottom`,sideOffset:c=8,...l}){return(0,r.jsx)(i.PreviewCard.Portal,{children:(0,r.jsx)(i.PreviewCard.Positioner,{align:n,alignOffset:a,collisionPadding:o,side:s,sideOffset:c,className:`isolate z-50 outline-none`,children:(0,r.jsx)(i.PreviewCard.Popup,{"data-slot":`hover-card-content`,className:t.cn(`z-50 grid max-h-[min(var(--available-height),calc(100dvh-1rem))] w-80 max-w-[calc(100vw-1rem)] origin-(--transform-origin) gap-3 overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...l})})})}function c({className:e,...n}){return(0,r.jsx)(i.PreviewCard.Arrow,{"data-slot":`hover-card-arrow`,className:t.cn(`z-50 flex size-3 rotate-45 border border-border bg-popover`,e),...n})}exports.HoverCard=a,exports.HoverCardArrow=c,exports.HoverCardContent=s,exports.HoverCardTrigger=o;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { PreviewCard as r } from "@base-ui/react/preview-card";
|
|
6
|
+
//#region src/components/ui/hover-card/index.tsx
|
|
7
|
+
function i({ ...e }) {
|
|
8
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
9
|
+
"data-slot": "hover-card",
|
|
10
|
+
...e
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function a({ ...e }) {
|
|
14
|
+
if (!("render" in e) && t.isValidElement(e.children)) {
|
|
15
|
+
let { children: t, ...i } = e;
|
|
16
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
17
|
+
"data-slot": "hover-card-trigger",
|
|
18
|
+
render: t,
|
|
19
|
+
...i
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
23
|
+
"data-slot": "hover-card-trigger",
|
|
24
|
+
...e
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function o({ className: t, align: i = "center", alignOffset: a = 0, collisionPadding: o = 12, side: s = "bottom", sideOffset: c = 8, ...l }) {
|
|
28
|
+
return /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Positioner, {
|
|
29
|
+
align: i,
|
|
30
|
+
alignOffset: a,
|
|
31
|
+
collisionPadding: o,
|
|
32
|
+
side: s,
|
|
33
|
+
sideOffset: c,
|
|
34
|
+
className: "isolate z-50 outline-none",
|
|
35
|
+
children: /* @__PURE__ */ n(r.Popup, {
|
|
36
|
+
"data-slot": "hover-card-content",
|
|
37
|
+
className: e("z-50 grid max-h-[min(var(--available-height),calc(100dvh-1rem))] w-80 max-w-[calc(100vw-1rem)] origin-(--transform-origin) gap-3 overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", t),
|
|
38
|
+
...l
|
|
39
|
+
})
|
|
40
|
+
}) });
|
|
41
|
+
}
|
|
42
|
+
function s({ className: t, ...i }) {
|
|
43
|
+
return /* @__PURE__ */ n(r.Arrow, {
|
|
44
|
+
"data-slot": "hover-card-arrow",
|
|
45
|
+
className: e("z-50 flex size-3 rotate-45 border border-border bg-popover", t),
|
|
46
|
+
...i
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { i as HoverCard, s as HoverCardArrow, o as HoverCardContent, a as HoverCardTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime"),a=require("@base-ui/react/menu"),o=require("@base-ui/react/menubar");var s=`relative flex min-h-8 cursor-default select-none items-center gap-2 rounded-[var(--radius-md)] px-2.5 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset=true]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus-visible:bg-destructive/10 data-[variant=destructive]:hover:bg-destructive/10`;function c({className:e,...n}){return(0,i.jsx)(o.Menubar,{"data-slot":`menubar`,className:t.cn(`flex h-10 items-center gap-1 rounded-[var(--radius-lg)] border border-border bg-card p-1 text-card-foreground shadow-sm`,e),...n})}function l({...e}){return(0,i.jsx)(a.Menu.Root,{"data-slot":`menubar-menu`,...e})}function u({className:e,...n}){return(0,i.jsx)(a.Menu.Trigger,{"data-slot":`menubar-trigger`,className:t.cn(`inline-flex h-8 items-center justify-center rounded-[var(--radius-md)] px-3 text-sm font-medium outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground disabled:pointer-events-none disabled:opacity-50`,e),...n})}function d({className:e,align:n=`start`,alignOffset:r=0,side:o=`bottom`,sideOffset:s=6,...c}){return(0,i.jsx)(a.Menu.Portal,{children:(0,i.jsx)(a.Menu.Positioner,{align:n,alignOffset:r,side:o,sideOffset:s,className:`isolate z-50 outline-none`,children:(0,i.jsx)(a.Menu.Popup,{"data-slot":`menubar-content`,className:t.cn(`z-50 min-w-48 origin-(--transform-origin) overflow-hidden rounded-[var(--radius-lg)] border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c})})})}function f({className:e,inset:n,variant:r=`default`,...o}){return(0,i.jsx)(a.Menu.Item,{"data-slot":`menubar-item`,"data-inset":n||void 0,"data-variant":r,className:t.cn(s,e),...o})}function p({className:e,children:n,checked:o,inset:c,...l}){return(0,i.jsxs)(a.Menu.CheckboxItem,{"data-slot":`menubar-checkbox-item`,"data-inset":c||void 0,className:t.cn(s,`pl-8`,e),checked:o,...l,children:[(0,i.jsx)(`span`,{className:`absolute left-2 inline-flex size-4 items-center justify-center`,children:(0,i.jsx)(a.Menu.CheckboxItemIndicator,{children:(0,i.jsx)(r.CheckIcon,{className:`size-4`})})}),n]})}function m({...e}){return(0,i.jsx)(a.Menu.RadioGroup,{"data-slot":`menubar-radio-group`,...e})}function h({className:e,children:n,inset:o,...c}){return(0,i.jsxs)(a.Menu.RadioItem,{"data-slot":`menubar-radio-item`,"data-inset":o||void 0,className:t.cn(s,`pl-8`,e),...c,children:[(0,i.jsx)(`span`,{className:`absolute left-2 inline-flex size-4 items-center justify-center`,children:(0,i.jsx)(a.Menu.RadioItemIndicator,{children:(0,i.jsx)(r.CheckIcon,{className:`size-4`})})}),n]})}function g({...e}){return(0,i.jsx)(a.Menu.SubmenuRoot,{"data-slot":`menubar-sub`,...e})}function _({className:e,children:n,inset:o,...c}){return(0,i.jsxs)(a.Menu.SubmenuTrigger,{"data-slot":`menubar-sub-trigger`,"data-inset":o||void 0,className:t.cn(s,e),...c,children:[n,(0,i.jsx)(r.ChevronRightIcon,{className:`ml-auto size-4`})]})}function v(e){return(0,i.jsx)(d,{"data-slot":`menubar-sub-content`,side:`right`,align:`start`,alignOffset:-4,sideOffset:0,...e})}function y({className:e,...n}){return(0,i.jsx)(a.Menu.Separator,{"data-slot":`menubar-separator`,className:t.cn(`-mx-1 my-1 h-px bg-border`,e),...n})}function b({className:e,inset:n,...r}){return(0,i.jsx)(`div`,{"data-slot":`menubar-label`,"data-inset":n||void 0,className:t.cn(`px-2.5 py-1.5 text-xs font-semibold text-muted-foreground data-[inset=true]:pl-8`,e),...r})}function x({className:e,...n}){return(0,i.jsx)(`span`,{"data-slot":`menubar-shortcut`,className:t.cn(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...n})}exports.Menubar=c,exports.MenubarCheckboxItem=p,exports.MenubarContent=d,exports.MenubarItem=f,exports.MenubarLabel=b,exports.MenubarMenu=l,exports.MenubarRadioGroup=m,exports.MenubarRadioItem=h,exports.MenubarSeparator=y,exports.MenubarShortcut=x,exports.MenubarSub=g,exports.MenubarSubContent=v,exports.MenubarSubTrigger=_,exports.MenubarTrigger=u;
|