@capillarytech/blaze-ui 0.1.6-alpha.56 → 0.1.6-alpha.58

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.
@@ -7,7 +7,7 @@ import styled from 'styled-components';
7
7
  import * as styledVars from '../styled/variables';
8
8
  import { CapLabel, CapTooltipWithInfo, CapRow, CapIcon } from '../';
9
9
  import withStyles from '../utils/withStyles';
10
- import { SelectWrapper, HeaderWrapper, selectStyles } from './styles';
10
+ import { HeaderWrapper, selectStyles } from './styles';
11
11
 
12
12
  const StyledTreeSelect = styled(TreeSelect)`
13
13
  ${selectStyles}
@@ -229,15 +229,12 @@ const CapUnifiedSelect = ({
229
229
 
230
230
  const suffix = useMemo(() => {
231
231
  const displayValue = dropdownOpen ? tempValue : value;
232
- return isMulti &&
233
- Array.isArray(displayValue) &&
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={`${dropdownOpen ? 'up' : 'down'}`} size="s" />
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
 
@@ -476,7 +473,7 @@ const CapUnifiedSelect = ({
476
473
  type={type}
477
474
  treeData={filteredTree}
478
475
  value={customPopupRender ? tempValue : value}
479
- onChange={onChange}
476
+ onChange={customPopupRender ? handleTempChange : onChange}
480
477
  placeholder={placeholder}
481
478
  showSearch={false}
482
479
  maxTagCount={0}
@@ -18,6 +18,21 @@ export const selectStyles = css`
18
18
  &.disabled {
19
19
  cursor: not-allowed;
20
20
  }
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
+ .ant-select-selector .ant-select-selection-placeholder{
34
+ pointer-events: unset;
35
+ }
21
36
  .ant-select-prefix {
22
37
  font-size: 14px;
23
38
  font-weight: 400;
@@ -76,16 +91,12 @@ export const selectStyles = css`
76
91
  .ant-select-multiple .ant-select-selection-wrap {
77
92
  align-self: center;
78
93
  }
79
- .cap-unified-tree-select .ant-select-selector:hover {
80
- border: 1px solid #7a869a;
81
- }
82
94
  .cap-unified-tree-select .ant-select-selector:focus {
83
95
  border: 1px solid #7a869a;
84
96
  }
85
97
  .cap-unified-tree-select .ant-select-tree-treenode {
86
98
  padding-left: 4px;
87
99
  }
88
-
89
100
  .cap-unified-select-status {
90
101
  color: #e83135;
91
102
  }
@@ -124,7 +135,7 @@ export const selectStyles = css`
124
135
  padding-left: 3px;
125
136
  }
126
137
  .ant-select-tree-indent {
127
- margin-left: 15px;
138
+ margin-left: 12px;
128
139
  }
129
140
  .ant-select-tree-switcher:not(
130
141
  .ant-select-tree-switcher-noop
@@ -143,12 +154,6 @@ export const selectStyles = css`
143
154
  font-size: 12px;
144
155
  }
145
156
  }
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;
151
- }
152
157
  .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
153
158
  .ant-select-tree-checkbox-inner {
154
159
  background-color: #42b040 !important;
@@ -196,6 +201,12 @@ export const selectStyles = css`
196
201
  border-radius: 4px;
197
202
  }
198
203
  }
204
+ .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
205
+ .ant-checkbox-checked:not(.ant-checkbox-disabled)
206
+ .ant-checkbox-inner {
207
+ background-color: #42b040;
208
+ border: 2px solid #42b040 !important;
209
+ }
199
210
  .ant-checkbox-indeterminate .ant-checkbox-inner {
200
211
  background-color: #42b040 !important;
201
212
  border-color: #42b040 !important;
@@ -212,15 +223,8 @@ export const selectStyles = css`
212
223
  border-radius: 1px;
213
224
  }
214
225
  }
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;
220
- }
221
226
  .ant-select-tree-treenode.ant-select-tree-treenode-selected {
222
227
  background-color: #e9f0fe;
223
- color: #2466ea;
224
228
  }
225
229
  .ant-select-tree-list-holder-inner {
226
230
  width: fit-content !important;
@@ -332,6 +336,9 @@ export const selectStyles = css`
332
336
  }
333
337
  }
334
338
  }
339
+ .ant-select-tree-indent {
340
+ margin-left: 15px;
341
+ }
335
342
  }
336
343
 
337
344
  /* Single Select */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
3
  "author": "Capillary Technologies",
4
- "version": "0.1.6-alpha.56",
4
+ "version": "0.1.6-alpha.58",
5
5
  "description": "Capillary UI component library with Ant Design v5",
6
6
  "main": "./index.js",
7
7
  "sideEffects": [