@syscore/ui-library 2.0.0-beta-publish-workflow-beta.2 → 2.0.0-beta-publish-workflow-beta.4
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/client/components/ui/table.tsx +197 -50
- package/client/global.css +39 -106
- package/client/ui/Table/{TableV01.stories.tsx → Table.stories.tsx} +76 -78
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +22 -37
- package/dist/index.es.js +64 -127
- package/package.json +1 -1
- package/client/components/ui/table-v01.tsx +0 -230
|
@@ -2,20 +2,62 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Table — built from the Figma component set `Table component` (node 12176:414).
|
|
7
|
+
*
|
|
8
|
+
* Figma models a single *cell* with four properties and ~135 variants. Two of
|
|
9
|
+
* them are structural rather than authored:
|
|
10
|
+
*
|
|
11
|
+
* - `Alignment` (Left / Center / Right) is really the cell's **column
|
|
12
|
+
* position**: it selects which borders and which corner radius the cell
|
|
13
|
+
* carries, not how the text sits. `Center` carries all four, so every column
|
|
14
|
+
* is divided; that grid is derived here from the cell order.
|
|
15
|
+
* - `Placement` (Header / Intermediate / Bottom) is the **row position**.
|
|
16
|
+
* Header is its own element; Intermediate vs Bottom is derived from
|
|
17
|
+
* `tr:last-child`.
|
|
18
|
+
*
|
|
19
|
+
* `Content type` (Text / Text + Tag / Text + Action / Tag / Action) collapses
|
|
20
|
+
* into composition — a cell renders whatever children it is given, with the
|
|
21
|
+
* 10px gap Figma specifies.
|
|
22
|
+
*
|
|
23
|
+
* That leaves `density` as the one real variant, and it is the cell's *vertical*
|
|
24
|
+
* padding only — 16 / 20 / 24, all on the `--space-*` scale. Horizontal padding
|
|
25
|
+
* stays 16 at every density. Cell heights then follow from the content, matching
|
|
26
|
+
* Figma's 40/48/56 for headers, 43/51/59 for text rows and 64/72/80 for tag and
|
|
27
|
+
* action rows.
|
|
28
|
+
*/
|
|
29
|
+
type TableDensity = "compact" | "balanced" | "spacious";
|
|
30
|
+
type TableAlign = "left" | "center" | "right";
|
|
31
|
+
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// Root
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
37
|
+
/** Figma `Density`. Sets the cell's vertical padding; heights follow. Default `compact`. */
|
|
38
|
+
density?: TableDensity;
|
|
39
|
+
/** Wrapper class, for width or overflow handling. */
|
|
40
|
+
containerClassName?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
44
|
+
({ className, containerClassName, density = "compact", ...props }, ref) => (
|
|
45
|
+
<div className={cn("table-wrapper", containerClassName)}>
|
|
46
|
+
<table
|
|
47
|
+
ref={ref}
|
|
48
|
+
data-density={density}
|
|
49
|
+
className={cn("table", className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
),
|
|
54
|
+
);
|
|
17
55
|
Table.displayName = "Table";
|
|
18
56
|
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Sections and rows
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
|
|
19
61
|
const TableHeader = React.forwardRef<
|
|
20
62
|
HTMLTableSectionElement,
|
|
21
63
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
@@ -28,23 +70,19 @@ const TableBody = React.forwardRef<
|
|
|
28
70
|
HTMLTableSectionElement,
|
|
29
71
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
30
72
|
>(({ className, ...props }, ref) => (
|
|
31
|
-
<tbody
|
|
32
|
-
ref={ref}
|
|
33
|
-
className={cn("table-body", className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
73
|
+
<tbody ref={ref} className={cn("table-body", className)} {...props} />
|
|
36
74
|
));
|
|
37
75
|
TableBody.displayName = "TableBody";
|
|
38
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Figma's `Placement=Bottom` is the last row of the table. As a section it also
|
|
79
|
+
* takes over the bottom corner radii from the body.
|
|
80
|
+
*/
|
|
39
81
|
const TableFooter = React.forwardRef<
|
|
40
82
|
HTMLTableSectionElement,
|
|
41
83
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
42
84
|
>(({ className, ...props }, ref) => (
|
|
43
|
-
<tfoot
|
|
44
|
-
ref={ref}
|
|
45
|
-
className={cn("table-footer", className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
85
|
+
<tfoot ref={ref} className={cn("table-footer", className)} {...props} />
|
|
48
86
|
));
|
|
49
87
|
TableFooter.displayName = "TableFooter";
|
|
50
88
|
|
|
@@ -52,47 +90,145 @@ const TableRow = React.forwardRef<
|
|
|
52
90
|
HTMLTableRowElement,
|
|
53
91
|
React.HTMLAttributes<HTMLTableRowElement>
|
|
54
92
|
>(({ className, ...props }, ref) => (
|
|
55
|
-
<tr
|
|
56
|
-
ref={ref}
|
|
57
|
-
className={cn("table-row", className)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
93
|
+
<tr ref={ref} className={cn("table-row", className)} {...props} />
|
|
60
94
|
));
|
|
61
95
|
TableRow.displayName = "TableRow";
|
|
62
96
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
// Cells
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Figma's code/strategy tag (instance `code_strategy_*`): emerald tint with a
|
|
103
|
+
* 1.5px tinted border and tabular figures.
|
|
104
|
+
*/
|
|
105
|
+
interface TableTagProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
106
|
+
|
|
107
|
+
const TableTag = React.forwardRef<HTMLSpanElement, TableTagProps>(
|
|
108
|
+
({ className, ...props }, ref) => (
|
|
109
|
+
<span ref={ref} className={cn("table-tag", className)} {...props} />
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
TableTag.displayName = "TableTag";
|
|
113
|
+
|
|
114
|
+
interface TableCellProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
115
|
+
/**
|
|
116
|
+
* Text alignment within the cell. Figma's `Alignment` property is column
|
|
117
|
+
* position, not text alignment, so this is additive — tables need it for
|
|
118
|
+
* numeric columns.
|
|
119
|
+
*/
|
|
120
|
+
align?: TableAlign;
|
|
121
|
+
/** The column label. Figma sets it uppercase in the overline ramp. */
|
|
122
|
+
label?: React.ReactNode;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** Figma `Placement=Header`: cyan/50 fill, uppercase overline label in cyan/800. */
|
|
126
|
+
const TableHeaderCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(
|
|
127
|
+
({ className, align = "left", label, children, ...props }, ref) => (
|
|
128
|
+
<th
|
|
129
|
+
ref={ref}
|
|
130
|
+
scope="col"
|
|
131
|
+
data-align={align}
|
|
132
|
+
className={cn("table-header-cell", className)}
|
|
133
|
+
{...props}
|
|
134
|
+
>
|
|
135
|
+
<span className="table-cell-inner overline-medium">
|
|
136
|
+
{label}
|
|
137
|
+
{children}
|
|
138
|
+
</span>
|
|
139
|
+
</th>
|
|
140
|
+
),
|
|
141
|
+
);
|
|
142
|
+
TableHeaderCell.displayName = "TableHeaderCell";
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Compatibility alias for the shadcn table's `TableHead`, which this component
|
|
146
|
+
* set replaced. Identical to `TableHeaderCell` — the label may be passed as
|
|
147
|
+
* `label` or as children — so existing markup keeps compiling. Prefer
|
|
148
|
+
* `TableHeaderCell` in new code.
|
|
149
|
+
*
|
|
150
|
+
* @deprecated Use `TableHeaderCell`.
|
|
151
|
+
*/
|
|
152
|
+
const TableHead = React.forwardRef<HTMLTableCellElement, TableCellProps>(
|
|
153
|
+
(props, ref) => <TableHeaderCell ref={ref} {...props} />,
|
|
154
|
+
);
|
|
73
155
|
TableHead.displayName = "TableHead";
|
|
74
156
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Figma `Placement=Intermediates | Bottom`: white fill, Mazzard Medium 16/21.
|
|
159
|
+
*
|
|
160
|
+
* Figma's `Content type` axis is expressed as content props rather than an
|
|
161
|
+
* enum: pass any of `text`, `tag` and `action` and the cell renders them in
|
|
162
|
+
* Figma's order with the 10px gap. `children` still works for anything the
|
|
163
|
+
* props cannot express (a link, two lines, a custom control).
|
|
164
|
+
*/
|
|
165
|
+
interface TableBodyCellProps
|
|
166
|
+
extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
167
|
+
/** Text alignment within the cell. Additive to Figma. */
|
|
168
|
+
align?: TableAlign;
|
|
169
|
+
/** Figma `Content type=Text …`: Mazzard Medium 16/21 in gray/800. */
|
|
170
|
+
text?: React.ReactNode;
|
|
171
|
+
/** Figma `Content type=… + Tag`: wrapped in the code/strategy tag. */
|
|
172
|
+
tag?: React.ReactNode;
|
|
173
|
+
/** Figma `Content type=… + Action`: pass one or more `TableAction`. */
|
|
174
|
+
action?: React.ReactNode;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const TableCell = React.forwardRef<HTMLTableCellElement, TableBodyCellProps>(
|
|
178
|
+
(
|
|
179
|
+
{ className, align = "left", text, tag, action, children, ...props },
|
|
180
|
+
ref,
|
|
181
|
+
) => (
|
|
182
|
+
<td
|
|
183
|
+
ref={ref}
|
|
184
|
+
data-align={align}
|
|
185
|
+
className={cn("table-cell", className)}
|
|
186
|
+
{...props}
|
|
187
|
+
>
|
|
188
|
+
<span className="table-cell-inner">
|
|
189
|
+
{text}
|
|
190
|
+
{tag != null ? <TableTag>{tag}</TableTag> : null}
|
|
191
|
+
{action}
|
|
192
|
+
{children}
|
|
193
|
+
</span>
|
|
194
|
+
</td>
|
|
195
|
+
),
|
|
196
|
+
);
|
|
197
|
+
TableCell.displayName = "TableCell";
|
|
198
|
+
|
|
199
|
+
// ---------------------------------------------------------------------------
|
|
200
|
+
// Cell content — the pieces Figma's `Content type` composes
|
|
201
|
+
// ---------------------------------------------------------------------------
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Figma's `button_icon_*`: a 32px white circle with a gray/100 border holding a
|
|
205
|
+
* 14px icon. Pass the icon as children.
|
|
206
|
+
*/
|
|
207
|
+
const TableAction = React.forwardRef<
|
|
208
|
+
HTMLButtonElement,
|
|
209
|
+
React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
210
|
+
>(({ className, type = "button", ...props }, ref) => (
|
|
211
|
+
<button
|
|
80
212
|
ref={ref}
|
|
81
|
-
|
|
213
|
+
type={type}
|
|
214
|
+
className={cn("table-action", className)}
|
|
82
215
|
{...props}
|
|
83
216
|
/>
|
|
84
217
|
));
|
|
85
|
-
|
|
218
|
+
TableAction.displayName = "TableAction";
|
|
86
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Compatibility component for the shadcn table's `TableCaption`. Figma does not
|
|
222
|
+
* specify a caption, so it is styled as quiet gray/500 body text below the
|
|
223
|
+
* table. Kept so existing markup keeps compiling.
|
|
224
|
+
*
|
|
225
|
+
* @deprecated Not part of the Figma component set.
|
|
226
|
+
*/
|
|
87
227
|
const TableCaption = React.forwardRef<
|
|
88
228
|
HTMLTableCaptionElement,
|
|
89
229
|
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
90
230
|
>(({ className, ...props }, ref) => (
|
|
91
|
-
<caption
|
|
92
|
-
ref={ref}
|
|
93
|
-
className={cn("table-caption", className)}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
231
|
+
<caption ref={ref} className={cn("table-caption", className)} {...props} />
|
|
96
232
|
));
|
|
97
233
|
TableCaption.displayName = "TableCaption";
|
|
98
234
|
|
|
@@ -101,8 +237,19 @@ export {
|
|
|
101
237
|
TableHeader,
|
|
102
238
|
TableBody,
|
|
103
239
|
TableFooter,
|
|
104
|
-
TableHead,
|
|
105
240
|
TableRow,
|
|
241
|
+
TableHeaderCell,
|
|
106
242
|
TableCell,
|
|
243
|
+
TableTag,
|
|
244
|
+
TableAction,
|
|
245
|
+
TableHead,
|
|
107
246
|
TableCaption,
|
|
108
247
|
};
|
|
248
|
+
|
|
249
|
+
export type {
|
|
250
|
+
TableProps,
|
|
251
|
+
TableCellProps,
|
|
252
|
+
TableBodyCellProps,
|
|
253
|
+
TableDensity,
|
|
254
|
+
TableAlign,
|
|
255
|
+
};
|
package/client/global.css
CHANGED
|
@@ -5310,81 +5310,6 @@ body {
|
|
|
5310
5310
|
slide-in-from-bottom 0.15s ease-in-out;
|
|
5311
5311
|
}
|
|
5312
5312
|
|
|
5313
|
-
/* Table Styles */
|
|
5314
|
-
.table-wrapper {
|
|
5315
|
-
position: relative;
|
|
5316
|
-
width: 100%;
|
|
5317
|
-
overflow: auto;
|
|
5318
|
-
}
|
|
5319
|
-
|
|
5320
|
-
.table {
|
|
5321
|
-
width: 100%;
|
|
5322
|
-
font-size: 0.875rem;
|
|
5323
|
-
line-height: 1.25rem;
|
|
5324
|
-
caption-side: bottom;
|
|
5325
|
-
}
|
|
5326
|
-
|
|
5327
|
-
.table-header tr {
|
|
5328
|
-
border-bottom: 1px solid hsl(var(--border));
|
|
5329
|
-
}
|
|
5330
|
-
|
|
5331
|
-
.table-body tr:last-child {
|
|
5332
|
-
border-bottom: 0;
|
|
5333
|
-
}
|
|
5334
|
-
|
|
5335
|
-
.table-footer {
|
|
5336
|
-
border-top: 1px solid hsl(var(--border));
|
|
5337
|
-
background-color: hsl(var(--muted) / 0.5);
|
|
5338
|
-
font-weight: 500;
|
|
5339
|
-
}
|
|
5340
|
-
|
|
5341
|
-
.table-footer tr:last-child {
|
|
5342
|
-
border-bottom: 0;
|
|
5343
|
-
}
|
|
5344
|
-
|
|
5345
|
-
.table-row {
|
|
5346
|
-
border-bottom: 1px solid hsl(var(--border));
|
|
5347
|
-
transition: background-color 0.15s ease-in-out;
|
|
5348
|
-
}
|
|
5349
|
-
|
|
5350
|
-
.table-row:hover {
|
|
5351
|
-
background-color: hsl(var(--muted) / 0.5);
|
|
5352
|
-
}
|
|
5353
|
-
|
|
5354
|
-
.table-row[data-state="selected"] {
|
|
5355
|
-
background-color: hsl(var(--muted));
|
|
5356
|
-
}
|
|
5357
|
-
|
|
5358
|
-
.table-head {
|
|
5359
|
-
height: 3rem;
|
|
5360
|
-
padding-left: 1rem;
|
|
5361
|
-
padding-right: 1rem;
|
|
5362
|
-
text-align: left;
|
|
5363
|
-
vertical-align: middle;
|
|
5364
|
-
font-weight: 500;
|
|
5365
|
-
color: hsl(var(--muted-foreground));
|
|
5366
|
-
}
|
|
5367
|
-
|
|
5368
|
-
.table-head:has([role="checkbox"]) {
|
|
5369
|
-
padding-right: 0;
|
|
5370
|
-
}
|
|
5371
|
-
|
|
5372
|
-
.table-cell {
|
|
5373
|
-
padding: 1rem;
|
|
5374
|
-
vertical-align: middle;
|
|
5375
|
-
}
|
|
5376
|
-
|
|
5377
|
-
.table-cell:has([role="checkbox"]) {
|
|
5378
|
-
padding-right: 0;
|
|
5379
|
-
}
|
|
5380
|
-
|
|
5381
|
-
.table-caption {
|
|
5382
|
-
margin-top: 1rem;
|
|
5383
|
-
font-size: 0.875rem;
|
|
5384
|
-
line-height: 1.25rem;
|
|
5385
|
-
color: hsl(var(--muted-foreground));
|
|
5386
|
-
}
|
|
5387
|
-
|
|
5388
5313
|
/* Search/SearchField Styles */
|
|
5389
5314
|
.search-field-dropdown {
|
|
5390
5315
|
animation: fade-in 0.15s ease-in-out;
|
|
@@ -5582,17 +5507,17 @@ body {
|
|
|
5582
5507
|
}
|
|
5583
5508
|
|
|
5584
5509
|
/* ---------------------------------------------------------------------------
|
|
5585
|
-
|
|
5510
|
+
Table — Figma `Table component` (node 12176:414).
|
|
5586
5511
|
Density is the cell's vertical padding (16 / 20 / 24) and heights follow from
|
|
5587
5512
|
the content. Column position and row position — Figma's `Alignment` and
|
|
5588
5513
|
`Placement` — are derived structurally rather than authored.
|
|
5589
5514
|
--------------------------------------------------------------------------- */
|
|
5590
|
-
.table-
|
|
5515
|
+
.table-wrapper {
|
|
5591
5516
|
width: 100%;
|
|
5592
5517
|
overflow-x: auto;
|
|
5593
5518
|
}
|
|
5594
5519
|
|
|
5595
|
-
.table
|
|
5520
|
+
.table {
|
|
5596
5521
|
/* Figma: density moves the vertical padding only — horizontal stays 16.
|
|
5597
5522
|
Compact `p-[16px]`, Balanced `px-[16px] py-[20px]`, Spacious `py-[24px]`. */
|
|
5598
5523
|
--table-cell-padding-block: var(--space-md);
|
|
@@ -5621,16 +5546,16 @@ body {
|
|
|
5621
5546
|
}
|
|
5622
5547
|
|
|
5623
5548
|
/* Figma `Density` — the only authored variant. */
|
|
5624
|
-
.table
|
|
5549
|
+
.table[data-density="balanced"] {
|
|
5625
5550
|
--table-cell-padding-block: var(--space-lg);
|
|
5626
5551
|
}
|
|
5627
5552
|
|
|
5628
|
-
.table
|
|
5553
|
+
.table[data-density="spacious"] {
|
|
5629
5554
|
--table-cell-padding-block: var(--space-xl);
|
|
5630
5555
|
}
|
|
5631
5556
|
|
|
5632
|
-
.table-
|
|
5633
|
-
.table-
|
|
5557
|
+
.table-header-cell,
|
|
5558
|
+
.table-cell {
|
|
5634
5559
|
padding: var(--table-cell-padding-block) var(--table-cell-padding-inline);
|
|
5635
5560
|
border-bottom: 1px solid var(--table-border-color);
|
|
5636
5561
|
/* Figma's `Alignment=Center` carries all four borders, so every column is
|
|
@@ -5641,29 +5566,29 @@ body {
|
|
|
5641
5566
|
vertical-align: middle;
|
|
5642
5567
|
}
|
|
5643
5568
|
|
|
5644
|
-
.table-
|
|
5645
|
-
.table-
|
|
5569
|
+
.table-header-cell:last-child,
|
|
5570
|
+
.table-cell:last-child {
|
|
5646
5571
|
border-right: 1px solid var(--table-border-color);
|
|
5647
5572
|
}
|
|
5648
5573
|
|
|
5649
5574
|
/* Figma `Placement=Header`: cyan/50 fill, top border, top corners rounded. */
|
|
5650
|
-
.table-
|
|
5575
|
+
.table-header-cell {
|
|
5651
5576
|
border-top: 1px solid var(--table-border-color);
|
|
5652
5577
|
background-color: var(--table-header-bg);
|
|
5653
5578
|
color: var(--table-header-color);
|
|
5654
5579
|
white-space: nowrap;
|
|
5655
5580
|
}
|
|
5656
5581
|
|
|
5657
|
-
.table-
|
|
5582
|
+
.table-header tr:first-child .table-header-cell:first-child {
|
|
5658
5583
|
border-top-left-radius: var(--table-radius);
|
|
5659
5584
|
}
|
|
5660
5585
|
|
|
5661
|
-
.table-
|
|
5586
|
+
.table-header tr:first-child .table-header-cell:last-child {
|
|
5662
5587
|
border-top-right-radius: var(--table-radius);
|
|
5663
5588
|
}
|
|
5664
5589
|
|
|
5665
5590
|
/* Figma `Placement=Intermediates`; `Bottom` is the last row. */
|
|
5666
|
-
.table-
|
|
5591
|
+
.table-cell {
|
|
5667
5592
|
background-color: var(--table-body-bg);
|
|
5668
5593
|
color: var(--table-body-color);
|
|
5669
5594
|
font-size: var(--table-body-font-size);
|
|
@@ -5673,44 +5598,41 @@ body {
|
|
|
5673
5598
|
|
|
5674
5599
|
/* Figma `Placement=Bottom` — the final row, which owns the bottom corners.
|
|
5675
5600
|
A footer supersedes the body, so the body only rounds when there is none. */
|
|
5676
|
-
.table-
|
|
5677
|
-
.table-
|
|
5601
|
+
.table-body:last-of-type tr:last-child .table-cell:first-child,
|
|
5602
|
+
.table-footer tr:last-child .table-cell:first-child {
|
|
5678
5603
|
border-bottom-left-radius: var(--table-radius);
|
|
5679
5604
|
}
|
|
5680
5605
|
|
|
5681
|
-
.table-
|
|
5682
|
-
.table-
|
|
5606
|
+
.table-body:last-of-type tr:last-child .table-cell:last-child,
|
|
5607
|
+
.table-footer tr:last-child .table-cell:last-child {
|
|
5683
5608
|
border-bottom-right-radius: var(--table-radius);
|
|
5684
5609
|
}
|
|
5685
5610
|
|
|
5686
5611
|
/* When a footer is present the body must not round its last row. */
|
|
5687
|
-
.table
|
|
5688
|
-
.table-v01-body
|
|
5689
|
-
tr:last-child
|
|
5690
|
-
.table-v01-cell {
|
|
5612
|
+
.table:has(.table-footer) .table-body tr:last-child .table-cell {
|
|
5691
5613
|
border-bottom-left-radius: 0;
|
|
5692
5614
|
border-bottom-right-radius: 0;
|
|
5693
5615
|
}
|
|
5694
5616
|
|
|
5695
5617
|
/* Figma composes cell content in a row with a 10px gap. */
|
|
5696
|
-
.table-
|
|
5618
|
+
.table-cell-inner {
|
|
5697
5619
|
display: flex;
|
|
5698
5620
|
align-items: center;
|
|
5699
5621
|
gap: var(--table-cell-gap);
|
|
5700
5622
|
}
|
|
5701
5623
|
|
|
5702
|
-
.table-
|
|
5703
|
-
.table-
|
|
5624
|
+
.table-header-cell[data-align="center"] .table-cell-inner,
|
|
5625
|
+
.table-cell[data-align="center"] .table-cell-inner {
|
|
5704
5626
|
justify-content: center;
|
|
5705
5627
|
}
|
|
5706
5628
|
|
|
5707
|
-
.table-
|
|
5708
|
-
.table-
|
|
5629
|
+
.table-header-cell[data-align="right"] .table-cell-inner,
|
|
5630
|
+
.table-cell[data-align="right"] .table-cell-inner {
|
|
5709
5631
|
justify-content: flex-end;
|
|
5710
5632
|
}
|
|
5711
5633
|
|
|
5712
5634
|
/* Figma instance `code_strategy_*` — emerald tint, 1.5px tinted border. */
|
|
5713
|
-
.table-
|
|
5635
|
+
.table-tag {
|
|
5714
5636
|
box-sizing: border-box;
|
|
5715
5637
|
display: inline-flex;
|
|
5716
5638
|
flex-shrink: 0;
|
|
@@ -5730,7 +5652,7 @@ body {
|
|
|
5730
5652
|
}
|
|
5731
5653
|
|
|
5732
5654
|
/* Figma instance `button_icon_*` — 32px white circle, gray/100 border. */
|
|
5733
|
-
.table-
|
|
5655
|
+
.table-action {
|
|
5734
5656
|
box-sizing: border-box;
|
|
5735
5657
|
display: inline-flex;
|
|
5736
5658
|
flex-shrink: 0;
|
|
@@ -5746,21 +5668,32 @@ body {
|
|
|
5746
5668
|
cursor: pointer;
|
|
5747
5669
|
}
|
|
5748
5670
|
|
|
5749
|
-
.table-
|
|
5671
|
+
.table-action:hover {
|
|
5750
5672
|
background-color: var(--color-gray-50);
|
|
5751
5673
|
}
|
|
5752
5674
|
|
|
5753
|
-
.table-
|
|
5675
|
+
.table-action:focus-visible {
|
|
5754
5676
|
outline: 2px solid var(--color-cyan-300);
|
|
5755
5677
|
outline-offset: 2px;
|
|
5756
5678
|
}
|
|
5757
5679
|
|
|
5758
|
-
.table-
|
|
5680
|
+
.table-action svg {
|
|
5759
5681
|
display: block;
|
|
5760
5682
|
width: var(--table-action-icon-size);
|
|
5761
5683
|
height: var(--table-action-icon-size);
|
|
5762
5684
|
}
|
|
5763
5685
|
|
|
5686
|
+
/* Compatibility with the shadcn table's caption; Figma does not specify one. */
|
|
5687
|
+
.table-caption {
|
|
5688
|
+
caption-side: bottom;
|
|
5689
|
+
margin-top: var(--space-md);
|
|
5690
|
+
color: var(--color-gray-500);
|
|
5691
|
+
font-family: var(--font-mazzard);
|
|
5692
|
+
font-size: 14px;
|
|
5693
|
+
line-height: 19.6px;
|
|
5694
|
+
text-align: left;
|
|
5695
|
+
}
|
|
5696
|
+
|
|
5764
5697
|
/* Dropdown (Figma: Dropdown) */
|
|
5765
5698
|
.dropdown {
|
|
5766
5699
|
box-sizing: border-box;
|