@lobehub/ui 5.60.0 → 5.61.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.
Files changed (81) hide show
  1. package/es/EmojiPicker/AvatarUploader.mjs +1 -1
  2. package/es/Form/components/FormSubmitFooter.mjs +1 -1
  3. package/es/base-ui/Input/style.d.mts +1 -1
  4. package/es/base-ui/Pagination/Pagination.mjs +158 -41
  5. package/es/base-ui/Pagination/Pagination.mjs.map +1 -1
  6. package/es/base-ui/Pagination/helpers.mjs +3 -3
  7. package/es/base-ui/Pagination/helpers.mjs.map +1 -1
  8. package/es/base-ui/Pagination/index.d.mts +2 -2
  9. package/es/base-ui/Pagination/style.mjs +39 -0
  10. package/es/base-ui/Pagination/style.mjs.map +1 -1
  11. package/es/base-ui/Pagination/type.d.mts +42 -4
  12. package/es/base-ui/QRCode/QRCode.mjs +1 -1
  13. package/es/base-ui/Table/Column.d.mts +9 -0
  14. package/es/base-ui/Table/Column.mjs +7 -0
  15. package/es/base-ui/Table/Column.mjs.map +1 -0
  16. package/es/base-ui/Table/ColumnGroup.d.mts +12 -0
  17. package/es/base-ui/Table/ColumnGroup.mjs +7 -0
  18. package/es/base-ui/Table/ColumnGroup.mjs.map +1 -0
  19. package/es/base-ui/Table/ExpandIcon.mjs +33 -0
  20. package/es/base-ui/Table/ExpandIcon.mjs.map +1 -0
  21. package/es/base-ui/Table/FilterDropdown.mjs +284 -0
  22. package/es/base-ui/Table/FilterDropdown.mjs.map +1 -0
  23. package/es/base-ui/Table/LoadingSkeleton.mjs +83 -0
  24. package/es/base-ui/Table/LoadingSkeleton.mjs.map +1 -0
  25. package/es/base-ui/Table/Table.d.mts +21 -3
  26. package/es/base-ui/Table/Table.mjs +444 -97
  27. package/es/base-ui/Table/Table.mjs.map +1 -1
  28. package/es/base-ui/Table/columnUtils.mjs +56 -0
  29. package/es/base-ui/Table/columnUtils.mjs.map +1 -0
  30. package/es/base-ui/Table/index.d.mts +4 -2
  31. package/es/base-ui/Table/selectionUtils.d.mts +9 -0
  32. package/es/base-ui/Table/selectionUtils.mjs +128 -0
  33. package/es/base-ui/Table/selectionUtils.mjs.map +1 -0
  34. package/es/base-ui/Table/semantic.mjs +55 -0
  35. package/es/base-ui/Table/semantic.mjs.map +1 -0
  36. package/es/base-ui/Table/style.mjs +801 -161
  37. package/es/base-ui/Table/style.mjs.map +1 -1
  38. package/es/base-ui/Table/type.d.mts +471 -37
  39. package/es/base-ui/Table/useBreakpoint.mjs +41 -0
  40. package/es/base-ui/Table/useBreakpoint.mjs.map +1 -0
  41. package/es/base-ui/Table/useFilter.mjs +64 -0
  42. package/es/base-ui/Table/useFilter.mjs.map +1 -0
  43. package/es/base-ui/Table/useSelection.mjs +421 -0
  44. package/es/base-ui/Table/useSelection.mjs.map +1 -0
  45. package/es/base-ui/Table/useSorter.mjs +152 -0
  46. package/es/base-ui/Table/useSorter.mjs.map +1 -0
  47. package/es/base-ui/Table/useTableState.mjs +82 -55
  48. package/es/base-ui/Table/useTableState.mjs.map +1 -1
  49. package/es/base-ui/index.d.mts +6 -4
  50. package/es/base-ui/index.mjs +9 -9
  51. package/es/chat/EditableMessageList/EditableMessageList.mjs +1 -1
  52. package/es/chat/MessageInput/MessageInput.mjs +1 -1
  53. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  54. package/es/chat/TokenTag/TokenTag.mjs +1 -1
  55. package/es/i18n/resources/en/index.d.mts +3 -2
  56. package/es/i18n/resources/en/index.mjs +4 -2
  57. package/es/i18n/resources/en/index.mjs.map +1 -1
  58. package/es/i18n/resources/en/table.d.mts +23 -0
  59. package/es/i18n/resources/en/table.mjs +24 -0
  60. package/es/i18n/resources/en/table.mjs.map +1 -0
  61. package/es/i18n/resources/zhCn/index.d.mts +3 -2
  62. package/es/i18n/resources/zhCn/index.mjs +4 -2
  63. package/es/i18n/resources/zhCn/index.mjs.map +1 -1
  64. package/es/i18n/resources/zhCn/table.d.mts +23 -0
  65. package/es/i18n/resources/zhCn/table.mjs +24 -0
  66. package/es/i18n/resources/zhCn/table.mjs.map +1 -0
  67. package/es/i18n/types.d.mts +2 -1
  68. package/es/index.mjs +2 -2
  69. package/package.json +2 -2
  70. package/es/base-ui/Table/FilterMenu.mjs +0 -45
  71. package/es/base-ui/Table/FilterMenu.mjs.map +0 -1
  72. package/es/base-ui/Table/TableBody.mjs +0 -59
  73. package/es/base-ui/Table/TableBody.mjs.map +0 -1
  74. package/es/base-ui/Table/TableHead.mjs +0 -50
  75. package/es/base-ui/Table/TableHead.mjs.map +0 -1
  76. package/es/base-ui/Table/features.mjs +0 -12
  77. package/es/base-ui/Table/features.mjs.map +0 -1
  78. package/es/base-ui/Table/fixedOffsets.mjs +0 -29
  79. package/es/base-ui/Table/fixedOffsets.mjs.map +0 -1
  80. package/es/base-ui/Table/toColumnDefs.mjs +0 -26
  81. package/es/base-ui/Table/toColumnDefs.mjs.map +0 -1
@@ -1,168 +1,808 @@
1
- import { focusRing } from "../focusRing.mjs";
2
1
  import { createStaticStyles } from "antd-style";
3
2
  //#region src/base-ui/Table/style.ts
4
- const styles = createStaticStyles(({ css, cssVar }) => ({
5
- bordered: css`
6
- border: 1px solid ${cssVar.colorBorderSecondary};
7
- border-radius: ${cssVar.borderRadiusLG};
8
-
9
- & th,
10
- & td {
11
- border-inline-end: 1px solid ${cssVar.colorBorderSecondary};
12
- }
13
-
14
- & th:last-child,
15
- & td:last-child {
16
- border-inline-end: 0;
17
- }
18
- `,
19
- cell: css`
20
- border-block-end: 1px solid ${cssVar.colorBorderSecondary};
21
- font-variant-numeric: tabular-nums;
22
- background: ${cssVar.colorBgContainer};
23
- `,
24
- clickable: css`
25
- cursor: pointer;
26
- `,
27
- ellipsis: css`
28
- overflow: hidden;
29
- max-width: 0;
30
- text-overflow: ellipsis;
31
- white-space: nowrap;
32
- `,
33
- empty: css`
34
- padding-block: 32px;
35
- color: ${cssVar.colorTextDescription};
36
- text-align: center;
37
- `,
38
- filterActive: css`
39
- color: ${cssVar.colorPrimary};
40
- `,
41
- filterButton: css`
42
- ${focusRing};
43
- cursor: pointer;
44
-
45
- display: inline-flex;
46
- align-items: center;
47
- justify-content: center;
48
-
49
- padding: 2px;
50
- border: 0;
51
- border-radius: 4px;
52
-
53
- color: ${cssVar.colorTextQuaternary};
54
-
55
- background: none;
56
-
57
- &:hover {
58
- color: ${cssVar.colorText};
59
- background: ${cssVar.colorFillTertiary};
60
- }
61
- `,
62
- fixed: css`
63
- z-index: 1;
64
- background: ${cssVar.colorBgContainer};
65
- `,
66
- header: css`
67
- position: sticky;
68
- z-index: 2;
69
- inset-block-start: 0;
70
-
71
- font-size: 13px;
72
- font-weight: 500;
73
- color: ${cssVar.colorTextSecondary};
74
- text-align: start;
75
-
76
- background: ${cssVar.colorBgContainer};
77
- box-shadow:
78
- inset 0 -1px 0 ${cssVar.colorBorderSecondary},
79
- inset 0 999px 0 ${cssVar.colorFillQuaternary};
80
- `,
81
- headerInner: css`
82
- display: inline-flex;
83
- gap: 6px;
84
- align-items: center;
85
- `,
86
- loading: css`
3
+ /** Own prefix so rc-table classNames never collide with antd's global `.ant-table` CSS. */
4
+ const PREFIX_CLS = "lobe-table";
5
+ const p = `.${PREFIX_CLS}`;
6
+ const PADDING_BLOCK = "--lobe-table-padding-block";
7
+ const PADDING_INLINE = "--lobe-table-padding-inline";
8
+ const Z_FIXED = 2;
9
+ /** Rows of this table's own sections only, so the rules never leak into nested tables. */
10
+ const ownRows = [
11
+ "content",
12
+ "header",
13
+ "body",
14
+ "summary"
15
+ ].map((section) => `& > ${p}-container > ${p}-${section} > table > * > tr`).join(", ");
16
+ const ownCells = (cell) => ownRows.split(", ").map((row) => `${row} > ${cell}`).join(", ");
17
+ const styles = createStaticStyles(({ css, cssVar }) => {
18
+ const border = `1px solid ${cssVar.colorBorderSecondary}`;
19
+ const fixShadowBase = `
20
+ pointer-events: none;
21
+ content: '';
87
22
  position: absolute;
88
- z-index: 3;
89
- inset: 0;
90
-
91
- display: flex;
92
- align-items: center;
93
- justify-content: center;
94
-
95
- background: color-mix(in srgb, ${cssVar.colorBgContainer} 60%, transparent);
96
- `,
97
- middle: css`
98
- & th,
99
- & td {
100
- padding-block: 12px;
101
- padding-inline: 16px;
102
- }
103
- `,
104
- pagination: css`
105
- display: flex;
106
- justify-content: flex-end;
107
- margin-block-start: 12px;
108
- `,
109
- root: css`
110
- min-width: 0;
111
- `,
112
- row: css`
113
- &:hover > td {
114
- background: color-mix(in srgb, ${cssVar.colorBgContainer}, ${cssVar.colorText} 3%);
115
- }
116
-
117
- &:last-child > td {
118
- border-block-end: 0;
119
- }
120
- `,
121
- small: css`
122
- & th,
123
- & td {
124
- padding-block: 8px;
125
- padding-inline: 12px;
126
- }
127
- `,
128
- sortButton: css`
129
- ${focusRing};
130
- cursor: pointer;
131
-
132
- display: inline-flex;
133
- gap: 6px;
134
- align-items: center;
135
-
136
- padding: 0;
137
- border: 0;
138
- border-radius: 4px;
139
-
140
- font: inherit;
141
- color: inherit;
142
-
143
- background: none;
144
- `,
145
- sortCaret: css`
146
- display: inline-flex;
147
- flex-direction: column;
148
- color: ${cssVar.colorTextQuaternary};
149
-
150
- & > [data-active='true'] {
23
+ inset-block: 0 -1px;
24
+ width: 30px;
25
+ transition: box-shadow ${cssVar.motionDurationSlow};
26
+ `;
27
+ const startShadow = `box-shadow: inset 10px 0 8px -8px ${cssVar.colorSplit};`;
28
+ const endShadow = `box-shadow: inset -10px 0 8px -8px ${cssVar.colorSplit};`;
29
+ return {
30
+ outlined: css`
31
+ &${p}-outlined {
32
+ & > ${p}-title {
33
+ border: ${border};
34
+ border-block-end: 0;
35
+ border-start-start-radius: ${cssVar.borderRadiusLG};
36
+ border-start-end-radius: ${cssVar.borderRadiusLG};
37
+ }
38
+
39
+ /* Like antd: start + top on the container; cells draw the end / bottom edges
40
+ so rowspan group headers never lose a vertical line to \`:last-child\`. */
41
+ & > ${p}-container {
42
+ overflow: clip;
43
+ border-block-start: ${border};
44
+ border-inline-start: ${border};
45
+ border-radius: ${cssVar.borderRadiusLG};
46
+ }
47
+
48
+ & > ${p}-title + ${p}-container {
49
+ border-start-start-radius: 0;
50
+ border-start-end-radius: 0;
51
+ }
52
+
53
+ &:has(> ${p}-footer) > ${p}-container {
54
+ border-end-start-radius: 0;
55
+ border-end-end-radius: 0;
56
+ }
57
+
58
+ & > ${p}-footer {
59
+ border: ${border};
60
+ border-block-start: 0;
61
+ border-end-start-radius: ${cssVar.borderRadiusLG};
62
+ border-end-end-radius: ${cssVar.borderRadiusLG};
63
+ }
64
+
65
+ ${ownCells("th")}, ${ownCells("td")} {
66
+ border-inline-end: ${border};
67
+ }
68
+
69
+ /* Every header row (including the last) draws one bottom edge — no inset
70
+ shadow underneath, or group headers look double-thick. */
71
+ & > ${p}-container > * > table > thead > tr > th {
72
+ border-block-end: ${border};
73
+ box-shadow: inset 0 999px 0 ${cssVar.colorFillQuaternary};
74
+ }
75
+
76
+ & ${p}-tbody-virtual ${p}-cell {
77
+ border-inline-end: ${border};
78
+ }
79
+ }
80
+ `,
81
+ filled: css`
82
+ &${p}-filled {
83
+ & > ${p}-title, & > ${p}-footer {
84
+ border-radius: ${cssVar.borderRadiusLG};
85
+ background: ${cssVar.colorFillQuaternary};
86
+ }
87
+
88
+ & > ${p}-title {
89
+ border-end-start-radius: 0;
90
+ border-end-end-radius: 0;
91
+ }
92
+
93
+ & > ${p}-footer {
94
+ border-start-start-radius: 0;
95
+ border-start-end-radius: 0;
96
+ }
97
+
98
+ & > ${p}-container {
99
+ overflow: clip;
100
+ border-radius: ${cssVar.borderRadiusLG};
101
+ background: ${cssVar.colorFillTertiary};
102
+ }
103
+
104
+ & > ${p}-title + ${p}-container {
105
+ border-start-start-radius: 0;
106
+ border-start-end-radius: 0;
107
+ }
108
+
109
+ &:has(> ${p}-footer) > ${p}-container {
110
+ border-end-start-radius: 0;
111
+ border-end-end-radius: 0;
112
+ }
113
+
114
+ /* Soft header band: same FillTertiary surface as the body, plus the same
115
+ FillQuaternary inset wash borderless/outlined use — light layering, not a
116
+ heavy Secondary fill. Sticky thead keeps an opaque Tertiary base so rows
117
+ do not show through while scrolling. */
118
+ & ${p}-thead > tr > th,
119
+ & ${p}-thead > tr > td {
120
+ background: ${cssVar.colorFillTertiary};
121
+ box-shadow:
122
+ inset 0 -1px 0 ${cssVar.colorBorderSecondary},
123
+ inset 0 999px 0 ${cssVar.colorFillQuaternary};
124
+ }
125
+
126
+ & ${p}-tbody > tr > td,
127
+ & ${p}-tbody > tr > th,
128
+ & ${p}-tbody-virtual ${p}-cell {
129
+ background: transparent;
130
+ }
131
+
132
+ & ${p}-thead > tr > th${p}-cell-fix, & ${p}-thead > tr > td${p}-cell-fix {
133
+ background: ${cssVar.colorFillTertiary};
134
+ box-shadow:
135
+ inset 0 -1px 0 ${cssVar.colorBorderSecondary},
136
+ inset 0 999px 0 ${cssVar.colorFillQuaternary};
137
+ }
138
+ }
139
+ `,
140
+ clickable: css`
141
+ cursor: pointer;
142
+ `,
143
+ /** Title text of an `ellipsis` column; truncates inside the sort button / header controls. */
144
+ columnTitle: css`
145
+ overflow: hidden;
146
+
147
+ min-width: 0;
148
+
149
+ text-overflow: ellipsis;
150
+ word-break: keep-all;
151
+ white-space: nowrap;
152
+ `,
153
+ filterActive: css`
154
+ &&,
155
+ &&:hover {
156
+ color: ${cssVar.colorPrimary};
157
+ }
158
+ `,
159
+ filterButton: css`
160
+ flex: none;
161
+ margin-block: -4px;
162
+ `,
163
+ filterButtons: css`
164
+ display: flex;
165
+ gap: 8px;
166
+ align-items: center;
167
+ justify-content: space-between;
168
+
169
+ padding-block: 7px;
170
+ padding-inline: 8px;
171
+ border-block-start: 1px solid ${cssVar.colorSplit};
172
+ `,
173
+ filterCheckAll: css`
174
+ margin-block-end: 4px;
175
+ padding-inline: 4px;
176
+ `,
177
+ filterDropdown: css`
178
+ display: flex;
179
+ flex-direction: column;
180
+ min-width: 120px;
181
+ `,
182
+ filterEmpty: css`
183
+ padding-block: 16px;
184
+ padding-inline: 0;
185
+ `,
186
+ filterGroup: css`
187
+ display: flex;
188
+ flex-direction: column;
189
+
190
+ & > div:not(:first-child) {
191
+ padding-inline-start: 20px;
192
+ }
193
+ `,
194
+ filterGroupTitle: css`
195
+ padding-block: 5px;
196
+ padding-inline: 8px;
197
+ font-size: 12px;
198
+ color: ${cssVar.colorTextDescription};
199
+ `,
200
+ filterItem: css`
201
+ display: flex;
202
+ align-items: center;
203
+
204
+ padding-block: 5px;
205
+ padding-inline: 8px;
206
+ border-radius: ${cssVar.borderRadiusSM};
207
+
208
+ white-space: nowrap;
209
+
210
+ &:hover {
211
+ background: ${cssVar.colorFillTertiary};
212
+ }
213
+
214
+ & > label {
215
+ cursor: pointer;
216
+ flex: 1;
217
+ }
218
+ `,
219
+ filterMenu: css`
220
+ overflow: auto;
221
+ display: flex;
222
+ flex-direction: column;
223
+
224
+ max-height: 264px;
225
+ padding: 4px;
226
+ `,
227
+ filterPopup: css`
228
+ overflow: hidden;
229
+ padding: 0;
230
+ `,
231
+ filterSearch: css`
232
+ padding: 8px;
233
+ border-block-end: 1px solid ${cssVar.colorSplit};
234
+ `,
235
+ filterTree: css`
236
+ overflow: auto;
237
+ max-height: 264px;
238
+ padding: 8px;
239
+ `,
240
+ headerInner: css`
241
+ display: inline-flex;
242
+ gap: 6px;
243
+ align-items: center;
244
+
245
+ min-width: 0;
246
+ max-width: 100%;
247
+
248
+ vertical-align: middle;
249
+ `,
250
+ hoverable: css`
251
+ & ${p}-tbody > tr > ${p}-cell-row-hover, & ${p}-tbody-virtual ${p}-row:hover > ${p}-cell {
252
+ background: color-mix(in srgb, ${cssVar.colorBgContainer}, ${cssVar.colorText} 3%);
253
+ }
254
+ `,
255
+ loading: css`
256
+ position: absolute;
257
+ z-index: calc(var(--columns-count, 1) * 2 + ${Z_FIXED} + 2);
258
+ inset: 0;
259
+
260
+ display: flex;
261
+ flex-direction: column;
262
+ gap: 8px;
263
+ align-items: center;
264
+ justify-content: center;
265
+
266
+ color: ${cssVar.colorTextSecondary};
267
+
268
+ background: color-mix(in srgb, ${cssVar.colorBgContainer} 60%, transparent);
269
+ `,
270
+ /**
271
+ * Empty-state loading body. Tracks follow leaf column widths so bars sit under the
272
+ * live header; cell padding reuses the size CSS vars on the table ancestor.
273
+ */
274
+ skeleton: css`
275
+ display: flex;
276
+ flex-direction: column;
277
+
278
+ width: 100%;
279
+ min-width: 0;
280
+
281
+ text-align: start;
282
+ `,
283
+ skeletonCell: css`
284
+ display: flex;
285
+ align-items: center;
286
+
287
+ min-width: 0;
288
+ padding-block: var(${PADDING_BLOCK});
289
+ padding-inline: var(${PADDING_INLINE});
290
+ `,
291
+ skeletonRow: css`
292
+ display: grid;
293
+ align-items: stretch;
294
+
295
+ width: 100%;
296
+ min-width: 0;
297
+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};
298
+
299
+ &:last-child {
300
+ border-block-end: 0;
301
+ }
302
+ `,
303
+ pagination: css`
304
+ display: flex;
305
+ margin-block: 16px;
306
+ `,
307
+ paginationCenter: css`
308
+ justify-content: center;
309
+ `,
310
+ paginationEnd: css`
311
+ justify-content: flex-end;
312
+ `,
313
+ paginationStart: css`
314
+ justify-content: flex-start;
315
+ `,
316
+ paginationTop: css`
317
+ margin-block: 0 16px;
318
+ `,
319
+ root: css`
320
+ min-width: 0;
321
+ `,
322
+ /** Header box of the selection column; `selectionExtra` hangs off its end. */
323
+ selection: css`
324
+ position: relative;
325
+ display: inline-flex;
326
+ flex-direction: column;
327
+ vertical-align: middle;
328
+ `,
329
+ selectionColumn: css`
330
+ && {
331
+ padding-inline: 8px;
332
+ text-align: center;
333
+ }
334
+
335
+ & > * {
336
+ vertical-align: middle;
337
+ }
338
+ `,
339
+ selectionExtra: css`
340
+ position: absolute;
341
+ z-index: 1;
342
+ inset-block-start: 0;
343
+
344
+ display: flex;
345
+ align-items: center;
346
+
347
+ height: 100%;
348
+ margin-inline-start: 100%;
349
+ padding-inline-start: 2px;
350
+ `,
351
+ selectionRadioGroup: css`
352
+ display: inline-flex;
353
+ vertical-align: middle;
354
+ `,
355
+ selectionTrigger: css`
356
+ flex: none;
357
+ margin-block: -4px;
358
+ `,
359
+ sizeLarge: css`
360
+ ${PADDING_BLOCK}: 16px;
361
+ ${PADDING_INLINE}: 16px;
362
+ `,
363
+ sizeMedium: css`
364
+ ${PADDING_BLOCK}: 12px;
365
+ ${PADDING_INLINE}: 16px;
366
+ `,
367
+ sizeSmall: css`
368
+ ${PADDING_BLOCK}: 8px;
369
+ ${PADDING_INLINE}: 12px;
370
+ `,
371
+ sortButton: css`
372
+ display: inline-flex;
373
+ gap: 4px;
374
+ align-items: center;
375
+
376
+ min-width: 0;
377
+ max-width: 100%;
378
+ `,
379
+ sortCaret: css`
380
+ flex: none;
381
+ margin-block: -4px;
382
+ `,
383
+ sortTitle: css`
384
+ cursor: pointer;
385
+ min-width: 0;
386
+ `,
387
+ sortedColumn: css`
388
+ ${p}-tbody > tr > &${p}-cell {
389
+ background: ${cssVar.colorFillQuaternary};
390
+ }
391
+ `,
392
+ spinContainer: css`
393
+ position: relative;
394
+ `,
395
+ table: css`
396
+ font-size: 14px;
151
397
  color: ${cssVar.colorText};
152
- }
153
- `,
154
- table: css`
155
- border-spacing: 0;
156
- border-collapse: separate;
157
- width: 100%;
158
- font-size: 14px;
159
- `,
160
- wrapper: css`
161
- position: relative;
162
- overflow: auto;
163
- `
164
- }));
398
+ background: ${cssVar.colorBgContainer};
399
+
400
+ & table {
401
+ border-spacing: 0;
402
+ border-collapse: separate;
403
+ width: 100%;
404
+ text-align: start;
405
+ }
406
+
407
+ /* ============================== Cell ============================== */
408
+ & ${p}-cell, & ${p}-thead > tr > th,
409
+ & ${p}-tbody > tr > td,
410
+ & tfoot > tr > th,
411
+ & tfoot > tr > td {
412
+ position: relative;
413
+ padding-block: var(${PADDING_BLOCK});
414
+ padding-inline: var(${PADDING_INLINE});
415
+ overflow-wrap: break-word;
416
+ }
417
+
418
+ & ${p}-thead > tr > th,
419
+ & ${p}-thead > tr > td {
420
+ font-size: 13px;
421
+ font-weight: 500;
422
+ color: ${cssVar.colorTextSecondary};
423
+ text-align: start;
424
+
425
+ background: ${cssVar.colorBgContainer};
426
+ box-shadow:
427
+ inset 0 -1px 0 ${cssVar.colorBorderSecondary},
428
+ inset 0 999px 0 ${cssVar.colorFillQuaternary};
429
+
430
+ &[colspan]:not([colspan='1']) {
431
+ text-align: center;
432
+ }
433
+ }
434
+
435
+ /* th covers rowScope row headers. */
436
+ & ${p}-tbody > tr > td,
437
+ & ${p}-tbody > tr > th {
438
+ border-block-end: ${border};
439
+
440
+ font-weight: inherit;
441
+ font-variant-numeric: tabular-nums;
442
+ text-align: start;
443
+
444
+ background: ${cssVar.colorBgContainer};
445
+
446
+ transition: background-color ${cssVar.motionDurationMid};
447
+ }
448
+
449
+ &:not(${p}-outlined) ${p}-tbody > tr:last-child > td,
450
+ &:not(${p}-outlined) ${p}-tbody > tr:last-child > th {
451
+ border-block-end: 0;
452
+ }
453
+
454
+ & ${p}-tbody > tr${p}-placeholder > td {
455
+ padding-block: 32px;
456
+ color: ${cssVar.colorTextDescription};
457
+ text-align: center;
458
+ }
459
+
460
+ /* Skeleton loading fills the placeholder like real body rows. */
461
+ & ${p}-tbody > tr${p}-placeholder > td:has([data-table-skeleton]) {
462
+ padding: 0;
463
+ color: inherit;
464
+ text-align: start;
465
+ vertical-align: top;
466
+ }
467
+
468
+ & ${p}-cell-scrollbar:not([rowspan]) {
469
+ box-shadow: 0 1px 0 1px ${cssVar.colorFillQuaternary};
470
+ }
471
+
472
+ /* ============================ Ellipsis ============================ */
473
+ & ${p}-cell-ellipsis {
474
+ overflow: hidden;
475
+ text-overflow: ellipsis;
476
+ word-break: keep-all;
477
+ white-space: nowrap;
478
+
479
+ &${p}-cell-fix-start-shadow, &${p}-cell-fix-end-shadow {
480
+ overflow: visible;
481
+
482
+ & ${p}-cell-content {
483
+ overflow: hidden;
484
+ display: block;
485
+ text-overflow: ellipsis;
486
+ white-space: nowrap;
487
+ }
488
+ }
489
+ }
490
+
491
+ /* ========================== Title / Footer ========================= */
492
+ & > ${p}-title, & > ${p}-footer {
493
+ padding-block: var(${PADDING_BLOCK});
494
+ padding-inline: var(${PADDING_INLINE});
495
+ }
496
+
497
+ & > ${p}-footer {
498
+ color: ${cssVar.colorText};
499
+ background: ${cssVar.colorFillQuaternary};
500
+ }
501
+
502
+ /* ============================== Fixed ============================= */
503
+ & ${p}-container {
504
+ position: relative;
505
+
506
+ &::before,
507
+ &::after {
508
+ ${fixShadowBase}
509
+ z-index: calc(var(--columns-count, 1) * 2 + ${Z_FIXED} + 1);
510
+ }
511
+
512
+ &::before {
513
+ inset-inline-start: 0;
514
+ }
515
+
516
+ &::after {
517
+ inset-inline-end: 0;
518
+ }
519
+ }
520
+
521
+ &${p}-has-fix-start > ${p}-container::before, &${p}-has-fix-end > ${p}-container::after {
522
+ display: none;
523
+ }
524
+
525
+ &${p}-fix-start-shadow-show > ${p}-container::before {
526
+ ${startShadow}
527
+ }
528
+
529
+ &${p}-fix-end-shadow-show > ${p}-container::after {
530
+ ${endShadow}
531
+ }
532
+
533
+ /* Must outrank the generic cell rule that sets position: relative. */
534
+ &
535
+ ${p}-thead
536
+ > tr
537
+ > th${p}-cell-fix,
538
+ &
539
+ ${p}-tbody
540
+ > tr
541
+ > td${p}-cell-fix,
542
+ &
543
+ ${p}-cell${p}-cell-fix {
544
+ position: sticky;
545
+ z-index: calc(var(--z-offset-reverse) + ${Z_FIXED});
546
+ }
547
+
548
+ & ${p}-cell-fix {
549
+ background: ${cssVar.colorBgContainer};
550
+
551
+ &::after {
552
+ ${fixShadowBase}
553
+ }
554
+ }
555
+
556
+ & ${p}-cell-fix-start::after {
557
+ inset-inline-start: 100%;
558
+ }
559
+
560
+ & ${p}-cell-fix-end::after {
561
+ inset-inline-end: 100%;
562
+ }
563
+
564
+ & ${p}-cell-fix-start-shadow-show::after {
565
+ ${startShadow}
566
+ }
567
+
568
+ & ${p}-cell-fix-end-shadow-show::after {
569
+ ${endShadow}
570
+ }
571
+
572
+ /* ============================= Sticky ============================= */
573
+ & ${p}-sticky-holder {
574
+ position: sticky;
575
+ z-index: calc(var(--columns-count, 1) * 2 + ${Z_FIXED} + 1);
576
+ background: ${cssVar.colorBgContainer};
577
+ }
578
+
579
+ & ${p}-sticky-scroll {
580
+ position: sticky;
581
+ z-index: calc(var(--columns-count, 1) * 2 + ${Z_FIXED} + 1);
582
+ inset-block-end: 0;
583
+
584
+ display: flex;
585
+ align-items: center;
586
+
587
+ height: 8px !important;
588
+ border-block-start: ${border};
589
+
590
+ opacity: 0.65;
591
+ background: ${cssVar.colorFillQuaternary};
592
+
593
+ &-bar {
594
+ position: absolute;
595
+ inset-block-end: 0;
596
+
597
+ height: 8px;
598
+ border-radius: 100px;
599
+
600
+ background-color: ${cssVar.colorFill};
601
+
602
+ transition:
603
+ all ${cssVar.motionDurationSlow},
604
+ transform 0s;
605
+
606
+ &:hover,
607
+ &-active {
608
+ background-color: ${cssVar.colorFillSecondary};
609
+ }
610
+ }
611
+ }
612
+
613
+ /* ============================ Selection =========================== */
614
+ & ${p}-selection-col {
615
+ width: ${32}px;
616
+
617
+ &${p}-selection-col-with-dropdown {
618
+ width: ${56}px;
619
+ }
620
+ }
621
+
622
+ &${p}-outlined ${p}-selection-col {
623
+ width: ${48}px;
624
+
625
+ &${p}-selection-col-with-dropdown {
626
+ width: ${72}px;
627
+ }
628
+ }
629
+
630
+ & ${p}-tbody > tr${p}-row-selected > td {
631
+ background: color-mix(in srgb, ${cssVar.colorBgContainer}, ${cssVar.colorPrimary} 6%);
632
+
633
+ &${p}-cell-row-hover {
634
+ background: color-mix(in srgb, ${cssVar.colorBgContainer}, ${cssVar.colorPrimary} 10%);
635
+ }
636
+ }
637
+
638
+ /* ========================= Expand / Tree ========================== */
639
+ & ${p}-expand-icon-col {
640
+ width: ${48}px;
641
+ }
642
+
643
+ & ${p}-row-expand-icon-cell {
644
+ text-align: center;
645
+
646
+ & ${p}-row-expand-icon {
647
+ float: none;
648
+ display: inline-flex;
649
+ vertical-align: sub;
650
+ }
651
+ }
652
+
653
+ & ${p}-row-indent {
654
+ float: inline-start;
655
+ height: 1px;
656
+ }
657
+
658
+ & ${p}-row-expand-icon {
659
+ float: inline-start;
660
+ flex: none;
661
+ vertical-align: middle;
662
+
663
+ &${p}-row-expand-icon-spaced {
664
+ display: inline-block;
665
+ width: 24px;
666
+ height: 24px;
667
+ visibility: hidden;
668
+ }
669
+ }
670
+
671
+ & ${p}-row-indent + ${p}-row-expand-icon {
672
+ margin-block: -1px;
673
+ margin-inline-end: 8px;
674
+ }
675
+
676
+ & tr${p}-expanded-row > td,
677
+ & tr${p}-expanded-row:hover > td {
678
+ background: ${cssVar.colorFillQuaternary};
679
+ }
680
+
681
+ & ${p}-expanded-row-fixed {
682
+ position: relative;
683
+
684
+ margin-block: calc(var(${PADDING_BLOCK}) * -1);
685
+ margin-inline: calc(var(${PADDING_INLINE}) * -1);
686
+ padding-block: var(${PADDING_BLOCK});
687
+ padding-inline: var(${PADDING_INLINE});
688
+ }
689
+
690
+ /* ========================== Nested table ========================== */
691
+
692
+ /* A table alone in a cell fills it, starting after the expand column. */
693
+ &
694
+ ${p}-tbody
695
+ > tr
696
+ > td
697
+ > ${p}-wrapper:only-child,
698
+ &
699
+ ${p}-tbody
700
+ > tr
701
+ > td
702
+ > ${p}-expanded-row-fixed
703
+ > ${p}-wrapper:only-child {
704
+ & ${p} {
705
+ margin-block: calc(var(${PADDING_BLOCK}) * -1);
706
+ margin-inline: calc(${48}px - var(${PADDING_INLINE}))
707
+ calc(var(${PADDING_INLINE}) * -1);
708
+ }
709
+
710
+ & ${p}-tbody > tr:last-child > td {
711
+ border-block-end: 0;
712
+ }
713
+
714
+ /* The outer cell already draws the frame: keep only the start edge of a bordered nest. */
715
+ & ${p}${p}-outlined {
716
+ & > ${p}-title, & > ${p}-container, & > ${p}-footer {
717
+ border-block: 0;
718
+ border-inline-end: 0;
719
+ border-radius: 0;
720
+ }
721
+
722
+ & > ${p}-title + ${p}-container {
723
+ border-block-start: ${border};
724
+ }
725
+
726
+ &:has(> ${p}-footer) > ${p}-container {
727
+ border-block-end: ${border};
728
+ }
729
+ }
730
+ }
731
+
732
+ &${p}-outlined ${p}-tbody > tr > td > ${p}-expanded-row-fixed {
733
+ margin-inline: calc((var(${PADDING_INLINE}) + 1px) * -1);
734
+ }
735
+
736
+ /* ============================= Summary ============================ */
737
+ & ${p}-summary {
738
+ position: relative;
739
+ z-index: ${Z_FIXED};
740
+ background: ${cssVar.colorBgContainer};
741
+
742
+ & > tr > th,
743
+ & > tr > td {
744
+ border-block-end: ${border};
745
+ }
746
+ }
747
+
748
+ & div${p}-summary {
749
+ box-shadow: 0 -1px 0 ${cssVar.colorBorderSecondary};
750
+ }
751
+
752
+ /* A fixed summary under \`sticky\` is a sticky holder too; keep it sticky (antd orders sticky last). */
753
+ & ${p}-summary${p}-sticky-holder {
754
+ position: sticky;
755
+ z-index: calc(var(--columns-count, 1) * 2 + ${Z_FIXED} + 1);
756
+ }
757
+
758
+ & tfoot > tr > th,
759
+ & tfoot > tr > td {
760
+ border-block-start: ${border};
761
+ }
762
+
763
+ /* ============================= Virtual ============================ */
764
+ & ${p}-tbody-virtual {
765
+ &
766
+ ${p}-tbody-virtual-holder-inner
767
+ > ${p}-row,
768
+ &
769
+ ${p}-tbody-virtual-holder-inner
770
+ > div:not(${p}-row)
771
+ > ${p}-row {
772
+ display: flex;
773
+ box-sizing: border-box;
774
+ width: 100%;
775
+
776
+ & > ${p}-cell {
777
+ align-content: center;
778
+ }
779
+ }
780
+
781
+ & ${p}-cell {
782
+ border-block-end: ${border};
783
+ background: ${cssVar.colorBgContainer};
784
+ transition: background-color ${cssVar.motionDurationMid};
785
+ }
786
+
787
+ & ${p}-tbody-virtual-scrollbar {
788
+ cursor: pointer;
789
+
790
+ &:hover {
791
+ background-color: ${cssVar.colorFillQuaternary};
792
+ }
793
+ }
794
+
795
+ & ${p}-expanded-row ${p}-expanded-row-cell${p}-expanded-row-cell-fixed {
796
+ position: sticky;
797
+ inset-inline-start: 0;
798
+ overflow: hidden;
799
+ width: calc(var(--virtual-width) - 1px);
800
+ }
801
+ }
802
+ `
803
+ };
804
+ });
165
805
  //#endregion
166
- export { styles };
806
+ export { PREFIX_CLS, styles };
167
807
 
168
808
  //# sourceMappingURL=style.mjs.map