@recursica/adapter-mantine-v8 1.3.2 → 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 (72) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/adapter-mantine-v8.cjs +1 -1
  3. package/dist/adapter-mantine-v8.cjs.map +1 -1
  4. package/dist/adapter-mantine-v8.js +338 -331
  5. package/dist/adapter-mantine-v8.js.map +1 -1
  6. package/dist/index.d.ts +5 -1
  7. package/docs/PHILOSOPHY.md +4 -0
  8. package/package.json +4 -8
  9. package/src/components/Heading/HEADING_IMPLEMENTATION_NOTES.md +9 -0
  10. package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +8 -0
  11. package/src/components/Panel/Panel.tsx +23 -6
  12. package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +10 -0
  13. package/src/components/Text/Text.headings.dom.test.tsx +51 -0
  14. package/src/components/Text/Text.tsx +9 -0
  15. package/.storybook/commonArgTypes.ts +0 -148
  16. package/recursica_brand.json +0 -2610
  17. package/recursica_tokens.json +0 -769
  18. package/recursica_ui-kit.json +0 -9049
  19. package/recursica_variables_scoped.css +0 -6178
  20. package/src/Introduction.stories.tsx +0 -149
  21. package/src/components/Accordion/Accordion.stories.tsx +0 -189
  22. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +0 -68
  23. package/src/components/AutoComplete/AutoComplete.stories.tsx +0 -336
  24. package/src/components/Avatar/Avatar.stories.tsx +0 -92
  25. package/src/components/Badge/Badge.stories.tsx +0 -78
  26. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -114
  27. package/src/components/Button/Button.stories.tsx +0 -192
  28. package/src/components/Card/Card.stories.tsx +0 -76
  29. package/src/components/Checkbox/Checkbox.stories.tsx +0 -97
  30. package/src/components/Checkbox/CheckboxGroup.stories.tsx +0 -139
  31. package/src/components/Chip/Chip.stories.tsx +0 -128
  32. package/src/components/Container/Container.stories.tsx +0 -118
  33. package/src/components/DatePicker/DatePicker.stories.tsx +0 -158
  34. package/src/components/Dropdown/Dropdown.stories.tsx +0 -252
  35. package/src/components/FileInput/FileInput.stories.tsx +0 -313
  36. package/src/components/FileUpload/FileUpload.stories.tsx +0 -362
  37. package/src/components/Flex/Flex.stories.tsx +0 -128
  38. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +0 -118
  39. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +0 -129
  40. package/src/components/Group/Group.stories.tsx +0 -120
  41. package/src/components/Heading/Heading.stories.tsx +0 -112
  42. package/src/components/HoverCard/HoverCard.stories.tsx +0 -172
  43. package/src/components/Label/Label.stories.tsx +0 -131
  44. package/src/components/LayoutGrid/LayoutGrid.stories.tsx +0 -61
  45. package/src/components/Link/Link.stories.tsx +0 -58
  46. package/src/components/Loader/Loader.stories.tsx +0 -123
  47. package/src/components/Menu/Menu.stories.tsx +0 -370
  48. package/src/components/Modal/Modal.stories.tsx +0 -105
  49. package/src/components/NumberInput/NumberInput.stories.tsx +0 -96
  50. package/src/components/Pagination/Pagination.stories.tsx +0 -48
  51. package/src/components/Panel/Panel.stories.tsx +0 -227
  52. package/src/components/Popover/Popover.stories.tsx +0 -133
  53. package/src/components/Radio/Radio.stories.tsx +0 -93
  54. package/src/components/Radio/RadioGroup.stories.tsx +0 -117
  55. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +0 -163
  56. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +0 -106
  57. package/src/components/Slider/Slider.stories.tsx +0 -282
  58. package/src/components/Stack/Stack.stories.tsx +0 -108
  59. package/src/components/Stepper/Stepper.stories.tsx +0 -148
  60. package/src/components/Switch/Switch.stories.tsx +0 -114
  61. package/src/components/Switch/SwitchGroup.stories.tsx +0 -132
  62. package/src/components/Table/Table.stories.tsx +0 -140
  63. package/src/components/Tabs/Tabs.stories.tsx +0 -154
  64. package/src/components/Text/Text.stories.tsx +0 -123
  65. package/src/components/TextArea/TextArea.stories.tsx +0 -94
  66. package/src/components/TextField/TextField.stories.tsx +0 -162
  67. package/src/components/TimePicker/TimePicker.stories.tsx +0 -141
  68. package/src/components/Timeline/Timeline.stories.tsx +0 -128
  69. package/src/components/Toast/Toast.stories.tsx +0 -67
  70. package/src/components/Tooltip/Tooltip.stories.tsx +0 -165
  71. package/src/components/TransferList/TransferList.stories.tsx +0 -121
  72. package/src/components/Tree/Tree.stories.tsx +0 -104
@@ -1,227 +0,0 @@
1
- import { useState } from "react";
2
- import type { Meta, StoryObj } from "@storybook/react";
3
- import { Panel, type PanelProps } from "./Panel";
4
- import { Button } from "../Button";
5
- import { Text } from "../Text/Text";
6
-
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- type PanelStoryArgs = Record<string, any>;
9
-
10
- const meta: Meta = {
11
- title: "UI-Kit/Panel",
12
- component: Panel,
13
- tags: ["autodocs"],
14
- argTypes: {
15
- placement: {
16
- control: "select",
17
- options: ["left", "right", "top", "bottom"],
18
- description: "Side of the screen the panel slides in from.",
19
- },
20
- title: {
21
- control: "text",
22
- description: "Panel title displayed in the header.",
23
- },
24
- withOverlay: {
25
- control: "boolean",
26
- description: "Whether to display a background overlay.",
27
- },
28
- withCloseButton: {
29
- control: "boolean",
30
- description: "Whether to display the close button in the header.",
31
- },
32
- wrapHeaderText: {
33
- control: "boolean",
34
- description:
35
- "If true, forces the header text to a single line and truncates with an ellipsis.",
36
- },
37
- // Hide auto-detected HTML attributes
38
- defaultChecked: { table: { disable: true } },
39
- defaultValue: { table: { disable: true } },
40
- suppressContentEditableWarning: { table: { disable: true } },
41
- suppressHydrationWarning: { table: { disable: true } },
42
- },
43
- parameters: {
44
- layout: "fullscreen",
45
- docs: {
46
- description: {
47
- component: `
48
- The \`Panel\` component slides in or expands from the edge of the screen to reveal additional content or functionality. Built on Mantine's \`Drawer\`, it enforces Recursica design tokens for styling.
49
-
50
- ### Anatomy
51
- 1. **Header** — Title and close icon, remains fixed on scroll
52
- 2. **Divider** — Separates header/footer from content
53
- 3. **Body (Slot)** — Scrollable content area for custom content
54
- 4. **Footer** — Fixed action buttons (Recursica-specific)
55
-
56
- ### Usage
57
- \`\`\`tsx
58
- const [opened, { open, close }] = useDisclosure(false);
59
-
60
- <Button onClick={open}>Open Panel</Button>
61
- <Panel opened={opened} onClose={close} title="Settings" placement="right">
62
- Content goes here
63
- <Panel.Footer>
64
- <Button variant="outline">Cancel</Button>
65
- <Button variant="solid">Save</Button>
66
- </Panel.Footer>
67
- </Panel>
68
- \`\`\`
69
- `,
70
- },
71
- },
72
- },
73
- };
74
-
75
- export default meta;
76
-
77
- type Story = StoryObj<PanelStoryArgs>;
78
-
79
- export const Default: Story = {
80
- args: {
81
- placement: "right",
82
- title: "Panel Title",
83
- withOverlay: true,
84
- withCloseButton: true,
85
- wrapHeaderText: false,
86
- },
87
- render: ({ wrapHeaderText, ...args }: PanelStoryArgs) => {
88
- // eslint-disable-next-line react-hooks/rules-of-hooks
89
- const [opened, setOpened] = useState(true);
90
-
91
- return (
92
- <>
93
- <Button variant="solid" onClick={() => setOpened(true)}>
94
- Open Panel
95
- </Button>
96
- <Panel
97
- {...(args as PanelProps)}
98
- opened={opened}
99
- onClose={() => setOpened(false)}
100
- title="Panel Title"
101
- placement="right"
102
- wrapHeaderText={wrapHeaderText}
103
- >
104
- <Text>
105
- This is the panel body content area. Panels slide in from the edge
106
- of the screen to reveal supplementary information, navigation
107
- options, or toolsets.
108
- </Text>
109
- <Panel.Footer>
110
- <Button variant="outline" onClick={() => setOpened(false)}>
111
- Cancel
112
- </Button>
113
- <Button variant="solid">Save</Button>
114
- </Panel.Footer>
115
- </Panel>
116
- </>
117
- );
118
- },
119
- };
120
-
121
- export const LeftPlacement: Story = {
122
- args: {
123
- placement: "left",
124
- title: "Navigation",
125
- withOverlay: true,
126
- withCloseButton: true,
127
- wrapHeaderText: false,
128
- },
129
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
130
- render: ({ withLayer, layer, ...args }: PanelStoryArgs) => {
131
- // eslint-disable-next-line react-hooks/rules-of-hooks
132
- const [opened, setOpened] = useState(true);
133
-
134
- return (
135
- <>
136
- <Button variant="outline" onClick={() => setOpened(true)}>
137
- Open Left Panel
138
- </Button>
139
- <Panel
140
- {...(args as PanelProps)}
141
- opened={opened}
142
- onClose={() => setOpened(false)}
143
- >
144
- <Text>
145
- A panel sliding in from the left, commonly used for navigation menus
146
- or sidebars.
147
- </Text>
148
- </Panel>
149
- </>
150
- );
151
- },
152
- };
153
-
154
- export const ScrollableContent: Story = {
155
- args: {
156
- placement: "right",
157
- title: "Scrollable Panel",
158
- withOverlay: true,
159
- withCloseButton: true,
160
- wrapHeaderText: false,
161
- },
162
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
163
- render: ({ withLayer, layer, ...args }: PanelStoryArgs) => {
164
- // eslint-disable-next-line react-hooks/rules-of-hooks
165
- const [opened, setOpened] = useState(true);
166
-
167
- return (
168
- <>
169
- <Button variant="solid" onClick={() => setOpened(true)}>
170
- Open Scrollable Panel
171
- </Button>
172
- <Panel
173
- {...(args as PanelProps)}
174
- opened={opened}
175
- onClose={() => setOpened(false)}
176
- >
177
- {Array.from({ length: 20 }).map((_, i) => (
178
- <p key={i} style={{ marginBottom: "1rem" }}>
179
- Paragraph {i + 1}: This is sample content to demonstrate the
180
- scrollable behavior of the panel when content exceeds the viewport
181
- height.
182
- </p>
183
- ))}
184
- <Panel.Footer>
185
- <Button variant="outline" onClick={() => setOpened(false)}>
186
- Close
187
- </Button>
188
- <Button variant="solid">Apply</Button>
189
- </Panel.Footer>
190
- </Panel>
191
- </>
192
- );
193
- },
194
- };
195
-
196
- export const LongTitle: Story = {
197
- args: {
198
- placement: "right",
199
- title:
200
- "This is a ridiculously long panel title designed to test how the header CSS handles text overflow and whether it truncates correctly or breaks the layout",
201
- withOverlay: true,
202
- withCloseButton: true,
203
- wrapHeaderText: true,
204
- },
205
- render: ({ ...args }: PanelStoryArgs) => {
206
- // eslint-disable-next-line react-hooks/rules-of-hooks
207
- const [opened, setOpened] = useState(true);
208
-
209
- return (
210
- <>
211
- <Button variant="solid" onClick={() => setOpened(true)}>
212
- Open Long Title Panel
213
- </Button>
214
- <Panel
215
- {...(args as PanelProps)}
216
- opened={opened}
217
- onClose={() => setOpened(false)}
218
- >
219
- <Text>
220
- Check the header to see if the long title is handled gracefully
221
- without pushing the close button off screen.
222
- </Text>
223
- </Panel>
224
- </>
225
- );
226
- },
227
- };
@@ -1,133 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Popover } from "./Popover";
3
- import { Button } from "../Button";
4
- import { Text } from "../Text/Text";
5
- import { Stack } from "../Stack/Stack";
6
-
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- type PopoverStoryArgs = Record<string, any>;
9
-
10
- const meta = {
11
- title: "UI-Kit/Popover",
12
- component: Popover,
13
- tags: ["autodocs"],
14
- parameters: {
15
- docs: {
16
- description: {
17
- component:
18
- "The `Popover` component is a composable wrapper around Mantine's Popover. It displays a dropdown panel when the user clicks or interacts with a target element.",
19
- },
20
- },
21
- },
22
- argTypes: {
23
- withBeak: {
24
- control: "boolean",
25
- description:
26
- "Whether to display a beak (arrow) pointing from the dropdown to the target.",
27
- },
28
- position: {
29
- control: "select",
30
- options: [
31
- "top",
32
- "top-start",
33
- "top-end",
34
- "bottom",
35
- "bottom-start",
36
- "bottom-end",
37
- "left",
38
- "left-start",
39
- "left-end",
40
- "right",
41
- "right-start",
42
- "right-end",
43
- ],
44
- description: "Dropdown position relative to target",
45
- },
46
- defaultOpened: {
47
- control: "boolean",
48
- description: "Initial opened state",
49
- },
50
- },
51
- } satisfies Meta<typeof Popover>;
52
-
53
- export default meta;
54
- type Story = StoryObj<typeof meta>;
55
-
56
- export const Default: Story = {
57
- args: {
58
- withBeak: true,
59
- position: "top",
60
- },
61
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
62
- render: ({ withLayer, layer, ...args }: PopoverStoryArgs) => {
63
- return (
64
- <Popover width={250} {...args}>
65
- <Popover.Target>
66
- <Button variant="solid">Toggle Popover</Button>
67
- </Popover.Target>
68
- <Popover.Dropdown>
69
- <Text size="rec-sm">
70
- This is the popover content. It can contain any elements you want to
71
- display when the user clicks the target.
72
- </Text>
73
- </Popover.Dropdown>
74
- </Popover>
75
- );
76
- },
77
- };
78
-
79
- export const SolidDefault: Story = {
80
- args: {
81
- withBeak: true,
82
- position: "top",
83
- defaultOpened: true,
84
- },
85
- parameters: {
86
- controls: { disable: true },
87
- },
88
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
89
- render: ({ withLayer, layer, ...args }: PopoverStoryArgs) => {
90
- return (
91
- <Stack align="center" justify="center" style={{ padding: "100px" }}>
92
- <Popover width={200} {...args}>
93
- <Popover.Target>
94
- <Button variant="solid">Toggle Popover</Button>
95
- </Popover.Target>
96
- <Popover.Dropdown>
97
- <Text size="rec-sm">
98
- This is a static representation of an opened popover with a beak.
99
- </Text>
100
- </Popover.Dropdown>
101
- </Popover>
102
- </Stack>
103
- );
104
- },
105
- };
106
-
107
- export const WithoutBeak: Story = {
108
- args: {
109
- withBeak: false,
110
- position: "bottom",
111
- defaultOpened: true,
112
- },
113
- parameters: {
114
- controls: { disable: true },
115
- },
116
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
117
- render: ({ withLayer, layer, ...args }: PopoverStoryArgs) => {
118
- return (
119
- <Stack align="center" justify="center" style={{ padding: "100px" }}>
120
- <Popover width={200} {...args}>
121
- <Popover.Target>
122
- <Button variant="outline">Bottom Popover</Button>
123
- </Popover.Target>
124
- <Popover.Dropdown>
125
- <Text size="rec-sm">
126
- This popover is positioned at the bottom and has no beak.
127
- </Text>
128
- </Popover.Dropdown>
129
- </Popover>
130
- </Stack>
131
- );
132
- },
133
- };
@@ -1,93 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Radio } from "./Radio";
3
-
4
- const meta: Meta<typeof Radio> = {
5
- title: "UI-Kit/Radio",
6
- component: Radio,
7
- tags: ["autodocs"],
8
- parameters: {
9
- docs: {
10
- description: {
11
- component: `
12
- The \`Radio\` component represents a fundamental standalone boolean selection node mapping to the native HTML \`<input type="radio">\`.
13
-
14
- > [!WARNING]
15
- > This component represents the isolated primitive structure. If you need macro form configurations, standard vertical alignments, side-by-side array wrappers, or integrated assistive text and error borders natively, you MUST use the \`<Radio.Group>\` orchestrator instead!
16
- `,
17
- },
18
- },
19
- },
20
- argTypes: {
21
- disabled: {
22
- control: "boolean",
23
- },
24
- checked: {
25
- control: "boolean",
26
- },
27
- readOnly: {
28
- control: "boolean",
29
- },
30
- error: {
31
- control: "boolean",
32
- },
33
- defaultChecked: {
34
- control: "boolean",
35
- },
36
- controlMaxWidth: { table: { disable: true } },
37
- controlMinWidth: { table: { disable: true } },
38
- },
39
- };
40
-
41
- export default meta;
42
-
43
- type Story = StoryObj<typeof Radio>;
44
-
45
- export const Default: Story = {
46
- args: {
47
- label: "Standard Radio Primitive",
48
- },
49
- };
50
-
51
- export const SideBySideLayout: Story = {
52
- args: {
53
- label: "Opt-in form alignment",
54
- formLayout: "side-by-side",
55
- },
56
- };
57
-
58
- export const CheckedState: Story = {
59
- args: {
60
- ...Default.args,
61
- defaultChecked: true,
62
- },
63
- };
64
-
65
- export const DisabledUnchecked: Story = {
66
- args: {
67
- ...Default.args,
68
- disabled: true,
69
- },
70
- };
71
-
72
- export const DisabledChecked: Story = {
73
- args: {
74
- ...Default.args,
75
- disabled: true,
76
- defaultChecked: true,
77
- },
78
- };
79
-
80
- export const ReadOnly: Story = {
81
- args: {},
82
- render: () => (
83
- <div
84
- style={{
85
- display: "flex",
86
- flexDirection: "column",
87
- gap: "24px",
88
- }}
89
- >
90
- <Radio label="Account Type" defaultChecked readOnly />
91
- </div>
92
- ),
93
- };
@@ -1,117 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Radio } from "./Radio";
3
- import { RadioGroup } from "./RadioGroup";
4
- import { useState } from "react";
5
- import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
6
-
7
- const meta: Meta<typeof RadioGroup> = {
8
- title: "UI-Kit/RadioGroup",
9
- component: RadioGroup,
10
- tags: ["autodocs"],
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: `
15
- The \`RadioGroup\` component is the mandatory organizational wrapper aggregating multiple \`Radio\` primitives into structurally bound unified selection arrays. It inherently leverages the \`FormControlWrapper\` granting native access to macroscopic layout structuring, assistive descriptions, and strict flex arrays.
16
-
17
- We exclusively utilize the \`formLayout\` parameter to control macro-level form flow:
18
- - **\`formLayout="stacked"\`**: Top-to-bottom layout cascading the Label bounding box down vertically into a standard stacked radio column array.
19
- - **\`formLayout="side-by-side"\`**: Flow architecture pulling the grouping Label dynamically to the left while structurally organizing the internal radios cleanly alongside it horizontally.
20
- `,
21
- },
22
- },
23
- },
24
- argTypes: {
25
- ...formControlArgTypes,
26
- readOnly: {
27
- control: "boolean",
28
- description:
29
- "Toggles structural read-only data presentation bypassing interaction boundaries completely.",
30
- },
31
- },
32
- };
33
-
34
- export default meta;
35
-
36
- type Story = StoryObj<typeof RadioGroup>;
37
-
38
- export const Default: Story = {
39
- args: {
40
- formLayout: "stacked",
41
- label: "Standard Group",
42
- },
43
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
44
- render: function StoryRender({ withLayer, layer, ...args }: any) {
45
- const [value, setValue] = useState<string>("");
46
- return (
47
- <RadioGroup {...args} value={value} onChange={setValue}>
48
- <Radio value="1" label="Option 1" />
49
- <Radio value="2" label="Option 2" />
50
- </RadioGroup>
51
- );
52
- },
53
- };
54
-
55
- export const StackedLayout: Story = {
56
- args: {
57
- formLayout: "stacked",
58
- required: true,
59
- label: "Hosting Provider",
60
- error: "You must select a deployment provider.",
61
- },
62
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
63
- render: function StoryRender({ withLayer, layer, ...args }: any) {
64
- const [value, setValue] = useState<string>("aws");
65
- return (
66
- <RadioGroup {...args} value={value} onChange={setValue}>
67
- <Radio value="aws" label="Amazon Web Services" />
68
- <Radio
69
- value="gcp"
70
- label="Google Cloud Platform (with completely distributed edge computing environments bridging local runtime boundaries seamlessly.)"
71
- />
72
- <Radio value="azure" label="Microsoft Azure" />
73
- </RadioGroup>
74
- );
75
- },
76
- };
77
-
78
- export const SideBySideLayout: Story = {
79
- args: {
80
- formLayout: "side-by-side",
81
- labelOptionalText: "Recommended",
82
- labelWithEditIcon: true,
83
- label: "Deployment Region",
84
- assistiveText: "Select the data center closest to your user base.",
85
- },
86
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
87
- render: function StoryRender({ withLayer, layer, ...args }: any) {
88
- const [value, setValue] = useState<string>("us-east");
89
- return (
90
- <RadioGroup {...args} value={value} onChange={setValue}>
91
- <Radio value="us-east" label="US East (N. Virginia)" />
92
- <Radio value="us-west" label="US West (Oregon)" />
93
- <Radio value="eu-central" label="EU Central (Frankfurt)" />
94
- </RadioGroup>
95
- );
96
- },
97
- };
98
-
99
- export const ReadOnly: Story = {
100
- args: {
101
- readOnly: true,
102
- formLayout: "stacked",
103
- required: true,
104
- label: "Selected Framework",
105
- assistiveText: "This selection cannot be changed after initialization.",
106
- },
107
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
108
- render: function StoryRender({ withLayer, layer, ...args }: any) {
109
- const [value, setValue] = useState<string>("react");
110
- return (
111
- <RadioGroup {...args} value={value} onChange={setValue}>
112
- <Radio value="react" label="React" />
113
- <Radio value="vue" label="Vue" />
114
- </RadioGroup>
115
- );
116
- },
117
- };