@indico-data/design-system 2.51.1 → 2.52.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "2.51.1",
3
+ "version": "2.52.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -0,0 +1,4 @@
1
+ {
2
+ "harness_lang": "JavaScript,TypeScript,CSS",
3
+ "harness_build_tool": "Node"
4
+ }
@@ -21,3 +21,4 @@ export { InputDateRangePicker } from './forms/date/inputDateRangePicker';
21
21
  export { Modal } from './modal';
22
22
  export { Badge } from './badge';
23
23
  export { Pagination } from './pagination';
24
+ export { TanstackTable } from './tanstackTable';
@@ -11,7 +11,9 @@ export const Modal = ({
11
11
  onRequestClose,
12
12
  portalClassName,
13
13
  overlayClassName,
14
- appElement,
14
+ appElement = document.getElementById('theme-root') ||
15
+ document.getElementById('root') ||
16
+ document.body,
15
17
  shouldCloseOnOverlayClick,
16
18
  shouldCloseOnEsc,
17
19
  testId,
@@ -42,20 +44,14 @@ export const Modal = ({
42
44
  {...rest}
43
45
  >
44
46
  <div className="modal-content">
45
- <div className="modal-header">
46
- <Row nogutter>
47
- <Col xs={12} className="modal-close">
48
- <Button
49
- className="modal-close-button"
50
- onClick={onRequestClose}
51
- variant="link"
52
- size="md"
53
- iconLeft="fa-xmark"
54
- ariaLabel="Close"
55
- />
56
- </Col>
57
- </Row>
58
- </div>
47
+ <Button
48
+ className="modal-close-button"
49
+ onClick={onRequestClose}
50
+ variant="link"
51
+ size="md"
52
+ iconLeft="x-close"
53
+ ariaLabel="Close"
54
+ />
59
55
  <div className="modal-body">{children}</div>
60
56
  </div>
61
57
  </ReactModal>
@@ -1,6 +1,14 @@
1
1
  // Common Variables
2
2
  :root {
3
3
  --pf-modal-rounded: var(--pf-rounded-lg);
4
+ --pf-modal-close-button-top: var(--pf-margin-2);
5
+ --pf-modal-close-button-right: var(--pf-margin-2);
6
+ --pf-modal-close-button-padding: var(--pf-padding-3) var(--pf-padding-4);
7
+ --pf-modal-close-button-font-size: var(--pf-font-size-caption);
8
+ --pf-modal-close-button-icon-size: var(--pf-font-size-caption);
9
+ --pf-modal-overlay-background: rgba(0, 0, 0, 0.5);
10
+ --pf-modal-overlay-transition: opacity 100ms ease-in-out;
11
+ --pf-modal-content-padding: var(--pf-padding-10);
4
12
  }
5
13
 
6
14
  // Light Theme Specific Variables
@@ -23,14 +31,14 @@
23
31
  left: 0;
24
32
  right: 0;
25
33
  bottom: 0;
26
- background-color: rgba(0, 0, 0, 0.5);
34
+ background-color: var(--pf-modal-overlay-background);
27
35
  display: flex;
28
36
  align-items: center;
29
37
  justify-content: center;
30
38
  }
31
39
  .ReactModal__Overlay {
32
40
  opacity: 0;
33
- transition: opacity 100ms ease-in-out;
41
+ transition: var(--pf-modal-overlay-transition);
34
42
  }
35
43
 
36
44
  .ReactModal__Overlay--after-open {
@@ -41,7 +49,6 @@
41
49
  opacity: 0;
42
50
  }
43
51
 
44
- // New CSS
45
52
  .modal {
46
53
  position: absolute;
47
54
  left: 50%;
@@ -59,29 +66,42 @@
59
66
  top: 50px;
60
67
  }
61
68
 
69
+ .modal-close-button {
70
+ position: absolute;
71
+ top: var(--pf-modal-close-button-top);
72
+ right: var(--pf-modal-close-button-right);
73
+ padding: var(--pf-modal-close-button-padding);
74
+ font-size: var(--pf-modal-close-button-font-size);
75
+ line-height: 1;
76
+
77
+ &.btn .icon {
78
+ width: var(--pf-modal-close-button-icon-size) !important;
79
+ height: var(--pf-modal-close-button-icon-size);
80
+
81
+ svg {
82
+ width: 100%;
83
+ height: 100%;
84
+ }
85
+ }
86
+ }
87
+
62
88
  .modal-content {
89
+ position: relative;
63
90
  background-color: var(--pf-modal-background-color);
64
91
  border: var(--pf-border-sm) solid var(--pf-modal-border-color);
65
92
  border-radius: var(--pf-modal-rounded);
93
+ padding: var(--pf-modal-content-padding);
66
94
 
67
95
  .modal-body {
68
- padding: var(--pf-padding-8);
69
- padding-top: 0;
70
-
71
96
  h2 {
72
97
  font-size: var(--pf-font-size-h1);
73
98
  }
74
99
 
75
- // We should build a divider component for this
76
100
  hr {
77
101
  margin-top: var(--pf-margin-8);
78
102
  margin-bottom: var(--pf-margin-8);
79
103
  border: var(--pf-border-sm) solid var(--pf-border-color);
80
104
  }
81
105
  }
82
-
83
- .modal-close {
84
- text-align: right;
85
- }
86
106
  }
87
107
  }
@@ -1,2 +1,2 @@
1
- export type { ColumnDef } from '@tanstack/react-table';
1
+ export type { ColumnDef, Row, Table } from '@tanstack/react-table';
2
2
  export { TanstackTable } from './TanstakTable';
package/src/index.ts CHANGED
@@ -32,3 +32,10 @@ export { TanstackTable } from './components/tanstackTable';
32
32
 
33
33
  // Utilities
34
34
  export { registerFontAwesomeIcons } from './setup/setupIcons';
35
+
36
+ // Types
37
+ export type {
38
+ ColumnDef,
39
+ Row as TanstackTableRowType,
40
+ Table as TanstackTableType,
41
+ } from '@tanstack/react-table';