@slotted/react 0.1.0-beta.16 → 0.1.0-beta.18
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/{app-shell-CJwXBvE5.js → app-shell-CXlO6z0w.js} +90 -73
- package/dist/app-shell.js +1 -1
- package/dist/dashboard-grid-z3nKqvN8.js +1149 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{description-list-KjUs1muC.js → description-list-BbWLehw0.js} +18 -16
- package/dist/description-list.js +1 -1
- package/dist/{detail-panel-BNfYQJfv.js → detail-panel-DYe_D46K.js} +2 -2
- package/dist/detail-panel.js +1 -1
- package/dist/docs/alert.json +1 -1
- package/dist/docs/alert.md +1 -1
- package/dist/docs/app-shell.json +19 -2
- package/dist/docs/app-shell.md +3 -1
- package/dist/docs/dashboard-grid.json +5 -5
- package/dist/docs/dashboard-grid.md +4 -4
- package/dist/docs/description-list.json +10 -2
- package/dist/docs/description-list.md +2 -1
- package/dist/docs/guidelines/composition.md +12 -0
- package/dist/docs/guidelines/errors-and-conflicts.md +7 -6
- package/dist/docs/guidelines/index.md +3 -0
- package/dist/docs/guidelines/layout-alignment.md +2 -2
- package/dist/docs/guidelines/overviews.md +21 -1
- package/dist/docs/guidelines/reading-permissions.md +2 -2
- package/dist/docs/guidelines/reports.md +1 -1
- package/dist/docs/index.md +2 -2
- package/dist/docs/inline-message.json +5 -4
- package/dist/docs/inline-message.md +6 -5
- package/dist/docs/page.json +2 -2
- package/dist/docs/page.md +1 -1
- package/dist/docs/skills/compose-screen/SKILL.md +10 -1
- package/dist/docs/skills/review-screen/SKILL.md +22 -20
- package/dist/docs/stat-card.json +7 -4
- package/dist/docs/stat-card.md +4 -4
- package/dist/index.js +63 -63
- package/dist/{page-CwYmBoZQ.js → page-CzqbnTnU.js} +56 -56
- package/dist/{page-header-BgYXPEbd.js → page-header-TejJ-BTC.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/page.js +2 -2
- package/dist/{side-navigation-DRLWTlJ4.js → side-navigation-CvIGfGjZ.js} +1 -1
- package/dist/side-navigation.js +1 -1
- package/dist/stat-card-Dv9oJAbF.js +252 -0
- package/dist/stat-card.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/description-list.css +1 -1
- package/dist/styles/index.css +4 -4
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/stat-card.css +3 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{top-navigation-B_oQgy56.js → top-navigation-D_Jt0jNw.js} +1 -1
- package/dist/top-navigation.js +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts +2 -2
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/chart/chart.types.d.ts +10 -6
- package/dist/types/chart/chart.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid-context.d.ts +14 -1
- package/dist/types/dashboard-grid/dashboard-grid-context.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +6 -2
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts +2 -1
- package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts.map +1 -1
- package/dist/types/description-list/description-list-defaults.d.ts.map +1 -1
- package/dist/types/description-list/description-list.d.ts +1 -1
- package/dist/types/description-list/description-list.d.ts.map +1 -1
- package/dist/types/description-list/description-list.types.d.ts +7 -0
- package/dist/types/description-list/description-list.types.d.ts.map +1 -1
- package/dist/types/description-list/index.d.ts +1 -1
- package/dist/types/description-list/index.d.ts.map +1 -1
- package/dist/types/inline-message/inline-message.d.ts +2 -2
- package/dist/types/inline-message/inline-message.types.d.ts +2 -2
- package/dist/types/page/index.d.ts +1 -1
- package/dist/types/page/index.d.ts.map +1 -1
- package/dist/types/page/page.d.ts +6 -0
- package/dist/types/page/page.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card-parts.d.ts +7 -3
- package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/dashboard-grid-ByThIV_n.js +0 -1066
- package/dist/stat-card-CUISfM36.js +0 -247
|
@@ -8,12 +8,12 @@ import { createContext as u, isValidElement as d, useCallback as f, useContext a
|
|
|
8
8
|
import { Fragment as ee, jsx as x, jsxs as te } from "react/jsx-runtime";
|
|
9
9
|
import { createPresence as ne } from "@slotted/core/presence";
|
|
10
10
|
import { appShellMessages as re } from "@slotted/core/i18n";
|
|
11
|
-
import { setPortalContainer as
|
|
12
|
-
import { createDismissableLayer as
|
|
13
|
-
import { EXTENT_LARGE_STEP_PX as
|
|
14
|
-
import { COMPACT_BELOW as
|
|
11
|
+
import { setPortalContainer as S } from "@slotted/core/portal";
|
|
12
|
+
import { createDismissableLayer as ie } from "@slotted/core/dismissable-layer";
|
|
13
|
+
import { EXTENT_LARGE_STEP_PX as ae, EXTENT_STEP_PX as oe, anchorsAtStart as se, extentAtPoint as ce, holdResizeGesture as le, stepAmountFromPixels as ue, stepExtent as de } from "@slotted/core/extent";
|
|
14
|
+
import { COMPACT_BELOW as fe, clamp as C, createWidthGate as pe } from "@slotted/core/measure";
|
|
15
15
|
//#region src/app-shell/app-shell-defaults.tsx
|
|
16
|
-
var
|
|
16
|
+
var me = u({
|
|
17
17
|
asideMode: "auto",
|
|
18
18
|
asideSize: "md",
|
|
19
19
|
canvas: "inset",
|
|
@@ -30,12 +30,12 @@ var he = u({
|
|
|
30
30
|
scroll: "content",
|
|
31
31
|
separation: "rule"
|
|
32
32
|
});
|
|
33
|
-
function
|
|
34
|
-
return p(
|
|
33
|
+
function w() {
|
|
34
|
+
return p(me);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
let n =
|
|
38
|
-
return /* @__PURE__ */ x(
|
|
36
|
+
function he({ children: e, ...t }) {
|
|
37
|
+
let n = w();
|
|
38
|
+
return /* @__PURE__ */ x(me.Provider, {
|
|
39
39
|
value: {
|
|
40
40
|
asideMode: t.asideMode ?? n.asideMode,
|
|
41
41
|
asideSize: t.asideSize ?? n.asideSize,
|
|
@@ -58,7 +58,7 @@ function ge({ children: e, ...t }) {
|
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/app-shell/app-shell-parts.tsx
|
|
61
|
-
function
|
|
61
|
+
function T(e, t) {
|
|
62
62
|
let n = L();
|
|
63
63
|
return f((r) => {
|
|
64
64
|
n.nodes[e] = r, typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
@@ -68,12 +68,12 @@ function w(e, t) {
|
|
|
68
68
|
e
|
|
69
69
|
]);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function E(e) {
|
|
72
72
|
return f((t) => {
|
|
73
73
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
74
74
|
}, [e]);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ge(e) {
|
|
77
77
|
let t = L();
|
|
78
78
|
m(() => t.register(e), [e, t]);
|
|
79
79
|
}
|
|
@@ -81,7 +81,7 @@ function D(e, t) {
|
|
|
81
81
|
return t === void 0 ? null : t(e);
|
|
82
82
|
}
|
|
83
83
|
function _e({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
84
|
-
let s =
|
|
84
|
+
let s = T("banner", n), c = o({
|
|
85
85
|
...a,
|
|
86
86
|
children: e,
|
|
87
87
|
className: t,
|
|
@@ -103,7 +103,7 @@ function ve({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
103
103
|
className: t,
|
|
104
104
|
"data-part": "brand",
|
|
105
105
|
style: i
|
|
106
|
-
}), c =
|
|
106
|
+
}), c = E(n);
|
|
107
107
|
return D({
|
|
108
108
|
...s,
|
|
109
109
|
ref: c
|
|
@@ -119,7 +119,7 @@ function ye({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
119
119
|
className: t,
|
|
120
120
|
"data-part": "centre",
|
|
121
121
|
style: i
|
|
122
|
-
}), c =
|
|
122
|
+
}), c = E(n);
|
|
123
123
|
return D({
|
|
124
124
|
...s,
|
|
125
125
|
ref: c
|
|
@@ -135,7 +135,7 @@ function be({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
135
135
|
className: t,
|
|
136
136
|
"data-part": "actions",
|
|
137
137
|
style: i
|
|
138
|
-
}), c =
|
|
138
|
+
}), c = E(n);
|
|
139
139
|
return D({
|
|
140
140
|
...s,
|
|
141
141
|
ref: c
|
|
@@ -145,8 +145,8 @@ function be({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function xe({ "aria-label": e, children: t, className: n, id: r, ref: i, render: a, style: s, ...c }) {
|
|
148
|
-
let l = L(), u =
|
|
149
|
-
|
|
148
|
+
let l = L(), u = T("nav", i);
|
|
149
|
+
ge("nav");
|
|
150
150
|
let d = o({
|
|
151
151
|
...c,
|
|
152
152
|
"aria-label": e ?? l.t("nav"),
|
|
@@ -171,7 +171,7 @@ function Se({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
171
171
|
className: t,
|
|
172
172
|
"data-part": "nav-rail",
|
|
173
173
|
style: i
|
|
174
|
-
}), c =
|
|
174
|
+
}), c = E(n);
|
|
175
175
|
return D({
|
|
176
176
|
...s,
|
|
177
177
|
ref: c
|
|
@@ -187,7 +187,7 @@ function Ce({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
187
187
|
className: t,
|
|
188
188
|
"data-part": "nav-header",
|
|
189
189
|
style: i
|
|
190
|
-
}), c =
|
|
190
|
+
}), c = E(n);
|
|
191
191
|
return D({
|
|
192
192
|
...s,
|
|
193
193
|
ref: c
|
|
@@ -203,7 +203,7 @@ function we({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
203
203
|
className: t,
|
|
204
204
|
"data-part": "nav-body",
|
|
205
205
|
style: i
|
|
206
|
-
}), c =
|
|
206
|
+
}), c = E(n);
|
|
207
207
|
return D({
|
|
208
208
|
...s,
|
|
209
209
|
ref: c
|
|
@@ -219,7 +219,7 @@ function Te({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
219
219
|
className: t,
|
|
220
220
|
"data-part": "nav-footer",
|
|
221
221
|
style: i
|
|
222
|
-
}), c =
|
|
222
|
+
}), c = E(n);
|
|
223
223
|
return D({
|
|
224
224
|
...s,
|
|
225
225
|
ref: c
|
|
@@ -229,8 +229,8 @@ function Te({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
function O({ children: e, className: t, id: n, ref: r, render: i, style: a, ...s }) {
|
|
232
|
-
let c = L(), l =
|
|
233
|
-
|
|
232
|
+
let c = L(), l = T("main", r);
|
|
233
|
+
ge("main");
|
|
234
234
|
let u = o({
|
|
235
235
|
...c.busy ? { "aria-busy": !0 } : {},
|
|
236
236
|
...s,
|
|
@@ -272,8 +272,8 @@ function k({ delay: e, label: t, loading: n = !0, minDuration: o, onWithdraw: s,
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
function A({ "aria-label": e, children: t, className: n, id: r, ref: i, render: a, style: s, ...c }) {
|
|
275
|
-
let l = L(), u =
|
|
276
|
-
|
|
275
|
+
let l = L(), u = T("aside", i);
|
|
276
|
+
ge("aside");
|
|
277
277
|
let d = l.asideExtent, f = o({
|
|
278
278
|
...c,
|
|
279
279
|
"aria-label": e ?? l.t("aside"),
|
|
@@ -302,7 +302,7 @@ function Ee({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
302
302
|
className: t,
|
|
303
303
|
"data-part": "aside-header",
|
|
304
304
|
style: i
|
|
305
|
-
}), c =
|
|
305
|
+
}), c = E(n);
|
|
306
306
|
return D({
|
|
307
307
|
...s,
|
|
308
308
|
ref: c
|
|
@@ -319,7 +319,7 @@ function De({ children: e, className: t, inset: n, ref: r, render: i, style: a,
|
|
|
319
319
|
...n === void 0 ? {} : { "data-inset": n },
|
|
320
320
|
"data-part": "aside-body",
|
|
321
321
|
style: a
|
|
322
|
-
}), l =
|
|
322
|
+
}), l = E(r);
|
|
323
323
|
return D({
|
|
324
324
|
...c,
|
|
325
325
|
ref: l
|
|
@@ -344,12 +344,12 @@ function M(e) {
|
|
|
344
344
|
}
|
|
345
345
|
var N = 3;
|
|
346
346
|
function ke({ "aria-label": e, className: t, onKeyDown: n, onPointerDown: r, ref: i, render: a, style: s, ...c }) {
|
|
347
|
-
let l = L(), u = y(null), d = y(null), f = y(null), [p, h] = b(void 0), g = l.navSide === "end" ? "start" : "end", _ = l.asideMode === "inline" && l.asideOpen, { asideExtent: v, nodes:
|
|
347
|
+
let l = L(), u = y(null), d = y(null), f = y(null), [p, h] = b(void 0), g = l.navSide === "end" ? "start" : "end", _ = l.asideMode === "inline" && l.asideOpen, { asideExtent: v, nodes: ne, root: re } = l;
|
|
348
348
|
if (j(() => {
|
|
349
|
-
let e =
|
|
349
|
+
let e = ne.aside;
|
|
350
350
|
if (!_ || v !== void 0 || e === null) return;
|
|
351
351
|
let t = () => {
|
|
352
|
-
let t = M(
|
|
352
|
+
let t = M(re);
|
|
353
353
|
if (t === null || t.width <= 0) return h(void 0);
|
|
354
354
|
h(e.getBoundingClientRect().width / t.width);
|
|
355
355
|
};
|
|
@@ -358,11 +358,11 @@ function ke({ "aria-label": e, className: t, onKeyDown: n, onPointerDown: r, ref
|
|
|
358
358
|
return n.observe(e), () => n.disconnect();
|
|
359
359
|
}, [
|
|
360
360
|
v,
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
ne,
|
|
362
|
+
re,
|
|
363
363
|
_
|
|
364
364
|
]), m(() => () => f.current?.(), []), !_) return null;
|
|
365
|
-
let
|
|
365
|
+
let S = C(l.asideExtent ?? p ?? l.minAsideExtent, l.minAsideExtent, l.maxAsideExtent), ie = (e) => Math.round(C(e, 0, 1) * 100), fe = (e, t) => ce({
|
|
366
366
|
point: {
|
|
367
367
|
x: e.clientX,
|
|
368
368
|
y: e.clientY
|
|
@@ -370,41 +370,41 @@ function ke({ "aria-label": e, className: t, onKeyDown: n, onPointerDown: r, ref
|
|
|
370
370
|
rect: t,
|
|
371
371
|
rtl: Oe(u.current),
|
|
372
372
|
side: g
|
|
373
|
-
}),
|
|
373
|
+
}), pe = (e) => {
|
|
374
374
|
if (r?.(e), e.defaultPrevented || e.button !== 0) return;
|
|
375
375
|
let t = M(l.root);
|
|
376
376
|
t === null || t.width <= 0 || (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), e.currentTarget.focus(), d.current = {
|
|
377
377
|
moved: !1,
|
|
378
|
-
offset:
|
|
378
|
+
offset: S - fe(e, t),
|
|
379
379
|
x: e.clientX
|
|
380
380
|
});
|
|
381
|
-
},
|
|
381
|
+
}, me = (e) => {
|
|
382
382
|
let t = d.current;
|
|
383
383
|
if (t === null) return;
|
|
384
384
|
let n = M(l.root);
|
|
385
385
|
if (!(n === null || n.width <= 0)) {
|
|
386
386
|
if (!t.moved) {
|
|
387
387
|
if (Math.abs(e.clientX - t.x) < N) return;
|
|
388
|
-
t.moved = !0, f.current?.(), f.current =
|
|
388
|
+
t.moved = !0, f.current?.(), f.current = le(u.current?.ownerDocument, "col-resize"), l.setAsideDragging(!0);
|
|
389
389
|
}
|
|
390
|
-
l.setAsideExtent(
|
|
390
|
+
l.setAsideExtent(fe(e, n) + t.offset, "pointer", e);
|
|
391
391
|
}
|
|
392
|
-
},
|
|
392
|
+
}, w = (e) => {
|
|
393
393
|
let t = d.current;
|
|
394
394
|
t !== null && (d.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t.moved && (f.current?.(), f.current = null, l.setAsideDragging(!1)));
|
|
395
395
|
}, he = (e) => {
|
|
396
396
|
if (n?.(e), e.defaultPrevented) return;
|
|
397
|
-
let t =
|
|
397
|
+
let t = se(g, Oe(u.current)), r = (t) => {
|
|
398
398
|
e.preventDefault();
|
|
399
|
-
let n = M(l.root), r = n === null ? 0 :
|
|
400
|
-
pixels: e.shiftKey ?
|
|
399
|
+
let n = M(l.root), r = n === null ? 0 : ue({
|
|
400
|
+
pixels: e.shiftKey ? ae : oe,
|
|
401
401
|
rect: n,
|
|
402
402
|
side: g
|
|
403
403
|
});
|
|
404
|
-
l.setAsideExtent(
|
|
404
|
+
l.setAsideExtent(de({
|
|
405
405
|
amount: r,
|
|
406
406
|
direction: t,
|
|
407
|
-
fraction:
|
|
407
|
+
fraction: S,
|
|
408
408
|
max: l.maxAsideExtent,
|
|
409
409
|
min: l.minAsideExtent
|
|
410
410
|
}), "keyboard", e);
|
|
@@ -416,33 +416,50 @@ function ke({ "aria-label": e, className: t, onKeyDown: n, onPointerDown: r, ref
|
|
|
416
416
|
case "End": return e.preventDefault(), l.setAsideExtent(l.maxAsideExtent, "keyboard", e);
|
|
417
417
|
default: return;
|
|
418
418
|
}
|
|
419
|
-
},
|
|
419
|
+
}, T = (e) => {
|
|
420
420
|
u.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
421
|
-
},
|
|
421
|
+
}, E = o({
|
|
422
422
|
...c,
|
|
423
423
|
"aria-controls": l.asideId,
|
|
424
424
|
"aria-label": e ?? l.t("resizeAside"),
|
|
425
425
|
"aria-orientation": "vertical",
|
|
426
|
-
"aria-valuemax":
|
|
427
|
-
"aria-valuemin":
|
|
428
|
-
"aria-valuenow":
|
|
426
|
+
"aria-valuemax": ie(l.maxAsideExtent),
|
|
427
|
+
"aria-valuemin": ie(l.minAsideExtent),
|
|
428
|
+
"aria-valuenow": ie(S),
|
|
429
|
+
children: /* @__PURE__ */ te(ee, { children: [
|
|
430
|
+
/* @__PURE__ */ x("span", {
|
|
431
|
+
"aria-hidden": "true",
|
|
432
|
+
"data-part": "line",
|
|
433
|
+
"data-part-line": ""
|
|
434
|
+
}),
|
|
435
|
+
/* @__PURE__ */ x("span", {
|
|
436
|
+
"aria-hidden": "true",
|
|
437
|
+
"data-part": "grip",
|
|
438
|
+
"data-part-grip": ""
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ x("span", {
|
|
441
|
+
"aria-hidden": "true",
|
|
442
|
+
"data-part": "line",
|
|
443
|
+
"data-part-line": ""
|
|
444
|
+
})
|
|
445
|
+
] }),
|
|
429
446
|
className: t,
|
|
430
447
|
"data-part": "aside-resizer",
|
|
431
448
|
onKeyDown: he,
|
|
432
|
-
onLostPointerCapture:
|
|
433
|
-
onPointerDown:
|
|
434
|
-
onPointerMove:
|
|
435
|
-
onPointerUp:
|
|
449
|
+
onLostPointerCapture: w,
|
|
450
|
+
onPointerDown: pe,
|
|
451
|
+
onPointerMove: me,
|
|
452
|
+
onPointerUp: w,
|
|
436
453
|
role: "separator",
|
|
437
454
|
style: s,
|
|
438
455
|
tabIndex: 0
|
|
439
456
|
});
|
|
440
457
|
return a === void 0 ? /* @__PURE__ */ x("div", {
|
|
441
|
-
...
|
|
442
|
-
ref:
|
|
458
|
+
...E,
|
|
459
|
+
ref: T
|
|
443
460
|
}) : a({
|
|
444
|
-
...
|
|
445
|
-
ref:
|
|
461
|
+
...E,
|
|
462
|
+
ref: T
|
|
446
463
|
});
|
|
447
464
|
}
|
|
448
465
|
function Ae({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
@@ -452,7 +469,7 @@ function Ae({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
452
469
|
className: t,
|
|
453
470
|
"data-part": "aside-footer",
|
|
454
471
|
style: i
|
|
455
|
-
}), c =
|
|
472
|
+
}), c = E(n);
|
|
456
473
|
return D({
|
|
457
474
|
...s,
|
|
458
475
|
ref: c
|
|
@@ -462,7 +479,7 @@ function Ae({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
462
479
|
});
|
|
463
480
|
}
|
|
464
481
|
function P({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
465
|
-
let s =
|
|
482
|
+
let s = T("footer", n), c = o({
|
|
466
483
|
...a,
|
|
467
484
|
children: e,
|
|
468
485
|
className: t,
|
|
@@ -478,7 +495,7 @@ function P({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
478
495
|
});
|
|
479
496
|
}
|
|
480
497
|
function F({ "aria-controls": e, "aria-label": r, children: i, className: a, id: s, onClick: c, ref: l, render: u, style: d, type: p, ...m }) {
|
|
481
|
-
let h = L(), g =
|
|
498
|
+
let h = L(), g = T("toggle", l), _ = f((e) => {
|
|
482
499
|
if (c?.(e), e.defaultPrevented) return;
|
|
483
500
|
let t = e.detail === 0 ? "keyboard" : "pointer";
|
|
484
501
|
h.setOpen(!h.open, t, e.nativeEvent);
|
|
@@ -504,7 +521,7 @@ function F({ "aria-controls": e, "aria-label": r, children: i, className: a, id:
|
|
|
504
521
|
});
|
|
505
522
|
}
|
|
506
523
|
function I({ "aria-controls": e, "aria-label": r, children: i, className: a, id: s, onClick: c, ref: l, render: u, style: d, type: p, ...m }) {
|
|
507
|
-
let h = L(), g =
|
|
524
|
+
let h = L(), g = T("asideToggle", l), _ = f((e) => {
|
|
508
525
|
if (c?.(e), e.defaultPrevented) return;
|
|
509
526
|
let t = e.detail === 0 ? "keyboard" : "pointer";
|
|
510
527
|
h.setAsideOpen(!h.asideOpen, t, e.nativeEvent);
|
|
@@ -531,7 +548,7 @@ function I({ "aria-controls": e, "aria-label": r, children: i, className: a, id:
|
|
|
531
548
|
}
|
|
532
549
|
//#endregion
|
|
533
550
|
//#region src/app-shell/app-shell.tsx
|
|
534
|
-
var je =
|
|
551
|
+
var je = fe, Me = u(void 0);
|
|
535
552
|
function Ne(e, t) {
|
|
536
553
|
if (Array.isArray(e)) {
|
|
537
554
|
for (let n of e) Ne(n, t);
|
|
@@ -547,8 +564,8 @@ function L() {
|
|
|
547
564
|
function Pe() {
|
|
548
565
|
return p(Me);
|
|
549
566
|
}
|
|
550
|
-
function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a, children: u, className: d, closeOnNavigate: p, collapsedTo: _, defaultAsideExtent:
|
|
551
|
-
let k =
|
|
567
|
+
function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a, children: u, className: d, closeOnNavigate: p, collapsedTo: _, defaultAsideExtent: ae, defaultAsideOpen: oe, defaultNavOpen: se, escape: ce, back: le, maxAsideExtent: ue, messages: de, minAsideExtent: fe, modal: me, navMode: he, navOpen: T, navSide: E, navSize: ge, onAsideExtentChange: D, onAsideOpenChange: _e, onNavOpenChange: ve, outsidePress: ye, primary: be, ref: xe, render: Se, scroll: Ce, separation: we, style: Te, ...O }) {
|
|
568
|
+
let k = w(), A = h(), [Ee, De] = b(se ?? !0), j = T ?? Ee, [Oe, M] = b(oe ?? !0), N = r ?? Oe, [ke, Ae] = b(ae), P = t ?? ke, F = C(fe ?? .16, 0, 1), I = C(ue ?? .6, F, 1), [L, Pe] = b(!1), R = i ?? k.asideSize, Fe = n ?? k.asideMode, Ie = a ?? k.canvas, z = p ?? k.closeOnNavigate, Le = _ ?? k.collapsedTo, Re = we ?? k.separation, ze = ce ?? k.escape, Be = le ?? k.back, B = me ?? k.modal, Ve = E ?? k.navSide, He = ge ?? k.navSize, V = ye ?? k.outsidePress, Ue = be ?? k.primary, We = Ce ?? k.scroll, Ge = he ?? k.navMode, H = e(re, de), [U, Ke] = b(null), [W, qe] = b(void 0), G = Ge === "auto" ? W === void 0 ? void 0 : W ? "overlay" : "inline" : Ge, K = Fe === "auto" ? W === void 0 ? void 0 : W ? "overlay" : "inline" : Fe, q = y({
|
|
552
569
|
aside: null,
|
|
553
570
|
asideToggle: null,
|
|
554
571
|
banner: null,
|
|
@@ -575,7 +592,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
575
592
|
}))), []), Y = f((e, t, n) => {
|
|
576
593
|
if (e === j) return;
|
|
577
594
|
let r = !1, i = l({
|
|
578
|
-
controlled:
|
|
595
|
+
controlled: T,
|
|
579
596
|
initial: j,
|
|
580
597
|
onRequest: (e) => {
|
|
581
598
|
r = e.cancelled, ve?.(e.value, {
|
|
@@ -593,7 +610,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
593
610
|
r || i && De(e);
|
|
594
611
|
}, [
|
|
595
612
|
j,
|
|
596
|
-
|
|
613
|
+
T,
|
|
597
614
|
ve
|
|
598
615
|
]), X = f((e, t, n) => {
|
|
599
616
|
if (e === N) return;
|
|
@@ -619,7 +636,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
619
636
|
N,
|
|
620
637
|
_e
|
|
621
638
|
]), tt = f((e, n, r) => {
|
|
622
|
-
let i = e === void 0 ? void 0 :
|
|
639
|
+
let i = e === void 0 ? void 0 : C(e, F, I);
|
|
623
640
|
if (i === P) return;
|
|
624
641
|
let a = !1, o = l({
|
|
625
642
|
controlled: t,
|
|
@@ -650,7 +667,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
650
667
|
nt || qe(void 0);
|
|
651
668
|
return;
|
|
652
669
|
}
|
|
653
|
-
let e =
|
|
670
|
+
let e = pe(U, {
|
|
654
671
|
at: je,
|
|
655
672
|
onChange: qe
|
|
656
673
|
});
|
|
@@ -679,7 +696,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
679
696
|
let ft = f((e) => {
|
|
680
697
|
Q.current?.setNode(e);
|
|
681
698
|
}, []), pt = f((e, t, n, r) => {
|
|
682
|
-
let i =
|
|
699
|
+
let i = ie(e, {
|
|
683
700
|
...t === null ? {} : { branches: [t] },
|
|
684
701
|
back: B && Be === "close",
|
|
685
702
|
content: e,
|
|
@@ -749,7 +766,7 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
749
766
|
Y
|
|
750
767
|
]), [ht, gt] = b(null);
|
|
751
768
|
m(() => {
|
|
752
|
-
if (ht !== null) return
|
|
769
|
+
if (ht !== null) return S(ht), () => S(null, ht.ownerDocument);
|
|
753
770
|
}, [ht]), g(xe, () => ({
|
|
754
771
|
openNav: () => Y(!0, "programmatic"),
|
|
755
772
|
closeNav: () => Y(!1, "programmatic"),
|
|
@@ -901,4 +918,4 @@ function R({ asideExtent: t, asideMode: n, asideOpen: r, asideSize: i, canvas: a
|
|
|
901
918
|
});
|
|
902
919
|
}
|
|
903
920
|
//#endregion
|
|
904
|
-
export { k as C, F as S,
|
|
921
|
+
export { k as C, F as S, w as T, xe as _, be as a, Ce as b, Ae as c, I as d, _e as f, O as g, P as h, Pe as i, Ee as l, ye as m, R as n, A as o, ve as p, L as r, De as s, je as t, ke as u, we as v, he as w, Se as x, Te as y };
|
package/dist/app-shell.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./app-shell-
|
|
1
|
+
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./app-shell-CXlO6z0w.js";
|
|
2
2
|
export { y as APP_SHELL_OVERLAY_AT, m as AppShell, i as AppShellActions, h as AppShellAside, v as AppShellAsideBody, o as AppShellAsideFooter, f as AppShellAsideHeader, b as AppShellAsideResizer, s as AppShellAsideToggle, c as AppShellBanner, g as AppShellBrand, p as AppShellCentre, S as AppShellDefaultsProvider, u as AppShellFooter, l as AppShellMain, r as AppShellNav, x as AppShellNavBody, w as AppShellNavFooter, a as AppShellNavHeader, C as AppShellNavRail, t as AppShellNavToggle, e as AppShellProgress, _ as useAppShell, n as useAppShellDefaults, d as useAppShellIfPresent };
|