@coveord/plasma-mantine 52.12.1 → 52.13.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.
- package/.eslintrc.js +1 -1
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +32 -32
- package/__mocks__/@monaco-editor/react.tsx +2 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/ButtonWithDisabledTooltip.js.map +1 -1
- package/dist/cjs/components/code-editor/CodeEditor.d.ts +4 -0
- package/dist/cjs/components/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/cjs/components/code-editor/CodeEditor.js +10 -2
- package/dist/cjs/components/code-editor/CodeEditor.js.map +1 -1
- package/dist/cjs/components/collection/Collection.js.map +1 -1
- package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -1
- package/dist/cjs/components/header/Header.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmMenuItem.js.map +1 -1
- package/dist/cjs/components/menu/Menu.js.map +1 -1
- package/dist/cjs/components/modal-wizard/ModalWizard.js.map +1 -1
- package/dist/cjs/components/table/layouts/RowLayout.d.ts.map +1 -1
- package/dist/cjs/components/table/layouts/RowLayout.js +2 -1
- package/dist/cjs/components/table/layouts/RowLayout.js.map +1 -1
- package/dist/cjs/components/table/useRowSelection.js.map +1 -1
- package/dist/cjs/form/FormProvider.js.map +1 -1
- package/dist/cjs/form/useForm.js.map +1 -1
- package/dist/cjs/theme/Theme.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.js +21 -2
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/cjs/utils/overrideComponent.js.map +1 -1
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/ButtonWithDisabledTooltip.js.map +1 -1
- package/dist/esm/components/code-editor/CodeEditor.d.ts +4 -0
- package/dist/esm/components/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/esm/components/code-editor/CodeEditor.js +10 -2
- package/dist/esm/components/code-editor/CodeEditor.js.map +1 -1
- package/dist/esm/components/collection/Collection.js.map +1 -1
- package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -1
- package/dist/esm/components/header/Header.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmMenuItem.js.map +1 -1
- package/dist/esm/components/menu/Menu.js.map +1 -1
- package/dist/esm/components/modal-wizard/ModalWizard.js.map +1 -1
- package/dist/esm/components/table/layouts/RowLayout.d.ts.map +1 -1
- package/dist/esm/components/table/layouts/RowLayout.js +2 -1
- package/dist/esm/components/table/layouts/RowLayout.js.map +1 -1
- package/dist/esm/components/table/useRowSelection.js.map +1 -1
- package/dist/esm/form/FormProvider.js.map +1 -1
- package/dist/esm/form/useForm.js.map +1 -1
- package/dist/esm/theme/Theme.d.ts.map +1 -1
- package/dist/esm/theme/Theme.js +22 -3
- package/dist/esm/theme/Theme.js.map +1 -1
- package/dist/esm/utils/overrideComponent.js.map +1 -1
- package/package.json +7 -5
- package/src/components/button/Button.tsx +1 -1
- package/src/components/button/ButtonWithDisabledTooltip.tsx +2 -2
- package/src/components/button/__tests__/Button.spec.tsx +6 -6
- package/src/components/button/__tests__/ButtonWithDisabledTooltip.spec.tsx +3 -3
- package/src/components/code-editor/CodeEditor.tsx +8 -1
- package/src/components/code-editor/__tests__/CodeEditor.spec.tsx +17 -0
- package/src/components/collection/Collection.tsx +1 -1
- package/src/components/date-range-picker/DateRangePickerPresetSelect.tsx +1 -1
- package/src/components/date-range-picker/__tests__/DateRangePickerInlineCalendar.spec.tsx +8 -4
- package/src/components/date-range-picker/__tests__/DateRangePickerPresetSelect.spec.tsx +4 -4
- package/src/components/header/Header.tsx +1 -1
- package/src/components/header/__tests__/Header.spec.tsx +4 -4
- package/src/components/inline-confirm/InlineConfirm.tsx +1 -1
- package/src/components/inline-confirm/InlineConfirmButton.tsx +1 -1
- package/src/components/inline-confirm/InlineConfirmMenuItem.tsx +1 -1
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +5 -5
- package/src/components/menu/Menu.tsx +1 -1
- package/src/components/modal-wizard/ModalWizard.tsx +3 -3
- package/src/components/modal-wizard/__tests__/ModalWizard.spec.tsx +21 -21
- package/src/components/prompt/__tests__/Prompt.spec.tsx +2 -2
- package/src/components/sticky-footer/__tests__/StickyFooter.spec.tsx +1 -1
- package/src/components/table/__tests__/Table.spec.tsx +15 -15
- package/src/components/table/__tests__/TableActions.spec.tsx +3 -3
- package/src/components/table/__tests__/TableDateRangePicker.spec.tsx +2 -2
- package/src/components/table/__tests__/TableFilter.spec.tsx +7 -7
- package/src/components/table/__tests__/TableLastUpdated.spec.tsx +2 -2
- package/src/components/table/__tests__/TablePagination.spec.tsx +6 -6
- package/src/components/table/__tests__/TablePerPage.spec.tsx +10 -10
- package/src/components/table/__tests__/TablePredicate.spec.tsx +2 -2
- package/src/components/table/layouts/RowLayout.tsx +1 -0
- package/src/components/table/layouts/__tests__/RowLayout.spec.tsx +16 -16
- package/src/components/table/useRowSelection.ts +4 -4
- package/src/form/FormProvider.tsx +2 -2
- package/src/form/useForm.ts +1 -1
- package/src/theme/Theme.tsx +20 -0
- package/src/utils/overrideComponent.ts +2 -2
|
@@ -22,7 +22,7 @@ describe('Table.LastUpdated', () => {
|
|
|
22
22
|
const {rerender} = render(
|
|
23
23
|
<Table data={[{name: 'fruit'}]} columns={columns}>
|
|
24
24
|
<Table.LastUpdated />
|
|
25
|
-
</Table
|
|
25
|
+
</Table>,
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
expect(screen.getByText('Last update:')).toBeVisible();
|
|
@@ -31,7 +31,7 @@ describe('Table.LastUpdated', () => {
|
|
|
31
31
|
rerender(
|
|
32
32
|
<Table data={[{name: 'fruit'}]} columns={columns}>
|
|
33
33
|
<Table.LastUpdated label="CUSTOM label:" />
|
|
34
|
-
</Table
|
|
34
|
+
</Table>,
|
|
35
35
|
);
|
|
36
36
|
|
|
37
37
|
expect(screen.queryByText('Last update:')).not.toBeInTheDocument();
|
|
@@ -23,7 +23,7 @@ describe('Table.Pagination', () => {
|
|
|
23
23
|
<Table.Footer>
|
|
24
24
|
<Table.Pagination totalPages={3} />
|
|
25
25
|
</Table.Footer>
|
|
26
|
-
</Table
|
|
26
|
+
</Table>,
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
const buttons = screen.getAllByRole('button');
|
|
@@ -43,7 +43,7 @@ describe('Table.Pagination', () => {
|
|
|
43
43
|
<Table.Footer>
|
|
44
44
|
<Table.Pagination totalPages={5} />
|
|
45
45
|
</Table.Footer>
|
|
46
|
-
</Table
|
|
46
|
+
</Table>,
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
onChange.mockReset();
|
|
@@ -52,7 +52,7 @@ describe('Table.Pagination', () => {
|
|
|
52
52
|
|
|
53
53
|
await waitFor(() => {
|
|
54
54
|
expect(onChange).toHaveBeenCalledWith(
|
|
55
|
-
expect.objectContaining({pagination: expect.objectContaining({pageIndex: 1})})
|
|
55
|
+
expect.objectContaining({pagination: expect.objectContaining({pageIndex: 1})}),
|
|
56
56
|
);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -77,7 +77,7 @@ describe('Table.Pagination', () => {
|
|
|
77
77
|
<Table.Footer>
|
|
78
78
|
<Table.Pagination totalPages={null} />
|
|
79
79
|
</Table.Footer>
|
|
80
|
-
</Table
|
|
80
|
+
</Table>,
|
|
81
81
|
);
|
|
82
82
|
|
|
83
83
|
expect(screen.getByText('fruits')).toBeVisible();
|
|
@@ -111,7 +111,7 @@ describe('Table.Pagination', () => {
|
|
|
111
111
|
<Table.PerPage />
|
|
112
112
|
<Table.Pagination totalPages={5} onPageChange={onChangePage} />
|
|
113
113
|
</Table.Footer>
|
|
114
|
-
</Table
|
|
114
|
+
</Table>,
|
|
115
115
|
);
|
|
116
116
|
|
|
117
117
|
onChangePage.mockReset();
|
|
@@ -130,7 +130,7 @@ describe('Table.Pagination', () => {
|
|
|
130
130
|
<Table.Footer data-testid="table-footer">
|
|
131
131
|
<Table.Pagination totalPages={0} />
|
|
132
132
|
</Table.Footer>
|
|
133
|
-
</Table
|
|
133
|
+
</Table>,
|
|
134
134
|
);
|
|
135
135
|
expect(screen.getByTestId('table-footer')).toBeEmptyDOMElement();
|
|
136
136
|
});
|
|
@@ -21,7 +21,7 @@ describe('Table.PerPage', () => {
|
|
|
21
21
|
<Table.Footer>
|
|
22
22
|
<Table.PerPage label="Per page" />
|
|
23
23
|
</Table.Footer>
|
|
24
|
-
</Table
|
|
24
|
+
</Table>,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
expect(screen.getByText('Per page')).toBeVisible();
|
|
@@ -37,7 +37,7 @@ describe('Table.PerPage', () => {
|
|
|
37
37
|
<Table.Footer>
|
|
38
38
|
<Table.PerPage label="Per page" values={[2, 7, 12, 17]} />
|
|
39
39
|
</Table.Footer>
|
|
40
|
-
</Table
|
|
40
|
+
</Table>,
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
const radios = screen.getAllByRole('radio');
|
|
@@ -60,11 +60,11 @@ describe('Table.PerPage', () => {
|
|
|
60
60
|
<Table.Footer>
|
|
61
61
|
<Table.PerPage />
|
|
62
62
|
</Table.Footer>
|
|
63
|
-
</Table
|
|
63
|
+
</Table>,
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
expect(onMount).toHaveBeenCalledWith(
|
|
67
|
-
expect.objectContaining({pagination: expect.objectContaining({pageSize: 100})})
|
|
67
|
+
expect.objectContaining({pagination: expect.objectContaining({pageSize: 100})}),
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -76,13 +76,13 @@ describe('Table.PerPage', () => {
|
|
|
76
76
|
<Table.Footer>
|
|
77
77
|
<Table.PerPage />
|
|
78
78
|
</Table.Footer>
|
|
79
|
-
</Table
|
|
79
|
+
</Table>,
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
await user.click(screen.queryByRole('radio', {name: '100'}));
|
|
83
83
|
vi.advanceTimersByTime(500);
|
|
84
84
|
expect(onChange).toHaveBeenCalledWith(
|
|
85
|
-
expect.objectContaining({pagination: expect.objectContaining({pageSize: 100})})
|
|
85
|
+
expect.objectContaining({pagination: expect.objectContaining({pageSize: 100})}),
|
|
86
86
|
);
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -100,13 +100,13 @@ describe('Table.PerPage', () => {
|
|
|
100
100
|
<Table.Pagination totalPages={2} />
|
|
101
101
|
<Table.PerPage />
|
|
102
102
|
</Table.Footer>
|
|
103
|
-
</Table
|
|
103
|
+
</Table>,
|
|
104
104
|
);
|
|
105
105
|
|
|
106
106
|
await user.click(screen.queryByRole('radio', {name: '100'}));
|
|
107
107
|
vi.advanceTimersByTime(500);
|
|
108
108
|
expect(onChange).toHaveBeenCalledWith(
|
|
109
|
-
expect.objectContaining({pagination: expect.objectContaining({pageIndex: 0})})
|
|
109
|
+
expect.objectContaining({pagination: expect.objectContaining({pageIndex: 0})}),
|
|
110
110
|
);
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -123,7 +123,7 @@ describe('Table.PerPage', () => {
|
|
|
123
123
|
<Table.Pagination totalPages={2} />
|
|
124
124
|
<Table.PerPage onPerPageChange={onPerPageChange} />
|
|
125
125
|
</Table.Footer>
|
|
126
|
-
</Table
|
|
126
|
+
</Table>,
|
|
127
127
|
);
|
|
128
128
|
|
|
129
129
|
onPerPageChange.mockReset();
|
|
@@ -141,7 +141,7 @@ describe('Table.PerPage', () => {
|
|
|
141
141
|
<Table.Footer data-testid="table-footer">
|
|
142
142
|
<Table.PerPage />
|
|
143
143
|
</Table.Footer>
|
|
144
|
-
</Table
|
|
144
|
+
</Table>,
|
|
145
145
|
);
|
|
146
146
|
expect(screen.getByTestId('table-footer')).toBeEmptyDOMElement();
|
|
147
147
|
});
|
|
@@ -27,7 +27,7 @@ describe('Table.Predicate', () => {
|
|
|
27
27
|
]}
|
|
28
28
|
/>
|
|
29
29
|
</Table.Header>
|
|
30
|
-
</Table
|
|
30
|
+
</Table>,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
await waitFor(() => {
|
|
@@ -50,7 +50,7 @@ describe('Table.Predicate', () => {
|
|
|
50
50
|
]}
|
|
51
51
|
/>
|
|
52
52
|
</Table.Header>
|
|
53
|
-
</Table
|
|
53
|
+
</Table>,
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
await user.click(screen.getByRole('searchbox', {name: 'rank'}));
|
|
@@ -158,6 +158,7 @@ const RowLayoutBody = <T,>({
|
|
|
158
158
|
width: columnSizing.size ?? 'auto',
|
|
159
159
|
minWidth: columnSizing.minSize,
|
|
160
160
|
maxWidth: columnSizing.maxSize,
|
|
161
|
+
overflowWrap: 'break-word',
|
|
161
162
|
}}
|
|
162
163
|
className={cx(classes.cell, {
|
|
163
164
|
[classes.rowCollapsibleButtonCell]: cell.column.id === TableCollapsibleColumn.id,
|
|
@@ -19,7 +19,7 @@ describe('RowLayout', () => {
|
|
|
19
19
|
getRowId={({id}) => id}
|
|
20
20
|
data={[{id: '🆔', firstName: 'first', lastName: 'last'}]}
|
|
21
21
|
columns={columns}
|
|
22
|
-
|
|
22
|
+
/>,
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
expect(screen.getByRole('columnheader', {name: 'firstName'})).toBeVisible();
|
|
@@ -28,12 +28,12 @@ describe('RowLayout', () => {
|
|
|
28
28
|
expect(
|
|
29
29
|
screen.getByRole('cell', {
|
|
30
30
|
name: /first/i,
|
|
31
|
-
})
|
|
31
|
+
}),
|
|
32
32
|
).toBeVisible();
|
|
33
33
|
expect(
|
|
34
34
|
screen.getByRole('cell', {
|
|
35
35
|
name: /last/i,
|
|
36
|
-
})
|
|
36
|
+
}),
|
|
37
37
|
).toBeVisible();
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -72,7 +72,7 @@ describe('RowLayout', () => {
|
|
|
72
72
|
{id: 'gary', firstName: 'Gary', lastName: 'Oak'},
|
|
73
73
|
]}
|
|
74
74
|
columns={customColumns}
|
|
75
|
-
|
|
75
|
+
/>,
|
|
76
76
|
);
|
|
77
77
|
|
|
78
78
|
expect(screen.getByTestId('ash')).toBeVisible();
|
|
@@ -99,7 +99,7 @@ describe('RowLayout', () => {
|
|
|
99
99
|
data={[{id: '🆔', firstName: 'first', lastName: 'last'}]}
|
|
100
100
|
getExpandChildren={(row: RowData) => <Fixture row={row} />}
|
|
101
101
|
columns={customColumns}
|
|
102
|
-
|
|
102
|
+
/>,
|
|
103
103
|
);
|
|
104
104
|
|
|
105
105
|
// wait for the collapsible icon to show
|
|
@@ -135,7 +135,7 @@ describe('RowLayout', () => {
|
|
|
135
135
|
]}
|
|
136
136
|
getExpandChildren={(row: RowData) => (row.lastName === 'Skywalker' ? <Fixture row={row} /> : null)}
|
|
137
137
|
columns={customColumns}
|
|
138
|
-
|
|
138
|
+
/>,
|
|
139
139
|
);
|
|
140
140
|
|
|
141
141
|
// wait for the collapsible icon to show
|
|
@@ -163,7 +163,7 @@ describe('RowLayout', () => {
|
|
|
163
163
|
]}
|
|
164
164
|
getExpandChildren={(row: RowData) => <Fixture row={row} />}
|
|
165
165
|
columns={customColumns}
|
|
166
|
-
|
|
166
|
+
/>,
|
|
167
167
|
);
|
|
168
168
|
|
|
169
169
|
// wait for the collapsible icon to show
|
|
@@ -198,7 +198,7 @@ describe('RowLayout', () => {
|
|
|
198
198
|
]}
|
|
199
199
|
columns={columns}
|
|
200
200
|
doubleClickAction={doubleClickSpy}
|
|
201
|
-
></Table
|
|
201
|
+
></Table>,
|
|
202
202
|
);
|
|
203
203
|
await user.dblClick(screen.getByRole('cell', {name: 'Mario'}));
|
|
204
204
|
expect(doubleClickSpy).toHaveBeenCalledTimes(1);
|
|
@@ -218,7 +218,7 @@ describe('RowLayout', () => {
|
|
|
218
218
|
]}
|
|
219
219
|
columns={columns}
|
|
220
220
|
/>
|
|
221
|
-
</div
|
|
221
|
+
</div>,
|
|
222
222
|
);
|
|
223
223
|
|
|
224
224
|
await user.click(screen.getByRole('row', {name: /patate king/i}));
|
|
@@ -249,7 +249,7 @@ describe('RowLayout', () => {
|
|
|
249
249
|
},
|
|
250
250
|
]}
|
|
251
251
|
/>
|
|
252
|
-
</div
|
|
252
|
+
</div>,
|
|
253
253
|
);
|
|
254
254
|
|
|
255
255
|
await user.click(screen.getByRole('row', {name: /patate king/i}));
|
|
@@ -280,7 +280,7 @@ describe('RowLayout', () => {
|
|
|
280
280
|
},
|
|
281
281
|
]}
|
|
282
282
|
/>
|
|
283
|
-
</div
|
|
283
|
+
</div>,
|
|
284
284
|
);
|
|
285
285
|
|
|
286
286
|
await user.click(screen.getByRole('row', {name: /patate king/i}));
|
|
@@ -305,7 +305,7 @@ describe('RowLayout', () => {
|
|
|
305
305
|
]}
|
|
306
306
|
columns={columns}
|
|
307
307
|
multiRowSelectionEnabled
|
|
308
|
-
|
|
308
|
+
/>,
|
|
309
309
|
);
|
|
310
310
|
|
|
311
311
|
expect(screen.getByRole('columnheader', {name: /select all from this page/i})).toBeInTheDocument();
|
|
@@ -329,7 +329,7 @@ describe('RowLayout', () => {
|
|
|
329
329
|
initialState={{
|
|
330
330
|
rowSelection: {'🆔-2': {id: '🆔-2', firstName: 'Jane', lastName: 'Doe'}},
|
|
331
331
|
}}
|
|
332
|
-
|
|
332
|
+
/>,
|
|
333
333
|
);
|
|
334
334
|
|
|
335
335
|
expect(screen.getByRole('row', {name: /jane doe/i, selected: true})).toBeInTheDocument();
|
|
@@ -346,7 +346,7 @@ describe('RowLayout', () => {
|
|
|
346
346
|
]}
|
|
347
347
|
columns={columns}
|
|
348
348
|
multiRowSelectionEnabled
|
|
349
|
-
|
|
349
|
+
/>,
|
|
350
350
|
);
|
|
351
351
|
|
|
352
352
|
const selectAll = screen.getByRole('checkbox', {name: /select all from this page/i});
|
|
@@ -373,7 +373,7 @@ describe('RowLayout', () => {
|
|
|
373
373
|
multiRowSelectionEnabled
|
|
374
374
|
disableRowSelection
|
|
375
375
|
/>
|
|
376
|
-
</div
|
|
376
|
+
</div>,
|
|
377
377
|
);
|
|
378
378
|
|
|
379
379
|
await user.click(screen.getByRole('row', {name: /patate king/i}));
|
|
@@ -396,7 +396,7 @@ describe('RowLayout', () => {
|
|
|
396
396
|
columns={columns}
|
|
397
397
|
multiRowSelectionEnabled
|
|
398
398
|
disableRowSelection
|
|
399
|
-
|
|
399
|
+
/>,
|
|
400
400
|
);
|
|
401
401
|
|
|
402
402
|
expect(screen.getByRole('checkbox', {name: /select all/i})).toHaveStyle('pointerEvents: none');
|
|
@@ -11,7 +11,7 @@ export const useRowSelection = <T>(
|
|
|
11
11
|
onRowSelectionChange,
|
|
12
12
|
multiRowSelectionEnabled,
|
|
13
13
|
additionalRootNodes = [],
|
|
14
|
-
}: Pick<TableProps<T>, 'onRowSelectionChange' | 'multiRowSelectionEnabled' | 'additionalRootNodes'
|
|
14
|
+
}: Pick<TableProps<T>, 'onRowSelectionChange' | 'multiRowSelectionEnabled' | 'additionalRootNodes'>,
|
|
15
15
|
) => {
|
|
16
16
|
const outsideClickRef = useRef<HTMLDivElement>();
|
|
17
17
|
useClickOutside(
|
|
@@ -21,7 +21,7 @@ export const useRowSelection = <T>(
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
null,
|
|
24
|
-
[outsideClickRef.current, ...additionalRootNodes]
|
|
24
|
+
[outsideClickRef.current, ...additionalRootNodes],
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
// Need to call this outside of the onRowSelectionChange of the table to avoid rendering conflicts if the callback queues an update in a parent component.
|
|
@@ -36,7 +36,7 @@ export const useRowSelection = <T>(
|
|
|
36
36
|
table.setState((old) => {
|
|
37
37
|
const newRowSelection = functionalUpdate(
|
|
38
38
|
rowSelectionUpdater,
|
|
39
|
-
old['rowSelection']
|
|
39
|
+
old['rowSelection'],
|
|
40
40
|
) as RowSelectionWithData<T>;
|
|
41
41
|
|
|
42
42
|
if (isEqual(old['rowSelection'], newRowSelection)) {
|
|
@@ -49,7 +49,7 @@ export const useRowSelection = <T>(
|
|
|
49
49
|
if (newRowSelection[rowId] === true) {
|
|
50
50
|
if (!rows[rowId]) {
|
|
51
51
|
console.error(
|
|
52
|
-
'The table was not initialized properly, the rowSelection state should contain an object of type Record<string, TData>.'
|
|
52
|
+
'The table was not initialized properly, the rowSelection state should contain an object of type Record<string, TData>.',
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
newRowSelection[rowId] = rows[rowId]?.original ?? (true as T);
|
|
@@ -11,7 +11,7 @@ export interface FormProviderProps<Form> {
|
|
|
11
11
|
|
|
12
12
|
export function createFormContext<
|
|
13
13
|
Values,
|
|
14
|
-
TransformValues extends _TransformValues<Values> = (values: Values) => Values
|
|
14
|
+
TransformValues extends _TransformValues<Values> = (values: Values) => Values,
|
|
15
15
|
>() {
|
|
16
16
|
type Form = UseFormReturnType<Values, TransformValues>;
|
|
17
17
|
|
|
@@ -33,6 +33,6 @@ export function createFormContext<
|
|
|
33
33
|
return [FormProvider, useFormContext, useForm] as [
|
|
34
34
|
React.FC<FormProviderProps<Form>>,
|
|
35
35
|
() => Form,
|
|
36
|
-
UseForm<Values, TransformValues
|
|
36
|
+
UseForm<Values, TransformValues>,
|
|
37
37
|
];
|
|
38
38
|
}
|
package/src/form/useForm.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const useForm: typeof useMantineForm = (options) => {
|
|
|
6
6
|
|
|
7
7
|
const getInputProps: GetInputProps<Record<string, unknown>> = (
|
|
8
8
|
path,
|
|
9
|
-
{type = 'input', withError = type === 'input', withFocus = true} = {}
|
|
9
|
+
{type = 'input', withError = type === 'input', withFocus = true} = {},
|
|
10
10
|
) => {
|
|
11
11
|
const originalPayload = form.getInputProps(path, {type, withError, withFocus});
|
|
12
12
|
if (Array.isArray(originalPayload.value)) {
|
package/src/theme/Theme.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type NotificationProps,
|
|
8
8
|
type StepperStylesParams,
|
|
9
9
|
type TabsStylesParams,
|
|
10
|
+
getStylesRef,
|
|
10
11
|
} from '@mantine/core';
|
|
11
12
|
|
|
12
13
|
import {PlasmaColors} from './PlasmaColors';
|
|
@@ -140,6 +141,7 @@ export const plasmaTheme: MantineThemeOverride = {
|
|
|
140
141
|
fontSize: theme.fontSizes.sm,
|
|
141
142
|
color: theme.colors.gray[7],
|
|
142
143
|
marginBottom: theme.spacing.xs,
|
|
144
|
+
lineHeight: theme.lineHeight,
|
|
143
145
|
},
|
|
144
146
|
invalid: {
|
|
145
147
|
color: theme.colors.red[9],
|
|
@@ -147,6 +149,7 @@ export const plasmaTheme: MantineThemeOverride = {
|
|
|
147
149
|
},
|
|
148
150
|
error: {
|
|
149
151
|
color: theme.colors.red[9],
|
|
152
|
+
lineHeight: theme.lineHeight,
|
|
150
153
|
},
|
|
151
154
|
}),
|
|
152
155
|
},
|
|
@@ -371,5 +374,22 @@ export const plasmaTheme: MantineThemeOverride = {
|
|
|
371
374
|
},
|
|
372
375
|
}),
|
|
373
376
|
},
|
|
377
|
+
NavLink: {
|
|
378
|
+
styles: (theme) => ({
|
|
379
|
+
root: {
|
|
380
|
+
color: theme.colors.gray[6],
|
|
381
|
+
borderRadius: `${theme.defaultRadius}px 0px 0px ${theme.defaultRadius}px`,
|
|
382
|
+
},
|
|
383
|
+
label: {
|
|
384
|
+
ref: getStylesRef('label'),
|
|
385
|
+
fontWeight: 500,
|
|
386
|
+
},
|
|
387
|
+
children: {
|
|
388
|
+
[`.${getStylesRef('label')}`]: {
|
|
389
|
+
fontWeight: 300,
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
}),
|
|
393
|
+
},
|
|
374
394
|
},
|
|
375
395
|
};
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export const overrideComponent = <
|
|
10
10
|
Component extends (...args: Parameters<Component>) => ReturnType<Component>,
|
|
11
|
-
StaticProperties = Record<keyof Component, never
|
|
11
|
+
StaticProperties = Record<keyof Component, never>,
|
|
12
12
|
>(
|
|
13
13
|
component: Component,
|
|
14
|
-
properties: StaticProperties
|
|
14
|
+
properties: StaticProperties,
|
|
15
15
|
): ((...args: Parameters<Component>) => ReturnType<Component>) & Component & StaticProperties => {
|
|
16
16
|
const componentClone = (...args: Parameters<Component>) => component(...args);
|
|
17
17
|
return Object.assign(componentClone, component, properties);
|