@xenide-io/the-old-ui-theme 0.5.2 → 0.5.3
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/README.md +47 -34
- package/dist/{chunk-RZXHZWUB.mjs → chunk-VFTZXPXM.mjs} +30 -143
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -143
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +19 -14
- package/dist/suite.d.ts +19 -14
- package/dist/suite.js +168 -96
- package/dist/suite.mjs +168 -96
- package/dist/ui.js +30 -143
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/src/app/globals.css +1 -0
- package/src/components/ui/ThemeSwitcher.tsx +12 -3
- package/src/styles/suite-skin.css +71 -1
- package/src/styles/themes.css +445 -1656
- package/src/suite/components/suite-app-layout.tsx +31 -10
- package/src/suite/components/suite-sidebar.tsx +50 -42
- package/src/suite/components/suite-user-menu.tsx +48 -26
- package/src/suite/components/today-page-frame.tsx +1 -1
- package/src/suite/icons/app-accents.ts +38 -43
- package/src/suite/icons/glyph-parts.tsx +16 -9
- package/src/suite/icons/glyphs.ts +130 -99
- package/src/suite/lib/apps.ts +1 -1
- package/src/suite/lib/use-sidebar-width.ts +23 -8
package/dist/suite.js
CHANGED
|
@@ -386,10 +386,10 @@ var APP_ACCENTS = {
|
|
|
386
386
|
},
|
|
387
387
|
nakama: {
|
|
388
388
|
label: "Nakama",
|
|
389
|
-
accent: "#
|
|
390
|
-
tile: "#
|
|
391
|
-
onTile: "#
|
|
392
|
-
onTileAccent: "#
|
|
389
|
+
accent: "#b8eb44",
|
|
390
|
+
tile: "#17101f",
|
|
391
|
+
onTile: "#fff2e2",
|
|
392
|
+
onTileAccent: "#f54b87"
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
var APP_GLYPHS = {
|
|
@@ -398,7 +398,7 @@ var APP_GLYPHS = {
|
|
|
398
398
|
kraken: "squid-doc",
|
|
399
399
|
shellstack: "stack-hex",
|
|
400
400
|
crew: "crew-bot",
|
|
401
|
-
nakama: "
|
|
401
|
+
nakama: "nakama-fist"
|
|
402
402
|
};
|
|
403
403
|
|
|
404
404
|
// src/suite/icons/glyph-parts.tsx
|
|
@@ -408,7 +408,15 @@ function GlyphElement({ element }) {
|
|
|
408
408
|
const stroke = element.filled ? "none" : void 0;
|
|
409
409
|
switch (element.kind) {
|
|
410
410
|
case "path":
|
|
411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
412
|
+
"path",
|
|
413
|
+
{
|
|
414
|
+
d: element.d,
|
|
415
|
+
fill,
|
|
416
|
+
stroke,
|
|
417
|
+
transform: element.transform
|
|
418
|
+
}
|
|
419
|
+
);
|
|
412
420
|
case "circle":
|
|
413
421
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
414
422
|
"circle",
|
|
@@ -513,6 +521,24 @@ var SUITE_GLYPHS = {
|
|
|
513
521
|
{ kind: "path", d: "M9.6 14.6q2.4 1.7 4.8 0", accent: true }
|
|
514
522
|
]
|
|
515
523
|
},
|
|
524
|
+
"nakama-fist": {
|
|
525
|
+
description: "Nakama \u2014 raised fist with neon crew signal lines",
|
|
526
|
+
elements: [
|
|
527
|
+
{
|
|
528
|
+
kind: "path",
|
|
529
|
+
d: "M192 0c17.7 0 32 14.3 32 32v112h-64V32c0-17.7 14.3-32 32-32zM64 64c0-17.7-32-32 32-32s32 14.3 32 32v80H64V64zm192 0c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 17.7-14.3 32-32 32s-32-14.3-32-32V64zm96 64c0-17.7 14.3-32 32-32s32 14.3 32 32v64c0 17.7-14.3 32-32 32s-32-14.3-32-32v-64zm-96 88v-.6c9.4 5.4 20.3 8.6 32 8.6 13.2 0 25.4-4 35.6-10.8 8.7 24.9 32.5 42.8 60.4 42.8 11.7 0 22.6-3.1 32-8.6v8.6c0 52.3-25.1 98.8-64 128v96c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32v-78.4c-17.3-7.9-33.2-18.8-46.9-32.5L69.5 357.5C45.5 333.5 32 300.9 32 267v-27c0-35.3 28.7-64 64-64h88c22.1 0 40 17.9 40 40s-17.9 40-40 40h-56c-8.8 0-16 7.2-16 16s7.2 16 16 16h56c39.8 0 72-32.2 72-72z",
|
|
530
|
+
filled: true,
|
|
531
|
+
transform: "translate(2.5 1.75) scale(.0425 .0375)"
|
|
532
|
+
},
|
|
533
|
+
{ kind: "path", d: "M7 18h3.5M12.2 18h3M8.5 19.5h6", accent: true },
|
|
534
|
+
{
|
|
535
|
+
kind: "path",
|
|
536
|
+
d: "M4.8 5.8h2.7M4.8 7.4h1.4M18.5 17.1h1.7",
|
|
537
|
+
accent: true
|
|
538
|
+
},
|
|
539
|
+
{ kind: "circle", cx: 18.5, cy: 4.5, r: 0.8, accent: true, filled: true }
|
|
540
|
+
]
|
|
541
|
+
},
|
|
516
542
|
workspace: {
|
|
517
543
|
description: "Workspace container \u2014 panel with header bar and content",
|
|
518
544
|
elements: [
|
|
@@ -526,7 +552,15 @@ var SUITE_GLYPHS = {
|
|
|
526
552
|
organisation: {
|
|
527
553
|
description: "Organisation chart \u2014 root node with two members",
|
|
528
554
|
elements: [
|
|
529
|
-
{
|
|
555
|
+
{
|
|
556
|
+
kind: "rect",
|
|
557
|
+
x: 9.5,
|
|
558
|
+
y: 3.5,
|
|
559
|
+
width: 5,
|
|
560
|
+
height: 5,
|
|
561
|
+
rx: 1.4,
|
|
562
|
+
accent: true
|
|
563
|
+
},
|
|
530
564
|
{ kind: "path", d: "M12 8.5v2.5" },
|
|
531
565
|
{ kind: "path", d: "M6.75 13.5v-2.5h10.5v2.5" },
|
|
532
566
|
{ kind: "rect", x: 4.25, y: 13.5, width: 5, height: 5, rx: 1.4 },
|
|
@@ -570,7 +604,10 @@ var SUITE_GLYPHS = {
|
|
|
570
604
|
"bell-wave": {
|
|
571
605
|
description: "Notifications \u2014 bell with sound waves",
|
|
572
606
|
elements: [
|
|
573
|
-
{
|
|
607
|
+
{
|
|
608
|
+
kind: "path",
|
|
609
|
+
d: "M7 9.2a5 5 0 0 1 10 0c0 5.3 2.4 7.3 2.4 7.3H4.6S7 14.5 7 9.2"
|
|
610
|
+
},
|
|
574
611
|
{ kind: "path", d: "M10.7 19.3a1.5 1.5 0 0 0 2.6 0" },
|
|
575
612
|
{ kind: "path", d: "M17.9 6.4a5.5 5.5 0 0 1 1.4 3.7", accent: true },
|
|
576
613
|
{ kind: "path", d: "M15.7 4a9.4 9.4 0 0 1 2.4 6", accent: true }
|
|
@@ -2205,23 +2242,24 @@ function SuiteUserMenu({
|
|
|
2205
2242
|
settingsHref,
|
|
2206
2243
|
onSignOut,
|
|
2207
2244
|
fallbackInitials,
|
|
2245
|
+
showSignOutAction = false,
|
|
2208
2246
|
dataTest = "suite-user-menu",
|
|
2209
2247
|
className
|
|
2210
2248
|
}) {
|
|
2211
2249
|
const router = (0, import_navigation2.useRouter)();
|
|
2212
2250
|
const initials = fallbackInitials != null ? fallbackInitials : computeInitials(name, email);
|
|
2213
|
-
const avatar = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-flex h-11 w-11 items-center justify-center rounded-full transition-colors hover:bg-ph-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2251
|
+
const avatar = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-flex h-11 w-11 items-center justify-center rounded-full ring-2 ring-ph-border ring-offset-1 ring-offset-ph-canvas transition-colors hover:bg-ph-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2214
2252
|
import_image2.default,
|
|
2215
2253
|
{
|
|
2216
2254
|
src: image,
|
|
2217
2255
|
alt: "",
|
|
2218
|
-
width:
|
|
2219
|
-
height:
|
|
2220
|
-
className: "h-
|
|
2256
|
+
width: 40,
|
|
2257
|
+
height: 40,
|
|
2258
|
+
className: "h-10 w-10 rounded-full object-cover",
|
|
2221
2259
|
unoptimized: true
|
|
2222
2260
|
}
|
|
2223
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex h-
|
|
2224
|
-
|
|
2261
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-ph-muted text-sm font-semibold text-ph-brand", children: initials }) });
|
|
2262
|
+
const accountMenu = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2225
2263
|
DropdownMenu,
|
|
2226
2264
|
{
|
|
2227
2265
|
trigger: avatar,
|
|
@@ -2231,7 +2269,7 @@ function SuiteUserMenu({
|
|
|
2231
2269
|
sideOffset: 6,
|
|
2232
2270
|
collisionPadding: 16,
|
|
2233
2271
|
modal: false,
|
|
2234
|
-
className,
|
|
2272
|
+
className: showSignOutAction ? void 0 : className,
|
|
2235
2273
|
"data-test": dataTest,
|
|
2236
2274
|
children: [
|
|
2237
2275
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "px-2 py-1.5", children: [
|
|
@@ -2250,20 +2288,31 @@ function SuiteUserMenu({
|
|
|
2250
2288
|
]
|
|
2251
2289
|
}
|
|
2252
2290
|
),
|
|
2253
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
onClick: onSignOut,
|
|
2258
|
-
children: [
|
|
2259
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_iconoir_react6.LogOut, { className: "h-4 w-4 text-ph-mutedtext", "aria-hidden": true }),
|
|
2260
|
-
"Sign out"
|
|
2261
|
-
]
|
|
2262
|
-
}
|
|
2263
|
-
)
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownItem, { "data-test": `${dataTest}-sign-out`, onClick: onSignOut, children: [
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_iconoir_react6.LogOut, { className: "h-4 w-4 text-ph-mutedtext", "aria-hidden": true }),
|
|
2293
|
+
"Sign out"
|
|
2294
|
+
] })
|
|
2264
2295
|
]
|
|
2265
2296
|
}
|
|
2266
2297
|
);
|
|
2298
|
+
if (!showSignOutAction) {
|
|
2299
|
+
return accountMenu;
|
|
2300
|
+
}
|
|
2301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2302
|
+
accountMenu,
|
|
2303
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2304
|
+
"button",
|
|
2305
|
+
{
|
|
2306
|
+
type: "button",
|
|
2307
|
+
"data-test": `${dataTest}-visible-sign-out`,
|
|
2308
|
+
title: "Sign out",
|
|
2309
|
+
"aria-label": "Sign out",
|
|
2310
|
+
className: "inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-ph-mutedtext transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ph-focus-ring",
|
|
2311
|
+
onClick: onSignOut,
|
|
2312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_iconoir_react6.LogOut, { className: "h-4 w-4", "aria-hidden": true })
|
|
2313
|
+
}
|
|
2314
|
+
)
|
|
2315
|
+
] });
|
|
2267
2316
|
}
|
|
2268
2317
|
|
|
2269
2318
|
// src/suite/components/suite-bottom-nav.tsx
|
|
@@ -2935,8 +2984,9 @@ function snapWidth(width) {
|
|
|
2935
2984
|
if (width < SIDEBAR_MIN_EXPANDED_WIDTH) return SIDEBAR_MIN_EXPANDED_WIDTH;
|
|
2936
2985
|
return Math.min(SIDEBAR_MAX_WIDTH, width);
|
|
2937
2986
|
}
|
|
2938
|
-
function useSidebarWidth(storageKey) {
|
|
2939
|
-
const
|
|
2987
|
+
function useSidebarWidth(storageKey, defaultWidth = SIDEBAR_DEFAULT_WIDTH) {
|
|
2988
|
+
const fallbackWidth = snapWidth(clampWidth(defaultWidth));
|
|
2989
|
+
const [width, setWidth] = (0, import_react11.useState)(fallbackWidth);
|
|
2940
2990
|
const [narrowViewport, setNarrowViewport] = (0, import_react11.useState)(false);
|
|
2941
2991
|
const collapsed = narrowViewport || width <= SIDEBAR_COLLAPSE_THRESHOLD;
|
|
2942
2992
|
(0, import_react11.useEffect)(() => {
|
|
@@ -2970,17 +3020,17 @@ function useSidebarWidth(storageKey) {
|
|
|
2970
3020
|
const setCollapsed = (0, import_react11.useCallback)(
|
|
2971
3021
|
(value) => {
|
|
2972
3022
|
setWidth((current) => {
|
|
2973
|
-
const next = value ? SIDEBAR_RAIL_WIDTH : current <= SIDEBAR_COLLAPSE_THRESHOLD ?
|
|
3023
|
+
const next = value ? SIDEBAR_RAIL_WIDTH : current <= SIDEBAR_COLLAPSE_THRESHOLD ? fallbackWidth : snapWidth(current);
|
|
2974
3024
|
persist(next);
|
|
2975
3025
|
return next;
|
|
2976
3026
|
});
|
|
2977
3027
|
},
|
|
2978
|
-
[persist]
|
|
3028
|
+
[fallbackWidth, persist]
|
|
2979
3029
|
);
|
|
2980
3030
|
const resetWidth = (0, import_react11.useCallback)(() => {
|
|
2981
|
-
setWidth(
|
|
2982
|
-
persist(
|
|
2983
|
-
}, [persist]);
|
|
3031
|
+
setWidth(fallbackWidth);
|
|
3032
|
+
persist(fallbackWidth);
|
|
3033
|
+
}, [fallbackWidth, persist]);
|
|
2984
3034
|
const startResize = (0, import_react11.useCallback)(
|
|
2985
3035
|
(event) => {
|
|
2986
3036
|
event.preventDefault();
|
|
@@ -3003,7 +3053,17 @@ function useSidebarWidth(storageKey) {
|
|
|
3003
3053
|
},
|
|
3004
3054
|
[persist, width]
|
|
3005
3055
|
);
|
|
3006
|
-
|
|
3056
|
+
const resizeBy = (0, import_react11.useCallback)(
|
|
3057
|
+
(delta) => {
|
|
3058
|
+
setWidth((current) => {
|
|
3059
|
+
const next = clampWidth(current + delta);
|
|
3060
|
+
persist(next);
|
|
3061
|
+
return next;
|
|
3062
|
+
});
|
|
3063
|
+
},
|
|
3064
|
+
[persist]
|
|
3065
|
+
);
|
|
3066
|
+
return { width, collapsed, setCollapsed, resetWidth, startResize, resizeBy };
|
|
3007
3067
|
}
|
|
3008
3068
|
|
|
3009
3069
|
// src/suite/lib/motion.tsx
|
|
@@ -3409,67 +3469,60 @@ function SuiteSidebar({
|
|
|
3409
3469
|
collapsed ? "px-1.5 py-2" : "p-2"
|
|
3410
3470
|
),
|
|
3411
3471
|
children: [
|
|
3412
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3413
|
-
"
|
|
3414
|
-
{
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
"span",
|
|
3437
|
-
{
|
|
3438
|
-
className: cn(
|
|
3439
|
-
"relative flex h-4 w-4 shrink-0 items-center justify-center",
|
|
3440
|
-
item.iconClassName
|
|
3441
|
-
),
|
|
3442
|
-
"aria-hidden": true,
|
|
3443
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3444
|
-
Icon,
|
|
3445
|
-
{
|
|
3446
|
-
className: "h-full w-full",
|
|
3447
|
-
strokeWidth: active ? 2 : 1.75
|
|
3448
|
-
}
|
|
3449
|
-
)
|
|
3450
|
-
}
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("nav", { "aria-label": "Pages", className: "shrink-0 space-y-0.5", children: [
|
|
3473
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("mb-3", collapsed && "flex justify-center"), children: renderNode(contextSwitcher, collapsed) }),
|
|
3474
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-0.5", children: navItems.map((item) => {
|
|
3475
|
+
const Icon = item.icon;
|
|
3476
|
+
const active = Boolean(item.active);
|
|
3477
|
+
const link = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3478
|
+
import_link2.default,
|
|
3479
|
+
{
|
|
3480
|
+
href: item.href,
|
|
3481
|
+
"data-test": "nav-link",
|
|
3482
|
+
"aria-current": active ? "page" : void 0,
|
|
3483
|
+
onClick: item.onClick,
|
|
3484
|
+
className: cn(
|
|
3485
|
+
"group relative flex items-center gap-2.5 rounded-[var(--ph-radius-app)] text-sm font-medium transition-colors",
|
|
3486
|
+
active ? "bg-ph-muted" : "text-ph-subtle hover:bg-ph-muted hover:text-ph-ink",
|
|
3487
|
+
collapsed ? "mx-auto size-10 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
|
|
3488
|
+
),
|
|
3489
|
+
children: [
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3491
|
+
"span",
|
|
3492
|
+
{
|
|
3493
|
+
className: cn(
|
|
3494
|
+
"relative flex h-4 w-4 shrink-0 items-center justify-center",
|
|
3495
|
+
item.iconClassName
|
|
3451
3496
|
),
|
|
3452
|
-
|
|
3453
|
-
|
|
3497
|
+
"aria-hidden": true,
|
|
3498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3499
|
+
Icon,
|
|
3454
3500
|
{
|
|
3455
|
-
className:
|
|
3456
|
-
|
|
3457
|
-
active ? "text-ph-ink" : "text-ph-subtle group-hover:text-ph-ink",
|
|
3458
|
-
collapsed && "sr-only"
|
|
3459
|
-
),
|
|
3460
|
-
children: item.label
|
|
3501
|
+
className: "h-full w-full",
|
|
3502
|
+
strokeWidth: active ? 2 : 1.75
|
|
3461
3503
|
}
|
|
3504
|
+
)
|
|
3505
|
+
}
|
|
3506
|
+
),
|
|
3507
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3508
|
+
"span",
|
|
3509
|
+
{
|
|
3510
|
+
className: cn(
|
|
3511
|
+
"relative truncate",
|
|
3512
|
+
active ? "text-ph-ink" : "text-ph-subtle group-hover:text-ph-ink",
|
|
3513
|
+
collapsed && "sr-only"
|
|
3462
3514
|
),
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
item.
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3515
|
+
children: item.label
|
|
3516
|
+
}
|
|
3517
|
+
),
|
|
3518
|
+
!collapsed && item.badge ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "relative ml-auto shrink-0", children: item.badge }) : null
|
|
3519
|
+
]
|
|
3520
|
+
},
|
|
3521
|
+
item.label
|
|
3522
|
+
);
|
|
3523
|
+
return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
|
|
3524
|
+
}) })
|
|
3525
|
+
] }),
|
|
3473
3526
|
secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3474
3527
|
"div",
|
|
3475
3528
|
{
|
|
@@ -3494,11 +3547,11 @@ function SuiteSidebar({
|
|
|
3494
3547
|
{
|
|
3495
3548
|
className: cn(
|
|
3496
3549
|
"flex items-center gap-2",
|
|
3497
|
-
collapsed
|
|
3550
|
+
collapsed ? "flex-col justify-center" : "min-w-0"
|
|
3498
3551
|
),
|
|
3499
3552
|
children: [
|
|
3500
3553
|
renderNode(userMenu, collapsed),
|
|
3501
|
-
|
|
3554
|
+
footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: renderNode(footerExtras, collapsed) }) : null
|
|
3502
3555
|
]
|
|
3503
3556
|
}
|
|
3504
3557
|
)
|
|
@@ -3520,6 +3573,7 @@ function SuiteAppLayout({
|
|
|
3520
3573
|
collapsed = false,
|
|
3521
3574
|
lockMainScroll = false,
|
|
3522
3575
|
onStartResize,
|
|
3576
|
+
onResizeBy,
|
|
3523
3577
|
onResetWidth,
|
|
3524
3578
|
className
|
|
3525
3579
|
}) {
|
|
@@ -3527,12 +3581,15 @@ function SuiteAppLayout({
|
|
|
3527
3581
|
"div",
|
|
3528
3582
|
{
|
|
3529
3583
|
"data-test": "app-shell",
|
|
3530
|
-
className: cn(
|
|
3584
|
+
className: cn(
|
|
3585
|
+
"suite-app-layout flex min-h-dvh lg:h-screen lg:overflow-hidden",
|
|
3586
|
+
className
|
|
3587
|
+
),
|
|
3531
3588
|
children: [
|
|
3532
3589
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3533
3590
|
"aside",
|
|
3534
3591
|
{
|
|
3535
|
-
className: "relative hidden shrink-0 flex-col overflow-
|
|
3592
|
+
className: "relative hidden shrink-0 flex-col overflow-visible border-r border-ph-border ease-out lg:flex",
|
|
3536
3593
|
style: { width: `${sidebarWidth}px` },
|
|
3537
3594
|
"data-collapsed": collapsed ? "true" : "false",
|
|
3538
3595
|
children: [
|
|
@@ -3543,9 +3600,23 @@ function SuiteAppLayout({
|
|
|
3543
3600
|
role: "separator",
|
|
3544
3601
|
"aria-orientation": "vertical",
|
|
3545
3602
|
"aria-label": "Resize sidebar",
|
|
3603
|
+
"data-test": "sidebar-resize-handle",
|
|
3604
|
+
tabIndex: onResizeBy ? 0 : void 0,
|
|
3546
3605
|
onPointerDown: onStartResize,
|
|
3547
3606
|
onDoubleClick: onResetWidth,
|
|
3548
|
-
|
|
3607
|
+
onKeyDown: (event) => {
|
|
3608
|
+
if (event.key === "Home") {
|
|
3609
|
+
event.preventDefault();
|
|
3610
|
+
onResetWidth == null ? void 0 : onResetWidth();
|
|
3611
|
+
} else if (event.key === "ArrowLeft") {
|
|
3612
|
+
event.preventDefault();
|
|
3613
|
+
onResizeBy == null ? void 0 : onResizeBy(-16);
|
|
3614
|
+
} else if (event.key === "ArrowRight") {
|
|
3615
|
+
event.preventDefault();
|
|
3616
|
+
onResizeBy == null ? void 0 : onResizeBy(16);
|
|
3617
|
+
}
|
|
3618
|
+
},
|
|
3619
|
+
className: "absolute inset-y-0 -right-1 z-10 w-2 cursor-col-resize touch-none transition-colors hover:bg-[color-mix(in_oklab,var(--ph-accent)_30%,transparent)]"
|
|
3549
3620
|
}
|
|
3550
3621
|
) : null
|
|
3551
3622
|
]
|
|
@@ -3561,6 +3632,7 @@ function SuiteAppLayout({
|
|
|
3561
3632
|
"data-lock-scroll": lockMainScroll ? "true" : void 0,
|
|
3562
3633
|
className: cn(
|
|
3563
3634
|
"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overscroll-contain bg-ph-canvas focus:outline-none",
|
|
3635
|
+
"suite-app-layout__main",
|
|
3564
3636
|
lockMainScroll ? "overflow-hidden" : "overflow-y-auto"
|
|
3565
3637
|
),
|
|
3566
3638
|
children
|