@recursica/mui-adapter 0.27.0 → 0.29.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.
- package/CHANGELOG.md +22 -0
- package/dist/index.d.ts +46 -7
- package/dist/mui-adapter.cjs +62 -62
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +4970 -4888
- package/dist/mui-adapter.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Breadcrumb/Breadcrumb.module.css +10 -5
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -6
- package/src/components/Breadcrumb/Breadcrumb.tsx +1 -0
- package/src/components/Dropdown/Dropdown.icons.tsx +33 -0
- package/src/components/Dropdown/Dropdown.module.css +117 -15
- package/src/components/Dropdown/Dropdown.stories.tsx +21 -0
- package/src/components/Dropdown/Dropdown.tsx +90 -12
- package/src/components/Dropdown/USAGE.md +7 -0
- package/src/components/HoverCard/HoverCard.module.css +25 -3
- package/src/components/Link/Link.module.css +4 -0
- package/src/components/Menu/Menu.module.css +3 -0
- package/src/components/Menu/Menu.stories.tsx +128 -5
- package/src/components/Menu/Menu.tsx +1 -1
- package/src/components/Table/TABLE_IMPLEMENTATION_NOTES.md +64 -0
- package/src/components/Table/Table.module.css +443 -2
- package/src/components/Table/Table.stories.tsx +105 -0
- package/src/components/Table/Table.tsx +62 -5
- package/src/components/Table/USAGE.md +55 -16
|
@@ -12,6 +12,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|
|
12
12
|
import { Menu, MenuItem, MenuDivider } from "./Menu";
|
|
13
13
|
import { Button } from "../Button";
|
|
14
14
|
import { ListSubheader } from "@mui/material";
|
|
15
|
+
import styles from "./Menu.module.css";
|
|
15
16
|
|
|
16
17
|
const SettingsIcon = (props: React.ComponentProps<"svg">) => (
|
|
17
18
|
<svg
|
|
@@ -123,6 +124,56 @@ const ArrowsIcon = (props: React.ComponentProps<"svg">) => (
|
|
|
123
124
|
</svg>
|
|
124
125
|
);
|
|
125
126
|
|
|
127
|
+
const ChevronRightIcon = (props: React.ComponentProps<"svg">) => (
|
|
128
|
+
<svg
|
|
129
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
130
|
+
width="14"
|
|
131
|
+
height="14"
|
|
132
|
+
viewBox="0 0 24 24"
|
|
133
|
+
fill="none"
|
|
134
|
+
stroke="currentColor"
|
|
135
|
+
strokeWidth="2"
|
|
136
|
+
strokeLinecap="round"
|
|
137
|
+
strokeLinejoin="round"
|
|
138
|
+
{...props}
|
|
139
|
+
>
|
|
140
|
+
<polyline points="9 18 15 12 9 6" />
|
|
141
|
+
</svg>
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
// mui-adapter's Menu is monolithic (see IMPLEMENTATION_NOTES.md) — there is no
|
|
145
|
+
// Menu.Sub composable, so a submenu is just a MenuItem that anchors its own
|
|
146
|
+
// nested Menu, mirroring how the top-level trigger manages its own anchorEl.
|
|
147
|
+
interface SubMenuTriggerProps {
|
|
148
|
+
label: string;
|
|
149
|
+
children: React.ReactNode;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const SubMenuTrigger = ({ label, children }: SubMenuTriggerProps) => {
|
|
153
|
+
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<>
|
|
157
|
+
<MenuItem onClick={(event) => setAnchorEl(event.currentTarget)}>
|
|
158
|
+
{label}
|
|
159
|
+
<ChevronRightIcon
|
|
160
|
+
className={styles.chevron}
|
|
161
|
+
style={{ marginLeft: "auto", paddingLeft: 8 }}
|
|
162
|
+
/>
|
|
163
|
+
</MenuItem>
|
|
164
|
+
<Menu
|
|
165
|
+
anchorEl={anchorEl}
|
|
166
|
+
open={Boolean(anchorEl)}
|
|
167
|
+
onClose={() => setAnchorEl(null)}
|
|
168
|
+
anchorOrigin={{ vertical: "top", horizontal: "right" }}
|
|
169
|
+
transformOrigin={{ vertical: "top", horizontal: "left" }}
|
|
170
|
+
>
|
|
171
|
+
{children}
|
|
172
|
+
</Menu>
|
|
173
|
+
</>
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
126
177
|
type MenuStoryArgs = Record<string, unknown>;
|
|
127
178
|
|
|
128
179
|
const meta: Meta = {
|
|
@@ -225,9 +276,84 @@ export const WithDisabledItems: Story = {
|
|
|
225
276
|
},
|
|
226
277
|
};
|
|
227
278
|
|
|
228
|
-
export const
|
|
279
|
+
export const WithSubmenus: Story = {
|
|
229
280
|
render: (args) => (
|
|
230
281
|
<InteractiveMenu {...args}>
|
|
282
|
+
<MenuItem>Dashboard</MenuItem>
|
|
283
|
+
<SubMenuTrigger label="Products">
|
|
284
|
+
<MenuItem>All products</MenuItem>
|
|
285
|
+
<MenuItem>Categories</MenuItem>
|
|
286
|
+
<MenuItem>Tags</MenuItem>
|
|
287
|
+
</SubMenuTrigger>
|
|
288
|
+
<SubMenuTrigger label="Orders">
|
|
289
|
+
<MenuItem>Open</MenuItem>
|
|
290
|
+
<MenuItem>Completed</MenuItem>
|
|
291
|
+
<MenuItem>Cancelled</MenuItem>
|
|
292
|
+
</SubMenuTrigger>
|
|
293
|
+
</InteractiveMenu>
|
|
294
|
+
),
|
|
295
|
+
args: {
|
|
296
|
+
opened: true,
|
|
297
|
+
// Match mantine's explicit `width: 200` for this story so the row has room for the
|
|
298
|
+
// "Products"/"Orders" label plus the submenu chevron without clipping it.
|
|
299
|
+
slotProps: { paper: { style: { minWidth: 200 } } },
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// mui-adapter's Menu has no native hover-trigger support (unlike Mantine's `trigger` prop),
|
|
304
|
+
// so this story implements open-on-hover itself: hovering the target opens the menu, and a
|
|
305
|
+
// short close delay (mirroring Mantine's `closeDelay`) keeps it open while the pointer moves
|
|
306
|
+
// from the target into the dropdown, since MUI's Menu renders in a portal outside the
|
|
307
|
+
// wrapper's DOM subtree.
|
|
308
|
+
const HoverMenu = ({ children, ...args }: InteractiveMenuProps) => {
|
|
309
|
+
const [open, setOpen] = useState(false);
|
|
310
|
+
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
311
|
+
const closeTimer = useRef<ReturnType<typeof setTimeout> | undefined>(
|
|
312
|
+
undefined,
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
const cancelClose = () => {
|
|
316
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
317
|
+
};
|
|
318
|
+
const scheduleClose = () => {
|
|
319
|
+
closeTimer.current = setTimeout(() => setOpen(false), 300);
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
return (
|
|
323
|
+
<div>
|
|
324
|
+
<Button
|
|
325
|
+
ref={buttonRef}
|
|
326
|
+
variant="solid"
|
|
327
|
+
onClick={() => setOpen((prev) => !prev)}
|
|
328
|
+
onMouseEnter={() => {
|
|
329
|
+
cancelClose();
|
|
330
|
+
setOpen(true);
|
|
331
|
+
}}
|
|
332
|
+
onMouseLeave={scheduleClose}
|
|
333
|
+
>
|
|
334
|
+
Hover or Click
|
|
335
|
+
</Button>
|
|
336
|
+
<Menu
|
|
337
|
+
{...args}
|
|
338
|
+
anchorEl={buttonRef.current}
|
|
339
|
+
open={open}
|
|
340
|
+
onClose={() => setOpen(false)}
|
|
341
|
+
slotProps={{
|
|
342
|
+
paper: {
|
|
343
|
+
onMouseEnter: cancelClose,
|
|
344
|
+
onMouseLeave: scheduleClose,
|
|
345
|
+
},
|
|
346
|
+
}}
|
|
347
|
+
>
|
|
348
|
+
{children}
|
|
349
|
+
</Menu>
|
|
350
|
+
</div>
|
|
351
|
+
);
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
export const HoverTrigger: Story = {
|
|
355
|
+
render: (args) => (
|
|
356
|
+
<HoverMenu {...args}>
|
|
231
357
|
<MenuItem>
|
|
232
358
|
<SettingsIcon style={{ marginRight: 8 }} /> Settings
|
|
233
359
|
</MenuItem>
|
|
@@ -237,9 +363,6 @@ export const HoverTrigger: Story = {
|
|
|
237
363
|
<MenuItem>
|
|
238
364
|
<ImageIcon style={{ marginRight: 8 }} /> Gallery
|
|
239
365
|
</MenuItem>
|
|
240
|
-
</
|
|
366
|
+
</HoverMenu>
|
|
241
367
|
),
|
|
242
|
-
args: {
|
|
243
|
-
opened: true,
|
|
244
|
-
},
|
|
245
368
|
};
|
|
@@ -38,7 +38,7 @@ export const Menu = forwardRef<HTMLDivElement, MenuProps>(function Menu(
|
|
|
38
38
|
<MuiMenu
|
|
39
39
|
ref={ref}
|
|
40
40
|
{...(sanitizedProps as MuiMenuProps)}
|
|
41
|
-
className={
|
|
41
|
+
className={className}
|
|
42
42
|
classes={mergedClassNames}
|
|
43
43
|
/>
|
|
44
44
|
);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Table — Implementation Notes (Internal)
|
|
2
|
+
|
|
3
|
+
## Background
|
|
4
|
+
|
|
5
|
+
Unlike `mantine-adapter`, this package's `Table.module.css` was an empty stub — none of the
|
|
6
|
+
header/cell/footer/row tokens were wired at all (the "table-header/table-footer/table-cell, 88
|
|
7
|
+
tokens" gap from the 2026-08-21 token-analyzer review). This pass writes that CSS from scratch,
|
|
8
|
+
porting the structure/token references already proven out in `mantine-adapter`'s
|
|
9
|
+
`Table.module.css`, adapted to MUI's DOM and class model.
|
|
10
|
+
|
|
11
|
+
## One `Table.Cell`, not separate header/body/footer components
|
|
12
|
+
|
|
13
|
+
MUI's own `TableCell` is a single primitive for header, body, and footer cells — it auto-detects
|
|
14
|
+
which one it is (and whether to render `<th>` or `<td>`) from its ancestor
|
|
15
|
+
(`Table.Head`/`Table.Body`/`Table.Footer`). Recursica's `Table.Cell` mirrors that instead of
|
|
16
|
+
splitting into per-context components (see the Forge reference-implementation review,
|
|
17
|
+
2026-08-22, and direction from Matt the same day: align with the underlying kit's own
|
|
18
|
+
components). Its props cover both concerns: `sorted` (header-only in practice) and `variant`
|
|
19
|
+
(body/footer). `sorted` has no effect on styling unless the cell also carries the header's
|
|
20
|
+
`data-sorted`-driven CSS (i.e. it's meaningless on a body/footer cell) — nothing prevents a
|
|
21
|
+
caller from passing it there by mistake; that's an accepted tradeoff of unifying the three
|
|
22
|
+
contexts into one component, same tradeoff MUI's own `TableCell` makes.
|
|
23
|
+
|
|
24
|
+
## Every sub-component now attaches its own CSS module class
|
|
25
|
+
|
|
26
|
+
Before this change, `Table.Body`/`Table.Cell`/`Table.Container`/`Table.Head`/`Table.Row`/
|
|
27
|
+
`Table.Footer`/`Table.SortLabel` attached no Recursica class at all — only the root `Table` did.
|
|
28
|
+
`Table.Cell` and `Table.Row` now attach `.cell`/`.row` (needed so the CSS in `Table.module.css`
|
|
29
|
+
can select on state, e.g. `.cell[data-disabled="true"]`, instead of bare `td`/`tr` tag
|
|
30
|
+
selectors). `Table.SortLabel` attaches `.sortLabel` (see below). `Body`/`Container`/`Head`/
|
|
31
|
+
`Footer` were left alone — the CSS only needs to reach them structurally (`thead`/`tbody`/
|
|
32
|
+
`tfoot`), so they don't need a class of their own for this to work.
|
|
33
|
+
|
|
34
|
+
## Sort icon comes from `Table.SortLabel`, not `Table.Cell`
|
|
35
|
+
|
|
36
|
+
MUI already has a sortable-header primitive — `TableSortLabel` — that renders its own
|
|
37
|
+
arrow icon and flips it based on `direction`/`active`. `Table.Cell` only sets the sorted-state
|
|
38
|
+
_styling_ (`data-sorted` → background/text/font tokens, matching `mantine-adapter`'s `Table.Th`);
|
|
39
|
+
the icon itself is `Table.SortLabel`'s job, composed by the consumer the same way MUI's own docs
|
|
40
|
+
demonstrate (`<Table.Cell sorted><Table.SortLabel active direction="asc">Name</Table.SortLabel></Table.Cell>`).
|
|
41
|
+
`Table.module.css` re-colors the icon to `inherit` (overriding MUI's default sort-label color)
|
|
42
|
+
and sizes/spaces it with the same `table-header` icon-size/label-sort-gap tokens
|
|
43
|
+
`mantine-adapter` uses for its own inline chevron — see that adapter's `Table.icons.tsx` for the
|
|
44
|
+
Mantine-side equivalent. This is intentionally asymmetric between the two adapters: Mantine has
|
|
45
|
+
no equivalent primitive, so its `Table.Th` renders the chevron itself.
|
|
46
|
+
|
|
47
|
+
## MUI's own `.Mui-selected` background is reset
|
|
48
|
+
|
|
49
|
+
`Table.Row`'s `selected` prop passes straight through to MUI's native `TableRow.selected` (kept
|
|
50
|
+
for the `aria-selected`/`Mui-selected` semantics it drives) _and_ sets `data-selected`. Found via
|
|
51
|
+
screenshot comparison against `mantine-adapter` (2026-08-22): MUI's own default `.Mui-selected`
|
|
52
|
+
row background was compositing underneath our token-driven `.cell` background (semi-transparent
|
|
53
|
+
`color-mix` over MUI's own tint instead of over nothing), producing a visibly different color
|
|
54
|
+
than Mantine's. `Table.module.css` resets `.row:global(.Mui-selected)` to
|
|
55
|
+
`background-color: transparent` so only the Recursica token color shows — same
|
|
56
|
+
override-the-library's-own-styling rule the canonical guide documents for hover.
|
|
57
|
+
|
|
58
|
+
## Selectable rows (checkboxes)
|
|
59
|
+
|
|
60
|
+
See `mantine-adapter`'s `TABLE_IMPLEMENTATION_NOTES.md` — confirmed 2026-08-22 that neither
|
|
61
|
+
Mantine's nor MUI's base `Table` has a built-in checkbox-selection feature (MUI's only comes via
|
|
62
|
+
`@mui/x-data-grid`, not installed here). `Table.Row`'s `selected` prop maps directly onto MUI's
|
|
63
|
+
own native `TableRow.selected` (which already sets `aria-selected`/`Mui-selected`) plus a
|
|
64
|
+
`data-selected` attribute so our CSS selectors stay identical in shape to `mantine-adapter`'s.
|
|
@@ -1,7 +1,448 @@
|
|
|
1
|
+
/* Brand-layer exemptions (recursica-allow-brand) — see recursica-token-analyzer README.md.
|
|
2
|
+
* Global hover state tokens (recursica_variables_scoped.css header, 'Hover & Focus states' —
|
|
3
|
+
* implicit rule for every interactive element; components must not define their own
|
|
4
|
+
* per-component hover treatment).
|
|
5
|
+
* recursica-allow-brand: --recursica_brand_states_hover_color
|
|
6
|
+
* recursica-allow-brand: --recursica_brand_states_hover_opacity
|
|
7
|
+
*/
|
|
8
|
+
|
|
1
9
|
/* HARDCODED VALUES:
|
|
2
|
-
*
|
|
10
|
+
* - border-collapse: separate; border-spacing: 0; (To support custom border-radius on table elements)
|
|
11
|
+
* - overflow: hidden; (To prevent content from bleeding outside the rounded table border)
|
|
3
12
|
*/
|
|
4
13
|
|
|
5
14
|
.root {
|
|
6
|
-
|
|
15
|
+
border-collapse: separate;
|
|
16
|
+
border-spacing: 0;
|
|
17
|
+
border-radius: var(
|
|
18
|
+
--recursica_ui-kit_components_table_properties_border-radius
|
|
19
|
+
);
|
|
20
|
+
border: var(--recursica_ui-kit_components_table_properties_border-size) solid
|
|
21
|
+
var(--recursica_ui-kit_components_table_properties_colors_border-color);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* ==========================================
|
|
26
|
+
1. General Cell Dividers & Padding Defaults
|
|
27
|
+
========================================== */
|
|
28
|
+
|
|
29
|
+
.root .cell {
|
|
30
|
+
padding: var(--recursica_ui-kit_components_table_properties_row-padding)
|
|
31
|
+
var(--recursica_ui-kit_components_table_properties_padding);
|
|
32
|
+
border-bottom: var(
|
|
33
|
+
--recursica_ui-kit_components_table_properties_row-divider-size
|
|
34
|
+
)
|
|
35
|
+
solid
|
|
36
|
+
var(--recursica_ui-kit_components_table_properties_colors_row-divider-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.root .cell + .cell {
|
|
40
|
+
border-left: var(
|
|
41
|
+
--recursica_ui-kit_components_table_properties_column-divider-size
|
|
42
|
+
)
|
|
43
|
+
solid
|
|
44
|
+
var(
|
|
45
|
+
--recursica_ui-kit_components_table_properties_colors_column-divider-color
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ==========================================
|
|
50
|
+
2. Row Highlighting & Selection Styles
|
|
51
|
+
========================================== */
|
|
52
|
+
|
|
53
|
+
/* Striped rows */
|
|
54
|
+
.root tbody .row:nth-of-type(even) .cell {
|
|
55
|
+
background-color: color-mix(
|
|
56
|
+
in srgb,
|
|
57
|
+
var(--recursica_ui-kit_components_table_properties_colors_striped-color)
|
|
58
|
+
calc(
|
|
59
|
+
var(
|
|
60
|
+
--recursica_ui-kit_components_table_properties_opacities_striped-opacity
|
|
61
|
+
) *
|
|
62
|
+
100%
|
|
63
|
+
),
|
|
64
|
+
transparent
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* MUI's TableRow applies its own default background when `selected` — reset it so only the
|
|
69
|
+
token-driven .cell background below shows (kept as a genuine `<tr selected>` for the
|
|
70
|
+
aria-selected/Mui-selected semantics MUI derives from it, just not its default coloring). */
|
|
71
|
+
.root tbody .row:global(.Mui-selected) {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Selected rows */
|
|
76
|
+
.root tbody .row[data-selected="true"] .cell {
|
|
77
|
+
background-color: color-mix(
|
|
78
|
+
in srgb,
|
|
79
|
+
var(--recursica_ui-kit_components_table_properties_colors_selected-color)
|
|
80
|
+
calc(
|
|
81
|
+
var(
|
|
82
|
+
--recursica_ui-kit_components_table_properties_opacities_selected-opacity
|
|
83
|
+
) *
|
|
84
|
+
100%
|
|
85
|
+
),
|
|
86
|
+
transparent
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Hover rows */
|
|
91
|
+
/* Table's dedicated highlight-on-hover token was removed from the schema; hover feedback now
|
|
92
|
+
uses the generic cross-component overlay tokens instead. */
|
|
93
|
+
.root tbody .row:hover .cell {
|
|
94
|
+
background-color: color-mix(
|
|
95
|
+
in srgb,
|
|
96
|
+
var(--recursica_brand_states_hover_color)
|
|
97
|
+
calc(var(--recursica_brand_states_hover_opacity) * 100%),
|
|
98
|
+
transparent
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ==========================================
|
|
103
|
+
3. Table Headers (th)
|
|
104
|
+
========================================== */
|
|
105
|
+
|
|
106
|
+
.root thead .cell {
|
|
107
|
+
background-color: var(
|
|
108
|
+
--recursica_ui-kit_components_table-header_properties_colors_cell-color
|
|
109
|
+
);
|
|
110
|
+
color: var(
|
|
111
|
+
--recursica_ui-kit_components_table-header_properties_colors_text-color
|
|
112
|
+
);
|
|
113
|
+
padding: var(
|
|
114
|
+
--recursica_ui-kit_components_table-header_properties_padding-vertical
|
|
115
|
+
)
|
|
116
|
+
var(
|
|
117
|
+
--recursica_ui-kit_components_table-header_properties_padding-horizontal
|
|
118
|
+
);
|
|
119
|
+
margin-top: var(
|
|
120
|
+
--recursica_ui-kit_components_table-header_properties_vertical-margin
|
|
121
|
+
);
|
|
122
|
+
margin-bottom: var(
|
|
123
|
+
--recursica_ui-kit_components_table-header_properties_vertical-margin
|
|
124
|
+
);
|
|
125
|
+
border-bottom: var(
|
|
126
|
+
--recursica_ui-kit_components_table-header_properties_horizontal-divider-size
|
|
127
|
+
)
|
|
128
|
+
solid
|
|
129
|
+
var(
|
|
130
|
+
--recursica_ui-kit_components_table-header_properties_colors_horizontal-divider-color
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
/* Unsorted text style by default */
|
|
134
|
+
font-family: var(
|
|
135
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_font-family
|
|
136
|
+
);
|
|
137
|
+
font-size: var(
|
|
138
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_font-size
|
|
139
|
+
);
|
|
140
|
+
font-style: var(
|
|
141
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_font-style
|
|
142
|
+
);
|
|
143
|
+
font-weight: var(
|
|
144
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_font-weight
|
|
145
|
+
);
|
|
146
|
+
letter-spacing: var(
|
|
147
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_letter-spacing
|
|
148
|
+
);
|
|
149
|
+
line-height: var(
|
|
150
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_line-height
|
|
151
|
+
);
|
|
152
|
+
text-decoration: var(
|
|
153
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_text-decoration
|
|
154
|
+
);
|
|
155
|
+
text-transform: var(
|
|
156
|
+
--recursica_ui-kit_components_table-header_properties_unsorted-text-style_text-transform
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.root thead .cell + .cell {
|
|
161
|
+
border-left: var(
|
|
162
|
+
--recursica_ui-kit_components_table-header_properties_vertical-divider-size
|
|
163
|
+
)
|
|
164
|
+
solid
|
|
165
|
+
var(
|
|
166
|
+
--recursica_ui-kit_components_table-header_properties_colors_vertical-divider-color
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Unsorted specific state overrides */
|
|
171
|
+
.root thead .cell:not([data-sorted="true"]) {
|
|
172
|
+
background-color: var(
|
|
173
|
+
--recursica_ui-kit_components_table-header_properties_colors_unsorted-cell-color
|
|
174
|
+
);
|
|
175
|
+
color: var(
|
|
176
|
+
--recursica_ui-kit_components_table-header_properties_colors_unsorted-text-color
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Sorted specific state overrides */
|
|
181
|
+
.root thead .cell[data-sorted="true"] {
|
|
182
|
+
background-color: var(
|
|
183
|
+
--recursica_ui-kit_components_table-header_properties_colors_sorted-cell-color
|
|
184
|
+
);
|
|
185
|
+
color: var(
|
|
186
|
+
--recursica_ui-kit_components_table-header_properties_colors_sorted-text-color
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
font-family: var(
|
|
190
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_font-family
|
|
191
|
+
);
|
|
192
|
+
font-size: var(
|
|
193
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_font-size
|
|
194
|
+
);
|
|
195
|
+
font-style: var(
|
|
196
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_font-style
|
|
197
|
+
);
|
|
198
|
+
font-weight: var(
|
|
199
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_font-weight
|
|
200
|
+
);
|
|
201
|
+
letter-spacing: var(
|
|
202
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_letter-spacing
|
|
203
|
+
);
|
|
204
|
+
line-height: var(
|
|
205
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_line-height
|
|
206
|
+
);
|
|
207
|
+
text-decoration: var(
|
|
208
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_text-decoration
|
|
209
|
+
);
|
|
210
|
+
text-transform: var(
|
|
211
|
+
--recursica_ui-kit_components_table-header_properties_sorted-text-style_text-transform
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Disabled Header */
|
|
216
|
+
.root thead .cell[data-disabled="true"] {
|
|
217
|
+
background-color: var(
|
|
218
|
+
--recursica_ui-kit_components_table-header_variants_states_disabled_properties_colors_cell-color
|
|
219
|
+
);
|
|
220
|
+
color: var(
|
|
221
|
+
--recursica_ui-kit_components_table-header_variants_states_disabled_properties_colors_text-color
|
|
222
|
+
);
|
|
223
|
+
opacity: var(
|
|
224
|
+
--recursica_ui-kit_components_table-header_variants_states_disabled_properties_opacity
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* Sort label — MUI's TableSortLabel renders its own arrow icon; re-color it to inherit the
|
|
229
|
+
cell's own text color (instead of MUI's default sort-label color) and size/space it with the
|
|
230
|
+
same tokens Mantine's own inline chevron uses. */
|
|
231
|
+
.sortLabel {
|
|
232
|
+
color: inherit;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.sortLabel:global(.Mui-active) {
|
|
236
|
+
color: inherit;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.sortLabel :global(.MuiTableSortLabel-icon) {
|
|
240
|
+
width: var(--recursica_ui-kit_components_table-header_properties_icon-size);
|
|
241
|
+
height: var(--recursica_ui-kit_components_table-header_properties_icon-size);
|
|
242
|
+
margin-left: var(
|
|
243
|
+
--recursica_ui-kit_components_table-header_properties_label-sort-gap
|
|
244
|
+
);
|
|
245
|
+
color: inherit;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* ==========================================
|
|
249
|
+
4. Table Cells (td)
|
|
250
|
+
========================================== */
|
|
251
|
+
|
|
252
|
+
.root tbody .cell {
|
|
253
|
+
background-color: var(
|
|
254
|
+
--recursica_ui-kit_components_table-cell_properties_colors_cell-color
|
|
255
|
+
);
|
|
256
|
+
color: var(
|
|
257
|
+
--recursica_ui-kit_components_table-cell_properties_colors_text-color
|
|
258
|
+
);
|
|
259
|
+
padding: var(
|
|
260
|
+
--recursica_ui-kit_components_table-cell_properties_padding-vertical
|
|
261
|
+
)
|
|
262
|
+
var(--recursica_ui-kit_components_table-cell_properties_padding-horizontal);
|
|
263
|
+
max-width: var(--recursica_ui-kit_components_table-cell_properties_max-width);
|
|
264
|
+
|
|
265
|
+
/* Standard text style */
|
|
266
|
+
font-family: var(
|
|
267
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_font-family
|
|
268
|
+
);
|
|
269
|
+
font-size: var(
|
|
270
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_font-size
|
|
271
|
+
);
|
|
272
|
+
font-style: var(
|
|
273
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_font-style
|
|
274
|
+
);
|
|
275
|
+
font-weight: var(
|
|
276
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_font-weight
|
|
277
|
+
);
|
|
278
|
+
letter-spacing: var(
|
|
279
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_letter-spacing
|
|
280
|
+
);
|
|
281
|
+
line-height: var(
|
|
282
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_line-height
|
|
283
|
+
);
|
|
284
|
+
text-align: var(
|
|
285
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_text-align
|
|
286
|
+
);
|
|
287
|
+
text-decoration: var(
|
|
288
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_text-decoration
|
|
289
|
+
);
|
|
290
|
+
text-transform: var(
|
|
291
|
+
--recursica_ui-kit_components_table-cell_properties_text-style_text-transform
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Currency formatted cell layout override */
|
|
296
|
+
.root tbody .cell[data-currency="true"] {
|
|
297
|
+
font-family: var(
|
|
298
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_font-family
|
|
299
|
+
);
|
|
300
|
+
font-size: var(
|
|
301
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_font-size
|
|
302
|
+
);
|
|
303
|
+
font-style: var(
|
|
304
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_font-style
|
|
305
|
+
);
|
|
306
|
+
font-weight: var(
|
|
307
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_font-weight
|
|
308
|
+
);
|
|
309
|
+
letter-spacing: var(
|
|
310
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_letter-spacing
|
|
311
|
+
);
|
|
312
|
+
line-height: var(
|
|
313
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_line-height
|
|
314
|
+
);
|
|
315
|
+
text-align: var(
|
|
316
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_text-align
|
|
317
|
+
);
|
|
318
|
+
text-decoration: var(
|
|
319
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_text-decoration
|
|
320
|
+
);
|
|
321
|
+
text-transform: var(
|
|
322
|
+
--recursica_ui-kit_components_table-cell_properties_currency-style_text-transform
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Disabled Cells */
|
|
327
|
+
.root tbody .row[data-disabled="true"] .cell,
|
|
328
|
+
.root tbody .cell[data-disabled="true"] {
|
|
329
|
+
background-color: var(
|
|
330
|
+
--recursica_ui-kit_components_table-cell_variants_states_disabled_properties_colors_cell-color
|
|
331
|
+
);
|
|
332
|
+
color: var(
|
|
333
|
+
--recursica_ui-kit_components_table-cell_variants_states_disabled_properties_colors_text-color
|
|
334
|
+
);
|
|
335
|
+
opacity: var(
|
|
336
|
+
--recursica_ui-kit_components_table-cell_variants_states_disabled_properties_opacity
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ==========================================
|
|
341
|
+
5. Table Footers (tfoot td)
|
|
342
|
+
========================================== */
|
|
343
|
+
|
|
344
|
+
.root tfoot .cell {
|
|
345
|
+
background-color: var(
|
|
346
|
+
--recursica_ui-kit_components_table-footer_properties_colors_cell-color
|
|
347
|
+
);
|
|
348
|
+
color: var(
|
|
349
|
+
--recursica_ui-kit_components_table-footer_properties_colors_text-color
|
|
350
|
+
);
|
|
351
|
+
padding: var(
|
|
352
|
+
--recursica_ui-kit_components_table-footer_properties_padding-vertical
|
|
353
|
+
)
|
|
354
|
+
var(
|
|
355
|
+
--recursica_ui-kit_components_table-footer_properties_padding-horizontal
|
|
356
|
+
);
|
|
357
|
+
margin-top: var(
|
|
358
|
+
--recursica_ui-kit_components_table-footer_properties_vertical-margin
|
|
359
|
+
);
|
|
360
|
+
margin-bottom: var(
|
|
361
|
+
--recursica_ui-kit_components_table-footer_properties_vertical-margin
|
|
362
|
+
);
|
|
363
|
+
border-top: var(
|
|
364
|
+
--recursica_ui-kit_components_table-footer_properties_horizontal-divider-size
|
|
365
|
+
)
|
|
366
|
+
solid
|
|
367
|
+
var(
|
|
368
|
+
--recursica_ui-kit_components_table-footer_properties_colors_horizontal-divider-color
|
|
369
|
+
);
|
|
370
|
+
|
|
371
|
+
/* Footer typography style */
|
|
372
|
+
font-family: var(
|
|
373
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_font-family
|
|
374
|
+
);
|
|
375
|
+
font-size: var(
|
|
376
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_font-size
|
|
377
|
+
);
|
|
378
|
+
font-style: var(
|
|
379
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_font-style
|
|
380
|
+
);
|
|
381
|
+
font-weight: var(
|
|
382
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_font-weight
|
|
383
|
+
);
|
|
384
|
+
letter-spacing: var(
|
|
385
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_letter-spacing
|
|
386
|
+
);
|
|
387
|
+
line-height: var(
|
|
388
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_line-height
|
|
389
|
+
);
|
|
390
|
+
text-decoration: var(
|
|
391
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_text-decoration
|
|
392
|
+
);
|
|
393
|
+
text-transform: var(
|
|
394
|
+
--recursica_ui-kit_components_table-footer_properties_text-style_text-transform
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.root tfoot .cell + .cell {
|
|
399
|
+
border-left: var(
|
|
400
|
+
--recursica_ui-kit_components_table-footer_properties_vertical-divider-size
|
|
401
|
+
)
|
|
402
|
+
solid
|
|
403
|
+
var(
|
|
404
|
+
--recursica_ui-kit_components_table-footer_properties_colors_vertical-divider-color
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* Currency formatted footer cell layout override */
|
|
409
|
+
.root tfoot .cell[data-currency="true"] {
|
|
410
|
+
font-family: var(
|
|
411
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_font-family
|
|
412
|
+
);
|
|
413
|
+
font-size: var(
|
|
414
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_font-size
|
|
415
|
+
);
|
|
416
|
+
font-style: var(
|
|
417
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_font-style
|
|
418
|
+
);
|
|
419
|
+
font-weight: var(
|
|
420
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_font-weight
|
|
421
|
+
);
|
|
422
|
+
letter-spacing: var(
|
|
423
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_letter-spacing
|
|
424
|
+
);
|
|
425
|
+
line-height: var(
|
|
426
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_line-height
|
|
427
|
+
);
|
|
428
|
+
text-decoration: var(
|
|
429
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_text-decoration
|
|
430
|
+
);
|
|
431
|
+
text-transform: var(
|
|
432
|
+
--recursica_ui-kit_components_table-footer_properties_currency-style_text-transform
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* Disabled Footer Row/Cells */
|
|
437
|
+
.root tfoot .row[data-disabled="true"] .cell,
|
|
438
|
+
.root tfoot .cell[data-disabled="true"] {
|
|
439
|
+
background-color: var(
|
|
440
|
+
--recursica_ui-kit_components_table-footer_variants_states_disabled_properties_colors_cell-color
|
|
441
|
+
);
|
|
442
|
+
color: var(
|
|
443
|
+
--recursica_ui-kit_components_table-footer_variants_states_disabled_properties_colors_text-color
|
|
444
|
+
);
|
|
445
|
+
opacity: var(
|
|
446
|
+
--recursica_ui-kit_components_table-footer_variants_states_disabled_properties_opacity
|
|
447
|
+
);
|
|
7
448
|
}
|