@lobehub/ui 5.50.1 → 5.50.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/base-ui/Input/style.d.mts +1 -1
- package/es/base-ui/Segmented/style.mjs +4 -0
- package/es/base-ui/Segmented/style.mjs.map +1 -1
- package/es/base-ui/Spin/Spin.mjs +2 -0
- package/es/base-ui/Spin/Spin.mjs.map +1 -1
- package/es/base-ui/Spin/style.mjs +4 -2
- package/es/base-ui/Spin/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs +130 -132
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/style.mjs +360 -237
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs +1 -3
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +16 -12
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,282 +1,405 @@
|
|
|
1
1
|
import { createStaticStyles } from "antd-style";
|
|
2
2
|
//#region src/dashboard/ConsoleNav/style.ts
|
|
3
|
-
const styles = createStaticStyles(({ css, cssVar, responsive }) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
font-size: ${cssVar.fontSizeSM};
|
|
12
|
-
font-variant-numeric: tabular-nums;
|
|
13
|
-
color: ${cssVar.colorError};
|
|
14
|
-
text-align: center;
|
|
15
|
-
|
|
16
|
-
background: color-mix(in srgb, ${cssVar.colorError} 12%, transparent);
|
|
17
|
-
`,
|
|
18
|
-
chevron: css`
|
|
19
|
-
flex: none;
|
|
20
|
-
transition: transform 160ms ease;
|
|
21
|
-
|
|
22
|
-
&[data-expanded='false'] {
|
|
23
|
-
transform: rotate(-90deg);
|
|
3
|
+
const styles = createStaticStyles(({ css, cssVar, responsive }) => {
|
|
4
|
+
const railFade = `
|
|
5
|
+
transition: opacity 120ms ease 80ms;
|
|
6
|
+
|
|
7
|
+
[data-collapsed='true'] & {
|
|
8
|
+
opacity: 0;
|
|
9
|
+
transition-delay: 0s;
|
|
24
10
|
}
|
|
25
|
-
`,
|
|
26
|
-
indicator: css`
|
|
27
|
-
display: flex;
|
|
28
|
-
flex: none;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
11
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
@media (prefers-reduced-motion: reduce) {
|
|
13
|
+
transition: none;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
return {
|
|
17
|
+
badge: css`
|
|
18
|
+
flex: none;
|
|
35
19
|
|
|
36
|
-
|
|
20
|
+
min-inline-size: 20px;
|
|
21
|
+
padding-inline: 6px;
|
|
22
|
+
border-radius: 999px;
|
|
37
23
|
|
|
38
|
-
|
|
24
|
+
font-size: ${cssVar.fontSizeSM};
|
|
25
|
+
font-variant-numeric: tabular-nums;
|
|
26
|
+
color: ${cssVar.colorError};
|
|
27
|
+
text-align: center;
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
transform: rotate(90deg);
|
|
42
|
-
}
|
|
43
|
-
`,
|
|
44
|
-
dot: css`
|
|
45
|
-
position: absolute;
|
|
46
|
-
inset-block-start: 7px;
|
|
47
|
-
inset-inline-end: 9px;
|
|
48
|
-
|
|
49
|
-
inline-size: 7px;
|
|
50
|
-
block-size: 7px;
|
|
51
|
-
border-radius: 999px;
|
|
52
|
-
|
|
53
|
-
background: ${cssVar.colorError};
|
|
54
|
-
`,
|
|
55
|
-
group: css`
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
margin-block-start: 12px;
|
|
59
|
-
|
|
60
|
-
&[data-level='0'][data-icon='true'] {
|
|
61
|
-
margin-block-start: 2px;
|
|
62
|
-
}
|
|
29
|
+
background: color-mix(in srgb, ${cssVar.colorError} 12%, transparent);
|
|
63
30
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
display: flex;
|
|
72
|
-
gap: 8px;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: space-between;
|
|
75
|
-
|
|
76
|
-
min-block-size: 32px;
|
|
77
|
-
padding-inline: 10px;
|
|
78
|
-
border: none;
|
|
79
|
-
border-radius: ${cssVar.borderRadius};
|
|
80
|
-
|
|
81
|
-
font-size: ${cssVar.fontSizeSM};
|
|
82
|
-
font-weight: 500;
|
|
83
|
-
color: ${cssVar.colorTextSecondary};
|
|
84
|
-
text-align: start;
|
|
85
|
-
|
|
86
|
-
background: none;
|
|
87
|
-
|
|
88
|
-
&:hover,
|
|
89
|
-
&[data-active='true'] {
|
|
90
|
-
color: ${cssVar.colorText};
|
|
91
|
-
}
|
|
31
|
+
${railFade}
|
|
32
|
+
`,
|
|
33
|
+
chevron: css`
|
|
34
|
+
flex: none;
|
|
35
|
+
transition:
|
|
36
|
+
transform 160ms ease,
|
|
37
|
+
opacity 120ms ease 80ms;
|
|
92
38
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
min-block-size: 36px;
|
|
97
|
-
font-size: ${cssVar.fontSize};
|
|
98
|
-
}
|
|
39
|
+
&[data-expanded='false'] {
|
|
40
|
+
transform: rotate(-90deg);
|
|
41
|
+
}
|
|
99
42
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
43
|
+
[data-collapsed='true'] & {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transition-delay: 0s;
|
|
46
|
+
}
|
|
103
47
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
transition: none;
|
|
50
|
+
}
|
|
51
|
+
`,
|
|
52
|
+
indicator: css`
|
|
53
|
+
display: flex;
|
|
54
|
+
flex: none;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
108
57
|
|
|
109
|
-
|
|
58
|
+
width: 18px;
|
|
59
|
+
height: 18px;
|
|
60
|
+
margin-inline-start: -6px;
|
|
110
61
|
|
|
111
|
-
font-size: ${cssVar.fontSizeSM};
|
|
112
|
-
font-weight: 400;
|
|
113
62
|
color: ${cssVar.colorTextDescription};
|
|
114
63
|
|
|
115
|
-
|
|
116
|
-
|
|
64
|
+
transition: transform 160ms ease;
|
|
65
|
+
|
|
66
|
+
&[data-expanded='true'] {
|
|
67
|
+
transform: rotate(90deg);
|
|
117
68
|
}
|
|
69
|
+
`,
|
|
70
|
+
dot: css`
|
|
71
|
+
position: absolute;
|
|
72
|
+
inset-block-start: 7px;
|
|
73
|
+
inset-inline-end: 9px;
|
|
118
74
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
75
|
+
inline-size: 7px;
|
|
76
|
+
block-size: 7px;
|
|
77
|
+
border-radius: 999px;
|
|
78
|
+
|
|
79
|
+
opacity: 0;
|
|
80
|
+
background: ${cssVar.colorError};
|
|
81
|
+
|
|
82
|
+
transition: opacity 120ms ease;
|
|
83
|
+
|
|
84
|
+
[data-collapsed='true'] & {
|
|
85
|
+
opacity: 1;
|
|
122
86
|
}
|
|
123
|
-
}
|
|
124
87
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
88
|
+
@media (prefers-reduced-motion: reduce) {
|
|
89
|
+
transition: none;
|
|
90
|
+
}
|
|
91
|
+
`,
|
|
92
|
+
fold: css`
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-rows: 1fr;
|
|
95
|
+
transition:
|
|
96
|
+
grid-template-rows 200ms ease,
|
|
97
|
+
margin 200ms ease,
|
|
98
|
+
opacity 120ms ease;
|
|
99
|
+
|
|
100
|
+
> div {
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
min-block-size: 0;
|
|
103
|
+
}
|
|
128
104
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
105
|
+
&[data-folded='true'] {
|
|
106
|
+
grid-template-rows: 0fr;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&[data-folded='true']:not(:first-child) {
|
|
111
|
+
margin-block-start: -2px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (prefers-reduced-motion: reduce) {
|
|
115
|
+
transition: none;
|
|
116
|
+
}
|
|
117
|
+
`,
|
|
118
|
+
group: css`
|
|
119
|
+
position: relative;
|
|
132
120
|
|
|
133
|
-
> [role='img'] {
|
|
134
121
|
display: flex;
|
|
135
|
-
flex:
|
|
136
|
-
}
|
|
137
|
-
`,
|
|
138
|
-
groupItems: css`
|
|
139
|
-
display: flex;
|
|
140
|
-
flex-direction: column;
|
|
141
|
-
gap: 2px;
|
|
142
|
-
min-block-size: 0;
|
|
143
|
-
`,
|
|
144
|
-
groupPanel: css`
|
|
145
|
-
display: grid;
|
|
146
|
-
grid-template-rows: 1fr;
|
|
147
|
-
transition: grid-template-rows 160ms ease;
|
|
148
|
-
|
|
149
|
-
> div {
|
|
150
|
-
overflow: hidden;
|
|
151
|
-
}
|
|
122
|
+
flex-direction: column;
|
|
152
123
|
|
|
153
|
-
|
|
154
|
-
grid-template-rows: 0fr;
|
|
155
|
-
}
|
|
124
|
+
margin-block-start: 12px;
|
|
156
125
|
|
|
157
|
-
|
|
158
|
-
transition: none;
|
|
159
|
-
}
|
|
160
|
-
`,
|
|
161
|
-
item: css`
|
|
162
|
-
position: relative;
|
|
126
|
+
transition: margin 200ms ease;
|
|
163
127
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
align-items: center;
|
|
128
|
+
&::before {
|
|
129
|
+
content: '';
|
|
167
130
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset-block-start: -6px;
|
|
133
|
+
inset-inline: 0;
|
|
171
134
|
|
|
172
|
-
|
|
173
|
-
text-decoration: none;
|
|
135
|
+
block-size: 1px;
|
|
174
136
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
color 120ms ease;
|
|
137
|
+
opacity: 0;
|
|
138
|
+
background: ${cssVar.colorBorderSecondary};
|
|
178
139
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
background: ${cssVar.colorFillTertiary};
|
|
182
|
-
}
|
|
140
|
+
transition: opacity 200ms ease;
|
|
141
|
+
}
|
|
183
142
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
143
|
+
&[data-level='0'][data-icon='true'] {
|
|
144
|
+
margin-block-start: 2px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:not([data-level='0']) {
|
|
148
|
+
margin-block-start: 6px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-collapsed='true'] & + &[data-level='0'][data-icon='false']::before {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
[data-collapsed='true'] &[data-rail-empty='true'] {
|
|
156
|
+
margin-block-start: 0;
|
|
157
|
+
|
|
158
|
+
&::before {
|
|
159
|
+
opacity: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
transition: none;
|
|
165
|
+
|
|
166
|
+
&::before {
|
|
167
|
+
transition: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`,
|
|
171
|
+
groupHead: css`
|
|
172
|
+
position: relative;
|
|
173
|
+
display: flex;
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
`,
|
|
176
|
+
groupHeader: css`
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
|
|
179
|
+
display: flex;
|
|
180
|
+
gap: 8px;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: space-between;
|
|
189
183
|
|
|
190
|
-
&[data-indent='1'],
|
|
191
|
-
&[data-indent='2'] {
|
|
192
184
|
min-block-size: 32px;
|
|
193
|
-
|
|
194
|
-
|
|
185
|
+
padding-inline: 10px;
|
|
186
|
+
border: none;
|
|
187
|
+
border-radius: ${cssVar.borderRadius};
|
|
195
188
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
font-size: ${cssVar.fontSizeSM};
|
|
190
|
+
font-weight: 500;
|
|
191
|
+
color: ${cssVar.colorTextSecondary};
|
|
192
|
+
text-align: start;
|
|
193
|
+
white-space: nowrap;
|
|
199
194
|
|
|
200
|
-
|
|
201
|
-
padding-inline-start: 56px;
|
|
202
|
-
}
|
|
195
|
+
background: none;
|
|
203
196
|
|
|
204
|
-
|
|
197
|
+
&:hover,
|
|
198
|
+
&[data-active='true'] {
|
|
199
|
+
color: ${cssVar.colorText};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&[data-icon='true'] {
|
|
203
|
+
gap: 10px;
|
|
204
|
+
justify-content: flex-start;
|
|
205
|
+
min-block-size: 36px;
|
|
206
|
+
font-size: ${cssVar.fontSize};
|
|
207
|
+
|
|
208
|
+
> [role='img'] {
|
|
209
|
+
justify-content: center;
|
|
210
|
+
inline-size: 18px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&[data-level='0'][data-icon='true']:hover {
|
|
215
|
+
background: ${cssVar.colorFillTertiary};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Nested groups read as quiet subheadings with the indicator right after the label. */
|
|
219
|
+
&:not([data-level='0']) {
|
|
220
|
+
gap: 8px;
|
|
221
|
+
justify-content: flex-start;
|
|
222
|
+
|
|
223
|
+
min-block-size: 26px;
|
|
224
|
+
|
|
225
|
+
font-size: ${cssVar.fontSizeSM};
|
|
226
|
+
font-weight: 400;
|
|
227
|
+
color: ${cssVar.colorTextDescription};
|
|
228
|
+
|
|
229
|
+
> [data-label] {
|
|
230
|
+
flex: 0 1 auto;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&:hover,
|
|
234
|
+
&[data-active='true'] {
|
|
235
|
+
color: ${cssVar.colorTextSecondary};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&[data-indent='1'] {
|
|
240
|
+
padding-inline-start: 38px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&[data-indent='2'] {
|
|
244
|
+
padding-inline-start: 56px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
> [role='img'] {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex: none;
|
|
250
|
+
}
|
|
251
|
+
`,
|
|
252
|
+
groupItems: css`
|
|
205
253
|
display: flex;
|
|
206
|
-
flex:
|
|
207
|
-
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
gap: 2px;
|
|
256
|
+
min-block-size: 0;
|
|
257
|
+
`,
|
|
258
|
+
groupPanel: css`
|
|
259
|
+
display: grid;
|
|
260
|
+
grid-template-rows: 1fr;
|
|
261
|
+
transition: grid-template-rows 160ms ease;
|
|
262
|
+
|
|
263
|
+
> div {
|
|
264
|
+
overflow: hidden;
|
|
265
|
+
}
|
|
208
266
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
padding-inline: 0;
|
|
213
|
-
}
|
|
267
|
+
&[data-expanded='false'] {
|
|
268
|
+
grid-template-rows: 0fr;
|
|
269
|
+
}
|
|
214
270
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
flex: 1;
|
|
222
|
-
text-overflow: ellipsis;
|
|
223
|
-
white-space: nowrap;
|
|
224
|
-
`,
|
|
225
|
-
nav: css`
|
|
226
|
-
scrollbar-width: thin;
|
|
227
|
-
|
|
228
|
-
display: flex;
|
|
229
|
-
flex: 1;
|
|
230
|
-
flex-direction: column;
|
|
231
|
-
gap: 2px;
|
|
232
|
-
|
|
233
|
-
min-block-size: 0;
|
|
234
|
-
padding-block-end: 12px;
|
|
235
|
-
padding-inline: 8px;
|
|
236
|
-
`,
|
|
237
|
-
railGroup: css`
|
|
238
|
-
display: flex;
|
|
239
|
-
flex-direction: column;
|
|
240
|
-
gap: 2px;
|
|
241
|
-
|
|
242
|
-
margin-block-start: 6px;
|
|
243
|
-
padding-block-start: 6px;
|
|
244
|
-
border-block-start: 1px solid ${cssVar.colorBorderSecondary};
|
|
245
|
-
|
|
246
|
-
&[data-first='true'] {
|
|
247
|
-
margin-block-start: 0;
|
|
248
|
-
border-block-start: none;
|
|
249
|
-
}
|
|
250
|
-
`,
|
|
251
|
-
railTop: css`
|
|
252
|
-
display: flex;
|
|
253
|
-
flex-direction: column;
|
|
254
|
-
gap: 2px;
|
|
255
|
-
`,
|
|
256
|
-
topItems: css`
|
|
257
|
-
display: flex;
|
|
258
|
-
flex-direction: column;
|
|
259
|
-
gap: 2px;
|
|
260
|
-
|
|
261
|
-
&[data-divided='true'] {
|
|
262
|
-
margin-block-end: 6px;
|
|
263
|
-
padding-block-end: 8px;
|
|
264
|
-
border-block-end: 1px solid ${cssVar.colorBorderSecondary};
|
|
265
|
-
}
|
|
266
|
-
`,
|
|
267
|
-
srOnly: css`
|
|
268
|
-
position: absolute;
|
|
271
|
+
&[data-instant='true'] {
|
|
272
|
+
transition: none;
|
|
273
|
+
}
|
|
274
|
+
`,
|
|
275
|
+
item: css`
|
|
276
|
+
position: relative;
|
|
269
277
|
|
|
270
|
-
|
|
278
|
+
display: flex;
|
|
279
|
+
gap: 10px;
|
|
280
|
+
align-items: center;
|
|
281
|
+
|
|
282
|
+
min-block-size: 36px;
|
|
283
|
+
padding-inline: 10px;
|
|
284
|
+
border-radius: ${cssVar.borderRadius};
|
|
271
285
|
|
|
272
|
-
|
|
273
|
-
|
|
286
|
+
color: ${cssVar.colorTextSecondary};
|
|
287
|
+
text-decoration: none;
|
|
288
|
+
white-space: nowrap;
|
|
274
289
|
|
|
275
|
-
|
|
290
|
+
transition:
|
|
291
|
+
background 120ms ease,
|
|
292
|
+
color 120ms ease;
|
|
276
293
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
294
|
+
&:hover {
|
|
295
|
+
color: ${cssVar.colorText};
|
|
296
|
+
background: ${cssVar.colorFillTertiary};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&[data-active='true'] {
|
|
300
|
+
font-weight: 500;
|
|
301
|
+
color: ${cssVar.colorText};
|
|
302
|
+
background: ${cssVar.colorFillSecondary};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&[data-indent='1'],
|
|
306
|
+
&[data-indent='2'] {
|
|
307
|
+
min-block-size: 32px;
|
|
308
|
+
color: ${cssVar.colorText};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&[data-indent='1'] {
|
|
312
|
+
padding-inline-start: 38px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&[data-indent='2'] {
|
|
316
|
+
padding-inline-start: 56px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-collapsed='true'] &:not([data-indent='0']) {
|
|
320
|
+
padding-inline-start: 10px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
> [role='img'] {
|
|
324
|
+
display: flex;
|
|
325
|
+
flex: none;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
${responsive.mobile} {
|
|
329
|
+
min-block-size: 44px;
|
|
330
|
+
}
|
|
331
|
+
`,
|
|
332
|
+
itemLabel: css`
|
|
333
|
+
overflow: hidden;
|
|
334
|
+
flex: 1;
|
|
335
|
+
text-overflow: ellipsis;
|
|
336
|
+
white-space: nowrap;
|
|
337
|
+
|
|
338
|
+
[data-collapsed='true'] & {
|
|
339
|
+
text-overflow: clip;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
${railFade}
|
|
343
|
+
`,
|
|
344
|
+
nav: css`
|
|
345
|
+
/* Scroll anchoring would jump the list in one frame while rail rows fold and unfold. */
|
|
346
|
+
overflow-anchor: none;
|
|
347
|
+
scrollbar-width: thin;
|
|
348
|
+
|
|
349
|
+
display: flex;
|
|
350
|
+
flex: 1;
|
|
351
|
+
flex-direction: column;
|
|
352
|
+
gap: 2px;
|
|
353
|
+
|
|
354
|
+
min-block-size: 0;
|
|
355
|
+
padding-block-end: 12px;
|
|
356
|
+
padding-inline: 8px;
|
|
357
|
+
`,
|
|
358
|
+
railLink: css`
|
|
359
|
+
position: absolute;
|
|
360
|
+
inset: 0;
|
|
361
|
+
border-radius: ${cssVar.borderRadius};
|
|
362
|
+
transition: background 120ms ease;
|
|
363
|
+
|
|
364
|
+
&:hover {
|
|
365
|
+
background: ${cssVar.colorFillTertiary};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
&[data-active='true'] {
|
|
369
|
+
background: ${cssVar.colorFillSecondary};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@starting-style {
|
|
373
|
+
background: transparent;
|
|
374
|
+
}
|
|
375
|
+
`,
|
|
376
|
+
topItems: css`
|
|
377
|
+
display: flex;
|
|
378
|
+
flex-direction: column;
|
|
379
|
+
gap: 2px;
|
|
380
|
+
transition:
|
|
381
|
+
margin 200ms ease,
|
|
382
|
+
padding 200ms ease,
|
|
383
|
+
border-color 200ms ease;
|
|
384
|
+
|
|
385
|
+
&[data-divided='true'] {
|
|
386
|
+
margin-block-end: 6px;
|
|
387
|
+
padding-block-end: 8px;
|
|
388
|
+
border-block-end: 1px solid ${cssVar.colorBorderSecondary};
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-collapsed='true'] &[data-rail-empty='true'] {
|
|
392
|
+
margin-block-end: 0;
|
|
393
|
+
padding-block-end: 0;
|
|
394
|
+
border-block-end-color: transparent;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@media (prefers-reduced-motion: reduce) {
|
|
398
|
+
transition: none;
|
|
399
|
+
}
|
|
400
|
+
`
|
|
401
|
+
};
|
|
402
|
+
});
|
|
280
403
|
//#endregion
|
|
281
404
|
export { styles };
|
|
282
405
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleNav/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n badge: css`\n flex: none;\n\n min-inline-size: 20px;\n padding-inline: 6px;\n border-radius: 999px;\n\n font-size: ${cssVar.fontSizeSM};\n font-variant-numeric: tabular-nums;\n color: ${cssVar.colorError};\n text-align: center;\n\n background: color-mix(in srgb, ${cssVar.colorError} 12%, transparent);\n `,\n chevron: css`\n flex: none;\n transition: transform 160ms ease;\n\n &[data-expanded='false'] {\n transform: rotate(-90deg);\n }\n `,\n indicator: css`\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 18px;\n height: 18px;\n margin-inline-start: -6px;\n\n color: ${cssVar.colorTextDescription};\n\n transition: transform 160ms ease;\n\n &[data-expanded='true'] {\n transform: rotate(90deg);\n }\n `,\n dot: css`\n position: absolute;\n inset-block-start: 7px;\n inset-inline-end: 9px;\n\n inline-size: 7px;\n block-size: 7px;\n border-radius: 999px;\n\n background: ${cssVar.colorError};\n `,\n group: css`\n display: flex;\n flex-direction: column;\n margin-block-start: 12px;\n\n &[data-level='0'][data-icon='true'] {\n margin-block-start: 2px;\n }\n\n &:not([data-level='0']) {\n margin-block-start: 6px;\n }\n `,\n groupHeader: css`\n cursor: pointer;\n\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: space-between;\n\n min-block-size: 32px;\n padding-inline: 10px;\n border: none;\n border-radius: ${cssVar.borderRadius};\n\n font-size: ${cssVar.fontSizeSM};\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n text-align: start;\n\n background: none;\n\n &:hover,\n &[data-active='true'] {\n color: ${cssVar.colorText};\n }\n\n &[data-icon='true'] {\n gap: 12px;\n justify-content: flex-start;\n min-block-size: 36px;\n font-size: ${cssVar.fontSize};\n }\n\n &[data-level='0'][data-icon='true']:hover {\n background: ${cssVar.colorFillTertiary};\n }\n\n /* Nested groups read as quiet subheadings with the indicator right after the label. */\n &:not([data-level='0']) {\n gap: 8px;\n justify-content: flex-start;\n\n min-block-size: 26px;\n\n font-size: ${cssVar.fontSizeSM};\n font-weight: 400;\n color: ${cssVar.colorTextDescription};\n\n > [data-label] {\n flex: 0 1 auto;\n }\n\n &:hover,\n &[data-active='true'] {\n color: ${cssVar.colorTextSecondary};\n }\n }\n\n &[data-indent='1'] {\n padding-inline-start: 38px;\n }\n\n &[data-indent='2'] {\n padding-inline-start: 56px;\n }\n\n > [role='img'] {\n display: flex;\n flex: none;\n }\n `,\n groupItems: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-block-size: 0;\n `,\n groupPanel: css`\n display: grid;\n grid-template-rows: 1fr;\n transition: grid-template-rows 160ms ease;\n\n > div {\n overflow: hidden;\n }\n\n &[data-expanded='false'] {\n grid-template-rows: 0fr;\n }\n\n &[data-instant='true'] {\n transition: none;\n }\n `,\n item: css`\n position: relative;\n\n display: flex;\n gap: 10px;\n align-items: center;\n\n min-block-size: 36px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n\n color: ${cssVar.colorTextSecondary};\n text-decoration: none;\n\n transition:\n background 120ms ease,\n color 120ms ease;\n\n &:hover {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillTertiary};\n }\n\n &[data-active='true'] {\n font-weight: 500;\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-indent='1'],\n &[data-indent='2'] {\n min-block-size: 32px;\n color: ${cssVar.colorText};\n }\n\n &[data-indent='1'] {\n padding-inline-start: 38px;\n }\n\n &[data-indent='2'] {\n padding-inline-start: 56px;\n }\n\n > [role='img'] {\n display: flex;\n flex: none;\n }\n\n &[data-collapsed='true'] {\n justify-content: center;\n min-block-size: 40px;\n padding-inline: 0;\n }\n\n ${responsive.mobile} {\n min-block-size: 44px;\n }\n `,\n itemLabel: css`\n overflow: hidden;\n flex: 1;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n nav: css`\n scrollbar-width: thin;\n\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n\n min-block-size: 0;\n padding-block-end: 12px;\n padding-inline: 8px;\n `,\n railGroup: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n margin-block-start: 6px;\n padding-block-start: 6px;\n border-block-start: 1px solid ${cssVar.colorBorderSecondary};\n\n &[data-first='true'] {\n margin-block-start: 0;\n border-block-start: none;\n }\n `,\n railTop: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n `,\n topItems: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &[data-divided='true'] {\n margin-block-end: 6px;\n padding-block-end: 8px;\n border-block-end: 1px solid ${cssVar.colorBorderSecondary};\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}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,kBAAkB;CACzE,OAAO,GAAG;;;;;;;iBAOK,OAAO,WAAW;;aAEtB,OAAO,WAAW;;;qCAGM,OAAO,WAAW;;CAErD,SAAS,GAAG;;;;;;;;CAQZ,WAAW,GAAG;;;;;;;;;;aAUH,OAAO,qBAAqB;;;;;;;;CAQvC,KAAK,GAAG;;;;;;;;;kBASQ,OAAO,WAAW;;CAElC,OAAO,GAAG;;;;;;;;;;;;;CAaV,aAAa,GAAG;;;;;;;;;;;qBAWG,OAAO,aAAa;;iBAExB,OAAO,WAAW;;aAEtB,OAAO,mBAAmB;;;;;;;eAOxB,OAAO,UAAU;;;;;;;mBAOb,OAAO,SAAS;;;;oBAIf,OAAO,kBAAkB;;;;;;;;;;mBAU1B,OAAO,WAAW;;eAEtB,OAAO,qBAAqB;;;;;;;;iBAQ1B,OAAO,mBAAmB;;;;;;;;;;;;;;;;;CAiBzC,YAAY,GAAG;;;;;;CAMf,YAAY,GAAG;;;;;;;;;;;;;;;;;CAiBf,MAAM,GAAG;;;;;;;;;qBASU,OAAO,aAAa;;aAE5B,OAAO,mBAAmB;;;;;;;;eAQxB,OAAO,UAAU;oBACZ,OAAO,kBAAkB;;;;;eAK9B,OAAO,UAAU;oBACZ,OAAO,mBAAmB;;;;;;eAM/B,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;MAsB1B,WAAW,OAAO;;;;CAItB,WAAW,GAAG;;;;;;CAMd,KAAK,GAAG;;;;;;;;;;;;CAYR,WAAW,GAAG;;;;;;;oCAOoB,OAAO,qBAAqB;;;;;;;CAO9D,SAAS,GAAG;;;;;CAKZ,UAAU,GAAG;;;;;;;;oCAQqB,OAAO,qBAAqB;;;CAG9D,QAAQ,GAAG;;;;;;;;;;;;AAYb,EAAE"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleNav/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => {\n // Fades out at once on collapse, but waits on expand until the width has room for the text.\n const railFade = `\n transition: opacity 120ms ease 80ms;\n\n [data-collapsed='true'] & {\n opacity: 0;\n transition-delay: 0s;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `;\n\n return {\n badge: css`\n flex: none;\n\n min-inline-size: 20px;\n padding-inline: 6px;\n border-radius: 999px;\n\n font-size: ${cssVar.fontSizeSM};\n font-variant-numeric: tabular-nums;\n color: ${cssVar.colorError};\n text-align: center;\n\n background: color-mix(in srgb, ${cssVar.colorError} 12%, transparent);\n\n ${railFade}\n `,\n chevron: css`\n flex: none;\n transition:\n transform 160ms ease,\n opacity 120ms ease 80ms;\n\n &[data-expanded='false'] {\n transform: rotate(-90deg);\n }\n\n [data-collapsed='true'] & {\n opacity: 0;\n transition-delay: 0s;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `,\n indicator: css`\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 18px;\n height: 18px;\n margin-inline-start: -6px;\n\n color: ${cssVar.colorTextDescription};\n\n transition: transform 160ms ease;\n\n &[data-expanded='true'] {\n transform: rotate(90deg);\n }\n `,\n dot: css`\n position: absolute;\n inset-block-start: 7px;\n inset-inline-end: 9px;\n\n inline-size: 7px;\n block-size: 7px;\n border-radius: 999px;\n\n opacity: 0;\n background: ${cssVar.colorError};\n\n transition: opacity 120ms ease;\n\n [data-collapsed='true'] & {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `,\n fold: css`\n display: grid;\n grid-template-rows: 1fr;\n transition:\n grid-template-rows 200ms ease,\n margin 200ms ease,\n opacity 120ms ease;\n\n > div {\n overflow: hidden;\n min-block-size: 0;\n }\n\n &[data-folded='true'] {\n grid-template-rows: 0fr;\n opacity: 0;\n }\n\n &[data-folded='true']:not(:first-child) {\n margin-block-start: -2px;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `,\n group: css`\n position: relative;\n\n display: flex;\n flex-direction: column;\n\n margin-block-start: 12px;\n\n transition: margin 200ms ease;\n\n &::before {\n content: '';\n\n position: absolute;\n inset-block-start: -6px;\n inset-inline: 0;\n\n block-size: 1px;\n\n opacity: 0;\n background: ${cssVar.colorBorderSecondary};\n\n transition: opacity 200ms ease;\n }\n\n &[data-level='0'][data-icon='true'] {\n margin-block-start: 2px;\n }\n\n &:not([data-level='0']) {\n margin-block-start: 6px;\n }\n\n [data-collapsed='true'] & + &[data-level='0'][data-icon='false']::before {\n opacity: 1;\n }\n\n [data-collapsed='true'] &[data-rail-empty='true'] {\n margin-block-start: 0;\n\n &::before {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n\n &::before {\n transition: none;\n }\n }\n `,\n groupHead: css`\n position: relative;\n display: flex;\n flex-direction: column;\n `,\n groupHeader: css`\n cursor: pointer;\n\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: space-between;\n\n min-block-size: 32px;\n padding-inline: 10px;\n border: none;\n border-radius: ${cssVar.borderRadius};\n\n font-size: ${cssVar.fontSizeSM};\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n text-align: start;\n white-space: nowrap;\n\n background: none;\n\n &:hover,\n &[data-active='true'] {\n color: ${cssVar.colorText};\n }\n\n &[data-icon='true'] {\n gap: 10px;\n justify-content: flex-start;\n min-block-size: 36px;\n font-size: ${cssVar.fontSize};\n\n > [role='img'] {\n justify-content: center;\n inline-size: 18px;\n }\n }\n\n &[data-level='0'][data-icon='true']:hover {\n background: ${cssVar.colorFillTertiary};\n }\n\n /* Nested groups read as quiet subheadings with the indicator right after the label. */\n &:not([data-level='0']) {\n gap: 8px;\n justify-content: flex-start;\n\n min-block-size: 26px;\n\n font-size: ${cssVar.fontSizeSM};\n font-weight: 400;\n color: ${cssVar.colorTextDescription};\n\n > [data-label] {\n flex: 0 1 auto;\n }\n\n &:hover,\n &[data-active='true'] {\n color: ${cssVar.colorTextSecondary};\n }\n }\n\n &[data-indent='1'] {\n padding-inline-start: 38px;\n }\n\n &[data-indent='2'] {\n padding-inline-start: 56px;\n }\n\n > [role='img'] {\n display: flex;\n flex: none;\n }\n `,\n groupItems: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-block-size: 0;\n `,\n groupPanel: css`\n display: grid;\n grid-template-rows: 1fr;\n transition: grid-template-rows 160ms ease;\n\n > div {\n overflow: hidden;\n }\n\n &[data-expanded='false'] {\n grid-template-rows: 0fr;\n }\n\n &[data-instant='true'] {\n transition: none;\n }\n `,\n item: css`\n position: relative;\n\n display: flex;\n gap: 10px;\n align-items: center;\n\n min-block-size: 36px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n\n color: ${cssVar.colorTextSecondary};\n text-decoration: none;\n white-space: nowrap;\n\n transition:\n background 120ms ease,\n color 120ms ease;\n\n &:hover {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillTertiary};\n }\n\n &[data-active='true'] {\n font-weight: 500;\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-indent='1'],\n &[data-indent='2'] {\n min-block-size: 32px;\n color: ${cssVar.colorText};\n }\n\n &[data-indent='1'] {\n padding-inline-start: 38px;\n }\n\n &[data-indent='2'] {\n padding-inline-start: 56px;\n }\n\n [data-collapsed='true'] &:not([data-indent='0']) {\n padding-inline-start: 10px;\n }\n\n > [role='img'] {\n display: flex;\n flex: none;\n }\n\n ${responsive.mobile} {\n min-block-size: 44px;\n }\n `,\n itemLabel: css`\n overflow: hidden;\n flex: 1;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n [data-collapsed='true'] & {\n text-overflow: clip;\n }\n\n ${railFade}\n `,\n nav: css`\n /* Scroll anchoring would jump the list in one frame while rail rows fold and unfold. */\n overflow-anchor: none;\n scrollbar-width: thin;\n\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n\n min-block-size: 0;\n padding-block-end: 12px;\n padding-inline: 8px;\n `,\n railLink: css`\n position: absolute;\n inset: 0;\n border-radius: ${cssVar.borderRadius};\n transition: background 120ms ease;\n\n &:hover {\n background: ${cssVar.colorFillTertiary};\n }\n\n &[data-active='true'] {\n background: ${cssVar.colorFillSecondary};\n }\n\n @starting-style {\n background: transparent;\n }\n `,\n topItems: css`\n display: flex;\n flex-direction: column;\n gap: 2px;\n transition:\n margin 200ms ease,\n padding 200ms ease,\n border-color 200ms ease;\n\n &[data-divided='true'] {\n margin-block-end: 6px;\n padding-block-end: 8px;\n border-block-end: 1px solid ${cssVar.colorBorderSecondary};\n }\n\n [data-collapsed='true'] &[data-rail-empty='true'] {\n margin-block-end: 0;\n padding-block-end: 0;\n border-block-end-color: transparent;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `,\n };\n});\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,iBAAiB;CAExE,MAAM,WAAW;;;;;;;;;;;;CAajB,OAAO;EACL,OAAO,GAAG;;;;;;;mBAOK,OAAO,WAAW;;eAEtB,OAAO,WAAW;;;uCAGM,OAAO,WAAW;;QAEjD,SAAS;;EAEb,SAAS,GAAG;;;;;;;;;;;;;;;;;;;EAmBZ,WAAW,GAAG;;;;;;;;;;eAUH,OAAO,qBAAqB;;;;;;;;EAQvC,KAAK,GAAG;;;;;;;;;;oBAUQ,OAAO,WAAW;;;;;;;;;;;;EAYlC,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BT,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;sBAoBQ,OAAO,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiC9C,WAAW,GAAG;;;;;EAKd,aAAa,GAAG;;;;;;;;;;;uBAWG,OAAO,aAAa;;mBAExB,OAAO,WAAW;;eAEtB,OAAO,mBAAmB;;;;;;;;iBAQxB,OAAO,UAAU;;;;;;;qBAOb,OAAO,SAAS;;;;;;;;;sBASf,OAAO,kBAAkB;;;;;;;;;;qBAU1B,OAAO,WAAW;;iBAEtB,OAAO,qBAAqB;;;;;;;;mBAQ1B,OAAO,mBAAmB;;;;;;;;;;;;;;;;;EAiBzC,YAAY,GAAG;;;;;;EAMf,YAAY,GAAG;;;;;;;;;;;;;;;;;EAiBf,MAAM,GAAG;;;;;;;;;uBASU,OAAO,aAAa;;eAE5B,OAAO,mBAAmB;;;;;;;;;iBASxB,OAAO,UAAU;sBACZ,OAAO,kBAAkB;;;;;iBAK9B,OAAO,UAAU;sBACZ,OAAO,mBAAmB;;;;;;iBAM/B,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;QAoB1B,WAAW,OAAO;;;;EAItB,WAAW,GAAG;;;;;;;;;;QAUV,SAAS;;EAEb,KAAK,GAAG;;;;;;;;;;;;;;EAcR,UAAU,GAAG;;;uBAGM,OAAO,aAAa;;;;sBAIrB,OAAO,kBAAkB;;;;sBAIzB,OAAO,mBAAmB;;;;;;;EAO5C,UAAU,GAAG;;;;;;;;;;;;sCAYqB,OAAO,qBAAqB;;;;;;;;;;;;;CAahE;AACF,CAAC"}
|
|
@@ -5,15 +5,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
//#region src/dashboard/ConsoleShell/ConsoleBrand.tsx
|
|
6
6
|
function ConsoleBrand({ href = "/", label, logo, renderLink, title }) {
|
|
7
7
|
const shell = useConsoleShellState();
|
|
8
|
-
const
|
|
9
|
-
const lockup = title == null || title === false || title === "" ? logo : /* @__PURE__ */ jsxs("span", {
|
|
8
|
+
const content = title == null || title === false || title === "" ? logo : /* @__PURE__ */ jsxs("span", {
|
|
10
9
|
className: styles.brandLockup,
|
|
11
10
|
children: [logo, /* @__PURE__ */ jsx("span", {
|
|
12
11
|
className: styles.brandName,
|
|
13
12
|
children: title
|
|
14
13
|
})]
|
|
15
14
|
});
|
|
16
|
-
const content = collapsed ? logo : lockup;
|
|
17
15
|
const linkProps = {
|
|
18
16
|
"aria-label": label ?? (typeof title === "string" ? title : "Home"),
|
|
19
17
|
"children": content,
|