@onewelcome/react-lib-components 8.1.1 → 8.2.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/dist/cjs/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/cjs/src/components/DataGrid/DataGrid.d.ts +3 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +3 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.d.ts +1 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +19 -3
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridRow/DataGridWithNestedRows.test.d.ts +1 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.d.ts +855 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +1 -0
- package/dist/cjs/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +1 -6
- package/dist/cjs/src/index.d.ts +1 -0
- package/dist/esm/DataGrid/DataGrid.esm.js +3 -3
- package/dist/esm/DataGrid/DataGrid.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js +9 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js +7 -4
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js +41 -11
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/useNestedRow.esm.js +92 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/useNestedRow.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js +13 -9
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.scss.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.module.scss.esm.js +1 -1
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.scss.esm.js +1 -1
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.scss.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -6
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/src/components/DataGrid/DataGrid.d.ts +3 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +3 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.d.ts +1 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +19 -3
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridWithNestedRows.test.d.ts +1 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.d.ts +855 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +1 -0
- package/dist/esm/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +1 -6
- package/dist/esm/src/index.d.ts +1 -0
- package/package.json +6 -5
- package/src/components/DataGrid/DataGrid.tsx +6 -0
- package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +12 -1
- package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss +6 -0
- package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.tsx +30 -5
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss +98 -5
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +83 -16
- package/src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx +143 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.tsx +15 -10
- package/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.ts +1 -0
- package/src/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss +2 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +2 -0
- package/src/components/Form/FileUpload/FileUpload.module.scss +2 -2
- package/src/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +2 -1
- package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +3 -1
- package/src/components/Notifications/Alert/alertVariables.scss +17 -0
- package/src/components/_BaseStyling_/BaseStyling.tsx +2 -12
- package/src/index.ts +1 -0
- package/src/mixins.module.scss +12 -0
|
@@ -87,6 +87,9 @@ export const DataGridFilterPopover = ({
|
|
|
87
87
|
}
|
|
88
88
|
}, [isOpen]);
|
|
89
89
|
|
|
90
|
+
const columnMetadata = columnsMetadata.find(({ name }) => name === column);
|
|
91
|
+
const disableAddNew = columnMetadata?.disableAddNew;
|
|
92
|
+
|
|
90
93
|
return (
|
|
91
94
|
<Popover
|
|
92
95
|
tabIndex={-1}
|
|
@@ -153,16 +156,18 @@ export const DataGridFilterPopover = ({
|
|
|
153
156
|
)
|
|
154
157
|
}
|
|
155
158
|
selectProps={{
|
|
156
|
-
addNew:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
addNew: disableAddNew
|
|
160
|
+
? undefined
|
|
161
|
+
: {
|
|
162
|
+
label: addNewValueLabel,
|
|
163
|
+
onAddNew: value => {
|
|
164
|
+
if (value) {
|
|
165
|
+
setValues(prev => [...prev, value]);
|
|
166
|
+
setPickedValues(prev => [...prev, value]);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
btnProps: { title: addNewValueButtonTitle, type: "button" }
|
|
170
|
+
},
|
|
166
171
|
search: {
|
|
167
172
|
enabled: true,
|
|
168
173
|
renderThreshold: 0
|
|
@@ -24,6 +24,7 @@ export interface Props extends ComponentPropsWithRef<"thead"> {
|
|
|
24
24
|
initialSort?: Sort;
|
|
25
25
|
onSort?: OnSortFunction;
|
|
26
26
|
enableExpandableRow?: boolean;
|
|
27
|
+
enableNestedRows?: boolean;
|
|
27
28
|
disableContextMenuColumn?: boolean;
|
|
28
29
|
enableMultiSorting?: boolean;
|
|
29
30
|
spacing?: React.CSSProperties;
|
|
@@ -38,6 +39,7 @@ const DataGridHeaderComponent: ForwardRefRenderFunction<HTMLTableSectionElement,
|
|
|
38
39
|
headers,
|
|
39
40
|
disableContextMenuColumn,
|
|
40
41
|
enableExpandableRow,
|
|
42
|
+
enableNestedRows,
|
|
41
43
|
enableMultiSorting,
|
|
42
44
|
spacing,
|
|
43
45
|
...rest
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
border: var(--file-upload-border-width) var(--drag-drop-border-style)
|
|
87
87
|
var(--color-blue-grey500);
|
|
88
88
|
border-radius: var(--input-border-radius);
|
|
89
|
-
background-color: var(--color-
|
|
89
|
+
background-color: var(--color-primary50);
|
|
90
90
|
|
|
91
91
|
@include transition(all, 0.2s, ease-in-out);
|
|
92
92
|
&::before {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
&:hover .outline {
|
|
102
|
-
background-color: var(--color-
|
|
102
|
+
background-color: var(--color-primary50);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
& .file-select {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
@use "../../../../mixins.module.scss";
|
|
17
17
|
@use "../../../../variables.scss";
|
|
18
|
+
@use "../alertVariables.scss";
|
|
18
19
|
|
|
19
20
|
.alerts {
|
|
20
21
|
position: fixed;
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
width: initial;
|
|
51
52
|
|
|
52
53
|
&.center {
|
|
53
|
-
left: calc(50% -
|
|
54
|
+
left: calc(50% - (alertVariables.$alert-item-width / 2));
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
@use "../../../../mixins.module.scss";
|
|
18
|
+
@use "../alertVariables.scss";
|
|
18
19
|
|
|
19
20
|
.alert {
|
|
20
21
|
padding: 1rem 0.875rem;
|
|
@@ -224,6 +225,7 @@
|
|
|
224
225
|
font-size: 0.875rem;
|
|
225
226
|
line-height: 1.25rem;
|
|
226
227
|
margin-bottom: 0;
|
|
228
|
+
word-break: break-word;
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
.actions {
|
|
@@ -272,6 +274,6 @@
|
|
|
272
274
|
@media only screen and (min-width: 37.5em) {
|
|
273
275
|
.alert {
|
|
274
276
|
width: min-content;
|
|
275
|
-
min-width:
|
|
277
|
+
min-width: alertVariables.$alert-item-width;
|
|
276
278
|
}
|
|
277
279
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
$alert-item-width: 25rem;
|
|
@@ -33,13 +33,12 @@ interface CSSProperties {
|
|
|
33
33
|
colorPrimary600?: string;
|
|
34
34
|
colorPrimary700?: string;
|
|
35
35
|
colorPrimary900?: string;
|
|
36
|
-
|
|
36
|
+
colorPrimary50?: string;
|
|
37
37
|
colorBlueGrey100?: string;
|
|
38
38
|
colorBlueGrey200?: string;
|
|
39
39
|
colorBlueGrey300?: string;
|
|
40
40
|
colorBlueGrey400?: string;
|
|
41
41
|
colorBlueGrey25?: string;
|
|
42
|
-
colorBlueGrey25Transparent?: string;
|
|
43
42
|
colorBlueGrey50?: string;
|
|
44
43
|
colorBlueGrey500?: string;
|
|
45
44
|
colorBlueGrey700?: string;
|
|
@@ -50,9 +49,6 @@ interface CSSProperties {
|
|
|
50
49
|
colorGreen500?: string;
|
|
51
50
|
colorGreen600?: string;
|
|
52
51
|
colorGreen700?: string;
|
|
53
|
-
colorLightBlue500?: string;
|
|
54
|
-
colorLightBlue600?: string;
|
|
55
|
-
colorShadowBlue?: string;
|
|
56
52
|
colorOrange100?: string;
|
|
57
53
|
colorOrange500?: string;
|
|
58
54
|
colorOrange600?: string;
|
|
@@ -116,7 +112,6 @@ interface CSSProperties {
|
|
|
116
112
|
inputHelperTextColor?: string;
|
|
117
113
|
inputHoverBackgroundColor?: string;
|
|
118
114
|
inputDisabledBackgroundColor?: string;
|
|
119
|
-
dragBackgroundColor?: string;
|
|
120
115
|
dragBorderStyle?: string;
|
|
121
116
|
modalShadowColor?: string;
|
|
122
117
|
modalBackgroundColor?: string;
|
|
@@ -220,15 +215,14 @@ export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
220
215
|
|
|
221
216
|
export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
222
217
|
const defaultProperties: CSSProperties = {
|
|
218
|
+
colorPrimary50: "#E6E7F4",
|
|
223
219
|
colorPrimary100: "#CDD0EA",
|
|
224
220
|
colorPrimary300: "#6871BF",
|
|
225
221
|
colorPrimary500: "#041295",
|
|
226
222
|
colorPrimary600: "#030F77",
|
|
227
223
|
colorPrimary700: "#020B59",
|
|
228
224
|
colorPrimary900: "#01041E",
|
|
229
|
-
colorPrimaryLight: "#E6E7F4",
|
|
230
225
|
colorBlueGrey25: "#F7F7F9",
|
|
231
|
-
colorBlueGrey25Transparent: "rgba(247, 247, 249, .8)",
|
|
232
226
|
colorBlueGrey50: "#EEEFF3",
|
|
233
227
|
colorBlueGrey100: "#DEDEE6",
|
|
234
228
|
colorBlueGrey200: "#BCBECE",
|
|
@@ -243,8 +237,6 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
243
237
|
colorGreen500: "#178244",
|
|
244
238
|
colorGreen600: "#126836",
|
|
245
239
|
colorGreen700: "#0E4E29",
|
|
246
|
-
colorLightBlue500: "#00BCDD",
|
|
247
|
-
colorLightBlue600: "#0096B1",
|
|
248
240
|
colorOrange100: "#FFE0B2",
|
|
249
241
|
colorOrange500: "#E07900",
|
|
250
242
|
colorOrange600: "#B36100",
|
|
@@ -257,7 +249,6 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
257
249
|
colorBlack100: "#000000",
|
|
258
250
|
colorBlack20: "rgba(0, 0, 0, 0.2)",
|
|
259
251
|
colorBlack10: "rgba(0, 0, 0, 0.1)",
|
|
260
|
-
colorShadowBlue: "#7078C3",
|
|
261
252
|
colorWhite: "#FFFFFF",
|
|
262
253
|
colorFocus: "var(--color-primary300)",
|
|
263
254
|
colorPrimary: "var(--color-primary500)",
|
|
@@ -315,7 +306,6 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
315
306
|
inputHelperTextColor: "var(--color-blue-grey500)",
|
|
316
307
|
inputHoverBackgroundColor: "var(--default-hover-color)",
|
|
317
308
|
inputDisabledBackgroundColor: "var(--input-hover-background-color)",
|
|
318
|
-
dragBackgroundColor: "var(--color-blue-grey25-transparent)",
|
|
319
309
|
dragBorderStyle: "solid",
|
|
320
310
|
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
321
311
|
modalBackgroundColor: "var(--light)",
|
package/src/index.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
/* Components */
|
|
18
18
|
export { BaseStyling } from "./components/_BaseStyling_/BaseStyling";
|
|
19
|
+
export type { Props as BaseStylingProps } from "./components/_BaseStyling_/BaseStyling";
|
|
19
20
|
export { Button } from "./components/Button/Button";
|
|
20
21
|
export type { Props as ButtonProps } from "./components/Button/Button";
|
|
21
22
|
export { Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
|
package/src/mixins.module.scss
CHANGED
|
@@ -312,3 +312,15 @@
|
|
|
312
312
|
border-color: $border-color;
|
|
313
313
|
padding-left: calc(1rem - var(--alert-border-width));
|
|
314
314
|
}
|
|
315
|
+
|
|
316
|
+
@mixin searchInputPointer($inputType, $selector) {
|
|
317
|
+
@if $selector {
|
|
318
|
+
#{$selector} {
|
|
319
|
+
@if $inputType == "search" {
|
|
320
|
+
input[type="search"]::-webkit-search-cancel-button {
|
|
321
|
+
cursor: pointer;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|