@recursica/mantine-adapter 0.41.0 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/index.d.ts +43 -3
  3. package/dist/mantine-adapter.cjs +2 -2
  4. package/dist/mantine-adapter.cjs.map +1 -1
  5. package/dist/mantine-adapter.css +1 -1
  6. package/dist/mantine-adapter.js +2580 -2218
  7. package/dist/mantine-adapter.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/GlobalExemptions.modules.css +0 -6
  10. package/src/components/Accordion/Accordion.module.css +0 -8
  11. package/src/components/AutoComplete/AutoComplete.module.css +0 -7
  12. package/src/components/Avatar/Avatar.module.css +0 -8
  13. package/src/components/Checkbox/CheckboxGroup.tsx +32 -10
  14. package/src/components/Chip/Chip.module.css +0 -16
  15. package/src/components/DatePicker/DATEPICKER_IMPLEMENTATION_NOTES.md +14 -1
  16. package/src/components/DatePicker/DatePicker.icons.tsx +27 -0
  17. package/src/components/DatePicker/DatePicker.module.css +256 -7
  18. package/src/components/DatePicker/DatePicker.stories.tsx +0 -7
  19. package/src/components/DatePicker/DatePicker.tsx +37 -1
  20. package/src/components/DatePicker/USAGE.md +6 -2
  21. package/src/components/Dropdown/Dropdown.module.css +0 -7
  22. package/src/components/FileInput/FileInput.module.css +0 -21
  23. package/src/components/FileInput/FileInput.tsx +6 -0
  24. package/src/components/FileUpload/FileUpload.module.css +0 -11
  25. package/src/components/HoverCard/HoverCard.module.css +1 -7
  26. package/src/components/Label/Label.module.css +0 -6
  27. package/src/components/Link/Link.module.css +1 -6
  28. package/src/components/Menu/Menu.module.css +0 -6
  29. package/src/components/Modal/Modal.module.css +0 -11
  30. package/src/components/NumberInput/NumberInput.module.css +0 -7
  31. package/src/components/Pagination/Pagination.module.css +0 -81
  32. package/src/components/SegmentedControl/SegmentedControl.module.css +0 -1
  33. package/src/components/Slider/IMPLEMENTATION_NOTES.md +1 -0
  34. package/src/components/Slider/Slider.module.css +34 -0
  35. package/src/components/Slider/Slider.stories.tsx +1 -1
  36. package/src/components/TextArea/TextArea.module.css +0 -7
  37. package/src/components/TextArea/TextArea.tsx +2 -6
  38. package/src/components/TextField/TextField.module.css +0 -7
  39. package/src/components/TimePicker/TimePicker.module.css +0 -16
  40. package/src/components/Timeline/Timeline.module.css +0 -6
  41. package/src/components/Toast/Toast.module.css +0 -7
  42. package/src/components/Tooltip/Tooltip.module.css +0 -9
  43. package/src/components/TransferList/TRANSFERLIST_IMPLEMENTATION_NOTES.md +111 -0
  44. package/src/components/TransferList/TransferList.module.css +174 -41
  45. package/src/components/TransferList/TransferList.stories.tsx +110 -6
  46. package/src/components/TransferList/TransferList.tsx +417 -7
  47. package/src/components/TransferList/USAGE.md +37 -6
@@ -1,41 +1,174 @@
1
- /*
2
- * EXEMPTIONS:
3
- * - TransferList 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_transfer-list_properties_border-radius */
9
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_filter-items-gap */
10
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_gap */
11
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_fontFamily */
12
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_fontSize */
13
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_fontStyle */
14
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_fontWeight */
15
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_letterSpacing */
16
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_lineHeight */
17
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_textCase */
18
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_header-style_textDecoration */
19
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_height */
20
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_horizontal-padding */
21
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_title-filter-gap */
22
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_vertical-padding */
23
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_properties_width */
24
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_layouts_side-by-side_properties_top-bottom-margin */
25
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_layouts_stacked_properties_top-bottom-margin */
26
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_default_properties_border-size */
27
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_border-size */
28
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_error_properties_border-size */
29
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_focus_properties_border-size */
30
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_default_properties_colors_background */
31
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_default_properties_colors_border-color */
32
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_default_properties_colors_header-color */
33
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_background */
34
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_border-color */
35
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_header-color */
36
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_background */
37
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_border-color */
38
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_header-color */
39
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_focus_properties_colors_background */
40
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_focus_properties_colors_border-color */
41
- /* recursica-ignore: --recursica_ui-kit_components_transfer-list_variants_states_focus_properties_colors_header-color */
1
+ /* TOKEN INTERPRETATION NOTES (see TRANSFERLIST_IMPLEMENTATION_NOTES.md):
2
+ - `properties_gap` is applied to the row that holds [source pane, transfer buttons, target pane] —
3
+ it's the only unnested gap the schema defines at the component's own level.
4
+ - `properties_title-filter-gap` sits between each pane's header row and its search field.
5
+ - `properties_filter-items-gap` sits between each pane's search field and its item list. */
6
+
7
+ .layoutOverride {
8
+ --form-control-margin-bottom: var(
9
+ --recursica_ui-kit_components_transfer-list_variants_layouts_stacked_properties_top-bottom-margin
10
+ );
11
+ }
12
+
13
+ .layoutOverride[data-form-layout="side-by-side"] {
14
+ --form-control-margin-bottom: var(
15
+ --recursica_ui-kit_components_transfer-list_variants_layouts_side-by-side_properties_top-bottom-margin
16
+ );
17
+ }
18
+
19
+ .root {
20
+ display: flex;
21
+ width: 100%;
22
+ }
23
+
24
+ .panes {
25
+ display: flex;
26
+ align-items: stretch;
27
+ gap: var(--recursica_ui-kit_components_transfer-list_properties_gap);
28
+ width: 100%;
29
+ }
30
+
31
+ .pane {
32
+ display: flex;
33
+ flex-direction: column;
34
+ box-sizing: border-box;
35
+ min-width: 0;
36
+ flex: 1 1 var(--recursica_ui-kit_components_transfer-list_properties_width);
37
+ height: var(--recursica_ui-kit_components_transfer-list_properties_height);
38
+ padding: var(
39
+ --recursica_ui-kit_components_transfer-list_properties_vertical-padding
40
+ )
41
+ var(
42
+ --recursica_ui-kit_components_transfer-list_properties_horizontal-padding
43
+ );
44
+ border-width: 1px;
45
+ border-style: solid;
46
+ border-radius: var(
47
+ --recursica_ui-kit_components_transfer-list_properties_border-radius
48
+ );
49
+ border-color: var(
50
+ --recursica_ui-kit_components_transfer-list_properties_colors_border-color
51
+ );
52
+ background-color: var(
53
+ --recursica_ui-kit_components_transfer-list_properties_colors_background-color
54
+ );
55
+ }
56
+
57
+ .paneHeader {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: space-between;
61
+ margin-bottom: var(
62
+ --recursica_ui-kit_components_transfer-list_properties_title-filter-gap
63
+ );
64
+ font-family: var(
65
+ --recursica_ui-kit_components_transfer-list_properties_header-style_fontFamily
66
+ );
67
+ font-size: var(
68
+ --recursica_ui-kit_components_transfer-list_properties_header-style_fontSize
69
+ );
70
+ font-style: var(
71
+ --recursica_ui-kit_components_transfer-list_properties_header-style_fontStyle
72
+ );
73
+ font-weight: var(
74
+ --recursica_ui-kit_components_transfer-list_properties_header-style_fontWeight
75
+ );
76
+ letter-spacing: var(
77
+ --recursica_ui-kit_components_transfer-list_properties_header-style_letterSpacing
78
+ );
79
+ line-height: var(
80
+ --recursica_ui-kit_components_transfer-list_properties_header-style_lineHeight
81
+ );
82
+ text-decoration: var(
83
+ --recursica_ui-kit_components_transfer-list_properties_header-style_textDecoration
84
+ );
85
+ text-transform: var(
86
+ --recursica_ui-kit_components_transfer-list_properties_header-style_textCase
87
+ );
88
+ color: var(
89
+ --recursica_ui-kit_components_transfer-list_properties_colors_header-color
90
+ );
91
+ }
92
+
93
+ .paneSearch {
94
+ margin-bottom: var(
95
+ --recursica_ui-kit_components_transfer-list_properties_filter-items-gap
96
+ );
97
+ }
98
+
99
+ .paneList {
100
+ flex: 1;
101
+ overflow-y: auto;
102
+ display: flex;
103
+ flex-direction: column;
104
+ /* No token exists for the gap between stacked CheckboxGroup blocks (ungrouped row +
105
+ each named group) — the 31-variable transfer-list schema only defines gaps at the
106
+ header/search/pane level (see TRANSFERLIST_IMPLEMENTATION_NOTES.md). Left as an
107
+ intentional hardcoded value rather than borrowing another component's token, same
108
+ as FileUpload's untokened icon size. */
109
+ gap: 2px;
110
+ min-height: 0;
111
+ }
112
+
113
+ .emptyState {
114
+ display: flex;
115
+ align-items: center;
116
+ justify-content: center;
117
+ flex: 1;
118
+ opacity: 0.6;
119
+ font-size: 14px;
120
+ padding: 16px;
121
+ text-align: center;
122
+ }
123
+
124
+ .transferColumn {
125
+ display: flex;
126
+ flex-direction: column;
127
+ align-items: center;
128
+ justify-content: center;
129
+ /* No token exists for spacing between the four transfer buttons — not part of the
130
+ 31-variable schema. Left as an intentional hardcoded value (see TRANSFERLIST_IMPLEMENTATION_NOTES.md). */
131
+ gap: 4px;
132
+ flex-shrink: 0;
133
+ }
134
+
135
+ .chevron[data-direction="left"] {
136
+ transform: scaleX(-1);
137
+ }
138
+
139
+ /* -------------------------------------
140
+ STATE CASCADE
141
+ -------------------------------------- */
142
+
143
+ .root[data-error] .pane {
144
+ border-color: var(
145
+ --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_border-color
146
+ ) !important;
147
+ background-color: var(
148
+ --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_background-color
149
+ ) !important;
150
+ }
151
+
152
+ .root[data-error] .paneHeader {
153
+ color: var(
154
+ --recursica_ui-kit_components_transfer-list_variants_states_error_properties_colors_header-color
155
+ ) !important;
156
+ }
157
+
158
+ .root[data-disabled] .pane {
159
+ border-color: var(
160
+ --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_border-color
161
+ ) !important;
162
+ background-color: var(
163
+ --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_background-color
164
+ ) !important;
165
+ opacity: var(
166
+ --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_opacity
167
+ );
168
+ }
169
+
170
+ .root[data-disabled] .paneHeader {
171
+ color: var(
172
+ --recursica_ui-kit_components_transfer-list_variants_states_disabled_properties_colors_header-color
173
+ ) !important;
174
+ }
@@ -1,17 +1,121 @@
1
+ import React from "react";
1
2
  import type { Meta, StoryObj } from "@storybook/react";
2
3
  import { TransferList } from "./TransferList";
3
- import { ComingSoon } from "@recursica/storybook-template";
4
+ import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
4
5
 
5
- const meta: Meta<typeof TransferList> = {
6
- title: "UI-Kit/🚧 TransferList",
6
+ type TransferListStoryProps = React.ComponentProps<typeof TransferList>;
7
+
8
+ const SAMPLE_DATA: TransferListStoryProps["defaultData"] = [
9
+ [
10
+ { value: "alpha", label: "Alpha" },
11
+ { value: "bravo", label: "Bravo" },
12
+ { value: "charlie", label: "Charlie" },
13
+ { value: "delta", label: "Delta" },
14
+ { value: "echo", label: "Echo" },
15
+ ],
16
+ [{ value: "foxtrot", label: "Foxtrot" }],
17
+ ];
18
+
19
+ const GROUPED_DATA: TransferListStoryProps["defaultData"] = [
20
+ [
21
+ { value: "apple", label: "Apple", group: "Fruit" },
22
+ { value: "banana", label: "Banana", group: "Fruit" },
23
+ { value: "carrot", label: "Carrot", group: "Vegetable" },
24
+ { value: "daikon", label: "Daikon", group: "Vegetable" },
25
+ { value: "eagle", label: "Eagle" },
26
+ ],
27
+ [],
28
+ ];
29
+
30
+ const meta: Meta<TransferListStoryProps> = {
31
+ title: "UI-Kit/TransferList",
7
32
  component: TransferList,
8
33
  tags: ["autodocs"],
34
+ parameters: {
35
+ docs: {
36
+ description: {
37
+ component:
38
+ "TransferList (dual listbox) lets users move items between two lists. Composes FormControlWrapper, TextField, Checkbox, CheckboxGroup, Badge, and Button.",
39
+ },
40
+ },
41
+ },
42
+ args: {
43
+ label: "Assign users",
44
+ assistiveText: "Move users into the selected list.",
45
+ defaultData: SAMPLE_DATA,
46
+ disabled: false,
47
+ required: false,
48
+ },
49
+ argTypes: {
50
+ disabled: {
51
+ control: "boolean",
52
+ },
53
+ ...formControlArgTypes,
54
+ sourceLabel: {
55
+ control: "text",
56
+ },
57
+ targetLabel: {
58
+ control: "text",
59
+ },
60
+ searchable: {
61
+ control: "boolean",
62
+ },
63
+ searchPlaceholder: {
64
+ control: "text",
65
+ },
66
+ },
9
67
  };
10
68
 
11
69
  export default meta;
12
70
 
13
- type Story = StoryObj<typeof TransferList>;
71
+ type Story = StoryObj<TransferListStoryProps>;
72
+
73
+ export const Default: Story = {};
74
+
75
+ export const Grouped: Story = {
76
+ args: {
77
+ label: "Assign ingredients",
78
+ defaultData: GROUPED_DATA,
79
+ },
80
+ };
81
+
82
+ export const SideBySide: Story = {
83
+ args: {
84
+ formLayout: "side-by-side",
85
+ },
86
+ };
87
+
88
+ export const NoSearch: Story = {
89
+ args: {
90
+ label: "Assign users (no filtering)",
91
+ searchable: false,
92
+ },
93
+ };
94
+
95
+ export const StaticError: Story = {
96
+ args: {
97
+ error: "Select at least one user.",
98
+ defaultData: [[], SAMPLE_DATA![0]],
99
+ },
100
+ };
101
+
102
+ export const StaticDisabled: Story = {
103
+ args: {
104
+ disabled: true,
105
+ },
106
+ };
107
+
108
+ export const Empty: Story = {
109
+ args: {
110
+ label: "Assign users",
111
+ defaultData: [[], []],
112
+ },
113
+ };
14
114
 
15
- export const Default: Story = {
16
- render: () => <ComingSoon componentName="TransferList" />,
115
+ export const ReadOnly: Story = {
116
+ args: {
117
+ label: "Assigned users",
118
+ defaultData: [[], SAMPLE_DATA![0]],
119
+ readOnly: true,
120
+ },
17
121
  };