@capillarytech/blaze-ui 0.1.6-alpha.55 → 0.1.6-alpha.57
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.
|
@@ -229,15 +229,12 @@ const CapUnifiedSelect = ({
|
|
|
229
229
|
|
|
230
230
|
const suffix = useMemo(() => {
|
|
231
231
|
const displayValue = dropdownOpen ? tempValue : value;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
displayValue?.length > 1 ? (
|
|
232
|
+
const showMore = isMulti && Array.isArray(displayValue) && displayValue.length > 1;
|
|
233
|
+
return (
|
|
235
234
|
<>
|
|
236
|
-
<span>+{displayValue.length - 1} more </span>
|
|
237
|
-
<CapIcon type={
|
|
235
|
+
{showMore && <span>+{displayValue.length - 1} more </span>}
|
|
236
|
+
<CapIcon className="cap-unified-select-suffix-icon" type={dropdownOpen ? 'up' : 'down'} size="s" />
|
|
238
237
|
</>
|
|
239
|
-
) : (
|
|
240
|
-
<CapIcon type={`${dropdownOpen ? 'up' : 'down'}`} size="s" />
|
|
241
238
|
);
|
|
242
239
|
}, [isMulti, value, tempValue, dropdownOpen]);
|
|
243
240
|
|
|
@@ -14,14 +14,23 @@ export const HeaderWrapper = styled.div`
|
|
|
14
14
|
|
|
15
15
|
export const selectStyles = css`
|
|
16
16
|
&.cap-unified-select-container {
|
|
17
|
-
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
gap: 8px;
|
|
20
|
-
|
|
17
|
+
text-align: justify;
|
|
21
18
|
&.disabled {
|
|
22
19
|
cursor: not-allowed;
|
|
23
20
|
}
|
|
24
|
-
|
|
21
|
+
.cap-unified-select-suffix-icon {
|
|
22
|
+
color: ${styledVars.CAP_G01};
|
|
23
|
+
}
|
|
24
|
+
.ant-select-outlined {
|
|
25
|
+
&:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) {
|
|
26
|
+
&:hover {
|
|
27
|
+
.ant-select-selector {
|
|
28
|
+
border-color: #7A869A;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
.ant-select-prefix {
|
|
26
35
|
font-size: 14px;
|
|
27
36
|
font-weight: 400;
|
|
@@ -53,46 +62,42 @@ export const selectStyles = css`
|
|
|
53
62
|
.cap-unified-tree-select {
|
|
54
63
|
min-width: 200px;
|
|
55
64
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
65
|
+
|
|
66
|
+
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
59
67
|
.ant-select-selector {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
border-color: #7a869a !important;
|
|
69
|
+
box-shadow: none;
|
|
70
|
+
outline: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
74
|
+
background-color: #42b040;
|
|
75
|
+
}
|
|
76
|
+
.ant-select-dropdown {
|
|
77
|
+
margin-top: -8px !important;
|
|
78
|
+
border-radius: 4px;
|
|
79
|
+
box-shadow:
|
|
72
80
|
0px 4px 8px -2px #091e4240,
|
|
73
81
|
0px 0px 1px 0px #091e424f;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.cap-unified-select-status {
|
|
95
|
-
color: #e83135;
|
|
82
|
+
max-height: 360px;
|
|
83
|
+
overflow: visible;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ant-select-selection-item {
|
|
87
|
+
background: transparent;
|
|
88
|
+
}
|
|
89
|
+
.ant-select-multiple .ant-select-selection-wrap {
|
|
90
|
+
align-self: center;
|
|
91
|
+
}
|
|
92
|
+
.cap-unified-tree-select .ant-select-selector:focus {
|
|
93
|
+
border: 1px solid #7a869a;
|
|
94
|
+
}
|
|
95
|
+
.cap-unified-tree-select .ant-select-tree-treenode {
|
|
96
|
+
padding-left: 4px;
|
|
97
|
+
}
|
|
98
|
+
.cap-unified-select-status {
|
|
99
|
+
color: #e83135;
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
/* Common styles for all types */
|
|
@@ -128,7 +133,7 @@ export const selectStyles = css`
|
|
|
128
133
|
padding-left: 3px;
|
|
129
134
|
}
|
|
130
135
|
.ant-select-tree-indent {
|
|
131
|
-
margin-left:
|
|
136
|
+
margin-left: 12px;
|
|
132
137
|
}
|
|
133
138
|
.ant-select-tree-switcher:not(
|
|
134
139
|
.ant-select-tree-switcher-noop
|
|
@@ -147,12 +152,6 @@ export const selectStyles = css`
|
|
|
147
152
|
font-size: 12px;
|
|
148
153
|
}
|
|
149
154
|
}
|
|
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;
|
|
155
|
-
}
|
|
156
155
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
157
156
|
.ant-select-tree-checkbox-inner {
|
|
158
157
|
background-color: #42b040 !important;
|
|
@@ -200,6 +199,12 @@ export const selectStyles = css`
|
|
|
200
199
|
border-radius: 4px;
|
|
201
200
|
}
|
|
202
201
|
}
|
|
202
|
+
.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
|
|
203
|
+
.ant-checkbox-checked:not(.ant-checkbox-disabled)
|
|
204
|
+
.ant-checkbox-inner {
|
|
205
|
+
background-color: #42b040;
|
|
206
|
+
border: 2px solid #42b040 !important;
|
|
207
|
+
}
|
|
203
208
|
.ant-checkbox-indeterminate .ant-checkbox-inner {
|
|
204
209
|
background-color: #42b040 !important;
|
|
205
210
|
border-color: #42b040 !important;
|
|
@@ -216,15 +221,8 @@ export const selectStyles = css`
|
|
|
216
221
|
border-radius: 1px;
|
|
217
222
|
}
|
|
218
223
|
}
|
|
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;
|
|
224
|
-
}
|
|
225
224
|
.ant-select-tree-treenode.ant-select-tree-treenode-selected {
|
|
226
225
|
background-color: #e9f0fe;
|
|
227
|
-
color: #2466ea;
|
|
228
226
|
}
|
|
229
227
|
.ant-select-tree-list-holder-inner {
|
|
230
228
|
width: fit-content !important;
|
|
@@ -336,6 +334,9 @@ export const selectStyles = css`
|
|
|
336
334
|
}
|
|
337
335
|
}
|
|
338
336
|
}
|
|
337
|
+
.ant-select-tree-indent {
|
|
338
|
+
margin-left: 15px;
|
|
339
|
+
}
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
/* Single Select */
|
package/package.json
CHANGED