@capillarytech/blaze-ui 0.1.6-alpha.54 → 0.1.6-alpha.56
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 +187 -236
- 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,142 @@ export const HeaderWrapper = styled.div`
|
|
|
23
12
|
}
|
|
24
13
|
`;
|
|
25
14
|
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
input[type="checkbox"] {
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
}
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
export const StyledInfoIcon = styled.span`
|
|
77
|
-
color: ${styledVars.CAP_G05};
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
cursor: help;
|
|
80
|
-
margin-left: 4px;
|
|
81
|
-
display: flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
|
|
84
|
-
&:hover {
|
|
85
|
-
color: ${styledVars.CAP_G03};
|
|
86
|
-
}
|
|
15
|
+
export const selectStyles = css`
|
|
16
|
+
&.cap-unified-select-container {
|
|
17
|
+
text-align: justify;
|
|
18
|
+
&.disabled {
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
}
|
|
21
|
+
.ant-select-prefix {
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
color: #091e42;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
}
|
|
27
|
+
.cap-unified-select-header-label {
|
|
28
|
+
font-family: ${styledVars.FONT_FAMILY};
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
line-height: 20px;
|
|
32
|
+
letter-spacing: 0px;
|
|
33
|
+
}
|
|
34
|
+
.cap-unified-select-header-byline-text {
|
|
35
|
+
font-family: ${styledVars.FONT_FAMILY};
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
margin-top: -5px;
|
|
39
|
+
letter-spacing: 0px;
|
|
40
|
+
color: #97a0af;
|
|
41
|
+
}
|
|
42
|
+
.ant-input-affix-wrapper .ant-input-prefix {
|
|
43
|
+
left: 12px;
|
|
44
|
+
}
|
|
45
|
+
.cap-tooltip-with-info-icon {
|
|
46
|
+
margin-top: 2px;
|
|
47
|
+
}
|
|
87
48
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
49
|
+
.cap-unified-tree-select {
|
|
50
|
+
min-width: 200px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
54
|
+
.ant-select-selector {
|
|
55
|
+
border-color: #7a869a !important;
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
outline: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
61
|
+
background-color: #42b040;
|
|
62
|
+
}
|
|
63
|
+
.ant-select-dropdown {
|
|
64
|
+
margin-top: -8px !important;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
box-shadow:
|
|
67
|
+
0px 4px 8px -2px #091e4240,
|
|
68
|
+
0px 0px 1px 0px #091e424f;
|
|
69
|
+
max-height: 360px;
|
|
70
|
+
overflow: visible;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ant-select-selection-item {
|
|
74
|
+
background: transparent;
|
|
75
|
+
}
|
|
76
|
+
.ant-select-multiple .ant-select-selection-wrap {
|
|
77
|
+
align-self: center;
|
|
78
|
+
}
|
|
79
|
+
.cap-unified-tree-select .ant-select-selector:hover {
|
|
80
|
+
border: 1px solid #7a869a;
|
|
81
|
+
}
|
|
82
|
+
.cap-unified-tree-select .ant-select-selector:focus {
|
|
83
|
+
border: 1px solid #7a869a;
|
|
84
|
+
}
|
|
85
|
+
.cap-unified-tree-select .ant-select-tree-treenode {
|
|
86
|
+
padding-left: 4px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cap-unified-select-status {
|
|
90
|
+
color: #e83135;
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
`;
|
|
95
93
|
|
|
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;
|
|
94
|
+
/* Common styles for all types */
|
|
95
|
+
&.custom-popup-container {
|
|
96
|
+
width: max-content !important;
|
|
97
|
+
|
|
98
|
+
.ant-select-tree {
|
|
99
|
+
.ant-select-tree-node-content-wrapper {
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
.ant-select-tree-node-content-wrapper:hover {
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
.ant-select-tree-treenode {
|
|
106
|
+
line-height: 40px;
|
|
107
|
+
margin-bottom: 0px;
|
|
108
|
+
.ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
|
|
109
|
+
height: 18px;
|
|
110
|
+
width: 18px;
|
|
111
|
+
border: 2px solid #b3bac5;
|
|
112
|
+
border-radius: 4px;
|
|
130
113
|
}
|
|
131
|
-
|
|
132
|
-
background-color:
|
|
114
|
+
&:hover {
|
|
115
|
+
background-color: #fffbe6;
|
|
133
116
|
}
|
|
134
|
-
.ant-select-tree-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
&:hover{
|
|
138
|
-
background-color: #42B040;
|
|
139
|
-
border: 2px solid #42B040 !important;
|
|
140
|
-
}
|
|
117
|
+
&:not(.ant-select-tree-treenode-disabled)
|
|
118
|
+
.ant-select-tree-node-content-wrapper:hover {
|
|
119
|
+
background-color: none;
|
|
141
120
|
}
|
|
142
|
-
|
|
143
|
-
|
|
121
|
+
}
|
|
122
|
+
.ant-select-tree-node-content-wrapper {
|
|
123
|
+
border-radius: 0px;
|
|
124
|
+
padding-left: 3px;
|
|
125
|
+
}
|
|
126
|
+
.ant-select-tree-indent {
|
|
127
|
+
margin-left: 15px;
|
|
128
|
+
}
|
|
129
|
+
.ant-select-tree-switcher:not(
|
|
130
|
+
.ant-select-tree-switcher-noop
|
|
131
|
+
):hover:before {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
}
|
|
134
|
+
.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
|
|
135
|
+
background-color: #42b040;
|
|
136
|
+
border: 2px solid #42b040 !important;
|
|
137
|
+
&:hover {
|
|
138
|
+
background-color: #42b040;
|
|
139
|
+
border: 2px solid #42b040 !important;
|
|
144
140
|
}
|
|
141
|
+
}
|
|
142
|
+
.ant-select-tree-switcher .ant-select-tree-switcher-icon {
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
}
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
|
|
147
|
+
.ant-checkbox-checked:not(.ant-checkbox-disabled)
|
|
148
|
+
.ant-checkbox-inner {
|
|
149
|
+
background-color: #42b040;
|
|
150
|
+
border: 2px solid #42b040 !important;
|
|
150
151
|
}
|
|
151
152
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
152
153
|
.ant-select-tree-checkbox-inner {
|
|
@@ -156,7 +157,7 @@ export const selectStyles = css`
|
|
|
156
157
|
|
|
157
158
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
158
159
|
.ant-select-tree-checkbox-inner::after {
|
|
159
|
-
content:
|
|
160
|
+
content: '';
|
|
160
161
|
position: absolute;
|
|
161
162
|
top: 50%;
|
|
162
163
|
left: 50%;
|
|
@@ -166,23 +167,7 @@ export const selectStyles = css`
|
|
|
166
167
|
transform: translate(-50%, -50%);
|
|
167
168
|
border-radius: 1px;
|
|
168
169
|
}
|
|
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{
|
|
170
|
+
.cap-unified-select-upload-container {
|
|
186
171
|
cursor: pointer;
|
|
187
172
|
display: flex;
|
|
188
173
|
align-items: center;
|
|
@@ -190,24 +175,24 @@ export const selectStyles = css`
|
|
|
190
175
|
height: 40px;
|
|
191
176
|
padding-left: 16px;
|
|
192
177
|
|
|
193
|
-
.cap-unified-select-upload-label{
|
|
178
|
+
.cap-unified-select-upload-label {
|
|
194
179
|
margin-left: 12px;
|
|
195
|
-
color: #
|
|
180
|
+
color: #2466ea;
|
|
196
181
|
}
|
|
197
182
|
}
|
|
198
|
-
.cap-unified-select-select-all-container{
|
|
183
|
+
.cap-unified-select-select-all-container {
|
|
199
184
|
padding: 9px 15px;
|
|
200
185
|
cursor: pointer;
|
|
201
186
|
display: flex;
|
|
202
187
|
align-items: center;
|
|
203
188
|
border-bottom: 1px solid #f0f0f0;
|
|
204
189
|
height: 40px;
|
|
205
|
-
.cap-unified-select-select-all-checkbox{
|
|
190
|
+
.cap-unified-select-select-all-checkbox {
|
|
206
191
|
display: contents !important;
|
|
207
|
-
.ant-checkbox-inner{
|
|
192
|
+
.ant-checkbox-inner {
|
|
208
193
|
height: 18px;
|
|
209
194
|
width: 18px;
|
|
210
|
-
border: 2px solid #
|
|
195
|
+
border: 2px solid #b3bac5;
|
|
211
196
|
border-radius: 4px;
|
|
212
197
|
}
|
|
213
198
|
}
|
|
@@ -216,7 +201,7 @@ export const selectStyles = css`
|
|
|
216
201
|
border-color: #42b040 !important;
|
|
217
202
|
}
|
|
218
203
|
.ant-checkbox-indeterminate .ant-checkbox-inner::after {
|
|
219
|
-
content:
|
|
204
|
+
content: '';
|
|
220
205
|
position: absolute;
|
|
221
206
|
top: 50%;
|
|
222
207
|
left: 50%;
|
|
@@ -227,73 +212,21 @@ export const selectStyles = css`
|
|
|
227
212
|
border-radius: 1px;
|
|
228
213
|
}
|
|
229
214
|
}
|
|
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;
|
|
215
|
+
.ant-select-outlined:not(.ant-select-disabled):not(
|
|
216
|
+
.ant-select-customize-input
|
|
217
|
+
):not(.ant-pagination-size-changer):hover
|
|
218
|
+
.ant-select-selector {
|
|
219
|
+
border-color: #7a869a !important;
|
|
241
220
|
}
|
|
242
|
-
.ant-select-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
box-shadow: 0px 4px 8px -2px #091E4240, 0px 0px 1px 0px #091E424F;
|
|
246
|
-
max-height: 360px;
|
|
221
|
+
.ant-select-tree-treenode.ant-select-tree-treenode-selected {
|
|
222
|
+
background-color: #e9f0fe;
|
|
223
|
+
color: #2466ea;
|
|
247
224
|
}
|
|
248
|
-
.ant-select-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
color: #091E42;
|
|
252
|
-
line-height: 20px;
|
|
225
|
+
.ant-select-tree-list-holder-inner {
|
|
226
|
+
width: fit-content !important;
|
|
227
|
+
min-width: 100%;
|
|
253
228
|
}
|
|
254
|
-
.cap-unified-select-
|
|
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;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.cap-unified-tree-select .select-popup-container .ant-select-tree-switcher-noop,
|
|
286
|
-
.cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-switcher-noop {
|
|
287
|
-
display: none;
|
|
288
|
-
}
|
|
289
|
-
.cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-treenode{
|
|
290
|
-
padding-left: 4px;
|
|
291
|
-
}
|
|
292
|
-
.ant-select-tree-treenode.ant-select-tree-treenode-selected{
|
|
293
|
-
background-color: #E9F0FE;
|
|
294
|
-
color: #2466EA;
|
|
295
|
-
}
|
|
296
|
-
.cap-unified-select-no-result{
|
|
229
|
+
.cap-unified-select-no-result {
|
|
297
230
|
display: flex;
|
|
298
231
|
flex-direction: column;
|
|
299
232
|
align-items: center;
|
|
@@ -302,31 +235,31 @@ export const selectStyles = css`
|
|
|
302
235
|
color: #8c8c8c;
|
|
303
236
|
font-size: 14px;
|
|
304
237
|
}
|
|
305
|
-
.cap-unified-select-no-result-icon{
|
|
238
|
+
.cap-unified-select-no-result-icon {
|
|
306
239
|
font-size: 36px;
|
|
307
240
|
margin-bottom: 8px;
|
|
308
241
|
color: #bfbfbf;
|
|
309
242
|
}
|
|
310
|
-
.cap-unified-select-no-result-text{
|
|
243
|
+
.cap-unified-select-no-result-text {
|
|
311
244
|
font-weight: 500;
|
|
312
245
|
}
|
|
313
246
|
.ant-tree-select:hover .ant-select-selector {
|
|
314
|
-
border-color: #
|
|
247
|
+
border-color: #7a869a;
|
|
315
248
|
}
|
|
316
249
|
.ant-tree-select-focused .ant-select-selector,
|
|
317
250
|
.ant-tree-select-open .ant-select-selector {
|
|
318
|
-
border-color: #
|
|
251
|
+
border-color: #7a869a;
|
|
319
252
|
box-shadow: none;
|
|
320
253
|
outline: none;
|
|
321
254
|
}
|
|
322
|
-
.cap-unified-select-search-container{
|
|
323
|
-
border-bottom: 1px solid #
|
|
255
|
+
.cap-unified-select-search-container {
|
|
256
|
+
border-bottom: 1px solid #ebecf0 !important;
|
|
324
257
|
line-height: 40px !important;
|
|
325
|
-
.ant-input-affix-wrapper{
|
|
258
|
+
.ant-input-affix-wrapper {
|
|
326
259
|
padding-left: 8px;
|
|
327
260
|
}
|
|
328
261
|
}
|
|
329
|
-
.cap-unified-select-upload-button{
|
|
262
|
+
.cap-unified-select-upload-button {
|
|
330
263
|
border: none;
|
|
331
264
|
padding-left: 15px;
|
|
332
265
|
}
|
|
@@ -335,21 +268,21 @@ export const selectStyles = css`
|
|
|
335
268
|
align-items: center;
|
|
336
269
|
height: 48px;
|
|
337
270
|
padding: 7px;
|
|
338
|
-
border-top: 1px solid #
|
|
271
|
+
border-top: 1px solid #ebecf0;
|
|
339
272
|
}
|
|
340
273
|
.cap-unified-select-confirm-button-group {
|
|
341
274
|
display: flex;
|
|
342
275
|
padding-left: 8px;
|
|
343
276
|
align-items: center;
|
|
344
277
|
width: 100%; /* so it can push the label */
|
|
345
|
-
button{
|
|
278
|
+
button {
|
|
346
279
|
height: 32px;
|
|
347
280
|
width: 94px;
|
|
348
281
|
}
|
|
349
|
-
.cap-unified-select-confirm-button{
|
|
282
|
+
.cap-unified-select-confirm-button {
|
|
350
283
|
background-color: #6ebd6e;
|
|
351
284
|
}
|
|
352
|
-
.cap-unified-select-cancel-button{
|
|
285
|
+
.cap-unified-select-cancel-button {
|
|
353
286
|
border: transparent;
|
|
354
287
|
box-shadow: none;
|
|
355
288
|
}
|
|
@@ -360,10 +293,7 @@ export const selectStyles = css`
|
|
|
360
293
|
font-size: 12px;
|
|
361
294
|
font-weight: 400;
|
|
362
295
|
line-height: 16px;
|
|
363
|
-
color: #
|
|
364
|
-
}
|
|
365
|
-
.cap-unified-select-status{
|
|
366
|
-
color: #E83135;
|
|
296
|
+
color: #5e6c84;
|
|
367
297
|
}
|
|
368
298
|
.cap-unified-select-search-container {
|
|
369
299
|
.ant-input-affix-wrapper {
|
|
@@ -375,12 +305,12 @@ export const selectStyles = css`
|
|
|
375
305
|
}
|
|
376
306
|
|
|
377
307
|
.ant-input-affix-wrapper:hover {
|
|
378
|
-
border-bottom: 1px solid #
|
|
308
|
+
border-bottom: 1px solid #7a869a !important;
|
|
379
309
|
box-shadow: none;
|
|
380
310
|
}
|
|
381
311
|
|
|
382
312
|
.ant-input-affix-wrapper:focus-within {
|
|
383
|
-
border-bottom: 1px solid #
|
|
313
|
+
border-bottom: 1px solid #091e42 !important;
|
|
384
314
|
box-shadow: none;
|
|
385
315
|
outline: none;
|
|
386
316
|
}
|
|
@@ -390,8 +320,29 @@ export const selectStyles = css`
|
|
|
390
320
|
box-shadow: none !important;
|
|
391
321
|
}
|
|
392
322
|
}
|
|
393
|
-
|
|
394
|
-
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&.custom-popup-container {
|
|
326
|
+
/* Multi Select */
|
|
327
|
+
.multiSelect-popup-container {
|
|
328
|
+
.ant-select-tree-list {
|
|
329
|
+
.ant-select-tree-treenode-leaf {
|
|
330
|
+
.ant-select-tree-switcher-noop {
|
|
331
|
+
display: none;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Single Select */
|
|
338
|
+
.select-popup-container {
|
|
339
|
+
.ant-select-tree-list {
|
|
340
|
+
.ant-select-tree-treenode-leaf {
|
|
341
|
+
.ant-select-tree-switcher-noop {
|
|
342
|
+
display: none;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
395
346
|
}
|
|
396
347
|
}
|
|
397
|
-
`;
|
|
348
|
+
`;
|
package/package.json
CHANGED