@lobehub/ui 5.58.0 → 5.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ActionIcon/style.mjs +8 -2
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/Grid/style.mjs +8 -8
- package/es/Grid/style.mjs.map +1 -1
- package/es/awesome/Grainient/Grainient.d.mts +11 -0
- package/es/awesome/Grainient/Grainient.mjs +311 -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 +25 -0
- package/es/awesome/Grainient/style.mjs.map +1 -0
- package/es/awesome/Grainient/type.d.mts +122 -0
- package/es/awesome/index.d.mts +4 -1
- package/es/awesome/index.mjs +2 -1
- package/es/base-ui/ActionIcon/style.mjs +8 -2
- package/es/base-ui/ActionIcon/style.mjs.map +1 -1
- package/es/base-ui/Input/style.mjs +8 -2
- package/es/base-ui/Input/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
- package/es/dashboard/AuthLayout/Aside.mjs +30 -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 +120 -1
- package/es/dashboard/AuthLayout/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/type.d.mts +39 -3
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +32 -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 +63 -0
- package/es/dashboard/AuthTools/style.mjs.map +1 -0
- package/es/dashboard/AuthTools/type.d.mts +30 -0
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +18 -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 +32 -0
- package/es/dashboard/ChartGrid/style.mjs.map +1 -0
- package/es/dashboard/ChartGrid/type.d.mts +9 -0
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs +81 -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 +15 -0
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/type.d.mts +14 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +22 -6
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +21 -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 +94 -0
- package/es/dashboard/FilterStrip/style.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +26 -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 +12 -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 +161 -0
- package/es/dashboard/MetricStrip/style.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +37 -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 +21 -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 +34 -0
- package/es/dashboard/PageToolbar/style.mjs.map +1 -0
- package/es/dashboard/PageToolbar/type.d.mts +12 -0
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +39 -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 +24 -0
- package/es/dashboard/PanelSurface/style.mjs.map +1 -0
- package/es/dashboard/PanelSurface/type.d.mts +18 -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 +35 -0
- package/es/dashboard/Section/style.mjs.map +1 -0
- package/es/dashboard/Section/type.d.mts +24 -0
- package/es/dashboard/StatCard/StatCard.d.mts +2 -1
- package/es/dashboard/StatCard/StatCard.mjs +24 -72
- 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 +83 -7
- 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 +19 -0
- package/es/dashboard/Surface/link.mjs +33 -0
- package/es/dashboard/Surface/link.mjs.map +1 -0
- package/es/dashboard/Surface/style.d.mts +45 -3
- package/es/dashboard/Surface/style.mjs +358 -8
- package/es/dashboard/Surface/style.mjs.map +1 -1
- package/es/dashboard/Surface/type.d.mts +30 -2
- 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 +18 -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 +11 -0
- package/es/dashboard/index.d.mts +38 -4
- package/es/dashboard/index.mjs +17 -3
- package/package.json +1 -1
- package/es/dashboard/StatCard/style.mjs +0 -135
- package/es/dashboard/StatCard/style.mjs.map +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styles } from "../Surface/style.mjs";
|
|
3
|
+
import { useSurfaceCardClassName } from "../Surface/link.mjs";
|
|
4
|
+
import Surface from "../Surface/Surface.mjs";
|
|
5
|
+
import { styles as styles$1 } from "./style.mjs";
|
|
6
|
+
import MetricCell from "./MetricCell.mjs";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { cx } from "antd-style";
|
|
9
|
+
//#region src/dashboard/MetricStrip/MetricStrip.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Peer metrics. `joined` shares one card divided into cells; `split` gives each item its own card,
|
|
12
|
+
* identical to StatCard.
|
|
13
|
+
*/
|
|
14
|
+
const MetricStrip = ({ items, loading, renderLink, variant = "joined" }) => {
|
|
15
|
+
const cardClassName = useSurfaceCardClassName();
|
|
16
|
+
if (variant === "split") return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: styles$1.split,
|
|
18
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: cx(styles$1.card, cardClassName, styles.clip),
|
|
20
|
+
children: /* @__PURE__ */ jsx(MetricCell, {
|
|
21
|
+
item,
|
|
22
|
+
loading,
|
|
23
|
+
renderLink
|
|
24
|
+
})
|
|
25
|
+
}, index))
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsx(Surface, {
|
|
28
|
+
className: styles.clip,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: styles$1.frame,
|
|
31
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: styles$1.grid,
|
|
33
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(MetricCell, {
|
|
34
|
+
seam: true,
|
|
35
|
+
item,
|
|
36
|
+
loading,
|
|
37
|
+
renderLink
|
|
38
|
+
}, index))
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
MetricStrip.displayName = "MetricStrip";
|
|
44
|
+
//#endregion
|
|
45
|
+
export { MetricStrip as default };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=MetricStrip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricStrip.mjs","names":["styles","surfaceStyles"],"sources":["../../../src/dashboard/MetricStrip/MetricStrip.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\n\nimport { useSurfaceCardClassName } from '../Surface/link';\nimport { styles as surfaceStyles } from '../Surface/style';\nimport Surface from '../Surface/Surface';\nimport MetricCell from './MetricCell';\nimport { styles } from './style';\nimport type { MetricStripProps } from './type';\n\n/**\n * Peer metrics. `joined` shares one card divided into cells; `split` gives each item its own card,\n * identical to StatCard.\n */\nconst MetricStrip = ({ items, loading, renderLink, variant = 'joined' }: MetricStripProps) => {\n const cardClassName = useSurfaceCardClassName();\n\n if (variant === 'split') {\n return (\n <div className={styles.split}>\n {items.map((item, index) => (\n <div className={cx(styles.card, cardClassName, surfaceStyles.clip)} key={index}>\n <MetricCell item={item} loading={loading} renderLink={renderLink} />\n </div>\n ))}\n </div>\n );\n }\n\n return (\n <Surface className={surfaceStyles.clip}>\n <div className={styles.frame}>\n <div className={styles.grid}>\n {items.map((item, index) => (\n <MetricCell seam item={item} key={index} loading={loading} renderLink={renderLink} />\n ))}\n </div>\n </div>\n </Surface>\n );\n};\n\nMetricStrip.displayName = 'MetricStrip';\n\nexport default MetricStrip;\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,eAAe,EAAE,OAAO,SAAS,YAAY,UAAU,eAAiC;CAC5F,MAAM,gBAAgB,wBAAwB;CAE9C,IAAI,YAAY,SACd,OACE,oBAAC,OAAD;EAAK,WAAWA,SAAO;EACpB,UAAA,MAAM,KAAK,MAAM,UAChB,oBAAC,OAAD;GAAK,WAAW,GAAGA,SAAO,MAAM,eAAeC,OAAc,IAAI;GAC/D,UAAA,oBAAC,YAAD;IAAkB;IAAe;IAAqB;GAAa,CAAA;EAChE,GAFoE,KAEpE,CACN;CACE,CAAA;CAIT,OACE,oBAAC,SAAD;EAAS,WAAWA,OAAc;EAChC,UAAA,oBAAC,OAAD;GAAK,WAAWD,SAAO;GACrB,UAAA,oBAAC,OAAD;IAAK,WAAWA,SAAO;IACpB,UAAA,MAAM,KAAK,MAAM,UAChB,oBAAC,YAAD;KAAY,MAAA;KAAW;KAA2B;KAAqB;IAAa,GAAlD,KAAkD,CACrF;GACE,CAAA;EACF,CAAA;CACE,CAAA;AAEb;AAEA,YAAY,cAAc"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { createStaticStyles } from "antd-style";
|
|
2
|
+
//#region src/dashboard/MetricStrip/style.ts
|
|
3
|
+
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
4
|
+
cell: css`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 6px;
|
|
8
|
+
|
|
9
|
+
min-inline-size: 0;
|
|
10
|
+
padding-block: 16px;
|
|
11
|
+
padding-inline: 20px;
|
|
12
|
+
|
|
13
|
+
background: transparent;
|
|
14
|
+
`,
|
|
15
|
+
/** Joined strip only: the divider on the cell's trailing and bottom edges. */
|
|
16
|
+
cellSeam: css`
|
|
17
|
+
box-shadow:
|
|
18
|
+
inset -1px 0 0 var(--metric-seam),
|
|
19
|
+
inset 0 -1px 0 var(--metric-seam);
|
|
20
|
+
`,
|
|
21
|
+
/** Split strip and StatCard: one card per item. */
|
|
22
|
+
card: css`
|
|
23
|
+
display: grid;
|
|
24
|
+
min-inline-size: 0;
|
|
25
|
+
`,
|
|
26
|
+
head: css`
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 8px;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
min-inline-size: 0;
|
|
34
|
+
block-size: 32px;
|
|
35
|
+
`,
|
|
36
|
+
headCopy: css`
|
|
37
|
+
display: flex;
|
|
38
|
+
gap: 6px;
|
|
39
|
+
align-items: center;
|
|
40
|
+
min-inline-size: 0;
|
|
41
|
+
`,
|
|
42
|
+
mark: css`
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
flex: none;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
|
|
48
|
+
inline-size: 24px;
|
|
49
|
+
block-size: 24px;
|
|
50
|
+
border: 1px solid ${cssVar.colorFillSecondary};
|
|
51
|
+
border-radius: ${cssVar.borderRadiusSM};
|
|
52
|
+
|
|
53
|
+
color: ${cssVar.colorTextTertiary};
|
|
54
|
+
|
|
55
|
+
background: ${cssVar.colorFillTertiary};
|
|
56
|
+
`,
|
|
57
|
+
split: css`
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
60
|
+
gap: 12px;
|
|
61
|
+
`,
|
|
62
|
+
delta: css`
|
|
63
|
+
font-size: 13px;
|
|
64
|
+
font-variant-numeric: tabular-nums;
|
|
65
|
+
line-height: 1.4;
|
|
66
|
+
`,
|
|
67
|
+
deltaDown: css`
|
|
68
|
+
color: ${cssVar.colorError};
|
|
69
|
+
`,
|
|
70
|
+
deltaFlat: css`
|
|
71
|
+
color: ${cssVar.colorTextSecondary};
|
|
72
|
+
`,
|
|
73
|
+
deltaUp: css`
|
|
74
|
+
color: ${cssVar.colorSuccess};
|
|
75
|
+
`,
|
|
76
|
+
foot: css`
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
align-items: baseline;
|
|
81
|
+
`,
|
|
82
|
+
/**
|
|
83
|
+
* Clips the seam that would otherwise sit on the card's trailing and bottom
|
|
84
|
+
* edges. A short last row used to show the seam color across the empty
|
|
85
|
+
* track, which reads louder than the cells.
|
|
86
|
+
*/
|
|
87
|
+
frame: css`
|
|
88
|
+
--metric-seam: ${cssVar.colorFillSecondary};
|
|
89
|
+
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
border-radius: inherit;
|
|
92
|
+
background: transparent;
|
|
93
|
+
`,
|
|
94
|
+
grid: css`
|
|
95
|
+
display: grid;
|
|
96
|
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
97
|
+
|
|
98
|
+
inline-size: calc(100% + 1px);
|
|
99
|
+
margin-block-end: -1px;
|
|
100
|
+
|
|
101
|
+
background: transparent;
|
|
102
|
+
`,
|
|
103
|
+
hint: css`
|
|
104
|
+
font-size: 13px;
|
|
105
|
+
line-height: 1.4;
|
|
106
|
+
color: ${cssVar.colorTextSecondary};
|
|
107
|
+
`,
|
|
108
|
+
label: css`
|
|
109
|
+
font-size: 13px;
|
|
110
|
+
font-weight: 500;
|
|
111
|
+
line-height: 1.4;
|
|
112
|
+
color: ${cssVar.colorTextSecondary};
|
|
113
|
+
`,
|
|
114
|
+
link: css`
|
|
115
|
+
color: inherit;
|
|
116
|
+
text-decoration: none;
|
|
117
|
+
|
|
118
|
+
&:hover {
|
|
119
|
+
background: ${cssVar.colorFillQuaternary};
|
|
120
|
+
}
|
|
121
|
+
`,
|
|
122
|
+
press: css`
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
|
|
125
|
+
border: none;
|
|
126
|
+
|
|
127
|
+
font: inherit;
|
|
128
|
+
color: inherit;
|
|
129
|
+
text-align: start;
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
background: ${cssVar.colorFillQuaternary};
|
|
133
|
+
}
|
|
134
|
+
`,
|
|
135
|
+
/** Grid cell around a rendered link, so the link fills it. */
|
|
136
|
+
slot: css`
|
|
137
|
+
display: grid;
|
|
138
|
+
min-inline-size: 0;
|
|
139
|
+
`,
|
|
140
|
+
value: css`
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
|
|
143
|
+
font-size: ${cssVar.fontSizeHeading3};
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
font-variant-numeric: tabular-nums;
|
|
146
|
+
line-height: 1.15;
|
|
147
|
+
color: ${cssVar.colorText};
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
`,
|
|
151
|
+
valueDanger: css`
|
|
152
|
+
color: ${cssVar.colorError};
|
|
153
|
+
`,
|
|
154
|
+
valueWarning: css`
|
|
155
|
+
color: ${cssVar.colorWarning};
|
|
156
|
+
`
|
|
157
|
+
}));
|
|
158
|
+
//#endregion
|
|
159
|
+
export { styles };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/MetricStrip/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n cell: css`\n display: flex;\n flex-direction: column;\n gap: 6px;\n\n min-inline-size: 0;\n padding-block: 16px;\n padding-inline: 20px;\n\n background: transparent;\n `,\n /** Joined strip only: the divider on the cell's trailing and bottom edges. */\n cellSeam: css`\n box-shadow:\n inset -1px 0 0 var(--metric-seam),\n inset 0 -1px 0 var(--metric-seam);\n `,\n /** Split strip and StatCard: one card per item. */\n card: css`\n display: grid;\n min-inline-size: 0;\n `,\n /* One fixed 32px row (a small Segmented or ActionIcon fits): an action or mark in the head must not push the value down, so cells with and\n without header controls line up across a split strip or a row of StatCards. */\n head: css`\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: space-between;\n\n box-sizing: border-box;\n min-inline-size: 0;\n block-size: 32px;\n `,\n headCopy: css`\n display: flex;\n gap: 6px;\n align-items: center;\n min-inline-size: 0;\n `,\n mark: css`\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n inline-size: 24px;\n block-size: 24px;\n border: 1px solid ${cssVar.colorFillSecondary};\n border-radius: ${cssVar.borderRadiusSM};\n\n color: ${cssVar.colorTextTertiary};\n\n background: ${cssVar.colorFillTertiary};\n `,\n split: css`\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 12px;\n `,\n delta: css`\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n line-height: 1.4;\n `,\n deltaDown: css`\n color: ${cssVar.colorError};\n `,\n deltaFlat: css`\n color: ${cssVar.colorTextSecondary};\n `,\n deltaUp: css`\n color: ${cssVar.colorSuccess};\n `,\n foot: css`\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: baseline;\n `,\n /**\n * Clips the seam that would otherwise sit on the card's trailing and bottom\n * edges. A short last row used to show the seam color across the empty\n * track, which reads louder than the cells.\n */\n frame: css`\n --metric-seam: ${cssVar.colorFillSecondary};\n\n overflow: hidden;\n border-radius: inherit;\n background: transparent;\n `,\n grid: css`\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n\n inline-size: calc(100% + 1px);\n margin-block-end: -1px;\n\n background: transparent;\n `,\n hint: css`\n font-size: 13px;\n line-height: 1.4;\n color: ${cssVar.colorTextSecondary};\n `,\n label: css`\n font-size: 13px;\n font-weight: 500;\n line-height: 1.4;\n color: ${cssVar.colorTextSecondary};\n `,\n link: css`\n color: inherit;\n text-decoration: none;\n\n &:hover {\n background: ${cssVar.colorFillQuaternary};\n }\n `,\n press: css`\n cursor: pointer;\n\n border: none;\n\n font: inherit;\n color: inherit;\n text-align: start;\n\n &:hover {\n background: ${cssVar.colorFillQuaternary};\n }\n `,\n /** Grid cell around a rendered link, so the link fills it. */\n slot: css`\n display: grid;\n min-inline-size: 0;\n `,\n value: css`\n overflow: hidden;\n\n font-size: ${cssVar.fontSizeHeading3};\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n line-height: 1.15;\n color: ${cssVar.colorText};\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n valueDanger: css`\n color: ${cssVar.colorError};\n `,\n valueWarning: css`\n color: ${cssVar.colorWarning};\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,MAAM,GAAG;;;;;;;;;;;;CAYT,UAAU,GAAG;;;;;;CAMb,MAAM,GAAG;;;;CAMT,MAAM,GAAG;;;;;;;;;;CAUT,UAAU,GAAG;;;;;;CAMb,MAAM,GAAG;;;;;;;;wBAQa,OAAO,mBAAmB;qBAC7B,OAAO,eAAe;;aAE9B,OAAO,kBAAkB;;kBAEpB,OAAO,kBAAkB;;CAEzC,OAAO,GAAG;;;;;CAKV,OAAO,GAAG;;;;;CAKV,WAAW,GAAG;aACH,OAAO,WAAW;;CAE7B,WAAW,GAAG;aACH,OAAO,mBAAmB;;CAErC,SAAS,GAAG;aACD,OAAO,aAAa;;CAE/B,MAAM,GAAG;;;;;;;;;;;CAWT,OAAO,GAAG;qBACS,OAAO,mBAAmB;;;;;;CAM7C,MAAM,GAAG;;;;;;;;;CAST,MAAM,GAAG;;;aAGE,OAAO,mBAAmB;;CAErC,OAAO,GAAG;;;;aAIC,OAAO,mBAAmB;;CAErC,MAAM,GAAG;;;;;oBAKS,OAAO,oBAAoB;;;CAG7C,OAAO,GAAG;;;;;;;;;;oBAUQ,OAAO,oBAAoB;;;;CAI7C,MAAM,GAAG;;;;CAIT,OAAO,GAAG;;;iBAGK,OAAO,iBAAiB;;;;aAI5B,OAAO,UAAU;;;;CAI5B,aAAa,GAAG;aACL,OAAO,WAAW;;CAE7B,cAAc,GAAG;aACN,OAAO,aAAa;;AAEjC,EAAE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IconProps } from "../../Icon/type.mjs";
|
|
2
|
+
import "../../Icon/index.mjs";
|
|
3
|
+
import { SurfaceRenderLink } from "../Surface/type.mjs";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
//#region src/dashboard/MetricStrip/type.d.ts
|
|
6
|
+
interface MetricItem {
|
|
7
|
+
/** Control on the label row, such as a menu. */
|
|
8
|
+
action?: ReactNode;
|
|
9
|
+
delta?: ReactNode;
|
|
10
|
+
direction?: 'up' | 'down' | 'flat';
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
href?: string;
|
|
13
|
+
label: ReactNode;
|
|
14
|
+
/** This cell only. Cells fed by different queries arrive at different times. */
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
/** Corner glyph. Hidden from assistive tech so it does not repeat the label. */
|
|
17
|
+
mark?: IconProps['icon'];
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
value: ReactNode;
|
|
20
|
+
/** Color the figure when the number itself is the thing to act on. */
|
|
21
|
+
valueTone?: 'danger' | 'warning';
|
|
22
|
+
}
|
|
23
|
+
interface MetricStripProps {
|
|
24
|
+
items: MetricItem[];
|
|
25
|
+
/** First load only: values become placeholders, labels stay. */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
renderLink?: SurfaceRenderLink;
|
|
28
|
+
/**
|
|
29
|
+
* `joined`: one card divided into cells. `split`: every item is its own card (the StatCard look)
|
|
30
|
+
* on a responsive grid with a gap.
|
|
31
|
+
* @default 'joined'
|
|
32
|
+
*/
|
|
33
|
+
variant?: 'joined' | 'split';
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { MetricItem, MetricStripProps };
|
|
37
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import Skeleton from "../../base-ui/Skeleton/index.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { styles
|
|
3
|
+
import { useSurfaceCardClassName } from "../Surface/link.mjs";
|
|
4
|
+
import { styles } from "./style.mjs";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/dashboard/PageSkeleton/PageSkeleton.tsx
|
|
7
7
|
const bone = {
|
|
@@ -17,7 +17,7 @@ const lineWidths = [
|
|
|
17
17
|
function LoadingAnnouncer({ label }) {
|
|
18
18
|
return /* @__PURE__ */ jsx("output", {
|
|
19
19
|
"aria-live": "polite",
|
|
20
|
-
className: styles
|
|
20
|
+
className: styles.srOnly,
|
|
21
21
|
children: label
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -25,43 +25,44 @@ LoadingAnnouncer.displayName = "LoadingAnnouncer";
|
|
|
25
25
|
function PageHeaderSkeleton({ action = true }) {
|
|
26
26
|
return /* @__PURE__ */ jsxs("div", {
|
|
27
27
|
"aria-hidden": true,
|
|
28
|
-
className: styles
|
|
28
|
+
className: styles.header,
|
|
29
29
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
30
|
-
className: styles
|
|
30
|
+
className: styles.headerCopy,
|
|
31
31
|
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
32
|
-
className: styles
|
|
32
|
+
className: styles.title,
|
|
33
33
|
style: bone
|
|
34
34
|
}), /* @__PURE__ */ jsx(Skeleton.Text, {
|
|
35
35
|
fontSize: 14,
|
|
36
36
|
width: "46%"
|
|
37
37
|
})]
|
|
38
38
|
}), action ? /* @__PURE__ */ jsx(Skeleton, {
|
|
39
|
-
className: styles
|
|
39
|
+
className: styles.action,
|
|
40
40
|
style: bone
|
|
41
41
|
}) : null]
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
PageHeaderSkeleton.displayName = "PageHeaderSkeleton";
|
|
45
45
|
function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
46
|
+
const cardClassName = useSurfaceCardClassName();
|
|
46
47
|
return /* @__PURE__ */ jsxs("div", {
|
|
47
48
|
"aria-hidden": true,
|
|
48
|
-
className: framed ? `${styles
|
|
49
|
+
className: framed ? `${styles.table} ${cardClassName}` : styles.table,
|
|
49
50
|
children: [/* @__PURE__ */ jsx("div", {
|
|
50
|
-
className: styles
|
|
51
|
+
className: styles.thead,
|
|
51
52
|
children: [
|
|
52
53
|
96,
|
|
53
54
|
72,
|
|
54
55
|
64,
|
|
55
56
|
48
|
|
56
57
|
].map((width, index) => /* @__PURE__ */ jsx(Skeleton, {
|
|
57
|
-
className: styles
|
|
58
|
+
className: styles.theadCell,
|
|
58
59
|
style: {
|
|
59
60
|
...bone,
|
|
60
61
|
width
|
|
61
62
|
}
|
|
62
63
|
}, index))
|
|
63
64
|
}), Array.from({ length: rows }, (_, index) => /* @__PURE__ */ jsxs("div", {
|
|
64
|
-
className: styles
|
|
65
|
+
className: styles.row,
|
|
65
66
|
children: [
|
|
66
67
|
leading === "avatar" ? /* @__PURE__ */ jsx(Skeleton.Avatar, {
|
|
67
68
|
shape: "circle",
|
|
@@ -72,7 +73,7 @@ function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
|
72
73
|
size: 24
|
|
73
74
|
}) : null,
|
|
74
75
|
/* @__PURE__ */ jsx("div", {
|
|
75
|
-
className: styles
|
|
76
|
+
className: styles.copy,
|
|
76
77
|
children: /* @__PURE__ */ jsx(Skeleton.Text, {
|
|
77
78
|
fontSize: 14,
|
|
78
79
|
rows: 2,
|
|
@@ -80,11 +81,11 @@ function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
|
80
81
|
})
|
|
81
82
|
}),
|
|
82
83
|
/* @__PURE__ */ jsx(Skeleton, {
|
|
83
|
-
className: styles
|
|
84
|
+
className: styles.tag,
|
|
84
85
|
style: bone
|
|
85
86
|
}),
|
|
86
87
|
/* @__PURE__ */ jsx(Skeleton, {
|
|
87
|
-
className: styles
|
|
88
|
+
className: styles.cell,
|
|
88
89
|
style: bone
|
|
89
90
|
})
|
|
90
91
|
]
|
|
@@ -93,16 +94,17 @@ function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
|
93
94
|
}
|
|
94
95
|
TableSkeleton.displayName = "TableSkeleton";
|
|
95
96
|
function StatCardSkeleton() {
|
|
97
|
+
const cardClassName = useSurfaceCardClassName();
|
|
96
98
|
return /* @__PURE__ */ jsxs("div", {
|
|
97
99
|
"aria-hidden": true,
|
|
98
|
-
className: `${styles
|
|
100
|
+
className: `${styles.stat} ${cardClassName}`,
|
|
99
101
|
children: [
|
|
100
102
|
/* @__PURE__ */ jsx(Skeleton.Text, {
|
|
101
103
|
fontSize: 14,
|
|
102
104
|
width: 72
|
|
103
105
|
}),
|
|
104
106
|
/* @__PURE__ */ jsx(Skeleton, {
|
|
105
|
-
className: styles
|
|
107
|
+
className: styles.statValue,
|
|
106
108
|
style: bone
|
|
107
109
|
}),
|
|
108
110
|
/* @__PURE__ */ jsx(Skeleton.Text, {
|
|
@@ -116,13 +118,13 @@ StatCardSkeleton.displayName = "StatCardSkeleton";
|
|
|
116
118
|
function PageLoading({ header = true, label = "Loading", stats = 4 }) {
|
|
117
119
|
return /* @__PURE__ */ jsxs("div", {
|
|
118
120
|
"aria-busy": "true",
|
|
119
|
-
className: styles
|
|
121
|
+
className: styles.page,
|
|
120
122
|
children: [
|
|
121
123
|
/* @__PURE__ */ jsx(LoadingAnnouncer, { label }),
|
|
122
124
|
header ? /* @__PURE__ */ jsx(PageHeaderSkeleton, {}) : null,
|
|
123
125
|
/* @__PURE__ */ jsx("section", {
|
|
124
126
|
"aria-hidden": true,
|
|
125
|
-
className: styles
|
|
127
|
+
className: styles.statGrid,
|
|
126
128
|
children: Array.from({ length: stats }, (_, index) => /* @__PURE__ */ jsx(StatCardSkeleton, {}, index))
|
|
127
129
|
}),
|
|
128
130
|
/* @__PURE__ */ jsx(TableSkeleton, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageSkeleton.mjs","names":[
|
|
1
|
+
{"version":3,"file":"PageSkeleton.mjs","names":[],"sources":["../../../src/dashboard/PageSkeleton/PageSkeleton.tsx"],"sourcesContent":["'use client';\n\nimport Skeleton from '@/base-ui/Skeleton';\n\nimport { useSurfaceCardClassName } from '../Surface/link';\nimport { styles } from './style';\nimport type {\n LoadingAnnouncerProps,\n PageHeaderSkeletonProps,\n PageLoadingProps,\n TableSkeletonProps,\n} from './type';\n\nconst bone = { height: undefined, width: undefined };\nconst lineWidths = [\n ['68%', '36%'],\n ['52%', '28%'],\n ['76%', '42%'],\n ['58%', '32%'],\n] as const;\n\nfunction LoadingAnnouncer({ label }: LoadingAnnouncerProps) {\n return (\n <output aria-live=\"polite\" className={styles.srOnly}>\n {label}\n </output>\n );\n}\n\nLoadingAnnouncer.displayName = 'LoadingAnnouncer';\n\nfunction PageHeaderSkeleton({ action = true }: PageHeaderSkeletonProps) {\n return (\n <div aria-hidden className={styles.header}>\n <div className={styles.headerCopy}>\n <Skeleton className={styles.title} style={bone} />\n <Skeleton.Text fontSize={14} width=\"46%\" />\n </div>\n {action ? <Skeleton className={styles.action} style={bone} /> : null}\n </div>\n );\n}\n\nPageHeaderSkeleton.displayName = 'PageHeaderSkeleton';\n\nfunction TableSkeleton({ framed = true, leading = 'text', rows = 6 }: TableSkeletonProps) {\n const cardClassName = useSurfaceCardClassName();\n const head = [96, 72, 64, 48];\n return (\n <div aria-hidden className={framed ? `${styles.table} ${cardClassName}` : styles.table}>\n <div className={styles.thead}>\n {head.map((width, index) => (\n <Skeleton className={styles.theadCell} key={index} style={{ ...bone, width }} />\n ))}\n </div>\n {Array.from({ length: rows }, (_, index) => (\n <div className={styles.row} key={index}>\n {leading === 'avatar' ? <Skeleton.Avatar shape=\"circle\" size={24} /> : null}\n {leading === 'icon' ? <Skeleton.Avatar shape=\"square\" size={24} /> : null}\n <div className={styles.copy}>\n <Skeleton.Text\n fontSize={14}\n rows={2}\n width={[...lineWidths[index % lineWidths.length]]}\n />\n </div>\n <Skeleton className={styles.tag} style={bone} />\n <Skeleton className={styles.cell} style={bone} />\n </div>\n ))}\n </div>\n );\n}\n\nTableSkeleton.displayName = 'TableSkeleton';\n\nfunction StatCardSkeleton() {\n const cardClassName = useSurfaceCardClassName();\n return (\n <div aria-hidden className={`${styles.stat} ${cardClassName}`}>\n <Skeleton.Text fontSize={14} width={72} />\n <Skeleton className={styles.statValue} style={bone} />\n <Skeleton.Text fontSize={14} width=\"68%\" />\n </div>\n );\n}\n\nStatCardSkeleton.displayName = 'StatCardSkeleton';\n\nfunction PageLoading({ header = true, label = 'Loading', stats = 4 }: PageLoadingProps) {\n return (\n <div aria-busy=\"true\" className={styles.page}>\n <LoadingAnnouncer label={label} />\n {header ? <PageHeaderSkeleton /> : null}\n <section aria-hidden className={styles.statGrid}>\n {Array.from({ length: stats }, (_, index) => (\n <StatCardSkeleton key={index} />\n ))}\n </section>\n <TableSkeleton />\n </div>\n );\n}\n\nPageLoading.displayName = 'PageLoading';\n\nexport { LoadingAnnouncer, PageHeaderSkeleton, StatCardSkeleton, TableSkeleton };\nexport default PageLoading;\n"],"mappings":"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"}
|
|
@@ -52,7 +52,7 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
|
|
|
52
52
|
min-block-size: 54px;
|
|
53
53
|
padding-block: 12px;
|
|
54
54
|
padding-inline: 16px;
|
|
55
|
-
border-block-end: 1px solid ${cssVar.
|
|
55
|
+
border-block-end: 1px solid ${cssVar.colorFillSecondary};
|
|
56
56
|
|
|
57
57
|
&:last-child {
|
|
58
58
|
border-block-end: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageSkeleton/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n action: css`\n flex: none;\n inline-size: 96px;\n block-size: 32px;\n\n ${responsive.mobile} {\n inline-size: 100%;\n block-size: 44px;\n }\n `,\n cell: css`\n flex: none;\n inline-size: 88px;\n block-size: 14px;\n `,\n copy: css`\n flex: 1;\n min-inline-size: 0;\n `,\n header: css`\n display: flex;\n gap: 16px;\n align-items: flex-start;\n justify-content: space-between;\n\n ${responsive.mobile} {\n flex-direction: column;\n align-items: stretch;\n }\n `,\n headerCopy: css`\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 8px;\n\n min-inline-size: 0;\n `,\n page: css`\n display: flex;\n flex-direction: column;\n gap: 20px;\n `,\n row: css`\n display: flex;\n gap: 12px;\n align-items: center;\n\n min-block-size: 54px;\n padding-block: 12px;\n padding-inline: 16px;\n border-block-end: 1px solid ${cssVar.
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageSkeleton/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n action: css`\n flex: none;\n inline-size: 96px;\n block-size: 32px;\n\n ${responsive.mobile} {\n inline-size: 100%;\n block-size: 44px;\n }\n `,\n cell: css`\n flex: none;\n inline-size: 88px;\n block-size: 14px;\n `,\n copy: css`\n flex: 1;\n min-inline-size: 0;\n `,\n header: css`\n display: flex;\n gap: 16px;\n align-items: flex-start;\n justify-content: space-between;\n\n ${responsive.mobile} {\n flex-direction: column;\n align-items: stretch;\n }\n `,\n headerCopy: css`\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 8px;\n\n min-inline-size: 0;\n `,\n page: css`\n display: flex;\n flex-direction: column;\n gap: 20px;\n `,\n row: css`\n display: flex;\n gap: 12px;\n align-items: center;\n\n min-block-size: 54px;\n padding-block: 12px;\n padding-inline: 16px;\n border-block-end: 1px solid ${cssVar.colorFillSecondary};\n\n &:last-child {\n border-block-end: none;\n }\n `,\n srOnly: css`\n position: absolute;\n\n overflow: hidden;\n\n inline-size: 1px;\n block-size: 1px;\n\n white-space: nowrap;\n\n clip-path: inset(50%);\n `,\n statGrid: css`\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 12px;\n `,\n stat: css`\n display: flex;\n flex-direction: column;\n padding: 16px;\n `,\n statValue: css`\n inline-size: 42%;\n block-size: ${cssVar.fontSizeHeading2};\n margin-block: 6px 14px;\n `,\n table: css`\n overflow: hidden;\n min-inline-size: 0;\n `,\n tag: css`\n flex: none;\n inline-size: 72px;\n block-size: 22px;\n border-radius: ${cssVar.borderRadiusSM};\n `,\n thead: css`\n display: flex;\n gap: 12px;\n align-items: center;\n\n min-block-size: 39px;\n padding-block: 10px;\n padding-inline: 16px;\n\n background: ${cssVar.colorFillTertiary};\n `,\n theadCell: css`\n flex: none;\n block-size: 12px;\n `,\n title: css`\n inline-size: 220px;\n max-inline-size: 70%;\n block-size: ${cssVar.fontSizeHeading3};\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,kBAAkB;CACzE,QAAQ,GAAG;;;;;MAKP,WAAW,OAAO;;;;;CAKtB,MAAM,GAAG;;;;;CAKT,MAAM,GAAG;;;;CAIT,QAAQ,GAAG;;;;;;MAMP,WAAW,OAAO;;;;;CAKtB,YAAY,GAAG;;;;;;;;CAQf,MAAM,GAAG;;;;;CAKT,KAAK,GAAG;;;;;;;;kCAQwB,OAAO,mBAAmB;;;;;;CAM1D,QAAQ,GAAG;;;;;;;;;;;;CAYX,UAAU,GAAG;;;;;CAKb,MAAM,GAAG;;;;;CAKT,WAAW,GAAG;;kBAEE,OAAO,iBAAiB;;;CAGxC,OAAO,GAAG;;;;CAIV,KAAK,GAAG;;;;qBAIW,OAAO,eAAe;;CAEzC,OAAO,GAAG;;;;;;;;;kBASM,OAAO,kBAAkB;;CAEzC,WAAW,GAAG;;;;CAId,OAAO,GAAG;;;kBAGM,OAAO,iBAAiB;;AAE1C,EAAE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PageToolbarProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/PageToolbar/PageToolbar.d.ts
|
|
3
|
+
/** Filters start at the left edge; actions hold the right edge, also after wrapping. */
|
|
4
|
+
declare const PageToolbar: {
|
|
5
|
+
({ actions, children, className }: PageToolbarProps): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { PageToolbar as default };
|
|
10
|
+
//# sourceMappingURL=PageToolbar.d.mts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styles } from "./style.mjs";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cx } from "antd-style";
|
|
5
|
+
//#region src/dashboard/PageToolbar/PageToolbar.tsx
|
|
6
|
+
/** Filters start at the left edge; actions hold the right edge, also after wrapping. */
|
|
7
|
+
const PageToolbar = ({ actions, children, className }) => /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: cx(styles.root, className),
|
|
9
|
+
children: [children ? /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: styles.filters,
|
|
11
|
+
children
|
|
12
|
+
}) : null, actions ? /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: styles.actions,
|
|
14
|
+
children: actions
|
|
15
|
+
}) : null]
|
|
16
|
+
});
|
|
17
|
+
PageToolbar.displayName = "PageToolbar";
|
|
18
|
+
//#endregion
|
|
19
|
+
export { PageToolbar as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=PageToolbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageToolbar.mjs","names":[],"sources":["../../../src/dashboard/PageToolbar/PageToolbar.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\n\nimport { styles } from './style';\nimport type { PageToolbarProps } from './type';\n\n/** Filters start at the left edge; actions hold the right edge, also after wrapping. */\nconst PageToolbar = ({ actions, children, className }: PageToolbarProps) => (\n <div className={cx(styles.root, className)}>\n {children ? <div className={styles.filters}>{children}</div> : null}\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n);\n\nPageToolbar.displayName = 'PageToolbar';\n\nexport default PageToolbar;\n"],"mappings":";;;;;;AAQA,MAAM,eAAe,EAAE,SAAS,UAAU,gBACxC,qBAAC,OAAD;CAAK,WAAW,GAAG,OAAO,MAAM,SAAS;CAAzC,UAAA,CACG,WAAW,oBAAC,OAAD;EAAK,WAAW,OAAO;EAAU;CAAc,CAAA,IAAI,MAC9D,UAAU,oBAAC,OAAD;EAAK,WAAW,OAAO;EAAU,UAAA;CAAa,CAAA,IAAI,IAC1D;;AAGP,YAAY,cAAc"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createStaticStyles } from "antd-style";
|
|
2
|
+
//#region src/dashboard/PageToolbar/style.ts
|
|
3
|
+
const styles = createStaticStyles(({ css }) => ({
|
|
4
|
+
actions: css`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex: none;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
align-items: center;
|
|
10
|
+
|
|
11
|
+
margin-inline-start: auto;
|
|
12
|
+
`,
|
|
13
|
+
filters: css`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex: 0 1 auto;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
min-inline-size: 0;
|
|
21
|
+
`,
|
|
22
|
+
root: css`
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
gap: 8px 12px;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
`
|
|
30
|
+
}));
|
|
31
|
+
//#endregion
|
|
32
|
+
export { styles };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageToolbar/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css }) => ({\n actions: css`\n display: flex;\n flex: none;\n flex-wrap: wrap;\n gap: 8px;\n align-items: center;\n\n margin-inline-start: auto;\n `,\n filters: css`\n display: flex;\n flex: 0 1 auto;\n flex-wrap: wrap;\n gap: 8px;\n align-items: center;\n\n min-inline-size: 0;\n `,\n root: css`\n display: flex;\n flex-wrap: wrap;\n gap: 8px 12px;\n align-items: center;\n\n min-inline-size: 0;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,WAAW;CACrD,SAAS,GAAG;;;;;;;;;CASZ,SAAS,GAAG;;;;;;;;;CASZ,MAAM,GAAG;;;;;;;;AAQX,EAAE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/dashboard/PageToolbar/type.d.ts
|
|
3
|
+
interface PageToolbarProps {
|
|
4
|
+
/** Right side: refresh, export, the page's own buttons. */
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
/** Left side: range, scope, search, whatever narrows the page. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PageToolbarProps };
|
|
12
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PanelSurfaceProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/PanelSurface/PanelSurface.d.ts
|
|
3
|
+
/** Titled console panel. Body padding stays inside so a trailing table can bleed to the edges. */
|
|
4
|
+
declare const PanelSurface: {
|
|
5
|
+
({ title, description, extra, href, loading, renderLink, size, className, style, children }: PanelSurfaceProps): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { PanelSurface as default };
|
|
10
|
+
//# sourceMappingURL=PanelSurface.d.mts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import Spin from "../../base-ui/Spin/Spin.mjs";
|
|
3
|
+
import Skeleton from "../../base-ui/Skeleton/index.mjs";
|
|
4
|
+
import { styles } from "../Surface/style.mjs";
|
|
5
|
+
import Surface from "../Surface/Surface.mjs";
|
|
6
|
+
import { styles as styles$1 } from "./style.mjs";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { cx } from "antd-style";
|
|
9
|
+
//#region src/dashboard/PanelSurface/PanelSurface.tsx
|
|
10
|
+
/** Titled console panel. Body padding stays inside so a trailing table can bleed to the edges. */
|
|
11
|
+
const PanelSurface = ({ title, description, extra, href, loading, renderLink, size = "default", className, style, children }) => /* @__PURE__ */ jsx(Surface, {
|
|
12
|
+
className,
|
|
13
|
+
description,
|
|
14
|
+
extra: loading && children ? /* @__PURE__ */ jsx(Spin, {
|
|
15
|
+
size: "small",
|
|
16
|
+
variant: "network"
|
|
17
|
+
}) : extra,
|
|
18
|
+
href,
|
|
19
|
+
padded: false,
|
|
20
|
+
renderLink,
|
|
21
|
+
style,
|
|
22
|
+
title,
|
|
23
|
+
children: loading && !children ? /* @__PURE__ */ jsx("div", {
|
|
24
|
+
"aria-busy": "true",
|
|
25
|
+
className: styles$1.loadingBody,
|
|
26
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
27
|
+
height: 220,
|
|
28
|
+
radius: 8
|
|
29
|
+
})
|
|
30
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: cx(size === "small" ? styles$1.bodySmall : styles$1.body, styles.tableBleed),
|
|
32
|
+
children
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
PanelSurface.displayName = "PanelSurface";
|
|
36
|
+
//#endregion
|
|
37
|
+
export { PanelSurface as default };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=PanelSurface.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelSurface.mjs","names":["styles","surfaceStyles"],"sources":["../../../src/dashboard/PanelSurface/PanelSurface.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\n\nimport Skeleton from '@/base-ui/Skeleton';\nimport Spin from '@/base-ui/Spin';\n\nimport { styles as surfaceStyles } from '../Surface/style';\nimport Surface from '../Surface/Surface';\nimport { styles } from './style';\nimport type { PanelSurfaceProps } from './type';\n\n/** Titled console panel. Body padding stays inside so a trailing table can bleed to the edges. */\nconst PanelSurface = ({\n title,\n description,\n extra,\n href,\n loading,\n renderLink,\n size = 'default',\n className,\n style,\n children,\n}: PanelSurfaceProps) => (\n <Surface\n className={className}\n description={description}\n extra={loading && children ? <Spin size=\"small\" variant=\"network\" /> : extra}\n href={href}\n padded={false}\n renderLink={renderLink}\n style={style}\n title={title}\n >\n {loading && !children ? (\n <div aria-busy=\"true\" className={styles.loadingBody}>\n <Skeleton height={220} radius={8} />\n </div>\n ) : (\n <div\n className={cx(size === 'small' ? styles.bodySmall : styles.body, surfaceStyles.tableBleed)}\n >\n {children}\n </div>\n )}\n </Surface>\n);\n\nPanelSurface.displayName = 'PanelSurface';\n\nexport default PanelSurface;\n"],"mappings":";;;;;;;;;;AAaA,MAAM,gBAAgB,EACpB,OACA,aACA,OACA,MACA,SACA,YACA,OAAO,WACP,WACA,OACA,eAEA,oBAAC,SAAD;CACa;CACE;CACb,OAAO,WAAW,WAAW,oBAAC,MAAD;EAAM,MAAK;EAAQ,SAAQ;CAAW,CAAA,IAAI;CACjE;CACN,QAAQ;CACI;CACL;CACA;CAEN,UAAA,WAAW,CAAC,WACX,oBAAC,OAAD;EAAK,aAAU;EAAO,WAAWA,SAAO;EACtC,UAAA,oBAAC,UAAD;GAAU,QAAQ;GAAK,QAAQ;EAAI,CAAA;CAChC,CAAA,IAEL,oBAAC,OAAD;EACE,WAAW,GAAG,SAAS,UAAUA,SAAO,YAAYA,SAAO,MAAMC,OAAc,UAAU;EAExF;CACE,CAAA;AAEA,CAAA;AAGX,aAAa,cAAc"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createStaticStyles } from "antd-style";
|
|
2
|
+
//#region src/dashboard/PanelSurface/style.ts
|
|
3
|
+
const styles = createStaticStyles(({ css }) => ({
|
|
4
|
+
body: css`
|
|
5
|
+
--surface-pad-inline: 16px;
|
|
6
|
+
--surface-pad-block: 16px;
|
|
7
|
+
|
|
8
|
+
padding: 16px;
|
|
9
|
+
`,
|
|
10
|
+
bodySmall: css`
|
|
11
|
+
--surface-pad-inline: 16px;
|
|
12
|
+
--surface-pad-block: 12px;
|
|
13
|
+
|
|
14
|
+
padding-block: 12px;
|
|
15
|
+
padding-inline: 16px;
|
|
16
|
+
`,
|
|
17
|
+
loadingBody: css`
|
|
18
|
+
padding-block: 4px 8px;
|
|
19
|
+
`
|
|
20
|
+
}));
|
|
21
|
+
//#endregion
|
|
22
|
+
export { styles };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PanelSurface/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css }) => ({\n body: css`\n --surface-pad-inline: 16px;\n --surface-pad-block: 16px;\n\n padding: 16px;\n `,\n bodySmall: css`\n --surface-pad-inline: 16px;\n --surface-pad-block: 12px;\n\n padding-block: 12px;\n padding-inline: 16px;\n `,\n loadingBody: css`\n padding-block: 4px 8px;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,WAAW;CACrD,MAAM,GAAG;;;;;;CAMT,WAAW,GAAG;;;;;;;CAOd,aAAa,GAAG;;;AAGlB,EAAE"}
|