@recursica/adapter-mui-v7 1.3.2 → 1.3.3

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 (73) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/dist/adapter-mui-v7.cjs +16 -16
  4. package/dist/adapter-mui-v7.cjs.map +1 -1
  5. package/dist/adapter-mui-v7.js +902 -880
  6. package/dist/adapter-mui-v7.js.map +1 -1
  7. package/dist/index.d.ts +8 -5
  8. package/docs/PHILOSOPHY.md +4 -0
  9. package/package.json +4 -8
  10. package/src/components/Heading/HEADING_IMPLEMENTATION_NOTES.md +10 -0
  11. package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +8 -0
  12. package/src/components/Panel/Panel.tsx +51 -9
  13. package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +12 -0
  14. package/src/components/Text/Text.headings.dom.test.tsx +54 -0
  15. package/src/components/Text/Text.tsx +16 -0
  16. package/.storybook/commonArgTypes.ts +0 -148
  17. package/recursica_brand.json +0 -2610
  18. package/recursica_tokens.json +0 -769
  19. package/recursica_ui-kit.json +0 -9049
  20. package/recursica_variables_scoped.css +0 -6178
  21. package/src/Introduction.stories.tsx +0 -178
  22. package/src/components/Accordion/Accordion.stories.tsx +0 -198
  23. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +0 -68
  24. package/src/components/AutoComplete/AutoComplete.stories.tsx +0 -336
  25. package/src/components/Avatar/Avatar.stories.tsx +0 -92
  26. package/src/components/Badge/Badge.stories.tsx +0 -78
  27. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -114
  28. package/src/components/Button/Button.stories.tsx +0 -196
  29. package/src/components/Card/Card.stories.tsx +0 -132
  30. package/src/components/Checkbox/Checkbox.stories.tsx +0 -97
  31. package/src/components/Checkbox/CheckboxGroup.stories.tsx +0 -139
  32. package/src/components/Chip/Chip.stories.tsx +0 -154
  33. package/src/components/Container/Container.stories.tsx +0 -118
  34. package/src/components/DatePicker/DatePicker.stories.tsx +0 -163
  35. package/src/components/Dropdown/Dropdown.stories.tsx +0 -252
  36. package/src/components/FileInput/FileInput.stories.tsx +0 -313
  37. package/src/components/FileUpload/FileUpload.stories.tsx +0 -362
  38. package/src/components/Flex/Flex.stories.tsx +0 -128
  39. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +0 -118
  40. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +0 -129
  41. package/src/components/Group/Group.stories.tsx +0 -120
  42. package/src/components/Heading/Heading.stories.tsx +0 -112
  43. package/src/components/HoverCard/HoverCard.stories.tsx +0 -172
  44. package/src/components/Label/Label.stories.tsx +0 -131
  45. package/src/components/LayoutGrid/LayoutGrid.stories.tsx +0 -61
  46. package/src/components/Link/Link.stories.tsx +0 -58
  47. package/src/components/Loader/Loader.stories.tsx +0 -123
  48. package/src/components/Menu/Menu.stories.tsx +0 -402
  49. package/src/components/Modal/Modal.stories.tsx +0 -105
  50. package/src/components/NumberInput/NumberInput.stories.tsx +0 -96
  51. package/src/components/Pagination/Pagination.stories.tsx +0 -48
  52. package/src/components/Panel/Panel.stories.tsx +0 -227
  53. package/src/components/Popover/Popover.stories.tsx +0 -133
  54. package/src/components/Radio/Radio.stories.tsx +0 -93
  55. package/src/components/Radio/RadioGroup.stories.tsx +0 -117
  56. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +0 -163
  57. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +0 -106
  58. package/src/components/Slider/Slider.stories.tsx +0 -282
  59. package/src/components/Stack/Stack.stories.tsx +0 -108
  60. package/src/components/Stepper/Stepper.stories.tsx +0 -157
  61. package/src/components/Switch/Switch.stories.tsx +0 -114
  62. package/src/components/Switch/SwitchGroup.stories.tsx +0 -132
  63. package/src/components/Table/Table.stories.tsx +0 -154
  64. package/src/components/Tabs/Tabs.stories.tsx +0 -174
  65. package/src/components/Text/Text.stories.tsx +0 -123
  66. package/src/components/TextArea/TextArea.stories.tsx +0 -94
  67. package/src/components/TextField/TextField.stories.tsx +0 -162
  68. package/src/components/TimePicker/TimePicker.stories.tsx +0 -155
  69. package/src/components/Timeline/Timeline.stories.tsx +0 -128
  70. package/src/components/Toast/Toast.stories.tsx +0 -67
  71. package/src/components/Tooltip/Tooltip.stories.tsx +0 -165
  72. package/src/components/TransferList/TransferList.stories.tsx +0 -121
  73. package/src/components/Tree/Tree.stories.tsx +0 -104
@@ -1,196 +0,0 @@
1
- import React from "react";
2
- import type { Meta, StoryObj } from "@storybook/react";
3
- import { Button } from "./Button";
4
- import { Layer } from "@recursica/adapter-common";
5
-
6
- type ButtonStoryProps = React.ComponentProps<typeof Button>;
7
-
8
- const meta: Meta<ButtonStoryProps> = {
9
- title: "UI-Kit/Button",
10
- component: Button,
11
- tags: ["autodocs"],
12
- argTypes: {
13
- disabled: {
14
- control: "boolean",
15
- },
16
- variant: {
17
- control: "select",
18
- options: ["solid", "outline", "text"],
19
- description: "The visual variant of the button",
20
- },
21
- size: {
22
- control: "radio",
23
- options: ["default", "small"],
24
- description: "The size of the button",
25
- },
26
- loading: {
27
- control: "boolean",
28
- description: "Sets the button to a loading state",
29
- },
30
- useRecursicaLoader: {
31
- control: "boolean",
32
- description:
33
- "Use the Recursica Loader component instead of the default Mantine loader",
34
- },
35
- loaderVariant: {
36
- control: "select",
37
- options: ["oval", "bars", "dots"],
38
- description: "The visual variant of the Recursica Loader",
39
- },
40
- loaderSize: {
41
- control: "select",
42
- options: [undefined, "sm", "md", "lg", "small", "default", "large"],
43
- description: "The size variant for the loader",
44
- },
45
- },
46
- args: {
47
- useRecursicaLoader: true,
48
- loaderVariant: "oval",
49
- loaderSize: undefined,
50
- },
51
- };
52
-
53
- export default meta;
54
-
55
- type Story = StoryObj<ButtonStoryProps>;
56
-
57
- export const Default: Story = {
58
- args: {
59
- children: "Explore Button",
60
- variant: "solid",
61
- size: "default",
62
- disabled: false,
63
- },
64
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
65
- render: ({ withLayer, layer, ...args }: any) => {
66
- return <Button {...args} />;
67
- },
68
- };
69
-
70
- export const SolidDefault: Story = {
71
- args: {
72
- children: "Solid Default",
73
- variant: "solid",
74
- size: "default",
75
- },
76
- };
77
-
78
- export const OutlineSmall: Story = {
79
- args: {
80
- children: "Outline Small",
81
- variant: "outline",
82
- size: "small",
83
- },
84
- };
85
-
86
- export const TextWithIcon: Story = {
87
- args: {
88
- children: "Text With Icon",
89
- variant: "text",
90
- size: "default",
91
- icon: (
92
- <svg
93
- xmlns="http://www.w3.org/2000/svg"
94
- width="24"
95
- height="24"
96
- viewBox="0 0 24 24"
97
- fill="none"
98
- stroke="currentColor"
99
- strokeWidth="2"
100
- strokeLinecap="round"
101
- strokeLinejoin="round"
102
- >
103
- <circle cx="11" cy="11" r="8"></circle>
104
- <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
105
- </svg>
106
- ),
107
- },
108
- };
109
-
110
- export const IconOnly: Story = {
111
- args: {
112
- variant: "solid",
113
- size: "default",
114
- "aria-label": "Search",
115
- icon: (
116
- <svg
117
- xmlns="http://www.w3.org/2000/svg"
118
- width="24"
119
- height="24"
120
- viewBox="0 0 24 24"
121
- fill="none"
122
- stroke="currentColor"
123
- strokeWidth="2"
124
- strokeLinecap="round"
125
- strokeLinejoin="round"
126
- >
127
- <circle cx="11" cy="11" r="8"></circle>
128
- <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
129
- </svg>
130
- ),
131
- },
132
- };
133
-
134
- export const LayerOneSolid: Story = {
135
- args: {
136
- children: "Layer 1 Solid",
137
- variant: "solid",
138
- size: "default",
139
- },
140
- render: (args: ButtonStoryProps) => (
141
- <Layer layer={1} style={{ padding: "24px" }}>
142
- <Button {...args} />
143
- </Layer>
144
- ),
145
- };
146
-
147
- export const DisabledSolid: Story = {
148
- args: {
149
- children: "Disabled Solid",
150
- variant: "solid",
151
- size: "default",
152
- disabled: true,
153
- },
154
- };
155
-
156
- export const PolymorphicAsLink: Story = {
157
- args: {
158
- children: "Button as Link",
159
- variant: "solid",
160
- size: "default",
161
- component: "a",
162
- href: "https://example.com",
163
- target: "_blank",
164
- },
165
- };
166
-
167
- export const TruncatedLabel: Story = {
168
- args: {
169
- children:
170
- "This is an exceptionally long button label designed to demonstrate how the component handles text overflow by applying an ellipsis rather than breaking the layout or wrapping to multiple lines.",
171
- variant: "solid",
172
- size: "default",
173
- },
174
- render: (args: ButtonStoryProps) => (
175
- <div style={{ maxWidth: "250px" }}>
176
- <Button {...args} />
177
- </div>
178
- ),
179
- };
180
-
181
- export const Loading: Story = {
182
- args: {
183
- children: "Saving Changes",
184
- variant: "solid",
185
- size: "default",
186
- loading: true,
187
- },
188
- parameters: {
189
- docs: {
190
- description: {
191
- story:
192
- "When `loading={true}` is applied, the Button injects the Recursica `<Loader />` component. Per Recursica design rules, placing a Button in a loading state automatically forces the `disabled={true}` state on the underlying element. This ensures the button immediately receives the brand theme disabled opacities without relying solely on semantic logic.",
193
- },
194
- },
195
- },
196
- };
@@ -1,132 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Card } from "./Card";
3
- import { Layer } from "@recursica/adapter-common";
4
- import { Button } from "../Button/Button";
5
- import { Group } from "../Group/Group";
6
- import { Heading } from "../Heading/Heading";
7
- import { Text } from "../Text/Text";
8
-
9
- const meta: Meta<typeof Card> = {
10
- title: "UI-Kit/Card",
11
- component: Card,
12
- subcomponents: {
13
- "Card.Header": Card.Header,
14
- "Card.Content": Card.Content,
15
- "Card.Footer": Card.Footer,
16
- "Card.Section": Card.Section,
17
- } as Record<string, React.ComponentType<unknown>>,
18
- tags: ["autodocs"],
19
- parameters: {
20
- docs: {
21
- description: {
22
- component:
23
- "The Card component acts as the foundational padded surface for grouping related information. It relies on standard internal compositional nodes (`Card.Header`, `Card.Content`, `Card.Footer`) mapped directly to the active Recursica design tokens to enforce layout gaps and margins seamlessly. Use the provided dot-notation wrappers rather than building ad-hoc generic sections.",
24
- },
25
- },
26
- },
27
- argTypes: {},
28
- };
29
-
30
- export default meta;
31
-
32
- type Story = StoryObj<typeof Card>;
33
-
34
- export const Default: Story = {
35
- args: {},
36
- render: ({ ...args }) => {
37
- return (
38
- <div
39
- style={{
40
- padding: "48px",
41
- backgroundColor: "#e9ecef",
42
- }}
43
- >
44
- <Layer layer={0}>
45
- <Card {...args}>
46
- <Card.Header>Customer Activity Report</Card.Header>
47
- <Card.Content>
48
- <Text>
49
- Card inner section content body. Notice how this acts as padded
50
- content natively based on the overarching properties.
51
- Recursica's vertical gutter governs vertical spacing between
52
- siblings in the flex container.
53
- </Text>
54
- <Text>Another section showing the vertical gutter spacing.</Text>
55
- </Card.Content>
56
- <Card.Footer>
57
- <Group justify="space-between" align="center">
58
- <Text variant="caption">Generated today</Text>
59
- <Button variant="solid">View Details</Button>
60
- </Group>
61
- </Card.Footer>
62
- </Card>
63
- </Layer>
64
- </div>
65
- );
66
- },
67
- };
68
-
69
- export const HeaderlessAndFooterless: Story = {
70
- args: {},
71
- render: ({ ...args }) => {
72
- return (
73
- <div
74
- style={{
75
- padding: "48px",
76
- backgroundColor: "#e9ecef",
77
- }}
78
- >
79
- <Layer layer={0}>
80
- <Card {...args}>
81
- <Card.Content>
82
- <Heading order={6}>Notice</Heading>
83
- <Text>
84
- This is a completely generic card payload dropping the Header
85
- and Footer specific elements, simply acting as a padded
86
- elevation boundary box directly mirroring native composability!
87
- </Text>
88
- <Button variant="solid">Acknowledge</Button>
89
- </Card.Content>
90
- </Card>
91
- </Layer>
92
- </div>
93
- );
94
- },
95
- };
96
-
97
- export const LayerDemonstration: Story = {
98
- args: {},
99
- render: ({ ...args }) => {
100
- return (
101
- <div
102
- style={{
103
- display: "flex",
104
- gap: "32px",
105
- backgroundColor: "#e9ecef",
106
- padding: "32px",
107
- }}
108
- >
109
- <Layer layer={1}>
110
- <Card {...args}>
111
- <Card.Header>Layer 1 Wrapper</Card.Header>
112
- <Card.Content>
113
- <Text>Content inside layer 1 card.</Text>
114
- </Card.Content>
115
- </Card>
116
- </Layer>
117
-
118
- <Layer layer={2}>
119
- <Card {...args}>
120
- <Card.Header>Layer 2 Wrapper</Card.Header>
121
- <Card.Content>
122
- <Text>
123
- Content inside layer 2 card exposing a higher elevation drop
124
- shadow inherently cascaded.
125
- </Text>
126
- </Card.Content>
127
- </Card>
128
- </Layer>
129
- </div>
130
- );
131
- },
132
- };
@@ -1,97 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Checkbox } from "./Checkbox";
3
-
4
- const meta: Meta<typeof Checkbox> = {
5
- title: "UI-Kit/Checkbox",
6
- component: Checkbox,
7
- tags: ["autodocs"],
8
- parameters: {
9
- docs: {
10
- description: {
11
- component: `
12
- The \`Checkbox\` component is a precisely engineered, atomic form primitive representing boolean states natively aligned to the Recursica design system. It overrides Mantine's standard properties explicitly enforcing our variables natively across all structural boundaries.
13
-
14
- > [!IMPORTANT]
15
- > The atomic \`Checkbox\` is intended primarily as an internal primitive. **When wrapping multiple Checkbox elements together or rendering form controls, always utilize the \`<Checkbox.Group>\` component.** \`Checkbox.Group\` inherits the global \`FormControlWrapper\`, granting instantaneous access to macroscopic layout structuring, assistive descriptions, validation errors, and strict flex arrays.
16
-
17
- ### Usage
18
- To render a solitary component natively:
19
- \`\`\`tsx
20
- <Checkbox label="Acknowledge Terms" defaultChecked />
21
- \`\`\`
22
- `,
23
- },
24
- },
25
- },
26
- argTypes: {
27
- disabled: {
28
- control: "boolean",
29
- },
30
- readOnly: {
31
- control: "boolean",
32
- description:
33
- "Toggles structural read-only data presentation bypassing interaction boundaries completely.",
34
- },
35
- controlMaxWidth: { table: { disable: true } },
36
- controlMinWidth: { table: { disable: true } },
37
- },
38
- };
39
-
40
- export default meta;
41
-
42
- type Story = StoryObj<typeof Checkbox>;
43
-
44
- export const Default: Story = {
45
- args: {
46
- disabled: false,
47
- label: "Standard Unchecked Property",
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 LongLabelWrap: Story = {
59
- args: {
60
- label:
61
- "A meticulously long Checkbox label property demonstrating the absolute maximum 400px wrapper constraints actively snapping the text engine down onto a secondary wrapping line automatically without blowing out the visual boundaries.",
62
- },
63
- };
64
-
65
- export const StaticVariations: Story = {
66
- args: {},
67
- render: () => (
68
- <div
69
- style={{
70
- display: "flex",
71
- flexDirection: "column",
72
- gap: "24px",
73
- }}
74
- >
75
- <Checkbox label="Default Unchecked State" />
76
- <Checkbox label="Acknowledge Configuration" defaultChecked />
77
- <Checkbox label="Indeterminate Master" indeterminate />
78
- <Checkbox label="Disabled Variant" disabled />
79
- <Checkbox label="Disabled Checked Variant" checked disabled />
80
- </div>
81
- ),
82
- };
83
-
84
- export const ReadOnly: Story = {
85
- args: {},
86
- render: () => (
87
- <div
88
- style={{
89
- display: "flex",
90
- flexDirection: "column",
91
- gap: "24px",
92
- }}
93
- >
94
- <Checkbox label="Accept Terms & Conditions" defaultChecked readOnly />
95
- </div>
96
- ),
97
- };
@@ -1,139 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Checkbox } from "./Checkbox";
3
- import { CheckboxGroup } from "./CheckboxGroup";
4
- import { useState } from "react";
5
- import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
6
-
7
- const meta: Meta<typeof CheckboxGroup> = {
8
- title: "UI-Kit/CheckboxGroup",
9
- component: CheckboxGroup,
10
- tags: ["autodocs"],
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: `
15
- The \`CheckboxGroup\` component is the mandatory organizational wrapper aggregating multiple \`Checkbox\` primitives into structurally bound unified 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 checkbox column array.
19
- - **\`formLayout="side-by-side"\`**: Flow architecture pulling the grouping Label dynamically to the left while structurally organizing the internal checkboxes cleanly alongside it horizontally.
20
-
21
- \`\`\`tsx
22
- <Checkbox.Group
23
- label="Execution Targets"
24
- assistiveText="Strictly mapped structural grouping dynamically applied natively."
25
- formLayout="stacked"
26
- >
27
- <Checkbox value="react" label="Browser Execution Context" />
28
- <Checkbox value="svelte" label="Edge Nodes" />
29
- </Checkbox.Group>
30
- \`\`\`
31
- `,
32
- },
33
- },
34
- },
35
- argTypes: {
36
- ...formControlArgTypes,
37
- readOnly: {
38
- control: "boolean",
39
- description:
40
- "Toggles structural read-only data presentation bypassing interaction boundaries completely.",
41
- },
42
- },
43
- };
44
-
45
- export default meta;
46
-
47
- type Story = StoryObj<typeof CheckboxGroup>;
48
-
49
- export const Default: Story = {
50
- args: {
51
- formLayout: "stacked",
52
- label: "Standard Group",
53
- },
54
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
55
- render: function StoryRender({ withLayer, layer, ...args }: any) {
56
- const [value, setValue] = useState<string[]>([]);
57
- return (
58
- <Checkbox.Group {...args} value={value} onChange={setValue}>
59
- <Checkbox value="1" label="Option 1" />
60
- <Checkbox value="2" label="Option 2" />
61
- </Checkbox.Group>
62
- );
63
- },
64
- };
65
-
66
- export const SideBySideLayout: Story = {
67
- args: {
68
- formLayout: "side-by-side",
69
- labelOptionalText: "Recommended",
70
- labelWithEditIcon: true,
71
- label: "Frontend Frameworks",
72
- assistiveText:
73
- "Select all libraries currently in use for this specific workspace configuration.",
74
- },
75
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
76
- render: function StoryRender({ withLayer, layer, ...args }: any) {
77
- const [value, setValue] = useState<string[]>(["react"]);
78
- return (
79
- <Checkbox.Group {...args} value={value} onChange={setValue}>
80
- <Checkbox value="react" label="React (Standard Build)" />
81
- <Checkbox
82
- value="svelte"
83
- label="The Svelte architecture which provides a highly optimized, completely compiler-driven framework avoiding virtual DOM boundaries. This massively extended text explicitly guarantees accurate wrapper constraint checking and multi-line flex alignment."
84
- />
85
- <Checkbox value="vue" label="Vue Configuration Map" />
86
- </Checkbox.Group>
87
- );
88
- },
89
- };
90
-
91
- export const StackedLayout: Story = {
92
- args: {
93
- formLayout: "stacked",
94
- required: true,
95
- label: "Execution Targets",
96
- error: "You must select at least one deployment target to compile.",
97
- },
98
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
99
- render: function StoryRender({ withLayer, layer, ...args }: any) {
100
- const [value, setValue] = useState<string[]>(["react"]);
101
- return (
102
- <Checkbox.Group {...args} value={value} onChange={setValue}>
103
- <Checkbox value="react" label="Browser Execution Context" />
104
- <Checkbox
105
- value="svelte"
106
- label="Highly distributed Edge computing environments seamlessly bridging local runtime boundaries."
107
- />
108
- <Checkbox value="vue" label="Serverless Cloud Providers" />
109
- </Checkbox.Group>
110
- );
111
- },
112
- };
113
-
114
- export const ReadOnly: Story = {
115
- args: {
116
- readOnly: true,
117
- formLayout: "stacked",
118
- required: true,
119
- label: "Static ReadOnly Execution Locks",
120
- assistiveText:
121
- "This structure explicitly validates native component-level DOM preservation natively mapping lock bounds safely over interaction.",
122
- },
123
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
124
- render: function StoryRender({ withLayer, layer, ...args }: any) {
125
- const [value, setValue] = useState<string[]>(["disabledNode"]);
126
- return (
127
- <Checkbox.Group {...args} value={value} onChange={setValue}>
128
- <Checkbox
129
- value="disabledNode"
130
- label="Structurally Checked Node natively"
131
- />
132
- <Checkbox
133
- value="disabledNodeEmpty"
134
- label="Unchecked Configuration Limit"
135
- />
136
- </Checkbox.Group>
137
- );
138
- },
139
- };