@recursica/mantine-adapter 0.21.0 → 0.23.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 +18 -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 +2017 -1630
- 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 +1 -1
- package/dist/src/components/Card/Card.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.d.ts +8 -2
- 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/Slider/Slider.d.ts +24 -2
- 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/dist/test.html +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 +215 -56
- package/src/components/Button/Button.stories.tsx +27 -0
- package/src/components/Button/Button.tsx +11 -4
- 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_IMPLEMENTATION_NOTES.md +16 -0
- package/src/components/DatePicker/DatePicker.module.css +286 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +127 -4
- package/src/components/DatePicker/DatePicker.tsx +166 -5
- 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 +67 -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/Loader/LOADER_IMPLEMENTATION_NOTES.md +1 -2
- package/src/components/Loader/Loader.module.css +3 -9
- 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/IMPLEMENTATION_NOTES.md +49 -0
- package/src/components/Slider/Slider.module.css +498 -0
- package/src/components/Slider/Slider.stories.tsx +159 -4
- package/src/components/Slider/Slider.tsx +283 -4
- 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 +56 -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
|
@@ -1,12 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
3
|
import { DatePicker } from "./DatePicker";
|
|
3
|
-
import {
|
|
4
|
+
import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof DatePicker> = {
|
|
6
|
-
title: "UI-Kit
|
|
7
|
+
title: "UI-Kit/DatePicker",
|
|
7
8
|
component: DatePicker,
|
|
8
9
|
tags: ["autodocs"],
|
|
9
|
-
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: `
|
|
14
|
+
The \`DatePicker\` primitive provides a unified calendar date selection input integrated directly into the \`FormControlWrapper\` architecture.
|
|
15
|
+
|
|
16
|
+
### Architectural Decoupling
|
|
17
|
+
Recursica overrides the internal Mantine \`DatePickerInput\` wrapper defaults, safely injecting the date picker into our rigid structural layout systems. State modifiers (e.g. Focus, Errors, ReadOnly) hook seamlessly back onto our native CSS mapping architecture.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
Always structure horizontal architectures via the generic \`formLayout\` parameter.
|
|
21
|
+
\`\`\`tsx
|
|
22
|
+
<DatePicker
|
|
23
|
+
label="Start Date"
|
|
24
|
+
assistiveText="Select the deployment kick-off date."
|
|
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
|
+
},
|
|
10
59
|
};
|
|
11
60
|
|
|
12
61
|
export default meta;
|
|
@@ -14,5 +63,79 @@ export default meta;
|
|
|
14
63
|
type Story = StoryObj<typeof DatePicker>;
|
|
15
64
|
|
|
16
65
|
export const Default: Story = {
|
|
17
|
-
|
|
66
|
+
args: {
|
|
67
|
+
disabled: false,
|
|
68
|
+
label: "Project Deadline",
|
|
69
|
+
placeholder: "Select a deadline...",
|
|
70
|
+
assistiveText: "Specify the absolute cutoff for code submission.",
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const FormsSideBySide: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
label: "Incident Start Date",
|
|
77
|
+
placeholder: "Pick date...",
|
|
78
|
+
assistiveText: "When did the incident originally occur?",
|
|
79
|
+
formLayout: "side-by-side",
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const WithLeadingIcon: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
label: "Launch Date",
|
|
86
|
+
placeholder: "Select launch date...",
|
|
87
|
+
leftSection: (
|
|
88
|
+
<svg
|
|
89
|
+
width="24"
|
|
90
|
+
height="24"
|
|
91
|
+
viewBox="0 0 24 24"
|
|
92
|
+
fill="none"
|
|
93
|
+
stroke="currentColor"
|
|
94
|
+
strokeWidth="2"
|
|
95
|
+
strokeLinecap="round"
|
|
96
|
+
strokeLinejoin="round"
|
|
97
|
+
>
|
|
98
|
+
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
|
99
|
+
<line x1="16" y1="2" x2="16" y2="6"></line>
|
|
100
|
+
<line x1="8" y1="2" x2="8" y2="6"></line>
|
|
101
|
+
<line x1="3" y1="10" x2="21" y2="10"></line>
|
|
102
|
+
</svg>
|
|
103
|
+
),
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const Disabled: Story = {
|
|
108
|
+
args: {
|
|
109
|
+
label: "Disabled Date Range",
|
|
110
|
+
placeholder: "Disabled selection...",
|
|
111
|
+
disabled: true,
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ErrorState: Story = {
|
|
116
|
+
args: {
|
|
117
|
+
label: "Execution Date",
|
|
118
|
+
placeholder: "Pick a valid date...",
|
|
119
|
+
error: "The chosen date conflicts with an existing deployment freeze.",
|
|
120
|
+
required: true,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const StaticReadOnly: Story = {
|
|
125
|
+
args: {
|
|
126
|
+
label: "Static ReadOnly Review",
|
|
127
|
+
placeholder: "Ignored...",
|
|
128
|
+
value: new Date("2026-05-21"),
|
|
129
|
+
readOnly: true,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const EditableReadOnly: Story = {
|
|
134
|
+
args: {
|
|
135
|
+
label: "Editable ReadOnly Review",
|
|
136
|
+
placeholder: "Ignored until active...",
|
|
137
|
+
defaultValue: new Date("2026-06-01"),
|
|
138
|
+
readOnly: true,
|
|
139
|
+
labelWithEditIcon: true,
|
|
140
|
+
},
|
|
18
141
|
};
|
|
@@ -1,7 +1,168 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { DatePickerInput, type DatePickerInputProps } from "@mantine/dates";
|
|
3
|
+
import { type ReadOnlyControlProps } from "@recursica/adapter-common";
|
|
4
|
+
import {
|
|
5
|
+
filterStylingProps,
|
|
6
|
+
type RecursicaOverStyled,
|
|
7
|
+
} from "../../utils/filterStylingProps";
|
|
8
|
+
import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/FormControlWrapper";
|
|
9
|
+
import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
|
|
10
|
+
import styles from "./DatePicker.module.css";
|
|
2
11
|
|
|
3
|
-
export
|
|
12
|
+
export interface RecursicaDatePickerProps
|
|
13
|
+
extends Omit<
|
|
14
|
+
DatePickerInputProps,
|
|
15
|
+
| "size"
|
|
16
|
+
| "variant"
|
|
17
|
+
| "radius"
|
|
18
|
+
| "wrapperProps"
|
|
19
|
+
| "label"
|
|
20
|
+
| "error"
|
|
21
|
+
| "required"
|
|
22
|
+
| "withAsterisk"
|
|
23
|
+
| "id"
|
|
24
|
+
| "description"
|
|
25
|
+
>,
|
|
26
|
+
Pick<
|
|
27
|
+
DatePickerInputProps,
|
|
28
|
+
"label" | "error" | "required" | "withAsterisk" | "id"
|
|
29
|
+
>,
|
|
30
|
+
Omit<
|
|
31
|
+
RecursicaFormControlWrapperProps,
|
|
32
|
+
"controlMaxWidth" | "controlMinWidth"
|
|
33
|
+
>,
|
|
34
|
+
ReadOnlyControlProps {}
|
|
4
35
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
36
|
+
export type DatePickerProps = RecursicaOverStyled<RecursicaDatePickerProps>;
|
|
37
|
+
|
|
38
|
+
export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(
|
|
39
|
+
function DatePicker(props, ref) {
|
|
40
|
+
const {
|
|
41
|
+
overStyled = false,
|
|
42
|
+
formLayout = "stacked",
|
|
43
|
+
|
|
44
|
+
// Label & Wrapper Maps
|
|
45
|
+
labelSize,
|
|
46
|
+
labelAlignment,
|
|
47
|
+
labelOptionalText,
|
|
48
|
+
labelWithEditIcon,
|
|
49
|
+
onLabelEditClick,
|
|
50
|
+
|
|
51
|
+
label,
|
|
52
|
+
assistiveText,
|
|
53
|
+
assistiveWithIcon,
|
|
54
|
+
error,
|
|
55
|
+
required,
|
|
56
|
+
withAsterisk,
|
|
57
|
+
id,
|
|
58
|
+
className,
|
|
59
|
+
style,
|
|
60
|
+
disabled,
|
|
61
|
+
readOnly,
|
|
62
|
+
readOnlyComponent,
|
|
63
|
+
emptyValueComponent,
|
|
64
|
+
value,
|
|
65
|
+
defaultValue,
|
|
66
|
+
...rest
|
|
67
|
+
} = props;
|
|
68
|
+
|
|
69
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
70
|
+
const restRecord = sanitizedProps as Record<string, unknown>;
|
|
71
|
+
|
|
72
|
+
// Delete prohibited sizing hooks from bypassing variables natively
|
|
73
|
+
delete restRecord["size"];
|
|
74
|
+
delete restRecord["variant"];
|
|
75
|
+
delete restRecord["radius"];
|
|
76
|
+
delete restRecord["description"]; // Managed by FormControlWrapper via assistiveText
|
|
77
|
+
|
|
78
|
+
// Securely map core native blocks down ensuring nested CSS modules map precisely
|
|
79
|
+
const mergedClassNames: Partial<Record<string, string>> = {
|
|
80
|
+
wrapper: styles.root, // The nested Input internal relative wrapper bounding box
|
|
81
|
+
input: styles.input,
|
|
82
|
+
section: styles.section,
|
|
83
|
+
dropdown: styles.dropdown,
|
|
84
|
+
day: styles.day,
|
|
85
|
+
calendarHeader: styles.calendarHeader,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const classNamesProp = restRecord.classNames;
|
|
89
|
+
if (
|
|
90
|
+
classNamesProp &&
|
|
91
|
+
typeof classNamesProp === "object" &&
|
|
92
|
+
!Array.isArray(classNamesProp)
|
|
93
|
+
) {
|
|
94
|
+
const o = classNamesProp as Partial<Record<string, string>>;
|
|
95
|
+
mergedClassNames.wrapper = o.wrapper
|
|
96
|
+
? `${styles.root} ${o.wrapper}`
|
|
97
|
+
: styles.root;
|
|
98
|
+
mergedClassNames.input = o.input
|
|
99
|
+
? `${styles.input} ${o.input}`
|
|
100
|
+
: styles.input;
|
|
101
|
+
mergedClassNames.section = o.section
|
|
102
|
+
? `${styles.section} ${o.section}`
|
|
103
|
+
: styles.section;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const wrapperClass = className
|
|
107
|
+
? `${styles.layoutOverride} ${className}`
|
|
108
|
+
: styles.layoutOverride;
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<WithReadOnlyWrapper
|
|
112
|
+
className={wrapperClass}
|
|
113
|
+
style={style as React.CSSProperties}
|
|
114
|
+
controlMaxWidth={undefined}
|
|
115
|
+
controlMinWidth={undefined}
|
|
116
|
+
overStyled={overStyled as true}
|
|
117
|
+
formLayout={formLayout}
|
|
118
|
+
labelSize={labelSize}
|
|
119
|
+
labelAlignment={labelAlignment}
|
|
120
|
+
labelOptionalText={labelOptionalText}
|
|
121
|
+
labelWithEditIcon={labelWithEditIcon}
|
|
122
|
+
onLabelEditClick={onLabelEditClick}
|
|
123
|
+
label={label}
|
|
124
|
+
assistiveText={assistiveText}
|
|
125
|
+
assistiveWithIcon={assistiveWithIcon}
|
|
126
|
+
error={error}
|
|
127
|
+
required={required}
|
|
128
|
+
withAsterisk={withAsterisk}
|
|
129
|
+
id={id}
|
|
130
|
+
readOnly={readOnly}
|
|
131
|
+
readOnlyComponent={readOnlyComponent}
|
|
132
|
+
emptyValueComponent={emptyValueComponent}
|
|
133
|
+
readOnlyType="text"
|
|
134
|
+
readOnlyValue={
|
|
135
|
+
value !== undefined
|
|
136
|
+
? String(value)
|
|
137
|
+
: defaultValue
|
|
138
|
+
? String(defaultValue)
|
|
139
|
+
: undefined
|
|
140
|
+
}
|
|
141
|
+
readOnlyNativeProps={props}
|
|
142
|
+
activeComponent={
|
|
143
|
+
/* Naked Input execution safely decoupled from Mantine's macro Input.Wrapper DOM hooks */
|
|
144
|
+
<DatePickerInput
|
|
145
|
+
ref={ref}
|
|
146
|
+
classNames={mergedClassNames}
|
|
147
|
+
disabled={disabled}
|
|
148
|
+
// @ts-expect-error Mantine 8 DatePickerInput types are overly complex for unified wrappers
|
|
149
|
+
value={value}
|
|
150
|
+
// @ts-expect-error Mantine 8 DatePickerInput types are overly complex for unified wrappers
|
|
151
|
+
defaultValue={defaultValue}
|
|
152
|
+
label={undefined} // Disable Mantine's native label
|
|
153
|
+
description={undefined} // Disable Mantine's native description
|
|
154
|
+
error={undefined} // Disable Mantine's native error text (handled by wrapper)
|
|
155
|
+
withAsterisk={false} // Handled by wrapper
|
|
156
|
+
wrapperProps={{
|
|
157
|
+
"data-disabled": disabled ? "true" : undefined,
|
|
158
|
+
"data-error": error ? "true" : undefined,
|
|
159
|
+
}}
|
|
160
|
+
{...(sanitizedProps as unknown as DatePickerInputProps)}
|
|
161
|
+
/>
|
|
162
|
+
}
|
|
163
|
+
/>
|
|
164
|
+
);
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
DatePicker.displayName = "DatePicker";
|
|
@@ -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_dropdown_variants_states_default_properties_border-size */
|
|
5
|
+
/* recursica-ignore: --recursica_ui-kit_components_dropdown_variants_states_disabled_properties_border-size */
|
|
6
|
+
/* recursica-ignore: --recursica_ui-kit_components_dropdown_variants_states_error_properties_border-size */
|
|
7
|
+
/* recursica-ignore: --recursica_ui-kit_components_dropdown_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_dropdown_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_dropdown_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.
|
|
@@ -14,22 +36,14 @@
|
|
|
14
36
|
|
|
15
37
|
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
16
38
|
--input-left-section-size: calc(
|
|
17
|
-
var(--recursica_ui-
|
|
18
|
-
(
|
|
19
|
-
|
|
20
|
-
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
21
|
-
) *
|
|
22
|
-
2
|
|
23
|
-
)
|
|
39
|
+
var(--recursica_ui-kit_components_dropdown_properties_horizontal-padding) +
|
|
40
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
41
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-text-gap)
|
|
24
42
|
);
|
|
25
43
|
--input-right-section-size: calc(
|
|
26
|
-
var(--recursica_ui-
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
30
|
-
) *
|
|
31
|
-
2
|
|
32
|
-
)
|
|
44
|
+
var(--recursica_ui-kit_components_dropdown_properties_horizontal-padding) +
|
|
45
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
46
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-text-gap)
|
|
33
47
|
);
|
|
34
48
|
}
|
|
35
49
|
|
|
@@ -118,10 +132,23 @@
|
|
|
118
132
|
.section {
|
|
119
133
|
display: flex;
|
|
120
134
|
align-items: center;
|
|
121
|
-
justify-content: center;
|
|
122
135
|
height: 100%;
|
|
123
136
|
}
|
|
124
137
|
|
|
138
|
+
.section[data-position="left"] {
|
|
139
|
+
justify-content: flex-start;
|
|
140
|
+
padding-left: var(
|
|
141
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.section[data-position="right"] {
|
|
146
|
+
justify-content: flex-end;
|
|
147
|
+
padding-right: var(
|
|
148
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
125
152
|
.section :global(svg) {
|
|
126
153
|
width: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
127
154
|
height: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
@@ -113,9 +113,13 @@ export const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
113
113
|
width: containerWidth || "100%",
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
const wrapperClass = className
|
|
117
|
+
? `${styles.layoutOverride} ${className}`
|
|
118
|
+
: styles.layoutOverride;
|
|
119
|
+
|
|
116
120
|
return (
|
|
117
121
|
<WithReadOnlyWrapper
|
|
118
|
-
className={
|
|
122
|
+
className={wrapperClass}
|
|
119
123
|
style={injectedStyles}
|
|
120
124
|
controlMaxWidth="var(--recursica_ui-kit_components_dropdown_properties_max-width)"
|
|
121
125
|
controlMinWidth="var(--recursica_ui-kit_components_dropdown_properties_min-width)"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* EXEMPTIONS:
|
|
3
|
+
* - FileInput is a "Coming Soon" stub component.
|
|
4
|
+
* - It renders a placeholder and has no active implementation or CSS stylesheet yet.
|
|
5
|
+
* - The following tokens generated by Figma are ignored until the component is fully built.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_border-radius */
|
|
9
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_horizontal-padding */
|
|
10
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_icon-size */
|
|
11
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_icon-text-gap */
|
|
12
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_max-width */
|
|
13
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_min-height */
|
|
14
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_min-width */
|
|
15
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_placeholder-opacity */
|
|
16
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_font-family */
|
|
17
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_font-size */
|
|
18
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_font-style */
|
|
19
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_font-weight */
|
|
20
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_letter-spacing */
|
|
21
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_line-height */
|
|
22
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_text-decoration */
|
|
23
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_text_text-transform */
|
|
24
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_properties_vertical-padding */
|
|
25
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_layouts_side-by-side_properties_top-bottom-margin */
|
|
26
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_layouts_stacked_properties_top-bottom-margin */
|
|
27
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_border-size */
|
|
28
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_border-size */
|
|
29
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_border-size */
|
|
30
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_border-size */
|
|
31
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_colors_background */
|
|
32
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_colors_border-color */
|
|
33
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_colors_leading-icon */
|
|
34
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_colors_text */
|
|
35
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_default_properties_colors_trailing-icon */
|
|
36
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_colors_background */
|
|
37
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_colors_border-color */
|
|
38
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_colors_leading-icon */
|
|
39
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_colors_text */
|
|
40
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_disabled_properties_colors_trailing-icon */
|
|
41
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_colors_background */
|
|
42
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_colors_border-color */
|
|
43
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_colors_leading-icon */
|
|
44
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_colors_text */
|
|
45
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_error_properties_colors_trailing-icon */
|
|
46
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_colors_background */
|
|
47
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_colors_border-color */
|
|
48
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_colors_leading-icon */
|
|
49
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_colors_text */
|
|
50
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-input_variants_states_focus_properties_colors_trailing-icon */
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* EXEMPTIONS:
|
|
3
|
+
* - FileUpload is a "Coming Soon" stub component.
|
|
4
|
+
* - It renders a placeholder and has no active implementation or CSS stylesheet yet.
|
|
5
|
+
* - The following tokens generated by Figma are ignored until the component is fully built.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_border-radius */
|
|
9
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_border-style */
|
|
10
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_item-gap */
|
|
11
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_list-spacing */
|
|
12
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_padding */
|
|
13
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_font-family */
|
|
14
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_font-size */
|
|
15
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_font-style */
|
|
16
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_font-weight */
|
|
17
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_letter-spacing */
|
|
18
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_line-height */
|
|
19
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_text-decoration */
|
|
20
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_text_text-transform */
|
|
21
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_properties_vertical-element-gap */
|
|
22
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_layouts_side-by-side_properties_top-bottom-margin */
|
|
23
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_layouts_stacked_properties_top-bottom-margin */
|
|
24
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_default_properties_border-size */
|
|
25
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_disabled_properties_border-size */
|
|
26
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_error_properties_border-size */
|
|
27
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_focus_properties_border-size */
|
|
28
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_default_properties_colors_background */
|
|
29
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_default_properties_colors_border-color */
|
|
30
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_default_properties_colors_text */
|
|
31
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_default_properties_colors_upload-icon */
|
|
32
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_disabled_properties_colors_background */
|
|
33
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_disabled_properties_colors_border-color */
|
|
34
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_disabled_properties_colors_text */
|
|
35
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_disabled_properties_colors_upload-icon */
|
|
36
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_error_properties_colors_background */
|
|
37
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_error_properties_colors_border-color */
|
|
38
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_error_properties_colors_text */
|
|
39
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_error_properties_colors_upload-icon */
|
|
40
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_focus_properties_colors_background */
|
|
41
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_focus_properties_colors_border-color */
|
|
42
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_focus_properties_colors_text */
|
|
43
|
+
/* recursica-ignore: --recursica_ui-kit_components_file-upload_variants_states_focus_properties_colors_upload-icon */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
.root {
|
|
4
4
|
display: flex;
|
|
5
5
|
margin: 0; /* Hardcoded structural reset */
|
|
6
|
+
margin-bottom: var(
|
|
7
|
+
--form-control-margin-bottom,
|
|
8
|
+
var(--recursica_ui-kit_globals_form_properties_vertical-item-gap, 0)
|
|
9
|
+
);
|
|
6
10
|
padding: 0; /* Hardcoded structural reset */
|
|
7
11
|
max-width: var(--form-control-max-width, 100%);
|
|
8
12
|
min-width: var(--form-control-min-width, auto);
|
|
@@ -31,7 +35,10 @@
|
|
|
31
35
|
.root[data-form-layout="stacked"] .leftSection {
|
|
32
36
|
padding-bottom: var(
|
|
33
37
|
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_bottom-padding,
|
|
34
|
-
|
|
38
|
+
var(
|
|
39
|
+
--recursica_ui-kit_globals_form_properties_label-field-gap-vertical,
|
|
40
|
+
8px
|
|
41
|
+
)
|
|
35
42
|
);
|
|
36
43
|
min-height: var(
|
|
37
44
|
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_min-height,
|
|
@@ -56,7 +63,10 @@
|
|
|
56
63
|
/* In side-by-side, the label column exists to the left of its input, so we use the gutter gap here. */
|
|
57
64
|
margin-right: var(
|
|
58
65
|
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_gutter,
|
|
59
|
-
|
|
66
|
+
var(
|
|
67
|
+
--recursica_ui-kit_globals_form_properties_label-field-gap-horizontal,
|
|
68
|
+
16px
|
|
69
|
+
)
|
|
60
70
|
);
|
|
61
71
|
}
|
|
62
72
|
|
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
/* FormControlWrapper.module.css */
|
|
2
2
|
|
|
3
|
+
.root {
|
|
4
|
+
/* Global Form Field Colors */
|
|
5
|
+
--form-field-background: var(
|
|
6
|
+
--recursica_ui-kit_globals_form_field_colors_background
|
|
7
|
+
);
|
|
8
|
+
--form-field-background-read-only: var(
|
|
9
|
+
--recursica_ui-kit_globals_form_field_colors_background-read-only
|
|
10
|
+
);
|
|
11
|
+
--form-field-border: var(--recursica_ui-kit_globals_form_field_colors_border);
|
|
12
|
+
--form-field-border-error: var(
|
|
13
|
+
--recursica_ui-kit_globals_form_field_colors_border-error
|
|
14
|
+
);
|
|
15
|
+
--form-field-border-focus: var(
|
|
16
|
+
--recursica_ui-kit_globals_form_field_colors_border-focus
|
|
17
|
+
);
|
|
18
|
+
--form-field-border-selected: var(
|
|
19
|
+
--recursica_ui-kit_globals_form_field_colors_border-selected
|
|
20
|
+
);
|
|
21
|
+
--form-field-disabled-background: var(
|
|
22
|
+
--recursica_ui-kit_globals_form_field_colors_disabled-background
|
|
23
|
+
);
|
|
24
|
+
--form-field-disabled-text: var(
|
|
25
|
+
--recursica_ui-kit_globals_form_field_colors_disabled-text
|
|
26
|
+
);
|
|
27
|
+
--form-field-icon: var(--recursica_ui-kit_globals_form_field_colors_icon);
|
|
28
|
+
--form-field-placeholder-text-opacity: var(
|
|
29
|
+
--recursica_ui-kit_globals_form_field_colors_placeholder-text-opacity
|
|
30
|
+
);
|
|
31
|
+
--form-field-text-valued: var(
|
|
32
|
+
--recursica_ui-kit_globals_form_field_colors_text-valued
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/* Global Form Field Geometric Sizes */
|
|
36
|
+
--form-field-border-radius: var(
|
|
37
|
+
--recursica_ui-kit_globals_form_field_size_border-radius
|
|
38
|
+
);
|
|
39
|
+
--form-field-border-size-default: var(
|
|
40
|
+
--recursica_ui-kit_globals_form_field_size_border-size-default
|
|
41
|
+
);
|
|
42
|
+
--form-field-border-size-focus: var(
|
|
43
|
+
--recursica_ui-kit_globals_form_field_size_border-size-focus
|
|
44
|
+
);
|
|
45
|
+
--form-field-horizontal-padding: var(
|
|
46
|
+
--recursica_ui-kit_globals_form_field_size_horizontal-padding
|
|
47
|
+
);
|
|
48
|
+
--form-field-icon-size: var(--recursica_ui-kit_globals_form_field_size_icon);
|
|
49
|
+
--form-field-icon-text-gap: var(
|
|
50
|
+
--recursica_ui-kit_globals_form_field_size_icon-text-gap
|
|
51
|
+
);
|
|
52
|
+
--form-field-max-width: var(
|
|
53
|
+
--recursica_ui-kit_globals_form_field_size_max-width
|
|
54
|
+
);
|
|
55
|
+
--form-field-min-width: var(
|
|
56
|
+
--recursica_ui-kit_globals_form_field_size_min-width
|
|
57
|
+
);
|
|
58
|
+
--form-field-single-line-input-height: var(
|
|
59
|
+
--recursica_ui-kit_globals_form_field_size_single-line-input-height
|
|
60
|
+
);
|
|
61
|
+
--form-field-vertical-gutter: var(
|
|
62
|
+
--recursica_ui-kit_globals_form_field_size_vertical-gutter
|
|
63
|
+
);
|
|
64
|
+
--form-field-vertical-padding: var(
|
|
65
|
+
--recursica_ui-kit_globals_form_field_size_vertical-padding
|
|
66
|
+
);
|
|
67
|
+
color: var(--form-field-text-valued);
|
|
68
|
+
}
|
|
69
|
+
|
|
3
70
|
.inputSection {
|
|
4
71
|
display: flex;
|
|
5
72
|
flex-direction: column;
|
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
the Recursica beak-size token (16px). See COMPONENT_ISSUES.md for details.
|
|
7
7
|
- All structural layout (display, position, overflow) is deferred to Mantine's native
|
|
8
8
|
behavior. We only override visual design tokens (colors, typography, spacing, borders).
|
|
9
|
-
|
|
9
|
+
/* EXEMPTIONS:
|
|
10
|
+
- beak-size is ignored here because Mantine's popover arrows compute their sizing and positional offsets
|
|
11
|
+
dynamically within the React rendering engine (requires inline pixel number rather than standard CSS variables).
|
|
12
|
+
The beak size is checked in JS against a fixed value of 16px. If this variable changes, the TSX components
|
|
13
|
+
need to be reviewed/re-compiled. */
|
|
14
|
+
/* recursica-ignore: --recursica_ui-kit_components_hover-card-popover_properties_beak-size = 16px */
|
|
10
15
|
|
|
11
16
|
/* ======================================
|
|
12
17
|
DROPDOWN CONTAINER
|
|
@@ -14,14 +19,14 @@
|
|
|
14
19
|
|
|
15
20
|
.dropdown {
|
|
16
21
|
background-color: var(
|
|
17
|
-
--recursica_ui-kit_components_hover-card-
|
|
22
|
+
--recursica_ui-kit_components_hover-card-popover_properties_colors_background
|
|
18
23
|
);
|
|
19
24
|
border-style: solid; /* HARDCODE: Mantine Paper does not set border-style natively */
|
|
20
25
|
border-width: var(
|
|
21
26
|
--recursica_ui-kit_components_hover-card-popover_properties_border-size
|
|
22
27
|
);
|
|
23
28
|
border-color: var(
|
|
24
|
-
--recursica_ui-kit_components_hover-card-
|
|
29
|
+
--recursica_ui-kit_components_hover-card-popover_properties_colors_border-color
|
|
25
30
|
);
|
|
26
31
|
border-radius: var(
|
|
27
32
|
--recursica_ui-kit_components_hover-card-popover_properties_border-radius
|
|
@@ -70,7 +75,9 @@
|
|
|
70
75
|
--recursica_ui-kit_components_hover-card-popover_properties_content-text_text-transform
|
|
71
76
|
);
|
|
72
77
|
|
|
73
|
-
color: var(
|
|
78
|
+
color: var(
|
|
79
|
+
--recursica_ui-kit_components_hover-card-popover_properties_colors_content
|
|
80
|
+
);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
/* ======================================
|
|
@@ -79,6 +86,6 @@
|
|
|
79
86
|
|
|
80
87
|
.arrow {
|
|
81
88
|
border-color: var(
|
|
82
|
-
--recursica_ui-kit_components_hover-card-
|
|
89
|
+
--recursica_ui-kit_components_hover-card-popover_properties_colors_border-color
|
|
83
90
|
);
|
|
84
91
|
}
|