@capillarytech/blaze-ui 0.1.6-alpha.54 → 0.1.6-alpha.55
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/CapUnifiedSelect/CapUnifiedSelect.js +47 -39
- package/CapUnifiedSelect/styles.js +183 -228
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ const CapUnifiedSelect = ({
|
|
|
23
23
|
style,
|
|
24
24
|
isError = false,
|
|
25
25
|
errorMessage,
|
|
26
|
+
containerClassName,
|
|
26
27
|
popoverClassName,
|
|
27
28
|
allowClear = false,
|
|
28
29
|
headerLabel,
|
|
@@ -76,9 +77,9 @@ const CapUnifiedSelect = ({
|
|
|
76
77
|
|
|
77
78
|
const filterNode = (node) => {
|
|
78
79
|
if (!node) return false;
|
|
79
|
-
|
|
80
|
+
|
|
80
81
|
let textToSearch = '';
|
|
81
|
-
|
|
82
|
+
|
|
82
83
|
if (searchBasedOn === 'value') {
|
|
83
84
|
textToSearch = String(node.value || '').toLowerCase();
|
|
84
85
|
} else if (searchBasedOn === 'key') {
|
|
@@ -86,21 +87,22 @@ const CapUnifiedSelect = ({
|
|
|
86
87
|
} else {
|
|
87
88
|
textToSearch = String(node.label || node.title || '').toLowerCase();
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
|
|
90
91
|
return textToSearch.includes(searchLower);
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
const loop = (data) => {
|
|
94
95
|
if (!data) return [];
|
|
95
|
-
|
|
96
|
+
|
|
96
97
|
return data
|
|
97
98
|
.map((item) => {
|
|
98
99
|
if (!item) return null;
|
|
99
|
-
|
|
100
|
-
const children =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
|
|
101
|
+
const children =
|
|
102
|
+
item.children && item.children.length > 0
|
|
103
|
+
? loop(item.children)
|
|
104
|
+
: [];
|
|
105
|
+
|
|
104
106
|
if (filterNode(item) || children.length > 0) {
|
|
105
107
|
return { ...item, children };
|
|
106
108
|
}
|
|
@@ -108,7 +110,7 @@ const CapUnifiedSelect = ({
|
|
|
108
110
|
})
|
|
109
111
|
.filter(Boolean);
|
|
110
112
|
};
|
|
111
|
-
|
|
113
|
+
|
|
112
114
|
return loop(data);
|
|
113
115
|
},
|
|
114
116
|
[searchBasedOn],
|
|
@@ -119,18 +121,18 @@ const CapUnifiedSelect = ({
|
|
|
119
121
|
leafValues: [],
|
|
120
122
|
parentChildMap: {},
|
|
121
123
|
nodeMap: {},
|
|
122
|
-
selectedCount: 0
|
|
124
|
+
selectedCount: 0,
|
|
123
125
|
};
|
|
124
|
-
|
|
126
|
+
|
|
125
127
|
if (!nodes) return result;
|
|
126
128
|
|
|
127
129
|
const traverse = (items) => {
|
|
128
130
|
items.forEach((item) => {
|
|
129
131
|
result.nodeMap[item.value] = item;
|
|
130
|
-
|
|
132
|
+
|
|
131
133
|
if (item.children && item.children.length > 0) {
|
|
132
134
|
result.parentChildMap[item.value] = item.children.map(
|
|
133
|
-
(child) => child.value
|
|
135
|
+
(child) => child.value,
|
|
134
136
|
);
|
|
135
137
|
traverse(item.children);
|
|
136
138
|
} else {
|
|
@@ -139,27 +141,31 @@ const CapUnifiedSelect = ({
|
|
|
139
141
|
});
|
|
140
142
|
};
|
|
141
143
|
traverse(nodes);
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
+
|
|
145
|
+
if (
|
|
146
|
+
selectedValues &&
|
|
147
|
+
Array.isArray(selectedValues) &&
|
|
148
|
+
selectedValues.length > 0
|
|
149
|
+
) {
|
|
144
150
|
const expandedSet = new Set(selectedValues);
|
|
145
|
-
|
|
151
|
+
|
|
146
152
|
const processNode = (value) => {
|
|
147
153
|
const children = result.parentChildMap[value];
|
|
148
154
|
if (!children) return;
|
|
149
|
-
|
|
155
|
+
|
|
150
156
|
children.forEach((childValue) => {
|
|
151
157
|
expandedSet.add(childValue);
|
|
152
158
|
processNode(childValue);
|
|
153
159
|
});
|
|
154
160
|
};
|
|
155
|
-
|
|
161
|
+
|
|
156
162
|
selectedValues.forEach(processNode);
|
|
157
|
-
|
|
163
|
+
|
|
158
164
|
result.leafValues.forEach((value) => {
|
|
159
165
|
if (expandedSet.has(value)) result.selectedCount++;
|
|
160
166
|
});
|
|
161
167
|
}
|
|
162
|
-
|
|
168
|
+
|
|
163
169
|
return result;
|
|
164
170
|
}, []);
|
|
165
171
|
|
|
@@ -175,7 +181,7 @@ const CapUnifiedSelect = ({
|
|
|
175
181
|
const dataSource = useMemo(() => {
|
|
176
182
|
// Skip transformation if options is empty or undefined
|
|
177
183
|
if (!options || options.length === 0) return [];
|
|
178
|
-
|
|
184
|
+
|
|
179
185
|
// Only transform if not a tree select
|
|
180
186
|
return isTree
|
|
181
187
|
? options
|
|
@@ -186,15 +192,12 @@ const CapUnifiedSelect = ({
|
|
|
186
192
|
}));
|
|
187
193
|
}, [isTree, options]);
|
|
188
194
|
|
|
189
|
-
const filteredTree = useMemo(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
[dataSource, searchText, getFilteredTreeData],
|
|
197
|
-
);
|
|
195
|
+
const filteredTree = useMemo(() => {
|
|
196
|
+
// Skip filtering if search text is empty
|
|
197
|
+
if (!searchText) return dataSource;
|
|
198
|
+
|
|
199
|
+
return getFilteredTreeData(dataSource, searchText);
|
|
200
|
+
}, [dataSource, searchText, getFilteredTreeData]);
|
|
198
201
|
|
|
199
202
|
const handleConfirm = useCallback(() => {
|
|
200
203
|
if (onChange) onChange(tempValue);
|
|
@@ -367,7 +370,10 @@ const CapUnifiedSelect = ({
|
|
|
367
370
|
(() => {
|
|
368
371
|
const { leafValues } = processTreeData(currentItems);
|
|
369
372
|
const totalAvailable = leafValues.length;
|
|
370
|
-
const selectedInScope = processTreeData(
|
|
373
|
+
const selectedInScope = processTreeData(
|
|
374
|
+
currentItems,
|
|
375
|
+
tempValue,
|
|
376
|
+
).selectedCount;
|
|
371
377
|
|
|
372
378
|
return (
|
|
373
379
|
<CapRow
|
|
@@ -467,11 +473,10 @@ const CapUnifiedSelect = ({
|
|
|
467
473
|
return (
|
|
468
474
|
<>
|
|
469
475
|
<StyledTreeSelect
|
|
470
|
-
{...rest}
|
|
471
476
|
type={type}
|
|
472
477
|
treeData={filteredTree}
|
|
473
478
|
value={customPopupRender ? tempValue : value}
|
|
474
|
-
onChange={
|
|
479
|
+
onChange={onChange}
|
|
475
480
|
placeholder={placeholder}
|
|
476
481
|
showSearch={false}
|
|
477
482
|
maxTagCount={0}
|
|
@@ -479,9 +484,13 @@ const CapUnifiedSelect = ({
|
|
|
479
484
|
prefix={tempValue?.length > 0 ? prefix : undefined}
|
|
480
485
|
suffixIcon={suffix}
|
|
481
486
|
className={classnames(
|
|
482
|
-
|
|
487
|
+
containerClassName,
|
|
488
|
+
`cap-unified-tree-select`,
|
|
483
489
|
className,
|
|
484
490
|
)}
|
|
491
|
+
classNames={{
|
|
492
|
+
popup: { root: classnames('custom-popup-container', className) },
|
|
493
|
+
}}
|
|
485
494
|
style={style}
|
|
486
495
|
status={isError ? 'error' : ''}
|
|
487
496
|
allowClear={allowClear}
|
|
@@ -495,6 +504,7 @@ const CapUnifiedSelect = ({
|
|
|
495
504
|
filterTreeNode={false}
|
|
496
505
|
{...treeSelectVirtualizationProps}
|
|
497
506
|
popupRender={renderCustomDropdown}
|
|
507
|
+
{...rest}
|
|
498
508
|
/>
|
|
499
509
|
{isError && (
|
|
500
510
|
<CapLabel
|
|
@@ -531,12 +541,10 @@ const CapUnifiedSelect = ({
|
|
|
531
541
|
]);
|
|
532
542
|
|
|
533
543
|
return (
|
|
534
|
-
<
|
|
535
|
-
className={classnames(className, 'cap-unified-select-container')}
|
|
536
|
-
>
|
|
544
|
+
<CapRow className={classnames(className, 'cap-unified-select-container')}>
|
|
537
545
|
{renderHeader()}
|
|
538
546
|
{renderDropdown()}
|
|
539
|
-
</
|
|
547
|
+
</CapRow>
|
|
540
548
|
);
|
|
541
549
|
};
|
|
542
550
|
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import * as styledVars from '../styled/variables';
|
|
3
3
|
|
|
4
|
-
export const SelectWrapper = styled.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
width: 100%;
|
|
9
|
-
|
|
10
|
-
&.disabled {
|
|
11
|
-
cursor: not-allowed;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
4
|
export const HeaderWrapper = styled.div`
|
|
16
5
|
display: flex;
|
|
17
6
|
align-items: center;
|
|
@@ -23,130 +12,146 @@ export const HeaderWrapper = styled.div`
|
|
|
23
12
|
}
|
|
24
13
|
`;
|
|
25
14
|
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
align-items: center;
|
|
30
|
-
padding: 8px;
|
|
31
|
-
border-top: 1px solid #f0f0f0;
|
|
32
|
-
|
|
33
|
-
.footer-buttons {
|
|
15
|
+
export const selectStyles = css`
|
|
16
|
+
&.cap-unified-select-container {
|
|
34
17
|
display: flex;
|
|
35
|
-
|
|
18
|
+
flex-direction: column;
|
|
36
19
|
gap: 8px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.total-count {
|
|
40
|
-
color: #8c8c8c;
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
20
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
&.disabled {
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
text-align: justify;
|
|
25
|
+
.ant-select-prefix {
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
color: #091e42;
|
|
29
|
+
line-height: 20px;
|
|
30
|
+
}
|
|
31
|
+
.cap-unified-select-header-label {
|
|
32
|
+
font-family: ${styledVars.FONT_FAMILY};
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
line-height: 20px;
|
|
36
|
+
letter-spacing: 0px;
|
|
37
|
+
}
|
|
38
|
+
.cap-unified-select-header-byline-text {
|
|
39
|
+
font-family: ${styledVars.FONT_FAMILY};
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
margin-top: -5px;
|
|
43
|
+
letter-spacing: 0px;
|
|
44
|
+
color: #97a0af;
|
|
45
|
+
}
|
|
46
|
+
.ant-input-affix-wrapper .ant-input-prefix {
|
|
47
|
+
left: 12px;
|
|
48
|
+
}
|
|
49
|
+
.cap-tooltip-with-info-icon {
|
|
50
|
+
margin-top: 2px;
|
|
51
|
+
}
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
padding: 8px 12px;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
border-bottom: 1px solid #f0f0f0;
|
|
57
|
-
user-select: none;
|
|
58
|
-
|
|
59
|
-
input[type="checkbox"] {
|
|
60
|
-
cursor: pointer;
|
|
53
|
+
.cap-unified-tree-select {
|
|
54
|
+
min-width: 200px;
|
|
55
|
+
}
|
|
61
56
|
}
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
export const NoResultWrapper = styled.div`
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
align-items: center;
|
|
68
|
-
justify-content: center;
|
|
69
|
-
height: 200px;
|
|
70
|
-
color: #8c8c8c;
|
|
71
|
-
font-size: 14px;
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
57
|
|
|
58
|
+
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
59
|
+
.ant-select-selector {
|
|
60
|
+
border-color: #7a869a !important;
|
|
61
|
+
box-shadow: none;
|
|
62
|
+
outline: 0;
|
|
63
|
+
}
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
66
|
+
background-color: #42b040;
|
|
67
|
+
}
|
|
68
|
+
.ant-select-dropdown {
|
|
69
|
+
margin-top: -8px !important;
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
box-shadow:
|
|
72
|
+
0px 4px 8px -2px #091e4240,
|
|
73
|
+
0px 0px 1px 0px #091e424f;
|
|
74
|
+
max-height: 360px;
|
|
75
|
+
overflow: visible;
|
|
76
|
+
}
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
.ant-select-selection-item {
|
|
79
|
+
background: transparent;
|
|
80
|
+
}
|
|
81
|
+
.ant-select-multiple .ant-select-selection-wrap {
|
|
82
|
+
align-self: center;
|
|
83
|
+
}
|
|
84
|
+
.cap-unified-tree-select .ant-select-selector:hover {
|
|
85
|
+
border: 1px solid #7a869a;
|
|
86
|
+
}
|
|
87
|
+
.cap-unified-tree-select .ant-select-selector:focus {
|
|
88
|
+
border: 1px solid #7a869a;
|
|
89
|
+
}
|
|
90
|
+
.cap-unified-tree-select .ant-select-tree-treenode {
|
|
91
|
+
padding-left: 4px;
|
|
86
92
|
}
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
&:hover {
|
|
91
|
-
color: ${styledVars.CAP_G05};
|
|
92
|
-
}
|
|
94
|
+
.cap-unified-select-status {
|
|
95
|
+
color: #e83135;
|
|
93
96
|
}
|
|
94
|
-
`;
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
&.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
.ant-select-tree{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
border-radius: 4px;
|
|
116
|
-
}
|
|
117
|
-
&:hover{
|
|
118
|
-
background-color: #FFFBE6;
|
|
119
|
-
}
|
|
120
|
-
&:not(.ant-select-tree-treenode-disabled) .ant-select-tree-node-content-wrapper:hover{
|
|
121
|
-
background-color: none;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
.ant-select-tree-node-content-wrapper{
|
|
125
|
-
border-radius: 0px;
|
|
126
|
-
padding-left: 3px;
|
|
127
|
-
}
|
|
128
|
-
.ant-select-tree-indent{
|
|
129
|
-
margin-left: 11px;
|
|
98
|
+
/* Common styles for all types */
|
|
99
|
+
&.custom-popup-container {
|
|
100
|
+
width: max-content !important;
|
|
101
|
+
|
|
102
|
+
.ant-select-tree {
|
|
103
|
+
.ant-select-tree-node-content-wrapper {
|
|
104
|
+
background-color: transparent;
|
|
105
|
+
}
|
|
106
|
+
.ant-select-tree-node-content-wrapper:hover {
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
}
|
|
109
|
+
.ant-select-tree-treenode {
|
|
110
|
+
line-height: 40px;
|
|
111
|
+
margin-bottom: 0px;
|
|
112
|
+
.ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
|
|
113
|
+
height: 18px;
|
|
114
|
+
width: 18px;
|
|
115
|
+
border: 2px solid #b3bac5;
|
|
116
|
+
border-radius: 4px;
|
|
130
117
|
}
|
|
131
|
-
|
|
132
|
-
background-color:
|
|
118
|
+
&:hover {
|
|
119
|
+
background-color: #fffbe6;
|
|
133
120
|
}
|
|
134
|
-
.ant-select-tree-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
&:hover{
|
|
138
|
-
background-color: #42B040;
|
|
139
|
-
border: 2px solid #42B040 !important;
|
|
140
|
-
}
|
|
121
|
+
&:not(.ant-select-tree-treenode-disabled)
|
|
122
|
+
.ant-select-tree-node-content-wrapper:hover {
|
|
123
|
+
background-color: none;
|
|
141
124
|
}
|
|
142
|
-
|
|
143
|
-
|
|
125
|
+
}
|
|
126
|
+
.ant-select-tree-node-content-wrapper {
|
|
127
|
+
border-radius: 0px;
|
|
128
|
+
padding-left: 3px;
|
|
129
|
+
}
|
|
130
|
+
.ant-select-tree-indent {
|
|
131
|
+
margin-left: 11px;
|
|
132
|
+
}
|
|
133
|
+
.ant-select-tree-switcher:not(
|
|
134
|
+
.ant-select-tree-switcher-noop
|
|
135
|
+
):hover:before {
|
|
136
|
+
background-color: transparent;
|
|
137
|
+
}
|
|
138
|
+
.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
|
|
139
|
+
background-color: #42b040;
|
|
140
|
+
border: 2px solid #42b040 !important;
|
|
141
|
+
&:hover {
|
|
142
|
+
background-color: #42b040;
|
|
143
|
+
border: 2px solid #42b040 !important;
|
|
144
144
|
}
|
|
145
|
+
}
|
|
146
|
+
.ant-select-tree-switcher .ant-select-tree-switcher-icon {
|
|
147
|
+
font-size: 12px;
|
|
148
|
+
}
|
|
145
149
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
|
|
151
|
+
.ant-checkbox-checked:not(.ant-checkbox-disabled)
|
|
152
|
+
.ant-checkbox-inner {
|
|
153
|
+
background-color: #42b040;
|
|
154
|
+
border: 2px solid #42b040 !important;
|
|
150
155
|
}
|
|
151
156
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
152
157
|
.ant-select-tree-checkbox-inner {
|
|
@@ -156,7 +161,7 @@ export const selectStyles = css`
|
|
|
156
161
|
|
|
157
162
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
158
163
|
.ant-select-tree-checkbox-inner::after {
|
|
159
|
-
content:
|
|
164
|
+
content: '';
|
|
160
165
|
position: absolute;
|
|
161
166
|
top: 50%;
|
|
162
167
|
left: 50%;
|
|
@@ -166,23 +171,7 @@ export const selectStyles = css`
|
|
|
166
171
|
transform: translate(-50%, -50%);
|
|
167
172
|
border-radius: 1px;
|
|
168
173
|
}
|
|
169
|
-
.cap-unified-
|
|
170
|
-
height: 40px;
|
|
171
|
-
width: 160px;
|
|
172
|
-
}
|
|
173
|
-
.cap-unified-tree-select-m{
|
|
174
|
-
height: 40px;
|
|
175
|
-
width: 340px;
|
|
176
|
-
}
|
|
177
|
-
.cap-unified-tree-select-l{
|
|
178
|
-
height: 40px;
|
|
179
|
-
width: 400px;
|
|
180
|
-
}
|
|
181
|
-
.cap-unified-tree-select-xl{
|
|
182
|
-
height: 40px;
|
|
183
|
-
width: 480px;
|
|
184
|
-
}
|
|
185
|
-
.cap-unified-select-upload-container{
|
|
174
|
+
.cap-unified-select-upload-container {
|
|
186
175
|
cursor: pointer;
|
|
187
176
|
display: flex;
|
|
188
177
|
align-items: center;
|
|
@@ -190,24 +179,24 @@ export const selectStyles = css`
|
|
|
190
179
|
height: 40px;
|
|
191
180
|
padding-left: 16px;
|
|
192
181
|
|
|
193
|
-
.cap-unified-select-upload-label{
|
|
182
|
+
.cap-unified-select-upload-label {
|
|
194
183
|
margin-left: 12px;
|
|
195
|
-
color: #
|
|
184
|
+
color: #2466ea;
|
|
196
185
|
}
|
|
197
186
|
}
|
|
198
|
-
.cap-unified-select-select-all-container{
|
|
187
|
+
.cap-unified-select-select-all-container {
|
|
199
188
|
padding: 9px 15px;
|
|
200
189
|
cursor: pointer;
|
|
201
190
|
display: flex;
|
|
202
191
|
align-items: center;
|
|
203
192
|
border-bottom: 1px solid #f0f0f0;
|
|
204
193
|
height: 40px;
|
|
205
|
-
.cap-unified-select-select-all-checkbox{
|
|
194
|
+
.cap-unified-select-select-all-checkbox {
|
|
206
195
|
display: contents !important;
|
|
207
|
-
.ant-checkbox-inner{
|
|
196
|
+
.ant-checkbox-inner {
|
|
208
197
|
height: 18px;
|
|
209
198
|
width: 18px;
|
|
210
|
-
border: 2px solid #
|
|
199
|
+
border: 2px solid #b3bac5;
|
|
211
200
|
border-radius: 4px;
|
|
212
201
|
}
|
|
213
202
|
}
|
|
@@ -216,7 +205,7 @@ export const selectStyles = css`
|
|
|
216
205
|
border-color: #42b040 !important;
|
|
217
206
|
}
|
|
218
207
|
.ant-checkbox-indeterminate .ant-checkbox-inner::after {
|
|
219
|
-
content:
|
|
208
|
+
content: '';
|
|
220
209
|
position: absolute;
|
|
221
210
|
top: 50%;
|
|
222
211
|
left: 50%;
|
|
@@ -227,73 +216,21 @@ export const selectStyles = css`
|
|
|
227
216
|
border-radius: 1px;
|
|
228
217
|
}
|
|
229
218
|
}
|
|
230
|
-
.ant-select-outlined:not(.ant-select-disabled):not(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
border-color: #
|
|
235
|
-
box-shadow: none;
|
|
236
|
-
outline: 0;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover{
|
|
240
|
-
background-color: #42b040;
|
|
241
|
-
}
|
|
242
|
-
.ant-select-dropdown{
|
|
243
|
-
margin-top: -8px !important;
|
|
244
|
-
border-radius: 4px;
|
|
245
|
-
box-shadow: 0px 4px 8px -2px #091E4240, 0px 0px 1px 0px #091E424F;
|
|
246
|
-
max-height: 360px;
|
|
247
|
-
}
|
|
248
|
-
.ant-select-prefix{
|
|
249
|
-
font-size: 14px;
|
|
250
|
-
font-weight: 400;
|
|
251
|
-
color: #091E42;
|
|
252
|
-
line-height: 20px;
|
|
253
|
-
}
|
|
254
|
-
.cap-unified-select-header-label{
|
|
255
|
-
font-family: ${styledVars.FONT_FAMILY};
|
|
256
|
-
font-weight: 500;
|
|
257
|
-
font-size: 14px;
|
|
258
|
-
line-height: 20px;
|
|
259
|
-
letter-spacing: 0px;
|
|
260
|
-
}
|
|
261
|
-
.cap-unified-select-header-byline-text{
|
|
262
|
-
font-family: ${styledVars.FONT_FAMILY};
|
|
263
|
-
font-weight: 400;
|
|
264
|
-
font-size: 12px;
|
|
265
|
-
margin-top: -5px;
|
|
266
|
-
letter-spacing: 0px;
|
|
267
|
-
color: #97A0AF;
|
|
268
|
-
}
|
|
269
|
-
.ant-input-affix-wrapper .ant-input-prefix{
|
|
270
|
-
left: 12px;
|
|
271
|
-
}
|
|
272
|
-
.ant-select-selection-item{
|
|
273
|
-
background: transparent;
|
|
274
|
-
}
|
|
275
|
-
.ant-select-multiple .ant-select-selection-wrap{
|
|
276
|
-
align-self: center;
|
|
277
|
-
}
|
|
278
|
-
.cap-unified-tree-select .ant-select-selector:hover{
|
|
279
|
-
border: 1px solid #7A869A;
|
|
280
|
-
}
|
|
281
|
-
.cap-unified-tree-select .ant-select-selector:focus{
|
|
282
|
-
border: 1px solid #7A869A;
|
|
219
|
+
.ant-select-outlined:not(.ant-select-disabled):not(
|
|
220
|
+
.ant-select-customize-input
|
|
221
|
+
):not(.ant-pagination-size-changer):hover
|
|
222
|
+
.ant-select-selector {
|
|
223
|
+
border-color: #7a869a !important;
|
|
283
224
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
display: none;
|
|
288
|
-
}
|
|
289
|
-
.cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-treenode{
|
|
290
|
-
padding-left: 4px;
|
|
225
|
+
.ant-select-tree-treenode.ant-select-tree-treenode-selected {
|
|
226
|
+
background-color: #e9f0fe;
|
|
227
|
+
color: #2466ea;
|
|
291
228
|
}
|
|
292
|
-
.ant-select-tree-
|
|
293
|
-
|
|
294
|
-
|
|
229
|
+
.ant-select-tree-list-holder-inner {
|
|
230
|
+
width: fit-content !important;
|
|
231
|
+
min-width: 100%;
|
|
295
232
|
}
|
|
296
|
-
.cap-unified-select-no-result{
|
|
233
|
+
.cap-unified-select-no-result {
|
|
297
234
|
display: flex;
|
|
298
235
|
flex-direction: column;
|
|
299
236
|
align-items: center;
|
|
@@ -302,31 +239,31 @@ export const selectStyles = css`
|
|
|
302
239
|
color: #8c8c8c;
|
|
303
240
|
font-size: 14px;
|
|
304
241
|
}
|
|
305
|
-
.cap-unified-select-no-result-icon{
|
|
242
|
+
.cap-unified-select-no-result-icon {
|
|
306
243
|
font-size: 36px;
|
|
307
244
|
margin-bottom: 8px;
|
|
308
245
|
color: #bfbfbf;
|
|
309
246
|
}
|
|
310
|
-
.cap-unified-select-no-result-text{
|
|
247
|
+
.cap-unified-select-no-result-text {
|
|
311
248
|
font-weight: 500;
|
|
312
249
|
}
|
|
313
250
|
.ant-tree-select:hover .ant-select-selector {
|
|
314
|
-
border-color: #
|
|
251
|
+
border-color: #7a869a;
|
|
315
252
|
}
|
|
316
253
|
.ant-tree-select-focused .ant-select-selector,
|
|
317
254
|
.ant-tree-select-open .ant-select-selector {
|
|
318
|
-
border-color: #
|
|
255
|
+
border-color: #7a869a;
|
|
319
256
|
box-shadow: none;
|
|
320
257
|
outline: none;
|
|
321
258
|
}
|
|
322
|
-
.cap-unified-select-search-container{
|
|
323
|
-
border-bottom: 1px solid #
|
|
259
|
+
.cap-unified-select-search-container {
|
|
260
|
+
border-bottom: 1px solid #ebecf0 !important;
|
|
324
261
|
line-height: 40px !important;
|
|
325
|
-
.ant-input-affix-wrapper{
|
|
262
|
+
.ant-input-affix-wrapper {
|
|
326
263
|
padding-left: 8px;
|
|
327
264
|
}
|
|
328
265
|
}
|
|
329
|
-
.cap-unified-select-upload-button{
|
|
266
|
+
.cap-unified-select-upload-button {
|
|
330
267
|
border: none;
|
|
331
268
|
padding-left: 15px;
|
|
332
269
|
}
|
|
@@ -335,21 +272,21 @@ export const selectStyles = css`
|
|
|
335
272
|
align-items: center;
|
|
336
273
|
height: 48px;
|
|
337
274
|
padding: 7px;
|
|
338
|
-
border-top: 1px solid #
|
|
275
|
+
border-top: 1px solid #ebecf0;
|
|
339
276
|
}
|
|
340
277
|
.cap-unified-select-confirm-button-group {
|
|
341
278
|
display: flex;
|
|
342
279
|
padding-left: 8px;
|
|
343
280
|
align-items: center;
|
|
344
281
|
width: 100%; /* so it can push the label */
|
|
345
|
-
button{
|
|
282
|
+
button {
|
|
346
283
|
height: 32px;
|
|
347
284
|
width: 94px;
|
|
348
285
|
}
|
|
349
|
-
.cap-unified-select-confirm-button{
|
|
286
|
+
.cap-unified-select-confirm-button {
|
|
350
287
|
background-color: #6ebd6e;
|
|
351
288
|
}
|
|
352
|
-
.cap-unified-select-cancel-button{
|
|
289
|
+
.cap-unified-select-cancel-button {
|
|
353
290
|
border: transparent;
|
|
354
291
|
box-shadow: none;
|
|
355
292
|
}
|
|
@@ -360,10 +297,7 @@ export const selectStyles = css`
|
|
|
360
297
|
font-size: 12px;
|
|
361
298
|
font-weight: 400;
|
|
362
299
|
line-height: 16px;
|
|
363
|
-
color: #
|
|
364
|
-
}
|
|
365
|
-
.cap-unified-select-status{
|
|
366
|
-
color: #E83135;
|
|
300
|
+
color: #5e6c84;
|
|
367
301
|
}
|
|
368
302
|
.cap-unified-select-search-container {
|
|
369
303
|
.ant-input-affix-wrapper {
|
|
@@ -375,12 +309,12 @@ export const selectStyles = css`
|
|
|
375
309
|
}
|
|
376
310
|
|
|
377
311
|
.ant-input-affix-wrapper:hover {
|
|
378
|
-
border-bottom: 1px solid #
|
|
312
|
+
border-bottom: 1px solid #7a869a !important;
|
|
379
313
|
box-shadow: none;
|
|
380
314
|
}
|
|
381
315
|
|
|
382
316
|
.ant-input-affix-wrapper:focus-within {
|
|
383
|
-
border-bottom: 1px solid #
|
|
317
|
+
border-bottom: 1px solid #091e42 !important;
|
|
384
318
|
box-shadow: none;
|
|
385
319
|
outline: none;
|
|
386
320
|
}
|
|
@@ -390,8 +324,29 @@ export const selectStyles = css`
|
|
|
390
324
|
box-shadow: none !important;
|
|
391
325
|
}
|
|
392
326
|
}
|
|
393
|
-
|
|
394
|
-
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&.custom-popup-container {
|
|
330
|
+
/* Multi Select */
|
|
331
|
+
.multiSelect-popup-container {
|
|
332
|
+
.ant-select-tree-list {
|
|
333
|
+
.ant-select-tree-treenode-leaf {
|
|
334
|
+
.ant-select-tree-switcher-noop {
|
|
335
|
+
display: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Single Select */
|
|
342
|
+
.select-popup-container {
|
|
343
|
+
.ant-select-tree-list {
|
|
344
|
+
.ant-select-tree-treenode-leaf {
|
|
345
|
+
.ant-select-tree-switcher-noop {
|
|
346
|
+
display: none;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
395
350
|
}
|
|
396
351
|
}
|
|
397
|
-
`;
|
|
352
|
+
`;
|
package/package.json
CHANGED