@recursica/mui-adapter 0.24.0 → 0.26.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 (72) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.d.ts +189 -28
  3. package/dist/mui-adapter.cjs +85 -85
  4. package/dist/mui-adapter.cjs.map +1 -1
  5. package/dist/mui-adapter.css +1 -1
  6. package/dist/mui-adapter.js +29694 -24393
  7. package/dist/mui-adapter.js.map +1 -1
  8. package/llms.txt +1 -0
  9. package/package.json +1 -1
  10. package/src/GlobalExemptions.modules.css +0 -6
  11. package/src/components/Accordion/Accordion.module.css +0 -8
  12. package/src/components/AssistiveElement/AssistiveElement.tsx +1 -1
  13. package/src/components/Autocomplete/Autocomplete.module.css +0 -8
  14. package/src/components/Avatar/Avatar.module.css +0 -8
  15. package/src/components/Button/BUTTON_IMPLEMENTATION_NOTES.md +12 -0
  16. package/src/components/Button/Button.module.css +6 -18
  17. package/src/components/Checkbox/Checkbox.tsx +4 -1
  18. package/src/components/Chip/Chip.module.css +0 -27
  19. package/src/components/DatePicker/DATEPICKER_IMPLEMENTATION_NOTES.md +29 -0
  20. package/src/components/DatePicker/DatePicker.icons.tsx +35 -0
  21. package/src/components/DatePicker/DatePicker.module.css +451 -42
  22. package/src/components/DatePicker/DatePicker.stories.tsx +23 -25
  23. package/src/components/DatePicker/DatePicker.tsx +229 -47
  24. package/src/components/DatePicker/USAGE.md +14 -1
  25. package/src/components/Dropdown/Dropdown.module.css +0 -7
  26. package/src/components/FileInput/FileInput.module.css +0 -21
  27. package/src/components/FileInput/FileInput.tsx +6 -0
  28. package/src/components/FileUpload/FileUpload.module.css +0 -11
  29. package/src/components/HoverCard/HoverCard.module.css +1 -7
  30. package/src/components/Label/Label.module.css +0 -6
  31. package/src/components/Link/Link.module.css +0 -13
  32. package/src/components/Menu/Menu.module.css +0 -5
  33. package/src/components/Modal/Modal.module.css +0 -11
  34. package/src/components/NumberInput/NumberInput.module.css +0 -7
  35. package/src/components/Pagination/Pagination.module.css +0 -81
  36. package/src/components/Popover/IMPLEMENTATION_NOTES.md +22 -0
  37. package/src/components/Popover/Popover.module.css +118 -0
  38. package/src/components/Popover/Popover.stories.tsx +133 -0
  39. package/src/components/Popover/Popover.tsx +275 -0
  40. package/src/components/Popover/USAGE.md +69 -0
  41. package/src/components/Popover/index.ts +1 -0
  42. package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +6 -0
  43. package/src/components/SegmentedControl/SegmentedControl.module.css +32 -11
  44. package/src/components/SegmentedControl/SegmentedControl.tsx +18 -4
  45. package/src/components/Slider/IMPLEMENTATION_NOTES.md +29 -0
  46. package/src/components/Slider/Slider.module.css +80 -17
  47. package/src/components/Slider/Slider.stories.tsx +1 -1
  48. package/src/components/Slider/Slider.tsx +36 -1
  49. package/src/components/Stepper/IMPLEMENTATION_NOTES.md +54 -0
  50. package/src/components/Stepper/Stepper.module.css +139 -106
  51. package/src/components/Stepper/Stepper.tsx +76 -10
  52. package/src/components/Stepper/USAGE.md +4 -0
  53. package/src/components/Tabs/IMPLEMENTATION_NOTES.md +12 -0
  54. package/src/components/Tabs/Tabs.module.css +107 -24
  55. package/src/components/Tabs/Tabs.tsx +1 -0
  56. package/src/components/TextArea/TextArea.module.css +20 -11
  57. package/src/components/TextArea/TextArea.tsx +12 -23
  58. package/src/components/TextField/TextField.module.css +0 -8
  59. package/src/components/TimePicker/TimePicker.module.css +0 -16
  60. package/src/components/Timeline/IMPLEMENTATION_NOTES.md +24 -3
  61. package/src/components/Timeline/Timeline.module.css +55 -73
  62. package/src/components/Timeline/Timeline.tsx +23 -27
  63. package/src/components/Timeline/TimelineItem.tsx +38 -35
  64. package/src/components/Toast/Toast.module.css +0 -7
  65. package/src/components/Tooltip/Tooltip.module.css +0 -9
  66. package/src/components/TransferList/TRANSFERLIST_IMPLEMENTATION_NOTES.md +140 -0
  67. package/src/components/TransferList/TransferList.module.css +174 -38
  68. package/src/components/TransferList/TransferList.stories.tsx +110 -6
  69. package/src/components/TransferList/TransferList.tsx +417 -8
  70. package/src/components/TransferList/USAGE.md +37 -6
  71. package/src/components/index.ts +1 -0
  72. package/src/index.ts +3 -0
package/llms.txt CHANGED
@@ -52,6 +52,7 @@ Each component has its own `USAGE.md` documenting its props, adapter-specific be
52
52
  - [NumberInput](src/components/NumberInput/USAGE.md)
53
53
  - [Pagination](src/components/Pagination/USAGE.md)
54
54
  - [Panel](src/components/Panel/USAGE.md)
55
+ - [Popover](src/components/Popover/USAGE.md)
55
56
  - [Radio](src/components/Radio/USAGE.md)
56
57
  - [ReadOnlyField](src/components/ReadOnlyField/USAGE.md)
57
58
  - [RecursicaThemeProvider](src/components/RecursicaThemeProvider/USAGE.md)
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/borderux/recursica.git",
14
14
  "directory": "packages/mui-adapter"
15
15
  },
16
- "version": "0.24.0",
16
+ "version": "0.26.0",
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
@@ -5,9 +5,3 @@
5
5
  * recursica_variables_scoped.css but are not used by any specific component.
6
6
  * Isolating them here keeps individual component stylesheets clean and focused.
7
7
  */
8
-
9
- /* ==== GLOBAL ICON STYLE ====
10
- Global layout option specifying the overall SVG rendering style (solid/outline).
11
- Note to Forge Devs: style is not a CSS property or variable type and cannot be applied in standard CSS stylesheets.
12
- This variable is ignored in the UI adapters and should be reviewed by the Forge team. */
13
- /* recursica-ignore: --recursica_ui-kit_globals_icon_style */
@@ -1,11 +1,3 @@
1
- /* EXEMPTIONS:
2
- - accordion-header open-appearance background-color/border-color are ignored because Forge does
3
- not apply a visual swap on expand, even though the token schema defines "open" appearance
4
- colors distinct from "closed" (see .control below, which intentionally keeps a constant
5
- background/border across collapsed/expanded). Mirrors the mantine-adapter reference. */
6
- /* recursica-ignore: --recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_background-color */
7
- /* recursica-ignore: --recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_border-color */
8
-
9
1
  /* ==== ACCORDION CONTAINER ==== */
10
2
  .root {
11
3
  box-sizing: border-box;
@@ -86,7 +86,7 @@ export const AssistiveElement = React.forwardRef<
86
86
  {assistiveVariant === "error" ? <ErrorIcon /> : <HelpIcon />}
87
87
  </div>
88
88
  )}
89
- <div className={styles.text}>{children}</div>
89
+ <span className={styles.text}>{children}</span>
90
90
  </FormHelperText>
91
91
  );
92
92
  });
@@ -1,11 +1,3 @@
1
- /* EXEMPTIONS:
2
- - state-specific border-size variables are ignored because the input box uses a uniform static boundary to prevent
3
- unexpected layout shifts or flickering when switching between active, focused, or error states. */
4
- /* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_border-size */
5
- /* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_border-size */
6
- /* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_border-size */
7
- /* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_focus_properties_border-size */
8
-
9
1
  /* LAYOUT SPACING OVERRIDES:
10
2
  - Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
11
3
  - Also sets the --autocomplete-control-{max,min}-width hooks consumed inline in Autocomplete.tsx,
@@ -7,14 +7,6 @@ HARDCODED VALUES:
7
7
  - Image has no explicit size tokens other than root size, assume it scales 100%
8
8
  */
9
9
 
10
- /* EXEMPTIONS:
11
- The generic size variables below are defined in Figma but unused.
12
- We explicitly style the avatar's dimensions using the dedicated width and height tokens
13
- (e.g., small_properties_width and small_properties_height) for precise component layout. */
14
- /* recursica-ignore: --recursica_ui-kit_components_avatar_variants_sizes_default_properties_size */
15
- /* recursica-ignore: --recursica_ui-kit_components_avatar_variants_sizes_large_properties_size */
16
- /* recursica-ignore: --recursica_ui-kit_components_avatar_variants_sizes_small_properties_size */
17
-
18
10
  .root {
19
11
  box-sizing: border-box;
20
12
  margin: 0;
@@ -53,3 +53,15 @@ We explicitly pass `disableRipple` and `disableElevation` to block MUI's dynamic
53
53
  **Fix:** wrapped every `.MuiButton-startIcon`/`.MuiButton-endIcon` reference in `:global(...)`.
54
54
 
55
55
  **Not otherwise fixed, flagged separately:** the same unwrapped-global-class pattern shows up in at least `Stepper.module.css` (`.Mui-active`/`.Mui-completed`/`.MuiStepLabel-root`, fully unwrapped) and `SegmentedControl.module.css`, and partially in `Label.module.css`/`Accordion.module.css` — meaning some of those components' MUI-state-driven styling may also be silently no-op'ing. Out of scope for this fix (Button only, per what was asked); worth a dedicated sweep.
56
+
57
+ ---
58
+
59
+ ## `line-height` wiring gap vs Mantine (Matt Massey, 2026-08-19)
60
+
61
+ **Reported symptom:** descenders on letters like "p"/"g" clipped in the Default story.
62
+
63
+ **Investigation:** live-verified both adapters in Storybook (Playwright) at the `Default` and `OutlineSmall` stories, including a direct canvas `measureText` check of the `gpqjy` glyph set in Lexend at 14px (`--recursica_tokens_font_line-heights_default: 1.05em` → 14.7px line box vs ~14.0px actual glyph ink) — no visible clipping reproduced in Chromium; both adapters rendered pixel-identical crops. The line-height token itself is objectively tight (near-zero headroom), but that's shared by both adapters and isn't itself mui-specific.
64
+
65
+ **Real discrepancy found:** `.root`'s "Shared Defaults" set `line-height` once, unconditionally, from the _default_-size token, and `.labelText` merely did `line-height: inherit` — so the small-size line-height token was never actually referenced (it was `recursica-ignore`d as "redundant"). Mantine's `Button.module.css`, by contrast, sets `line-height` directly on `.labelText` per size, from each size's own token. They currently resolve to the same literal value, so this wasn't visually observable, but it's a latent divergence from the source of truth — a future token change to the small-size line-height would silently not apply in mui-adapter.
66
+
67
+ **Fix:** moved `line-height` off `.root` and onto `.labelText` (default token), added `.root[data-size="small"] .labelText { line-height: ... }` (small token), and removed the now-inaccurate `recursica-ignore` for that token — matching Mantine's structure exactly.
@@ -24,9 +24,6 @@
24
24
  letter-spacing: var(
25
25
  --recursica_ui-kit_components_button_variants_sizes_default_properties_text_letter-spacing
26
26
  );
27
- line-height: var(
28
- --recursica_ui-kit_components_button_variants_sizes_default_properties_text_line-height
29
- );
30
27
  text-decoration: var(
31
28
  --recursica_ui-kit_components_button_variants_sizes_default_properties_text_text-decoration
32
29
  );
@@ -64,7 +61,9 @@
64
61
  text-overflow: ellipsis;
65
62
  white-space: nowrap;
66
63
  font-size: inherit;
67
- line-height: inherit;
64
+ line-height: var(
65
+ --recursica_ui-kit_components_button_variants_sizes_default_properties_text_line-height
66
+ );
68
67
  }
69
68
  /* Removed data-loading background override to rely on native disabled opacities like Mantine */
70
69
 
@@ -171,6 +170,9 @@
171
170
  max-width: var(
172
171
  --recursica_ui-kit_components_button_variants_sizes_small_properties_max-label-width
173
172
  );
173
+ line-height: var(
174
+ --recursica_ui-kit_components_button_variants_sizes_small_properties_text_line-height
175
+ );
174
176
  }
175
177
 
176
178
  /* Icon Resets */
@@ -376,17 +378,3 @@
376
378
  var(--recursica_brand_states_focus_margin)
377
379
  var(--recursica_brand_states_focus_color);
378
380
  }
379
-
380
- /* EXEMPTIONS:
381
- These general button properties are redundant because visual mapping has been refactored
382
- to content-specific variables (_content_label_sizes_... etc.) or are handled by design defaults. */
383
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_default_properties_horizontal-padding */
384
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_default_properties_min-width */
385
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_horizontal-padding */
386
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_hover-opacity */
387
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_min-width */
388
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_text_font-style */
389
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_text_letter-spacing */
390
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_text_line-height */
391
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_text_text-decoration */
392
- /* recursica-ignore: --recursica_ui-kit_components_button_variants_sizes_small_properties_text_text-transform */
@@ -92,7 +92,10 @@ export const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(
92
92
  : styles.root;
93
93
 
94
94
  const groupContext = React.useContext(CheckboxGroupContext);
95
- const isGrouped = groupContext !== null;
95
+ // A Checkbox with its own explicit `checked` prop owns its source of truth even when
96
+ // nested inside a CheckboxGroup used purely for layout (e.g. TransferList's ungrouped
97
+ // rows) — only defer to the group's value array when the caller hasn't already told us.
98
+ const isGrouped = groupContext !== null && restRecord.checked === undefined;
96
99
  const isGroupReadOnly = isGrouped ? groupContext.readOnly : false;
97
100
  const isChecked = isGrouped
98
101
  ? (groupContext.value || []).includes(restRecord.value)
@@ -1,30 +1,3 @@
1
- /* EXEMPTIONS:
2
- - close-icon-color, leading-icon-color, and select-specific state icon variables are ignored because
3
- Chip uses explicit state color definitions (e.g. unselected, selected, error, error-selected variant colors)
4
- to drive pixel-perfect hover and click transitions, rather than generic single-color overrides.
5
- - text-size is ignored since actual chip sizing is dynamically driven by precise vertical padding and line-heights. */
6
- /* recursica-ignore: --recursica_ui-kit_components_chip_properties_close-icon-color */
7
- /* recursica-ignore: --recursica_ui-kit_components_chip_properties_leading-icon-color */
8
- /* recursica-ignore: --recursica_ui-kit_components_chip_properties_text-size */
9
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_error_properties_colors_leading-icon-color */
10
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_error_properties_colors_selected-icon-color */
11
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_error-selected_properties_colors_icon */
12
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_error-selected_properties_colors_leading-icon-color */
13
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_selected_properties_colors_leading-icon-color */
14
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_styles_unselected_properties_colors_selected-icon-color */
15
-
16
- /* Additional exemptions matching the reference mantine-adapter's Chip.module.css: per selection/error
17
- state, Figma defines multiple icon-color slots (leading-icon-color, selected-icon-color, and for
18
- error states also a generic icon-color), but each state only ever consumes ONE of them (leading
19
- when unselected, selected when selected). The remaining "off" slots per state are intentionally
20
- unused, same as in the mantine reference. */
21
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_selected_properties_colors_leading-icon-color */
22
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_selected_variants_states_error_properties_colors_icon-color */
23
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_selected_variants_states_error_properties_colors_leading-icon-color */
24
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_unselected_properties_colors_selected-icon-color */
25
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_unselected_variants_states_error_properties_colors_icon-color */
26
- /* recursica-ignore: --recursica_ui-kit_components_chip_variants_selection-states_unselected_variants_states_error_properties_colors_selected-icon-color */
27
-
28
1
  /* HARDCODED VALUES
29
2
  border-style: solid; (Baseline reset)
30
3
  box-sizing: border-box; (Baseline reset)
@@ -0,0 +1,29 @@
1
+ # DatePicker Implementation Notes
2
+
3
+ ## Architecture Overview
4
+
5
+ The `DatePicker` component is a wrapper around MUI X's `@mui/x-date-pickers` `DatePicker`, implementing the `FormControlWrapper` macro structure for Recursica. This ensures that the component visually and structurally aligns with standard Recursica input primitives, and mirrors the mantine-adapter's own `DatePicker` behavior and token mapping wherever the two libraries' APIs allow it.
6
+
7
+ ## Structural Constraints
8
+
9
+ 1. **Naked Field Usage**: We intentionally pass `label={undefined}`/`description`/`error` through `WithReadOnlyWrapper` rather than MUI X's own field label/helper-text props, so only our `WithReadOnlyWrapper` > `FormControlWrapper` orchestrates labels, description text, and ARIA state error boundaries — same convention as TimePicker.tsx.
10
+ 2. **Value Type**: MUI X's `DatePicker` only speaks `Dayjs` (via `AdapterDayjs`); the public API converts to/from plain `Date` internally so `value`/`defaultValue`/`onChange` match the mantine-adapter's convention exactly.
11
+ 3. **Read-Only Rendering**: The selected date is displayed formatted as `MM/DD/YY` (via `dayjs(...).format(...)`), not a raw `String(value)` cast (unlike the mantine-adapter, which has no reason to reach for `dayjs` outside read-only formatting). Pass `readOnlyComponent` to override.
12
+ 4. **Typing vs. Popover Entry**: Unlike the mantine-adapter (`DatePickerInput`, popover-only), MUI X's field natively supports typing directly into masked date segments in addition to the popup calendar — no adapter code needed to enable this, it's the library default.
13
+ 5. **Calendar Popover (Figma Token Issue)**: Same root cause as the mantine-adapter — the UI Kit's `date-picker` component exports no calendar-specific tokens (surface, selected day, hover, today, in-range) — so the calendar reuses the closest existing tokens, mapped 1:1 to the mantine-adapter's choices:
14
+ - **Surface** (`.dropdown`, applied to `slotProps.desktopPaper`) & **selected day** (`.MuiPickerDay-root.Mui-selected`): `--recursica_ui-kit_components_hover-card-popover` tokens for elevation/padding/surface, `--recursica_ui-kit_components_button_variants_styles_solid` tokens for the selected day fill.
15
+ - **Header content, weekday row** (`.MuiPickersCalendarHeader-root`, `.MuiDayCalendar-weekDayLabel`): the hover-card-popover content-color token.
16
+ - **Header nav controls** (`.MuiPickersArrowSwitcher-button`, `.MuiPickersCalendarHeader-switchViewButton`) **& month/year label** (`.MuiPickersCalendarHeader-label`): styled with `--recursica_ui-kit_components_button_variants_styles_text` tokens (border/background/color/elevation) plus small-size `Button` sizing tokens — the same tokens the mantine-adapter's `.calendarHeaderControl`/`.calendarHeaderLevel` use. Note the DOM shape differs from mantine: MUI splits the month/year control into a plain, non-interactive `.label` text node (`role="none"` on its `labelContainer` parent) plus a separate small `.switchViewButton` that's the actual clickable control — only the label's _color/typography_ is recolored to match (no border/background chrome on a non-interactive element), while the switchViewButton gets the full button treatment.
17
+ - **Hover** (day cells, header nav, header level button): the generic `--recursica_brand_states_hover_color`/`_hover_opacity` pair via the same `::after`-overlay technique the mantine-adapter and `Button`/`Menu` use — a plain `background-color`+`opacity` change on the element itself would dim its icon/text along with the fill, not just tint the surface.
18
+ - **Disabled / outside-month days** (`.Mui-disabled`, `.MuiPickerDay-dayOutsideMonth`): the generic `--recursica_brand_states_disabled` opacity token, same convention used repo-wide. Disabled header nav/label controls use `Button`'s own text-variant disabled opacity/elevation tokens instead.
19
+ - **Today marker** (`.MuiPickerDay-today`): reuses the hover-card-popover border-size/color tokens already used for the dropdown surface's own border — same reasoning as mantine-adapter (no dedicated "today" token exists). MUI ships its own default light-primary-color background tint on this class, which is explicitly reset to `transparent` since the design system has no equivalent.
20
+ - **Range selection / weekend styling**: not mapped. MUI X's default `DatePicker` doesn't render range selection or weekend-specific styling at all (unlike Mantine, which colors weekends red by default and needed an explicit override), so neither state needed a Recursica mapping.
21
+
22
+ ## Styling Quirks
23
+
24
+ - **Native field decoration suppression**: MUI X's field variant can't be forced to a bare/unstyled mode from this component's public API (same constraint TimePicker.module.css documents) — whichever native outline/underline decoration it renders by default is suppressed via `:global(...)` overrides, and `.field` draws the Recursica border/background/color instead.
25
+ - **Popover `slotProps` gotcha, same shape as mantine-adapter's `popoverProps` bug**: the calendar popup is portaled to `document.body`, entirely outside this component's own DOM subtree, so it can only be reached by handing MUI X's `slotProps.desktopPaper` a `className` directly — a descendant CSS selector from `.root` would never match it. `DatePicker.tsx` merges any consumer-supplied `slotProps.field`/`slotProps.desktopPaper` (and their `className`s) with our own defaults instead of overwriting them.
26
+ - **`.dropdown`'s `!important`s**: unlike the mantine-adapter's equivalent rule (plain CSS-module specificity, no `!important` needed — `@mantine/dates`' own stylesheet reliably loads first), MUI X injects its own `Paper`/`Popper` styles at runtime via emotion, with no guaranteed load-order relative to this CSS module. `!important` here just re-asserts token values against a same-specificity emotion rule that could otherwise win on source order alone.
27
+ - **Default display/entry format**: `format="MM/DD/YY"` (a `dayjs` format string, MUI X's own default is `"MM/DD/YYYY"`), matching the mantine-adapter's `valueFormat` default.
28
+ - **Default leading icon**: the calendar icon is MUI X's own built-in "open picker" button (`slots.openPickerIcon`, positioned via `openPickerButtonPosition="start"` on the field slot) rather than a separate decorative `InputAdornment` — clicking it opens the calendar, unlike the mantine-adapter's purely decorative `leftSection` icon (there, the whole field is the click target). Overridable via `slots={{ openPickerIcon: MyIcon }}`, following the same override-prop convention as `leftSection` elsewhere in this adapter.
29
+ - **No native `::placeholder`**: empty date segments ("MM", "DD", "YYYY") render via MUI X's own internal placeholder styling, not a native `::placeholder` pseudo-element — there's no selector to hook the `placeholder-opacity` token onto, same constraint TimePicker.module.css documents for its own empty sections.
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+
3
+ /**
4
+ * Default calendar icon rendered in the field's open-picker button (start position, see
5
+ * DatePicker.tsx). Consumers can override it by passing their own `slots.openPickerIcon`.
6
+ * Rendered by MUI X as an `SvgIcon`-like component and handed `className`/`style` only — sized/
7
+ * colored entirely via the generic `.section :global(svg)` rule in DatePicker.module.css, same
8
+ * convention as the mantine-adapter's CalendarIcon.
9
+ */
10
+ export function CalendarIcon({
11
+ className,
12
+ style,
13
+ }: {
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ }) {
17
+ return (
18
+ <svg
19
+ className={className}
20
+ style={style}
21
+ viewBox="0 0 24 24"
22
+ fill="none"
23
+ stroke="currentColor"
24
+ strokeWidth="2"
25
+ strokeLinecap="round"
26
+ strokeLinejoin="round"
27
+ aria-hidden
28
+ >
29
+ <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
30
+ <line x1="16" y1="2" x2="16" y2="6" />
31
+ <line x1="8" y1="2" x2="8" y2="6" />
32
+ <line x1="3" y1="10" x2="21" y2="10" />
33
+ </svg>
34
+ );
35
+ }