@middag-io/react 0.51.1 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DateField-lPZsiWfC.js → DateField-CduB6lUv.js} +21 -23
- package/dist-lib/{DateRangeField-B7zWB48D.js → DateRangeField-DlA_9i4w.js} +17 -13
- package/dist-lib/{FormField-BGqAQLtX.js → FormField-CDdY7-md.js} +2090 -2054
- package/dist-lib/{FormPanelBlock-CGgA83Mu.js → FormPanelBlock-zo8tCgtS.js} +1 -2
- package/dist-lib/base/blocks/CardGridBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/EmptyStateBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/MetricCardBlock.d.ts.map +1 -1
- package/dist-lib/base/form/FormField.d.ts +8 -1
- package/dist-lib/base/form/FormField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/DateField.d.ts +1 -1
- package/dist-lib/base/form/fields/DateField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/DateRangeField.d.ts +3 -1
- package/dist-lib/base/form/fields/DateRangeField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/MultiSelectField.d.ts +3 -1
- package/dist-lib/base/form/fields/MultiSelectField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/RadioField.d.ts +3 -1
- package/dist-lib/base/form/fields/RadioField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/RatingField.d.ts +3 -1
- package/dist-lib/base/form/fields/RatingField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/SliderField.d.ts +3 -1
- package/dist-lib/base/form/fields/SliderField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/TagsField.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/cell-renderers.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/types.d.ts +2 -2
- package/dist-lib/base/partials/DataTable/types.d.ts.map +1 -1
- package/dist-lib/base/partials/EmptyPlaceholder/index.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.d.ts +12 -1
- package/dist-lib/base/shell/BasicShell.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.js +126 -111
- package/dist-lib/base/shell/partials/InlineEditablePanel.js +193 -176
- package/dist-lib/base/shell/partials/InspectorContext.js +1 -1
- package/dist-lib/base/theme/tailwind-theme.css +13 -5
- package/dist-lib/base/theme/theme-bridge.css +8 -0
- package/dist-lib/base/theme/themes/classic.css +15 -11
- package/dist-lib/base/theme/tokens.css +36 -10
- package/dist-lib/base/utils/php-wire.d.ts +33 -0
- package/dist-lib/base/utils/php-wire.d.ts.map +1 -0
- package/dist-lib/base/utils/php-wire.js +19 -0
- package/dist-lib/chunks/{subpath-DjkzcIPp.js → subpath-Bb5vw3A_.js} +21 -23
- package/dist-lib/chunks/{subpath-fEhy6n_U.js → subpath-CZB5_RY7.js} +2 -0
- package/dist-lib/chunks/subpath-DVHs9lfh.js +29 -0
- package/dist-lib/contracts/block-data/data-display.d.ts +12 -287
- package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/interactive.d.ts +14 -22
- package/dist-lib/contracts/block-data/interactive.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/shared.d.ts +2 -17
- package/dist-lib/contracts/block-data/shared.d.ts.map +1 -1
- package/dist-lib/contracts/generated/index.d.ts +2 -2
- package/dist-lib/contracts/generated/schemas.d.ts +1584 -192
- package/dist-lib/contracts/generated/schemas.d.ts.map +1 -1
- package/dist-lib/contracts/generated/types.d.ts +288 -8
- package/dist-lib/contracts/generated/types.d.ts.map +1 -1
- package/dist-lib/contracts/page-contract-schema.d.ts +15 -0
- package/dist-lib/contracts/page-contract-schema.d.ts.map +1 -1
- package/dist-lib/i18n/I18nProvider.js +1 -1
- package/dist-lib/i18n/instance.js +1 -1
- package/dist-lib/i18n/locales/en/ui.json +1 -0
- package/dist-lib/i18n/locales/pt-BR/ui.json +1 -0
- package/dist-lib/i18n/register-strings.js +1 -1
- package/dist-lib/index.d.ts +2 -2
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/lib/hooks/use-prefers-reduced-motion.d.ts +6 -0
- package/dist-lib/lib/hooks/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist-lib/lib/hooks/use-prefers-reduced-motion.js +21 -0
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +10407 -10012
- package/dist-lib/primitives/reui/badge.d.ts +5 -0
- package/dist-lib/primitives/reui/badge.d.ts.map +1 -1
- package/dist-lib/primitives/reui/badge.js +14 -14
- package/dist-lib/primitives/reui/sidebar.d.ts.map +1 -1
- package/dist-lib/primitives/reui/sidebar.js +46 -34
- package/docs/public/schemas/fragment.json +1258 -19
- package/docs/public/schemas/page-contract.json +1258 -19
- package/docs/public/schemas/shared-props.json +1258 -19
- package/package.json +6 -1
- package/src/base/blocks/CardGridBlock.tsx +10 -2
- package/src/base/blocks/DenseTableBlock.tsx +18 -11
- package/src/base/blocks/DetailPanelBlock.tsx +1 -1
- package/src/base/blocks/EmptyStateBlock.tsx +5 -1
- package/src/base/blocks/FormPanelBlock.tsx +0 -1
- package/src/base/blocks/MetricCardBlock.tsx +9 -2
- package/src/base/form/FormField.tsx +40 -7
- package/src/base/form/fields/DateField.tsx +3 -3
- package/src/base/form/fields/DateRangeField.tsx +19 -14
- package/src/base/form/fields/MultiSelectField.tsx +9 -8
- package/src/base/form/fields/RadioField.tsx +4 -0
- package/src/base/form/fields/RatingField.tsx +4 -0
- package/src/base/form/fields/SliderField.tsx +4 -1
- package/src/base/form/fields/TagsField.tsx +3 -0
- package/src/base/partials/DataTable/cell-renderers.tsx +23 -12
- package/src/base/partials/DataTable/index.tsx +5 -2
- package/src/base/partials/DataTable/types.ts +2 -5
- package/src/base/partials/DetailSection/index.tsx +2 -2
- package/src/base/partials/EmptyPlaceholder/index.tsx +7 -3
- package/src/base/partials/MarkdownContent/index.tsx +1 -1
- package/src/base/shell/BasicShell.tsx +47 -8
- package/src/base/shell/partials/InspectorContext.tsx +1 -1
- package/src/base/theme/tailwind-theme.css +13 -5
- package/src/base/theme/theme-bridge.css +8 -0
- package/src/base/theme/themes/classic.css +15 -11
- package/src/base/theme/tokens.css +36 -10
- package/src/base/utils/php-wire.ts +54 -0
- package/src/contracts/block-data/data-display.ts +46 -337
- package/src/contracts/block-data/interactive.ts +18 -23
- package/src/contracts/block-data/shared.ts +2 -14
- package/src/contracts/generated/index.ts +2 -2
- package/src/contracts/generated/schemas.ts +312 -9
- package/src/contracts/generated/types.ts +314 -8
- package/src/i18n/locales/en/ui.json +1 -0
- package/src/i18n/locales/pt-BR/ui.json +1 -0
- package/src/lib/hooks/use-prefers-reduced-motion.ts +32 -0
- package/src/primitives/reui/badge.tsx +19 -14
- package/src/primitives/reui/sidebar.tsx +30 -3
- package/src/theme.css +11 -5
- package/dist-lib/chunks/subpath-DoiyWIYV.js +0 -25
|
@@ -1,219 +1,234 @@
|
|
|
1
1
|
import { Avatar as e, AvatarFallback as t, AvatarImage as n } from "../../primitives/reui/avatar.js";
|
|
2
2
|
import { DropdownMenu as r, DropdownMenuContent as i, DropdownMenuItem as a, DropdownMenuLabel as o, DropdownMenuSeparator as s, DropdownMenuTrigger as c } from "../../primitives/reui/dropdown-menu.js";
|
|
3
|
-
import { Sidebar as l, SidebarContent as u, SidebarFooter as d, SidebarGroup as f, SidebarGroupLabel as p, SidebarHeader as m,
|
|
4
|
-
import { setAppearance as
|
|
5
|
-
import { Toaster as
|
|
6
|
-
import { renderLabel as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { t as
|
|
9
|
-
import { useSyncExternalStore as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Link as
|
|
12
|
-
import { router as
|
|
3
|
+
import { Sidebar as l, SidebarContent as u, SidebarFooter as d, SidebarGroup as f, SidebarGroupLabel as p, SidebarHeader as m, SidebarMenu as h, SidebarMenuButton as g, SidebarMenuItem as _, SidebarProvider as v, SidebarTrigger as y } from "../../primitives/reui/sidebar.js";
|
|
4
|
+
import { setAppearance as b } from "../theme/appearance.js";
|
|
5
|
+
import { Toaster as x } from "../../primitives/reui/sonner.js";
|
|
6
|
+
import { renderLabel as S } from "../../i18n/render-label.js";
|
|
7
|
+
import { useTranslation as C } from "../../i18n/useTranslation.js";
|
|
8
|
+
import { t as w } from "../../chunks/subpath-Bs35txZS.js";
|
|
9
|
+
import { useSyncExternalStore as T } from "react";
|
|
10
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
11
|
+
import { Link as k, usePage as A } from "@inertiajs/react";
|
|
12
|
+
import { router as j } from "@inertiajs/core";
|
|
13
13
|
//#region src/base/hooks/useIsDark.ts
|
|
14
|
-
function
|
|
14
|
+
function M() {
|
|
15
15
|
return document.documentElement.classList.contains("dark");
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function N() {
|
|
18
18
|
return !1;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
var P = [], F = !1;
|
|
21
|
+
function I() {
|
|
22
|
+
F || (F = !0, new MutationObserver(() => {
|
|
23
|
+
P.forEach((e) => e());
|
|
24
24
|
}).observe(document.documentElement, {
|
|
25
25
|
attributes: !0,
|
|
26
26
|
attributeFilter: ["class"]
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
|
|
29
|
+
function L(e) {
|
|
30
|
+
return P = [...P, e], I(), () => {
|
|
31
|
+
P = P.filter((t) => t !== e);
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function R() {
|
|
35
|
+
return T(L, M, N);
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/base/shell/BasicShell.tsx
|
|
39
|
-
var
|
|
39
|
+
var z = {
|
|
40
40
|
tree: [],
|
|
41
41
|
footer: [],
|
|
42
42
|
activeKey: ""
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function B(e) {
|
|
45
45
|
return /^https?:\/\//i.test(e);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { t: n } =
|
|
49
|
-
return /* @__PURE__ */
|
|
47
|
+
function V({ node: e, activeKey: t }) {
|
|
48
|
+
let { t: n } = C(), r = e.key === t, i = S(e.label, n);
|
|
49
|
+
return /* @__PURE__ */ D(_, { children: /* @__PURE__ */ D(g, {
|
|
50
50
|
asChild: !!e.href,
|
|
51
51
|
isActive: r,
|
|
52
|
-
children: e.href && (e.target ||
|
|
52
|
+
children: e.href && (e.target || B(e.href)) ? /* @__PURE__ */ D("a", {
|
|
53
53
|
href: e.href,
|
|
54
54
|
target: e.target,
|
|
55
55
|
rel: "noopener noreferrer",
|
|
56
56
|
"aria-current": r ? "page" : void 0,
|
|
57
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ D("span", {
|
|
58
58
|
className: "truncate",
|
|
59
59
|
children: i
|
|
60
60
|
})
|
|
61
|
-
}) : e.href ? /* @__PURE__ */
|
|
61
|
+
}) : e.href ? /* @__PURE__ */ D(k, {
|
|
62
62
|
href: e.href,
|
|
63
63
|
prefetch: "hover",
|
|
64
64
|
"aria-current": r ? "page" : void 0,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ D("span", {
|
|
66
66
|
className: "truncate",
|
|
67
67
|
children: i
|
|
68
68
|
})
|
|
69
|
-
}) : /* @__PURE__ */
|
|
69
|
+
}) : /* @__PURE__ */ D("span", {
|
|
70
70
|
className: "truncate",
|
|
71
71
|
children: i
|
|
72
72
|
})
|
|
73
73
|
}) });
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
let { t: f } =
|
|
77
|
-
return /* @__PURE__ */
|
|
75
|
+
function H({ auth: l, logoutUrl: u, csrfToken: d }) {
|
|
76
|
+
let { t: f } = C(), p = l.name.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?";
|
|
77
|
+
return /* @__PURE__ */ O(r, { children: [/* @__PURE__ */ D(c, {
|
|
78
78
|
asChild: !0,
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ D("button", {
|
|
80
80
|
type: "button",
|
|
81
81
|
className: "focus-visible:ring-ring rounded-full transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:outline-none",
|
|
82
82
|
"aria-label": l.name,
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ O(e, {
|
|
84
84
|
className: "size-8",
|
|
85
|
-
children: [l.avatarUrl ? /* @__PURE__ */
|
|
85
|
+
children: [l.avatarUrl ? /* @__PURE__ */ D(n, {
|
|
86
86
|
src: l.avatarUrl,
|
|
87
87
|
alt: l.name
|
|
88
|
-
}) : null, /* @__PURE__ */
|
|
88
|
+
}) : null, /* @__PURE__ */ D(t, {
|
|
89
89
|
className: "text-xs",
|
|
90
90
|
children: p
|
|
91
91
|
})]
|
|
92
92
|
})
|
|
93
93
|
})
|
|
94
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ O(i, {
|
|
95
95
|
align: "end",
|
|
96
96
|
className: "w-56",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ D(o, { children: /* @__PURE__ */ O("div", {
|
|
98
98
|
className: "flex min-w-0 flex-col",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ D("span", {
|
|
100
100
|
className: "truncate text-sm font-medium",
|
|
101
101
|
children: l.name
|
|
102
|
-
}), l.email ? /* @__PURE__ */
|
|
102
|
+
}), l.email ? /* @__PURE__ */ D("span", {
|
|
103
103
|
className: "text-muted-foreground truncate text-xs font-normal",
|
|
104
104
|
children: l.email
|
|
105
105
|
}) : null]
|
|
106
|
-
}) }), u ? /* @__PURE__ */
|
|
106
|
+
}) }), u ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(s, {}), /* @__PURE__ */ D(a, {
|
|
107
107
|
className: "text-destructive focus:text-destructive",
|
|
108
|
-
onSelect: () =>
|
|
108
|
+
onSelect: () => j.post(u, d ? { _token: d } : {}),
|
|
109
109
|
children: f("middag.ui.auth.sign_out")
|
|
110
110
|
})] }) : null]
|
|
111
111
|
})] });
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
let { t } =
|
|
113
|
+
function U({ children: e, titleAs: t = "h1", skipLink: n = !0 }) {
|
|
114
|
+
let { t: r } = C(), { props: i } = A(), a = R(), o = i.navigation ?? z, s = i.contract?.page ?? {
|
|
115
115
|
key: "unknown",
|
|
116
116
|
title: "",
|
|
117
117
|
breadcrumbs: [],
|
|
118
118
|
actions: []
|
|
119
|
-
},
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
119
|
+
}, c = i.auth, g = s.actions ?? [], _ = c?.logoutUrl ?? i.logoutUrl, T = i.csrf_token;
|
|
120
|
+
return /* @__PURE__ */ O(v, { children: [
|
|
121
|
+
n && /* @__PURE__ */ D("a", {
|
|
122
|
+
href: "#middag-main-content",
|
|
123
|
+
"data-slot": "skip-link",
|
|
124
|
+
className: "bg-background text-foreground focus-visible:ring-ring rounded-md px-3 py-2 text-sm font-medium shadow-md focus-visible:ring-2 focus-visible:outline-none",
|
|
125
|
+
children: r("middag.ui.shell.skip_to_content")
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ O(l, {
|
|
122
128
|
collapsible: "offcanvas",
|
|
123
129
|
className: "border-sidebar-border bg-sidebar border-r",
|
|
124
130
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ D(m, {
|
|
126
132
|
className: "border-sidebar-border border-b px-4 py-3",
|
|
127
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ D("span", {
|
|
128
134
|
className: "text-sidebar-foreground text-sm font-semibold",
|
|
129
135
|
children: "MIDDAG"
|
|
130
136
|
})
|
|
131
137
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ O(u, { children: [(o.tree ?? []).map((e) => e.children?.length ? /* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D(p, { children: S(e.label, r) }), /* @__PURE__ */ D(h, { children: e.children.map((e) => /* @__PURE__ */ D(V, {
|
|
133
139
|
node: e,
|
|
134
|
-
activeKey:
|
|
135
|
-
}, e.key)) })] }, e.key) : /* @__PURE__ */
|
|
140
|
+
activeKey: o.activeKey
|
|
141
|
+
}, e.key)) })] }, e.key) : /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(h, { children: /* @__PURE__ */ D(V, {
|
|
136
142
|
node: e,
|
|
137
|
-
activeKey:
|
|
138
|
-
}) }) }, e.key)), (
|
|
143
|
+
activeKey: o.activeKey
|
|
144
|
+
}) }) }, e.key)), (o.footer ?? []).length > 0 && /* @__PURE__ */ D(f, {
|
|
139
145
|
className: "mt-auto",
|
|
140
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ D(h, { children: (o.footer ?? []).map((e) => /* @__PURE__ */ D(V, {
|
|
141
147
|
node: e,
|
|
142
|
-
activeKey:
|
|
148
|
+
activeKey: o.activeKey
|
|
143
149
|
}, e.key)) })
|
|
144
150
|
})] }),
|
|
145
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ D(d, {
|
|
146
152
|
className: "border-sidebar-border border-t px-3 py-2",
|
|
147
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ O("button", {
|
|
148
154
|
type: "button",
|
|
149
|
-
onClick: () =>
|
|
155
|
+
onClick: () => b(a ? "light" : "dark"),
|
|
150
156
|
className: "text-muted-foreground hover:bg-sidebar-hover hover:text-sidebar-foreground flex items-center gap-2 rounded-md px-2 py-1.5 text-xs transition-colors",
|
|
151
|
-
"aria-label":
|
|
152
|
-
children: [/* @__PURE__ */
|
|
157
|
+
"aria-label": r("middag.ui.appearance.toggle"),
|
|
158
|
+
children: [/* @__PURE__ */ D("svg", {
|
|
153
159
|
viewBox: "0 0 24 24",
|
|
154
160
|
fill: "none",
|
|
155
161
|
stroke: "currentColor",
|
|
156
162
|
strokeWidth: 2,
|
|
157
163
|
className: "h-4 w-4",
|
|
158
|
-
children:
|
|
164
|
+
children: a ? /* @__PURE__ */ D("circle", {
|
|
159
165
|
cx: "12",
|
|
160
166
|
cy: "12",
|
|
161
167
|
r: "5"
|
|
162
|
-
}) : /* @__PURE__ */
|
|
163
|
-
}), /* @__PURE__ */
|
|
168
|
+
}) : /* @__PURE__ */ D("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z" })
|
|
169
|
+
}), /* @__PURE__ */ D("span", { children: r(a ? "middag.ui.appearance.light" : "middag.ui.appearance.dark") })]
|
|
164
170
|
})
|
|
165
171
|
})
|
|
166
172
|
]
|
|
167
173
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
className: "
|
|
177
|
-
children:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
174
|
+
/* @__PURE__ */ O("div", {
|
|
175
|
+
"data-slot": "sidebar-inset",
|
|
176
|
+
className: "bg-background relative flex w-full flex-1 flex-col",
|
|
177
|
+
children: [/* @__PURE__ */ O("header", {
|
|
178
|
+
className: "border-border flex h-14 shrink-0 items-center gap-3 border-b px-4",
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ D(y, { className: "text-muted-foreground hover:text-foreground" }),
|
|
181
|
+
/* @__PURE__ */ O("div", {
|
|
182
|
+
className: "flex min-w-0 flex-col",
|
|
183
|
+
children: [s.breadcrumbs && s.breadcrumbs.length > 0 && /* @__PURE__ */ D("nav", {
|
|
184
|
+
"aria-label": "Breadcrumb",
|
|
185
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs",
|
|
186
|
+
children: s.breadcrumbs.map((e, t) => /* @__PURE__ */ O("span", {
|
|
187
|
+
className: "flex items-center gap-1",
|
|
188
|
+
children: [t > 0 && /* @__PURE__ */ D("span", {
|
|
189
|
+
"aria-hidden": "true",
|
|
190
|
+
children: "/"
|
|
191
|
+
}), e.href ? /* @__PURE__ */ D(k, {
|
|
192
|
+
href: e.href,
|
|
193
|
+
className: "hover:text-foreground truncate",
|
|
194
|
+
children: S(e.label, r)
|
|
195
|
+
}) : /* @__PURE__ */ D("span", {
|
|
196
|
+
className: "truncate",
|
|
197
|
+
children: S(e.label, r)
|
|
198
|
+
})]
|
|
199
|
+
}, `${e.label}-${t}`))
|
|
200
|
+
}), s.title && /* @__PURE__ */ D("div", {
|
|
201
|
+
className: "text-foreground min-w-0 text-sm font-medium",
|
|
202
|
+
children: /* @__PURE__ */ D(t, {
|
|
203
|
+
"data-slot": "page-title",
|
|
187
204
|
className: "truncate",
|
|
188
|
-
children:
|
|
189
|
-
})
|
|
190
|
-
}
|
|
191
|
-
}),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
})] }),
|
|
212
|
-
/* @__PURE__ */ O(S, {
|
|
205
|
+
children: S(s.title, r)
|
|
206
|
+
})
|
|
207
|
+
})]
|
|
208
|
+
}),
|
|
209
|
+
(g.length > 0 || c?.name) && /* @__PURE__ */ O("div", {
|
|
210
|
+
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
211
|
+
children: [g.map((e, t) => /* @__PURE__ */ D(w, { action: e }, e.id ?? t)), c?.name ? /* @__PURE__ */ D(H, {
|
|
212
|
+
auth: c,
|
|
213
|
+
logoutUrl: _,
|
|
214
|
+
csrfToken: T
|
|
215
|
+
}) : null]
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
}), /* @__PURE__ */ D("main", {
|
|
219
|
+
id: "middag-main-content",
|
|
220
|
+
tabIndex: -1,
|
|
221
|
+
className: "flex min-h-0 flex-1 flex-col overflow-auto focus:outline-none",
|
|
222
|
+
"aria-live": "polite",
|
|
223
|
+
"aria-busy": "false",
|
|
224
|
+
children: e
|
|
225
|
+
})]
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ D(x, {
|
|
213
228
|
position: "bottom-right",
|
|
214
229
|
richColors: !0
|
|
215
230
|
})
|
|
216
231
|
] });
|
|
217
232
|
}
|
|
218
233
|
//#endregion
|
|
219
|
-
export {
|
|
234
|
+
export { U as BasicShell };
|