@object-ui/layout 3.1.5 → 3.3.1
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 +28 -0
- package/README.md +21 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +174 -152
- package/dist/index.umd.cjs +3 -3
- package/package.json +45 -10
- package/.turbo/turbo-build.log +0 -38
- package/src/AppSchemaRenderer.tsx +0 -480
- package/src/AppShell.tsx +0 -149
- package/src/NavigationRenderer.tsx +0 -746
- package/src/Page.tsx +0 -39
- package/src/PageCard.tsx +0 -12
- package/src/PageHeader.tsx +0 -35
- package/src/ResponsiveGrid.tsx +0 -118
- package/src/SidebarNav.tsx +0 -164
- package/src/__tests__/AppSchemaRenderer.test.tsx +0 -408
- package/src/__tests__/NavigationRenderer.test.tsx +0 -562
- package/src/index.ts +0 -96
- package/src/stories/AppShell.stories.tsx +0 -110
- package/src/stories/ResponsiveGrid.stories.tsx +0 -110
- package/src/stories/SidebarNav.stories.tsx +0 -223
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -38
- /package/dist/{layout → packages/layout}/src/AppSchemaRenderer.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/AppShell.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/NavigationRenderer.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/Page.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/PageCard.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/PageHeader.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/ResponsiveGrid.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/SidebarNav.d.ts +0 -0
- /package/dist/{layout → packages/layout}/src/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ComponentRegistry as e } from "@object-ui/core";
|
|
2
2
|
import t, { createContext as n, memo as r, useCallback as i, useContext as a, useEffect as o, useLayoutEffect as s, useMemo as c, useReducer as l, useRef as u, useState as d } from "react";
|
|
3
|
-
import { Badge as f, Collapsible as p, CollapsibleContent as m, CollapsibleTrigger as h, Input as g, Separator as _, Sidebar as v, SidebarContent as y, SidebarFooter as b, SidebarGroup as x, SidebarGroupContent as S, SidebarGroupLabel as C, SidebarHeader as w, SidebarInput as T, SidebarInset as E, SidebarMenu as D, SidebarMenuAction as ee, SidebarMenuButton as O, SidebarMenuItem as k, SidebarMenuSub as A, SidebarMenuSubButton as te, SidebarMenuSubItem as ne, SidebarProvider as j,
|
|
4
|
-
import { Link as N, NavLink as
|
|
3
|
+
import { Badge as f, Collapsible as p, CollapsibleContent as m, CollapsibleTrigger as h, Input as g, Separator as _, Sidebar as v, SidebarContent as y, SidebarFooter as b, SidebarGroup as x, SidebarGroupContent as S, SidebarGroupLabel as C, SidebarHeader as w, SidebarInput as T, SidebarInset as E, SidebarMenu as D, SidebarMenuAction as ee, SidebarMenuButton as O, SidebarMenuItem as k, SidebarMenuSub as A, SidebarMenuSubButton as te, SidebarMenuSubItem as ne, SidebarProvider as j, cn as M } from "@object-ui/components";
|
|
4
|
+
import { Link as N, NavLink as P, useLocation as re } from "react-router-dom";
|
|
5
5
|
import * as F from "lucide-react";
|
|
6
|
-
import { ChevronRight as
|
|
7
|
-
import { createPortal as I, unstable_batchedUpdates as
|
|
8
|
-
import { menuItemToNavigationItem as
|
|
9
|
-
import { SchemaRenderer as
|
|
6
|
+
import { ChevronRight as ie, Search as ae } from "lucide-react";
|
|
7
|
+
import { createPortal as I, unstable_batchedUpdates as oe } from "react-dom";
|
|
8
|
+
import { menuItemToNavigationItem as L } from "@object-ui/types";
|
|
9
|
+
import { SchemaRenderer as se } from "@object-ui/react";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var
|
|
11
|
+
var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ce = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
12
12
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
13
13
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
14
|
-
}),
|
|
14
|
+
}), z = /* @__PURE__ */ R(((e) => {
|
|
15
15
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
16
16
|
function r(e, n, r) {
|
|
17
17
|
var i = null;
|
|
@@ -26,7 +26,7 @@ var L = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), R
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
29
|
-
})),
|
|
29
|
+
})), le = /* @__PURE__ */ R(((e) => {
|
|
30
30
|
process.env.NODE_ENV !== "production" && (function() {
|
|
31
31
|
function t(e) {
|
|
32
32
|
if (e == null) return null;
|
|
@@ -157,7 +157,7 @@ var L = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), R
|
|
|
157
157
|
var m = Object.keys(n).filter(function(e) {
|
|
158
158
|
return e !== "key";
|
|
159
159
|
});
|
|
160
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
160
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", P[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), P[p + o] = !0);
|
|
161
161
|
}
|
|
162
162
|
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
163
163
|
else i = n;
|
|
@@ -169,41 +169,41 @@ var L = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), R
|
|
|
169
169
|
function p(e) {
|
|
170
170
|
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
171
171
|
}
|
|
172
|
-
var m =
|
|
172
|
+
var m = ce("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), O = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, A = Array.isArray, te = console.createTask ? console.createTask : function() {
|
|
173
173
|
return null;
|
|
174
174
|
};
|
|
175
175
|
m = { react_stack_bottom_frame: function(e) {
|
|
176
176
|
return e();
|
|
177
177
|
} };
|
|
178
|
-
var ne, j = {},
|
|
178
|
+
var ne, j = {}, M = m.react_stack_bottom_frame.bind(m, o)(), N = te(i(o)), P = {};
|
|
179
179
|
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
180
180
|
var r = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
181
|
-
return d(e, t, n, !1, r ? Error("react-stack-top-frame") :
|
|
181
|
+
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : M, r ? te(i(e)) : N);
|
|
182
182
|
}, e.jsxs = function(e, t, n) {
|
|
183
183
|
var r = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
184
|
-
return d(e, t, n, !0, r ? Error("react-stack-top-frame") :
|
|
184
|
+
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : M, r ? te(i(e)) : N);
|
|
185
185
|
};
|
|
186
186
|
})();
|
|
187
|
-
})), B = (/* @__PURE__ */
|
|
188
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
187
|
+
})), B = (/* @__PURE__ */ R(((e, t) => {
|
|
188
|
+
process.env.NODE_ENV === "production" ? t.exports = z() : t.exports = le();
|
|
189
189
|
})))();
|
|
190
|
-
function
|
|
190
|
+
function ue({ title: e, description: t, action: n, className: r, children: i, ...a }) {
|
|
191
191
|
return /* @__PURE__ */ (0, B.jsx)("div", {
|
|
192
192
|
className: M("flex flex-col gap-4 pb-4 md:pb-8", r),
|
|
193
193
|
...a,
|
|
194
194
|
children: /* @__PURE__ */ (0, B.jsxs)("div", {
|
|
195
|
-
className: "flex items-
|
|
195
|
+
className: "flex flex-wrap items-end gap-x-4 gap-y-2",
|
|
196
196
|
children: [/* @__PURE__ */ (0, B.jsxs)("div", {
|
|
197
|
-
className: "flex flex-col gap-1",
|
|
197
|
+
className: "flex flex-col gap-1 min-w-0",
|
|
198
198
|
children: [/* @__PURE__ */ (0, B.jsx)("h1", {
|
|
199
|
-
className: "text-2xl font-bold tracking-tight md:text-3xl",
|
|
199
|
+
className: "text-2xl font-bold tracking-tight md:text-3xl truncate",
|
|
200
200
|
children: e
|
|
201
201
|
}), t && /* @__PURE__ */ (0, B.jsx)("p", {
|
|
202
202
|
className: "text-sm text-muted-foreground",
|
|
203
203
|
children: t
|
|
204
204
|
})]
|
|
205
205
|
}), (n || i) && /* @__PURE__ */ (0, B.jsxs)("div", {
|
|
206
|
-
className: "flex items-center gap-2",
|
|
206
|
+
className: "flex items-center gap-2 ml-auto sm:ml-0",
|
|
207
207
|
children: [n, i]
|
|
208
208
|
})]
|
|
209
209
|
})
|
|
@@ -211,7 +211,7 @@ function V({ title: e, description: t, action: n, className: r, children: i, ...
|
|
|
211
211
|
}
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region src/AppShell.tsx
|
|
214
|
-
function
|
|
214
|
+
function V(e) {
|
|
215
215
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
216
216
|
if (!t) return null;
|
|
217
217
|
let n = parseInt(t[1], 16) / 255, r = parseInt(t[2], 16) / 255, i = parseInt(t[3], 16) / 255, a = Math.max(n, r, i), o = Math.min(n, r, i), s = 0, c = 0, l = (a + o) / 2;
|
|
@@ -231,23 +231,32 @@ function de(e) {
|
|
|
231
231
|
}
|
|
232
232
|
return `${Math.round(s * 360)} ${Math.round(c * 100)}% ${Math.round(l * 100)}%`;
|
|
233
233
|
}
|
|
234
|
+
function de(e) {
|
|
235
|
+
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
236
|
+
if (!t) return "0 0% 100%";
|
|
237
|
+
let n = (e) => {
|
|
238
|
+
let t = e / 255;
|
|
239
|
+
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
240
|
+
}, r = n(parseInt(t[1], 16)), i = n(parseInt(t[2], 16)), a = n(parseInt(t[3], 16));
|
|
241
|
+
return .2126 * r + .7152 * i + .0722 * a > .6 ? "222 47% 11%" : "0 0% 100%";
|
|
242
|
+
}
|
|
234
243
|
function fe(e, t) {
|
|
235
244
|
o(() => {
|
|
236
245
|
let n = document.documentElement;
|
|
237
246
|
if (e?.primaryColor) {
|
|
238
|
-
let t =
|
|
239
|
-
t && (n.style.setProperty("--brand-primary", e.primaryColor), n.style.setProperty("--brand-primary-hsl", t));
|
|
240
|
-
} else n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl");
|
|
247
|
+
let t = V(e.primaryColor);
|
|
248
|
+
t && (n.style.setProperty("--brand-primary", e.primaryColor), n.style.setProperty("--brand-primary-hsl", t), n.style.setProperty("--primary", t), n.style.setProperty("--primary-foreground", de(e.primaryColor)), n.style.setProperty("--ring", t), n.style.setProperty("--sidebar-primary", t), n.style.setProperty("--sidebar-ring", t));
|
|
249
|
+
} else n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--primary"), n.style.removeProperty("--primary-foreground"), n.style.removeProperty("--ring"), n.style.removeProperty("--sidebar-primary"), n.style.removeProperty("--sidebar-ring");
|
|
241
250
|
if (e?.accentColor) {
|
|
242
|
-
let t =
|
|
243
|
-
t && (n.style.setProperty("--brand-accent", e.accentColor), n.style.setProperty("--brand-accent-hsl", t));
|
|
244
|
-
} else n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl");
|
|
251
|
+
let t = V(e.accentColor);
|
|
252
|
+
t && (n.style.setProperty("--brand-accent", e.accentColor), n.style.setProperty("--brand-accent-hsl", t), n.style.setProperty("--accent", t), n.style.setProperty("--accent-foreground", de(e.accentColor)));
|
|
253
|
+
} else n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
245
254
|
if (e?.favicon) {
|
|
246
255
|
let t = document.querySelector("#favicon") || document.querySelector("link[rel=\"icon\"]");
|
|
247
256
|
t && (t.href = e.favicon);
|
|
248
257
|
}
|
|
249
258
|
return t && (document.title = t), () => {
|
|
250
|
-
n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl");
|
|
259
|
+
n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--primary"), n.style.removeProperty("--primary-foreground"), n.style.removeProperty("--ring"), n.style.removeProperty("--sidebar-primary"), n.style.removeProperty("--sidebar-ring"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
251
260
|
};
|
|
252
261
|
}, [
|
|
253
262
|
e?.primaryColor,
|
|
@@ -259,17 +268,20 @@ function fe(e, t) {
|
|
|
259
268
|
function pe({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i = !0, branding: a }) {
|
|
260
269
|
return fe(a, a?.title), /* @__PURE__ */ (0, B.jsxs)(j, {
|
|
261
270
|
defaultOpen: i,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
className: "!flex-col",
|
|
272
|
+
children: [/* @__PURE__ */ (0, B.jsx)("header", {
|
|
273
|
+
className: "sticky top-0 z-30 flex h-14 w-full shrink-0 items-center gap-2 border-b bg-background px-2 sm:px-4",
|
|
274
|
+
children: t
|
|
275
|
+
}), /* @__PURE__ */ (0, B.jsxs)("div", {
|
|
276
|
+
className: "flex flex-1 min-h-0 w-full",
|
|
277
|
+
children: [e, /* @__PURE__ */ (0, B.jsx)(E, {
|
|
278
|
+
className: "min-w-0",
|
|
279
|
+
children: /* @__PURE__ */ (0, B.jsx)("main", {
|
|
280
|
+
className: M("flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6", r),
|
|
281
|
+
children: n
|
|
282
|
+
})
|
|
283
|
+
})]
|
|
284
|
+
})]
|
|
273
285
|
});
|
|
274
286
|
}
|
|
275
287
|
//#endregion
|
|
@@ -362,7 +374,7 @@ var ge = {
|
|
|
362
374
|
children: r
|
|
363
375
|
});
|
|
364
376
|
//#endregion
|
|
365
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.
|
|
377
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.5/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
366
378
|
function ve() {
|
|
367
379
|
var e = [...arguments];
|
|
368
380
|
return c(() => (t) => {
|
|
@@ -515,7 +527,7 @@ function Be(e) {
|
|
|
515
527
|
return e.matches(ze) ? e : e.querySelector(ze);
|
|
516
528
|
}
|
|
517
529
|
//#endregion
|
|
518
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.
|
|
530
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.5/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
519
531
|
var Ve = { display: "none" };
|
|
520
532
|
function He(e) {
|
|
521
533
|
let { id: n, value: r } = e;
|
|
@@ -557,7 +569,7 @@ function We() {
|
|
|
557
569
|
};
|
|
558
570
|
}
|
|
559
571
|
//#endregion
|
|
560
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.
|
|
572
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@dnd-kit/core/dist/core.esm.js
|
|
561
573
|
var Ge = /* @__PURE__ */ n(null);
|
|
562
574
|
function Ke(e) {
|
|
563
575
|
let t = a(Ge);
|
|
@@ -1883,24 +1895,24 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1883
1895
|
id: w,
|
|
1884
1896
|
data: ee?.data ?? Mn,
|
|
1885
1897
|
rect: O
|
|
1886
|
-
}, [w, ee]), A = u(null), [te, ne] = d(null), [j,
|
|
1898
|
+
}, [w, ee]), A = u(null), [te, ne] = d(null), [j, M] = d(null), N = Te(g, Object.values(g)), P = Ae("DndDescribedBy", n), re = c(() => D.getEnabled(), [D]), F = Hn(m), { droppableRects: ie, measureDroppableContainers: ae, measuringScheduled: I } = fn(re, {
|
|
1887
1899
|
dragging: C,
|
|
1888
1900
|
dependencies: [E.x, E.y],
|
|
1889
|
-
config:
|
|
1890
|
-
}),
|
|
1901
|
+
config: F.droppable
|
|
1902
|
+
}), L = sn(T, w), se = c(() => j ? Le(j) : null, [j]), R = Pe(), ce = mn(L, F.draggable.measure);
|
|
1891
1903
|
Un({
|
|
1892
1904
|
activeNode: w == null ? null : T.get(w),
|
|
1893
|
-
config:
|
|
1894
|
-
initialRect:
|
|
1895
|
-
measure:
|
|
1905
|
+
config: R.layoutShiftCompensation,
|
|
1906
|
+
initialRect: ce,
|
|
1907
|
+
measure: F.draggable.measure
|
|
1896
1908
|
});
|
|
1897
|
-
let
|
|
1909
|
+
let z = vn(L, F.draggable.measure, ce), le = vn(L ? L.parentElement : null), B = u({
|
|
1898
1910
|
activatorEvent: null,
|
|
1899
1911
|
active: null,
|
|
1900
|
-
activeNode:
|
|
1912
|
+
activeNode: L,
|
|
1901
1913
|
collisionRect: null,
|
|
1902
1914
|
collisions: null,
|
|
1903
|
-
droppableRects:
|
|
1915
|
+
droppableRects: ie,
|
|
1904
1916
|
draggableNodes: T,
|
|
1905
1917
|
draggingNode: null,
|
|
1906
1918
|
draggingNodeRect: null,
|
|
@@ -1908,7 +1920,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1908
1920
|
over: null,
|
|
1909
1921
|
scrollableAncestors: [],
|
|
1910
1922
|
scrollAdjustedTranslate: null
|
|
1911
|
-
}),
|
|
1923
|
+
}), ue = D.getNodeFor(B.current.over?.id), V = An({ measure: F.dragOverlay.measure }), de = V.nodeRef.current ?? L, fe = C ? V.rect ?? z : null, pe = !!(V.nodeRef.current && V.rect), me = yn(pe ? null : z), he = En(de ? U(de) : null), H = xn(C ? ue ?? L : null), ge = On(H), _e = Vn(h, {
|
|
1912
1924
|
transform: {
|
|
1913
1925
|
x: E.x - me.x,
|
|
1914
1926
|
y: E.y - me.y,
|
|
@@ -1917,21 +1929,21 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1917
1929
|
},
|
|
1918
1930
|
activatorEvent: j,
|
|
1919
1931
|
active: k,
|
|
1920
|
-
activeNodeRect:
|
|
1921
|
-
containerNodeRect:
|
|
1932
|
+
activeNodeRect: z,
|
|
1933
|
+
containerNodeRect: le,
|
|
1922
1934
|
draggingNodeRect: fe,
|
|
1923
|
-
over:
|
|
1935
|
+
over: B.current.over,
|
|
1924
1936
|
overlayNodeRect: V.rect,
|
|
1925
1937
|
scrollableAncestors: H,
|
|
1926
1938
|
scrollableAncestorRects: ge,
|
|
1927
1939
|
windowRect: he
|
|
1928
|
-
}), ve =
|
|
1940
|
+
}), ve = se ? Me(se, E) : null, ye = Sn(H), be = Cn(ye), xe = Cn(ye, [z]), W = Me(_e, be), G = fe ? dt(fe, _e) : null, Se = k && G ? p({
|
|
1929
1941
|
active: k,
|
|
1930
1942
|
collisionRect: G,
|
|
1931
|
-
droppableRects:
|
|
1932
|
-
droppableContainers:
|
|
1943
|
+
droppableRects: ie,
|
|
1944
|
+
droppableContainers: re,
|
|
1933
1945
|
pointerCoordinates: ve
|
|
1934
|
-
}) : null, Ce = rt(Se, "id"), [q, we] = d(null), Ee = ct(pe ? _e : Me(_e, xe), q?.rect ?? null,
|
|
1946
|
+
}) : null, Ce = rt(Se, "id"), [q, we] = d(null), Ee = ct(pe ? _e : Me(_e, xe), q?.rect ?? null, z), De = u(null), Oe = i((e, t) => {
|
|
1935
1947
|
let { sensor: n, options: r } = t;
|
|
1936
1948
|
if (A.current == null) return;
|
|
1937
1949
|
let i = T.get(A.current);
|
|
@@ -1942,10 +1954,10 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1942
1954
|
activeNode: i,
|
|
1943
1955
|
event: a,
|
|
1944
1956
|
options: r,
|
|
1945
|
-
context:
|
|
1957
|
+
context: B,
|
|
1946
1958
|
onAbort(e) {
|
|
1947
1959
|
if (!T.get(e)) return;
|
|
1948
|
-
let { onDragAbort: t } =
|
|
1960
|
+
let { onDragAbort: t } = N.current, n = { id: e };
|
|
1949
1961
|
t?.(n), y({
|
|
1950
1962
|
type: "onDragAbort",
|
|
1951
1963
|
event: n
|
|
@@ -1953,7 +1965,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1953
1965
|
},
|
|
1954
1966
|
onPending(e, t, n, r) {
|
|
1955
1967
|
if (!T.get(e)) return;
|
|
1956
|
-
let { onDragPending: i } =
|
|
1968
|
+
let { onDragPending: i } = N.current, a = {
|
|
1957
1969
|
id: e,
|
|
1958
1970
|
constraint: t,
|
|
1959
1971
|
initialCoordinates: n,
|
|
@@ -1969,7 +1981,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1969
1981
|
if (t == null) return;
|
|
1970
1982
|
let n = T.get(t);
|
|
1971
1983
|
if (!n) return;
|
|
1972
|
-
let { onDragStart: r } =
|
|
1984
|
+
let { onDragStart: r } = N.current, i = {
|
|
1973
1985
|
activatorEvent: a,
|
|
1974
1986
|
active: {
|
|
1975
1987
|
id: t,
|
|
@@ -1977,7 +1989,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1977
1989
|
rect: O
|
|
1978
1990
|
}
|
|
1979
1991
|
};
|
|
1980
|
-
|
|
1992
|
+
oe(() => {
|
|
1981
1993
|
r?.(i), S(Gn.Initializing), v({
|
|
1982
1994
|
type: J.DragStart,
|
|
1983
1995
|
initialCoordinates: e,
|
|
@@ -1985,7 +1997,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1985
1997
|
}), y({
|
|
1986
1998
|
type: "onDragStart",
|
|
1987
1999
|
event: i
|
|
1988
|
-
}), ne(De.current),
|
|
2000
|
+
}), ne(De.current), M(a);
|
|
1989
2001
|
});
|
|
1990
2002
|
},
|
|
1991
2003
|
onMove(e) {
|
|
@@ -1999,9 +2011,9 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1999
2011
|
});
|
|
2000
2012
|
function o(e) {
|
|
2001
2013
|
return async function() {
|
|
2002
|
-
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } =
|
|
2014
|
+
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = B.current, o = null;
|
|
2003
2015
|
if (t && i) {
|
|
2004
|
-
let { cancelDrop: s } =
|
|
2016
|
+
let { cancelDrop: s } = N.current;
|
|
2005
2017
|
o = {
|
|
2006
2018
|
activatorEvent: a,
|
|
2007
2019
|
active: t,
|
|
@@ -2010,11 +2022,11 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2010
2022
|
over: r
|
|
2011
2023
|
}, e === J.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = J.DragCancel);
|
|
2012
2024
|
}
|
|
2013
|
-
A.current = null,
|
|
2014
|
-
v({ type: e }), S(Gn.Uninitialized), we(null), ne(null),
|
|
2025
|
+
A.current = null, oe(() => {
|
|
2026
|
+
v({ type: e }), S(Gn.Uninitialized), we(null), ne(null), M(null), De.current = null;
|
|
2015
2027
|
let t = e === J.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2016
2028
|
if (o) {
|
|
2017
|
-
let e =
|
|
2029
|
+
let e = N.current[t];
|
|
2018
2030
|
e?.(o), y({
|
|
2019
2031
|
type: t,
|
|
2020
2032
|
event: o
|
|
@@ -2030,9 +2042,9 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2030
2042
|
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, A.current = r, Oe(n, t));
|
|
2031
2043
|
}, [T, Oe]));
|
|
2032
2044
|
wn(f), K(() => {
|
|
2033
|
-
|
|
2034
|
-
}, [
|
|
2035
|
-
let { onDragMove: e } =
|
|
2045
|
+
z && x === Gn.Initializing && S(Gn.Initialized);
|
|
2046
|
+
}, [z, x]), o(() => {
|
|
2047
|
+
let { onDragMove: e } = N.current, { active: t, activatorEvent: n, collisions: r, over: i } = B.current;
|
|
2036
2048
|
if (!t || !n) return;
|
|
2037
2049
|
let a = {
|
|
2038
2050
|
active: t,
|
|
@@ -2044,16 +2056,16 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2044
2056
|
},
|
|
2045
2057
|
over: i
|
|
2046
2058
|
};
|
|
2047
|
-
|
|
2059
|
+
oe(() => {
|
|
2048
2060
|
e?.(a), y({
|
|
2049
2061
|
type: "onDragMove",
|
|
2050
2062
|
event: a
|
|
2051
2063
|
});
|
|
2052
2064
|
});
|
|
2053
2065
|
}, [W.x, W.y]), o(() => {
|
|
2054
|
-
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } =
|
|
2066
|
+
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = B.current;
|
|
2055
2067
|
if (!e || A.current == null || !t || !i) return;
|
|
2056
|
-
let { onDragOver: a } =
|
|
2068
|
+
let { onDragOver: a } = N.current, o = r.get(Ce), s = o && o.rect.current ? {
|
|
2057
2069
|
id: o.id,
|
|
2058
2070
|
rect: o.rect.current,
|
|
2059
2071
|
data: o.data,
|
|
@@ -2068,20 +2080,20 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2068
2080
|
},
|
|
2069
2081
|
over: s
|
|
2070
2082
|
};
|
|
2071
|
-
|
|
2083
|
+
oe(() => {
|
|
2072
2084
|
we(s), a?.(c), y({
|
|
2073
2085
|
type: "onDragOver",
|
|
2074
2086
|
event: c
|
|
2075
2087
|
});
|
|
2076
2088
|
});
|
|
2077
2089
|
}, [Ce]), K(() => {
|
|
2078
|
-
|
|
2090
|
+
B.current = {
|
|
2079
2091
|
activatorEvent: j,
|
|
2080
2092
|
active: k,
|
|
2081
|
-
activeNode:
|
|
2093
|
+
activeNode: L,
|
|
2082
2094
|
collisionRect: G,
|
|
2083
2095
|
collisions: Se,
|
|
2084
|
-
droppableRects:
|
|
2096
|
+
droppableRects: ie,
|
|
2085
2097
|
draggableNodes: T,
|
|
2086
2098
|
draggingNode: de,
|
|
2087
2099
|
draggingNodeRect: fe,
|
|
@@ -2095,19 +2107,19 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2095
2107
|
};
|
|
2096
2108
|
}, [
|
|
2097
2109
|
k,
|
|
2098
|
-
|
|
2110
|
+
L,
|
|
2099
2111
|
Se,
|
|
2100
2112
|
G,
|
|
2101
2113
|
T,
|
|
2102
2114
|
de,
|
|
2103
2115
|
fe,
|
|
2104
|
-
|
|
2116
|
+
ie,
|
|
2105
2117
|
D,
|
|
2106
2118
|
q,
|
|
2107
2119
|
H,
|
|
2108
2120
|
W
|
|
2109
2121
|
]), rn({
|
|
2110
|
-
...
|
|
2122
|
+
...R,
|
|
2111
2123
|
delta: E,
|
|
2112
2124
|
draggingRect: G,
|
|
2113
2125
|
pointerCoordinates: ve,
|
|
@@ -2116,46 +2128,46 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2116
2128
|
});
|
|
2117
2129
|
let je = c(() => ({
|
|
2118
2130
|
active: k,
|
|
2119
|
-
activeNode:
|
|
2120
|
-
activeNodeRect:
|
|
2131
|
+
activeNode: L,
|
|
2132
|
+
activeNodeRect: z,
|
|
2121
2133
|
activatorEvent: j,
|
|
2122
2134
|
collisions: Se,
|
|
2123
|
-
containerNodeRect:
|
|
2135
|
+
containerNodeRect: le,
|
|
2124
2136
|
dragOverlay: V,
|
|
2125
2137
|
draggableNodes: T,
|
|
2126
2138
|
droppableContainers: D,
|
|
2127
|
-
droppableRects:
|
|
2139
|
+
droppableRects: ie,
|
|
2128
2140
|
over: q,
|
|
2129
2141
|
measureDroppableContainers: ae,
|
|
2130
2142
|
scrollableAncestors: H,
|
|
2131
2143
|
scrollableAncestorRects: ge,
|
|
2132
|
-
measuringConfiguration:
|
|
2133
|
-
measuringScheduled:
|
|
2144
|
+
measuringConfiguration: F,
|
|
2145
|
+
measuringScheduled: I,
|
|
2134
2146
|
windowRect: he
|
|
2135
2147
|
}), [
|
|
2136
2148
|
k,
|
|
2137
|
-
|
|
2138
|
-
|
|
2149
|
+
L,
|
|
2150
|
+
z,
|
|
2139
2151
|
j,
|
|
2140
2152
|
Se,
|
|
2141
|
-
|
|
2153
|
+
le,
|
|
2142
2154
|
V,
|
|
2143
2155
|
T,
|
|
2144
2156
|
D,
|
|
2145
|
-
|
|
2157
|
+
ie,
|
|
2146
2158
|
q,
|
|
2147
2159
|
ae,
|
|
2148
2160
|
H,
|
|
2149
2161
|
ge,
|
|
2150
|
-
|
|
2151
|
-
|
|
2162
|
+
F,
|
|
2163
|
+
I,
|
|
2152
2164
|
he
|
|
2153
2165
|
]), Ne = c(() => ({
|
|
2154
2166
|
activatorEvent: j,
|
|
2155
2167
|
activators: ke,
|
|
2156
2168
|
active: k,
|
|
2157
|
-
activeNodeRect:
|
|
2158
|
-
ariaDescribedById: { draggable:
|
|
2169
|
+
activeNodeRect: z,
|
|
2170
|
+
ariaDescribedById: { draggable: P },
|
|
2159
2171
|
dispatch: v,
|
|
2160
2172
|
draggableNodes: T,
|
|
2161
2173
|
over: q,
|
|
@@ -2164,16 +2176,16 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2164
2176
|
j,
|
|
2165
2177
|
ke,
|
|
2166
2178
|
k,
|
|
2167
|
-
|
|
2179
|
+
z,
|
|
2168
2180
|
v,
|
|
2169
|
-
|
|
2181
|
+
P,
|
|
2170
2182
|
T,
|
|
2171
2183
|
q,
|
|
2172
2184
|
ae
|
|
2173
2185
|
]);
|
|
2174
2186
|
return t.createElement(Ge.Provider, { value: b }, t.createElement(In.Provider, { value: Ne }, t.createElement(Ln.Provider, { value: je }, t.createElement(Wn.Provider, { value: Ee }, s)), t.createElement(Bn, { disabled: r?.restoreFocus === !1 })), t.createElement(Xe, {
|
|
2175
2187
|
...r,
|
|
2176
|
-
hiddenTextDescribedById:
|
|
2188
|
+
hiddenTextDescribedById: P
|
|
2177
2189
|
}));
|
|
2178
2190
|
function Pe() {
|
|
2179
2191
|
let e = te?.autoScrollEnabled === !1, t = typeof a == "object" ? a.enabled === !1 : a === !1, n = C && !e && !t;
|
|
@@ -2282,7 +2294,7 @@ function er(e) {
|
|
|
2282
2294
|
};
|
|
2283
2295
|
}
|
|
2284
2296
|
//#endregion
|
|
2285
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.
|
|
2297
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5__react@19.2.5/node_modules/@dnd-kit/sortable/dist/sortable.esm.js
|
|
2286
2298
|
function tr(e, t, n) {
|
|
2287
2299
|
let r = e.slice();
|
|
2288
2300
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
@@ -2459,7 +2471,7 @@ function br(e) {
|
|
|
2459
2471
|
updateMeasurementsFor: E,
|
|
2460
2472
|
...f
|
|
2461
2473
|
}
|
|
2462
|
-
}), { active: A, activatorEvent: te, activeNodeRect: ne, attributes: j, setNodeRef:
|
|
2474
|
+
}), { active: A, activatorEvent: te, activeNodeRect: ne, attributes: j, setNodeRef: M, listeners: N, isDragging: P, over: re, setActivatorNodeRef: F, transform: ie } = Xn({
|
|
2463
2475
|
id: l,
|
|
2464
2476
|
data: T,
|
|
2465
2477
|
attributes: {
|
|
@@ -2467,84 +2479,84 @@ function br(e) {
|
|
|
2467
2479
|
...n
|
|
2468
2480
|
},
|
|
2469
2481
|
disabled: C.draggable
|
|
2470
|
-
}), ae = ve(k,
|
|
2482
|
+
}), ae = ve(k, M), I = !!A, oe = I && !v && rr(g) && rr(b), L = !x && P, se = oe ? (L && oe ? ie : null) ?? (d ?? S)({
|
|
2471
2483
|
rects: y,
|
|
2472
2484
|
activeNodeRect: ne,
|
|
2473
2485
|
activeIndex: g,
|
|
2474
2486
|
overIndex: b,
|
|
2475
2487
|
index: w
|
|
2476
|
-
}) : null,
|
|
2488
|
+
}) : null, R = rr(g) && rr(b) ? s({
|
|
2477
2489
|
id: l,
|
|
2478
2490
|
items: m,
|
|
2479
2491
|
activeIndex: g,
|
|
2480
2492
|
overIndex: b
|
|
2481
|
-
}) : w,
|
|
2482
|
-
activeId:
|
|
2493
|
+
}) : w, ce = A?.id, z = u({
|
|
2494
|
+
activeId: ce,
|
|
2483
2495
|
items: m,
|
|
2484
|
-
newIndex:
|
|
2496
|
+
newIndex: R,
|
|
2485
2497
|
containerId: h
|
|
2486
|
-
}),
|
|
2498
|
+
}), le = m !== z.current.items, B = t({
|
|
2487
2499
|
active: A,
|
|
2488
2500
|
containerId: h,
|
|
2489
|
-
isDragging:
|
|
2490
|
-
isSorting:
|
|
2501
|
+
isDragging: P,
|
|
2502
|
+
isSorting: I,
|
|
2491
2503
|
id: l,
|
|
2492
2504
|
index: w,
|
|
2493
2505
|
items: m,
|
|
2494
|
-
newIndex:
|
|
2495
|
-
previousItems:
|
|
2496
|
-
previousContainerId:
|
|
2506
|
+
newIndex: z.current.newIndex,
|
|
2507
|
+
previousItems: z.current.items,
|
|
2508
|
+
previousContainerId: z.current.containerId,
|
|
2497
2509
|
transition: p,
|
|
2498
|
-
wasDragging:
|
|
2499
|
-
}),
|
|
2500
|
-
disabled: !
|
|
2510
|
+
wasDragging: z.current.activeId != null
|
|
2511
|
+
}), ue = yr({
|
|
2512
|
+
disabled: !B,
|
|
2501
2513
|
index: w,
|
|
2502
2514
|
node: ee,
|
|
2503
2515
|
rect: D
|
|
2504
2516
|
});
|
|
2505
2517
|
return o(() => {
|
|
2506
|
-
|
|
2518
|
+
I && z.current.newIndex !== R && (z.current.newIndex = R), h !== z.current.containerId && (z.current.containerId = h), m !== z.current.items && (z.current.items = m);
|
|
2507
2519
|
}, [
|
|
2508
|
-
|
|
2509
|
-
|
|
2520
|
+
I,
|
|
2521
|
+
R,
|
|
2510
2522
|
h,
|
|
2511
2523
|
m
|
|
2512
2524
|
]), o(() => {
|
|
2513
|
-
if (
|
|
2514
|
-
if (
|
|
2515
|
-
|
|
2525
|
+
if (ce === z.current.activeId) return;
|
|
2526
|
+
if (ce != null && z.current.activeId == null) {
|
|
2527
|
+
z.current.activeId = ce;
|
|
2516
2528
|
return;
|
|
2517
2529
|
}
|
|
2518
2530
|
let e = setTimeout(() => {
|
|
2519
|
-
|
|
2531
|
+
z.current.activeId = ce;
|
|
2520
2532
|
}, 50);
|
|
2521
2533
|
return () => clearTimeout(e);
|
|
2522
|
-
}, [
|
|
2534
|
+
}, [ce]), {
|
|
2523
2535
|
active: A,
|
|
2524
2536
|
activeIndex: g,
|
|
2525
2537
|
attributes: j,
|
|
2526
2538
|
data: T,
|
|
2527
2539
|
rect: D,
|
|
2528
2540
|
index: w,
|
|
2529
|
-
newIndex:
|
|
2541
|
+
newIndex: R,
|
|
2530
2542
|
items: m,
|
|
2531
2543
|
isOver: O,
|
|
2532
|
-
isSorting:
|
|
2533
|
-
isDragging:
|
|
2534
|
-
listeners:
|
|
2544
|
+
isSorting: I,
|
|
2545
|
+
isDragging: P,
|
|
2546
|
+
listeners: N,
|
|
2535
2547
|
node: ee,
|
|
2536
2548
|
overIndex: b,
|
|
2537
|
-
over:
|
|
2549
|
+
over: re,
|
|
2538
2550
|
setNodeRef: ae,
|
|
2539
|
-
setActivatorNodeRef:
|
|
2551
|
+
setActivatorNodeRef: F,
|
|
2540
2552
|
setDroppableNodeRef: k,
|
|
2541
|
-
setDraggableNodeRef:
|
|
2542
|
-
transform:
|
|
2553
|
+
setDraggableNodeRef: M,
|
|
2554
|
+
transform: ue ?? se,
|
|
2543
2555
|
transition: V()
|
|
2544
2556
|
};
|
|
2545
2557
|
function V() {
|
|
2546
|
-
if (
|
|
2547
|
-
if (!(
|
|
2558
|
+
if (ue || le && z.current.newIndex === w) return _r;
|
|
2559
|
+
if (!(L && !Fe(te) || !p) && (I || B)) return Re.Transition.toString({
|
|
2548
2560
|
...p,
|
|
2549
2561
|
property: gr
|
|
2550
2562
|
});
|
|
@@ -2663,7 +2675,7 @@ function Ar({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enabl
|
|
|
2663
2675
|
});
|
|
2664
2676
|
}
|
|
2665
2677
|
function jr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enablePinning: a, onPinToggle: o, dragListeners: s, resolveObjectLabel: c, t: l }) {
|
|
2666
|
-
let u =
|
|
2678
|
+
let u = re(), [g, v] = d(e.defaultOpen !== !1);
|
|
2667
2679
|
if (!n(e.visible) || e.requiredPermissions?.length && !r(e.requiredPermissions)) return null;
|
|
2668
2680
|
if (e.type === "separator") return /* @__PURE__ */ (0, B.jsx)(_, { className: "my-2" });
|
|
2669
2681
|
if (e.type === "group") {
|
|
@@ -2841,7 +2853,7 @@ function Pr({ areas: e, activeAreaId: t, onAreaChange: n, evalVis: r, checkPerm:
|
|
|
2841
2853
|
}) }) })] });
|
|
2842
2854
|
}
|
|
2843
2855
|
function Fr({ items: e, basePath: t }) {
|
|
2844
|
-
let n =
|
|
2856
|
+
let n = re(), r = e.filter((e) => e.type !== "group" && e.type !== "separator").slice(0, 5);
|
|
2845
2857
|
return r.length === 0 ? null : /* @__PURE__ */ (0, B.jsx)("div", {
|
|
2846
2858
|
className: "fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur-sm px-2 py-1 sm:hidden safe-area-bottom",
|
|
2847
2859
|
role: "navigation",
|
|
@@ -2919,7 +2931,7 @@ function Ir({ schema: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, sid
|
|
|
2919
2931
|
});
|
|
2920
2932
|
}
|
|
2921
2933
|
function Lr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluateVisibility: r, checkPermission: i, onAction: a, navbar: s, sidebarHeader: l, sidebarFooter: u, sidebarExtra: f, children: p, className: m, defaultOpen: h = !0, enableSearch: g, enablePinning: _, onPinToggle: v, enableReorder: y, onReorder: b }) {
|
|
2922
|
-
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) =>
|
|
2934
|
+
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) => L(e, t)), [e.menu]), w = e.navigation ?? C, T = e.areas ?? [], [E, D] = d(() => T.length > 0 ? T[0].id : null), ee = T.map((e) => e.id).join(",");
|
|
2923
2935
|
o(() => {
|
|
2924
2936
|
T.length > 0 ? D((e) => T.some((t) => t.id === e) ? e : T[0].id) : D(null);
|
|
2925
2937
|
}, [e.name, ee]);
|
|
@@ -2966,12 +2978,12 @@ function zr({ schema: e, className: t, style: n, id: r, ...i }) {
|
|
|
2966
2978
|
id: r || e.id,
|
|
2967
2979
|
className: M("flex flex-col h-full space-y-4", t),
|
|
2968
2980
|
style: n,
|
|
2969
|
-
children: [/* @__PURE__ */ (0, B.jsx)(
|
|
2981
|
+
children: [/* @__PURE__ */ (0, B.jsx)(ue, {
|
|
2970
2982
|
title: e.title,
|
|
2971
2983
|
description: e.description
|
|
2972
2984
|
}), /* @__PURE__ */ (0, B.jsx)("div", {
|
|
2973
2985
|
className: "flex-1 overflow-auto",
|
|
2974
|
-
children: a.map((e, t) => /* @__PURE__ */ (0, B.jsx)(
|
|
2986
|
+
children: a.map((e, t) => /* @__PURE__ */ (0, B.jsx)(se, {
|
|
2975
2987
|
schema: e,
|
|
2976
2988
|
...i
|
|
2977
2989
|
}, e?.id || t))
|
|
@@ -3000,13 +3012,13 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3000
3012
|
className: "ml-auto mr-1 h-5 min-w-5 px-1 text-xs",
|
|
3001
3013
|
children: e.badge
|
|
3002
3014
|
}),
|
|
3003
|
-
/* @__PURE__ */ (0, B.jsx)(
|
|
3015
|
+
/* @__PURE__ */ (0, B.jsx)(ie, { className: "ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
3004
3016
|
]
|
|
3005
3017
|
})
|
|
3006
3018
|
}), /* @__PURE__ */ (0, B.jsx)(m, { children: /* @__PURE__ */ (0, B.jsx)(A, { children: e.children.map((e) => /* @__PURE__ */ (0, B.jsx)(ne, { children: /* @__PURE__ */ (0, B.jsx)(te, {
|
|
3007
3019
|
asChild: !0,
|
|
3008
3020
|
isActive: t === e.href,
|
|
3009
|
-
children: /* @__PURE__ */ (0, B.jsxs)(
|
|
3021
|
+
children: /* @__PURE__ */ (0, B.jsxs)(P, {
|
|
3010
3022
|
to: e.href,
|
|
3011
3023
|
children: [
|
|
3012
3024
|
e.icon && /* @__PURE__ */ (0, B.jsx)(e.icon, {}),
|
|
@@ -3023,7 +3035,7 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3023
3035
|
asChild: !0,
|
|
3024
3036
|
isActive: t === e.href,
|
|
3025
3037
|
tooltip: e.title,
|
|
3026
|
-
children: /* @__PURE__ */ (0, B.jsxs)(
|
|
3038
|
+
children: /* @__PURE__ */ (0, B.jsxs)(P, {
|
|
3027
3039
|
to: e.href,
|
|
3028
3040
|
children: [
|
|
3029
3041
|
e.icon && /* @__PURE__ */ (0, B.jsx)(e.icon, {}),
|
|
@@ -3038,7 +3050,7 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3038
3050
|
}) });
|
|
3039
3051
|
}
|
|
3040
3052
|
function Hr({ items: e, title: n = "Application", className: r, collapsible: i = "icon", searchEnabled: a = !1, searchPlaceholder: o = "Search..." }) {
|
|
3041
|
-
let s =
|
|
3053
|
+
let s = re(), [c, l] = t.useState(""), u = t.useMemo(() => e.length === 0 ? [] : Br(e[0]) ? e.map((e) => ({
|
|
3042
3054
|
groupLabel: e.label,
|
|
3043
3055
|
items: e.items
|
|
3044
3056
|
})) : [{ items: e }], [e]), d = t.useMemo(() => {
|
|
@@ -3056,7 +3068,7 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3056
3068
|
className: "px-3 py-2",
|
|
3057
3069
|
children: /* @__PURE__ */ (0, B.jsxs)("div", {
|
|
3058
3070
|
className: "relative",
|
|
3059
|
-
children: [/* @__PURE__ */ (0, B.jsx)(
|
|
3071
|
+
children: [/* @__PURE__ */ (0, B.jsx)(ae, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ (0, B.jsx)(g, {
|
|
3060
3072
|
type: "search",
|
|
3061
3073
|
placeholder: o,
|
|
3062
3074
|
value: c,
|
|
@@ -3064,16 +3076,26 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3064
3076
|
className: "pl-8 h-9"
|
|
3065
3077
|
})]
|
|
3066
3078
|
})
|
|
3067
|
-
}), d.map((e, t) => /* @__PURE__ */ (0, B.jsxs)(x, { children: [
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3079
|
+
}), d.map((e, t) => /* @__PURE__ */ (0, B.jsxs)(x, { children: [
|
|
3080
|
+
t > 0 && /* @__PURE__ */ (0, B.jsx)("div", {
|
|
3081
|
+
className: "mx-3 mb-1 h-px bg-sidebar-border/60",
|
|
3082
|
+
"aria-hidden": !0
|
|
3083
|
+
}),
|
|
3084
|
+
/* @__PURE__ */ (0, B.jsx)(C, {
|
|
3085
|
+
className: "text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60",
|
|
3086
|
+
children: e.groupLabel || n
|
|
3087
|
+
}),
|
|
3088
|
+
/* @__PURE__ */ (0, B.jsx)(S, { children: /* @__PURE__ */ (0, B.jsx)(D, { children: e.items.map((e) => /* @__PURE__ */ (0, B.jsx)(Vr, {
|
|
3089
|
+
item: e,
|
|
3090
|
+
pathname: s.pathname
|
|
3091
|
+
}, e.href)) }) })
|
|
3092
|
+
] }, e.groupLabel || t))] })
|
|
3071
3093
|
});
|
|
3072
3094
|
}
|
|
3073
3095
|
//#endregion
|
|
3074
3096
|
//#region src/index.ts
|
|
3075
3097
|
function Ur() {
|
|
3076
|
-
e.register("page-header",
|
|
3098
|
+
e.register("page-header", ue, {
|
|
3077
3099
|
namespace: "layout",
|
|
3078
3100
|
label: "Page Header",
|
|
3079
3101
|
category: "Layout",
|
|
@@ -3084,7 +3106,7 @@ function Ur() {
|
|
|
3084
3106
|
name: "description",
|
|
3085
3107
|
type: "string"
|
|
3086
3108
|
}]
|
|
3087
|
-
}), e.register("page:header",
|
|
3109
|
+
}), e.register("page:header", ue, { namespace: "layout" }), e.register("page:card", me, {
|
|
3088
3110
|
namespace: "layout",
|
|
3089
3111
|
label: "Page Card",
|
|
3090
3112
|
category: "Layout",
|
|
@@ -3141,4 +3163,4 @@ try {
|
|
|
3141
3163
|
Ur();
|
|
3142
3164
|
} catch {}
|
|
3143
3165
|
//#endregion
|
|
3144
|
-
export { Lr as AppSchemaRenderer, pe as AppShell, Mr as NavigationRenderer, zr as Page, me as PageCard,
|
|
3166
|
+
export { Lr as AppSchemaRenderer, pe as AppShell, Mr as NavigationRenderer, zr as Page, me as PageCard, ue as PageHeader, _e as ResponsiveGrid, Hr as SidebarNav, Or as filterNavigationItems, Ur as registerLayout, Cr as resolveIcon, $ as resolveLabel, fe as useAppShellBranding };
|