@innovaccer/design-system 2.30.1 → 2.31.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.
@@ -24,11 +24,12 @@
24
24
 
25
25
  .Grid--resource .Grid-row--body:active,
26
26
  .Grid--resource .Grid-row--body:active .Grid-cellGroup {
27
- background: var(--warning-lightest) !important;
27
+ background: var(--secondary-lighter);
28
28
  }
29
29
 
30
30
  .Grid--resource .Grid-row--body:focus {
31
- outline-color: var(--warning);
31
+ box-shadow: var(--shadow-spread) color-mod(var(--secondary) a(var(--opacity-16)));
32
+ outline: none;
32
33
  }
33
34
 
34
35
  .Grid--pinned {
@@ -136,6 +137,8 @@
136
137
  flex-shrink: 0;
137
138
  box-sizing: border-box;
138
139
  background: var(--white);
140
+ transition: var(--duration--fast-02) var(--standard-productive-curve);
141
+ transition-delay: var(--duration--fast-01);
139
142
  }
140
143
 
141
144
  .Grid-row--body {
@@ -144,7 +147,24 @@
144
147
 
145
148
  .Grid-row--selected,
146
149
  .Grid-row--selected .Grid-cellGroup {
147
- background: var(--warning-lightest) !important;
150
+ background: color-mod(var(--primary-lightest) a(var(--opacity-48)));
151
+ transition: var(--duration--fast-02) var(--standard-productive-curve);
152
+ }
153
+
154
+ .Grid-row--selected:hover,
155
+ .Grid-row--selected .Grid-cellGroup:hover {
156
+ background: color-mod(var(--primary-lighter) a(var(--opacity-48))) !important;
157
+ }
158
+
159
+ .Grid-row--selected:active,
160
+ .Grid-row--selected .Grid-cellGroup:active {
161
+ background: var(--primary-lighter) !important;
162
+ }
163
+
164
+ .Grid-row--selected:focus,
165
+ .Grid-row--selected .Grid-cellGroup:focus {
166
+ outline: none;
167
+ box-shadow: var(--shadow-spread) color-mod(var(--primary) a(var(--opacity-16)));
148
168
  }
149
169
 
150
170
  .Grid-rowWrapper:last-child .Grid-row--body {
@@ -223,7 +243,7 @@
223
243
  } */
224
244
 
225
245
  .Grid-row--disabled {
226
- opacity: 0.4;
246
+ opacity: var(--opacity-40);
227
247
  pointer-events: none;
228
248
  }
229
249
 
@@ -55,11 +55,24 @@
55
55
  }
56
56
 
57
57
  .Listbox-item--option:active {
58
- background: rgba(255, 245, 199, 0.6);
58
+ background: var(--secondary-lighter);
59
59
  }
60
60
 
61
61
  .Listbox-item--selected {
62
- background: rgba(255, 245, 199, 0.6);
62
+ background: color-mod(var(--primary-lightest) a(var(--opacity-48)));
63
+ }
64
+
65
+ .Listbox-item--selected:hover {
66
+ background: color-mod(var(--primary-lighter) a(var(--opacity-48)));
67
+ }
68
+
69
+ .Listbox-item--selected:focus,
70
+ .Listbox-item--selected:focus-visible {
71
+ outline: 3px auto color-mod(var(--primary-shadow));
72
+ }
73
+
74
+ .Listbox-item--selected:active {
75
+ background: var(--primary-lighter);
63
76
  }
64
77
 
65
78
  /* Listbox type - resource */
@@ -78,11 +91,11 @@
78
91
  }
79
92
 
80
93
  .Listbox-item--resource:active {
81
- background: rgba(255, 245, 199, 0.6);
94
+ background: var(--secondary-lighter);
82
95
  }
83
96
 
84
97
  .Listbox-item--activated {
85
- background: rgba(255, 245, 199, 0.6);
98
+ background: var(--primary-lightest);
86
99
  }
87
100
 
88
101
  /* Listbox type - description */
@@ -95,7 +108,7 @@
95
108
  /* Listbox type - disabled */
96
109
 
97
110
  .Listbox-item--disabled {
98
- opacity: 0.4;
111
+ opacity: var(--opacity-40);
99
112
  pointer-events: none;
100
113
  }
101
114
 
@@ -20,3 +20,17 @@
20
20
  padding: var(--spacing) 0;
21
21
  border-top: var(--border);
22
22
  }
23
+
24
+ .Table-Header--Divider {
25
+ height: var(--spacing-xl);
26
+ }
27
+
28
+ .Table-Header-Label--hide {
29
+ animation: fadeOut var(--duration--fast-02) var(--exit-productive-curve);
30
+ animation-fill-mode: forwards;
31
+ }
32
+
33
+ .Table-Header-Label--show {
34
+ animation: fadeIn var(--duration--moderate-01) var(--entrance-productive-curve);
35
+ animation-fill-mode: forwards;
36
+ }
@@ -772,7 +772,7 @@
772
772
  "affectsGlobalScope": false
773
773
  },
774
774
  "../../core/components/molecules/editableDropdown/EditableDropdown.tsx": {
775
- "version": "aff9e7ff18391927e4b8d5fabe35c183530d1dca708c054bda7b37128561fb99",
775
+ "version": "3e5bfbee40aa4eec1fadc0dc76b0f12d8a2c62ab23f5cb1e183297f1e2c37820",
776
776
  "signature": "302fc70d29def09fc588806c4c2a49285cead7cdc4bc67b3a2a5422b1efd89af",
777
777
  "affectsGlobalScope": false
778
778
  },
@@ -1002,7 +1002,7 @@
1002
1002
  "affectsGlobalScope": false
1003
1003
  },
1004
1004
  "../../core/components/molecules/tooltip/Tooltip.tsx": {
1005
- "version": "74cb70b549c4db23e2cb566a8b8878828f75a260d698577b58bd9d8ce94f0e6c",
1005
+ "version": "20e09cda490a406aa08597ac90cc2579e6ce2871e121f762f9ed62521dc189fb",
1006
1006
  "signature": "18a703cc805327b35dedf03be1340d605b0e5cf382298e25d31b6de5a89e0216",
1007
1007
  "affectsGlobalScope": false
1008
1008
  },
@@ -1382,8 +1382,8 @@
1382
1382
  "affectsGlobalScope": false
1383
1383
  },
1384
1384
  "../../core/components/organisms/grid/utility.tsx": {
1385
- "version": "21c97e62504eed458a5d78d6400407632f4c11138562a3c55b53a51a5c113e59",
1386
- "signature": "8b1aa3bcb094b0f75fd2c6c9790e6d2de8f0a414c3859b45a27bd7135dd94be1",
1385
+ "version": "5eb4597223f5a50136e484df7cea58635191d235b8857a9bfc342ea41f5c9ce5",
1386
+ "signature": "cadb97eba5cde99055f17378baa97eb021b5dd0d8ce6e9ed0183c567ecb8910f",
1387
1387
  "affectsGlobalScope": false
1388
1388
  },
1389
1389
  "../../core/components/organisms/grid/defaultProps.tsx": {
@@ -1422,8 +1422,8 @@
1422
1422
  "affectsGlobalScope": false
1423
1423
  },
1424
1424
  "../../core/components/organisms/grid/Grid.tsx": {
1425
- "version": "6269cf40c8e9d1658e649ddec58df0fa99b40b1c3cca6d11c41f550a9f81ca61",
1426
- "signature": "d4c931213391f40cdc4e0a9af0e5f8ef76d328f5d84a27187aa95b4490ecec47",
1425
+ "version": "4aa3c4bf2ba77cc921abe475614dfe4d752b724074fa17da8f0c2542ffaf82b3",
1426
+ "signature": "0cdae61f00458ab061378bb8e8f5e7e03a6da3e93bfd45cf6e104d7d0deb7fa4",
1427
1427
  "affectsGlobalScope": false
1428
1428
  },
1429
1429
  "../../core/components/organisms/grid/index.tsx": {
@@ -1442,13 +1442,18 @@
1442
1442
  "affectsGlobalScope": false
1443
1443
  },
1444
1444
  "../../core/components/organisms/table/Header.tsx": {
1445
- "version": "64e821f9082c93ffac6c88e60fce181171561f793d7b523cc79152aaa56d8db4",
1446
- "signature": "313fe10290a0d84dbd5b25edb1829b22c68a7c14f036a1540f94a826ece62688",
1445
+ "version": "83707cf85387fcdd0fd573238510fd819ddcf64fe80fa8bee497b4ad71aa1040",
1446
+ "signature": "a15955f6aa0ca3d2d2cd6b8619b5a9bea81500fad8d18515c3914f8605e56688",
1447
+ "affectsGlobalScope": false
1448
+ },
1449
+ "../../core/components/organisms/table/utils.tsx": {
1450
+ "version": "22c72eb66d3854b8f01f77cc7ea33e4b0ce02899b6499fd4bab695ea31ae32f7",
1451
+ "signature": "2f9fd66ccdd1799bf995a0f8a5aa81cf3243a96fb874b5fa26fb433a99e752c5",
1447
1452
  "affectsGlobalScope": false
1448
1453
  },
1449
1454
  "../../core/components/organisms/table/Table.tsx": {
1450
- "version": "ddc606030d484f09735dc44a215d34d71ee861df12277a13c5fd8bf81f41ff81",
1451
- "signature": "30f7e42f75e052c2854cc6c8e4316b8aabea6fc8960f4051a3171d4dfd467296",
1455
+ "version": "420d8c23b537b8fa2bab3e7e16b0e1825b8b579dda20fd6d29128da3c97b388b",
1456
+ "signature": "d1b01f382f3550d66f528697b3255a8322e143078ff37888c1ad2a1db87f4dc2",
1452
1457
  "affectsGlobalScope": false
1453
1458
  },
1454
1459
  "../../core/components/organisms/table/index.tsx": {
@@ -5263,6 +5268,9 @@
5263
5268
  "*",
5264
5269
  "*",
5265
5270
  "*",
5271
+ "*",
5272
+ "*",
5273
+ "*",
5266
5274
  "*"
5267
5275
  ]
5268
5276
  },
@@ -7359,13 +7367,15 @@
7359
7367
  "../../core/index.tsx",
7360
7368
  "../../core/index.type.tsx",
7361
7369
  "../../node_modules/@types/node/util.d.ts",
7362
- "../../node_modules/@types/react/index.d.ts"
7370
+ "../../node_modules/@types/react/index.d.ts",
7371
+ "../../node_modules/classnames/index.d.ts"
7363
7372
  ],
7364
7373
  "../../core/components/organisms/table/Table.tsx": [
7365
7374
  "../../core/components/molecules/pagination/index.tsx",
7366
7375
  "../../core/components/organisms/grid/index.tsx",
7367
7376
  "../../core/components/organisms/grid/utility.tsx",
7368
7377
  "../../core/components/organisms/table/Header.tsx",
7378
+ "../../core/components/organisms/table/utils.tsx",
7369
7379
  "../../core/index.tsx",
7370
7380
  "../../core/utils/types.tsx",
7371
7381
  "../../node_modules/@types/node/util.d.ts",
@@ -7376,6 +7386,10 @@
7376
7386
  "../../core/components/organisms/table/Table.tsx",
7377
7387
  "../../node_modules/@types/node/util.d.ts"
7378
7388
  ],
7389
+ "../../core/components/organisms/table/utils.tsx": [
7390
+ "../../core/components/organisms/grid/index.tsx",
7391
+ "../../node_modules/@types/node/util.d.ts"
7392
+ ],
7379
7393
  "../../core/components/organisms/textField/TextField.tsx": [
7380
7394
  "../../core/components/organisms/textField/TextFieldWithInput.tsx",
7381
7395
  "../../core/components/organisms/textField/TextFieldWithTextarea.tsx",
@@ -13172,6 +13186,7 @@
13172
13186
  "../../core/components/organisms/table/Header.tsx",
13173
13187
  "../../core/components/organisms/table/Table.tsx",
13174
13188
  "../../core/components/organisms/table/index.tsx",
13189
+ "../../core/components/organisms/table/utils.tsx",
13175
13190
  "../../core/components/organisms/textField/TextField.tsx",
13176
13191
  "../../core/components/organisms/textField/TextFieldCommon.tsx",
13177
13192
  "../../core/components/organisms/textField/TextFieldWithInput.tsx",
@@ -36,7 +36,7 @@ export declare type sortDataFunction = (comparator: Comparator, type: SortType)
36
36
  export declare type reorderColumnFunction = (from: string, to: string) => void;
37
37
  export declare type onSelectFn = (rowIndex: number, selected: boolean) => void;
38
38
  export declare type onFilterChangeFn = (name: ColumnSchema['name'], selected: any) => void;
39
- export declare type onSelectAllFunction = (selected: boolean, selectAll?: boolean) => void;
39
+ export declare type onSelectAllFunction = (selected: boolean, selectAll?: boolean, headerCheckbox?: boolean) => void;
40
40
  export declare type onFilterChangeFunction = (data: RowData, filters: Filter) => boolean;
41
41
  export declare type onRowClickFunction = (data: RowData, rowIndex?: number) => void;
42
42
  export declare type onMenuChangeFn = (name: ColumnSchema['name'], selected: any) => void;
@@ -4,7 +4,7 @@ export * from "./columnUtility";
4
4
  export * from "./rowUtility";
5
5
  export declare const moveToIndex: (arr: any[], from: number, to: number) => any[];
6
6
  export declare const getTotalPages: (totalRecords: number, pageSize: number) => number;
7
- export declare const getSelectAll: (tableData: Data, selectDisabledRow?: boolean | undefined) => {
7
+ export declare const getSelectAll: (tableData: Data, selectDisabledRow?: boolean | undefined, clearSelection?: boolean | undefined) => {
8
8
  indeterminate: boolean;
9
9
  checked: boolean;
10
10
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { updateSchemaFunction, Schema, Data, onSelectAllFunction, GridProps, updateFilterListFunction } from "../grid/Grid";
2
+ import { updateSchemaFunction, Schema, Data, onSelectAllFunction, GridProps, updateFilterListFunction, RowData } from "../grid/Grid";
3
3
  export interface ExternalHeaderProps {
4
4
  children?: React.ReactNode;
5
5
  withSearch?: boolean;
@@ -8,6 +8,7 @@ export interface ExternalHeaderProps {
8
8
  allowSelectAll?: boolean;
9
9
  customSelectionLabel?: string;
10
10
  globalActionRenderer?: (data: Data) => React.ReactNode;
11
+ selectionActionRenderer?: (selectedRows: RowData[], selectAll?: boolean) => React.ReactNode;
11
12
  }
12
13
  export declare type updateSearchTermFunction = (newSearchTerm: string) => void;
13
14
  export interface HeaderProps extends ExternalHeaderProps {
@@ -30,6 +31,11 @@ export interface HeaderProps extends ExternalHeaderProps {
30
31
  onSelectAll?: onSelectAllFunction;
31
32
  searchTerm?: string;
32
33
  updateSearchTerm?: updateSearchTermFunction;
34
+ selectedRowsRef?: React.MutableRefObject<any>;
35
+ selectedAllRef?: React.MutableRefObject<any>;
36
+ onClearSelection?: () => void;
37
+ onSelectAllRows?: () => void;
38
+ uniqueColumnName?: string;
33
39
  }
34
40
  export declare const Header: {
35
41
  (props: HeaderProps): JSX.Element;
@@ -47,6 +47,7 @@ interface SharedTableProps extends BaseProps {
47
47
  separator?: GridProps['headCellTooltip'];
48
48
  filterPosition: FilterPosition;
49
49
  selectDisabledRow?: boolean;
50
+ uniqueColumnName?: string;
50
51
  }
51
52
  export declare type SyncTableProps = SharedTableProps & TableSyncProps;
52
53
  export declare type AsyncTableProps = SharedTableProps & AsyncProps;
@@ -118,6 +119,9 @@ export declare class Table extends React.Component<TableProps, TableState> {
118
119
  errorTemplate: (props: ErrorTemplateProps) => JSX.Element;
119
120
  };
120
121
  debounceUpdate: () => void;
122
+ selectedRowsRef: React.MutableRefObject<any>;
123
+ clearSelectionRef: React.MutableRefObject<any>;
124
+ selectAllRef: React.MutableRefObject<any>;
121
125
  constructor(props: TableProps);
122
126
  componentDidMount(): void;
123
127
  componentDidUpdate(prevProps: TableProps, prevState: TableState): void;
@@ -130,6 +134,9 @@ export declare class Table extends React.Component<TableProps, TableState> {
130
134
  updateSortingList: updateSortingListFunction;
131
135
  updateFilterList: updateFilterListFunction;
132
136
  updateSearchTerm: updateSearchTermFunction;
137
+ onClearSelection: () => void;
138
+ resetClearSelection: () => void;
139
+ onSelectAllRows: () => void;
133
140
  render(): JSX.Element;
134
141
  }
135
142
  export default Table;
@@ -0,0 +1,3 @@
1
+ import { RowData, GridProps } from "../grid";
2
+ export declare const getUpdatedData: (data: GridProps['data'], uniqueColumnName: string, selectedList: [], isCancelSelection?: boolean | undefined, isSelectAll?: boolean | undefined) => RowData[];
3
+ export declare const removeDuplicate: (data: RowData[], uniqueColumnName: string) => RowData[];