@recursica/mantine-adapter 0.20.0 → 0.22.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.
- package/CHANGELOG.md +13 -0
- package/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +1624 -1498
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/AutoComplete/AutoComplete.d.ts +9 -0
- package/dist/src/components/Avatar/Avatar.d.ts +1 -1
- package/dist/src/components/Badge/Badge.d.ts +1 -1
- package/dist/src/components/Button/Button.d.ts +11 -1
- package/dist/src/components/Card/Card.d.ts +1 -1
- package/dist/src/components/Flex/Flex.d.ts +1 -1
- package/dist/src/components/Link/Link.d.ts +1 -1
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +6 -1
- package/dist/src/components/Text/Text.d.ts +1 -1
- package/dist/src/components/Toast/Toast.d.ts +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/package.json +5 -2
- package/src/GlobalExemptions.modules.css +13 -0
- package/src/components/AutoComplete/AUTOCOMPLETE_IMPLEMENTATION_NOTES.md +21 -0
- package/src/components/AutoComplete/AutoComplete.module.css +311 -0
- package/src/components/AutoComplete/AutoComplete.stories.tsx +187 -0
- package/src/components/AutoComplete/AutoComplete.tsx +154 -0
- package/src/components/Avatar/Avatar.module.css +40 -36
- package/src/components/Badge/Badge.module.css +4 -1
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +3 -10
- package/src/components/Button/Button.module.css +220 -57
- package/src/components/Button/Button.stories.tsx +68 -0
- package/src/components/Button/Button.tsx +42 -3
- package/src/components/Button/IMPLEMENTATION_NOTES.md +16 -0
- package/src/components/Card/Card.module.css +58 -1
- package/src/components/Card/Card.stories.tsx +4 -2
- package/src/components/Checkbox/Checkbox.module.css +74 -46
- package/src/components/Checkbox/Checkbox.stories.tsx +3 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +1 -9
- package/src/components/Chip/Chip.module.css +19 -1
- package/src/components/DatePicker/DatePicker.module.css +45 -0
- package/src/components/Dropdown/Dropdown.module.css +42 -15
- package/src/components/Dropdown/Dropdown.stories.tsx +3 -0
- package/src/components/Dropdown/Dropdown.tsx +5 -1
- package/src/components/FileInput/FileInput.module.css +50 -0
- package/src/components/FileUpload/FileUpload.module.css +43 -0
- package/src/components/FormControlLayout/FormControlLayout.module.css +12 -2
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +66 -0
- package/src/components/HoverCard/HoverCard.module.css +12 -5
- package/src/components/Label/Label.module.css +11 -3
- package/src/components/Link/Link.module.css +8 -0
- package/src/components/Menu/Menu.module.css +73 -30
- package/src/components/Modal/Modal.module.css +92 -47
- package/src/components/NumberInput/NumberInput.module.css +46 -15
- package/src/components/NumberInput/NumberInput.tsx +5 -1
- package/src/components/Pagination/Pagination.module.css +123 -41
- package/src/components/Panel/Panel.module.css +55 -3
- package/src/components/Popover/Popover.module.css +6 -4
- package/src/components/Radio/Radio.module.css +72 -59
- package/src/components/Radio/Radio.stories.tsx +3 -0
- package/src/components/Radio/RadioGroup.tsx +1 -8
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +14 -0
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +16 -1
- package/src/components/SegmentedControl/SegmentedControl.module.css +106 -41
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +1 -4
- package/src/components/SegmentedControl/SegmentedControl.tsx +18 -4
- package/src/components/Slider/Slider.module.css +89 -0
- package/src/components/Stepper/Stepper.module.css +53 -2
- package/src/components/Switch/Switch.module.css +62 -23
- package/src/components/Switch/Switch.stories.tsx +3 -0
- package/src/components/Switch/Switch.tsx +1 -0
- package/src/components/Switch/SwitchGroup.tsx +3 -10
- package/src/components/Tabs/Tabs.module.css +33 -12
- package/src/components/TextArea/TextArea.module.css +58 -120
- package/src/components/TextArea/TextArea.stories.tsx +3 -0
- package/src/components/TextArea/TextArea.tsx +7 -3
- package/src/components/TextField/TextField.module.css +46 -15
- package/src/components/TextField/TextField.tsx +5 -1
- package/src/components/TimePicker/TimePicker.module.css +44 -0
- package/src/components/Timeline/Timeline.module.css +6 -0
- package/src/components/Toast/Toast.module.css +62 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.module.css +9 -0
- package/src/components/TransferList/TransferList.module.css +41 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { AutoComplete } from "./AutoComplete";
|
|
3
|
+
import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof AutoComplete> = {
|
|
6
|
+
title: "UI-Kit/AutoComplete",
|
|
7
|
+
component: AutoComplete,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: `
|
|
13
|
+
The \`AutoComplete\` primitive provides a text input with a dropdown menu for displaying suggestions as the user types.
|
|
14
|
+
|
|
15
|
+
### Architectural Decoupling
|
|
16
|
+
Recursica wraps the internal Mantine \`<Autocomplete>\` component inside the \`WithReadOnlyWrapper\`, ensuring it integrates perfectly with the strict design system form architecture.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
Always structure horizontal architectures via the generic \`formLayout\` parameter.
|
|
20
|
+
\`\`\`tsx
|
|
21
|
+
<AutoComplete
|
|
22
|
+
label="Country"
|
|
23
|
+
assistiveText="Select your country of residence."
|
|
24
|
+
data={["United States", "Canada", "Mexico", "United Kingdom", "France"]}
|
|
25
|
+
formLayout="stacked"
|
|
26
|
+
/>
|
|
27
|
+
\`\`\`
|
|
28
|
+
`,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
...formControlArgTypes,
|
|
34
|
+
disabled: {
|
|
35
|
+
control: "boolean",
|
|
36
|
+
description:
|
|
37
|
+
"Maps the formal disabled variable states structurally to the input core.",
|
|
38
|
+
},
|
|
39
|
+
error: {
|
|
40
|
+
control: "text",
|
|
41
|
+
description:
|
|
42
|
+
"Applies the strict error string boundary rendering invalid structures seamlessly.",
|
|
43
|
+
},
|
|
44
|
+
required: {
|
|
45
|
+
control: "boolean",
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
control: "text",
|
|
49
|
+
},
|
|
50
|
+
assistiveText: {
|
|
51
|
+
control: "text",
|
|
52
|
+
},
|
|
53
|
+
readOnly: {
|
|
54
|
+
control: "boolean",
|
|
55
|
+
description:
|
|
56
|
+
"Toggles structural read-only data presentation explicitly blocking standard component bindings.",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default meta;
|
|
62
|
+
|
|
63
|
+
type Story = StoryObj<typeof AutoComplete>;
|
|
64
|
+
|
|
65
|
+
export const Default: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
disabled: false,
|
|
68
|
+
readOnly: false,
|
|
69
|
+
label: "Country Selection",
|
|
70
|
+
placeholder: "Start typing...",
|
|
71
|
+
data: [
|
|
72
|
+
"United States",
|
|
73
|
+
"Canada",
|
|
74
|
+
"Mexico",
|
|
75
|
+
"United Kingdom",
|
|
76
|
+
"France",
|
|
77
|
+
"Germany",
|
|
78
|
+
"Japan",
|
|
79
|
+
"Brazil",
|
|
80
|
+
"India",
|
|
81
|
+
"Australia",
|
|
82
|
+
],
|
|
83
|
+
assistiveText: "Search from a predefined list of countries.",
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const FormsSideBySide: Story = {
|
|
88
|
+
args: {
|
|
89
|
+
label: "Primary Region",
|
|
90
|
+
placeholder: "Select region...",
|
|
91
|
+
data: ["US-East", "US-West", "EU-Central", "AP-South", "SA-East"],
|
|
92
|
+
assistiveText:
|
|
93
|
+
"Select the primary region for the deployment. This violently long string tests native textual wrapping safely mapping alongside inputs.",
|
|
94
|
+
formLayout: "side-by-side",
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const WithLeadingIcon: Story = {
|
|
99
|
+
args: {
|
|
100
|
+
label: "Search Projects",
|
|
101
|
+
placeholder: "Project name...",
|
|
102
|
+
data: ["Alpha", "Beta", "Gamma", "Delta", "Epsilon"],
|
|
103
|
+
leftSection: (
|
|
104
|
+
<svg
|
|
105
|
+
width="24"
|
|
106
|
+
height="24"
|
|
107
|
+
viewBox="0 0 24 24"
|
|
108
|
+
fill="none"
|
|
109
|
+
stroke="currentColor"
|
|
110
|
+
strokeWidth="2"
|
|
111
|
+
strokeLinecap="round"
|
|
112
|
+
strokeLinejoin="round"
|
|
113
|
+
>
|
|
114
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
115
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
|
116
|
+
</svg>
|
|
117
|
+
),
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const WithTrailingIcon: Story = {
|
|
122
|
+
args: {
|
|
123
|
+
label: "Validation URL",
|
|
124
|
+
placeholder: "https://recursica.dev",
|
|
125
|
+
data: [
|
|
126
|
+
"https://recursica.dev",
|
|
127
|
+
"https://beta.recursica.dev",
|
|
128
|
+
"https://api.recursica.dev",
|
|
129
|
+
],
|
|
130
|
+
rightSection: (
|
|
131
|
+
<svg
|
|
132
|
+
width="24"
|
|
133
|
+
height="24"
|
|
134
|
+
viewBox="0 0 24 24"
|
|
135
|
+
fill="none"
|
|
136
|
+
stroke="currentColor"
|
|
137
|
+
strokeWidth="2"
|
|
138
|
+
strokeLinecap="round"
|
|
139
|
+
strokeLinejoin="round"
|
|
140
|
+
>
|
|
141
|
+
<polyline points="20 6 9 17 4 12"></polyline>
|
|
142
|
+
</svg>
|
|
143
|
+
),
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export const Disabled: Story = {
|
|
148
|
+
args: {
|
|
149
|
+
label: "Disabled Deployment Node",
|
|
150
|
+
placeholder: "Disabled primitive map...",
|
|
151
|
+
data: ["Node 1", "Node 2", "Node 3"],
|
|
152
|
+
disabled: true,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const ErrorState: Story = {
|
|
157
|
+
args: {
|
|
158
|
+
label: "Cluster Failure",
|
|
159
|
+
placeholder: "Failing component instance...",
|
|
160
|
+
data: ["Cluster A", "Cluster B", "Cluster C"],
|
|
161
|
+
defaultValue: "Invalid Cluster",
|
|
162
|
+
error:
|
|
163
|
+
"Critical runtime node disconnect detected traversing DOM architecture.",
|
|
164
|
+
required: true,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const StaticReadOnly: Story = {
|
|
169
|
+
args: {
|
|
170
|
+
label: "Static ReadOnly Review",
|
|
171
|
+
placeholder: "Ignored...",
|
|
172
|
+
data: ["Option 1", "Option 2"],
|
|
173
|
+
value: "Explicitly Uneditable Bound Output",
|
|
174
|
+
readOnly: true,
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export const EditableReadOnly: Story = {
|
|
179
|
+
args: {
|
|
180
|
+
label: "Editable ReadOnly Review",
|
|
181
|
+
placeholder: "Ignored until active...",
|
|
182
|
+
data: ["Option 1", "Option 2"],
|
|
183
|
+
defaultValue: "Waiting for Edit Execution",
|
|
184
|
+
readOnly: true,
|
|
185
|
+
labelWithEditIcon: true,
|
|
186
|
+
},
|
|
187
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Autocomplete as MantineAutocomplete,
|
|
4
|
+
type AutocompleteProps as MantineAutocompleteProps,
|
|
5
|
+
type InputWrapperProps,
|
|
6
|
+
} from "@mantine/core";
|
|
7
|
+
import { type ReadOnlyControlProps } from "@recursica/adapter-common";
|
|
8
|
+
import {
|
|
9
|
+
filterStylingProps,
|
|
10
|
+
type RecursicaOverStyled,
|
|
11
|
+
} from "../../utils/filterStylingProps";
|
|
12
|
+
import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/FormControlWrapper";
|
|
13
|
+
import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
|
|
14
|
+
import styles from "./AutoComplete.module.css";
|
|
15
|
+
|
|
16
|
+
export interface RecursicaAutoCompleteProps
|
|
17
|
+
extends Omit<
|
|
18
|
+
MantineAutocompleteProps,
|
|
19
|
+
"size" | "variant" | "radius" | "wrapperProps"
|
|
20
|
+
>,
|
|
21
|
+
Pick<
|
|
22
|
+
InputWrapperProps,
|
|
23
|
+
"label" | "error" | "required" | "withAsterisk" | "id"
|
|
24
|
+
>,
|
|
25
|
+
Omit<
|
|
26
|
+
RecursicaFormControlWrapperProps,
|
|
27
|
+
"controlMaxWidth" | "controlMinWidth"
|
|
28
|
+
>,
|
|
29
|
+
ReadOnlyControlProps {}
|
|
30
|
+
|
|
31
|
+
export type AutoCompleteProps = RecursicaOverStyled<RecursicaAutoCompleteProps>;
|
|
32
|
+
|
|
33
|
+
export const AutoComplete = forwardRef<HTMLInputElement, AutoCompleteProps>(
|
|
34
|
+
function AutoComplete(props, ref) {
|
|
35
|
+
const {
|
|
36
|
+
overStyled = false,
|
|
37
|
+
formLayout = "stacked",
|
|
38
|
+
|
|
39
|
+
// Label & Wrapper Maps
|
|
40
|
+
labelSize,
|
|
41
|
+
labelAlignment,
|
|
42
|
+
labelOptionalText,
|
|
43
|
+
labelWithEditIcon,
|
|
44
|
+
onLabelEditClick,
|
|
45
|
+
|
|
46
|
+
label,
|
|
47
|
+
assistiveText,
|
|
48
|
+
assistiveWithIcon,
|
|
49
|
+
error,
|
|
50
|
+
required,
|
|
51
|
+
withAsterisk,
|
|
52
|
+
id,
|
|
53
|
+
className,
|
|
54
|
+
style,
|
|
55
|
+
disabled,
|
|
56
|
+
readOnly,
|
|
57
|
+
readOnlyComponent,
|
|
58
|
+
emptyValueComponent,
|
|
59
|
+
value,
|
|
60
|
+
defaultValue,
|
|
61
|
+
...rest
|
|
62
|
+
} = props;
|
|
63
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
64
|
+
const restRecord = sanitizedProps as Record<string, unknown>;
|
|
65
|
+
|
|
66
|
+
// Delete prohibited sizing hooks from bypassing variables natively
|
|
67
|
+
delete restRecord["size"];
|
|
68
|
+
delete restRecord["variant"];
|
|
69
|
+
delete restRecord["radius"];
|
|
70
|
+
|
|
71
|
+
// Securely map core native blocks down ensuring nested CSS modules map precisely
|
|
72
|
+
const mergedClassNames: Partial<Record<string, string>> = {
|
|
73
|
+
wrapper: styles.root, // The nested Input internal relative wrapper bounding box
|
|
74
|
+
input: styles.input,
|
|
75
|
+
section: styles.section,
|
|
76
|
+
dropdown: styles.dropdown,
|
|
77
|
+
option: styles.option,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const classNamesProp = restRecord.classNames;
|
|
81
|
+
if (
|
|
82
|
+
classNamesProp &&
|
|
83
|
+
typeof classNamesProp === "object" &&
|
|
84
|
+
!Array.isArray(classNamesProp)
|
|
85
|
+
) {
|
|
86
|
+
const o = classNamesProp as Partial<Record<string, string>>;
|
|
87
|
+
mergedClassNames.wrapper = o.wrapper
|
|
88
|
+
? `${styles.root} ${o.wrapper}`
|
|
89
|
+
: styles.root;
|
|
90
|
+
mergedClassNames.input = o.input
|
|
91
|
+
? `${styles.input} ${o.input}`
|
|
92
|
+
: styles.input;
|
|
93
|
+
mergedClassNames.section = o.section
|
|
94
|
+
? `${styles.section} ${o.section}`
|
|
95
|
+
: styles.section;
|
|
96
|
+
mergedClassNames.dropdown = o.dropdown
|
|
97
|
+
? `${styles.dropdown} ${o.dropdown}`
|
|
98
|
+
: styles.dropdown;
|
|
99
|
+
mergedClassNames.option = o.option
|
|
100
|
+
? `${styles.option} ${o.option}`
|
|
101
|
+
: styles.option;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const wrapperClass = className
|
|
105
|
+
? `${styles.layoutOverride} ${className}`
|
|
106
|
+
: styles.layoutOverride;
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<WithReadOnlyWrapper
|
|
110
|
+
className={wrapperClass}
|
|
111
|
+
style={style as React.CSSProperties}
|
|
112
|
+
controlMaxWidth="var(--recursica_ui-kit_components_autocomplete_properties_max-width)"
|
|
113
|
+
controlMinWidth="var(--recursica_ui-kit_components_autocomplete_properties_min-width)"
|
|
114
|
+
overStyled={overStyled as true}
|
|
115
|
+
formLayout={formLayout}
|
|
116
|
+
labelSize={labelSize}
|
|
117
|
+
labelAlignment={labelAlignment}
|
|
118
|
+
labelOptionalText={labelOptionalText}
|
|
119
|
+
labelWithEditIcon={labelWithEditIcon}
|
|
120
|
+
onLabelEditClick={onLabelEditClick}
|
|
121
|
+
label={label}
|
|
122
|
+
assistiveText={assistiveText}
|
|
123
|
+
assistiveWithIcon={assistiveWithIcon}
|
|
124
|
+
error={error}
|
|
125
|
+
required={required}
|
|
126
|
+
withAsterisk={withAsterisk}
|
|
127
|
+
id={id}
|
|
128
|
+
readOnly={readOnly}
|
|
129
|
+
readOnlyComponent={readOnlyComponent}
|
|
130
|
+
emptyValueComponent={emptyValueComponent}
|
|
131
|
+
readOnlyType="text"
|
|
132
|
+
readOnlyValue={value !== undefined ? value : defaultValue}
|
|
133
|
+
readOnlyNativeProps={props}
|
|
134
|
+
activeComponent={
|
|
135
|
+
/* Naked Input execution safely decoupled from Mantine's macro Input.Wrapper DOM hooks */
|
|
136
|
+
<MantineAutocomplete
|
|
137
|
+
ref={ref}
|
|
138
|
+
classNames={mergedClassNames}
|
|
139
|
+
disabled={disabled}
|
|
140
|
+
value={value}
|
|
141
|
+
defaultValue={defaultValue}
|
|
142
|
+
wrapperProps={{
|
|
143
|
+
"data-disabled": disabled ? "true" : undefined,
|
|
144
|
+
"data-error": error ? "true" : undefined,
|
|
145
|
+
}}
|
|
146
|
+
{...(sanitizedProps as unknown as MantineAutocompleteProps)}
|
|
147
|
+
/>
|
|
148
|
+
}
|
|
149
|
+
/>
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
AutoComplete.displayName = "AutoComplete";
|
|
@@ -7,6 +7,14 @@ 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
|
+
|
|
10
18
|
.root {
|
|
11
19
|
box-sizing: border-box;
|
|
12
20
|
margin: 0;
|
|
@@ -14,6 +22,7 @@ HARDCODED VALUES:
|
|
|
14
22
|
overflow: hidden;
|
|
15
23
|
position: relative;
|
|
16
24
|
transition: all 0.2s ease;
|
|
25
|
+
box-shadow: var(--recursica_ui-kit_components_avatar_properties_elevation);
|
|
17
26
|
|
|
18
27
|
/* HARDCODE: Remove internal Mantine custom props that interfere */
|
|
19
28
|
--avatar-bd: none;
|
|
@@ -180,9 +189,13 @@ HARDCODED VALUES:
|
|
|
180
189
|
--recursica_ui-kit_components_avatar_variants_styles_image_properties_padding
|
|
181
190
|
);
|
|
182
191
|
|
|
183
|
-
/*
|
|
184
|
-
background-color:
|
|
185
|
-
|
|
192
|
+
/* Image variant styles */
|
|
193
|
+
background-color: var(
|
|
194
|
+
--recursica_ui-kit_components_avatar_variants_styles_image_properties_colors_background
|
|
195
|
+
);
|
|
196
|
+
border-color: var(
|
|
197
|
+
--recursica_ui-kit_components_avatar_variants_styles_image_properties_colors_border-color
|
|
198
|
+
);
|
|
186
199
|
}
|
|
187
200
|
|
|
188
201
|
/* Base styles for Internal Nodes */
|
|
@@ -232,55 +245,46 @@ HARDCODED VALUES:
|
|
|
232
245
|
|
|
233
246
|
.root[data-style="icon"][data-variant="solid"] {
|
|
234
247
|
border-width: var(
|
|
235
|
-
--recursica_ui-
|
|
248
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_solid_properties_border-size
|
|
236
249
|
);
|
|
237
250
|
background-color: var(
|
|
238
|
-
--recursica_ui-
|
|
251
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_solid_properties_colors_background
|
|
239
252
|
);
|
|
240
253
|
border-color: var(
|
|
241
|
-
--recursica_ui-
|
|
254
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_solid_properties_colors_border-color
|
|
242
255
|
);
|
|
243
256
|
color: var(
|
|
244
|
-
--recursica_ui-
|
|
245
|
-
var(
|
|
246
|
-
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_solid_properties_colors_text-color
|
|
247
|
-
)
|
|
257
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_solid_properties_colors_icon-color
|
|
248
258
|
);
|
|
249
259
|
}
|
|
250
260
|
|
|
251
261
|
.root[data-style="icon"][data-variant="outline"] {
|
|
252
262
|
border-width: var(
|
|
253
|
-
--recursica_ui-
|
|
263
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_outline_properties_border-size
|
|
254
264
|
);
|
|
255
265
|
background-color: var(
|
|
256
|
-
--recursica_ui-
|
|
266
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_outline_properties_colors_background
|
|
257
267
|
);
|
|
258
268
|
border-color: var(
|
|
259
|
-
--recursica_ui-
|
|
269
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_outline_properties_colors_border-color
|
|
260
270
|
);
|
|
261
271
|
color: var(
|
|
262
|
-
--recursica_ui-
|
|
263
|
-
var(
|
|
264
|
-
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_outline_properties_colors_text-color
|
|
265
|
-
)
|
|
272
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_outline_properties_colors_icon-color
|
|
266
273
|
);
|
|
267
274
|
}
|
|
268
275
|
|
|
269
276
|
.root[data-style="icon"][data-variant="ghost"] {
|
|
270
277
|
border-width: var(
|
|
271
|
-
--recursica_ui-
|
|
278
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_ghost_properties_border-size
|
|
272
279
|
);
|
|
273
280
|
background-color: var(
|
|
274
|
-
--recursica_ui-
|
|
281
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_ghost_properties_colors_background
|
|
275
282
|
);
|
|
276
283
|
border-color: var(
|
|
277
|
-
--recursica_ui-
|
|
284
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_ghost_properties_colors_border-color
|
|
278
285
|
);
|
|
279
286
|
color: var(
|
|
280
|
-
--recursica_ui-
|
|
281
|
-
var(
|
|
282
|
-
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_ghost_properties_colors_text-color
|
|
283
|
-
)
|
|
287
|
+
--recursica_ui-kit_components_avatar_variants_styles_icon_variants_types_ghost_properties_colors_icon-color
|
|
284
288
|
);
|
|
285
289
|
}
|
|
286
290
|
|
|
@@ -296,45 +300,45 @@ HARDCODED VALUES:
|
|
|
296
300
|
|
|
297
301
|
.root[data-style="text"][data-variant="solid"] {
|
|
298
302
|
border-width: var(
|
|
299
|
-
--recursica_ui-
|
|
303
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_solid_properties_border-size
|
|
300
304
|
);
|
|
301
305
|
background-color: var(
|
|
302
|
-
--recursica_ui-
|
|
306
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_solid_properties_colors_background
|
|
303
307
|
);
|
|
304
308
|
border-color: var(
|
|
305
|
-
--recursica_ui-
|
|
309
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_solid_properties_colors_border-color
|
|
306
310
|
);
|
|
307
311
|
color: var(
|
|
308
|
-
--recursica_ui-
|
|
312
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_solid_properties_colors_text-color
|
|
309
313
|
);
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
.root[data-style="text"][data-variant="outline"] {
|
|
313
317
|
border-width: var(
|
|
314
|
-
--recursica_ui-
|
|
318
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_outline_properties_border-size
|
|
315
319
|
);
|
|
316
320
|
background-color: var(
|
|
317
|
-
--recursica_ui-
|
|
321
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_outline_properties_colors_background
|
|
318
322
|
);
|
|
319
323
|
border-color: var(
|
|
320
|
-
--recursica_ui-
|
|
324
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_outline_properties_colors_border-color
|
|
321
325
|
);
|
|
322
326
|
color: var(
|
|
323
|
-
--recursica_ui-
|
|
327
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_outline_properties_colors_text-color
|
|
324
328
|
);
|
|
325
329
|
}
|
|
326
330
|
|
|
327
331
|
.root[data-style="text"][data-variant="ghost"] {
|
|
328
332
|
border-width: var(
|
|
329
|
-
--recursica_ui-
|
|
333
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_ghost_properties_border-size
|
|
330
334
|
);
|
|
331
335
|
background-color: var(
|
|
332
|
-
--recursica_ui-
|
|
336
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_ghost_properties_colors_background
|
|
333
337
|
);
|
|
334
338
|
border-color: var(
|
|
335
|
-
--recursica_ui-
|
|
339
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_ghost_properties_colors_border-color
|
|
336
340
|
);
|
|
337
341
|
color: var(
|
|
338
|
-
--recursica_ui-
|
|
342
|
+
--recursica_ui-kit_components_avatar_variants_styles_text_variants_types_ghost_properties_colors_text-color
|
|
339
343
|
);
|
|
340
344
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- align-items: center
|
|
6
6
|
- justify-content: center
|
|
7
7
|
- text-transform: uppercase (Mantine does this, but our tokens also specify it so we map it)
|
|
8
|
-
*/
|
|
8
|
+
*/
|
|
9
9
|
|
|
10
10
|
.root {
|
|
11
11
|
/* HARDCODE: Basic structural assumptions */
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
font-weight: var(
|
|
48
48
|
--recursica_ui-kit_components_badge_properties_text_font-weight
|
|
49
49
|
);
|
|
50
|
+
font-style: var(
|
|
51
|
+
--recursica_ui-kit_components_badge_properties_text_font-style
|
|
52
|
+
);
|
|
50
53
|
letter-spacing: var(
|
|
51
54
|
--recursica_ui-kit_components_badge_properties_text_letter-spacing
|
|
52
55
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
3
|
import { Breadcrumb } from "./Breadcrumb";
|
|
4
|
+
import { Link } from "../Link";
|
|
4
5
|
|
|
5
6
|
type BreadcrumbStoryProps = React.ComponentProps<typeof Breadcrumb> & {
|
|
6
7
|
items?: string[];
|
|
@@ -35,17 +36,9 @@ const meta: Meta<BreadcrumbStoryProps> = {
|
|
|
35
36
|
render: ({ items, children, ...args }) => {
|
|
36
37
|
const mappedChildren = items
|
|
37
38
|
? items.map((label, index) => (
|
|
38
|
-
<
|
|
39
|
-
href="#"
|
|
40
|
-
key={index}
|
|
41
|
-
style={{
|
|
42
|
-
color:
|
|
43
|
-
"var(--recursica_brand_palettes_primary_default_color_tone)",
|
|
44
|
-
textDecoration: "none",
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
39
|
+
<Link href="#" key={index}>
|
|
47
40
|
{label}
|
|
48
|
-
</
|
|
41
|
+
</Link>
|
|
49
42
|
))
|
|
50
43
|
: children;
|
|
51
44
|
|