@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/lib/components/index.d.ts +1 -0
- package/lib/components/tanstackTable/index.d.ts +1 -1
- package/lib/index.css +28 -9
- package/lib/index.d.ts +1 -0
- package/lib/index.esm.css +28 -9
- package/lib/index.esm.js +4 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin-build-tool.json +4 -0
- package/src/components/index.ts +1 -0
- package/src/components/modal/Modal.tsx +11 -15
- package/src/components/modal/styles/Modal.scss +31 -11
- package/src/components/tanstackTable/index.ts +1 -1
- package/src/index.ts +7 -0
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -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
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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:
|
|
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:
|
|
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';
|