@tsingroc/tsingroc-components 5.0.1 → 5.1.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 (82) hide show
  1. package/dist/components/BarLineChart/BarLineChart.module.css +10 -0
  2. package/dist/components/BarLineChart/index.d.ts +66 -0
  3. package/dist/components/BarLineChart/index.js +590 -0
  4. package/dist/components/BaseBarChart/BaseBarChart.module.css +12 -0
  5. package/dist/components/BaseBarChart/index.d.ts +33 -0
  6. package/dist/components/BaseBarChart/index.js +121 -0
  7. package/dist/components/DataCellNumber/DataCellNumber.module.css +20 -0
  8. package/dist/components/DataCellNumber/index.d.ts +14 -0
  9. package/dist/components/DataCellNumber/index.js +142 -0
  10. package/dist/components/FlexColLayout/index.d.ts +6 -0
  11. package/dist/components/FlexColLayout/index.js +40 -0
  12. package/dist/components/FlexRowLayout/index.d.ts +5 -0
  13. package/dist/components/FlexRowLayout/index.js +45 -0
  14. package/dist/components/HighlightSyncedECharts/index.d.ts +47 -0
  15. package/dist/components/HighlightSyncedECharts/index.js +260 -0
  16. package/dist/components/HighlightSyncedTable/index.d.ts +8 -0
  17. package/dist/components/HighlightSyncedTable/index.js +183 -0
  18. package/dist/components/LoadingSection/index.d.ts +41 -0
  19. package/dist/components/LoadingSection/index.js +183 -0
  20. package/dist/components/LoadingSkeleton/index.d.ts +42 -0
  21. package/dist/components/LoadingSkeleton/index.js +634 -0
  22. package/dist/components/ScrollableTable/ScrollableTable.module.css +21 -0
  23. package/dist/components/ScrollableTable/index.d.ts +13 -0
  24. package/dist/components/ScrollableTable/index.js +29 -0
  25. package/dist/components/TsingrocTable/TsingrocTable.module.css +32 -0
  26. package/dist/components/TsingrocTable/index.d.ts +12 -0
  27. package/dist/components/TsingrocTable/index.js +23 -0
  28. package/dist/components/TsingrocTheme/index.js +3 -3
  29. package/dist/index.d.ts +4 -0
  30. package/dist/index.js +4 -0
  31. package/dist/pages/DayAheadReviewPage/components/PricePlot/index.d.ts +7 -0
  32. package/dist/pages/DayAheadReviewPage/components/PricePlot/index.js +136 -0
  33. package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/ProfitBarChart.module.css +13 -0
  34. package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/index.d.ts +17 -0
  35. package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/index.js +278 -0
  36. package/dist/pages/DayAheadReviewPage/components/RevenueCard/RevenueCard.module.css +40 -0
  37. package/dist/pages/DayAheadReviewPage/components/RevenueCard/index.d.ts +9 -0
  38. package/dist/pages/DayAheadReviewPage/components/RevenueCard/index.js +195 -0
  39. package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/RevenueSummaryCard.module.css +38 -0
  40. package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/index.d.ts +10 -0
  41. package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/index.js +117 -0
  42. package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/ReviewLineChart.module.css +11 -0
  43. package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/index.d.ts +53 -0
  44. package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/index.js +398 -0
  45. package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/ReviewSummaryTable.module.css +33 -0
  46. package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/index.d.ts +17 -0
  47. package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/index.js +187 -0
  48. package/dist/pages/DayAheadReviewPage/components/StrategyPlot/index.d.ts +10 -0
  49. package/dist/pages/DayAheadReviewPage/components/StrategyPlot/index.js +223 -0
  50. package/dist/pages/DayAheadReviewPage/components/SummaryTable/index.d.ts +7 -0
  51. package/dist/pages/DayAheadReviewPage/components/SummaryTable/index.js +39 -0
  52. package/dist/pages/DayAheadReviewPage/components/SummaryTable/useTableColumns.d.ts +10 -0
  53. package/dist/pages/DayAheadReviewPage/components/SummaryTable/useTableColumns.js +307 -0
  54. package/dist/pages/DayAheadReviewPage/hook/useDayAheadReviewDate.d.ts +137 -0
  55. package/dist/pages/DayAheadReviewPage/hook/useDayAheadReviewDate.js +252 -0
  56. package/dist/pages/DayAheadReviewPage/index.d.ts +149 -0
  57. package/dist/pages/DayAheadReviewPage/index.js +259 -0
  58. package/dist/pages/DayAheadReviewPage/layout/LeftChartContainer.d.ts +12 -0
  59. package/dist/pages/DayAheadReviewPage/layout/LeftChartContainer.js +236 -0
  60. package/dist/pages/DayAheadReviewPage/layout/ReviewPageLayout.d.ts +4 -0
  61. package/dist/pages/DayAheadReviewPage/layout/ReviewPageLayout.js +32 -0
  62. package/dist/pages/DayAheadReviewPage/layout/RightSummaryContainer.d.ts +14 -0
  63. package/dist/pages/DayAheadReviewPage/layout/RightSummaryContainer.js +199 -0
  64. package/dist/pages/DayAheadReviewPage/layout/TopDayReviewHeader.d.ts +9 -0
  65. package/dist/pages/DayAheadReviewPage/layout/TopDayReviewHeader.js +115 -0
  66. package/dist/pages/DayAheadReviewPage/types/dayahead.d.ts +172 -0
  67. package/dist/pages/DayAheadReviewPage/types/dayahead.js +1 -0
  68. package/dist/utils/accessibility.d.ts +114 -0
  69. package/dist/utils/accessibility.js +214 -0
  70. package/dist/utils/constants.d.ts +18 -0
  71. package/dist/utils/constants.js +34 -0
  72. package/dist/utils/export.d.ts +10 -0
  73. package/dist/utils/export.js +72 -0
  74. package/dist/utils/formatters.d.ts +46 -0
  75. package/dist/utils/formatters.js +84 -0
  76. package/dist/utils/index.d.ts +1 -0
  77. package/dist/utils/index.js +1 -0
  78. package/dist/utils/presenters.d.ts +24 -0
  79. package/dist/utils/presenters.js +48 -0
  80. package/dist/utils/ui.d.ts +116 -0
  81. package/dist/utils/ui.js +171 -0
  82. package/package.json +32 -31
@@ -0,0 +1,634 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { Skeleton } from "antd";
3
+ import { ARIA_LABELS, ARIA_ROLES } from "#src/utils/accessibility";
4
+
5
+ /**
6
+ * Props for LoadingSkeleton component
7
+ */
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * LoadingSkeleton - Textual content skeleton
11
+ *
12
+ * **Usage:** Text paragraphs, lists, form content
13
+ *
14
+ * Displays skeleton placeholder for textual content with accessibility support.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // Compact text skeleton (for stats cards, small areas)
19
+ * <LoadingSkeleton type="compact" rows={2} />
20
+ *
21
+ * // Table skeleton
22
+ * <LoadingSkeleton type="table" rows={8} />
23
+ *
24
+ * // Summary skeleton (header + content)
25
+ * <LoadingSkeleton type="summary" rows={4} />
26
+ *
27
+ * // Custom skeleton (default paragraph style)
28
+ * <LoadingSkeleton rows={4} />
29
+ * ```
30
+ */
31
+ export function LoadingSkeleton(t0) {
32
+ const $ = _c(95);
33
+ const {
34
+ type: t1,
35
+ rows: t2,
36
+ cards: t3,
37
+ active: t4,
38
+ className,
39
+ style
40
+ } = t0;
41
+ const type = t1 === undefined ? "custom" : t1;
42
+ const rows = t2 === undefined ? 6 : t2;
43
+ const cards = t3 === undefined ? 3 : t3;
44
+ const active = t4 === undefined ? true : t4;
45
+ let t5;
46
+ if ($[0] !== active || $[1] !== className || $[2] !== style) {
47
+ t5 = {
48
+ active,
49
+ className,
50
+ style
51
+ };
52
+ $[0] = active;
53
+ $[1] = className;
54
+ $[2] = style;
55
+ $[3] = t5;
56
+ } else {
57
+ t5 = $[3];
58
+ }
59
+ const skeletonProps = t5;
60
+ switch (type) {
61
+ case "table":
62
+ {
63
+ let t6;
64
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
65
+ t6 = {
66
+ width: "100%",
67
+ padding: "20px"
68
+ };
69
+ $[4] = t6;
70
+ } else {
71
+ t6 = $[4];
72
+ }
73
+ let t7;
74
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
75
+ t7 = {
76
+ marginBottom: 20
77
+ };
78
+ $[5] = t7;
79
+ } else {
80
+ t7 = $[5];
81
+ }
82
+ let t8;
83
+ if ($[6] !== active) {
84
+ t8 = /*#__PURE__*/_jsx(Skeleton.Input, {
85
+ active: active,
86
+ block: true,
87
+ style: t7
88
+ });
89
+ $[6] = active;
90
+ $[7] = t8;
91
+ } else {
92
+ t8 = $[7];
93
+ }
94
+ let t9;
95
+ if ($[8] !== rows) {
96
+ t9 = Array.from({
97
+ length: rows
98
+ });
99
+ $[8] = rows;
100
+ $[9] = t9;
101
+ } else {
102
+ t9 = $[9];
103
+ }
104
+ let t10;
105
+ if ($[10] !== active || $[11] !== t9) {
106
+ t10 = t9.map((__2, i_2) => /*#__PURE__*/_jsx("div", {
107
+ style: {
108
+ marginBottom: 12
109
+ },
110
+ children: /*#__PURE__*/_jsx(Skeleton.Input, {
111
+ active: active,
112
+ block: true
113
+ })
114
+ }, i_2));
115
+ $[10] = active;
116
+ $[11] = t9;
117
+ $[12] = t10;
118
+ } else {
119
+ t10 = $[12];
120
+ }
121
+ let t11;
122
+ if ($[13] !== t10 || $[14] !== t8) {
123
+ t11 = /*#__PURE__*/_jsxs("div", {
124
+ style: t6,
125
+ role: ARIA_ROLES.STATUS,
126
+ "aria-live": "polite",
127
+ "aria-label": ARIA_LABELS.LOADING,
128
+ children: [t8, t10]
129
+ });
130
+ $[13] = t10;
131
+ $[14] = t8;
132
+ $[15] = t11;
133
+ } else {
134
+ t11 = $[15];
135
+ }
136
+ return t11;
137
+ }
138
+ case "form":
139
+ {
140
+ let t6;
141
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
142
+ t6 = {
143
+ width: "100%",
144
+ padding: "20px"
145
+ };
146
+ $[16] = t6;
147
+ } else {
148
+ t6 = $[16];
149
+ }
150
+ let t7;
151
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
152
+ t7 = {
153
+ marginBottom: 20
154
+ };
155
+ $[17] = t7;
156
+ } else {
157
+ t7 = $[17];
158
+ }
159
+ let t8;
160
+ if ($[18] !== active) {
161
+ t8 = /*#__PURE__*/_jsx(Skeleton.Input, {
162
+ active: active,
163
+ block: true,
164
+ size: "large",
165
+ style: t7
166
+ });
167
+ $[18] = active;
168
+ $[19] = t8;
169
+ } else {
170
+ t8 = $[19];
171
+ }
172
+ let t9;
173
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
174
+ t9 = {
175
+ marginBottom: 15
176
+ };
177
+ $[20] = t9;
178
+ } else {
179
+ t9 = $[20];
180
+ }
181
+ let t10;
182
+ if ($[21] !== active) {
183
+ t10 = /*#__PURE__*/_jsx(Skeleton.Input, {
184
+ active: active,
185
+ block: true,
186
+ size: "large",
187
+ style: t9
188
+ });
189
+ $[21] = active;
190
+ $[22] = t10;
191
+ } else {
192
+ t10 = $[22];
193
+ }
194
+ let t11;
195
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
196
+ t11 = {
197
+ marginBottom: 15
198
+ };
199
+ $[23] = t11;
200
+ } else {
201
+ t11 = $[23];
202
+ }
203
+ let t12;
204
+ if ($[24] !== active) {
205
+ t12 = /*#__PURE__*/_jsx(Skeleton.Input, {
206
+ active: active,
207
+ block: true,
208
+ size: "large",
209
+ style: t11
210
+ });
211
+ $[24] = active;
212
+ $[25] = t12;
213
+ } else {
214
+ t12 = $[25];
215
+ }
216
+ let t13;
217
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
218
+ t13 = {
219
+ marginBottom: 15
220
+ };
221
+ $[26] = t13;
222
+ } else {
223
+ t13 = $[26];
224
+ }
225
+ let t14;
226
+ if ($[27] !== active) {
227
+ t14 = /*#__PURE__*/_jsx(Skeleton.Input, {
228
+ active: active,
229
+ block: true,
230
+ size: "large",
231
+ style: t13
232
+ });
233
+ $[27] = active;
234
+ $[28] = t14;
235
+ } else {
236
+ t14 = $[28];
237
+ }
238
+ let t15;
239
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
240
+ t15 = {
241
+ marginTop: 20,
242
+ display: "flex",
243
+ gap: 10
244
+ };
245
+ $[29] = t15;
246
+ } else {
247
+ t15 = $[29];
248
+ }
249
+ let t16;
250
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
251
+ t16 = {
252
+ width: 100
253
+ };
254
+ $[30] = t16;
255
+ } else {
256
+ t16 = $[30];
257
+ }
258
+ let t17;
259
+ if ($[31] !== active) {
260
+ t17 = /*#__PURE__*/_jsx(Skeleton.Button, {
261
+ active: active,
262
+ style: t16
263
+ });
264
+ $[31] = active;
265
+ $[32] = t17;
266
+ } else {
267
+ t17 = $[32];
268
+ }
269
+ let t18;
270
+ if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
271
+ t18 = {
272
+ width: 100
273
+ };
274
+ $[33] = t18;
275
+ } else {
276
+ t18 = $[33];
277
+ }
278
+ let t19;
279
+ if ($[34] !== active) {
280
+ t19 = /*#__PURE__*/_jsx(Skeleton.Button, {
281
+ active: active,
282
+ style: t18
283
+ });
284
+ $[34] = active;
285
+ $[35] = t19;
286
+ } else {
287
+ t19 = $[35];
288
+ }
289
+ let t20;
290
+ if ($[36] !== t17 || $[37] !== t19) {
291
+ t20 = /*#__PURE__*/_jsxs("div", {
292
+ style: t15,
293
+ children: [t17, t19]
294
+ });
295
+ $[36] = t17;
296
+ $[37] = t19;
297
+ $[38] = t20;
298
+ } else {
299
+ t20 = $[38];
300
+ }
301
+ let t21;
302
+ if ($[39] !== t10 || $[40] !== t12 || $[41] !== t14 || $[42] !== t20 || $[43] !== t8) {
303
+ t21 = /*#__PURE__*/_jsxs("div", {
304
+ style: t6,
305
+ role: ARIA_ROLES.STATUS,
306
+ "aria-live": "polite",
307
+ "aria-label": ARIA_LABELS.LOADING,
308
+ children: [t8, t10, t12, t14, t20]
309
+ });
310
+ $[39] = t10;
311
+ $[40] = t12;
312
+ $[41] = t14;
313
+ $[42] = t20;
314
+ $[43] = t8;
315
+ $[44] = t21;
316
+ } else {
317
+ t21 = $[44];
318
+ }
319
+ return t21;
320
+ }
321
+ case "card":
322
+ {
323
+ let t6;
324
+ if ($[45] !== style) {
325
+ t6 = {
326
+ width: "100%",
327
+ display: "grid",
328
+ gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
329
+ gap: 16,
330
+ padding: "20px",
331
+ ...style
332
+ };
333
+ $[45] = style;
334
+ $[46] = t6;
335
+ } else {
336
+ t6 = $[46];
337
+ }
338
+ let t7;
339
+ if ($[47] !== cards) {
340
+ t7 = Array.from({
341
+ length: cards
342
+ });
343
+ $[47] = cards;
344
+ $[48] = t7;
345
+ } else {
346
+ t7 = $[48];
347
+ }
348
+ let t8;
349
+ if ($[49] !== active || $[50] !== t7) {
350
+ t8 = t7.map((__1, i_1) => /*#__PURE__*/_jsx(Skeleton, {
351
+ active: active,
352
+ style: {
353
+ width: "100%"
354
+ }
355
+ }, i_1));
356
+ $[49] = active;
357
+ $[50] = t7;
358
+ $[51] = t8;
359
+ } else {
360
+ t8 = $[51];
361
+ }
362
+ let t9;
363
+ if ($[52] !== className || $[53] !== t6 || $[54] !== t8) {
364
+ t9 = /*#__PURE__*/_jsx("div", {
365
+ style: t6,
366
+ className: className,
367
+ role: ARIA_ROLES.STATUS,
368
+ "aria-live": "polite",
369
+ "aria-label": ARIA_LABELS.LOADING,
370
+ children: t8
371
+ });
372
+ $[52] = className;
373
+ $[53] = t6;
374
+ $[54] = t8;
375
+ $[55] = t9;
376
+ } else {
377
+ t9 = $[55];
378
+ }
379
+ return t9;
380
+ }
381
+ case "list":
382
+ {
383
+ let t6;
384
+ if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
385
+ t6 = {
386
+ width: "100%",
387
+ padding: "20px"
388
+ };
389
+ $[56] = t6;
390
+ } else {
391
+ t6 = $[56];
392
+ }
393
+ let t7;
394
+ if ($[57] !== rows) {
395
+ t7 = Array.from({
396
+ length: rows
397
+ });
398
+ $[57] = rows;
399
+ $[58] = t7;
400
+ } else {
401
+ t7 = $[58];
402
+ }
403
+ let t8;
404
+ if ($[59] !== active || $[60] !== t7) {
405
+ t8 = /*#__PURE__*/_jsx("div", {
406
+ style: t6,
407
+ role: ARIA_ROLES.STATUS,
408
+ "aria-live": "polite",
409
+ "aria-label": ARIA_LABELS.LOADING,
410
+ children: t7.map((__0, i_0) => /*#__PURE__*/_jsxs("div", {
411
+ style: {
412
+ display: "flex",
413
+ alignItems: "center",
414
+ marginBottom: 16
415
+ },
416
+ children: [/*#__PURE__*/_jsx(Skeleton.Avatar, {
417
+ active: active,
418
+ size: 48,
419
+ style: {
420
+ marginRight: 16
421
+ }
422
+ }), /*#__PURE__*/_jsxs("div", {
423
+ style: {
424
+ flex: 1,
425
+ width: "100%",
426
+ minWidth: 0
427
+ },
428
+ children: [/*#__PURE__*/_jsx(Skeleton.Input, {
429
+ active: active,
430
+ block: true,
431
+ style: {
432
+ marginBottom: 8
433
+ }
434
+ }), /*#__PURE__*/_jsx(Skeleton.Input, {
435
+ active: active,
436
+ block: true
437
+ })]
438
+ })]
439
+ }, i_0))
440
+ });
441
+ $[59] = active;
442
+ $[60] = t7;
443
+ $[61] = t8;
444
+ } else {
445
+ t8 = $[61];
446
+ }
447
+ return t8;
448
+ }
449
+ case "summary":
450
+ {
451
+ let t6;
452
+ if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
453
+ t6 = {
454
+ width: "100%",
455
+ padding: "20px"
456
+ };
457
+ $[62] = t6;
458
+ } else {
459
+ t6 = $[62];
460
+ }
461
+ let t7;
462
+ if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
463
+ t7 = {
464
+ marginBottom: 16
465
+ };
466
+ $[63] = t7;
467
+ } else {
468
+ t7 = $[63];
469
+ }
470
+ let t8;
471
+ if ($[64] !== active) {
472
+ t8 = /*#__PURE__*/_jsx(Skeleton.Input, {
473
+ active: active,
474
+ block: true,
475
+ style: t7
476
+ });
477
+ $[64] = active;
478
+ $[65] = t8;
479
+ } else {
480
+ t8 = $[65];
481
+ }
482
+ let t9;
483
+ if ($[66] !== rows) {
484
+ t9 = Array.from({
485
+ length: rows
486
+ });
487
+ $[66] = rows;
488
+ $[67] = t9;
489
+ } else {
490
+ t9 = $[67];
491
+ }
492
+ let t10;
493
+ if ($[68] !== active || $[69] !== t9) {
494
+ t10 = t9.map((_, i) => /*#__PURE__*/_jsx("div", {
495
+ style: {
496
+ marginBottom: 12
497
+ },
498
+ children: /*#__PURE__*/_jsx(Skeleton.Input, {
499
+ active: active,
500
+ block: true
501
+ })
502
+ }, i));
503
+ $[68] = active;
504
+ $[69] = t9;
505
+ $[70] = t10;
506
+ } else {
507
+ t10 = $[70];
508
+ }
509
+ let t11;
510
+ if ($[71] !== t10 || $[72] !== t8) {
511
+ t11 = /*#__PURE__*/_jsxs("div", {
512
+ style: t6,
513
+ role: ARIA_ROLES.STATUS,
514
+ "aria-live": "polite",
515
+ "aria-label": ARIA_LABELS.LOADING,
516
+ children: [t8, t10]
517
+ });
518
+ $[71] = t10;
519
+ $[72] = t8;
520
+ $[73] = t11;
521
+ } else {
522
+ t11 = $[73];
523
+ }
524
+ return t11;
525
+ }
526
+ case "compact":
527
+ {
528
+ let t6;
529
+ if ($[74] !== style) {
530
+ t6 = {
531
+ width: "100%",
532
+ ...style
533
+ };
534
+ $[74] = style;
535
+ $[75] = t6;
536
+ } else {
537
+ t6 = $[75];
538
+ }
539
+ let t7;
540
+ if ($[76] !== rows) {
541
+ t7 = {
542
+ rows
543
+ };
544
+ $[76] = rows;
545
+ $[77] = t7;
546
+ } else {
547
+ t7 = $[77];
548
+ }
549
+ let t8;
550
+ if ($[78] !== skeletonProps || $[79] !== t7) {
551
+ t8 = /*#__PURE__*/_jsx(Skeleton, {
552
+ ...skeletonProps,
553
+ paragraph: t7,
554
+ title: false
555
+ });
556
+ $[78] = skeletonProps;
557
+ $[79] = t7;
558
+ $[80] = t8;
559
+ } else {
560
+ t8 = $[80];
561
+ }
562
+ let t9;
563
+ if ($[81] !== className || $[82] !== t6 || $[83] !== t8) {
564
+ t9 = /*#__PURE__*/_jsx("div", {
565
+ role: ARIA_ROLES.STATUS,
566
+ "aria-live": "polite",
567
+ "aria-label": ARIA_LABELS.LOADING,
568
+ style: t6,
569
+ className: className,
570
+ children: t8
571
+ });
572
+ $[81] = className;
573
+ $[82] = t6;
574
+ $[83] = t8;
575
+ $[84] = t9;
576
+ } else {
577
+ t9 = $[84];
578
+ }
579
+ return t9;
580
+ }
581
+ default:
582
+ {
583
+ let t6;
584
+ if ($[85] !== style) {
585
+ t6 = {
586
+ width: "100%",
587
+ ...style
588
+ };
589
+ $[85] = style;
590
+ $[86] = t6;
591
+ } else {
592
+ t6 = $[86];
593
+ }
594
+ let t7;
595
+ if ($[87] !== rows) {
596
+ t7 = {
597
+ rows
598
+ };
599
+ $[87] = rows;
600
+ $[88] = t7;
601
+ } else {
602
+ t7 = $[88];
603
+ }
604
+ let t8;
605
+ if ($[89] !== skeletonProps || $[90] !== t7) {
606
+ t8 = /*#__PURE__*/_jsx(Skeleton, {
607
+ ...skeletonProps,
608
+ paragraph: t7
609
+ });
610
+ $[89] = skeletonProps;
611
+ $[90] = t7;
612
+ $[91] = t8;
613
+ } else {
614
+ t8 = $[91];
615
+ }
616
+ let t9;
617
+ if ($[92] !== t6 || $[93] !== t8) {
618
+ t9 = /*#__PURE__*/_jsx("div", {
619
+ role: ARIA_ROLES.STATUS,
620
+ "aria-live": "polite",
621
+ "aria-label": ARIA_LABELS.LOADING,
622
+ style: t6,
623
+ children: t8
624
+ });
625
+ $[92] = t6;
626
+ $[93] = t8;
627
+ $[94] = t9;
628
+ } else {
629
+ t9 = $[94];
630
+ }
631
+ return t9;
632
+ }
633
+ }
634
+ }
@@ -0,0 +1,21 @@
1
+ @layer tsingroc-components {
2
+ @scope (.root) to (table, :global(.ant-pagination)) {
3
+ :scope, :scope * {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+ :scope * {
8
+ min-height: 0;
9
+ flex: 1;
10
+ }
11
+ :global(.ant-table-header) {
12
+ flex: none;
13
+ }
14
+ }
15
+
16
+ .root {
17
+ :global(.ant-pagination) {
18
+ margin-bottom: 0;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,13 @@
1
+ import { Table, type GetProps } from "antd";
2
+ /**
3
+ * 在竖直方向上滚动并且支持调整高度的表格。
4
+ *
5
+ * 调用接口与 [Ant Design 的 Table](https://ant-design.antgroup.com/components/table-cn) 完全一致,
6
+ * 也支持套用 {@linkcode TsingrocTable} 的样式。
7
+ *
8
+ * 该组件实际上只在 Table 基础上添加了 CSS 样式并修改了默认值。你可以通过 `ScrollableTable.style` 取得该组件的 CSS 类名。
9
+ */
10
+ declare const _default: (<DataType extends Record<string, any>>({ scroll, className, ...props }: GetProps<typeof Table<DataType>>) => import("react/jsx-runtime").JSX.Element) & {
11
+ style: string | undefined;
12
+ };
13
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import { Table } from "antd";
2
+ import styles from "./ScrollableTable.module.css";
3
+
4
+ /**
5
+ * 在竖直方向上滚动并且支持调整高度的表格。
6
+ *
7
+ * 调用接口与 [Ant Design 的 Table](https://ant-design.antgroup.com/components/table-cn) 完全一致,
8
+ * 也支持套用 {@linkcode TsingrocTable} 的样式。
9
+ *
10
+ * 该组件实际上只在 Table 基础上添加了 CSS 样式并修改了默认值。你可以通过 `ScrollableTable.style` 取得该组件的 CSS 类名。
11
+ */
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export default Object.assign(function ScrollableTable({
14
+ scroll,
15
+ className,
16
+ ...props
17
+ }) {
18
+ return /*#__PURE__*/_jsx(Table, {
19
+ scroll: {
20
+ y: "auto",
21
+ ...scroll
22
+ },
23
+ pagination: false,
24
+ className: styles.root + " " + (className ?? ""),
25
+ ...props
26
+ });
27
+ }, {
28
+ style: styles.root
29
+ });