@coveord/plasma-mantine 52.13.0 → 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 +31 -31
- 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/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 +4 -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/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 +4 -2
- package/dist/esm/theme/Theme.js.map +1 -1
- package/dist/esm/utils/overrideComponent.js.map +1 -1
- package/package.json +6 -4
- 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/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 +2 -0
- package/src/utils/overrideComponent.ts +2 -2
|
@@ -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
|
@@ -141,6 +141,7 @@ export const plasmaTheme: MantineThemeOverride = {
|
|
|
141
141
|
fontSize: theme.fontSizes.sm,
|
|
142
142
|
color: theme.colors.gray[7],
|
|
143
143
|
marginBottom: theme.spacing.xs,
|
|
144
|
+
lineHeight: theme.lineHeight,
|
|
144
145
|
},
|
|
145
146
|
invalid: {
|
|
146
147
|
color: theme.colors.red[9],
|
|
@@ -148,6 +149,7 @@ export const plasmaTheme: MantineThemeOverride = {
|
|
|
148
149
|
},
|
|
149
150
|
error: {
|
|
150
151
|
color: theme.colors.red[9],
|
|
152
|
+
lineHeight: theme.lineHeight,
|
|
151
153
|
},
|
|
152
154
|
}),
|
|
153
155
|
},
|
|
@@ -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);
|