@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
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
|
|
12
12
|
--switch-track-padding: var(
|
|
13
|
-
--recursica_ui-kit_components_switch_properties_track-inner-padding
|
|
14
|
-
2px
|
|
13
|
+
--recursica_ui-kit_components_switch_properties_track-inner-padding
|
|
15
14
|
);
|
|
16
15
|
--switch-thumb-width: var(
|
|
17
16
|
--recursica_ui-kit_components_switch_properties_thumb-width
|
|
@@ -24,15 +23,17 @@
|
|
|
24
23
|
);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
.root
|
|
26
|
+
.root:has(input:disabled) {
|
|
28
27
|
cursor: not-allowed;
|
|
29
|
-
opacity: var(
|
|
28
|
+
opacity: var(
|
|
29
|
+
--recursica_ui-kit_components_switch-item_properties_disabled-opacity
|
|
30
|
+
);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.body {
|
|
33
34
|
display: flex;
|
|
34
35
|
align-items: center;
|
|
35
|
-
gap: var(--recursica_ui-
|
|
36
|
+
gap: var(--recursica_ui-kit_components_switch-item_properties_label-gap);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/* HARDCODE: disable native hover color transitions applied by Mantine */
|
|
@@ -57,8 +58,7 @@
|
|
|
57
58
|
--recursica_ui-kit_components_switch_properties_colors_track-unselected
|
|
58
59
|
);
|
|
59
60
|
box-shadow: var(
|
|
60
|
-
--recursica_ui-kit_components_switch_properties_track-elevation
|
|
61
|
-
none
|
|
61
|
+
--recursica_ui-kit_components_switch_properties_track-elevation
|
|
62
62
|
);
|
|
63
63
|
padding: var(--switch-track-padding);
|
|
64
64
|
border: none; /* HARDCODE */
|
|
@@ -94,8 +94,7 @@
|
|
|
94
94
|
--recursica_ui-kit_components_switch_properties_colors_thumb-unselected
|
|
95
95
|
);
|
|
96
96
|
box-shadow: var(
|
|
97
|
-
--recursica_ui-kit_components_switch_properties_thumb-elevation
|
|
98
|
-
none
|
|
97
|
+
--recursica_ui-kit_components_switch_properties_thumb-elevation
|
|
99
98
|
);
|
|
100
99
|
border: none; /* HARDCODE */
|
|
101
100
|
|
|
@@ -111,36 +110,46 @@
|
|
|
111
110
|
.labelWrapper {
|
|
112
111
|
display: flex;
|
|
113
112
|
flex-direction: column;
|
|
113
|
+
max-width: var(
|
|
114
|
+
--recursica_ui-kit_components_switch-item_properties_label-max-width
|
|
115
|
+
);
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
.label {
|
|
117
119
|
font-family: var(
|
|
118
|
-
--recursica_ui-
|
|
120
|
+
--recursica_ui-kit_components_switch-item_properties_text_font-family
|
|
119
121
|
);
|
|
120
122
|
font-size: var(
|
|
121
|
-
--recursica_ui-
|
|
123
|
+
--recursica_ui-kit_components_switch-item_properties_text_font-size
|
|
122
124
|
);
|
|
123
125
|
font-weight: var(
|
|
124
|
-
--recursica_ui-
|
|
126
|
+
--recursica_ui-kit_components_switch-item_properties_text_font-weight
|
|
125
127
|
);
|
|
126
128
|
font-style: var(
|
|
127
|
-
--recursica_ui-
|
|
129
|
+
--recursica_ui-kit_components_switch-item_properties_text_font-style
|
|
128
130
|
);
|
|
129
131
|
line-height: var(
|
|
130
|
-
--recursica_ui-
|
|
132
|
+
--recursica_ui-kit_components_switch-item_properties_text_line-height
|
|
131
133
|
);
|
|
132
134
|
letter-spacing: var(
|
|
133
|
-
--recursica_ui-
|
|
135
|
+
--recursica_ui-kit_components_switch-item_properties_text_letter-spacing
|
|
134
136
|
);
|
|
135
137
|
text-transform: var(
|
|
136
|
-
--recursica_ui-
|
|
138
|
+
--recursica_ui-kit_components_switch-item_properties_text_text-transform
|
|
137
139
|
);
|
|
138
140
|
text-decoration: var(
|
|
139
|
-
--recursica_ui-
|
|
141
|
+
--recursica_ui-kit_components_switch-item_properties_text_text-decoration
|
|
140
142
|
);
|
|
143
|
+
color: var(--recursica_ui-kit_components_switch-item_properties_colors_text);
|
|
141
144
|
cursor: inherit;
|
|
142
145
|
}
|
|
143
146
|
|
|
147
|
+
.root:has(input:disabled) .label {
|
|
148
|
+
color: var(
|
|
149
|
+
--recursica_ui-kit_components_switch-item_properties_colors_disabled-text
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
.thumbIconWrapper {
|
|
145
154
|
display: flex;
|
|
146
155
|
align-items: center;
|
|
@@ -152,8 +161,8 @@
|
|
|
152
161
|
|
|
153
162
|
.checkIcon,
|
|
154
163
|
.closeIcon {
|
|
155
|
-
width:
|
|
156
|
-
height:
|
|
164
|
+
width: var(--recursica_ui-kit_components_switch_properties_thumb-icon-size);
|
|
165
|
+
height: var(--recursica_ui-kit_components_switch_properties_thumb-icon-size);
|
|
157
166
|
position: absolute;
|
|
158
167
|
transition:
|
|
159
168
|
opacity 150ms ease,
|
|
@@ -165,7 +174,7 @@
|
|
|
165
174
|
opacity: 0;
|
|
166
175
|
transform: scale(0.5);
|
|
167
176
|
color: var(
|
|
168
|
-
--recursica_ui-
|
|
177
|
+
--recursica_ui-kit_components_switch_properties_colors_icon-selected
|
|
169
178
|
);
|
|
170
179
|
}
|
|
171
180
|
|
|
@@ -173,7 +182,7 @@
|
|
|
173
182
|
opacity: 1;
|
|
174
183
|
transform: scale(1);
|
|
175
184
|
color: var(
|
|
176
|
-
--recursica_ui-
|
|
185
|
+
--recursica_ui-kit_components_switch_properties_colors_icon-unselected
|
|
177
186
|
);
|
|
178
187
|
}
|
|
179
188
|
|
|
@@ -188,12 +197,42 @@
|
|
|
188
197
|
transform: scale(0.5);
|
|
189
198
|
}
|
|
190
199
|
|
|
200
|
+
/* --- GROUP STYLES --- */
|
|
191
201
|
.groupRoot {
|
|
192
202
|
display: flex;
|
|
193
203
|
flex-direction: column;
|
|
194
204
|
align-items: flex-start;
|
|
205
|
+
padding: var(--recursica_ui-kit_components_switch-group_properties_padding);
|
|
206
|
+
gap: var(--recursica_ui-kit_components_switch-group_properties_item-gap);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* SideBySide Variant */
|
|
210
|
+
.groupRoot[data-layout="side-by-side"] {
|
|
211
|
+
flex-direction: column;
|
|
195
212
|
gap: var(
|
|
196
|
-
--recursica_ui-
|
|
197
|
-
|
|
213
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_side-by-side_properties_gutter
|
|
214
|
+
);
|
|
215
|
+
padding-top: var(
|
|
216
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_side-by-side_properties_vertical-padding
|
|
217
|
+
);
|
|
218
|
+
padding-bottom: var(
|
|
219
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_side-by-side_properties_vertical-padding
|
|
220
|
+
);
|
|
221
|
+
margin-top: var(
|
|
222
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
223
|
+
);
|
|
224
|
+
margin-bottom: var(
|
|
225
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Stacked Variant */
|
|
230
|
+
.groupRoot[data-layout="stacked"] {
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
margin-top: var(
|
|
233
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_stacked_properties_label-field-gap
|
|
234
|
+
);
|
|
235
|
+
margin-bottom: var(
|
|
236
|
+
--recursica_ui-kit_components_switch-group_variants_layouts_stacked_properties_top-bottom-margin
|
|
198
237
|
);
|
|
199
238
|
}
|
|
@@ -142,6 +142,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
142
142
|
className={finalClass}
|
|
143
143
|
classNames={mergedClassNames}
|
|
144
144
|
disabled={readOnly || disabled}
|
|
145
|
+
data-disabled={readOnly || disabled || undefined}
|
|
145
146
|
thumbIcon={thumbIcon ?? FinalThumbIcon}
|
|
146
147
|
{...(sanitizedProps as unknown as MantineSwitchProps)}
|
|
147
148
|
/>
|
|
@@ -65,7 +65,7 @@ export const SwitchGroup = forwardRef<HTMLDivElement, SwitchGroupProps>(
|
|
|
65
65
|
<WithReadOnlyWrapper
|
|
66
66
|
className={className}
|
|
67
67
|
style={style as React.CSSProperties}
|
|
68
|
-
controlMaxWidth="var(--recursica_ui-
|
|
68
|
+
controlMaxWidth="var(--recursica_ui-kit_components_switch-item_properties_label-max-width)"
|
|
69
69
|
controlMinWidth={undefined}
|
|
70
70
|
overStyled={overStyled as true}
|
|
71
71
|
labelElement="div" // Strictly override. ARIA grouping prohibits interactive switches nested natively inside <label>.
|
|
@@ -98,15 +98,8 @@ export const SwitchGroup = forwardRef<HTMLDivElement, SwitchGroupProps>(
|
|
|
98
98
|
value={value}
|
|
99
99
|
defaultValue={defaultValue}
|
|
100
100
|
>
|
|
101
|
-
<div className={styles.groupRoot}>
|
|
102
|
-
{
|
|
103
|
-
if (React.isValidElement(child)) {
|
|
104
|
-
return React.cloneElement(child as React.ReactElement<any>, {
|
|
105
|
-
disabled: readOnly || (child.props as any).disabled,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return child;
|
|
109
|
-
})}
|
|
101
|
+
<div className={styles.groupRoot} data-layout={formLayout}>
|
|
102
|
+
{children}
|
|
110
103
|
</div>
|
|
111
104
|
</MantineSwitch.Group>
|
|
112
105
|
}
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
--tabs-vertical-padding: var(
|
|
36
36
|
--recursica_ui-kit_components_tabs_variants_orientation_horizontal_properties_vertical-padding
|
|
37
37
|
);
|
|
38
|
+
--tabs-content-alignment: var(
|
|
39
|
+
--recursica_ui-kit_components_tabs_variants_orientation_horizontal_properties_tab-content-alignment
|
|
40
|
+
);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
.root[data-orientation="horizontal"] .list {
|
|
@@ -59,6 +62,9 @@
|
|
|
59
62
|
--tabs-vertical-padding: var(
|
|
60
63
|
--recursica_ui-kit_components_tabs_variants_orientation_vertical_properties_vertical-padding
|
|
61
64
|
);
|
|
65
|
+
--tabs-content-alignment: var(
|
|
66
|
+
--recursica_ui-kit_components_tabs_variants_orientation_vertical_properties_tab-content-alignment
|
|
67
|
+
);
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
.root[data-orientation="vertical"] .list {
|
|
@@ -85,17 +91,23 @@
|
|
|
85
91
|
--tabs-color: var(
|
|
86
92
|
--recursica_ui-kit_components_tabs_variants_styles_default_properties_active_colors_border-color
|
|
87
93
|
) !important;
|
|
94
|
+
--tabs-hover-color: var(
|
|
95
|
+
--recursica_ui-kit_components_tabs_variants_styles_default_properties_hover-color
|
|
96
|
+
);
|
|
97
|
+
--tabs-hover-opacity: var(
|
|
98
|
+
--recursica_ui-kit_components_tabs_variants_styles_default_properties_hover-opacity
|
|
99
|
+
);
|
|
88
100
|
}
|
|
89
101
|
|
|
90
102
|
.root[data-variant="default"][data-orientation="horizontal"] .list {
|
|
91
103
|
margin-bottom: var(
|
|
92
|
-
--recursica_ui-
|
|
104
|
+
--recursica_ui-kit_components_tabs_variants_styles_default_variants_orientation_horizontal_properties_tabs-content-gap
|
|
93
105
|
);
|
|
94
106
|
}
|
|
95
107
|
|
|
96
108
|
.root[data-variant="default"][data-orientation="vertical"] .list {
|
|
97
109
|
margin-right: var(
|
|
98
|
-
--recursica_ui-
|
|
110
|
+
--recursica_ui-kit_components_tabs_variants_styles_default_variants_orientation_vertical_properties_tabs-content-gap
|
|
99
111
|
);
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -116,17 +128,23 @@
|
|
|
116
128
|
--tabs-color: var(
|
|
117
129
|
--recursica_ui-kit_components_tabs_variants_styles_outline_properties_active_colors_border-color
|
|
118
130
|
) !important;
|
|
131
|
+
--tabs-hover-color: var(
|
|
132
|
+
--recursica_ui-kit_components_tabs_variants_styles_outline_properties_hover-color
|
|
133
|
+
);
|
|
134
|
+
--tabs-hover-opacity: var(
|
|
135
|
+
--recursica_ui-kit_components_tabs_variants_styles_outline_properties_hover-opacity
|
|
136
|
+
);
|
|
119
137
|
}
|
|
120
138
|
|
|
121
139
|
.root[data-variant="outline"][data-orientation="horizontal"] .list {
|
|
122
140
|
margin-bottom: var(
|
|
123
|
-
--recursica_ui-
|
|
141
|
+
--recursica_ui-kit_components_tabs_variants_styles_outline_variants_orientation_horizontal_properties_tabs-content-gap
|
|
124
142
|
);
|
|
125
143
|
}
|
|
126
144
|
|
|
127
145
|
.root[data-variant="outline"][data-orientation="vertical"] .list {
|
|
128
146
|
margin-right: var(
|
|
129
|
-
--recursica_ui-
|
|
147
|
+
--recursica_ui-kit_components_tabs_variants_styles_outline_variants_orientation_vertical_properties_tabs-content-gap
|
|
130
148
|
);
|
|
131
149
|
}
|
|
132
150
|
|
|
@@ -141,17 +159,23 @@
|
|
|
141
159
|
--tabs-border-radius: var(
|
|
142
160
|
--recursica_ui-kit_components_tabs_variants_styles_pills_properties_border-radius
|
|
143
161
|
);
|
|
162
|
+
--tabs-hover-color: var(
|
|
163
|
+
--recursica_ui-kit_components_tabs_variants_styles_pills_properties_hover-color
|
|
164
|
+
);
|
|
165
|
+
--tabs-hover-opacity: var(
|
|
166
|
+
--recursica_ui-kit_components_tabs_variants_styles_pills_properties_hover-opacity
|
|
167
|
+
);
|
|
144
168
|
}
|
|
145
169
|
|
|
146
170
|
.root[data-variant="pills"][data-orientation="horizontal"] .list {
|
|
147
171
|
margin-bottom: var(
|
|
148
|
-
--recursica_ui-
|
|
172
|
+
--recursica_ui-kit_components_tabs_variants_styles_pills_variants_orientation_horizontal_properties_tabs-content-gap
|
|
149
173
|
);
|
|
150
174
|
}
|
|
151
175
|
|
|
152
176
|
.root[data-variant="pills"][data-orientation="vertical"] .list {
|
|
153
177
|
margin-right: var(
|
|
154
|
-
--recursica_ui-
|
|
178
|
+
--recursica_ui-kit_components_tabs_variants_styles_pills_variants_orientation_vertical_properties_tabs-content-gap
|
|
155
179
|
);
|
|
156
180
|
}
|
|
157
181
|
|
|
@@ -165,8 +189,7 @@
|
|
|
165
189
|
gap: var(--tabs-element-gap);
|
|
166
190
|
display: flex;
|
|
167
191
|
align-items: center;
|
|
168
|
-
|
|
169
|
-
justify-content: flex-start;
|
|
192
|
+
justify-content: var(--tabs-content-alignment);
|
|
170
193
|
cursor: pointer;
|
|
171
194
|
position: relative;
|
|
172
195
|
|
|
@@ -386,10 +409,8 @@
|
|
|
386
409
|
position: absolute;
|
|
387
410
|
inset: 0;
|
|
388
411
|
border-radius: inherit;
|
|
389
|
-
background-color: var(
|
|
390
|
-
|
|
391
|
-
);
|
|
392
|
-
opacity: var(--recursica_ui-kit_components_tabs_properties_hover-opacity);
|
|
412
|
+
background-color: var(--tabs-hover-color);
|
|
413
|
+
opacity: var(--tabs-hover-opacity);
|
|
393
414
|
pointer-events: none;
|
|
394
415
|
z-index: 0;
|
|
395
416
|
}
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/* EXEMPTIONS:
|
|
2
|
+
- state-specific border-size variables are ignored because a uniform 1px border is applied globally to prevent
|
|
3
|
+
unexpected layout shift or flickering during focus, disabled, or error state transitions. */
|
|
4
|
+
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_default_properties_border-size */
|
|
5
|
+
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_disabled_properties_border-size */
|
|
6
|
+
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_error_properties_border-size */
|
|
7
|
+
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_focus_properties_border-size */
|
|
8
|
+
|
|
9
|
+
/* LAYOUT SPACING OVERRIDES:
|
|
10
|
+
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens. */
|
|
11
|
+
.layoutOverride {
|
|
12
|
+
--form-control-margin-bottom: var(
|
|
13
|
+
--recursica_ui-kit_components_textarea_variants_layouts_stacked_properties_top-bottom-margin
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.layoutOverride[data-form-layout="side-by-side"] {
|
|
18
|
+
--form-control-margin-bottom: var(
|
|
19
|
+
--recursica_ui-kit_components_textarea_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
/* HARDCODED VALUES:
|
|
2
24
|
- border-width: 1px. Native geometric boundary for the input box.
|
|
3
25
|
- border-style: solid. Native structural rendering rule.
|
|
@@ -9,29 +31,6 @@
|
|
|
9
31
|
display: flex;
|
|
10
32
|
position: relative;
|
|
11
33
|
width: 100%;
|
|
12
|
-
min-height: var(
|
|
13
|
-
--recursica_ui-kit_components_text-field_properties_min-height
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
17
|
-
--input-left-section-size: calc(
|
|
18
|
-
var(--recursica_ui-kit_components_text-field_properties_icon-size) +
|
|
19
|
-
(
|
|
20
|
-
var(
|
|
21
|
-
--recursica_ui-kit_components_text-field_properties_horizontal-padding
|
|
22
|
-
) *
|
|
23
|
-
2
|
|
24
|
-
)
|
|
25
|
-
);
|
|
26
|
-
--input-right-section-size: calc(
|
|
27
|
-
var(--recursica_ui-kit_components_text-field_properties_icon-size) +
|
|
28
|
-
(
|
|
29
|
-
var(
|
|
30
|
-
--recursica_ui-kit_components_text-field_properties_horizontal-padding
|
|
31
|
-
) *
|
|
32
|
-
2
|
|
33
|
-
)
|
|
34
|
-
);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
.input {
|
|
@@ -40,63 +39,69 @@
|
|
|
40
39
|
box-sizing: border-box;
|
|
41
40
|
margin: 0;
|
|
42
41
|
|
|
43
|
-
/*
|
|
44
|
-
min-height:
|
|
45
|
-
--recursica_ui-
|
|
42
|
+
/* Sizing driven by rows token */
|
|
43
|
+
min-height: calc(
|
|
44
|
+
var(--recursica_ui-kit_components_textarea_properties_rows) *
|
|
45
|
+
var(--recursica_ui-kit_components_textarea_properties_text_line-height) +
|
|
46
|
+
2 *
|
|
47
|
+
var(--recursica_ui-kit_components_textarea_properties_vertical-padding) +
|
|
48
|
+
2px
|
|
46
49
|
);
|
|
50
|
+
|
|
51
|
+
/* Box Geometry */
|
|
47
52
|
padding-top: var(
|
|
48
|
-
--recursica_ui-
|
|
53
|
+
--recursica_ui-kit_components_textarea_properties_vertical-padding
|
|
49
54
|
);
|
|
50
55
|
padding-bottom: var(
|
|
51
|
-
--recursica_ui-
|
|
56
|
+
--recursica_ui-kit_components_textarea_properties_vertical-padding
|
|
52
57
|
);
|
|
53
58
|
padding-left: var(
|
|
54
|
-
--recursica_ui-
|
|
59
|
+
--recursica_ui-kit_components_textarea_properties_horizontal-padding
|
|
55
60
|
);
|
|
56
61
|
padding-right: var(
|
|
57
|
-
--recursica_ui-
|
|
62
|
+
--recursica_ui-kit_components_textarea_properties_horizontal-padding
|
|
58
63
|
);
|
|
59
64
|
border-radius: var(
|
|
60
|
-
--recursica_ui-
|
|
65
|
+
--recursica_ui-kit_components_textarea_properties_border-radius
|
|
61
66
|
);
|
|
62
67
|
border-width: 1px;
|
|
63
68
|
border-style: solid;
|
|
64
69
|
|
|
65
70
|
/* Strict Typography Unification */
|
|
66
71
|
font-family: var(
|
|
67
|
-
--recursica_ui-
|
|
72
|
+
--recursica_ui-kit_components_textarea_properties_text_font-family
|
|
68
73
|
);
|
|
69
74
|
font-size: var(
|
|
70
|
-
--recursica_ui-
|
|
75
|
+
--recursica_ui-kit_components_textarea_properties_text_font-size
|
|
71
76
|
);
|
|
72
77
|
font-style: var(
|
|
73
|
-
--recursica_ui-
|
|
78
|
+
--recursica_ui-kit_components_textarea_properties_text_font-style
|
|
74
79
|
);
|
|
75
80
|
font-weight: var(
|
|
76
|
-
--recursica_ui-
|
|
81
|
+
--recursica_ui-kit_components_textarea_properties_text_font-weight
|
|
77
82
|
);
|
|
78
83
|
letter-spacing: var(
|
|
79
|
-
--recursica_ui-
|
|
84
|
+
--recursica_ui-kit_components_textarea_properties_text_letter-spacing
|
|
80
85
|
);
|
|
81
86
|
line-height: var(
|
|
82
|
-
--recursica_ui-
|
|
87
|
+
--recursica_ui-kit_components_textarea_properties_text_line-height
|
|
83
88
|
);
|
|
84
89
|
text-decoration: var(
|
|
85
|
-
--recursica_ui-
|
|
90
|
+
--recursica_ui-kit_components_textarea_properties_text_text-decoration
|
|
86
91
|
);
|
|
87
92
|
text-transform: var(
|
|
88
|
-
--recursica_ui-
|
|
93
|
+
--recursica_ui-kit_components_textarea_properties_text_text-transform
|
|
89
94
|
);
|
|
90
95
|
|
|
91
96
|
/* Base State Default Execution */
|
|
92
97
|
background-color: var(
|
|
93
|
-
--recursica_ui-
|
|
98
|
+
--recursica_ui-kit_components_textarea_variants_states_default_properties_colors_background
|
|
94
99
|
);
|
|
95
100
|
border-color: var(
|
|
96
|
-
--recursica_ui-
|
|
101
|
+
--recursica_ui-kit_components_textarea_variants_states_default_properties_colors_border-color
|
|
97
102
|
);
|
|
98
103
|
color: var(
|
|
99
|
-
--recursica_ui-
|
|
104
|
+
--recursica_ui-kit_components_textarea_variants_states_default_properties_colors_text
|
|
100
105
|
);
|
|
101
106
|
|
|
102
107
|
outline: none;
|
|
@@ -104,119 +109,52 @@
|
|
|
104
109
|
|
|
105
110
|
.input::placeholder {
|
|
106
111
|
opacity: var(
|
|
107
|
-
--recursica_ui-
|
|
112
|
+
--recursica_ui-kit_components_textarea_properties_placeholder-opacity
|
|
108
113
|
);
|
|
109
114
|
color: inherit;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
|
-
/* Dynamic Padding Overrides */
|
|
113
|
-
.root[data-with-left-section] .input {
|
|
114
|
-
padding-left: var(--input-left-section-size);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.root[data-with-right-section] .input {
|
|
118
|
-
padding-right: var(--input-right-section-size);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* Flexible End-Caps (Icons, actions) */
|
|
122
|
-
.section {
|
|
123
|
-
display: flex;
|
|
124
|
-
align-items: center;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
height: 100%;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.section :global(svg) {
|
|
130
|
-
width: var(--recursica_ui-kit_components_text-field_properties_icon-size);
|
|
131
|
-
height: var(--recursica_ui-kit_components_text-field_properties_icon-size);
|
|
132
|
-
color: var(
|
|
133
|
-
--recursica_ui-kit_components_text-field_variants_states_default_properties_colors_leading-icon
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.section[data-position="right"] :global(svg) {
|
|
138
|
-
color: var(
|
|
139
|
-
--recursica_ui-kit_components_text-field_variants_states_default_properties_colors_trailing-icon
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
117
|
/* -------------------------------------
|
|
144
118
|
STATE CASCADE ARCHITECTURE
|
|
145
119
|
-------------------------------------- */
|
|
146
120
|
|
|
147
|
-
/* Focus State Mapping (Triggered internally via browser
|
|
121
|
+
/* Focus State Mapping (Triggered internally via browser focus rules) */
|
|
148
122
|
.input:focus-within,
|
|
149
123
|
.input:focus {
|
|
150
124
|
border-color: var(
|
|
151
|
-
--recursica_ui-
|
|
125
|
+
--recursica_ui-kit_components_textarea_variants_states_focus_properties_colors_border-color
|
|
152
126
|
);
|
|
153
127
|
background-color: var(
|
|
154
|
-
--recursica_ui-
|
|
128
|
+
--recursica_ui-kit_components_textarea_variants_states_focus_properties_colors_background
|
|
155
129
|
);
|
|
156
130
|
color: var(
|
|
157
|
-
--recursica_ui-
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
162
|
-
color: var(
|
|
163
|
-
--recursica_ui-kit_components_text-field_variants_states_focus_properties_colors_leading-icon
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.root:focus-within .section[data-position="right"] :global(svg) {
|
|
168
|
-
color: var(
|
|
169
|
-
--recursica_ui-kit_components_text-field_variants_states_focus_properties_colors_trailing-icon
|
|
131
|
+
--recursica_ui-kit_components_textarea_variants_states_focus_properties_colors_text
|
|
170
132
|
);
|
|
171
133
|
}
|
|
172
134
|
|
|
173
135
|
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
174
136
|
.root[data-error] .input {
|
|
175
137
|
border-color: var(
|
|
176
|
-
--recursica_ui-
|
|
138
|
+
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_border-color
|
|
177
139
|
) !important;
|
|
178
140
|
background-color: var(
|
|
179
|
-
--recursica_ui-
|
|
180
|
-
) !important;
|
|
181
|
-
color: var(
|
|
182
|
-
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_text
|
|
183
|
-
) !important;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.root[data-error] .section[data-position="left"] :global(svg) {
|
|
187
|
-
color: var(
|
|
188
|
-
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_leading-icon
|
|
141
|
+
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_background
|
|
189
142
|
) !important;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.root[data-error] .section[data-position="right"] :global(svg) {
|
|
193
143
|
color: var(
|
|
194
|
-
--recursica_ui-
|
|
144
|
+
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_text
|
|
195
145
|
) !important;
|
|
196
146
|
}
|
|
197
147
|
|
|
198
148
|
/* Disabled State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
199
149
|
.root[data-disabled] .input {
|
|
200
150
|
border-color: var(
|
|
201
|
-
--recursica_ui-
|
|
151
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_border-color
|
|
202
152
|
) !important;
|
|
203
153
|
background-color: var(
|
|
204
|
-
--recursica_ui-
|
|
154
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_background
|
|
205
155
|
) !important;
|
|
206
156
|
color: var(
|
|
207
|
-
--recursica_ui-
|
|
157
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_text
|
|
208
158
|
) !important;
|
|
209
159
|
cursor: not-allowed;
|
|
210
160
|
}
|
|
211
|
-
|
|
212
|
-
.root[data-disabled] .section[data-position="left"] :global(svg) {
|
|
213
|
-
color: var(
|
|
214
|
-
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_leading-icon
|
|
215
|
-
) !important;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.root[data-disabled] .section[data-position="right"] :global(svg) {
|
|
219
|
-
color: var(
|
|
220
|
-
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_trailing-icon
|
|
221
|
-
) !important;
|
|
222
|
-
}
|
|
@@ -98,12 +98,16 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
|
|
|
98
98
|
: styles.input;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
const wrapperClass = className
|
|
102
|
+
? `${styles.layoutOverride} ${className}`
|
|
103
|
+
: styles.layoutOverride;
|
|
104
|
+
|
|
101
105
|
return (
|
|
102
106
|
<WithReadOnlyWrapper
|
|
103
|
-
className={
|
|
107
|
+
className={wrapperClass}
|
|
104
108
|
style={style as React.CSSProperties}
|
|
105
|
-
controlMaxWidth="var(--recursica_ui-
|
|
106
|
-
controlMinWidth="var(--recursica_ui-
|
|
109
|
+
controlMaxWidth="var(--recursica_ui-kit_components_textarea_properties_max-width)"
|
|
110
|
+
controlMinWidth="var(--recursica_ui-kit_components_textarea_properties_min-width)"
|
|
107
111
|
overStyled={overStyled as true}
|
|
108
112
|
formLayout={formLayout}
|
|
109
113
|
labelSize={labelSize}
|