@onewelcome/react-lib-components 0.1.5-alpha → 0.1.8-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.
Files changed (105) hide show
  1. package/dist/Button/IconButton.d.ts +2 -1
  2. package/dist/ContextMenu/ContextMenu.d.ts +2 -3
  3. package/dist/ContextMenu/ContextMenuItem.d.ts +10 -3
  4. package/dist/DataGrid/DataGrid.d.ts +30 -0
  5. package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +14 -0
  6. package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +13 -0
  7. package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +16 -0
  8. package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +6 -0
  9. package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +7 -0
  10. package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +10 -0
  11. package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +10 -0
  12. package/dist/DataGrid/datagrid.interfaces.d.ts +13 -0
  13. package/dist/Form/Checkbox/Checkbox.d.ts +2 -2
  14. package/dist/Form/Select/Option.d.ts +9 -4
  15. package/dist/Form/Select/Select.d.ts +8 -2
  16. package/dist/Form/Toggle/Toggle.d.ts +1 -1
  17. package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
  18. package/dist/Icon/Icon.d.ts +1 -0
  19. package/dist/Link/Link.d.ts +4 -3
  20. package/dist/Notifications/BaseModal/BaseModal.d.ts +4 -2
  21. package/dist/Notifications/SlideInModal/SlideInModal.d.ts +4 -0
  22. package/dist/StatusIndicator/StatusIndicator.d.ts +9 -0
  23. package/dist/_BaseStyling_/BaseStyling.d.ts +4 -0
  24. package/dist/hooks/useSpacing.d.ts +1 -1
  25. package/dist/hooks/useWrapper.d.ts +1 -1
  26. package/dist/index.d.ts +48 -43
  27. package/dist/react-lib-components.cjs.development.js +2900 -2049
  28. package/dist/react-lib-components.cjs.development.js.map +1 -1
  29. package/dist/react-lib-components.cjs.production.min.js +1 -1
  30. package/dist/react-lib-components.cjs.production.min.js.map +1 -1
  31. package/dist/react-lib-components.esm.js +2897 -2050
  32. package/dist/react-lib-components.esm.js.map +1 -1
  33. package/dist/util/helper.d.ts +1 -1
  34. package/package.json +11 -11
  35. package/src/Button/BaseButton.module.scss +3 -18
  36. package/src/Button/Button.module.scss +4 -311
  37. package/src/Button/IconButton.module.scss +21 -128
  38. package/src/Button/IconButton.test.tsx +24 -0
  39. package/src/Button/IconButton.tsx +6 -1
  40. package/src/ContextMenu/ContextMenu.test.tsx +121 -6
  41. package/src/ContextMenu/ContextMenu.tsx +99 -6
  42. package/src/ContextMenu/ContextMenuItem.tsx +57 -9
  43. package/src/DataGrid/DataGrid.module.scss +21 -0
  44. package/src/DataGrid/DataGrid.test.tsx +276 -0
  45. package/src/DataGrid/DataGrid.tsx +101 -0
  46. package/src/DataGrid/DataGridActions/DataGridActions.module.scss +35 -0
  47. package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +184 -0
  48. package/src/DataGrid/DataGridActions/DataGridActions.tsx +109 -0
  49. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +41 -0
  50. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +83 -0
  51. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +88 -0
  52. package/src/DataGrid/DataGridBody/DataGridBody.module.scss +10 -0
  53. package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +123 -0
  54. package/src/DataGrid/DataGridBody/DataGridBody.tsx +64 -0
  55. package/src/DataGrid/DataGridBody/DataGridCell.module.scss +33 -0
  56. package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +74 -0
  57. package/src/DataGrid/DataGridBody/DataGridCell.tsx +25 -0
  58. package/src/DataGrid/DataGridBody/DataGridRow.module.scss +7 -0
  59. package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +101 -0
  60. package/src/DataGrid/DataGridBody/DataGridRow.tsx +27 -0
  61. package/src/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +258 -0
  62. package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +26 -0
  63. package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +255 -0
  64. package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +80 -0
  65. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +68 -0
  66. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +128 -0
  67. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +72 -0
  68. package/src/DataGrid/datagrid.interfaces.ts +14 -0
  69. package/src/Form/Checkbox/Checkbox.test.tsx +144 -8
  70. package/src/Form/Checkbox/Checkbox.tsx +8 -8
  71. package/src/Form/Select/Option.tsx +39 -21
  72. package/src/Form/Select/Select.module.scss +1 -1
  73. package/src/Form/Select/Select.test.tsx +235 -56
  74. package/src/Form/Select/Select.tsx +194 -34
  75. package/src/Form/Toggle/Toggle.module.scss +1 -0
  76. package/src/Form/Toggle/Toggle.test.tsx +45 -19
  77. package/src/Form/Toggle/Toggle.tsx +3 -3
  78. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +1 -1
  79. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +44 -0
  80. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +4 -2
  81. package/src/Icon/Icon.module.scss +4 -0
  82. package/src/Icon/Icon.tsx +1 -0
  83. package/src/Link/Link.module.scss +20 -0
  84. package/src/Link/Link.test.tsx +33 -0
  85. package/src/Link/Link.tsx +8 -2
  86. package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
  87. package/src/Notifications/BaseModal/BaseModal.test.tsx +77 -12
  88. package/src/Notifications/BaseModal/BaseModal.tsx +27 -6
  89. package/src/Notifications/Dialog/Dialog.module.scss +1 -1
  90. package/src/Notifications/Dialog/Dialog.tsx +1 -1
  91. package/src/Notifications/SlideInModal/SlideInModal.module.scss +36 -0
  92. package/src/Notifications/SlideInModal/SlideInModal.test.tsx +69 -0
  93. package/src/Notifications/SlideInModal/SlideInModal.tsx +31 -0
  94. package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss +1 -1
  95. package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +1 -1
  96. package/src/Pagination/Pagination.module.scss +74 -74
  97. package/src/StatusIndicator/StatusIndicator.module.scss +27 -0
  98. package/src/StatusIndicator/StatusIndicator.test.tsx +127 -0
  99. package/src/StatusIndicator/StatusIndicator.tsx +25 -0
  100. package/src/Tiles/Tile.module.scss +1 -1
  101. package/src/Tiles/Tile.test.tsx +4 -4
  102. package/src/_BaseStyling_/BaseStyling.tsx +14 -6
  103. package/src/index.ts +85 -48
  104. package/src/mixins.module.scss +171 -0
  105. package/src/readyclasses.module.scss +0 -30
package/src/Link/Link.tsx CHANGED
@@ -7,11 +7,13 @@ import React, {
7
7
  import classes from './Link.module.scss';
8
8
  import { LinkProps } from './types';
9
9
 
10
- type AnchorType = 'external' | 'internal' | 'download';
10
+ export type AnchorType = 'external' | 'internal' | 'download';
11
11
 
12
12
  export interface Props extends ComponentPropsWithRef<'a'> {
13
13
  children?: ReactNode;
14
14
  color?: 'primary' | 'secondary' | 'tertiary';
15
+ display?: 'link' | 'button';
16
+ buttonVariant?: 'outline' | 'text' | 'fill';
15
17
  type?: AnchorType;
16
18
  to: string;
17
19
  disabled?: boolean;
@@ -27,6 +29,8 @@ export const Link = React.forwardRef<HTMLAnchorElement, Props>(
27
29
  to,
28
30
  color = 'primary',
29
31
  type = 'internal',
32
+ display = 'link',
33
+ buttonVariant = 'fill',
30
34
  component,
31
35
  ...rest
32
36
  }: Props,
@@ -44,7 +48,9 @@ export const Link = React.forwardRef<HTMLAnchorElement, Props>(
44
48
  return '';
45
49
  };
46
50
 
47
- const classNames = [classes['link'], classes[color]];
51
+ const classNames = [classes[color]];
52
+ display === 'link' && classNames.push(classes['link']);
53
+ display === 'button' && classNames.push(classes['button'], classes[buttonVariant]);
48
54
  disabled && classNames.push(classes['disabled']);
49
55
  className && classNames.push(className);
50
56
 
@@ -46,7 +46,7 @@ $marginTop: 3.125rem;
46
46
  flex-direction: column;
47
47
  }
48
48
 
49
- @media only screen and (min-width: 50rem) {
49
+ @media only screen and (min-width: 50em) {
50
50
  .container {
51
51
  margin-top: $marginTop;
52
52
  width: 50rem;
@@ -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 initParams: Props = {
9
+ const defaultParams: Props = {
10
10
  id: 'modal',
11
11
  open: true,
12
12
  onClose: jest.fn(),
13
13
  className: classNames.join(' '),
14
- containerClassName: containerClassNames.join(' '),
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 } = render(<BaseModal {...initParams} />);
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, initParams.children as string)).toBeDefined();
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 close modal without content', () => {
32
- const { queryByRole } = render(<BaseModal {...initParams} open={false} />);
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, initParams.children as string)).toBeNull();
54
+ expect(queryByText(dialog, defaultParams.children as string)).toBeNull();
38
55
  });
39
56
 
40
- it('should handle clicking on backdrop & ESC key', () => {
41
- const { getByRole } = render(<BaseModal {...initParams} />);
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
- expect(initParams.onClose).toHaveBeenCalledTimes(0);
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(initParams.onClose).toHaveBeenCalledTimes(1);
112
+ expect(defaultParams.onClose).toHaveBeenCalledTimes(1);
48
113
 
49
114
  fireEvent.keyDown(modal, { key: 'Escape' });
50
- expect(initParams.onClose).toHaveBeenCalledTimes(2);
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
- containerClassName?: string;
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
- containerClassName = '',
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 && classes['visible']} ${className}`}
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 className={classes['backdrop']} onClick={handleBackdropClick}></div>
93
- {open && (
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']} ${containerClassName}`}
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
@@ -2,7 +2,7 @@
2
2
  align-items: center;
3
3
  }
4
4
 
5
- @media only screen and (min-width: 800px) {
5
+ @media only screen and (min-width: 50em) {
6
6
  .container {
7
7
  width: auto;
8
8
  max-width: 440px;
@@ -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
- containerClassName={classes['container']}
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';
@@ -24,7 +24,7 @@
24
24
  }
25
25
  }
26
26
 
27
- @media only screen and (min-width: 37.5rem) {
27
+ @media only screen and (min-width: 37.5em) {
28
28
  .snackbars {
29
29
  width: initial;
30
30
 
@@ -128,7 +128,7 @@
128
128
  }
129
129
  }
130
130
 
131
- @media only screen and (min-width: 37.5rem) {
131
+ @media only screen and (min-width: 37.5em) {
132
132
  .snackbar {
133
133
  width: 37.5rem;
134
134
  }
@@ -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
- height: 2.5rem;
8
+ .form-element {
9
+ height: 2.5rem;
11
10
 
12
- button {
13
- min-height: 2.5rem;
11
+ button {
12
+ min-height: 2.5rem;
13
+ }
14
14
  }
15
- }
16
15
 
17
- .total {
18
- flex: 1 0 auto;
19
- display: flex;
20
- align-items: center;
21
- justify-content: center;
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
- .pagination {
32
- flex: 1 0 auto;
33
- display: flex;
34
- align-items: center;
35
- justify-content: center;
36
- margin-top: 1rem;
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
- .previous,
39
- .next {
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
- button {
44
- margin: 0.25rem;
45
- }
37
+ .previous,
38
+ .next {
39
+ display: flex;
40
+ align-items: center;
41
+
42
+ button {
43
+ margin: 0.25rem;
44
+ }
46
45
 
47
- button span:before {
48
- font-size: 0.75rem;
46
+ button span:before {
47
+ font-size: 0.75rem;
48
+ }
49
49
  }
50
50
  }
51
- }
52
51
 
53
- .per-page {
54
- display: none;
55
- align-items: center;
56
- }
52
+ .per-page {
53
+ display: none;
54
+ align-items: center;
55
+ }
57
56
 
58
- .page {
59
- display: flex;
60
- align-items: center;
61
- flex-basis: min-content;
62
- }
57
+ .page {
58
+ display: flex;
59
+ align-items: center;
60
+ flex-basis: min-content;
61
+ }
63
62
 
64
- .page-size-select {
65
- border-color: #fff;
66
- margin: 0 0.25rem;
63
+ .page-size-select {
64
+ border-color: #fff;
65
+ margin: 0 0.25rem;
67
66
 
68
- button {
69
- min-width: 55px;
70
- padding: 0;
67
+ button {
68
+ min-width: 3.4375rem;
69
+ padding: 0;
71
70
 
72
- div[data-display] {
73
- left: 0.5rem;
74
- }
71
+ div[data-display] {
72
+ left: 0.5rem;
73
+ }
75
74
 
76
- div:not([data-display]) {
77
- right: 0.5rem;
75
+ div:not([data-display]) {
76
+ right: 0.5rem;
77
+ }
78
78
  }
79
79
  }
80
- }
81
80
 
82
- .current-value-input {
83
- margin: 0 0.25rem 0 0;
84
- padding: 0;
81
+ .current-value-input {
82
+ margin: 0 0.25rem 0 0;
83
+ padding: 0;
85
84
 
86
- input {
87
- border-radius: var(--input-border-radius);
88
- padding: 0 1rem;
89
- width: auto;
90
- text-align: center;
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
- .total {
100
- justify-content: flex-start;
101
- }
98
+ .total {
99
+ justify-content: flex-start;
100
+ }
102
101
 
103
- .pagination {
104
- margin-top: 0;
105
- justify-content: flex-end;
102
+ .pagination {
103
+ margin-top: 0;
104
+ justify-content: flex-end;
106
105
 
107
- .previous,
108
- .next {
109
- button {
110
- margin: 0.5rem;
106
+ .previous,
107
+ .next {
108
+ button {
109
+ margin: 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
+ }