@recursica/adapter-mantine-v8 1.3.3 → 1.3.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/PHILOSOPHY.md +4 -0
  3. package/package.json +4 -8
  4. package/.storybook/commonArgTypes.ts +0 -148
  5. package/recursica_brand.json +0 -2610
  6. package/recursica_tokens.json +0 -769
  7. package/recursica_ui-kit.json +0 -9049
  8. package/recursica_variables_scoped.css +0 -6178
  9. package/src/Introduction.stories.tsx +0 -149
  10. package/src/components/Accordion/Accordion.stories.tsx +0 -189
  11. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +0 -68
  12. package/src/components/AutoComplete/AutoComplete.stories.tsx +0 -336
  13. package/src/components/Avatar/Avatar.stories.tsx +0 -92
  14. package/src/components/Badge/Badge.stories.tsx +0 -78
  15. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -114
  16. package/src/components/Button/Button.stories.tsx +0 -192
  17. package/src/components/Card/Card.stories.tsx +0 -76
  18. package/src/components/Checkbox/Checkbox.stories.tsx +0 -97
  19. package/src/components/Checkbox/CheckboxGroup.stories.tsx +0 -139
  20. package/src/components/Chip/Chip.stories.tsx +0 -128
  21. package/src/components/Container/Container.stories.tsx +0 -118
  22. package/src/components/DatePicker/DatePicker.stories.tsx +0 -158
  23. package/src/components/Dropdown/Dropdown.stories.tsx +0 -252
  24. package/src/components/FileInput/FileInput.stories.tsx +0 -313
  25. package/src/components/FileUpload/FileUpload.stories.tsx +0 -362
  26. package/src/components/Flex/Flex.stories.tsx +0 -128
  27. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +0 -118
  28. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +0 -129
  29. package/src/components/Group/Group.stories.tsx +0 -120
  30. package/src/components/Heading/Heading.stories.tsx +0 -112
  31. package/src/components/HoverCard/HoverCard.stories.tsx +0 -172
  32. package/src/components/Label/Label.stories.tsx +0 -131
  33. package/src/components/LayoutGrid/LayoutGrid.stories.tsx +0 -61
  34. package/src/components/Link/Link.stories.tsx +0 -58
  35. package/src/components/Loader/Loader.stories.tsx +0 -123
  36. package/src/components/Menu/Menu.stories.tsx +0 -370
  37. package/src/components/Modal/Modal.stories.tsx +0 -105
  38. package/src/components/NumberInput/NumberInput.stories.tsx +0 -96
  39. package/src/components/Pagination/Pagination.stories.tsx +0 -48
  40. package/src/components/Panel/Panel.stories.tsx +0 -219
  41. package/src/components/Popover/Popover.stories.tsx +0 -133
  42. package/src/components/Radio/Radio.stories.tsx +0 -93
  43. package/src/components/Radio/RadioGroup.stories.tsx +0 -117
  44. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +0 -163
  45. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +0 -106
  46. package/src/components/Slider/Slider.stories.tsx +0 -282
  47. package/src/components/Stack/Stack.stories.tsx +0 -108
  48. package/src/components/Stepper/Stepper.stories.tsx +0 -148
  49. package/src/components/Switch/Switch.stories.tsx +0 -114
  50. package/src/components/Switch/SwitchGroup.stories.tsx +0 -132
  51. package/src/components/Table/Table.stories.tsx +0 -140
  52. package/src/components/Tabs/Tabs.stories.tsx +0 -154
  53. package/src/components/Text/Text.stories.tsx +0 -148
  54. package/src/components/TextArea/TextArea.stories.tsx +0 -94
  55. package/src/components/TextField/TextField.stories.tsx +0 -162
  56. package/src/components/TimePicker/TimePicker.stories.tsx +0 -141
  57. package/src/components/Timeline/Timeline.stories.tsx +0 -128
  58. package/src/components/Toast/Toast.stories.tsx +0 -67
  59. package/src/components/Tooltip/Tooltip.stories.tsx +0 -165
  60. package/src/components/TransferList/TransferList.stories.tsx +0 -121
  61. package/src/components/Tree/Tree.stories.tsx +0 -104
@@ -1,149 +0,0 @@
1
- import type { Meta } from "@storybook/react-vite";
2
- import { AdaptersContent, MantineLogo } from "@recursica/storybook-template";
3
- import { VersionInfo } from "./Version";
4
- import {
5
- Container,
6
- Stack,
7
- Group,
8
- Heading,
9
- Text,
10
- Link,
11
- Button,
12
- } from "./components";
13
-
14
- const DOCS_URL = "https://recursica.com";
15
- const FORGE_URL = "https://forge.recursica.com";
16
-
17
- function IntroductionContent() {
18
- return (
19
- <Container size="md" style={{ padding: "32px 0", maxWidth: 640 }}>
20
- <Group gap="rec-md" mb="rec-xl" align="flex-start" wrap="nowrap">
21
- <MantineLogo width={80} height={80} />
22
- <Stack gap={0}>
23
- <Heading order={1} m={0}>
24
- Recursica Design System (Mantine Adapter)
25
- </Heading>
26
- <Link href="https://mantine.dev" target="_blank" rel="noreferrer">
27
- mantine.dev
28
- </Link>
29
- </Stack>
30
- </Group>
31
- <Text mb="rec-xl">
32
- This Storybook showcases the Recursica design system implemented for the{" "}
33
- <strong>Mantine UI Kit</strong>. It provides reusable components that
34
- map our design tokens to Mantine's robust component layer.
35
- </Text>
36
-
37
- <Stack mb="rec-xl">
38
- <Heading order={2} mb="rec-md">
39
- Looking for another UI Kit?
40
- </Heading>
41
- <Text mb="rec-md">
42
- Are you using a different UI Kit (like Material UI)? Recursica
43
- provides multiple adapters for different frameworks.
44
- </Text>
45
- <Group mt="rec-md">
46
- <Button
47
- component="a"
48
- href="./?path=/story/introduction--adapters"
49
- target="_parent"
50
- variant="solid"
51
- >
52
- View Supported Adapters
53
- </Button>
54
- </Group>
55
- </Stack>
56
-
57
- <Stack mb="rec-xl">
58
- <Heading order={2} mb="rec-md">
59
- Installation
60
- </Heading>
61
- <Text mb="rec-md">
62
- To install the Mantine adapter in your project, run:
63
- </Text>
64
- <Stack
65
- style={{
66
- padding: 12,
67
- backgroundColor: "#f5f5f5",
68
- borderRadius: 6,
69
- fontSize: 13,
70
- marginTop: 8,
71
- }}
72
- >
73
- <code>
74
- npm install @recursica/adapter-mantine-v8 @mantine/core
75
- @mantine/hooks
76
- </code>
77
- </Stack>
78
- </Stack>
79
-
80
- <Stack mb="rec-xl">
81
- <Heading order={2} mb="rec-md">
82
- Tokens
83
- </Heading>
84
- <Text mb="rec-md">
85
- Raw design tokens (colors, sizes, font weights, opacities, etc.) that
86
- feed the theme and components. These are the primitive values defined
87
- in your token set and exposed as CSS custom properties.
88
- </Text>
89
- </Stack>
90
-
91
- <Stack mb="rec-xl">
92
- <Heading order={2} mb="rec-md">
93
- Theme
94
- </Heading>
95
- <Text mb="rec-md">
96
- Brand and theme layer built on top of tokens. Typography types,
97
- dimensions, and layout grids are defined here. Theme uses the tokens
98
- and exposes both CSS variables and helper classes (e.g. typography
99
- classes) for consistent styling across the product.
100
- </Text>
101
- </Stack>
102
-
103
- <Stack mb="rec-xl">
104
- <Heading order={2} mb="rec-md">
105
- Configuring Recursica
106
- </Heading>
107
- <Text mb="rec-md">
108
- To modify the Recursica configuration (tokens, brand, theme), go to{" "}
109
- <Link href={FORGE_URL} target="_blank" rel="noopener noreferrer">
110
- {FORGE_URL}
111
- </Link>
112
- . Changes there drive the tokens and theme you see in this Storybook.
113
- </Text>
114
- </Stack>
115
-
116
- <Stack mb="rec-xl">
117
- <Heading order={2} mb="rec-md">
118
- Documentation
119
- </Heading>
120
- <Text mb="rec-md">
121
- For full documentation, guides, and API reference, visit{" "}
122
- <Link href={DOCS_URL} target="_blank" rel="noopener noreferrer">
123
- {DOCS_URL}
124
- </Link>
125
- .
126
- </Text>
127
- </Stack>
128
- </Container>
129
- );
130
- }
131
-
132
- const meta = {
133
- title: "Introduction",
134
- } satisfies Meta;
135
-
136
- export default meta;
137
-
138
- export const Welcome = {
139
- render: () => <IntroductionContent />,
140
- };
141
-
142
- export const Adapters = {
143
- render: () => <AdaptersContent />,
144
- };
145
-
146
- export const VersionInfoStory = {
147
- name: "Version Info",
148
- render: () => <VersionInfo />,
149
- };
@@ -1,189 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Accordion } from "./Accordion";
3
-
4
- const SVGIcon = () => (
5
- <svg
6
- xmlns="http://www.w3.org/2000/svg"
7
- width="24"
8
- height="24"
9
- viewBox="0 0 24 24"
10
- fill="none"
11
- stroke="currentColor"
12
- strokeWidth="2"
13
- strokeLinecap="round"
14
- strokeLinejoin="round"
15
- >
16
- <path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" />
17
- </svg>
18
- );
19
-
20
- const ChevronIcon = () => (
21
- <svg
22
- width="24"
23
- height="24"
24
- viewBox="0 0 24 24"
25
- fill="none"
26
- xmlns="http://www.w3.org/2000/svg"
27
- >
28
- <path
29
- d="M20.0306 9.53062L12.5306 17.0306C12.461 17.1003 12.3783 17.1557 12.2872 17.1934C12.1962 17.2312 12.0986 17.2506 12 17.2506C11.9014 17.2506 11.8038 17.2312 11.7128 17.1934C11.6218 17.1557 11.539 17.1003 11.4694 17.0306L3.96938 9.53062C3.82865 9.38988 3.74959 9.19901 3.74959 8.99999C3.74959 8.80097 3.82865 8.61009 3.96938 8.46936C4.11011 8.32863 4.30098 8.24957 4.50001 8.24957C4.69903 8.24957 4.8899 8.32863 5.03063 8.46936L12 15.4397L18.9694 8.46936C19.0391 8.39968 19.1218 8.34441 19.2128 8.30669C19.3039 8.26898 19.4015 8.24957 19.5 8.24957C19.5986 8.24957 19.6961 8.26898 19.7872 8.30669C19.8782 8.34441 19.9609 8.39968 20.0306 8.46936C20.1003 8.53905 20.1556 8.62177 20.1933 8.71282C20.231 8.80386 20.2504 8.90144 20.2504 8.99999C20.2504 9.09854 20.231 9.19612 20.1933 9.28716C20.1556 9.37821 20.1003 9.46093 20.0306 9.53062Z"
30
- fill="currentColor"
31
- />
32
- </svg>
33
- );
34
-
35
- const meta: Meta<typeof Accordion> = {
36
- title: "UI-Kit/Accordion",
37
- component: Accordion,
38
- tags: ["autodocs"],
39
- parameters: {
40
- docs: {
41
- description: {
42
- component: `
43
- The \`Accordion\` component intelligently wraps \`@mantine/core\`'s underlying Accordion layers while applying strict native design system mapping via \`recursica_variables_scoped.css\`.
44
-
45
- ### Hybrid Composition API (Smart-Rendering)
46
- To maximize flexibility while strictly aligning with the explicit Recursica design logic, the \`AccordionItem\` operates utilizing a **Hybrid Smart-Rendering Flow**:
47
-
48
- 1. **Auto-Construction (Explicit Mapping)**:
49
- If you supply the explicitly outlined Recursica properties (\`title\`, \`leftIcon\`) directly onto \`<Accordion.Item>\`, the component auto-generates the necessary \`<Accordion.Control>\` DOM layer inherently bridging the icons and titles visually while leaving the raw \`children\` wrapped neatly as the \`<Accordion.Panel>\`.
50
-
51
- 2. **Graceful Falldown (Raw Composability)**:
52
- If you deliberately omit the \`title\` property, the entire mapping system gracefully falls backward yielding exactly to the raw \`@mantine/core\` composition model. Under this context, you must inject your localized \`<Accordion.Control>\` and \`<Accordion.Panel>\` configurations completely manually.
53
-
54
- ### Architecture Warning (\`open\`)
55
- To structurally protect the parent wrapper's core transitions tracking architecture (\`<Accordion value="...">\`), this configuration explicitly rejects mapping isolated \`open={true}\` object states natively on specific configurations. Use Mantine's inherent sibling arrays matching the corresponding active value map!
56
- `,
57
- },
58
- },
59
- },
60
- };
61
-
62
- export default meta;
63
-
64
- export const Default: StoryObj<typeof Accordion> = {
65
- render: () => {
66
- return (
67
- <Accordion defaultValue="item-1" chevron={<ChevronIcon />}>
68
- <Accordion.Item value="item-1">
69
- <Accordion.Control>Billing and Membership</Accordion.Control>
70
- <Accordion.Panel>
71
- You can manage your billing directly from the dashboard tab. All
72
- payments are processed automatically.
73
- </Accordion.Panel>
74
- </Accordion.Item>
75
-
76
- <Accordion.Item value="item-2">
77
- <Accordion.Control>Refund Policy</Accordion.Control>
78
- <Accordion.Panel>
79
- We offer a 30-day money-back guarantee for all new subscriptions.
80
- </Accordion.Panel>
81
- </Accordion.Item>
82
-
83
- <Accordion.Item value="item-3">
84
- <Accordion.Control>Technical Support</Accordion.Control>
85
- <Accordion.Panel>
86
- Our support team is available 24/7 via live chat or email.
87
- </Accordion.Panel>
88
- </Accordion.Item>
89
- </Accordion>
90
- );
91
- },
92
- };
93
-
94
- export const WithIcons: StoryObj<typeof Accordion> = {
95
- render: () => {
96
- return (
97
- <Accordion defaultValue="security" chevron={<ChevronIcon />}>
98
- <Accordion.Item value="security">
99
- <Accordion.Control leftIcon={<SVGIcon />}>
100
- Security Settings
101
- </Accordion.Control>
102
- <Accordion.Panel>
103
- Enable two-factor authentication (2FA) and monitor active sessions
104
- below.
105
- </Accordion.Panel>
106
- </Accordion.Item>
107
-
108
- <Accordion.Item value="privacy">
109
- <Accordion.Control leftIcon={<SVGIcon />}>
110
- Privacy Configuration
111
- </Accordion.Control>
112
- <Accordion.Panel>
113
- Choose what data is shared with our analytics partners.
114
- </Accordion.Panel>
115
- </Accordion.Item>
116
- </Accordion>
117
- );
118
- },
119
- };
120
-
121
- export const LongTitleTruncation: StoryObj<typeof Accordion> = {
122
- render: () => {
123
- return (
124
- // `style` is stripped from Accordion itself (only passes through with overStyled);
125
- // constrain width on a plain wrapper div instead to force truncation.
126
- <div style={{ maxWidth: 320 }}>
127
- <Accordion defaultValue="long-title" chevron={<ChevronIcon />}>
128
- <Accordion.Item value="long-title">
129
- <Accordion.Control leftIcon={<SVGIcon />}>
130
- This is a deliberately very long accordion item title used to
131
- verify that overflowing text truncates with a CSS ellipsis instead
132
- of wrapping or overflowing the header
133
- </Accordion.Control>
134
- <Accordion.Panel>
135
- The header label above should truncate to a single line with a
136
- trailing ellipsis (…) rather than wrapping onto multiple lines or
137
- pushing the chevron out of view.
138
- </Accordion.Panel>
139
- </Accordion.Item>
140
-
141
- <Accordion.Item value="short-title">
142
- <Accordion.Control leftIcon={<SVGIcon />}>
143
- Short Title
144
- </Accordion.Control>
145
- <Accordion.Panel>
146
- A short title in the same accordion for visual comparison.
147
- </Accordion.Panel>
148
- </Accordion.Item>
149
- </Accordion>
150
- </div>
151
- );
152
- },
153
- };
154
-
155
- export const Disabled: StoryObj<typeof Accordion> = {
156
- render: () => {
157
- return (
158
- <Accordion defaultValue="expanded-disabled" chevron={<ChevronIcon />}>
159
- <Accordion.Item value="expanded-disabled" disabled>
160
- <Accordion.Control leftIcon={<SVGIcon />}>
161
- Expanded and Disabled
162
- </Accordion.Control>
163
- <Accordion.Panel>
164
- This item starts expanded so the panel content's dimming can be
165
- verified alongside the control's, not just the collapsed header.
166
- </Accordion.Panel>
167
- </Accordion.Item>
168
-
169
- <Accordion.Item value="collapsed-disabled" disabled>
170
- <Accordion.Control leftIcon={<SVGIcon />}>
171
- Collapsed and Disabled
172
- </Accordion.Control>
173
- <Accordion.Panel>
174
- Clicking or tabbing to this control should have no effect.
175
- </Accordion.Panel>
176
- </Accordion.Item>
177
-
178
- <Accordion.Item value="enabled">
179
- <Accordion.Control leftIcon={<SVGIcon />}>
180
- Enabled, for Comparison
181
- </Accordion.Control>
182
- <Accordion.Panel>
183
- A normal, interactive item alongside the disabled ones above.
184
- </Accordion.Panel>
185
- </Accordion.Item>
186
- </Accordion>
187
- );
188
- },
189
- };
@@ -1,68 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { AssistiveElement } from "./AssistiveElement";
3
-
4
- const meta: Meta<typeof AssistiveElement> = {
5
- title: "UI-Kit/AssistiveElement",
6
- component: AssistiveElement,
7
- tags: ["autodocs"],
8
- parameters: {
9
- docs: {
10
- description: {
11
- component:
12
- "The `AssistiveElement` is a semantic structural primitive designed to standardize Helper and Error descriptive blocks natively beneath form components globally. By explicitly wiring to the `--recursica_ui-kit_components_assistive-element` layout tokens, this component safely injects custom SVGs (Alerts vs Info circles) alongside constrained flex-wrapping typography strings, preserving flawless line-height and alignment logic entirely decoupled from underlying input engine frameworks.",
13
- },
14
- },
15
- },
16
- argTypes: {
17
- assistiveVariant: {
18
- control: "radio",
19
- options: ["help", "error"],
20
- },
21
- assistiveWithIcon: {
22
- control: "boolean",
23
- },
24
- },
25
- };
26
-
27
- export default meta;
28
-
29
- type Story = StoryObj<typeof AssistiveElement>;
30
-
31
- export const DefaultHelp: Story = {
32
- args: {
33
- children:
34
- "This is a standard assistive layout explaining specific configurations.",
35
- assistiveVariant: "help",
36
- assistiveWithIcon: true,
37
- },
38
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
39
- render: ({ withLayer, layer, ...args }: any) => (
40
- <AssistiveElement {...args} />
41
- ),
42
- };
43
-
44
- export const ErrorState: Story = {
45
- args: {
46
- children:
47
- "Invalid property. You must satisfy the constraints outlined above.",
48
- assistiveVariant: "error",
49
- assistiveWithIcon: true,
50
- },
51
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
52
- render: ({ withLayer, layer, ...args }: any) => (
53
- <AssistiveElement {...args} />
54
- ),
55
- };
56
-
57
- export const NoIconHelp: Story = {
58
- args: {
59
- children:
60
- "Fallback textual representation without visual injection targets.",
61
- assistiveVariant: "help",
62
- assistiveWithIcon: false,
63
- },
64
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
65
- render: ({ withLayer, layer, ...args }: any) => (
66
- <AssistiveElement {...args} />
67
- ),
68
- };