@onewelcome/react-lib-components 0.1.6-alpha → 0.1.9-alpha
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/dist/Button/IconButton.d.ts +2 -1
- package/dist/ContextMenu/ContextMenu.d.ts +2 -3
- package/dist/ContextMenu/ContextMenuItem.d.ts +10 -3
- package/dist/DataGrid/DataGrid.d.ts +32 -0
- package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +14 -0
- package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +13 -0
- package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +17 -0
- package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +10 -0
- package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +9 -0
- package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +11 -0
- package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +10 -0
- package/dist/DataGrid/datagrid.interfaces.d.ts +13 -0
- package/dist/Form/Checkbox/Checkbox.d.ts +2 -2
- package/dist/Form/Select/Option.d.ts +9 -4
- package/dist/Form/Select/Select.d.ts +8 -2
- package/dist/Form/Toggle/Toggle.d.ts +1 -1
- package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
- package/dist/Icon/Icon.d.ts +1 -0
- package/dist/Link/Link.d.ts +4 -3
- package/dist/Notifications/BaseModal/BaseModal.d.ts +4 -2
- package/dist/Notifications/SlideInModal/SlideInModal.d.ts +4 -0
- package/dist/StatusIndicator/StatusIndicator.d.ts +9 -0
- package/dist/_BaseStyling_/BaseStyling.d.ts +4 -0
- package/dist/index.d.ts +48 -43
- package/dist/react-lib-components.cjs.development.js +3097 -2157
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +3094 -2158
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +11 -13
- package/src/Button/BaseButton.module.scss +3 -18
- package/src/Button/Button.module.scss +4 -311
- package/src/Button/IconButton.module.scss +21 -128
- package/src/Button/IconButton.test.tsx +24 -0
- package/src/Button/IconButton.tsx +6 -1
- package/src/ContextMenu/ContextMenu.test.tsx +121 -6
- package/src/ContextMenu/ContextMenu.tsx +99 -6
- package/src/ContextMenu/ContextMenuItem.tsx +57 -9
- package/src/DataGrid/DataGrid.module.scss +25 -0
- package/src/DataGrid/DataGrid.test.tsx +421 -0
- package/src/DataGrid/DataGrid.tsx +157 -0
- package/src/DataGrid/DataGridActions/DataGridActions.module.scss +35 -0
- package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +184 -0
- package/src/DataGrid/DataGridActions/DataGridActions.tsx +109 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +41 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +83 -0
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +88 -0
- package/src/DataGrid/DataGridBody/DataGridBody.module.scss +10 -0
- package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +123 -0
- package/src/DataGrid/DataGridBody/DataGridBody.tsx +80 -0
- package/src/DataGrid/DataGridBody/DataGridCell.module.scss +33 -0
- package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +74 -0
- package/src/DataGrid/DataGridBody/DataGridCell.tsx +58 -0
- package/src/DataGrid/DataGridBody/DataGridRow.module.scss +7 -0
- package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +101 -0
- package/src/DataGrid/DataGridBody/DataGridRow.tsx +42 -0
- package/src/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +258 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +26 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +255 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +103 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +68 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +128 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +72 -0
- package/src/DataGrid/datagrid.interfaces.ts +14 -0
- package/src/Form/Checkbox/Checkbox.test.tsx +144 -8
- package/src/Form/Checkbox/Checkbox.tsx +8 -8
- package/src/Form/Select/Option.tsx +39 -21
- package/src/Form/Select/Select.module.scss +1 -1
- package/src/Form/Select/Select.test.tsx +235 -56
- package/src/Form/Select/Select.tsx +194 -34
- package/src/Form/Toggle/Toggle.module.scss +1 -0
- package/src/Form/Toggle/Toggle.tsx +1 -1
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +1 -1
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +44 -0
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +4 -2
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +1 -0
- package/src/Icon/Icon.module.scss +4 -0
- package/src/Icon/Icon.tsx +1 -0
- package/src/Link/Link.module.scss +20 -0
- package/src/Link/Link.test.tsx +33 -0
- package/src/Link/Link.tsx +8 -2
- package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
- package/src/Notifications/BaseModal/BaseModal.test.tsx +77 -12
- package/src/Notifications/BaseModal/BaseModal.tsx +27 -6
- package/src/Notifications/Dialog/Dialog.module.scss +1 -1
- package/src/Notifications/Dialog/Dialog.tsx +1 -1
- package/src/Notifications/SlideInModal/SlideInModal.module.scss +36 -0
- package/src/Notifications/SlideInModal/SlideInModal.test.tsx +69 -0
- package/src/Notifications/SlideInModal/SlideInModal.tsx +31 -0
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss +1 -1
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +1 -1
- package/src/Pagination/Pagination.module.scss +74 -74
- package/src/StatusIndicator/StatusIndicator.module.scss +27 -0
- package/src/StatusIndicator/StatusIndicator.test.tsx +127 -0
- package/src/StatusIndicator/StatusIndicator.tsx +25 -0
- package/src/Tiles/Tile.module.scss +1 -1
- package/src/Tiles/Tile.test.tsx +4 -4
- package/src/_BaseStyling_/BaseStyling.tsx +14 -6
- package/src/index.ts +85 -48
- package/src/mixins.module.scss +171 -0
- package/src/readyclasses.module.scss +0 -30
|
@@ -6,48 +6,113 @@ import userEvent from '@testing-library/user-event';
|
|
|
6
6
|
const classNames = ['class11', 'class12'];
|
|
7
7
|
const containerClassNames = ['class21', 'class22'];
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const defaultParams: Props = {
|
|
10
10
|
id: 'modal',
|
|
11
11
|
open: true,
|
|
12
12
|
onClose: jest.fn(),
|
|
13
13
|
className: classNames.join(' '),
|
|
14
|
-
|
|
14
|
+
containerProps: { className: containerClassNames.join(' ') },
|
|
15
15
|
children: 'This is example dialog content.',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
const createBaseModal = (params?: (defaultParams: Props) => Props) => {
|
|
19
|
+
let parameters: Props = defaultParams;
|
|
20
|
+
if (params) {
|
|
21
|
+
parameters = params(defaultParams);
|
|
22
|
+
}
|
|
23
|
+
const queries = render(<BaseModal {...parameters} data-testid="BaseModal" />);
|
|
24
|
+
const slideInModal = queries.getByTestId('BaseModal');
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
...queries,
|
|
28
|
+
slideInModal,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
18
32
|
describe('BaseModal', () => {
|
|
19
33
|
it('renders without crashing', () => {
|
|
20
|
-
const { getByRole } =
|
|
34
|
+
const { getByRole } = createBaseModal();
|
|
21
35
|
const dialog = getByRole('dialog');
|
|
36
|
+
|
|
22
37
|
expect(dialog).toHaveAttribute('aria-modal', 'true');
|
|
23
38
|
expect(dialog).toHaveAttribute('aria-labelledby', 'modal-label');
|
|
24
39
|
expect(dialog).toHaveAttribute('aria-describedby', 'modal-description');
|
|
25
40
|
expect(dialog).toHaveAttribute('data-hidden', 'false');
|
|
26
41
|
expect(dialog).toHaveAttribute('aria-hidden', 'false');
|
|
27
|
-
expect(getByText(dialog,
|
|
42
|
+
expect(getByText(dialog, defaultParams.children as string)).toBeDefined();
|
|
28
43
|
expect(document.body).toHaveStyle('overflow: hidden');
|
|
29
44
|
});
|
|
30
45
|
|
|
31
|
-
it('should render
|
|
32
|
-
const { queryByRole } =
|
|
46
|
+
it('should render closed modal without content', () => {
|
|
47
|
+
const { queryByRole } = createBaseModal((params) => ({ ...params, open: false }));
|
|
48
|
+
|
|
33
49
|
const dialogByRole = queryByRole('dialog');
|
|
34
50
|
const dialog = document.body.children[1] as HTMLElement;
|
|
51
|
+
|
|
35
52
|
expect(dialogByRole).toBeNull();
|
|
36
53
|
expect(dialog).toHaveAttribute('aria-hidden', 'true');
|
|
37
|
-
expect(queryByText(dialog,
|
|
54
|
+
expect(queryByText(dialog, defaultParams.children as string)).toBeNull();
|
|
38
55
|
});
|
|
39
56
|
|
|
40
|
-
it('should
|
|
41
|
-
const { getByRole } =
|
|
57
|
+
it('should render closed modal with content when forceContainerOpen is provided', () => {
|
|
58
|
+
const { getByRole } = createBaseModal((params) => ({
|
|
59
|
+
...params,
|
|
60
|
+
open: false,
|
|
61
|
+
forceContainerOpen: true,
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
const modal = getByRole('dialog', { hidden: true });
|
|
65
|
+
const container = modal.querySelector('.container') as HTMLElement;
|
|
66
|
+
|
|
67
|
+
expect(container).toBeInTheDocument();
|
|
68
|
+
expect(container).toHaveAttribute('aria-hidden', 'true');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('propagates containerProps to container element', () => {
|
|
72
|
+
const { getByRole } = createBaseModal((params) => ({
|
|
73
|
+
...params,
|
|
74
|
+
open: true,
|
|
75
|
+
containerProps: {
|
|
76
|
+
id: 'container',
|
|
77
|
+
},
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
const modal = getByRole('dialog');
|
|
81
|
+
const container = modal.querySelector('.container') as HTMLElement;
|
|
82
|
+
|
|
83
|
+
expect(container).toBeInTheDocument();
|
|
84
|
+
expect(container).toHaveAttribute('id', 'container');
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('propagates backdropProps to backdrop element', () => {
|
|
88
|
+
const { getByRole } = createBaseModal((params) => ({
|
|
89
|
+
...params,
|
|
90
|
+
open: true,
|
|
91
|
+
backdropProps: {
|
|
92
|
+
id: 'backdrop',
|
|
93
|
+
},
|
|
94
|
+
}));
|
|
95
|
+
|
|
42
96
|
const modal = getByRole('dialog');
|
|
43
97
|
const backdrop = modal.querySelector('.backdrop') as HTMLElement;
|
|
44
|
-
|
|
98
|
+
|
|
99
|
+
expect(backdrop).toBeInTheDocument();
|
|
100
|
+
expect(backdrop).toHaveAttribute('id', 'backdrop');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('should handle clicking on backdrop & ESC key', () => {
|
|
104
|
+
const { getByRole } = createBaseModal();
|
|
105
|
+
|
|
106
|
+
const modal = getByRole('dialog');
|
|
107
|
+
|
|
108
|
+
const backdrop = modal.querySelector('.backdrop')!;
|
|
109
|
+
expect(defaultParams.onClose).toHaveBeenCalledTimes(0);
|
|
45
110
|
|
|
46
111
|
userEvent.click(backdrop);
|
|
47
|
-
expect(
|
|
112
|
+
expect(defaultParams.onClose).toHaveBeenCalledTimes(1);
|
|
48
113
|
|
|
49
114
|
fireEvent.keyDown(modal, { key: 'Escape' });
|
|
50
|
-
expect(
|
|
115
|
+
expect(defaultParams.onClose).toHaveBeenCalledTimes(2);
|
|
51
116
|
});
|
|
52
117
|
});
|
|
53
118
|
|
|
@@ -12,11 +12,13 @@ export interface Props extends ComponentPropsWithRef<'div'> {
|
|
|
12
12
|
open: boolean;
|
|
13
13
|
onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;
|
|
14
14
|
className?: string;
|
|
15
|
-
|
|
15
|
+
containerProps?: ComponentPropsWithRef<'div'>;
|
|
16
|
+
backdropProps?: ComponentPropsWithRef<'div'>;
|
|
16
17
|
labelledby?: string;
|
|
17
18
|
describedby?: string;
|
|
18
19
|
disableEscapeKeyDown?: boolean;
|
|
19
20
|
disableBackdrop?: boolean;
|
|
21
|
+
forceContainerOpen?: boolean;
|
|
20
22
|
zIndex?: number;
|
|
21
23
|
domRoot?: HTMLElement;
|
|
22
24
|
}
|
|
@@ -51,11 +53,13 @@ export const BaseModal = React.forwardRef<HTMLDivElement, Props>(
|
|
|
51
53
|
open,
|
|
52
54
|
onClose,
|
|
53
55
|
className = '',
|
|
54
|
-
|
|
56
|
+
containerProps,
|
|
57
|
+
backdropProps,
|
|
55
58
|
labelledby,
|
|
56
59
|
describedby,
|
|
57
60
|
disableEscapeKeyDown = false,
|
|
58
61
|
disableBackdrop = false,
|
|
62
|
+
forceContainerOpen = false,
|
|
59
63
|
zIndex,
|
|
60
64
|
domRoot = document.body,
|
|
61
65
|
...rest
|
|
@@ -78,7 +82,7 @@ export const BaseModal = React.forwardRef<HTMLDivElement, Props>(
|
|
|
78
82
|
{...rest}
|
|
79
83
|
ref={ref}
|
|
80
84
|
id={id}
|
|
81
|
-
className={`${classes['modal']} ${open
|
|
85
|
+
className={`${classes['modal']} ${open ? classes['visible'] : ''} ${className}`}
|
|
82
86
|
role="dialog"
|
|
83
87
|
aria-modal="true"
|
|
84
88
|
aria-labelledby={labelledby || labelId(id)}
|
|
@@ -89,14 +93,31 @@ export const BaseModal = React.forwardRef<HTMLDivElement, Props>(
|
|
|
89
93
|
onKeyDown={handleEscKeyPress}
|
|
90
94
|
style={{ zIndex }}
|
|
91
95
|
>
|
|
92
|
-
<div
|
|
93
|
-
|
|
96
|
+
<div
|
|
97
|
+
{...backdropProps}
|
|
98
|
+
className={`${classes['backdrop']} ${backdropProps?.className ?? ''}`}
|
|
99
|
+
onClick={handleBackdropClick}
|
|
100
|
+
></div>
|
|
101
|
+
{forceContainerOpen ? (
|
|
94
102
|
<div
|
|
103
|
+
{...containerProps}
|
|
104
|
+
aria-hidden={!open}
|
|
105
|
+
hidden={!open}
|
|
95
106
|
style={{ zIndex: zIndex && zIndex + 1 }}
|
|
96
|
-
className={`${classes['container']} ${
|
|
107
|
+
className={`${classes['container']} ${containerProps?.className ?? ''}`}
|
|
97
108
|
>
|
|
98
109
|
{children}
|
|
99
110
|
</div>
|
|
111
|
+
) : (
|
|
112
|
+
open && (
|
|
113
|
+
<div
|
|
114
|
+
{...containerProps}
|
|
115
|
+
style={{ zIndex: zIndex && zIndex + 1 }}
|
|
116
|
+
className={`${classes['container']} ${containerProps?.className ?? ''}`}
|
|
117
|
+
>
|
|
118
|
+
{children}
|
|
119
|
+
</div>
|
|
120
|
+
)
|
|
100
121
|
)}
|
|
101
122
|
</div>,
|
|
102
123
|
domRoot
|
|
@@ -74,7 +74,7 @@ export const Dialog = React.forwardRef<HTMLDivElement, Props>(
|
|
|
74
74
|
ref={ref}
|
|
75
75
|
id={dialogId}
|
|
76
76
|
className={classes['dialog']}
|
|
77
|
-
|
|
77
|
+
containerProps={{ className: classes['container'] }}
|
|
78
78
|
open={open}
|
|
79
79
|
disableBackdrop
|
|
80
80
|
onClose={onClose}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.slide-in-modal {
|
|
2
|
+
justify-content: flex-end;
|
|
3
|
+
|
|
4
|
+
visibility: visible;
|
|
5
|
+
|
|
6
|
+
transition: transform 0.5s ease-in-out;
|
|
7
|
+
transform: translate(120%);
|
|
8
|
+
|
|
9
|
+
&.hidden {
|
|
10
|
+
visibility: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.visible {
|
|
14
|
+
visibility: visible;
|
|
15
|
+
transform: translate(0%);
|
|
16
|
+
|
|
17
|
+
.backdrop-slide {
|
|
18
|
+
background-color: transparent;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.backdrop-slide {
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media only screen and (min-width: 50rem) {
|
|
28
|
+
.container {
|
|
29
|
+
margin-top: 0;
|
|
30
|
+
width: 50rem;
|
|
31
|
+
height: 100%;
|
|
32
|
+
max-height: unset;
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
box-shadow: 0 1.875rem 3.125rem var(--modal-shadow-color);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { SlideInModal } from './SlideInModal';
|
|
3
|
+
import { Props } from '../Modal/Modal';
|
|
4
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
const defaultParams: Props = {
|
|
7
|
+
id: '',
|
|
8
|
+
children: undefined,
|
|
9
|
+
open: false,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const createSlideInModal = (params?: (defaultParams: Props) => Props) => {
|
|
13
|
+
let parameters: Props = defaultParams;
|
|
14
|
+
if (params) {
|
|
15
|
+
parameters = params(defaultParams);
|
|
16
|
+
}
|
|
17
|
+
const queries = render(<SlideInModal {...parameters} data-testid="SlideInModal" />);
|
|
18
|
+
const slideInModal = queries.getByTestId('SlideInModal');
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
...queries,
|
|
22
|
+
slideInModal,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
describe('SlideInModal should render', () => {
|
|
27
|
+
it('renders without crashing', () => {
|
|
28
|
+
const { slideInModal } = createSlideInModal();
|
|
29
|
+
|
|
30
|
+
expect(slideInModal).toBeDefined();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("makes modal content's container visible after opening transition ends", () => {
|
|
34
|
+
const { slideInModal, rerender } = createSlideInModal();
|
|
35
|
+
|
|
36
|
+
expect(slideInModal).toHaveClass('hidden');
|
|
37
|
+
|
|
38
|
+
rerender(<SlideInModal {...defaultParams} open />);
|
|
39
|
+
fireEvent.transitionEnd(slideInModal);
|
|
40
|
+
|
|
41
|
+
expect(slideInModal).not.toHaveClass('hidden');
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe('ref should work', () => {
|
|
46
|
+
it('should give back the proper data prop, this also checks if the component propagates ...rest properly', () => {
|
|
47
|
+
const ExampleComponent = ({
|
|
48
|
+
propagateRef,
|
|
49
|
+
}: {
|
|
50
|
+
propagateRef?: (ref: React.RefObject<HTMLElement>) => void;
|
|
51
|
+
}) => {
|
|
52
|
+
const ref = useRef(null);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (ref.current) {
|
|
56
|
+
propagateRef && propagateRef(ref);
|
|
57
|
+
}
|
|
58
|
+
}, [ref]);
|
|
59
|
+
|
|
60
|
+
return <SlideInModal {...defaultParams} data-ref="testing" ref={ref} />;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const refCheck = (ref: React.RefObject<HTMLElement>) => {
|
|
64
|
+
expect(ref.current).toHaveAttribute('data-ref', 'testing');
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
render(<ExampleComponent propagateRef={refCheck} />);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Props as ModalProps, Modal } from '../Modal/Modal';
|
|
3
|
+
import classes from './SlideInModal.module.scss';
|
|
4
|
+
|
|
5
|
+
export const SlideInModal = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
6
|
+
({ children, id, open, ...rest }: ModalProps, ref) => {
|
|
7
|
+
const [classHideOnTransition, setClassHideOnTransition] = useState<'hidden' | ''>('hidden');
|
|
8
|
+
|
|
9
|
+
const onTransitionEnd = () => setClassHideOnTransition((prev) => (prev ? '' : 'hidden'));
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Modal
|
|
13
|
+
{...rest}
|
|
14
|
+
id={id}
|
|
15
|
+
open={open}
|
|
16
|
+
className={`${classes['slide-in-modal']} ${open ? classes['visible'] : ''} ${
|
|
17
|
+
!open ? classes[classHideOnTransition] : ''
|
|
18
|
+
}`}
|
|
19
|
+
containerProps={{ className: classes['container'] }}
|
|
20
|
+
backdropProps={{ className: classes['backdrop-slide'] }}
|
|
21
|
+
forceContainerOpen
|
|
22
|
+
onTransitionEnd={onTransitionEnd}
|
|
23
|
+
ref={ref}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</Modal>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export { Props } from '../Modal/Modal';
|
|
@@ -4,117 +4,117 @@
|
|
|
4
4
|
color: var(--greyed-out);
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
.form-element {
|
|
10
|
-
|
|
8
|
+
.form-element {
|
|
9
|
+
height: 2.5rem;
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
button {
|
|
12
|
+
min-height: 2.5rem;
|
|
13
|
+
}
|
|
14
14
|
}
|
|
15
|
-
}
|
|
16
15
|
|
|
17
|
-
.total {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
span > span {
|
|
24
|
-
font-weight: 700;
|
|
25
|
-
font-family: var(--font-family);
|
|
26
|
-
font-size: var(--font-size);
|
|
27
|
-
margin-left: 0.25rem;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
16
|
+
.total {
|
|
17
|
+
flex: 1 0 auto;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
span > span {
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
font-family: var(--font-family);
|
|
25
|
+
font-size: var(--font-size);
|
|
26
|
+
margin-left: 0.25rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
37
29
|
|
|
38
|
-
.
|
|
39
|
-
|
|
30
|
+
.pagination {
|
|
31
|
+
flex: 1 0 auto;
|
|
40
32
|
display: flex;
|
|
41
33
|
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
margin-top: 1rem;
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
.previous,
|
|
38
|
+
.next {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
|
|
42
|
+
button {
|
|
43
|
+
margin: 0.25rem;
|
|
44
|
+
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
button span:before {
|
|
47
|
+
font-size: 0.75rem;
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
}
|
|
52
51
|
|
|
53
|
-
.per-page {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
52
|
+
.per-page {
|
|
53
|
+
display: none;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
57
56
|
|
|
58
|
-
.page {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
57
|
+
.page {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
flex-basis: min-content;
|
|
61
|
+
}
|
|
63
62
|
|
|
64
|
-
.page-size-select {
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
.page-size-select {
|
|
64
|
+
border-color: #fff;
|
|
65
|
+
margin: 0 0.25rem;
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
button {
|
|
68
|
+
min-width: 3.4375rem;
|
|
69
|
+
padding: 0;
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
div[data-display] {
|
|
72
|
+
left: 0.5rem;
|
|
73
|
+
}
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
div:not([data-display]) {
|
|
76
|
+
right: 0.5rem;
|
|
77
|
+
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
}
|
|
81
80
|
|
|
82
|
-
.current-value-input {
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
.current-value-input {
|
|
82
|
+
margin: 0 0.25rem 0 0;
|
|
83
|
+
padding: 0;
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
input {
|
|
86
|
+
border-radius: var(--input-border-radius);
|
|
87
|
+
padding: 0 1rem;
|
|
88
|
+
width: auto;
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
@media screen and (min-width: 30em) {
|
|
95
95
|
.pagination-wrapper {
|
|
96
96
|
flex-direction: row;
|
|
97
|
-
}
|
|
98
97
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
.total {
|
|
99
|
+
justify-content: flex-start;
|
|
100
|
+
}
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
.pagination {
|
|
103
|
+
margin-top: 0;
|
|
104
|
+
justify-content: flex-end;
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
.previous,
|
|
107
|
+
.next {
|
|
108
|
+
button {
|
|
109
|
+
margin: 0 0.5rem;
|
|
110
|
+
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
@media screen and (min-width: 48em) {
|
|
117
|
-
.per-page {
|
|
117
|
+
.pagination-wrapper .per-page {
|
|
118
118
|
display: flex;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.status-indicator {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.status-badge {
|
|
7
|
+
width: 0.75rem;
|
|
8
|
+
height: 0.75rem;
|
|
9
|
+
margin-right: 0.5rem;
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.active {
|
|
14
|
+
background-color: var(--success);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.error {
|
|
18
|
+
background-color: var(--error);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.neutral {
|
|
22
|
+
background-color: var(--greyed-out);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.warning {
|
|
26
|
+
background-color: var(--warning);
|
|
27
|
+
}
|