@lobehub/ui 6.0.0-beta.5 → 6.0.0-beta.7
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/es/ActionIcon/style.mjs +1 -1
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/ColorSwatches/ColorSwatches.mjs +17 -22
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ColorSwatches/CustomPicker.mjs +101 -0
- package/es/ColorSwatches/CustomPicker.mjs.map +1 -0
- package/es/ColorSwatches/index.d.mts +2 -2
- package/es/ColorSwatches/marker.stylex.mjs +9 -0
- package/es/ColorSwatches/marker.stylex.mjs.map +1 -0
- package/es/ColorSwatches/style.mjs +36 -0
- package/es/ColorSwatches/style.mjs.map +1 -1
- package/es/ColorSwatches/type.d.mts +11 -2
- package/es/EditableText/EditableText.mjs +1 -1
- package/es/Grid/style.mjs +1 -1
- package/es/Grid/style.mjs.map +1 -1
- package/es/Image/type.d.mts +1 -0
- package/es/Image/viewer/ImageViewer.mjs +1 -0
- package/es/Image/viewer/ImageViewer.mjs.map +1 -1
- package/es/Image/viewer/Toolbar.mjs +19 -6
- package/es/Image/viewer/Toolbar.mjs.map +1 -1
- package/es/Image/viewer/ViewerChrome.mjs.map +1 -1
- package/es/Input/style.mjs +3 -3
- package/es/Input/style.mjs.map +1 -1
- package/es/Text/style.d.mts +3 -3
- package/es/awesome/Grainient/Grainient.d.mts +11 -0
- package/es/awesome/Grainient/Grainient.mjs +314 -0
- package/es/awesome/Grainient/Grainient.mjs.map +1 -0
- package/es/awesome/Grainient/index.d.mts +3 -0
- package/es/awesome/Grainient/style.mjs +23 -0
- package/es/awesome/Grainient/style.mjs.map +1 -0
- package/es/awesome/Grainient/type.d.mts +121 -0
- package/es/awesome/index.d.mts +4 -1
- package/es/awesome/index.mjs +2 -1
- package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
- package/es/dashboard/AuthLayout/Aside.mjs +31 -0
- package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +93 -37
- package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
- package/es/dashboard/AuthLayout/index.d.mts +3 -2
- package/es/dashboard/AuthLayout/style.mjs +98 -1
- package/es/dashboard/AuthLayout/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/type.d.mts +38 -2
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +33 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/index.d.mts +4 -0
- package/es/dashboard/AuthTools/style.mjs +27 -0
- package/es/dashboard/AuthTools/style.mjs.map +1 -0
- package/es/dashboard/AuthTools/type.d.mts +29 -0
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +19 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
- package/es/dashboard/ChartGrid/index.d.mts +3 -0
- package/es/dashboard/ChartGrid/style.mjs +18 -0
- package/es/dashboard/ChartGrid/style.mjs.map +1 -0
- package/es/dashboard/ChartGrid/type.d.mts +8 -0
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs +82 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/index.d.mts +3 -2
- package/es/dashboard/ConsoleNav/style.mjs +18 -0
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/type.d.mts +13 -0
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +26 -6
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +10 -0
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/type.d.mts +11 -0
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
- package/es/dashboard/FilterStrip/index.d.mts +3 -0
- package/es/dashboard/FilterStrip/style.mjs +78 -0
- package/es/dashboard/FilterStrip/style.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +25 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
- package/es/dashboard/LabelWithKey/index.d.mts +3 -0
- package/es/dashboard/LabelWithKey/type.d.mts +11 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs +81 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
- package/es/dashboard/MetricStrip/index.d.mts +3 -0
- package/es/dashboard/MetricStrip/style.mjs +156 -0
- package/es/dashboard/MetricStrip/style.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +36 -0
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/style.mjs +1 -1
- package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
- package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs +22 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
- package/es/dashboard/PageToolbar/index.d.mts +3 -0
- package/es/dashboard/PageToolbar/style.mjs +36 -0
- package/es/dashboard/PageToolbar/style.mjs.map +1 -0
- package/es/dashboard/PageToolbar/type.d.mts +11 -0
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +40 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
- package/es/dashboard/PanelSurface/index.d.mts +3 -0
- package/es/dashboard/PanelSurface/style.mjs +25 -0
- package/es/dashboard/PanelSurface/style.mjs.map +1 -0
- package/es/dashboard/PanelSurface/type.d.mts +17 -0
- package/es/dashboard/Section/Section.d.mts +10 -0
- package/es/dashboard/Section/Section.mjs +81 -0
- package/es/dashboard/Section/Section.mjs.map +1 -0
- package/es/dashboard/Section/index.d.mts +3 -0
- package/es/dashboard/Section/style.mjs +31 -0
- package/es/dashboard/Section/style.mjs.map +1 -0
- package/es/dashboard/Section/type.d.mts +23 -0
- package/es/dashboard/StatCard/StatCard.d.mts +2 -1
- package/es/dashboard/StatCard/StatCard.mjs +28 -91
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/type.d.mts +16 -5
- package/es/dashboard/Surface/Surface.d.mts +4 -3
- package/es/dashboard/Surface/Surface.mjs +91 -8
- package/es/dashboard/Surface/Surface.mjs.map +1 -1
- package/es/dashboard/Surface/index.d.mts +3 -2
- package/es/dashboard/Surface/link.d.mts +16 -0
- package/es/dashboard/Surface/link.mjs +40 -0
- package/es/dashboard/Surface/link.mjs.map +1 -0
- package/es/dashboard/Surface/marker.stylex.mjs +9 -0
- package/es/dashboard/Surface/marker.stylex.mjs.map +1 -0
- package/es/dashboard/Surface/style.d.mts +2 -0
- package/es/dashboard/Surface/style.mjs +155 -14
- package/es/dashboard/Surface/style.mjs.map +1 -1
- package/es/dashboard/Surface/type.d.mts +29 -1
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
- package/es/dashboard/TableIconActions/index.d.mts +3 -0
- package/es/dashboard/TableIconActions/type.d.mts +17 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
- package/es/dashboard/TitleWithTips/index.d.mts +3 -0
- package/es/dashboard/TitleWithTips/type.d.mts +10 -0
- package/es/dashboard/index.d.mts +38 -4
- package/es/dashboard/index.mjs +17 -3
- package/es/index.d.mts +3 -2
- package/es/index.mjs +5 -4
- package/es/style.css +339 -32
- package/es/styles/createGlobalStyle.mjs +1 -1
- package/es/styles/index.d.mts +3 -2
- package/es/styles/index.mjs +5 -4
- package/es/styles/theme/createLobeToken.d.mts +3 -2
- package/es/styles/theme/createLobeToken.mjs.map +1 -1
- package/es/styles/theme/customPrimary.d.mts +7 -0
- package/es/styles/theme/customPrimary.mjs +66 -0
- package/es/styles/theme/customPrimary.mjs.map +1 -0
- package/es/styles/theme/scope.d.mts +4 -3
- package/es/styles/theme/scope.mjs +30 -8
- package/es/styles/theme/scope.mjs.map +1 -1
- package/es/styles/theme/themeCss.d.mts +2 -0
- package/es/styles/theme/themeCss.mjs +9 -2
- package/es/styles/theme/themeCss.mjs.map +1 -1
- package/es/styles/theme/token/primary.mjs +6 -2
- package/es/styles/theme/token/primary.mjs.map +1 -1
- package/package.json +1 -1
- package/es/dashboard/StatCard/style.mjs +0 -105
- package/es/dashboard/StatCard/style.mjs.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/dashboard/AuthTools/style.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
localeIcon: {
|
|
4
|
+
k71WvV: "lbnnr8r",
|
|
5
|
+
$$css: true
|
|
6
|
+
},
|
|
7
|
+
themeIcon: {
|
|
8
|
+
kZKoxP: "lblup9mm",
|
|
9
|
+
kzqmXN: "lb1kky2od",
|
|
10
|
+
$$css: true
|
|
11
|
+
},
|
|
12
|
+
themeLabel: {
|
|
13
|
+
kmVPX3: "lb1717udv",
|
|
14
|
+
kMzoRj: "lbc342km",
|
|
15
|
+
kVQacm: "lbb3r6kr",
|
|
16
|
+
kZKoxP: "lbjm9jq1",
|
|
17
|
+
kz4h6p: "lb1hyvwdk",
|
|
18
|
+
kzqmXN: "lb1i1rx1s",
|
|
19
|
+
kVAEAm: "lb10l6tqk",
|
|
20
|
+
khDVqt: "lbuxw1ft",
|
|
21
|
+
$$css: true
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { styles };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/AuthTools/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nexport const styles = stylex.create({\n localeIcon: {\n marginInlineEnd: 2,\n },\n themeIcon: {\n blockSize: 16,\n inlineSize: 16,\n },\n themeLabel: {\n padding: 0,\n borderWidth: 0,\n overflow: 'hidden',\n blockSize: 1,\n clipPath: 'inset(50%)',\n inlineSize: 1,\n position: 'absolute',\n whiteSpace: 'nowrap',\n },\n});\n"],"mappings":";AACA,MAAa,SAAS;CACpB,YAAY;EACV,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
//#region src/dashboard/AuthTools/type.d.ts
|
|
3
|
+
export type AuthThemeMode = 'auto' | 'dark' | 'light';
|
|
4
|
+
export interface AuthThemeSwitchProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Accessible names, also shown as tooltips. Labels are visually hidden.
|
|
8
|
+
* @default { auto: 'System', dark: 'Dark', light: 'Light' }
|
|
9
|
+
*/
|
|
10
|
+
labels?: Partial<Record<AuthThemeMode, string>>;
|
|
11
|
+
onChange?: (mode: AuthThemeMode) => void;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
value?: AuthThemeMode;
|
|
14
|
+
}
|
|
15
|
+
export interface AuthLocaleOption {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
export interface AuthLocaleSwitchProps {
|
|
20
|
+
/** Accessible name of the select. @default 'Language' */
|
|
21
|
+
'aria-label'?: string;
|
|
22
|
+
'className'?: string;
|
|
23
|
+
'onChange'?: (locale: string) => void;
|
|
24
|
+
'options': AuthLocaleOption[];
|
|
25
|
+
'style'?: CSSProperties;
|
|
26
|
+
'value'?: string;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartGridProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/ChartGrid/ChartGrid.d.ts
|
|
3
|
+
/** Peer charts and ranked lists, two-up, one column below 640px. Not for label/value rows. */
|
|
4
|
+
declare const ChartGrid: {
|
|
5
|
+
({ children, className }: ChartGridProps): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ChartGrid as default };
|
|
10
|
+
//# sourceMappingURL=ChartGrid.d.mts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
|
+
import { styles } from "./style.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as stylex from "@stylexjs/stylex";
|
|
6
|
+
//#region src/dashboard/ChartGrid/ChartGrid.tsx
|
|
7
|
+
/** Peer charts and ranked lists, two-up, one column below 640px. Not for label/value rows. */
|
|
8
|
+
const ChartGrid = ({ children, className }) => /* @__PURE__ */ jsx("div", {
|
|
9
|
+
...stylex.props(styles.frame),
|
|
10
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
11
|
+
...styleProps(styles.root, className),
|
|
12
|
+
children
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
ChartGrid.displayName = "ChartGrid";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ChartGrid as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ChartGrid.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartGrid.mjs","names":[],"sources":["../../../src/dashboard/ChartGrid/ChartGrid.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\n\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { styles } from './style';\nimport type { ChartGridProps } from './type';\n\n/** Peer charts and ranked lists, two-up, one column below 640px. Not for label/value rows. */\nconst ChartGrid = ({ children, className }: ChartGridProps) => (\n <div {...stylex.props(styles.frame)}>\n <div {...styleProps(styles.root, className)}>{children}</div>\n </div>\n);\n\nChartGrid.displayName = 'ChartGrid';\n\nexport default ChartGrid;\n"],"mappings":";;;;;;;AAQA,MAAM,aAAa,EACjB,UACA,gBACoB,oBAAC,OAAD;CAAK,GAAI,OAAO,MAAM,OAAO,KAAK;CACpD,UAAA,oBAAC,OAAD;EAAK,GAAI,WAAW,OAAO,MAAM,SAAS;EAAI;CAAc,CAAA;AACzD,CAAA;AACP,UAAU,cAAc"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/dashboard/ChartGrid/style.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
frame: {
|
|
4
|
+
k9g6sI: "lb12h1iku",
|
|
5
|
+
$$css: true
|
|
6
|
+
},
|
|
7
|
+
root: {
|
|
8
|
+
kOIVth: "lbou54vl",
|
|
9
|
+
kGNEyG: "lb1qjc9v5",
|
|
10
|
+
k1xSpc: "lbrvj5dj",
|
|
11
|
+
kumcoG: "lbnby9oq lb91szb2 lb43xpz4 lbb8zp9c",
|
|
12
|
+
$$css: true
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { styles };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ChartGrid/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nexport const styles = stylex.create({\n /**\n * The frame is the container. A query on the grid itself would not see its own width.\n * Charts stay two-up so a trend and its switch stay readable; one child does not\n * stretch across the page.\n */\n frame: {\n containerType: 'inline-size',\n },\n root: {\n gap: 16,\n alignItems: 'stretch',\n display: 'grid',\n gridTemplateColumns: {\n 'default': 'repeat(2, minmax(0, 1fr))',\n ':has(> :only-child)': 'minmax(0, min(100%, 560px))',\n '@container (max-width: 640px)': {\n 'default': 'minmax(0, 1fr)',\n ':has(> :only-child)': 'minmax(0, min(100%, 560px))',\n },\n },\n },\n});\n"],"mappings":";AACA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConsoleNavSkeletonProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/ConsoleNav/Skeleton.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Placeholder for `ConsoleNav` while the session or menu loads. Rows use the nav's own item,
|
|
5
|
+
* group header and indent metrics, so swapping in the real nav does not shift anything.
|
|
6
|
+
*/
|
|
7
|
+
declare function ConsoleNavSkeleton({ className, groups, items }: ConsoleNavSkeletonProps): import("react").JSX.Element;
|
|
8
|
+
declare namespace ConsoleNavSkeleton {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
/** Footer placeholder matching an account row: avatar plus name. */
|
|
12
|
+
export declare function ConsoleFooterSkeleton(): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ConsoleNavSkeleton as default };
|
|
15
|
+
//# sourceMappingURL=Skeleton.d.mts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
|
+
import Skeleton from "../../Skeleton/index.mjs";
|
|
4
|
+
import { styles } from "./style.mjs";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as stylex from "@stylexjs/stylex";
|
|
7
|
+
//#region src/dashboard/ConsoleNav/Skeleton.tsx
|
|
8
|
+
const DEFAULT_GROUPS = [
|
|
9
|
+
3,
|
|
10
|
+
6,
|
|
11
|
+
4,
|
|
12
|
+
3
|
|
13
|
+
];
|
|
14
|
+
const Row = ({ group, index }) => /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
"data-indent": 0,
|
|
16
|
+
...stylex.props(styles.item, styles.skeletonRow),
|
|
17
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
18
|
+
height: 16,
|
|
19
|
+
radius: 4,
|
|
20
|
+
width: 16
|
|
21
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
22
|
+
height: 14,
|
|
23
|
+
radius: 4,
|
|
24
|
+
width: 56 + (index + group) % 3 * 20
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Placeholder for `ConsoleNav` while the session or menu loads. Rows use the nav's own item,
|
|
29
|
+
* group header and indent metrics, so swapping in the real nav does not shift anything.
|
|
30
|
+
*/
|
|
31
|
+
function ConsoleNavSkeleton({ className, groups = DEFAULT_GROUPS, items = 1 }) {
|
|
32
|
+
const counts = groups.map((group) => typeof group === "number" ? group : group.items?.length ?? 0);
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
"aria-hidden": true,
|
|
35
|
+
"data-console-nav-skeleton": "",
|
|
36
|
+
...styleProps(styles.nav, className),
|
|
37
|
+
children: [Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsx(Row, {
|
|
38
|
+
group: 0,
|
|
39
|
+
index
|
|
40
|
+
}, index)), counts.map((count, group) => /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
...stylex.props(styles.skeletonGroup),
|
|
42
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
43
|
+
"data-level": 0,
|
|
44
|
+
...stylex.props(styles.groupHeader, styles.skeletonRow),
|
|
45
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
46
|
+
height: 12,
|
|
47
|
+
radius: 4,
|
|
48
|
+
width: 64 + group % 2 * 16
|
|
49
|
+
})
|
|
50
|
+
}), Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx("div", {
|
|
51
|
+
"data-indent": 1,
|
|
52
|
+
...stylex.props(styles.item, styles.itemIndented, styles.itemIndent1, styles.skeletonRow),
|
|
53
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
54
|
+
height: 14,
|
|
55
|
+
radius: 4,
|
|
56
|
+
width: 56 + (index + group) % 3 * 20
|
|
57
|
+
})
|
|
58
|
+
}, index))]
|
|
59
|
+
}, group))]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
ConsoleNavSkeleton.displayName = "ConsoleNavSkeleton";
|
|
63
|
+
/** Footer placeholder matching an account row: avatar plus name. */
|
|
64
|
+
function ConsoleFooterSkeleton() {
|
|
65
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
66
|
+
"aria-hidden": true,
|
|
67
|
+
...stylex.props(styles.skeletonFooter),
|
|
68
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
69
|
+
height: 32,
|
|
70
|
+
radius: 16,
|
|
71
|
+
width: 32
|
|
72
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
73
|
+
height: 14,
|
|
74
|
+
radius: 4,
|
|
75
|
+
width: 96
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { ConsoleFooterSkeleton, ConsoleNavSkeleton as default };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=Skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.mjs","names":[],"sources":["../../../src/dashboard/ConsoleNav/Skeleton.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\n\nimport Skeleton from '@/Skeleton';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { styles } from './style';\nimport type { ConsoleNavGroup, ConsoleNavSkeletonProps } from './type';\n\nconst DEFAULT_GROUPS = [3, 6, 4, 3];\n\nconst Row = ({ group, index }: { group: number; index: number }) => (\n <div data-indent={0} {...stylex.props(styles.item, styles.skeletonRow)}>\n <Skeleton height={16} radius={4} width={16} />\n <Skeleton height={14} radius={4} width={56 + ((index + group) % 3) * 20} />\n </div>\n);\n\n/**\n * Placeholder for `ConsoleNav` while the session or menu loads. Rows use the nav's own item,\n * group header and indent metrics, so swapping in the real nav does not shift anything.\n */\nfunction ConsoleNavSkeleton({\n className,\n groups = DEFAULT_GROUPS,\n items = 1,\n}: ConsoleNavSkeletonProps) {\n const counts = groups.map((group: number | ConsoleNavGroup) =>\n typeof group === 'number' ? group : (group.items?.length ?? 0),\n );\n return (\n <div aria-hidden data-console-nav-skeleton=\"\" {...styleProps(styles.nav, className)}>\n {Array.from({ length: items }, (_, index) => (\n <Row group={0} index={index} key={index} />\n ))}\n {counts.map((count, group) => (\n <div key={group} {...stylex.props(styles.skeletonGroup)}>\n <div data-level={0} {...stylex.props(styles.groupHeader, styles.skeletonRow)}>\n <Skeleton height={12} radius={4} width={64 + (group % 2) * 16} />\n </div>\n {Array.from({ length: count }, (_, index) => (\n <div\n data-indent={1}\n key={index}\n {...stylex.props(\n styles.item,\n styles.itemIndented,\n styles.itemIndent1,\n styles.skeletonRow,\n )}\n >\n <Skeleton height={14} radius={4} width={56 + ((index + group) % 3) * 20} />\n </div>\n ))}\n </div>\n ))}\n </div>\n );\n}\n\nConsoleNavSkeleton.displayName = 'ConsoleNavSkeleton';\n\n/** Footer placeholder matching an account row: avatar plus name. */\nexport function ConsoleFooterSkeleton() {\n return (\n <div aria-hidden {...stylex.props(styles.skeletonFooter)}>\n <Skeleton height={32} radius={16} width={32} />\n <Skeleton height={14} radius={4} width={96} />\n </div>\n );\n}\n\nexport default ConsoleNavSkeleton;\n"],"mappings":";;;;;;;AAOA,MAAM,iBAAiB;CAAC;CAAG;CAAG;CAAG;AAAC;AAClC,MAAM,OAAO,EACX,OACA,YAII,qBAAC,OAAD;CAAK,eAAa;CAAG,GAAI,OAAO,MAAM,OAAO,MAAM,OAAO,WAAW;CAArE,UAAA,CACF,oBAAC,UAAD;EAAU,QAAQ;EAAI,QAAQ;EAAG,OAAO;CAAK,CAAA,GAC7C,oBAAC,UAAD;EAAU,QAAQ;EAAI,QAAQ;EAAG,OAAO,MAAM,QAAQ,SAAS,IAAI;CAAK,CAAA,CACrE;;;;;;AAMP,SAAS,mBAAmB,EAC1B,WACA,SAAS,gBACT,QAAQ,KACkB;CAC1B,MAAM,SAAS,OAAO,KAAK,UAAoC,OAAO,UAAU,WAAW,QAAQ,MAAM,OAAO,UAAU,CAAC;CAC3H,OAAO,qBAAC,OAAD;EAAK,eAAA;EAAY,6BAA0B;EAAG,GAAI,WAAW,OAAO,KAAK,SAAS;EAAlF,UAAA,CACF,MAAM,KAAK,EACZ,QAAQ,MACV,IAAI,GAAG,UAAU,oBAAC,KAAD;GAAK,OAAO;GAAU;EAAoB,GAAR,KAAQ,CAAC,GACzD,OAAO,KAAK,OAAO,UAAU,qBAAC,OAAD;GAAiB,GAAI,OAAO,MAAM,OAAO,aAAa;GAAtD,UAAA,CAC1B,oBAAC,OAAD;IAAK,cAAY;IAAG,GAAI,OAAO,MAAM,OAAO,aAAa,OAAO,WAAW;IACzE,UAAA,oBAAC,UAAD;KAAU,QAAQ;KAAI,QAAQ;KAAG,OAAO,KAAK,QAAQ,IAAI;IAAK,CAAA;GAC3D,CAAA,GACJ,MAAM,KAAK,EACd,QAAQ,MACV,IAAI,GAAG,UAAU,oBAAC,OAAD;IAAK,eAAa;IAAe,GAAI,OAAO,MAAM,OAAO,MAAM,OAAO,cAAc,OAAO,aAAa,OAAO,WAAW;IACnI,UAAA,oBAAC,UAAD;KAAU,QAAQ;KAAI,QAAQ;KAAG,OAAO,MAAM,QAAQ,SAAS,IAAI;IAAK,CAAA;GACrE,GAFgC,KAEhC,CAAC,CACL;EATiC,GAAA,KASjC,CAAC,CACL;;AACT;AACA,mBAAmB,cAAc;;AAGjC,SAAgB,wBAAwB;CACtC,OAAO,qBAAC,OAAD;EAAK,eAAA;EAAY,GAAI,OAAO,MAAM,OAAO,cAAc;EAAvD,UAAA,CACH,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAI,OAAO;EAAK,CAAA,GAC9C,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAO;EAAK,CAAA,CAC1C;;AACT"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ConsoleNavGroup, ConsoleNavItem, ConsoleNavLinkProps, ConsoleNavProps } from "./type.mjs";
|
|
1
|
+
import { ConsoleNavGroup, ConsoleNavItem, ConsoleNavLinkProps, ConsoleNavProps, ConsoleNavSkeletonProps } from "./type.mjs";
|
|
2
2
|
import { resolveActiveHref } from "./active.mjs";
|
|
3
3
|
import ConsoleNav from "./ConsoleNav.mjs";
|
|
4
|
-
|
|
4
|
+
import ConsoleNavSkeleton, { ConsoleFooterSkeleton } from "./Skeleton.mjs";
|
|
5
|
+
export { ConsoleFooterSkeleton, type ConsoleNavGroup, type ConsoleNavItem, type ConsoleNavProps, ConsoleNavSkeleton, type ConsoleNavSkeletonProps, ConsoleNav as default, resolveActiveHref };
|
|
@@ -291,6 +291,24 @@ const styles = {
|
|
|
291
291
|
kWkggS: "lbjjy28o",
|
|
292
292
|
$$css: true
|
|
293
293
|
},
|
|
294
|
+
skeletonFooter: {
|
|
295
|
+
kOIVth: "lb883omv",
|
|
296
|
+
kg3NbH: "lbfn1xvj",
|
|
297
|
+
kGNEyG: "lb6s0dn4",
|
|
298
|
+
k1xSpc: "lb78zum5",
|
|
299
|
+
$$css: true
|
|
300
|
+
},
|
|
301
|
+
skeletonGroup: {
|
|
302
|
+
kOIVth: "lb195vfkc",
|
|
303
|
+
k1xSpc: "lb78zum5",
|
|
304
|
+
kXwgrk: "lbdt5ytf",
|
|
305
|
+
keoZOQ: "lb14vqqas",
|
|
306
|
+
$$css: true
|
|
307
|
+
},
|
|
308
|
+
skeletonRow: {
|
|
309
|
+
kfzvcC: "lb47corl",
|
|
310
|
+
$$css: true
|
|
311
|
+
},
|
|
294
312
|
topItems: {
|
|
295
313
|
kOIVth: "lb195vfkc",
|
|
296
314
|
kmkexE: "lbn0nhwh lb9kvfbb",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleNav/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\n\nexport const styles = stylex.create({\n badge: {\n borderRadius: 999,\n flex: 'none',\n paddingInline: 6,\n backgroundColor: `color-mix(in srgb, ${cssVar.colorError} 12%, transparent)`,\n color: cssVar.colorError,\n fontSize: cssVar.fontSizeSM,\n fontVariantNumeric: 'tabular-nums',\n minInlineSize: 20,\n textAlign: 'center',\n },\n chevron: {\n flex: 'none',\n transition: {\n default: 'transform 160ms ease, opacity 120ms ease 80ms',\n [reducedMotion]: 'none',\n },\n },\n chevronFolded: {\n transform: 'rotate(-90deg)',\n },\n dot: {\n borderRadius: 999,\n transition: { default: 'opacity 120ms ease', [reducedMotion]: 'none' },\n backgroundColor: cssVar.colorError,\n blockSize: 7,\n inlineSize: 7,\n insetBlockStart: 7,\n insetInlineEnd: 9,\n opacity: 0,\n position: 'absolute',\n },\n dotRail: {\n opacity: 1,\n },\n fold: {\n transition: {\n default: 'grid-template-rows 200ms ease, margin 200ms ease, opacity 120ms ease',\n [reducedMotion]: 'none',\n },\n display: 'grid',\n gridTemplateRows: '1fr',\n },\n foldBody: {\n overflow: 'hidden',\n minBlockSize: 0,\n },\n folded: {\n gridTemplateRows: '0fr',\n marginBlockStart: { 'default': null, ':not(:first-child)': -2 },\n opacity: 0,\n },\n group: {\n 'transition': { default: 'margin 200ms ease', [reducedMotion]: 'none' },\n 'display': 'flex',\n 'flexDirection': 'column',\n 'marginBlockStart': 12,\n 'position': 'relative',\n '::before': {\n insetInline: 0,\n transition: { default: 'opacity 200ms ease', [reducedMotion]: 'none' },\n backgroundColor: cssVar.colorBorderSecondary,\n blockSize: 1,\n content: '\"\"',\n insetBlockStart: -6,\n opacity: 0,\n position: 'absolute',\n },\n },\n groupDivider: {\n '::before': {\n opacity: 1,\n },\n },\n groupHead: {\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n },\n groupHeader: {\n borderColor: 'currentcolor',\n borderRadius: cssVar.borderRadius,\n borderStyle: 'none',\n borderWidth: 'medium',\n gap: 8,\n alignItems: 'center',\n backgroundColor: 'transparent',\n color: { 'default': cssVar.colorTextSecondary, ':hover': cssVar.colorText },\n cursor: 'pointer',\n display: 'flex',\n fontSize: cssVar.fontSizeSM,\n fontWeight: 500,\n justifyContent: 'space-between',\n minBlockSize: 32,\n paddingInlineEnd: 10,\n paddingInlineStart: 10,\n textAlign: 'start',\n whiteSpace: 'nowrap',\n },\n groupHeaderActive: {\n color: cssVar.colorText,\n },\n groupHeaderIcon: {\n gap: 10,\n fontSize: cssVar.fontSize,\n justifyContent: 'flex-start',\n minBlockSize: 36,\n },\n groupHeaderIndent1: {\n paddingInlineStart: 38,\n },\n groupHeaderIndent2: {\n paddingInlineStart: 56,\n },\n groupHeaderNested: {\n gap: 8,\n color: { 'default': cssVar.colorTextDescription, ':hover': cssVar.colorTextSecondary },\n fontSize: cssVar.fontSizeSM,\n fontWeight: 400,\n justifyContent: 'flex-start',\n minBlockSize: 26,\n },\n groupHeaderNestedActive: {\n color: cssVar.colorTextSecondary,\n },\n groupHeaderRailIcon: {\n backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillTertiary },\n },\n groupItems: {\n gap: 2,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n },\n groupLabelNested: {\n flexBasis: 'auto',\n flexGrow: '0',\n flexShrink: '1',\n },\n groupLevelIcon: {\n marginBlockStart: 2,\n },\n groupNested: {\n marginBlockStart: 6,\n },\n groupPanel: {\n transition: 'grid-template-rows 160ms ease',\n display: 'grid',\n gridTemplateRows: '1fr',\n },\n groupPanelCollapsed: {\n gridTemplateRows: '0fr',\n },\n groupPanelInstant: {\n transition: 'none',\n },\n groupRailEmpty: {\n marginBlockStart: 0,\n },\n headerIcon: {\n flex: 'none',\n display: 'flex',\n },\n headerIconWide: {\n inlineSize: 18,\n justifyContent: 'center',\n },\n indicator: {\n flex: 'none',\n transition: 'transform 160ms ease',\n alignItems: 'center',\n color: cssVar.colorTextDescription,\n display: 'flex',\n justifyContent: 'center',\n marginInlineStart: -6,\n height: 18,\n width: 18,\n },\n indicatorExpanded: {\n transform: 'rotate(90deg)',\n },\n item: {\n borderRadius: cssVar.borderRadius,\n gap: 10,\n textDecoration: 'none',\n transition: 'background 120ms ease, color 120ms ease',\n alignItems: 'center',\n backgroundColor: { 'default': null, ':hover': cssVar.colorFillTertiary },\n color: { 'default': cssVar.colorTextSecondary, ':hover': cssVar.colorText },\n display: 'flex',\n minBlockSize: { default: 36, [media.mobile]: 44 },\n paddingInlineEnd: 10,\n paddingInlineStart: 10,\n position: 'relative',\n whiteSpace: 'nowrap',\n },\n itemActive: {\n backgroundColor: cssVar.colorFillSecondary,\n color: cssVar.colorText,\n fontWeight: 500,\n },\n itemIndent1: {\n paddingInlineStart: 38,\n },\n itemIndent2: {\n paddingInlineStart: 56,\n },\n itemIndented: {\n color: cssVar.colorText,\n minBlockSize: 32,\n },\n itemLabel: {\n flex: '1',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n itemLabelRail: {\n textOverflow: 'clip',\n },\n itemRailIndent: {\n paddingInlineStart: 10,\n },\n nav: {\n flex: '1',\n gap: 2,\n paddingInline: 8,\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n overflowAnchor: 'none',\n paddingBlockEnd: 12,\n scrollbarWidth: 'thin',\n },\n navIcon: {\n flex: 'none',\n display: 'flex',\n },\n railFade: {\n transition: { default: 'opacity 120ms ease 80ms', [reducedMotion]: 'none' },\n },\n railFaded: {\n opacity: 0,\n transitionDelay: '0s',\n },\n railLink: {\n inset: 0,\n borderRadius: cssVar.borderRadius,\n transition: 'background 120ms ease',\n backgroundColor: { 'default': null, ':hover': cssVar.colorFillTertiary },\n position: 'absolute',\n },\n railLinkActive: {\n backgroundColor: cssVar.colorFillSecondary,\n },\n topItems: {\n gap: 2,\n transition: {\n default: 'margin 200ms ease, padding 200ms ease, border-color 200ms ease',\n [reducedMotion]: 'none',\n },\n display: 'flex',\n flexDirection: 'column',\n },\n topItemsDivided: {\n borderBlockEndColor: cssVar.colorBorderSecondary,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n marginBlockEnd: 6,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AAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,OAAO;CACT;CACA,KAAK;EACH,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,mBAAmB;EACjB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleNav/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\n\nexport const styles = stylex.create({\n badge: {\n borderRadius: 999,\n flex: 'none',\n paddingInline: 6,\n backgroundColor: `color-mix(in srgb, ${cssVar.colorError} 12%, transparent)`,\n color: cssVar.colorError,\n fontSize: cssVar.fontSizeSM,\n fontVariantNumeric: 'tabular-nums',\n minInlineSize: 20,\n textAlign: 'center',\n },\n chevron: {\n flex: 'none',\n transition: {\n default: 'transform 160ms ease, opacity 120ms ease 80ms',\n [reducedMotion]: 'none',\n },\n },\n chevronFolded: {\n transform: 'rotate(-90deg)',\n },\n dot: {\n borderRadius: 999,\n transition: { default: 'opacity 120ms ease', [reducedMotion]: 'none' },\n backgroundColor: cssVar.colorError,\n blockSize: 7,\n inlineSize: 7,\n insetBlockStart: 7,\n insetInlineEnd: 9,\n opacity: 0,\n position: 'absolute',\n },\n dotRail: {\n opacity: 1,\n },\n fold: {\n transition: {\n default: 'grid-template-rows 200ms ease, margin 200ms ease, opacity 120ms ease',\n [reducedMotion]: 'none',\n },\n display: 'grid',\n gridTemplateRows: '1fr',\n },\n foldBody: {\n overflow: 'hidden',\n minBlockSize: 0,\n },\n folded: {\n gridTemplateRows: '0fr',\n marginBlockStart: { 'default': null, ':not(:first-child)': -2 },\n opacity: 0,\n },\n group: {\n 'transition': { default: 'margin 200ms ease', [reducedMotion]: 'none' },\n 'display': 'flex',\n 'flexDirection': 'column',\n 'marginBlockStart': 12,\n 'position': 'relative',\n '::before': {\n insetInline: 0,\n transition: { default: 'opacity 200ms ease', [reducedMotion]: 'none' },\n backgroundColor: cssVar.colorBorderSecondary,\n blockSize: 1,\n content: '\"\"',\n insetBlockStart: -6,\n opacity: 0,\n position: 'absolute',\n },\n },\n groupDivider: {\n '::before': {\n opacity: 1,\n },\n },\n groupHead: {\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n },\n groupHeader: {\n borderColor: 'currentcolor',\n borderRadius: cssVar.borderRadius,\n borderStyle: 'none',\n borderWidth: 'medium',\n gap: 8,\n alignItems: 'center',\n backgroundColor: 'transparent',\n color: { 'default': cssVar.colorTextSecondary, ':hover': cssVar.colorText },\n cursor: 'pointer',\n display: 'flex',\n fontSize: cssVar.fontSizeSM,\n fontWeight: 500,\n justifyContent: 'space-between',\n minBlockSize: 32,\n paddingInlineEnd: 10,\n paddingInlineStart: 10,\n textAlign: 'start',\n whiteSpace: 'nowrap',\n },\n groupHeaderActive: {\n color: cssVar.colorText,\n },\n groupHeaderIcon: {\n gap: 10,\n fontSize: cssVar.fontSize,\n justifyContent: 'flex-start',\n minBlockSize: 36,\n },\n groupHeaderIndent1: {\n paddingInlineStart: 38,\n },\n groupHeaderIndent2: {\n paddingInlineStart: 56,\n },\n groupHeaderNested: {\n gap: 8,\n color: { 'default': cssVar.colorTextDescription, ':hover': cssVar.colorTextSecondary },\n fontSize: cssVar.fontSizeSM,\n fontWeight: 400,\n justifyContent: 'flex-start',\n minBlockSize: 26,\n },\n groupHeaderNestedActive: {\n color: cssVar.colorTextSecondary,\n },\n groupHeaderRailIcon: {\n backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillTertiary },\n },\n groupItems: {\n gap: 2,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n },\n groupLabelNested: {\n flexBasis: 'auto',\n flexGrow: '0',\n flexShrink: '1',\n },\n groupLevelIcon: {\n marginBlockStart: 2,\n },\n groupNested: {\n marginBlockStart: 6,\n },\n groupPanel: {\n transition: 'grid-template-rows 160ms ease',\n display: 'grid',\n gridTemplateRows: '1fr',\n },\n groupPanelCollapsed: {\n gridTemplateRows: '0fr',\n },\n groupPanelInstant: {\n transition: 'none',\n },\n groupRailEmpty: {\n marginBlockStart: 0,\n },\n headerIcon: {\n flex: 'none',\n display: 'flex',\n },\n headerIconWide: {\n inlineSize: 18,\n justifyContent: 'center',\n },\n indicator: {\n flex: 'none',\n transition: 'transform 160ms ease',\n alignItems: 'center',\n color: cssVar.colorTextDescription,\n display: 'flex',\n justifyContent: 'center',\n marginInlineStart: -6,\n height: 18,\n width: 18,\n },\n indicatorExpanded: {\n transform: 'rotate(90deg)',\n },\n item: {\n borderRadius: cssVar.borderRadius,\n gap: 10,\n textDecoration: 'none',\n transition: 'background 120ms ease, color 120ms ease',\n alignItems: 'center',\n backgroundColor: { 'default': null, ':hover': cssVar.colorFillTertiary },\n color: { 'default': cssVar.colorTextSecondary, ':hover': cssVar.colorText },\n display: 'flex',\n minBlockSize: { default: 36, [media.mobile]: 44 },\n paddingInlineEnd: 10,\n paddingInlineStart: 10,\n position: 'relative',\n whiteSpace: 'nowrap',\n },\n itemActive: {\n backgroundColor: cssVar.colorFillSecondary,\n color: cssVar.colorText,\n fontWeight: 500,\n },\n itemIndent1: {\n paddingInlineStart: 38,\n },\n itemIndent2: {\n paddingInlineStart: 56,\n },\n itemIndented: {\n color: cssVar.colorText,\n minBlockSize: 32,\n },\n itemLabel: {\n flex: '1',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n itemLabelRail: {\n textOverflow: 'clip',\n },\n itemRailIndent: {\n paddingInlineStart: 10,\n },\n nav: {\n flex: '1',\n gap: 2,\n paddingInline: 8,\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n overflowAnchor: 'none',\n paddingBlockEnd: 12,\n scrollbarWidth: 'thin',\n },\n navIcon: {\n flex: 'none',\n display: 'flex',\n },\n railFade: {\n transition: { default: 'opacity 120ms ease 80ms', [reducedMotion]: 'none' },\n },\n railFaded: {\n opacity: 0,\n transitionDelay: '0s',\n },\n railLink: {\n inset: 0,\n borderRadius: cssVar.borderRadius,\n transition: 'background 120ms ease',\n backgroundColor: { 'default': null, ':hover': cssVar.colorFillTertiary },\n position: 'absolute',\n },\n railLinkActive: {\n backgroundColor: cssVar.colorFillSecondary,\n },\n skeletonFooter: {\n gap: 10,\n paddingInline: 4,\n alignItems: 'center',\n display: 'flex',\n },\n skeletonGroup: {\n gap: 2,\n display: 'flex',\n flexDirection: 'column',\n marginBlockStart: 12,\n },\n skeletonRow: {\n pointerEvents: 'none',\n },\n topItems: {\n gap: 2,\n transition: {\n default: 'margin 200ms ease, padding 200ms ease, border-color 200ms ease',\n [reducedMotion]: 'none',\n },\n display: 'flex',\n flexDirection: 'column',\n },\n topItemsDivided: {\n borderBlockEndColor: cssVar.colorBorderSecondary,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n marginBlockEnd: 6,\n paddingBlockEnd: 8,\n },\n topItemsRailEmpty: {\n borderBlockEndColor: 'transparent',\n marginBlockEnd: 0,\n paddingBlockEnd: 0,\n },\n});\n"],"mappings":";AAMA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,OAAO;CACT;CACA,KAAK;EACH,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QA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AAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,mBAAmB;EACjB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -66,5 +66,18 @@ export interface ConsoleNavProps {
|
|
|
66
66
|
/** Persists which groups were opened or closed by hand. */
|
|
67
67
|
storageKey?: string;
|
|
68
68
|
}
|
|
69
|
+
export interface ConsoleNavSkeletonProps {
|
|
70
|
+
className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Rows per group. Pass counts, or the real `ConsoleNavGroup[]` to mirror its item counts.
|
|
73
|
+
* @default [3, 6, 4, 3]
|
|
74
|
+
*/
|
|
75
|
+
groups?: Array<number | ConsoleNavGroup>;
|
|
76
|
+
/**
|
|
77
|
+
* Ungrouped rows before the groups.
|
|
78
|
+
* @default 1
|
|
79
|
+
*/
|
|
80
|
+
items?: number;
|
|
81
|
+
}
|
|
69
82
|
//#endregion
|
|
70
83
|
//# sourceMappingURL=type.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConsoleShellProps } from "./type.mjs";
|
|
2
2
|
//#region src/dashboard/ConsoleShell/ConsoleShell.d.ts
|
|
3
|
-
declare function ConsoleShell({ brand, breadcrumb, children, className, collapsed, collapseLabel, defaultCollapsed, expandLabel, footer, hotkey, navigation, onCollapsedChange, openNavigationLabel, skipToContentLabel, storageKey, style, tools, ...rest }: ConsoleShellProps): import("react").JSX.Element;
|
|
3
|
+
declare function ConsoleShell({ brand, breadcrumb, children, className, collapsed, closeNavigationLabel, collapseLabel, defaultCollapsed, expandLabel, footer: footerProp, loading, loadingContent, loadingNavigation, hotkey, navigation: navigationProp, onCollapsedChange, openNavigationLabel, skipToContentLabel, storageKey, style, tools, ...rest }: ConsoleShellProps): import("react").JSX.Element;
|
|
4
4
|
declare namespace ConsoleShell {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
@@ -2,25 +2,36 @@
|
|
|
2
2
|
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
3
|
import Button from "../../Button/Button.mjs";
|
|
4
4
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
5
|
+
import { useThemeMode } from "../../styles/theme/scope.mjs";
|
|
5
6
|
import Drawer from "../../Drawer/Drawer.mjs";
|
|
6
7
|
import { ConsoleShellContext } from "./context.mjs";
|
|
7
8
|
import { useIsCompact, useLocalStorage, usePrefersReducedMotion } from "../hooks.mjs";
|
|
9
|
+
import ConsoleNavSkeleton, { ConsoleFooterSkeleton } from "../ConsoleNav/Skeleton.mjs";
|
|
8
10
|
import { consoleBrandMarker } from "./marker.stylex.mjs";
|
|
9
11
|
import { styles } from "./style.mjs";
|
|
12
|
+
import PageLoading from "../PageSkeleton/PageSkeleton.mjs";
|
|
10
13
|
import { useEffect, useId, useRef, useState } from "react";
|
|
11
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
15
|
import * as stylex from "@stylexjs/stylex";
|
|
13
|
-
import { PanelLeft } from "lucide-react";
|
|
16
|
+
import { PanelLeft, X } from "lucide-react";
|
|
14
17
|
//#region src/dashboard/ConsoleShell/ConsoleShell.tsx
|
|
18
|
+
const drawerBodyStyle = {
|
|
19
|
+
minBlockSize: "100%",
|
|
20
|
+
padding: 0
|
|
21
|
+
};
|
|
15
22
|
function isTypingTarget(target) {
|
|
16
23
|
if (!(target instanceof HTMLElement)) return false;
|
|
17
24
|
const tag = target.tagName;
|
|
18
25
|
return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || target.isContentEditable;
|
|
19
26
|
}
|
|
20
|
-
function ConsoleShell({ brand, breadcrumb, children, className, collapsed, collapseLabel = "Collapse sidebar", defaultCollapsed = false, expandLabel = "Expand sidebar", footer, hotkey = true, navigation, onCollapsedChange, openNavigationLabel = "Open navigation", skipToContentLabel = "Skip to content", storageKey, style, tools, ...rest }) {
|
|
27
|
+
function ConsoleShell({ brand, breadcrumb, children, className, collapsed, closeNavigationLabel = "Close navigation", collapseLabel = "Collapse sidebar", defaultCollapsed = false, expandLabel = "Expand sidebar", footer: footerProp, loading, loadingContent, loadingNavigation, hotkey = true, navigation: navigationProp, onCollapsedChange, openNavigationLabel = "Open navigation", skipToContentLabel = "Skip to content", storageKey, style, tools, ...rest }) {
|
|
28
|
+
const navigation = loading ? loadingNavigation ?? /* @__PURE__ */ jsx(ConsoleNavSkeleton, {}) : navigationProp;
|
|
29
|
+
const footer = loading ? /* @__PURE__ */ jsx(ConsoleFooterSkeleton, {}) : footerProp;
|
|
30
|
+
const body = loading ? loadingContent ?? /* @__PURE__ */ jsx(PageLoading, {}) : children;
|
|
21
31
|
const mainId = `console-main-${useId().replaceAll(":", "")}`;
|
|
22
32
|
const shellRef = useRef(null);
|
|
23
33
|
const isCompact = useIsCompact();
|
|
34
|
+
const { isDarkMode } = useThemeMode();
|
|
24
35
|
const reducedMotion = usePrefersReducedMotion();
|
|
25
36
|
const [storedCollapsed, setStoredCollapsed] = useLocalStorage(storageKey, defaultCollapsed);
|
|
26
37
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
@@ -63,10 +74,16 @@ function ConsoleShell({ brand, breadcrumb, children, className, collapsed, colla
|
|
|
63
74
|
const sidebar = (rail) => /* @__PURE__ */ jsxs(ConsoleShellContext, {
|
|
64
75
|
value: stateFor(rail),
|
|
65
76
|
children: [
|
|
66
|
-
brand ? /* @__PURE__ */
|
|
77
|
+
brand || isCompact ? /* @__PURE__ */ jsxs("div", {
|
|
67
78
|
"data-collapsed": rail,
|
|
68
79
|
...stylex.props(styles.brand, consoleBrandMarker),
|
|
69
|
-
children: brand
|
|
80
|
+
children: [brand, isCompact ? /* @__PURE__ */ jsx(Button, {
|
|
81
|
+
"aria-label": closeNavigationLabel,
|
|
82
|
+
className: stylex.props(styles.brandClose).className,
|
|
83
|
+
icon: X,
|
|
84
|
+
type: "text",
|
|
85
|
+
onClick: closeNavigation
|
|
86
|
+
}) : null]
|
|
70
87
|
}) : null,
|
|
71
88
|
navigation ? /* @__PURE__ */ jsx("div", {
|
|
72
89
|
...stylex.props(styles.navSlot),
|
|
@@ -102,8 +119,10 @@ function ConsoleShell({ brand, breadcrumb, children, className, collapsed, colla
|
|
|
102
119
|
}),
|
|
103
120
|
isCompact ? /* @__PURE__ */ jsx(Drawer, {
|
|
104
121
|
noHeader: true,
|
|
122
|
+
closable: false,
|
|
105
123
|
open: drawerOpen,
|
|
106
124
|
placement: "left",
|
|
125
|
+
styles: { bodyContent: drawerBodyStyle },
|
|
107
126
|
width: 272,
|
|
108
127
|
onClose: closeNavigation,
|
|
109
128
|
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
@@ -112,7 +131,7 @@ function ConsoleShell({ brand, breadcrumb, children, className, collapsed, colla
|
|
|
112
131
|
})
|
|
113
132
|
}) : null,
|
|
114
133
|
/* @__PURE__ */ jsxs("div", {
|
|
115
|
-
...stylex.props(styles.workspace),
|
|
134
|
+
...stylex.props(styles.workspace, !isDarkMode && styles.workspaceLight),
|
|
116
135
|
children: [/* @__PURE__ */ jsxs("header", {
|
|
117
136
|
...stylex.props(styles.topbar),
|
|
118
137
|
children: [
|
|
@@ -136,10 +155,11 @@ function ConsoleShell({ brand, breadcrumb, children, className, collapsed, colla
|
|
|
136
155
|
}) : null
|
|
137
156
|
]
|
|
138
157
|
}), /* @__PURE__ */ jsx("main", {
|
|
158
|
+
"aria-busy": loading || void 0,
|
|
139
159
|
id: mainId,
|
|
140
160
|
tabIndex: -1,
|
|
141
161
|
...stylex.props(styles.main),
|
|
142
|
-
children
|
|
162
|
+
children: body
|
|
143
163
|
})]
|
|
144
164
|
})
|
|
145
165
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleShell.mjs","names":["Flexbox"],"sources":["../../../src/dashboard/ConsoleShell/ConsoleShell.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { PanelLeft } from 'lucide-react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport Button from '@/Button';\nimport { Drawer } from '@/Drawer';\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { useIsCompact, useLocalStorage, usePrefersReducedMotion } from '../hooks';\nimport { ConsoleShellContext } from './context';\nimport { consoleBrandMarker } from './marker.stylex';\nimport { styles } from './style';\nimport type { ConsoleShellProps, ConsoleShellState } from './type';\n\nfunction isTypingTarget(target: EventTarget | null) {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n\nfunction ConsoleShell({\n brand,\n breadcrumb,\n children,\n className,\n collapsed,\n collapseLabel = 'Collapse sidebar',\n defaultCollapsed = false,\n expandLabel = 'Expand sidebar',\n footer,\n hotkey = true,\n navigation,\n onCollapsedChange,\n openNavigationLabel = 'Open navigation',\n skipToContentLabel = 'Skip to content',\n storageKey,\n style,\n tools,\n ...rest\n}: ConsoleShellProps) {\n const mainId = `console-main-${useId().replaceAll(':', '')}`;\n const shellRef = useRef<HTMLDivElement>(null);\n const isCompact = useIsCompact();\n const reducedMotion = usePrefersReducedMotion();\n const [storedCollapsed, setStoredCollapsed] = useLocalStorage(storageKey, defaultCollapsed);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const isControlled = collapsed !== undefined;\n const railCollapsed = isControlled ? collapsed : storedCollapsed;\n const railed = railCollapsed && !isCompact;\n\n const setCollapsed = (next: boolean) => {\n if (!isControlled) setStoredCollapsed(next);\n onCollapsedChange?.(next);\n };\n\n const closeNavigation = () => setDrawerOpen(false);\n const toggleNavigation = () => {\n if (isCompact) {\n setDrawerOpen((open) => !open);\n return;\n }\n setCollapsed(!railCollapsed);\n };\n const toggleRef = useRef(toggleNavigation);\n toggleRef.current = toggleNavigation;\n\n useEffect(() => {\n if (!hotkey) return;\n const node = shellRef.current;\n if (!node) return;\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key.toLowerCase() !== 'b' || !(event.metaKey || event.ctrlKey) || event.altKey) {\n return;\n }\n if (event.repeat || isTypingTarget(event.target)) return;\n if (!node.contains(event.target as Node)) return;\n event.preventDefault();\n toggleRef.current();\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [hotkey]);\n\n const stateFor = (rail: boolean): ConsoleShellState => ({\n closeNavigation,\n collapsed: rail,\n compact: isCompact,\n });\n\n const sidebar = (rail: boolean) => (\n <ConsoleShellContext value={stateFor(rail)}>\n {brand ? (\n <div data-collapsed={rail} {...stylex.props(styles.brand, consoleBrandMarker)}>\n {brand}\n </div>\n ) : null}\n {navigation ? <div {...stylex.props(styles.navSlot)}>{navigation}</div> : null}\n {footer ? <div {...stylex.props(styles.sidebarBottom)}>{footer}</div> : null}\n </ConsoleShellContext>\n );\n\n const toggleLabel = isCompact ? openNavigationLabel : railed ? expandLabel : collapseLabel;\n\n return (\n <div\n data-console-shell=\"\"\n ref={shellRef}\n {...styleProps(styles.shell, className, style)}\n {...rest}\n >\n <a\n href={`#${mainId}`}\n onClick={(event) => {\n event.preventDefault();\n document.getElementById(mainId)?.focus();\n }}\n {...stylex.props(styles.skipLink)}\n >\n {skipToContentLabel}\n </a>\n <aside\n data-collapsed={railed}\n data-instant={reducedMotion}\n {...stylex.props(\n styles.sidebar,\n railed && styles.sidebarCollapsed,\n reducedMotion && styles.sidebarInstant,\n )}\n >\n {!isCompact && sidebar(railed)}\n </aside>\n {isCompact ? (\n <Drawer noHeader open={drawerOpen} placement=\"left\" width={272} onClose={closeNavigation}>\n <Flexbox height=\"100%\">{sidebar(false)}</Flexbox>\n </Drawer>\n ) : null}\n <div {...stylex.props(styles.workspace)}>\n <header {...stylex.props(styles.topbar)}>\n <Button\n aria-label={toggleLabel}\n icon={PanelLeft}\n type=\"text\"\n onClick={toggleNavigation}\n />\n <span aria-hidden {...stylex.props(styles.topbarDivider)} />\n <div {...stylex.props(styles.topbarMain)}>{breadcrumb}</div>\n {tools ? <div {...stylex.props(styles.tools)}>{tools}</div> : null}\n </header>\n <main id={mainId} tabIndex={-1} {...stylex.props(styles.main)}>\n {children}\n </main>\n </div>\n </div>\n );\n}\n\nConsoleShell.displayName = 'ConsoleShell';\n\nexport default ConsoleShell;\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,eAAe,QAA4B;CAClD,IAAI,EAAE,kBAAkB,cAAc,OAAO;CAC7C,MAAM,MAAM,OAAO;CACnB,OAAO,QAAQ,WAAW,QAAQ,cAAc,QAAQ,YAAY,OAAO;AAC7E;AACA,SAAS,aAAa,EACpB,OACA,YACA,UACA,WACA,WACA,gBAAgB,oBAChB,mBAAmB,OACnB,cAAc,kBACd,QACA,SAAS,MACT,YACA,mBACA,sBAAsB,mBACtB,qBAAqB,mBACrB,YACA,OACA,OACA,GAAG,QACiB;CACpB,MAAM,SAAS,gBAAgB,MAAM,CAAC,CAAC,WAAW,KAAK,EAAE;CACzD,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,YAAY,aAAa;CAC/B,MAAM,gBAAgB,wBAAwB;CAC9C,MAAM,CAAC,iBAAiB,sBAAsB,gBAAgB,YAAY,gBAAgB;CAC1F,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,gBAAgB,eAAe,YAAY;CACjD,MAAM,SAAS,iBAAiB,CAAC;CACjC,MAAM,gBAAgB,SAAkB;EACtC,IAAI,CAAC,cAAc,mBAAmB,IAAI;EAC1C,oBAAoB,IAAI;CAC1B;CACA,MAAM,wBAAwB,cAAc,KAAK;CACjD,MAAM,yBAAyB;EAC7B,IAAI,WAAW;GACb,eAAc,SAAQ,CAAC,IAAI;GAC3B;EACF;EACA,aAAa,CAAC,aAAa;CAC7B;CACA,MAAM,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AQ;IAC9B,UAAA;GACA,CAAA;GACH,oBAAC,SAAD;IAAO,kBAAgB;IAAQ,gBAAc;IAAe,GAAI,OAAO,MAAM,OAAO,SAAS,UAAU,OAAO,kBAAkB,iBAAiB,OAAO,cAAc;IACnK,UAAA,CAAC,aAAa,QAAQ,MAAM;GACxB,CAAA;GACN,YAAY,oBAAC,QAAD;IAAQ,UAAA;IAAS,MAAM;IAAY,WAAU;IAAO,OAAO;IAAK,SAAS;IAClF,UAAA,oBAACA,mBAAD;KAAS,QAAO;KAAQ,UAAA,QAAQ,KAAK;IAAW,CAAA;GAC1C,CAAA,IAAI;GACd,qBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,SAAS;IAAtC,UAAA,CACE,qBAAC,UAAD;KAAQ,GAAI,OAAO,MAAM,OAAO,MAAM;KAAtC,UAAA;MACE,oBAAC,QAAD;OAAQ,cAAY;OAAa,MAAM;OAAW,MAAK;OAAO,SAAS;MAAmB,CAAA;MAC1F,oBAAC,QAAD;OAAM,eAAA;OAAY,GAAI,OAAO,MAAM,OAAO,aAAa;MAAI,CAAA;MAC3D,oBAAC,OAAD;OAAK,GAAI,OAAO,MAAM,OAAO,UAAU;OAAI,UAAA;MAAgB,CAAA;MAC1D,QAAQ,oBAAC,OAAD;OAAK,GAAI,OAAO,MAAM,OAAO,KAAK;OAAI,UAAA;MAAW,CAAA,IAAI;KACxD;IACR,CAAA,GAAA,oBAAC,QAAD;KAAM,IAAI;KAAQ,UAAU;KAAI,GAAI,OAAO,MAAM,OAAO,IAAI;KACzD;IACG,CAAA,CACH;;EACF;;AACT;AACA,aAAa,cAAc"}
|
|
1
|
+
{"version":3,"file":"ConsoleShell.mjs","names":["Flexbox"],"sources":["../../../src/dashboard/ConsoleShell/ConsoleShell.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { PanelLeft, X } from 'lucide-react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport Button from '@/Button';\nimport { Drawer } from '@/Drawer';\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { useThemeMode } from '@/styles/theme/scope';\n\nimport ConsoleNavSkeleton, { ConsoleFooterSkeleton } from '../ConsoleNav/Skeleton';\nimport { useIsCompact, useLocalStorage, usePrefersReducedMotion } from '../hooks';\nimport PageLoading from '../PageSkeleton';\nimport { ConsoleShellContext } from './context';\nimport { consoleBrandMarker } from './marker.stylex';\nimport { styles } from './style';\nimport type { ConsoleShellProps, ConsoleShellState } from './type';\n\n// The drawer body is the scroll container. Without its default padding the scrollbar sits on\n// the panel edge; the brand row, nav and footer keep their own insets.\nconst drawerBodyStyle = { minBlockSize: '100%', padding: 0 };\n\nfunction isTypingTarget(target: EventTarget | null) {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n\nfunction ConsoleShell({\n brand,\n breadcrumb,\n children,\n className,\n collapsed,\n closeNavigationLabel = 'Close navigation',\n collapseLabel = 'Collapse sidebar',\n defaultCollapsed = false,\n expandLabel = 'Expand sidebar',\n footer: footerProp,\n loading,\n loadingContent,\n loadingNavigation,\n hotkey = true,\n navigation: navigationProp,\n onCollapsedChange,\n openNavigationLabel = 'Open navigation',\n skipToContentLabel = 'Skip to content',\n storageKey,\n style,\n tools,\n ...rest\n}: ConsoleShellProps) {\n const navigation = loading ? (loadingNavigation ?? <ConsoleNavSkeleton />) : navigationProp;\n const footer = loading ? <ConsoleFooterSkeleton /> : footerProp;\n const body = loading ? (loadingContent ?? <PageLoading />) : children;\n const mainId = `console-main-${useId().replaceAll(':', '')}`;\n const shellRef = useRef<HTMLDivElement>(null);\n const isCompact = useIsCompact();\n const { isDarkMode } = useThemeMode();\n const reducedMotion = usePrefersReducedMotion();\n const [storedCollapsed, setStoredCollapsed] = useLocalStorage(storageKey, defaultCollapsed);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const isControlled = collapsed !== undefined;\n const railCollapsed = isControlled ? collapsed : storedCollapsed;\n const railed = railCollapsed && !isCompact;\n\n const setCollapsed = (next: boolean) => {\n if (!isControlled) setStoredCollapsed(next);\n onCollapsedChange?.(next);\n };\n\n const closeNavigation = () => setDrawerOpen(false);\n const toggleNavigation = () => {\n if (isCompact) {\n setDrawerOpen((open) => !open);\n return;\n }\n setCollapsed(!railCollapsed);\n };\n const toggleRef = useRef(toggleNavigation);\n toggleRef.current = toggleNavigation;\n\n useEffect(() => {\n if (!hotkey) return;\n const node = shellRef.current;\n if (!node) return;\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key.toLowerCase() !== 'b' || !(event.metaKey || event.ctrlKey) || event.altKey) {\n return;\n }\n if (event.repeat || isTypingTarget(event.target)) return;\n if (!node.contains(event.target as Node)) return;\n event.preventDefault();\n toggleRef.current();\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [hotkey]);\n\n const stateFor = (rail: boolean): ConsoleShellState => ({\n closeNavigation,\n collapsed: rail,\n compact: isCompact,\n });\n\n const sidebar = (rail: boolean) => (\n <ConsoleShellContext value={stateFor(rail)}>\n {brand || isCompact ? (\n <div data-collapsed={rail} {...stylex.props(styles.brand, consoleBrandMarker)}>\n {brand}\n {isCompact ? (\n // In the drawer the close button sits in the brand row's flow, so it never\n // overlaps a brand switcher the way the drawer's floating close button did.\n <Button\n aria-label={closeNavigationLabel}\n className={stylex.props(styles.brandClose).className}\n icon={X}\n type=\"text\"\n onClick={closeNavigation}\n />\n ) : null}\n </div>\n ) : null}\n {navigation ? <div {...stylex.props(styles.navSlot)}>{navigation}</div> : null}\n {footer ? <div {...stylex.props(styles.sidebarBottom)}>{footer}</div> : null}\n </ConsoleShellContext>\n );\n\n const toggleLabel = isCompact ? openNavigationLabel : railed ? expandLabel : collapseLabel;\n\n return (\n <div\n data-console-shell=\"\"\n ref={shellRef}\n {...styleProps(styles.shell, className, style)}\n {...rest}\n >\n <a\n href={`#${mainId}`}\n onClick={(event) => {\n event.preventDefault();\n document.getElementById(mainId)?.focus();\n }}\n {...stylex.props(styles.skipLink)}\n >\n {skipToContentLabel}\n </a>\n <aside\n data-collapsed={railed}\n data-instant={reducedMotion}\n {...stylex.props(\n styles.sidebar,\n railed && styles.sidebarCollapsed,\n reducedMotion && styles.sidebarInstant,\n )}\n >\n {!isCompact && sidebar(railed)}\n </aside>\n {isCompact ? (\n <Drawer\n noHeader\n closable={false}\n open={drawerOpen}\n placement=\"left\"\n styles={{ bodyContent: drawerBodyStyle }}\n width={272}\n onClose={closeNavigation}\n >\n <Flexbox height=\"100%\">{sidebar(false)}</Flexbox>\n </Drawer>\n ) : null}\n <div {...stylex.props(styles.workspace, !isDarkMode && styles.workspaceLight)}>\n <header {...stylex.props(styles.topbar)}>\n <Button\n aria-label={toggleLabel}\n icon={PanelLeft}\n type=\"text\"\n onClick={toggleNavigation}\n />\n <span aria-hidden {...stylex.props(styles.topbarDivider)} />\n <div {...stylex.props(styles.topbarMain)}>{breadcrumb}</div>\n {tools ? <div {...stylex.props(styles.tools)}>{tools}</div> : null}\n </header>\n <main\n aria-busy={loading || undefined}\n id={mainId}\n tabIndex={-1}\n {...stylex.props(styles.main)}\n >\n {body}\n </main>\n </div>\n </div>\n );\n}\n\nConsoleShell.displayName = 'ConsoleShell';\n\nexport default ConsoleShell;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,kBAAkB;CACtB,cAAc;CACd,SAAS;AACX;AACA,SAAS,eAAe,QAA4B;CAClD,IAAI,EAAE,kBAAkB,cAAc,OAAO;CAC7C,MAAM,MAAM,OAAO;CACnB,OAAO,QAAQ,WAAW,QAAQ,cAAc,QAAQ,YAAY,OAAO;AAC7E;AACA,SAAS,aAAa,EACpB,OACA,YACA,UACA,WACA,WACA,uBAAuB,oBACvB,gBAAgB,oBAChB,mBAAmB,OACnB,cAAc,kBACd,QAAQ,YACR,SACA,gBACA,mBACA,SAAS,MACT,YAAY,g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
|
20
26
|
kGNEyG: "lb6s0dn4",
|
|
@@ -142,6 +148,10 @@ const styles = {
|
|
|
142
148
|
keTefX: "lbvc5jky",
|
|
143
149
|
$$css: true
|
|
144
150
|
},
|
|
151
|
+
workspaceLight: {
|
|
152
|
+
kWkggS: "lb8ezckp",
|
|
153
|
+
$$css: true
|
|
154
|
+
},
|
|
145
155
|
workspace: {
|
|
146
156
|
kVAM5u: "lb10cypdb lb1sbdsi5",
|
|
147
157
|
kaIpWk: "lb1ndkxwp lbc7dp1m",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nimport { consoleBrandMarker } from './marker.stylex';\n\nconst SIDEBAR_INLINE_SIZE = 248;\n// Twice the nav icon inset (8px nav padding + 10px item padding) plus the 18px icon, so the icons\n// land centered on the rail without moving sideways.\nconst SIDEBAR_RAIL_INLINE_SIZE = 54;\nconst WORKSPACE_INSET = 8;\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst flushPage = ':has([data-page-layout=\"flush\"])';\n\n/**\n * `media.laptop`, not `media.tablet`. The aliases are named for\n * devices, and only `laptop` (max-width 991px) lines up with `useIsCompact`.\n */\nexport const styles = stylex.create({\n brand: {\n flex: 'none',\n paddingInline: 15,\n alignItems: 'center',\n blockSize: 56,\n color: cssVar.colorText,\n display: 'flex',\n marginBlockStart: { default: WORKSPACE_INSET, [media.laptop]: 0 },\n whiteSpace: 'nowrap',\n },\n brandAnchor: {\n textDecoration: 'none',\n alignItems: 'center',\n color: 'inherit',\n display: 'flex',\n inlineSize: '100%',\n minInlineSize: 0,\n },\n brandLockup: {\n gap: 10,\n alignItems: 'center',\n display: 'flex',\n minInlineSize: 0,\n },\n brandName: {\n overflow: 'hidden',\n transition: { default: 'opacity 120ms ease 80ms', [reducedMotion]: 'none' },\n color: cssVar.colorText,\n fontSize: 14,\n fontWeight: 600,\n lineHeight: 1.3,\n opacity: {\n default: null,\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: 0,\n },\n textOverflow: {\n default: 'ellipsis',\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: 'clip',\n },\n transitionDelay: {\n default: null,\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: '0s',\n },\n whiteSpace: 'nowrap',\n },\n main: {\n padding: {\n default: 24,\n [flushPage]: 0,\n [media.mobile]: { default: 16, [flushPage]: 0 },\n },\n flex: '1',\n gap: {\n default: 20,\n [flushPage]: 0,\n [media.mobile]: { default: 16, [flushPage]: 0 },\n },\n overflow: { default: 'auto', [flushPage]: 'hidden' },\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n minInlineSize: 0,\n },\n navSlot: {\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n },\n shell: {\n flex: '1',\n overflow: 'hidden',\n backgroundColor: cssVar.colorBgLayout,\n blockSize: '100%',\n display: 'flex',\n minBlockSize: 0,\n },\n sidebar: {\n flex: 'none',\n overflow: 'hidden',\n transition: 'inline-size 200ms ease',\n blockSize: '100%',\n display: { default: 'flex', [media.laptop]: 'none' },\n flexDirection: 'column',\n inlineSize: SIDEBAR_INLINE_SIZE,\n minBlockSize: 0,\n },\n sidebarCollapsed: {\n inlineSize: SIDEBAR_RAIL_INLINE_SIZE,\n },\n sidebarInstant: {\n transition: 'none',\n },\n sidebarBottom: {\n padding: 8,\n flex: 'none',\n },\n skipLink: {\n borderRadius: cssVar.borderRadius,\n paddingBlock: 8,\n paddingInline: 12,\n backgroundColor: cssVar.colorBgElevated,\n color: cssVar.colorText,\n insetBlockStart: { 'default': -100, ':focus': 12 },\n insetInlineStart: 12,\n position: 'fixed',\n zIndex: 2000,\n },\n topbar: {\n flex: 'none',\n gap: 8,\n paddingInline: 12,\n alignItems: 'center',\n blockSize: 56,\n borderBlockEndColor: cssVar.colorBorderSecondary,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n display: 'flex',\n },\n topbarDivider: {\n flex: 'none',\n marginInline: 2,\n backgroundColor: cssVar.colorBorderSecondary,\n blockSize: 18,\n inlineSize: 1,\n },\n topbarMain: {\n flex: '1',\n alignItems: 'center',\n display: 'flex',\n minInlineSize: 0,\n },\n tools: {\n flex: 'none',\n gap: 6,\n alignItems: 'center',\n display: 'flex',\n marginInlineStart: 'auto',\n },\n workspace: {\n borderColor: { default: cssVar.colorBorderSecondary, [media.laptop]: 'currentcolor' },\n borderRadius: { default: cssVar.borderRadiusLG, [media.laptop]: 0 },\n borderStyle: { default: 'solid', [media.laptop]: 'none' },\n borderWidth: { default: 1, [media.laptop]: 'medium' },\n flex: '1',\n marginBlock: { default: WORKSPACE_INSET, [media.laptop]: 0 },\n marginInline: { default: `0 ${WORKSPACE_INSET}px`, [media.laptop]: 0 },\n overflow: 'hidden',\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: { default: cssVar.boxShadowTertiary, [media.laptop]: 'none' },\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n minInlineSize: 0,\n },\n});\n"],"mappings":";;;;;AAmBA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QA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Q;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nimport { consoleBrandMarker } from './marker.stylex';\n\nconst SIDEBAR_INLINE_SIZE = 248;\n// Twice the nav icon inset (8px nav padding + 10px item padding) plus the 18px icon, so the icons\n// land centered on the rail without moving sideways.\nconst SIDEBAR_RAIL_INLINE_SIZE = 54;\nconst WORKSPACE_INSET = 8;\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst flushPage = ':has([data-page-layout=\"flush\"])';\n\n/**\n * `media.laptop`, not `media.tablet`. The aliases are named for\n * devices, and only `laptop` (max-width 991px) lines up with `useIsCompact`.\n */\nexport const styles = stylex.create({\n brand: {\n flex: 'none',\n paddingInline: 15,\n alignItems: 'center',\n blockSize: 56,\n color: cssVar.colorText,\n display: 'flex',\n marginBlockStart: { default: WORKSPACE_INSET, [media.laptop]: 0 },\n whiteSpace: 'nowrap',\n },\n /** Close button in the drawer's brand row: right edge, vertically centred with the brand. */\n brandClose: {\n flex: 'none',\n marginInlineEnd: '-7px',\n marginInlineStart: 'auto',\n },\n brandAnchor: {\n textDecoration: 'none',\n alignItems: 'center',\n color: 'inherit',\n display: 'flex',\n inlineSize: '100%',\n minInlineSize: 0,\n },\n brandLockup: {\n gap: 10,\n alignItems: 'center',\n display: 'flex',\n minInlineSize: 0,\n },\n brandName: {\n overflow: 'hidden',\n transition: { default: 'opacity 120ms ease 80ms', [reducedMotion]: 'none' },\n color: cssVar.colorText,\n fontSize: 14,\n fontWeight: 600,\n lineHeight: 1.3,\n opacity: {\n default: null,\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: 0,\n },\n textOverflow: {\n default: 'ellipsis',\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: 'clip',\n },\n transitionDelay: {\n default: null,\n [stylex.when.ancestor('[data-collapsed=\"true\"]', consoleBrandMarker)]: '0s',\n },\n whiteSpace: 'nowrap',\n },\n main: {\n padding: {\n default: 24,\n [flushPage]: 0,\n [media.mobile]: { default: 16, [flushPage]: 0 },\n },\n flex: '1',\n gap: {\n default: 20,\n [flushPage]: 0,\n [media.mobile]: { default: 16, [flushPage]: 0 },\n },\n overflow: { default: 'auto', [flushPage]: 'hidden' },\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n minInlineSize: 0,\n },\n navSlot: {\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n },\n shell: {\n flex: '1',\n overflow: 'hidden',\n backgroundColor: cssVar.colorBgLayout,\n blockSize: '100%',\n display: 'flex',\n minBlockSize: 0,\n },\n sidebar: {\n flex: 'none',\n overflow: 'hidden',\n transition: 'inline-size 200ms ease',\n blockSize: '100%',\n display: { default: 'flex', [media.laptop]: 'none' },\n flexDirection: 'column',\n inlineSize: SIDEBAR_INLINE_SIZE,\n minBlockSize: 0,\n },\n sidebarCollapsed: {\n inlineSize: SIDEBAR_RAIL_INLINE_SIZE,\n },\n sidebarInstant: {\n transition: 'none',\n },\n sidebarBottom: {\n padding: 8,\n flex: 'none',\n },\n skipLink: {\n borderRadius: cssVar.borderRadius,\n paddingBlock: 8,\n paddingInline: 12,\n backgroundColor: cssVar.colorBgElevated,\n color: cssVar.colorText,\n insetBlockStart: { 'default': -100, ':focus': 12 },\n insetInlineStart: 12,\n position: 'fixed',\n zIndex: 2000,\n },\n topbar: {\n flex: 'none',\n gap: 8,\n paddingInline: 12,\n alignItems: 'center',\n blockSize: 56,\n borderBlockEndColor: cssVar.colorBorderSecondary,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n display: 'flex',\n },\n topbarDivider: {\n flex: 'none',\n marginInline: 2,\n backgroundColor: cssVar.colorBorderSecondary,\n blockSize: 18,\n inlineSize: 1,\n },\n topbarMain: {\n flex: '1',\n alignItems: 'center',\n display: 'flex',\n minInlineSize: 0,\n },\n tools: {\n flex: 'none',\n gap: 6,\n alignItems: 'center',\n display: 'flex',\n marginInlineStart: 'auto',\n },\n /** Light only: the content area sits midway between the layout canvas and container white. */\n workspaceLight: {\n backgroundColor: `color-mix(in srgb, ${cssVar.colorBgLayout} 50%, ${cssVar.colorBgContainer})`,\n },\n workspace: {\n borderColor: { default: cssVar.colorBorderSecondary, [media.laptop]: 'currentcolor' },\n borderRadius: { default: cssVar.borderRadiusLG, [media.laptop]: 0 },\n borderStyle: { default: 'solid', [media.laptop]: 'none' },\n borderWidth: { default: 1, [media.laptop]: 'medium' },\n flex: '1',\n marginBlock: { default: WORKSPACE_INSET, [media.laptop]: 0 },\n marginInline: { default: `0 ${WORKSPACE_INSET}px`, [media.laptop]: 0 },\n overflow: 'hidden',\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: { default: cssVar.boxShadowTertiary, [media.laptop]: 'none' },\n display: 'flex',\n flexDirection: 'column',\n minBlockSize: 0,\n minInlineSize: 0,\n },\n});\n"],"mappings":";;;;;AAmBA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;E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;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -38,6 +38,8 @@ export interface ConsoleShellProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
38
38
|
/** Location shown in the top bar, usually a `Breadcrumb`. */
|
|
39
39
|
breadcrumb?: ReactNode;
|
|
40
40
|
children?: ReactNode;
|
|
41
|
+
/** Accessible name of the close button in the compact navigation drawer. */
|
|
42
|
+
closeNavigationLabel?: string;
|
|
41
43
|
/** Collapse the sidebar to an icon rail. Ignored while compact. */
|
|
42
44
|
collapsed?: boolean;
|
|
43
45
|
collapseLabel?: string;
|
|
@@ -50,6 +52,15 @@ export interface ConsoleShellProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
50
52
|
* @default true
|
|
51
53
|
*/
|
|
52
54
|
hotkey?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Swap navigation and footer for skeletons, and render `loadingContent` (default `PageLoading`)
|
|
57
|
+
* in place of children. Brand, tools and `storageKey` still come from the caller.
|
|
58
|
+
*/
|
|
59
|
+
loading?: boolean;
|
|
60
|
+
/** Body while `loading`. Defaults to `<PageLoading />`. */
|
|
61
|
+
loadingContent?: ReactNode;
|
|
62
|
+
/** Skeleton nav shape while `loading`. Pass the real groups to mirror their row counts. */
|
|
63
|
+
loadingNavigation?: ReactNode;
|
|
53
64
|
/** Grouped navigation. Collapsed state comes from the shell. */
|
|
54
65
|
navigation?: ReactNode;
|
|
55
66
|
onCollapsedChange?: (collapsed: boolean) => void;
|