@recursica/mantine-adapter 0.52.0 → 0.54.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 (47) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/SETUP.md +20 -6
  3. package/dist/index.d.ts +10 -0
  4. package/dist/mantine-adapter.cjs +1 -1
  5. package/dist/mantine-adapter.cjs.map +1 -1
  6. package/dist/mantine-adapter.css +1 -1
  7. package/dist/mantine-adapter.js +634 -617
  8. package/dist/mantine-adapter.js.map +1 -1
  9. package/package.json +13 -6
  10. package/recursica_brand.json +2677 -0
  11. package/recursica_tokens.json +799 -0
  12. package/recursica_ui-kit.json +14981 -0
  13. package/recursica_variables_scoped.css +30489 -0
  14. package/src/components/Accordion/Accordion.module.css +17 -8
  15. package/src/components/AutoComplete/AutoComplete.module.css +9 -2
  16. package/src/components/Chip/Chip.module.css +18 -0
  17. package/src/components/DatePicker/DatePicker.module.css +9 -2
  18. package/src/components/Dropdown/Dropdown.module.css +9 -2
  19. package/src/components/FileInput/FileInput.module.css +12 -0
  20. package/src/components/FileUpload/FileUpload.module.css +6 -1
  21. package/src/components/FormControlLayout/FormControlLayout.module.css +12 -0
  22. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +36 -0
  23. package/src/components/HoverCard/HoverCard.module.css +6 -1
  24. package/src/components/Label/Label.stories.tsx +63 -54
  25. package/src/components/Link/Link.module.css +5 -0
  26. package/src/components/Loader/Loader.animate.dom.test.tsx +82 -0
  27. package/src/components/Loader/Loader.module.css +10 -0
  28. package/src/components/Loader/Loader.stories.tsx +20 -0
  29. package/src/components/Loader/Loader.tsx +8 -1
  30. package/src/components/Modal/Modal.module.css +6 -2
  31. package/src/components/NumberInput/NumberInput.module.css +9 -2
  32. package/src/components/SegmentedControl/SegmentedControl.module.css +6 -0
  33. package/src/components/Table/TABLE_IMPLEMENTATION_NOTES.md +11 -0
  34. package/src/components/Table/Table.module.css +14 -0
  35. package/src/components/Table/Table.stories.tsx +1 -1
  36. package/src/components/Table/Table.tsx +9 -1
  37. package/src/components/Table/USAGE.md +4 -2
  38. package/src/components/TextArea/TextArea.module.css +9 -2
  39. package/src/components/TextField/TextField.module.css +9 -2
  40. package/src/components/TimePicker/TIMEPICKER_IMPLEMENTATION_NOTES.md +7 -1
  41. package/src/components/TimePicker/TimePicker.module.css +44 -0
  42. package/src/components/TimePicker/TimePicker.stories.tsx +22 -0
  43. package/src/components/TimePicker/TimePicker.tsx +1 -0
  44. package/src/components/Timeline/Timeline.module.css +5 -0
  45. package/src/components/Toast/Toast.module.css +8 -0
  46. package/src/components/Tooltip/Tooltip.module.css +9 -1
  47. package/src/components/TransferList/TransferList.module.css +9 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.54.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c31d5ae: Added an `animate` prop to `Loader` (default `true`) — set `false` to freeze its CSS animation for a deterministic render, e.g. a visual-regression snapshot. The `Static*` Loader stories now use it, and the animated `Default`/`LayerTwoOval` stories are excluded from adapter-tester's visual regression.
8
+
9
+ ### Patch Changes
10
+
11
+ - c31d5ae: Wired up unused design tokens (Accordion open state, Modal header/footer background, stacked Label width, TimePicker leading icon + placeholder opacity) and added `recursica-ignore` exemptions for tokens confirmed inapplicable by design.
12
+ - c31d5ae: Fixed `Table` currency columns so header and footer cells right-align to match value cells. `Table.Th`/`Table.Cell` header context now supports `variant="currency"`.
13
+ - Updated dependencies [c31d5ae]
14
+ - Updated dependencies [c31d5ae]
15
+ - Updated dependencies [c31d5ae]
16
+ - @recursica/adapter-common@0.27.0
17
+
18
+ ## 0.53.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 786d870: Version bumped
23
+
3
24
  ## 0.52.0
4
25
 
5
26
  ### Minor Changes
package/SETUP.md CHANGED
@@ -24,9 +24,7 @@ npm install @mantine/core@>=8.0.0 @mantine/dates@>=8.0.0 @mantine/hooks@>=8.0.0
24
24
 
25
25
  Before consuming Recursica components, integrate the CSS and design tokens into your application:
26
26
 
27
- 1. **Theme Files Setup**: When you install `@recursica/mantine-adapter`, a postinstall script automatically creates default theme files (including `recursica_variables_scoped.css` and JSON config files) in your project root. If they are missing, simply run `npm install` to create them. To customize or update these variables, you should use [Forge Recursica](https://forge.recursica.com) to export the updated theme files into your project.
28
- > [!IMPORTANT] > **AI Agent Directive**: The theme files (`recursica_variables_scoped.css` and associated JSON files) are created at the project root automatically via `npm install`. If they are not present, instruct the user to run `npm install`. Do NOT attempt to generate, mock, or write a placeholder CSS/JSON file yourself. When updates to these files are needed, instruct the user to export them from [Forge Recursica](https://forge.recursica.com) and replace the existing ones.
29
- 2. **Integrate CSS**: Import `recursica_variables_scoped.css` and the Mantine adapter CSS `mantine-adapter.css` into your application entrypoint (e.g., `main.tsx` or `App.tsx`). **It must be loaded after the Mantine CSS imports.**
27
+ 1. **Integrate CSS**: Import `recursica_variables_scoped.css` and the Mantine adapter CSS `mantine-adapter.css` into your application entrypoint (e.g., `main.tsx` or `App.tsx`). **It must be loaded after the Mantine CSS imports.**
30
28
 
31
29
  ```tsx
32
30
  import "@mantine/core/styles.css"; // Mantine core styles
@@ -34,13 +32,13 @@ Before consuming Recursica components, integrate the CSS and design tokens into
34
32
  import "@recursica/mantine-adapter/style.css"; // Mantine adapter styles
35
33
  ```
36
34
 
37
- 3. **Integrate Google Fonts**: Integrating custom fonts depends on how you load fonts in your project and which fonts are specified in your `recursica_variables_scoped.css` (since it is project-dependent). We suggest loading them via Google Fonts, as shown in this example:
35
+ 2. **Integrate Google Fonts**: Integrating custom fonts depends on how you load fonts in your project and which fonts are specified in your `recursica_variables_scoped.css` (since it is project-dependent). We suggest loading them via Google Fonts, as shown in this example:
38
36
 
39
37
  ```css
40
38
  @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
41
39
  ```
42
40
 
43
- 4. **Wrap App in RecursicaThemeProvider**: You must wrap your application in the `<RecursicaThemeProvider>` to correctly cascade design token properties. By default it also wraps its children in a `<Layer layer={0}>` (via the `initLayer0` prop, which defaults to `true`), so the base page surface/border/elevation variables resolve automatically with no extra setup:
41
+ 3. **Wrap App in RecursicaThemeProvider**: You must wrap your application in the `<RecursicaThemeProvider>` to correctly cascade design token properties. By default it also wraps its children in a `<Layer layer={0}>` (via the `initLayer0` prop, which defaults to `true`), so the base page surface/border/elevation variables resolve automatically with no extra setup:
44
42
 
45
43
  ```tsx
46
44
  import { MantineProvider } from "@mantine/core";
@@ -57,7 +55,7 @@ Before consuming Recursica components, integrate the CSS and design tokens into
57
55
  }
58
56
  ```
59
57
 
60
- 5. **Configure PostCSS Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install the `@recursica/recursica-postcss-vars` plugin to verify that Recursica CSS variables are properly connected in case they change.
58
+ 4. **Configure PostCSS Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install the `@recursica/recursica-postcss-vars` plugin to verify that Recursica CSS variables are properly connected in case they change.
61
59
 
62
60
  Install the plugin as a dev dependency:
63
61
 
@@ -77,3 +75,19 @@ Before consuming Recursica components, integrate the CSS and design tokens into
77
75
  },
78
76
  };
79
77
  ```
78
+
79
+ 5. **Configure ESLint Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install `eslint-plugin-recursica`, which flags use of the `overStyled` escape-hatch prop so it stays easy to audit.
80
+
81
+ Install the plugin as a dev dependency:
82
+
83
+ ```bash
84
+ npm install eslint-plugin-recursica --save-dev
85
+ ```
86
+
87
+ Then, add it to your `eslint.config.js`:
88
+
89
+ ```javascript
90
+ import recursica from "eslint-plugin-recursica";
91
+
92
+ export default [recursica.configs.recommended];
93
+ ```
package/dist/index.d.ts CHANGED
@@ -2330,6 +2330,12 @@ export declare interface RecursicaLoaderProps {
2330
2330
  variant?: "oval" | "bars" | "dots";
2331
2331
  /** Map to Recursica sizes */
2332
2332
  size?: "sm" | "md" | "lg" | RecursicaSize;
2333
+ /** Freezes the loader's CSS animation when `false` — the loader still
2334
+ * renders its normal shape, just without motion. Defaults to `true` (the
2335
+ * normal, animated loader). Use `false` for a deterministic rendering,
2336
+ * e.g. a visual-regression snapshot, where a moving animation would
2337
+ * otherwise diff differently every run. */
2338
+ animate?: boolean;
2333
2339
  }
2334
2340
 
2335
2341
  /**
@@ -2613,6 +2619,8 @@ export declare interface RecursicaTableHeaderCellProps {
2613
2619
  sorted?: "asc" | "desc" | false;
2614
2620
  /** Disables the header cell, dimming it and applying the disabled cell colors */
2615
2621
  disabled?: boolean;
2622
+ /** `"currency"` right-aligns the header cell to match a currency column's value cells */
2623
+ variant?: "default" | "currency";
2616
2624
  }
2617
2625
 
2618
2626
  /**
@@ -2747,6 +2755,8 @@ declare interface RecursicaTimePickerProps_2 {
2747
2755
  minTime?: string;
2748
2756
  /** Maximum possible time string. Format is `HH:mm` normally, or `HH:mm:ss` when `withSeconds` is true. */
2749
2757
  maxTime?: string;
2758
+ /** Section rendered inside the time field on the left (e.g. icon). Naming rationale: see `RecursicaTextFieldProps.leftSection`. */
2759
+ leftSection?: default_2.ReactNode;
2750
2760
  }
2751
2761
 
2752
2762
  /**