@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,156 @@
|
|
|
1
|
+
//#region src/dashboard/MetricStrip/style.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
card: {
|
|
4
|
+
k1xSpc: "lbrvj5dj",
|
|
5
|
+
k7Eaqz: "lbeuugli",
|
|
6
|
+
$$css: true
|
|
7
|
+
},
|
|
8
|
+
cell: {
|
|
9
|
+
kOIVth: "lb17d4w8g",
|
|
10
|
+
k8WAf4: "lb1xn8qrt",
|
|
11
|
+
kg3NbH: "lb17qtykl",
|
|
12
|
+
kWkggS: "lbjbqb8w",
|
|
13
|
+
k1xSpc: "lb78zum5",
|
|
14
|
+
kXwgrk: "lbdt5ytf",
|
|
15
|
+
k7Eaqz: "lbeuugli",
|
|
16
|
+
$$css: true
|
|
17
|
+
},
|
|
18
|
+
cellSeam: {
|
|
19
|
+
kGVxlE: "lb4uk749",
|
|
20
|
+
$$css: true
|
|
21
|
+
},
|
|
22
|
+
delta: {
|
|
23
|
+
kGuDYH: "lb4z9k3i",
|
|
24
|
+
kcqcaj: "lbss6m8b",
|
|
25
|
+
kLWn49: "lb37zpob",
|
|
26
|
+
$$css: true
|
|
27
|
+
},
|
|
28
|
+
deltaDown: {
|
|
29
|
+
kMwMTN: "lb12ap7uz",
|
|
30
|
+
$$css: true
|
|
31
|
+
},
|
|
32
|
+
deltaFlat: {
|
|
33
|
+
kMwMTN: "lbc77et8",
|
|
34
|
+
$$css: true
|
|
35
|
+
},
|
|
36
|
+
deltaUp: {
|
|
37
|
+
kMwMTN: "lbs9y9h1",
|
|
38
|
+
$$css: true
|
|
39
|
+
},
|
|
40
|
+
foot: {
|
|
41
|
+
kOIVth: "lb167g77z",
|
|
42
|
+
kGNEyG: "lb1pha0wt",
|
|
43
|
+
k1xSpc: "lb78zum5",
|
|
44
|
+
kwnvtZ: "lb1a02dak",
|
|
45
|
+
$$css: true
|
|
46
|
+
},
|
|
47
|
+
frame: {
|
|
48
|
+
"--metric-seam": "lbgo1hwp",
|
|
49
|
+
kaIpWk: "lb1pjcqnp",
|
|
50
|
+
kVQacm: "lbb3r6kr",
|
|
51
|
+
kWkggS: "lbjbqb8w",
|
|
52
|
+
$$css: true
|
|
53
|
+
},
|
|
54
|
+
grid: {
|
|
55
|
+
kWkggS: "lbjbqb8w",
|
|
56
|
+
k1xSpc: "lbrvj5dj",
|
|
57
|
+
kumcoG: "lb1rfa8br",
|
|
58
|
+
kzqmXN: "lbjl7whj",
|
|
59
|
+
k1K539: "lb1jyxor1",
|
|
60
|
+
$$css: true
|
|
61
|
+
},
|
|
62
|
+
head: {
|
|
63
|
+
kOIVth: "lb167g77z",
|
|
64
|
+
kGNEyG: "lb6s0dn4",
|
|
65
|
+
kZKoxP: "lb10w6t97",
|
|
66
|
+
kB7OPa: "lb9f619",
|
|
67
|
+
k1xSpc: "lb78zum5",
|
|
68
|
+
kjj79g: "lb1qughib",
|
|
69
|
+
k7Eaqz: "lbeuugli",
|
|
70
|
+
$$css: true
|
|
71
|
+
},
|
|
72
|
+
headCopy: {
|
|
73
|
+
kOIVth: "lb17d4w8g",
|
|
74
|
+
kGNEyG: "lb6s0dn4",
|
|
75
|
+
k1xSpc: "lb78zum5",
|
|
76
|
+
k7Eaqz: "lbeuugli",
|
|
77
|
+
$$css: true
|
|
78
|
+
},
|
|
79
|
+
hint: {
|
|
80
|
+
kMwMTN: "lbc77et8",
|
|
81
|
+
kGuDYH: "lb4z9k3i",
|
|
82
|
+
kLWn49: "lb37zpob",
|
|
83
|
+
$$css: true
|
|
84
|
+
},
|
|
85
|
+
label: {
|
|
86
|
+
kMwMTN: "lbc77et8",
|
|
87
|
+
kGuDYH: "lb4z9k3i",
|
|
88
|
+
k63SB2: "lbk50ysn",
|
|
89
|
+
kLWn49: "lb37zpob",
|
|
90
|
+
$$css: true
|
|
91
|
+
},
|
|
92
|
+
link: {
|
|
93
|
+
kybGjl: "lb1hl2dhg",
|
|
94
|
+
kWkggS: "lbjbqb8w lbql1cz1",
|
|
95
|
+
kMwMTN: "lb1heor9g",
|
|
96
|
+
$$css: true
|
|
97
|
+
},
|
|
98
|
+
mark: {
|
|
99
|
+
kVAM5u: "lb6d5vuu",
|
|
100
|
+
kaIpWk: "lb1vihcfj",
|
|
101
|
+
ksu8eU: "lb1y0btm7",
|
|
102
|
+
kMzoRj: "lbmkeg23",
|
|
103
|
+
kUk6DE: "lb1okw0bk",
|
|
104
|
+
kGNEyG: "lb6s0dn4",
|
|
105
|
+
kWkggS: "lbaljia1",
|
|
106
|
+
kZKoxP: "lbxk0z11",
|
|
107
|
+
kMwMTN: "lb53gy9q",
|
|
108
|
+
k1xSpc: "lb3nfvp2",
|
|
109
|
+
kzqmXN: "lbvy4d1p",
|
|
110
|
+
kjj79g: "lbl56j7k",
|
|
111
|
+
$$css: true
|
|
112
|
+
},
|
|
113
|
+
press: {
|
|
114
|
+
kVVagm: "lbln7xf2",
|
|
115
|
+
ksu8eU: "lbng3xce",
|
|
116
|
+
kWkggS: "lbjbqb8w lbql1cz1",
|
|
117
|
+
kMwMTN: "lb1heor9g",
|
|
118
|
+
kkrTdU: "lb1ypdohk",
|
|
119
|
+
k9WMMc: "lb1yc453h",
|
|
120
|
+
$$css: true
|
|
121
|
+
},
|
|
122
|
+
slot: {
|
|
123
|
+
k1xSpc: "lbrvj5dj",
|
|
124
|
+
k7Eaqz: "lbeuugli",
|
|
125
|
+
$$css: true
|
|
126
|
+
},
|
|
127
|
+
split: {
|
|
128
|
+
kOIVth: "lb1v2ro7d",
|
|
129
|
+
k1xSpc: "lbrvj5dj",
|
|
130
|
+
kumcoG: "lb1rfa8br",
|
|
131
|
+
$$css: true
|
|
132
|
+
},
|
|
133
|
+
value: {
|
|
134
|
+
kVQacm: "lbb3r6kr",
|
|
135
|
+
kMwMTN: "lb66ogz0",
|
|
136
|
+
kGuDYH: "lb4zirph",
|
|
137
|
+
kcqcaj: "lbss6m8b",
|
|
138
|
+
k63SB2: "lb1s688f",
|
|
139
|
+
kLWn49: "lb1uo3zyz",
|
|
140
|
+
kg5iWk: "lblyipyv",
|
|
141
|
+
khDVqt: "lbuxw1ft",
|
|
142
|
+
$$css: true
|
|
143
|
+
},
|
|
144
|
+
valueDanger: {
|
|
145
|
+
kMwMTN: "lb12ap7uz",
|
|
146
|
+
$$css: true
|
|
147
|
+
},
|
|
148
|
+
valueWarning: {
|
|
149
|
+
kMwMTN: "lbgyvj36",
|
|
150
|
+
$$css: true
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
//#endregion
|
|
154
|
+
export { styles };
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/MetricStrip/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nexport const styles = stylex.create({\n /** Split strip and StatCard: one card per item. */\n card: {\n display: 'grid',\n minInlineSize: 0,\n },\n cell: {\n gap: 6,\n paddingBlock: 16,\n paddingInline: 20,\n backgroundColor: 'transparent',\n display: 'flex',\n flexDirection: 'column',\n minInlineSize: 0,\n },\n /** Joined strip only: the divider on the cell's trailing and bottom edges. */\n cellSeam: {\n boxShadow: 'inset -1px 0 0 var(--metric-seam), inset 0 -1px 0 var(--metric-seam)',\n },\n delta: {\n fontSize: 13,\n fontVariantNumeric: 'tabular-nums',\n lineHeight: 1.4,\n },\n deltaDown: {\n color: cssVar.colorError,\n },\n deltaFlat: {\n color: cssVar.colorTextSecondary,\n },\n deltaUp: {\n color: cssVar.colorSuccess,\n },\n foot: {\n gap: 8,\n alignItems: 'baseline',\n display: 'flex',\n flexWrap: 'wrap',\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: {\n '--metric-seam': cssVar.colorFillSecondary,\n 'borderRadius': 'inherit',\n 'overflow': 'hidden',\n 'backgroundColor': 'transparent',\n },\n grid: {\n backgroundColor: 'transparent',\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))',\n inlineSize: 'calc(100% + 1px)',\n marginBlockEnd: -1,\n },\n /* One fixed 32px row (a small Segmented or ActionIcon fits): an action or mark in the head must\n not push the value down, so cells with and without header controls line up across a split\n strip or a row of StatCards. */\n head: {\n gap: 8,\n alignItems: 'center',\n blockSize: 32,\n boxSizing: 'border-box',\n display: 'flex',\n justifyContent: 'space-between',\n minInlineSize: 0,\n },\n headCopy: {\n gap: 6,\n alignItems: 'center',\n display: 'flex',\n minInlineSize: 0,\n },\n hint: {\n color: cssVar.colorTextSecondary,\n fontSize: 13,\n lineHeight: 1.4,\n },\n label: {\n color: cssVar.colorTextSecondary,\n fontSize: 13,\n fontWeight: 500,\n lineHeight: 1.4,\n },\n link: {\n textDecoration: 'none',\n backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillQuaternary },\n color: 'inherit',\n },\n mark: {\n borderColor: cssVar.colorFillSecondary,\n borderRadius: cssVar.borderRadiusSM,\n borderStyle: 'solid',\n borderWidth: 1,\n flex: 'none',\n alignItems: 'center',\n backgroundColor: cssVar.colorFillTertiary,\n blockSize: 24,\n color: cssVar.colorTextTertiary,\n display: 'inline-flex',\n inlineSize: 24,\n justifyContent: 'center',\n },\n press: {\n font: 'inherit',\n borderStyle: 'none',\n backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillQuaternary },\n color: 'inherit',\n cursor: 'pointer',\n textAlign: 'start',\n },\n /** Grid cell around a rendered link, so the link fills it. */\n slot: {\n display: 'grid',\n minInlineSize: 0,\n },\n split: {\n gap: 12,\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))',\n },\n value: {\n overflow: 'hidden',\n color: cssVar.colorText,\n fontSize: cssVar.fontSizeHeading3,\n fontVariantNumeric: 'tabular-nums',\n fontWeight: 600,\n lineHeight: 1.15,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n valueDanger: {\n color: cssVar.colorError,\n },\n valueWarning: {\n color: cssVar.colorWarning,\n },\n});\n"],"mappings":";AAGA,MAAa,SAAS;CACpB,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,iBAAiB;EACjB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,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,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,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,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
export 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
|
+
export 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
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cssVar } from "../../styles/stylex/cssVar.stylex.mjs";
|
|
3
3
|
import Skeleton from "../../Skeleton/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { styles
|
|
4
|
+
import { useSurfaceCardStyles } from "../Surface/link.mjs";
|
|
5
|
+
import { styles } from "./style.mjs";
|
|
6
6
|
import { createElement } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import * as stylex from "@stylexjs/stylex";
|
|
@@ -24,7 +24,7 @@ const lineWidths = [
|
|
|
24
24
|
function LoadingAnnouncer({ label }) {
|
|
25
25
|
return /* @__PURE__ */ jsx("output", {
|
|
26
26
|
"aria-live": "polite",
|
|
27
|
-
...stylex.props(styles
|
|
27
|
+
...stylex.props(styles.srOnly),
|
|
28
28
|
children: label
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -32,24 +32,25 @@ LoadingAnnouncer.displayName = "LoadingAnnouncer";
|
|
|
32
32
|
function PageHeaderSkeleton({ action = true }) {
|
|
33
33
|
return /* @__PURE__ */ jsxs("div", {
|
|
34
34
|
"aria-hidden": true,
|
|
35
|
-
...stylex.props(styles
|
|
35
|
+
...stylex.props(styles.header),
|
|
36
36
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
37
|
-
...stylex.props(styles
|
|
37
|
+
...stylex.props(styles.headerCopy),
|
|
38
38
|
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
39
|
-
className: stylex.props(styles
|
|
39
|
+
className: stylex.props(styles.title).className,
|
|
40
40
|
style: bone
|
|
41
41
|
}), /* @__PURE__ */ jsx(Skeleton.Text, {
|
|
42
42
|
fontSize: 14,
|
|
43
43
|
width: "46%"
|
|
44
44
|
})]
|
|
45
45
|
}), action ? /* @__PURE__ */ jsx(Skeleton, {
|
|
46
|
-
className: stylex.props(styles
|
|
46
|
+
className: stylex.props(styles.action).className,
|
|
47
47
|
style: bone
|
|
48
48
|
}) : null]
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
PageHeaderSkeleton.displayName = "PageHeaderSkeleton";
|
|
52
52
|
function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
53
|
+
const cardStyles = useSurfaceCardStyles();
|
|
53
54
|
const head = [
|
|
54
55
|
96,
|
|
55
56
|
72,
|
|
@@ -58,18 +59,18 @@ function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
|
58
59
|
];
|
|
59
60
|
return /* @__PURE__ */ jsxs("div", {
|
|
60
61
|
"aria-hidden": true,
|
|
61
|
-
...stylex.props(styles
|
|
62
|
+
...stylex.props(styles.table, framed && cardStyles),
|
|
62
63
|
children: [/* @__PURE__ */ jsx("div", {
|
|
63
|
-
...stylex.props(styles
|
|
64
|
+
...stylex.props(styles.thead),
|
|
64
65
|
children: head.map((width, index) => /* @__PURE__ */ jsx(Skeleton, {
|
|
65
|
-
className: stylex.props(styles
|
|
66
|
+
className: stylex.props(styles.theadCell).className,
|
|
66
67
|
style: {
|
|
67
68
|
...bone,
|
|
68
69
|
width
|
|
69
70
|
}
|
|
70
71
|
}, index))
|
|
71
72
|
}), Array.from({ length: rows }, (_, index) => /* @__PURE__ */ createElement("div", {
|
|
72
|
-
...stylex.props(styles
|
|
73
|
+
...stylex.props(styles.row),
|
|
73
74
|
key: index
|
|
74
75
|
}, leading === "avatar" ? /* @__PURE__ */ jsx(Skeleton.Avatar, {
|
|
75
76
|
shape: "circle",
|
|
@@ -78,33 +79,34 @@ function TableSkeleton({ framed = true, leading = "text", rows = 6 }) {
|
|
|
78
79
|
shape: "square",
|
|
79
80
|
size: 24
|
|
80
81
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
81
|
-
...stylex.props(styles
|
|
82
|
+
...stylex.props(styles.copy),
|
|
82
83
|
children: /* @__PURE__ */ jsx(Skeleton.Text, {
|
|
83
84
|
fontSize: 14,
|
|
84
85
|
rows: 2,
|
|
85
86
|
width: [...lineWidths[index % lineWidths.length]]
|
|
86
87
|
})
|
|
87
88
|
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
88
|
-
className: stylex.props(styles
|
|
89
|
+
className: stylex.props(styles.tag).className,
|
|
89
90
|
style: tagBone
|
|
90
91
|
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
91
|
-
className: stylex.props(styles
|
|
92
|
+
className: stylex.props(styles.cell).className,
|
|
92
93
|
style: bone
|
|
93
94
|
})))]
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
TableSkeleton.displayName = "TableSkeleton";
|
|
97
98
|
function StatCardSkeleton() {
|
|
99
|
+
const cardStyles = useSurfaceCardStyles();
|
|
98
100
|
return /* @__PURE__ */ jsxs("div", {
|
|
99
101
|
"aria-hidden": true,
|
|
100
|
-
...stylex.props(styles
|
|
102
|
+
...stylex.props(styles.stat, cardStyles),
|
|
101
103
|
children: [
|
|
102
104
|
/* @__PURE__ */ jsx(Skeleton.Text, {
|
|
103
105
|
fontSize: 14,
|
|
104
106
|
width: 72
|
|
105
107
|
}),
|
|
106
108
|
/* @__PURE__ */ jsx(Skeleton, {
|
|
107
|
-
className: stylex.props(styles
|
|
109
|
+
className: stylex.props(styles.statValue).className,
|
|
108
110
|
style: bone
|
|
109
111
|
}),
|
|
110
112
|
/* @__PURE__ */ jsx(Skeleton.Text, {
|
|
@@ -118,13 +120,13 @@ StatCardSkeleton.displayName = "StatCardSkeleton";
|
|
|
118
120
|
function PageLoading({ header = true, label = "Loading", stats = 4 }) {
|
|
119
121
|
return /* @__PURE__ */ jsxs("div", {
|
|
120
122
|
"aria-busy": "true",
|
|
121
|
-
...stylex.props(styles
|
|
123
|
+
...stylex.props(styles.page),
|
|
122
124
|
children: [
|
|
123
125
|
/* @__PURE__ */ jsx(LoadingAnnouncer, { label }),
|
|
124
126
|
header ? /* @__PURE__ */ jsx(PageHeaderSkeleton, {}) : null,
|
|
125
127
|
/* @__PURE__ */ jsx("section", {
|
|
126
128
|
"aria-hidden": true,
|
|
127
|
-
...stylex.props(styles
|
|
129
|
+
...stylex.props(styles.statGrid),
|
|
128
130
|
children: Array.from({ length: stats }, (_, index) => /* @__PURE__ */ jsx(StatCardSkeleton, {}, index))
|
|
129
131
|
}),
|
|
130
132
|
/* @__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 * as stylex from '@stylexjs/stylex';\n\nimport Skeleton from '@/Skeleton';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { useSurfaceCardStyles } 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 tagBone = { ...bone, borderRadius: cssVar.borderRadiusSM };\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\" {...stylex.props(styles.srOnly)}>\n {label}\n </output>\n );\n}\n\nLoadingAnnouncer.displayName = 'LoadingAnnouncer';\n\nfunction PageHeaderSkeleton({ action = true }: PageHeaderSkeletonProps) {\n return (\n <div aria-hidden {...stylex.props(styles.header)}>\n <div {...stylex.props(styles.headerCopy)}>\n <Skeleton className={stylex.props(styles.title).className} style={bone} />\n <Skeleton.Text fontSize={14} width=\"46%\" />\n </div>\n {action ? <Skeleton className={stylex.props(styles.action).className} style={bone} /> : null}\n </div>\n );\n}\n\nPageHeaderSkeleton.displayName = 'PageHeaderSkeleton';\n\nfunction TableSkeleton({ framed = true, leading = 'text', rows = 6 }: TableSkeletonProps) {\n const cardStyles = useSurfaceCardStyles();\n const head = [96, 72, 64, 48];\n return (\n <div aria-hidden {...stylex.props(styles.table, framed && cardStyles)}>\n <div {...stylex.props(styles.thead)}>\n {head.map((width, index) => (\n <Skeleton\n className={stylex.props(styles.theadCell).className}\n key={index}\n style={{ ...bone, width }}\n />\n ))}\n </div>\n {Array.from({ length: rows }, (_, index) => (\n <div {...stylex.props(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 {...stylex.props(styles.copy)}>\n <Skeleton.Text\n fontSize={14}\n rows={2}\n width={[...lineWidths[index % lineWidths.length]]}\n />\n </div>\n <Skeleton className={stylex.props(styles.tag).className} style={tagBone} />\n <Skeleton className={stylex.props(styles.cell).className} style={bone} />\n </div>\n ))}\n </div>\n );\n}\n\nTableSkeleton.displayName = 'TableSkeleton';\n\nfunction StatCardSkeleton() {\n const cardStyles = useSurfaceCardStyles();\n return (\n <div aria-hidden {...stylex.props(styles.stat, cardStyles)}>\n <Skeleton.Text fontSize={14} width={72} />\n <Skeleton className={stylex.props(styles.statValue).className} 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\" {...stylex.props(styles.page)}>\n <LoadingAnnouncer label={label} />\n {header ? <PageHeaderSkeleton /> : null}\n <section aria-hidden {...stylex.props(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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageSkeleton/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\nexport const styles = stylex.create({\n action: {\n flex: 'none',\n blockSize: { default: 32, [media.mobile]: 44 },\n inlineSize: { default: 96, [media.mobile]: '100%' },\n },\n cell: {\n flex: 'none',\n blockSize: 14,\n inlineSize: 88,\n },\n copy: {\n flex: '1',\n minInlineSize: 0,\n },\n header: {\n gap: 16,\n alignItems: { default: 'flex-start', [media.mobile]: 'stretch' },\n display: 'flex',\n flexDirection: { default: null, [media.mobile]: 'column' },\n justifyContent: 'space-between',\n },\n headerCopy: {\n flex: '1',\n gap: 8,\n display: 'flex',\n flexDirection: 'column',\n minInlineSize: 0,\n },\n page: {\n gap: 20,\n display: 'flex',\n flexDirection: 'column',\n },\n row: {\n gap: 12,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockEndColor: { 'default': cssVar.
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageSkeleton/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\nexport const styles = stylex.create({\n action: {\n flex: 'none',\n blockSize: { default: 32, [media.mobile]: 44 },\n inlineSize: { default: 96, [media.mobile]: '100%' },\n },\n cell: {\n flex: 'none',\n blockSize: 14,\n inlineSize: 88,\n },\n copy: {\n flex: '1',\n minInlineSize: 0,\n },\n header: {\n gap: 16,\n alignItems: { default: 'flex-start', [media.mobile]: 'stretch' },\n display: 'flex',\n flexDirection: { default: null, [media.mobile]: 'column' },\n justifyContent: 'space-between',\n },\n headerCopy: {\n flex: '1',\n gap: 8,\n display: 'flex',\n flexDirection: 'column',\n minInlineSize: 0,\n },\n page: {\n gap: 20,\n display: 'flex',\n flexDirection: 'column',\n },\n row: {\n gap: 12,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockEndColor: { 'default': cssVar.colorFillSecondary, ':last-child': 'currentcolor' },\n borderBlockEndStyle: { 'default': 'solid', ':last-child': 'none' },\n borderBlockEndWidth: { 'default': 1, ':last-child': 'medium' },\n display: 'flex',\n minBlockSize: 54,\n },\n srOnly: {\n overflow: 'hidden',\n blockSize: 1,\n clipPath: 'inset(50%)',\n inlineSize: 1,\n position: 'absolute',\n whiteSpace: 'nowrap',\n },\n stat: {\n padding: 16,\n display: 'flex',\n flexDirection: 'column',\n },\n statGrid: {\n gap: 12,\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))',\n },\n statValue: {\n blockSize: cssVar.fontSizeHeading2,\n inlineSize: '42%',\n marginBlockEnd: '14px',\n marginBlockStart: '6px',\n },\n table: {\n overflow: 'hidden',\n minInlineSize: 0,\n },\n tag: {\n flex: 'none',\n blockSize: 22,\n inlineSize: 72,\n },\n thead: {\n gap: 12,\n paddingBlock: 10,\n paddingInline: 16,\n alignItems: 'center',\n backgroundColor: cssVar.colorFillTertiary,\n display: 'flex',\n minBlockSize: 39,\n },\n theadCell: {\n flex: 'none',\n blockSize: 12,\n },\n title: {\n blockSize: cssVar.fontSizeHeading3,\n inlineSize: 220,\n maxInlineSize: '70%',\n },\n});\n"],"mappings":";AAKA,MAAa,SAAS;CACpB,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,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,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,KAAK;EACH,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,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -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,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
|
+
import { styles } from "./style.mjs";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as stylex from "@stylexjs/stylex";
|
|
6
|
+
//#region src/dashboard/PageToolbar/PageToolbar.tsx
|
|
7
|
+
/** Filters start at the left edge; actions hold the right edge, also after wrapping. */
|
|
8
|
+
const PageToolbar = ({ actions, children, className }) => /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
...styleProps(styles.root, className),
|
|
10
|
+
children: [children ? /* @__PURE__ */ jsx("div", {
|
|
11
|
+
...stylex.props(styles.filters),
|
|
12
|
+
children
|
|
13
|
+
}) : null, actions ? /* @__PURE__ */ jsx("div", {
|
|
14
|
+
...stylex.props(styles.actions),
|
|
15
|
+
children: actions
|
|
16
|
+
}) : null]
|
|
17
|
+
});
|
|
18
|
+
PageToolbar.displayName = "PageToolbar";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { PageToolbar as default };
|
|
21
|
+
|
|
22
|
+
//# 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 * as stylex from '@stylexjs/stylex';\n\nimport { styleProps } from '@/styles/stylex/props';\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 {...styleProps(styles.root, className)}>\n {children ? <div {...stylex.props(styles.filters)}>{children}</div> : null}\n {actions ? <div {...stylex.props(styles.actions)}>{actions}</div> : null}\n </div>\n);\n\nPageToolbar.displayName = 'PageToolbar';\n\nexport default PageToolbar;\n"],"mappings":";;;;;;;AAQA,MAAM,eAAe,EACnB,SACA,UACA,gBACsB,qBAAC,OAAD;CAAK,GAAI,WAAW,OAAO,MAAM,SAAS;CAA1C,UAAA,CACnB,WAAW,oBAAC,OAAD;EAAK,GAAI,OAAO,MAAM,OAAO,OAAO;EAAI;CAAc,CAAA,IAAI,MACrE,UAAU,oBAAC,OAAD;EAAK,GAAI,OAAO,MAAM,OAAO,OAAO;EAAI,UAAA;CAAa,CAAA,IAAI,IACjE;;AACP,YAAY,cAAc"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/dashboard/PageToolbar/style.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
actions: {
|
|
4
|
+
kUk6DE: "lb1okw0bk",
|
|
5
|
+
kOIVth: "lb167g77z",
|
|
6
|
+
kGNEyG: "lb6s0dn4",
|
|
7
|
+
k1xSpc: "lb78zum5",
|
|
8
|
+
kwnvtZ: "lb1a02dak",
|
|
9
|
+
keTefX: "lbvc5jky",
|
|
10
|
+
$$css: true
|
|
11
|
+
},
|
|
12
|
+
filters: {
|
|
13
|
+
kOIVth: "lb167g77z",
|
|
14
|
+
kGNEyG: "lb6s0dn4",
|
|
15
|
+
k1xSpc: "lb78zum5",
|
|
16
|
+
kCS8Yb: "lbdl72j9",
|
|
17
|
+
kzQI83: "lb1c4vz4f",
|
|
18
|
+
kmuXW: "lbs83m0k",
|
|
19
|
+
kwnvtZ: "lb1a02dak",
|
|
20
|
+
k7Eaqz: "lbeuugli",
|
|
21
|
+
$$css: true
|
|
22
|
+
},
|
|
23
|
+
root: {
|
|
24
|
+
kGNEyG: "lb6s0dn4",
|
|
25
|
+
k1C7PZ: "lbtqikln",
|
|
26
|
+
k1xSpc: "lb78zum5",
|
|
27
|
+
kwnvtZ: "lb1a02dak",
|
|
28
|
+
k7Eaqz: "lbeuugli",
|
|
29
|
+
khm7nJ: "lb3pnbk8",
|
|
30
|
+
$$css: true
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { styles };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PageToolbar/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nexport const styles = stylex.create({\n actions: {\n flex: 'none',\n gap: 8,\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n marginInlineStart: 'auto',\n },\n filters: {\n gap: 8,\n alignItems: 'center',\n display: 'flex',\n flexBasis: 'auto',\n flexGrow: '0',\n flexShrink: '1',\n flexWrap: 'wrap',\n minInlineSize: 0,\n },\n root: {\n alignItems: 'center',\n columnGap: '12px',\n display: 'flex',\n flexWrap: 'wrap',\n minInlineSize: 0,\n rowGap: '8px',\n },\n});\n"],"mappings":";AACA,MAAa,SAAS;CACpB,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/dashboard/PageToolbar/type.d.ts
|
|
3
|
+
export 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
|
+
//# 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,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
|
+
import Spin from "../../Spin/Spin.mjs";
|
|
4
|
+
import Skeleton from "../../Skeleton/index.mjs";
|
|
5
|
+
import { surfaceClassNames } from "../Surface/style.mjs";
|
|
6
|
+
import Surface from "../Surface/Surface.mjs";
|
|
7
|
+
import { styles } from "./style.mjs";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import * as stylex from "@stylexjs/stylex";
|
|
10
|
+
//#region src/dashboard/PanelSurface/PanelSurface.tsx
|
|
11
|
+
/** Titled console panel. Body padding stays inside so a trailing table can bleed to the edges. */
|
|
12
|
+
const PanelSurface = ({ title, description, extra, href, loading, renderLink, size = "default", className, style, children }) => /* @__PURE__ */ jsx(Surface, {
|
|
13
|
+
className,
|
|
14
|
+
description,
|
|
15
|
+
extra: loading && children ? /* @__PURE__ */ jsx(Spin, {
|
|
16
|
+
size: "small",
|
|
17
|
+
variant: "network"
|
|
18
|
+
}) : extra,
|
|
19
|
+
href,
|
|
20
|
+
padded: false,
|
|
21
|
+
renderLink,
|
|
22
|
+
style,
|
|
23
|
+
title,
|
|
24
|
+
children: loading && !children ? /* @__PURE__ */ jsx("div", {
|
|
25
|
+
"aria-busy": "true",
|
|
26
|
+
...stylex.props(styles.loadingBody),
|
|
27
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
28
|
+
height: 220,
|
|
29
|
+
radius: 8
|
|
30
|
+
})
|
|
31
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
32
|
+
...styleProps(size === "small" ? styles.bodySmall : styles.body, surfaceClassNames.tableBleed),
|
|
33
|
+
children
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
PanelSurface.displayName = "PanelSurface";
|
|
37
|
+
//#endregion
|
|
38
|
+
export { PanelSurface as default };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=PanelSurface.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelSurface.mjs","names":[],"sources":["../../../src/dashboard/PanelSurface/PanelSurface.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\n\nimport Skeleton from '@/Skeleton';\nimport Spin from '@/Spin';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { surfaceClassNames } 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\" {...stylex.props(styles.loadingBody)}>\n <Skeleton height={220} radius={8} />\n </div>\n ) : (\n <div\n {...styleProps(\n size === 'small' ? styles.bodySmall : styles.body,\n surfaceClassNames.tableBleed,\n )}\n >\n {children}\n </div>\n )}\n </Surface>\n);\n\nPanelSurface.displayName = 'PanelSurface';\n\nexport default PanelSurface;\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,gBAAgB,EACpB,OACA,aACA,OACA,MACA,SACA,YACA,OAAO,WACP,WACA,OACA,eACuB,oBAAC,SAAD;CAAoB;CAAwB;CAAa,OAAO,WAAW,WAAW,oBAAC,MAAD;EAAM,MAAK;EAAQ,SAAQ;CAAW,CAAA,IAAI;CAAa;CAAM,QAAQ;CAAmB;CAAmB;CAAc;CACnO,UAAA,WAAW,CAAC,WAAW,oBAAC,OAAD;EAAK,aAAU;EAAO,GAAI,OAAO,MAAM,OAAO,WAAW;EAC7E,UAAA,oBAAC,UAAD;GAAU,QAAQ;GAAK,QAAQ;EAAI,CAAA;CAChC,CAAA,IAAI,oBAAC,OAAD;EAAK,GAAI,WAAW,SAAS,UAAU,OAAO,YAAY,OAAO,MAAM,kBAAkB,UAAU;EACzG;CACE,CAAA;AACA,CAAA;AACX,aAAa,cAAc"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/dashboard/PanelSurface/style.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
body: {
|
|
4
|
+
"--surface-pad-block": "lb4vqstq",
|
|
5
|
+
"--surface-pad-inline": "lbssx8jz",
|
|
6
|
+
kmVPX3: "lb1tamke2",
|
|
7
|
+
$$css: true
|
|
8
|
+
},
|
|
9
|
+
bodySmall: {
|
|
10
|
+
"--surface-pad-block": "lbo35jsc",
|
|
11
|
+
"--surface-pad-inline": "lbssx8jz",
|
|
12
|
+
k8WAf4: "lb10dr8xq",
|
|
13
|
+
kg3NbH: "lb1hr3lfm",
|
|
14
|
+
$$css: true
|
|
15
|
+
},
|
|
16
|
+
loadingBody: {
|
|
17
|
+
kGO01o: "lbwib8y2",
|
|
18
|
+
kLKAdn: "lb1iorvi4",
|
|
19
|
+
$$css: true
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { styles };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/PanelSurface/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nexport const styles = stylex.create({\n body: {\n '--surface-pad-block': '16px',\n '--surface-pad-inline': '16px',\n 'padding': 16,\n },\n bodySmall: {\n '--surface-pad-block': '12px',\n '--surface-pad-inline': '16px',\n 'paddingBlock': 12,\n 'paddingInline': 16,\n },\n loadingBody: {\n paddingBlockEnd: 8,\n paddingBlockStart: 4,\n },\n});\n"],"mappings":";AACA,MAAa,SAAS;CACpB,MAAM;EACJ,uBAAuB;EACvB,wBAAwB;EACxB,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,uBAAuB;EACvB,wBAAwB;EACxB,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SurfaceRenderLink } from "../Surface/type.mjs";
|
|
2
|
+
import { CSSProperties, ReactNode } from "react";
|
|
3
|
+
//#region src/dashboard/PanelSurface/type.d.ts
|
|
4
|
+
export interface PanelSurfaceProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
extra?: ReactNode;
|
|
9
|
+
href?: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
renderLink?: SurfaceRenderLink;
|
|
12
|
+
size?: 'default' | 'small';
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SectionProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/Section/Section.d.ts
|
|
3
|
+
/** A titled page section with description, extra and a "more" link, flat or as a card. */
|
|
4
|
+
declare const Section: {
|
|
5
|
+
({ className, variant, fontSize, title, more, moreLink, icon, children, desc, extra, gap, padded, renderLink, ...rest }: SectionProps): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Section as default };
|
|
10
|
+
//# sourceMappingURL=Section.d.mts.map
|