@recursica/mui-adapter 0.5.0 → 0.7.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/ARCHITECTURE.md +15 -0
- package/CHANGELOG.md +15 -0
- package/SETUP.md +77 -0
- package/USAGE.md +55 -0
- package/dist/mui-adapter.cjs +74 -1
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +6863 -205
- package/dist/mui-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +43 -2
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +6 -2
- package/dist/src/components/Autocomplete/Autocomplete.d.ts +12 -2
- package/dist/src/components/Avatar/Avatar.d.ts +10 -3
- package/dist/src/components/Badge/Badge.d.ts +10 -3
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +9 -3
- package/dist/src/components/Button/Button.d.ts +2 -17
- package/dist/src/components/Card/Card.d.ts +38 -3
- package/dist/src/components/Checkbox/Checkbox.d.ts +13 -2
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +18 -0
- package/dist/src/components/Checkbox/index.d.ts +5 -1
- package/dist/src/components/Chip/Chip.d.ts +9 -2
- package/dist/src/components/Container/Container.d.ts +1 -5
- package/dist/src/components/DatePicker/DatePicker.d.ts +2 -1
- package/dist/src/components/Dropdown/Dropdown.d.ts +12 -2
- package/dist/src/components/Flex/Flex.d.ts +2 -22
- package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +5 -2
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +9 -2
- package/dist/src/components/Group/Group.d.ts +2 -7
- package/dist/src/components/HoverCard/HoverCard.d.ts +28 -2
- package/dist/src/components/Label/Label.d.ts +6 -2
- package/dist/src/components/Link/Link.d.ts +2 -6
- package/dist/src/components/Loader/Loader.d.ts +2 -7
- package/dist/src/components/Menu/Menu.d.ts +25 -3
- package/dist/src/components/Modal/Modal.d.ts +37 -2
- package/dist/src/components/NumberInput/NumberInput.d.ts +12 -2
- package/dist/src/components/Pagination/Pagination.d.ts +12 -3
- package/dist/src/components/Pagination/Pagination.icons.d.ts +8 -0
- package/dist/src/components/Panel/Panel.d.ts +52 -3
- package/dist/src/components/Radio/Radio.d.ts +13 -3
- package/dist/src/components/Radio/RadioGroup.d.ts +9 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyBooleanField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +4 -2
- package/dist/src/components/ReadOnlyField/ReadOnlySwitchField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyTextField.d.ts +8 -0
- package/dist/src/components/ReadOnlyField/WithReadOnlyWrapper.d.ts +28 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +21 -3
- package/dist/src/components/Slider/Slider.d.ts +18 -2
- package/dist/src/components/Stack/Stack.d.ts +2 -5
- package/dist/src/components/Stepper/Stepper.d.ts +41 -2
- package/dist/src/components/Switch/Switch.d.ts +10 -3
- package/dist/src/components/Switch/SwitchGroup.d.ts +13 -0
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/components/Tabs/Tabs.d.ts +20 -3
- package/dist/src/components/Text/Text.d.ts +2 -16
- package/dist/src/components/TextArea/TextArea.d.ts +12 -2
- package/dist/src/components/TextField/TextField.d.ts +12 -2
- package/dist/src/components/TimePicker/TimePicker.d.ts +2 -1
- package/dist/src/components/Timeline/Timeline.d.ts +15 -2
- package/dist/src/components/Timeline/TimelineItem.d.ts +18 -0
- package/dist/src/components/Title/Title.d.ts +2 -15
- package/dist/src/components/Toast/Toast.d.ts +20 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +28 -3
- package/dist/src/components/TransferList/TransferList.d.ts +2 -1
- package/dist/src/components/Typography/Typography.d.ts +1 -1
- package/dist/src/utils/RequireAccessibleLabel.d.ts +1 -18
- package/dist/src/utils/filterStylingProps.d.ts +1 -11
- package/llms.txt +16 -0
- package/package.json +14 -3
- package/src/components/Accordion/Accordion.module.css +294 -56
- package/src/components/Accordion/Accordion.stories.tsx +131 -21
- package/src/components/Accordion/Accordion.tsx +260 -5
- package/src/components/AssistiveElement/AssistiveElement.module.css +114 -20
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +60 -20
- package/src/components/AssistiveElement/AssistiveElement.tsx +81 -5
- package/src/components/Autocomplete/Autocomplete.module.css +319 -42
- package/src/components/Autocomplete/Autocomplete.stories.tsx +175 -23
- package/src/components/Autocomplete/Autocomplete.tsx +181 -6
- package/src/components/Avatar/Avatar.module.css +343 -73
- package/src/components/Avatar/Avatar.stories.tsx +94 -22
- package/src/components/Avatar/Avatar.tsx +99 -6
- package/src/components/Badge/Badge.module.css +127 -29
- package/src/components/Badge/Badge.stories.tsx +65 -22
- package/src/components/Badge/Badge.tsx +67 -6
- package/src/components/Breadcrumb/Breadcrumb.module.css +25 -5
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +57 -22
- package/src/components/Breadcrumb/Breadcrumb.tsx +59 -6
- package/src/components/Button/Button.module.css +19 -61
- package/src/components/Button/Button.stories.tsx +24 -23
- package/src/components/Button/Button.tsx +7 -18
- package/src/components/Card/Card.module.css +154 -38
- package/src/components/Card/Card.stories.tsx +117 -19
- package/src/components/Card/Card.tsx +181 -5
- package/src/components/Checkbox/Checkbox.module.css +249 -39
- package/src/components/Checkbox/Checkbox.stories.tsx +81 -19
- package/src/components/Checkbox/Checkbox.tsx +246 -5
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +139 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +137 -0
- package/src/components/Checkbox/index.ts +6 -1
- package/src/components/Chip/Chip.module.css +246 -43
- package/src/components/Chip/Chip.stories.tsx +101 -21
- package/src/components/Chip/Chip.tsx +136 -6
- package/src/components/Container/Container.stories.tsx +103 -20
- package/src/components/Container/Container.tsx +1 -13
- package/src/components/DatePicker/DatePicker.stories.tsx +125 -19
- package/src/components/DatePicker/DatePicker.tsx +3 -1
- package/src/components/Dropdown/Dropdown.module.css +291 -41
- package/src/components/Dropdown/Dropdown.stories.tsx +80 -21
- package/src/components/Dropdown/Dropdown.tsx +180 -6
- package/src/components/FileInput/FileInput.stories.tsx +2 -19
- package/src/components/FileUpload/FileUpload.stories.tsx +2 -19
- package/src/components/Flex/Flex.stories.tsx +113 -20
- package/src/components/Flex/Flex.tsx +16 -26
- package/src/components/FormControlLayout/FormControlLayout.module.css +92 -0
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +67 -20
- package/src/components/FormControlLayout/FormControlLayout.tsx +69 -4
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +87 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +116 -22
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +126 -6
- package/src/components/Group/Group.stories.tsx +6 -30
- package/src/components/Group/Group.tsx +14 -9
- package/src/components/HoverCard/HoverCard.module.css +90 -22
- package/src/components/HoverCard/HoverCard.stories.tsx +158 -21
- package/src/components/HoverCard/HoverCard.tsx +147 -5
- package/src/components/Label/Label.module.css +140 -35
- package/src/components/Label/Label.stories.tsx +108 -21
- package/src/components/Label/Label.tsx +82 -5
- package/src/components/Link/Link.module.css +4 -3
- package/src/components/Link/Link.stories.tsx +2 -8
- package/src/components/Link/Link.tsx +1 -5
- package/src/components/Loader/Loader.module.css +1 -2
- package/src/components/Loader/Loader.tsx +1 -7
- package/src/components/Menu/IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Menu/Menu.module.css +285 -51
- package/src/components/Menu/Menu.stories.tsx +229 -25
- package/src/components/Menu/Menu.tsx +73 -6
- package/src/components/Modal/Modal.module.css +171 -35
- package/src/components/Modal/Modal.stories.tsx +66 -22
- package/src/components/Modal/Modal.tsx +215 -5
- package/src/components/NumberInput/NumberInput.module.css +276 -42
- package/src/components/NumberInput/NumberInput.stories.tsx +83 -20
- package/src/components/NumberInput/NumberInput.tsx +136 -6
- package/src/components/Pagination/IMPLEMENTATION_NOTES.md +3 -0
- package/src/components/Pagination/Pagination.icons.tsx +66 -0
- package/src/components/Pagination/Pagination.module.css +234 -20
- package/src/components/Pagination/Pagination.stories.tsx +34 -21
- package/src/components/Pagination/Pagination.tsx +74 -6
- package/src/components/Panel/Panel.module.css +206 -38
- package/src/components/Panel/Panel.stories.tsx +214 -22
- package/src/components/Panel/Panel.tsx +130 -5
- package/src/components/Radio/Radio.module.css +235 -37
- package/src/components/Radio/Radio.stories.tsx +77 -19
- package/src/components/Radio/Radio.tsx +210 -5
- package/src/components/Radio/RadioGroup.stories.tsx +117 -0
- package/src/components/Radio/RadioGroup.tsx +125 -0
- package/src/components/ReadOnlyField/ReadOnlyBooleanField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +53 -15
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +147 -19
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +105 -5
- package/src/components/ReadOnlyField/ReadOnlySwitchField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +48 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +93 -0
- package/src/components/ReadOnlyField/index.ts +1 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +179 -47
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +102 -20
- package/src/components/SegmentedControl/SegmentedControl.tsx +140 -6
- package/src/components/Slider/Slider.module.css +539 -86
- package/src/components/Slider/Slider.stories.tsx +157 -19
- package/src/components/Slider/Slider.tsx +283 -5
- package/src/components/Stack/Stack.stories.tsx +4 -25
- package/src/components/Stack/Stack.tsx +1 -5
- package/src/components/Stepper/IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Stepper/Stepper.module.css +410 -71
- package/src/components/Stepper/Stepper.stories.tsx +146 -20
- package/src/components/Stepper/Stepper.tsx +147 -6
- package/src/components/Switch/Switch.module.css +259 -39
- package/src/components/Switch/Switch.stories.tsx +98 -19
- package/src/components/Switch/Switch.tsx +200 -6
- package/src/components/Switch/SwitchGroup.stories.tsx +132 -0
- package/src/components/Switch/SwitchGroup.tsx +120 -0
- package/src/components/Table/Table.stories.tsx +1 -19
- package/src/components/Table/Table.tsx +3 -1
- package/src/components/Tabs/IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Tabs/Tabs.module.css +422 -79
- package/src/components/Tabs/Tabs.stories.tsx +156 -20
- package/src/components/Tabs/Tabs.tsx +86 -6
- package/src/components/Text/Text.stories.tsx +5 -17
- package/src/components/Text/Text.tsx +1 -15
- package/src/components/TextArea/TextArea.module.css +155 -32
- package/src/components/TextArea/TextArea.stories.tsx +80 -21
- package/src/components/TextArea/TextArea.tsx +146 -6
- package/src/components/TextField/TextField.module.css +261 -42
- package/src/components/TextField/TextField.stories.tsx +147 -20
- package/src/components/TextField/TextField.tsx +169 -6
- package/src/components/TimePicker/TimePicker.stories.tsx +2 -19
- package/src/components/TimePicker/TimePicker.tsx +3 -1
- package/src/components/Timeline/Timeline.module.css +365 -76
- package/src/components/Timeline/Timeline.stories.tsx +114 -21
- package/src/components/Timeline/Timeline.tsx +83 -5
- package/src/components/Timeline/TimelineItem.tsx +90 -0
- package/src/components/Title/Title.stories.tsx +0 -18
- package/src/components/Title/Title.tsx +1 -7
- package/src/components/Toast/Toast.module.css +166 -28
- package/src/components/Toast/Toast.stories.tsx +54 -22
- package/src/components/Toast/Toast.tsx +124 -5
- package/src/components/Tooltip/Tooltip.module.css +89 -24
- package/src/components/Tooltip/Tooltip.stories.tsx +152 -22
- package/src/components/Tooltip/Tooltip.tsx +88 -5
- package/src/components/TransferList/TransferList.stories.tsx +1 -19
- package/src/components/TransferList/TransferList.tsx +3 -1
- package/src/utils/RequireAccessibleLabel.ts +1 -12
- package/src/utils/filterStylingProps.ts +7 -20
|
@@ -1,47 +1,324 @@
|
|
|
1
1
|
/* EXEMPTIONS:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_border-radius */
|
|
6
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_horizontal-padding */
|
|
7
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_icon-size */
|
|
8
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_icon-text-gap */
|
|
9
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_max-width */
|
|
10
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_min-height */
|
|
11
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_min-width */
|
|
12
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_placeholder-opacity */
|
|
13
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_font-family */
|
|
14
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_font-size */
|
|
15
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_font-style */
|
|
16
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_font-weight */
|
|
17
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_letter-spacing */
|
|
18
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_line-height */
|
|
19
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_text-decoration */
|
|
20
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_text_text-transform */
|
|
21
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_properties_vertical-padding */
|
|
22
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_layouts_side-by-side_properties_top-bottom-margin */
|
|
23
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_layouts_stacked_properties_top-bottom-margin */
|
|
2
|
+
- state-specific border-size variables are ignored because the input box uses a uniform static boundary to prevent
|
|
3
|
+
unexpected layout shifts or flickering when switching between active, focused, or error states. */
|
|
24
4
|
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_border-size */
|
|
25
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_background */
|
|
26
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_border-color */
|
|
27
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_leading-icon */
|
|
28
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_text */
|
|
29
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_trailing-icon */
|
|
30
5
|
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_border-size */
|
|
31
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_background */
|
|
32
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_border-color */
|
|
33
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_leading-icon */
|
|
34
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_text */
|
|
35
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_trailing-icon */
|
|
36
6
|
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_border-size */
|
|
37
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_background */
|
|
38
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_border-color */
|
|
39
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_leading-icon */
|
|
40
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_text */
|
|
41
|
-
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_trailing-icon */
|
|
42
7
|
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_variants_states_focus_properties_border-size */
|
|
43
|
-
|
|
44
|
-
/*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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_autocomplete_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_autocomplete_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* HARDCODED VALUES:
|
|
24
|
+
- border-width: 1px. Native geometric boundary for the input box.
|
|
25
|
+
- border-style: solid. Native structural rendering rule.
|
|
26
|
+
- outline: none. Bypassing browser focus rings to rely strictly on Recursica focus states natively.
|
|
27
|
+
- flex/layout: display: flex on the root wrapper safely encapsulating internal section rendering.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
.root {
|
|
31
|
+
display: flex;
|
|
32
|
+
position: relative;
|
|
33
|
+
width: 100% !important; /* Override MUI default 300px width */
|
|
34
|
+
min-height: var(
|
|
35
|
+
--recursica_ui-kit_components_autocomplete_properties_min-height
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
39
|
+
--input-left-section-size: calc(
|
|
40
|
+
var(
|
|
41
|
+
--recursica_ui-kit_components_autocomplete_properties_horizontal-padding
|
|
42
|
+
) +
|
|
43
|
+
var(--recursica_ui-kit_components_autocomplete_properties_icon-size) +
|
|
44
|
+
var(--recursica_ui-kit_components_autocomplete_properties_icon-text-gap)
|
|
45
|
+
);
|
|
46
|
+
--input-right-section-size: calc(
|
|
47
|
+
var(
|
|
48
|
+
--recursica_ui-kit_components_autocomplete_properties_horizontal-padding
|
|
49
|
+
) +
|
|
50
|
+
var(--recursica_ui-kit_components_autocomplete_properties_icon-size) +
|
|
51
|
+
var(--recursica_ui-kit_components_autocomplete_properties_icon-text-gap)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Strip MUI native Form Control wrapper margins on standard variant */
|
|
56
|
+
.root :global(.MuiFormControl-root) {
|
|
57
|
+
margin: 0 !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.input {
|
|
61
|
+
/* Structural Overrides */
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
width: 100%;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
margin: 0;
|
|
67
|
+
|
|
68
|
+
/* Box Geometry */
|
|
69
|
+
min-height: var(
|
|
70
|
+
--recursica_ui-kit_components_autocomplete_properties_min-height
|
|
71
|
+
);
|
|
72
|
+
padding-top: var(
|
|
73
|
+
--recursica_ui-kit_components_autocomplete_properties_vertical-padding
|
|
74
|
+
) !important;
|
|
75
|
+
padding-bottom: var(
|
|
76
|
+
--recursica_ui-kit_components_autocomplete_properties_vertical-padding
|
|
77
|
+
) !important;
|
|
78
|
+
padding-left: var(
|
|
79
|
+
--recursica_ui-kit_components_autocomplete_properties_horizontal-padding
|
|
80
|
+
) !important;
|
|
81
|
+
padding-right: var(
|
|
82
|
+
--recursica_ui-kit_components_autocomplete_properties_horizontal-padding
|
|
83
|
+
) !important;
|
|
84
|
+
border-radius: var(
|
|
85
|
+
--recursica_ui-kit_components_autocomplete_properties_border-radius
|
|
86
|
+
);
|
|
87
|
+
border-width: 1px;
|
|
88
|
+
border-style: solid;
|
|
89
|
+
|
|
90
|
+
/* Strict Typography Unification */
|
|
91
|
+
font-family: var(
|
|
92
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-family
|
|
93
|
+
);
|
|
94
|
+
font-size: var(
|
|
95
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-size
|
|
96
|
+
);
|
|
97
|
+
font-style: var(
|
|
98
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-style
|
|
99
|
+
);
|
|
100
|
+
font-weight: var(
|
|
101
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-weight
|
|
102
|
+
);
|
|
103
|
+
letter-spacing: var(
|
|
104
|
+
--recursica_ui-kit_components_autocomplete_properties_text_letter-spacing
|
|
105
|
+
);
|
|
106
|
+
line-height: var(
|
|
107
|
+
--recursica_ui-kit_components_autocomplete_properties_text_line-height
|
|
108
|
+
);
|
|
109
|
+
text-decoration: var(
|
|
110
|
+
--recursica_ui-kit_components_autocomplete_properties_text_text-decoration
|
|
111
|
+
);
|
|
112
|
+
text-transform: var(
|
|
113
|
+
--recursica_ui-kit_components_autocomplete_properties_text_text-transform
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
/* Base State Default Execution */
|
|
117
|
+
background-color: var(
|
|
118
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_background
|
|
119
|
+
);
|
|
120
|
+
border-color: var(
|
|
121
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_border-color
|
|
122
|
+
);
|
|
123
|
+
color: var(
|
|
124
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_text
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
outline: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Reset internal MUI <input> node padding to safely allow the wrapper to manage geometry */
|
|
131
|
+
.input :global(input.MuiInputBase-input) {
|
|
132
|
+
padding: 0 !important;
|
|
133
|
+
height: 100%;
|
|
134
|
+
margin: 0;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
color: inherit;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Ensure MUI standard variant pseudo-elements (underlines) are destroyed completely */
|
|
140
|
+
.input::before,
|
|
141
|
+
.input::after {
|
|
142
|
+
display: none !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.input::placeholder {
|
|
146
|
+
opacity: var(
|
|
147
|
+
--recursica_ui-kit_components_autocomplete_properties_placeholder-opacity
|
|
148
|
+
);
|
|
149
|
+
color: inherit;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Dynamic Padding Overrides */
|
|
153
|
+
/* MUI naturally flexes adornments, so we don't need absolute padding overrides for the wrapper.
|
|
154
|
+
Instead, we apply gap to the input wrapper to space out the adornments and the input natively. */
|
|
155
|
+
.input {
|
|
156
|
+
gap: var(--recursica_ui-kit_components_autocomplete_properties_icon-text-gap);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Flexible End-Caps (Icons, actions) */
|
|
160
|
+
.section {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
height: 100%;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.section[data-position="left"] {
|
|
167
|
+
justify-content: flex-start;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.section[data-position="right"] {
|
|
171
|
+
justify-content: flex-end;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.section :global(svg) {
|
|
175
|
+
width: var(--recursica_ui-kit_components_autocomplete_properties_icon-size);
|
|
176
|
+
height: var(--recursica_ui-kit_components_autocomplete_properties_icon-size);
|
|
177
|
+
color: var(
|
|
178
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_leading-icon
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.section[data-position="right"] :global(svg) {
|
|
183
|
+
color: var(
|
|
184
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_trailing-icon
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Dropdown and Options */
|
|
189
|
+
/* We want to make sure the dropdown inherits font correctly. */
|
|
190
|
+
.dropdown {
|
|
191
|
+
background-color: var(
|
|
192
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_background
|
|
193
|
+
);
|
|
194
|
+
border: 1px solid
|
|
195
|
+
var(
|
|
196
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_border-color
|
|
197
|
+
);
|
|
198
|
+
border-radius: var(
|
|
199
|
+
--recursica_ui-kit_components_autocomplete_properties_border-radius
|
|
200
|
+
);
|
|
201
|
+
box-shadow: var(--recursica_ui-kit_components_menu_properties_elevation);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.option {
|
|
205
|
+
font-family: var(
|
|
206
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-family
|
|
207
|
+
);
|
|
208
|
+
font-size: var(
|
|
209
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-size
|
|
210
|
+
);
|
|
211
|
+
font-weight: var(
|
|
212
|
+
--recursica_ui-kit_components_autocomplete_properties_text_font-weight
|
|
213
|
+
);
|
|
214
|
+
color: var(
|
|
215
|
+
--recursica_ui-kit_components_autocomplete_variants_states_default_properties_colors_text
|
|
216
|
+
);
|
|
217
|
+
padding: calc(
|
|
218
|
+
var(
|
|
219
|
+
--recursica_ui-kit_components_autocomplete_properties_vertical-padding
|
|
220
|
+
) *
|
|
221
|
+
0.5
|
|
222
|
+
)
|
|
223
|
+
var(
|
|
224
|
+
--recursica_ui-kit_components_autocomplete_properties_horizontal-padding
|
|
225
|
+
);
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.option[data-selected="true"],
|
|
230
|
+
.option[data-selected],
|
|
231
|
+
.option[data-combobox-selected="true"],
|
|
232
|
+
.option[data-combobox-selected],
|
|
233
|
+
.option[data-combobox-active="true"],
|
|
234
|
+
.option[data-combobox-active],
|
|
235
|
+
.option[data-hovered="true"],
|
|
236
|
+
.option[data-hovered],
|
|
237
|
+
.option:hover {
|
|
238
|
+
background-color: var(
|
|
239
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_background
|
|
240
|
+
);
|
|
241
|
+
color: var(
|
|
242
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_text
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* -------------------------------------
|
|
247
|
+
STATE CASCADE ARCHITECTURE
|
|
248
|
+
-------------------------------------- */
|
|
249
|
+
|
|
250
|
+
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
251
|
+
.input:focus-within,
|
|
252
|
+
.input:focus {
|
|
253
|
+
border-color: var(
|
|
254
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_border-color
|
|
255
|
+
);
|
|
256
|
+
background-color: var(
|
|
257
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_background
|
|
258
|
+
);
|
|
259
|
+
color: var(
|
|
260
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_text
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
265
|
+
color: var(
|
|
266
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_leading-icon
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.root:focus-within .section[data-position="right"] :global(svg) {
|
|
271
|
+
color: var(
|
|
272
|
+
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_trailing-icon
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
277
|
+
.root[data-error] .input {
|
|
278
|
+
border-color: var(
|
|
279
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_border-color
|
|
280
|
+
);
|
|
281
|
+
background-color: var(
|
|
282
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_background
|
|
283
|
+
);
|
|
284
|
+
color: var(
|
|
285
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_text
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.root[data-error] .section[data-position="left"] :global(svg) {
|
|
290
|
+
color: var(
|
|
291
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_leading-icon
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.root[data-error] .section[data-position="right"] :global(svg) {
|
|
296
|
+
color: var(
|
|
297
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_trailing-icon
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* Disabled State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
302
|
+
.root[data-disabled] .input {
|
|
303
|
+
border-color: var(
|
|
304
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_border-color
|
|
305
|
+
);
|
|
306
|
+
background-color: var(
|
|
307
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_background
|
|
308
|
+
);
|
|
309
|
+
color: var(
|
|
310
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_text
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.root[data-disabled] .section[data-position="left"] :global(svg) {
|
|
315
|
+
color: var(
|
|
316
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_leading-icon
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.root[data-disabled] .section[data-position="right"] :global(svg) {
|
|
321
|
+
color: var(
|
|
322
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_trailing-icon
|
|
323
|
+
);
|
|
324
|
+
}
|
|
@@ -1,35 +1,187 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Autocomplete } from "./Autocomplete";
|
|
3
|
-
import {
|
|
2
|
+
import { Autocomplete as AutoComplete } from "./Autocomplete";
|
|
3
|
+
import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
|
|
4
4
|
|
|
5
|
-
const meta: Meta<typeof
|
|
6
|
-
title: "UI-Kit
|
|
7
|
-
component:
|
|
5
|
+
const meta: Meta<typeof AutoComplete> = {
|
|
6
|
+
title: "UI-Kit/AutoComplete",
|
|
7
|
+
component: AutoComplete,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
9
|
parameters: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.",
|
|
26
57
|
},
|
|
27
58
|
},
|
|
28
59
|
};
|
|
29
60
|
|
|
30
61
|
export default meta;
|
|
31
|
-
|
|
62
|
+
|
|
63
|
+
type Story = StoryObj<typeof AutoComplete>;
|
|
32
64
|
|
|
33
65
|
export const Default: Story = {
|
|
34
|
-
|
|
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
|
+
},
|
|
35
187
|
};
|