@capillarytech/blaze-ui 0.1.6-alpha.61 → 0.1.6-alpha.63

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.
@@ -5,45 +5,6 @@ import styled from 'styled-components';
5
5
  import { StyledLabelDiv, StyledLabelSpan, labelStyles } from './styles';
6
6
  import withStyles from '../utils/withStyles';
7
7
 
8
- const getLabelTypeStyles = (type) => {
9
- const types = {
10
- label1: { fontSize: '12px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
11
- label2: { fontSize: '12px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
12
- label3: { fontSize: '12px', color: '#97a0af', fontWeight: 'normal', lineHeight: 'normal' },
13
- label4: { fontSize: '12px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
14
- label5: { fontSize: '10px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
15
- label6: { fontSize: '12px', color: '#b3bac5', fontWeight: 'normal', lineHeight: 'normal' },
16
- label7: { fontSize: '14px', color: '#5e6c84', fontWeight: '500', lineHeight: 'normal' },
17
- label8: { fontSize: '12px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
18
- label9: { fontSize: '12px', color: '#091e42', lineHeight: '16px', fontWeight: 'normal' },
19
- label10: { fontSize: '12px', color: '#ffffff', lineHeight: '16px', fontWeight: 'normal' },
20
- label11: { fontSize: '10px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
21
- label12: { fontSize: '12px', color: '#ffffff', fontWeight: 'normal', lineHeight: 'normal' },
22
- label13: { fontSize: '10px', color: '#97a0af', fontWeight: 'normal', lineHeight: 'normal' },
23
- label14: { fontSize: '14px', color: '#676e7c', fontWeight: 'normal', lineHeight: 'normal' },
24
- label15: { fontSize: '14px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
25
- label16: { fontSize: '14px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
26
- label17: { fontSize: '16px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
27
- label18: { fontSize: '14px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
28
- label19: { fontSize: '12px', lineHeight: '16px', fontWeight: 'normal', color: 'rgba(0, 0, 0, 0.87)' },
29
- label20: { fontSize: '14px', color: '#2466ea', fontWeight: '500', lineHeight: 'normal' },
30
- label21: { fontSize: '12px', color: '#2466ea', fontWeight: 'normal', lineHeight: 'normal' },
31
- label22: { fontSize: '24px', color: '#5f6d85', lineHeight: '28px', fontWeight: 'normal' },
32
- label23: { fontSize: '14px', color: '#ffffff', fontWeight: 'normal', lineHeight: 'normal' },
33
- label24: { fontSize: '14px', color: '#5e6c84', fontWeight: '400', lineHeight: '20px' },
34
- label25: { fontSize: '14px', color: '#5e6c84', fontWeight: '500', lineHeight: '20px' },
35
- label26: { fontSize: '10px', color: '#091E42', fontWeight: '400', lineHeight: '12px' },
36
- label27: { fontSize: '12px', color: '#2466EA', fontWeight: '500', lineHeight: '16px' },
37
- label28: { color: '#FFF', fontSize: '12px', fontWeight: '500', lineHeight: '16px' },
38
- label29: { color: '#FFF', fontSize: '10px', fontWeight: '400', lineHeight: '12px' },
39
- label30: { color: '#FFF', fontSize: '10px', fontWeight: '400', lineHeight: '12px' },
40
- label31: { fontSize: '12px', color: '#091E42', fontWeight: '400', lineHeight: '16px' },
41
- label32: { lineHeight: '20px', fontSize: '14px', color: '#ffffff', fontWeight: '500' },
42
- label33: { fontSize: '14px', color: '#2466EA', fontWeight: '500', lineHeight: '20px' },
43
- };
44
-
45
- return types[type] || types.label1;
46
- };
47
8
 
48
9
  const CapLabel = ({
49
10
  children,
@@ -54,13 +15,11 @@ const CapLabel = ({
54
15
  lineHeight,
55
16
  ...rest
56
17
  }) => {
57
- const typeStyles = getLabelTypeStyles(type);
58
18
 
59
19
  return (
60
20
  <StyledLabelDiv
61
21
  className={classnames('cap-label', type, className)}
62
22
  style={style}
63
- typeStyles={typeStyles}
64
23
  fontWeight={fontWeight}
65
24
  lineHeight={lineHeight}
66
25
  {...rest}
@@ -87,13 +46,11 @@ CapLabel.defaultProps = {
87
46
 
88
47
  // Static method for inline label
89
48
  const CapLabelInline = styled(({ children, type = 'label1', className = '', style = {}, fontWeight, lineHeight, ...rest }) => {
90
- const typeStyles = getLabelTypeStyles(type);
91
49
 
92
50
  return (
93
51
  <StyledLabelSpan
94
52
  className={classnames('cap-label', type, className)}
95
53
  style={style}
96
- typeStyles={typeStyles}
97
54
  fontWeight={fontWeight}
98
55
  lineHeight={lineHeight}
99
56
  {...rest}
@@ -13,21 +13,21 @@ const StyledTooltip = styled(Tooltip)`
13
13
  const CapTooltip = ({
14
14
  title,
15
15
  children,
16
- placement = 'top',
16
+ placement,
17
17
  visible,
18
- defaultVisible = false,
19
- trigger = 'hover',
20
- destroyTooltipOnHide = false,
21
- mouseEnterDelay = 0.1,
22
- mouseLeaveDelay = 0.1,
23
- overlayClassName = '',
18
+ defaultVisible,
19
+ trigger,
20
+ destroyTooltipOnHide,
21
+ mouseEnterDelay,
22
+ mouseLeaveDelay,
23
+ overlayClassName,
24
24
  overlayStyle,
25
25
  onVisibleChange,
26
26
  align,
27
- arrowPointAtCenter = false,
28
- autoAdjustOverflow = true,
27
+ arrowPointAtCenter,
28
+ autoAdjustOverflow,
29
29
  getPopupContainer,
30
- className = '',
30
+ className,
31
31
  ...rest
32
32
  }) => {
33
33
  return (
@@ -29,7 +29,7 @@ const NoResult = memo(({ noResultCustomText, className, showUpload, options, noR
29
29
  ));
30
30
 
31
31
  const SelectAllCheckbox = memo(({ currentItems, tempValue, setTempValue, processTreeData }) => {
32
- const { leafValues } = processTreeData(currentItems);
32
+ const { leafValues } = processTreeData?.(currentItems);
33
33
  const totalAvailable = leafValues.length;
34
34
  const leafSet = new Set(leafValues);
35
35
  const selectedInScope = Array.isArray(tempValue)
@@ -76,10 +76,10 @@ const buildTreeMaps = (nodes) => {
76
76
  if (!nodes) return result;
77
77
 
78
78
  const traverse = (items) => {
79
- items.forEach((item) => {
79
+ items?.forEach((item) => {
80
80
  result.nodeMap[item.value] = item;
81
- if (item.children && item.children.length > 0) {
82
- result.parentChildMap[item.value] = item.children.map(child => child.value);
81
+ if (item?.children && item.children.length > 0) {
82
+ result.parentChildMap[item.value] = item.children.map(child => child?.value);
83
83
  traverse(item.children);
84
84
  } else {
85
85
  result.leafValues.push(item.value);
@@ -91,18 +91,18 @@ const buildTreeMaps = (nodes) => {
91
91
  };
92
92
 
93
93
  const countSelectedLeaves = (treeMaps, selectedValues) => {
94
- if (!Array.isArray(selectedValues) || !selectedValues.length) return 0;
94
+ if (!Array.isArray(selectedValues) || !selectedValues?.length) return 0;
95
95
  const expandedSet = new Set(selectedValues);
96
96
  const processNode = (value) => {
97
- const children = treeMaps.parentChildMap[value];
97
+ const children = treeMaps?.parentChildMap?.[value];
98
98
  if (!children) return;
99
- children.forEach(childValue => {
99
+ children?.forEach(childValue => {
100
100
  expandedSet.add(childValue);
101
101
  processNode(childValue);
102
102
  });
103
103
  };
104
- selectedValues.forEach(processNode);
105
- return treeMaps.leafValues.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0);
104
+ selectedValues?.forEach(processNode);
105
+ return treeMaps?.leafValues?.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0) || 0;
106
106
  };
107
107
 
108
108
  const filterTreeData = (data, search, searchBasedOn) => {
@@ -110,16 +110,16 @@ const filterTreeData = (data, search, searchBasedOn) => {
110
110
  const searchLower = search.toLowerCase();
111
111
  const nodeMatchesSearch = (node) => {
112
112
  const target = searchBasedOn === 'value'
113
- ? String(node.value ?? '')
113
+ ? String(node?.value ?? '')
114
114
  : searchBasedOn === 'key'
115
- ? String(node.key ?? '')
116
- : String(node.label ?? node.title ?? '');
115
+ ? String(node?.key ?? '')
116
+ : String(node?.label ?? node?.title ?? '');
117
117
  return target.toLowerCase().includes(searchLower);
118
118
  };
119
119
  const loop = (items) =>
120
120
  items.reduce((acc, item) => {
121
121
  if (!item) return acc;
122
- const children = item.children?.length ? loop(item.children) : [];
122
+ const children = item?.children?.length ? loop(item.children) : [];
123
123
  if (nodeMatchesSearch(item) || children.length) {
124
124
  acc.push({ ...item, children });
125
125
  }
@@ -133,27 +133,27 @@ const CapUnifiedSelect = ({
133
133
  options = [],
134
134
  value,
135
135
  onChange,
136
- placeholder = 'Select an option',
136
+ placeholder,
137
137
  className,
138
138
  style,
139
- isError = false,
139
+ isError,
140
140
  errorMessage,
141
141
  containerClassName,
142
142
  popoverClassName,
143
- allowClear = false,
143
+ allowClear,
144
144
  headerLabel,
145
145
  onUpload,
146
146
  tooltip,
147
147
  bylineText,
148
- disabled = false,
149
- showUpload = false,
150
- customPopupRender = true,
151
- showSearch = true,
152
- searchBasedOn = 'label',
148
+ disabled,
149
+ showUpload,
150
+ customPopupRender,
151
+ showSearch,
152
+ searchBasedOn,
153
153
  onConfirm,
154
- onCancel,
155
- noResultCustomText = 'No results found',
156
- noResultCustomIcon = 'warning',
154
+ clearText,
155
+ noResultCustomText,
156
+ noResultCustomIcon,
157
157
  ...rest
158
158
  }) => {
159
159
  const [searchText, setSearchText] = useState('');
@@ -162,7 +162,7 @@ const CapUnifiedSelect = ({
162
162
 
163
163
  useEffect(() => {
164
164
  const isEqual = Array.isArray(value) && Array.isArray(tempValue)
165
- ? value.length === tempValue.length && value.every((v) => tempValue.includes(v))
165
+ ? value?.length === tempValue?.length && value.every((v) => tempValue.includes(v))
166
166
  : value === tempValue;
167
167
  if (!isEqual) setTempValue(value);
168
168
  }, [value]);
@@ -192,7 +192,7 @@ const CapUnifiedSelect = ({
192
192
  const displayValue = dropdownOpen ? tempValue : value;
193
193
 
194
194
  const suffix = useMemo(() => {
195
- const count = Array.isArray(displayValue) ? displayValue.length : (displayValue ? 1 : 0);
195
+ const count = Array.isArray(displayValue) ? displayValue?.length : (displayValue ? 1 : 0);
196
196
  return (
197
197
  <>
198
198
  {isMulti && count > 1 && <span>+{count - 1} more </span>}
@@ -206,9 +206,9 @@ const CapUnifiedSelect = ({
206
206
  }, [isMulti, displayValue, dropdownOpen]);
207
207
 
208
208
  const prefix = useMemo(() => {
209
- if (isMulti && Array.isArray(displayValue) && displayValue.length > 0) {
210
- const firstLeafValue = displayValue.find(val => treeMaps.leafValues.includes(val));
211
- return treeMaps.nodeMap[firstLeafValue]?.label || treeMaps.nodeMap[firstLeafValue]?.title || null;
209
+ if (isMulti && Array.isArray(displayValue) && displayValue?.length > 0) {
210
+ const firstLeafValue = displayValue.find(val => treeMaps?.leafValues?.includes(val));
211
+ return treeMaps?.nodeMap?.[firstLeafValue]?.label || treeMaps?.nodeMap?.[firstLeafValue]?.title || null;
212
212
  }
213
213
  return null;
214
214
  }, [isMulti, displayValue, treeMaps]);
@@ -220,11 +220,12 @@ const CapUnifiedSelect = ({
220
220
  onConfirm?.(tempValue);
221
221
  }, [onChange, onConfirm, tempValue]);
222
222
 
223
- const handleCancel = useCallback(() => {
224
- setTempValue(value);
223
+ const handleClearAll = useCallback(() => {
224
+ setTempValue([]);
225
+ onChange?.([]);
225
226
  setDropdownOpen(false);
226
- onCancel?.();
227
- }, [value, onCancel]);
227
+ }, [onChange]);
228
+
228
229
 
229
230
  const handleDropdownVisibilityChange = useCallback((open) => {
230
231
  if (!open && !customPopupRender) {
@@ -332,9 +333,9 @@ const CapUnifiedSelect = ({
332
333
  type="text"
333
334
  className="cap-unified-select-cancel-button"
334
335
  size="small"
335
- onClick={handleCancel}
336
+ onClick={handleClearAll}
336
337
  >
337
- Cancel
338
+ Clear all
338
339
  </Button>
339
340
  <CapLabel className="cap-unified-select-selected-count">
340
341
  {selectedLeafCount} selected
@@ -342,6 +343,12 @@ const CapUnifiedSelect = ({
342
343
  </div>
343
344
  </div>
344
345
  )}
346
+
347
+ {(type === 'select' || type === 'treeSelect') && (
348
+ <CapRow className="cap-unified-select-tree-clear-container" onClick={handleClearAll}>
349
+ <CapLabel className="cap-unified-select-tree-clear-label">{clearText}</CapLabel>
350
+ </CapRow>
351
+ )}
345
352
  </div>
346
353
  );
347
354
  },
@@ -358,7 +365,7 @@ const CapUnifiedSelect = ({
358
365
  type,
359
366
  tempValue,
360
367
  handleConfirm,
361
- handleCancel,
368
+ handleClearAll,
362
369
  popoverClassName,
363
370
  className,
364
371
  selectedLeafCount,
@@ -430,12 +437,12 @@ CapUnifiedSelect.propTypes = {
430
437
  showSearch: PropTypes.bool,
431
438
  searchBasedOn: PropTypes.oneOf(['label', 'value', 'key']),
432
439
  onConfirm: PropTypes.func,
433
- onCancel: PropTypes.func,
434
440
  isError: PropTypes.bool,
435
441
  errorMessage: PropTypes.string,
436
442
  popupClassName: PropTypes.string,
437
443
  showUpload: PropTypes.bool,
438
444
  onUpload: PropTypes.func,
445
+ clearText: PropTypes.string,
439
446
  };
440
447
 
441
448
  CapUnifiedSelect.defaultProps = {
@@ -444,6 +451,7 @@ CapUnifiedSelect.defaultProps = {
444
451
  searchBasedOn: 'label',
445
452
  noResultCustomText: 'No results found',
446
453
  noResultCustomIcon: 'warning',
454
+ clearText: 'Clear',
447
455
  options: [],
448
456
  allowClear: false,
449
457
  customPopupRender: true,
@@ -4,7 +4,7 @@ import * as styledVars from '../styled/variables';
4
4
  export const HeaderWrapper = styled.div`
5
5
  display: flex;
6
6
  align-items: center;
7
- gap: 4px;
7
+ gap: ${styledVars.SPACING_04};
8
8
 
9
9
  &.disabled {
10
10
  opacity: 0.5;
@@ -25,7 +25,7 @@ export const selectStyles = css`
25
25
  &:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) {
26
26
  &:hover {
27
27
  .ant-select-selector {
28
- border-color: #7A869A;
28
+ border-color: ${styledVars.CAP_G11};
29
29
  }
30
30
  }
31
31
  }
@@ -34,54 +34,53 @@ export const selectStyles = css`
34
34
  pointer-events: unset;
35
35
  }
36
36
  .ant-select-prefix {
37
- font-size: 14px;
38
- font-weight: 400;
39
- color: #091e42;
40
- line-height: 20px;
37
+ font-size: 0.875rem;
38
+ font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
39
+ color: ${styledVars.CAP_G01};
40
+ line-height: 1.25rem;
41
41
  }
42
42
  .cap-unified-select-header-label {
43
43
  font-family: ${styledVars.FONT_FAMILY};
44
- font-weight: 500;
45
- font-size: 14px;
46
- line-height: 20px;
47
- letter-spacing: 0px;
44
+ font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
45
+ font-size: 0.875rem;
46
+ line-height: 1.25rem;
47
+ letter-spacing: 0;
48
48
  }
49
49
  .cap-unified-select-header-byline-text {
50
50
  font-family: ${styledVars.FONT_FAMILY};
51
- font-weight: 400;
52
- font-size: 12px;
53
- margin-top: -5px;
54
- letter-spacing: 0px;
55
- color: #97a0af;
51
+ font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
52
+ font-size: 0.75rem;
53
+ letter-spacing: 0;
54
+ color: ${styledVars.CAP_G05};
56
55
  }
57
56
  .ant-input-affix-wrapper .ant-input-prefix {
58
- left: 12px;
57
+ left: ${styledVars.SPACING_12};
59
58
  }
60
59
  .cap-tooltip-with-info-icon {
61
- margin-top: 2px;
60
+ margin-top: 0.125rem;
62
61
  }
63
62
 
64
63
  .cap-unified-tree-select {
65
- min-width: 200px;
64
+ min-width: 12.5rem;
66
65
  }
67
66
 
68
67
  .ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
69
68
  .ant-select-selector {
70
- border-color: #7a869a !important;
69
+ border-color: ${styledVars.CAP_G11} !important;
71
70
  box-shadow: none;
72
71
  outline: 0;
73
72
  }
74
73
 
75
74
  .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
76
- background-color: #42b040;
75
+ background-color: ${styledVars.CAP_PRIMARY.base};
77
76
  }
78
77
  .ant-select-dropdown {
79
- margin-top: -8px !important;
80
- border-radius: 4px;
78
+ margin-top: -0.5rem !important;
79
+ border-radius: ${styledVars.RADIUS_04};
81
80
  box-shadow:
82
- 0px 4px 8px -2px #091e4240,
83
- 0px 0px 1px 0px #091e424f;
84
- max-height: 360px;
81
+ 0 0.25rem 0.5rem -0.125rem ${styledVars.CAP_G01},
82
+ 0 0 0.0625rem 0 ${styledVars.CAP_G01};
83
+ max-height: 22.5rem;
85
84
  overflow: visible;
86
85
  }
87
86
 
@@ -92,13 +91,13 @@ export const selectStyles = css`
92
91
  align-self: center;
93
92
  }
94
93
  .cap-unified-tree-select .ant-select-selector:focus {
95
- border: 1px solid #7a869a;
94
+ border: 1px solid ${styledVars.CAP_G11};
96
95
  }
97
96
  .cap-unified-tree-select .ant-select-tree-treenode {
98
- padding-left: 4px;
97
+ padding-left: ${styledVars.SPACING_04};
99
98
  }
100
99
  .cap-unified-select-status {
101
- color: #e83135;
100
+ color: ${styledVars.CAP_RED};
102
101
  }
103
102
  }
104
103
 
@@ -114,13 +113,13 @@ export const selectStyles = css`
114
113
  background-color: transparent;
115
114
  }
116
115
  .ant-select-tree-treenode {
117
- line-height: 40px;
118
- margin-bottom: 0px;
116
+ line-height: 2.5rem;
117
+ margin-bottom: 0;
119
118
  .ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
120
- height: 18px;
121
- width: 18px;
122
- border: 2px solid #b3bac5;
123
- border-radius: 4px;
119
+ height: 1.125rem;
120
+ width: 1.125rem;
121
+ border: 2px solid ${styledVars.CAP_G06};
122
+ border-radius: ${styledVars.RADIUS_04};
124
123
  }
125
124
  &:hover {
126
125
  background-color: #fffbe6;
@@ -131,11 +130,11 @@ export const selectStyles = css`
131
130
  }
132
131
  }
133
132
  .ant-select-tree-node-content-wrapper {
134
- border-radius: 0px;
135
- padding-left: 3px;
133
+ border-radius: 0;
134
+ padding-left: 0.1875rem;
136
135
  }
137
136
  .ant-select-tree-indent {
138
- margin-left: 12px;
137
+ margin-left: ${styledVars.SPACING_12};
139
138
  }
140
139
  .ant-select-tree-switcher:not(
141
140
  .ant-select-tree-switcher-noop
@@ -143,21 +142,21 @@ export const selectStyles = css`
143
142
  background-color: transparent;
144
143
  }
145
144
  .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
146
- background-color: #42b040;
147
- border: 2px solid #42b040 !important;
145
+ background-color: ${styledVars.CAP_PRIMARY.base};
146
+ border: 2px solid ${styledVars.CAP_PRIMARY.base} !important;
148
147
  &:hover {
149
- background-color: #42b040;
150
- border: 2px solid #42b040 !important;
148
+ background-color: ${styledVars.CAP_PRIMARY.base};
149
+ border: 2px solid ${styledVars.CAP_PRIMARY.base} !important;
151
150
  }
152
151
  }
153
152
  .ant-select-tree-switcher .ant-select-tree-switcher-icon {
154
- font-size: 12px;
153
+ font-size: 0.75rem;
155
154
  }
156
155
  }
157
156
  .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
158
157
  .ant-select-tree-checkbox-inner {
159
- background-color: #42b040 !important;
160
- border-color: #42b040 !important;
158
+ background-color: ${styledVars.CAP_PRIMARY.base} !important;
159
+ border-color: ${styledVars.CAP_PRIMARY.base} !important;
161
160
  }
162
161
 
163
162
  .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
@@ -166,65 +165,65 @@ export const selectStyles = css`
166
165
  position: absolute;
167
166
  top: 50%;
168
167
  left: 50%;
169
- width: 10px;
170
- height: 2px;
171
- background-color: #fff;
168
+ width: 0.625rem;
169
+ height: 0.125rem;
170
+ background-color: ${styledVars.CAP_WHITE};
172
171
  transform: translate(-50%, -50%);
173
- border-radius: 1px;
172
+ border-radius: 0.0625rem;
174
173
  }
175
174
  .cap-unified-select-upload-container {
176
175
  cursor: pointer;
177
176
  display: flex;
178
177
  align-items: center;
179
- border-bottom: 1px solid #f0f0f0;
180
- height: 40px;
181
- padding-left: 16px;
178
+ border-bottom: 1px solid ${styledVars.CAP_G08};
179
+ height: 2.5rem;
180
+ padding-left: ${styledVars.SPACING_16};
182
181
 
183
182
  .cap-unified-select-upload-label {
184
- margin-left: 12px;
185
- color: #2466ea;
183
+ margin-left: ${styledVars.SPACING_12};
184
+ color: ${styledVars.CAP_SECONDARY.base};
186
185
  }
187
186
  }
188
187
  .cap-unified-select-select-all-container {
189
- padding: 9px 15px;
188
+ padding: 0.5625rem 0.9375rem;
190
189
  cursor: pointer;
191
190
  display: flex;
192
191
  align-items: center;
193
- border-bottom: 1px solid #f0f0f0;
194
- height: 40px;
192
+ border-bottom: 1px solid ${styledVars.CAP_G08};
193
+ height: 2.5rem;
195
194
  .cap-unified-select-select-all-checkbox {
196
195
  display: contents !important;
197
196
  .ant-checkbox-inner {
198
- height: 18px;
199
- width: 18px;
200
- border: 2px solid #b3bac5;
201
- border-radius: 4px;
197
+ height: 1.125rem;
198
+ width: 1.125rem;
199
+ border: 2px solid ${styledVars.CAP_G06};
200
+ border-radius: ${styledVars.RADIUS_04};
202
201
  }
203
202
  }
204
203
  .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
205
204
  .ant-checkbox-checked:not(.ant-checkbox-disabled)
206
205
  .ant-checkbox-inner {
207
- background-color: #42b040;
208
- border: 2px solid #42b040 !important;
206
+ background-color: ${styledVars.CAP_PRIMARY.base};
207
+ border: 2px solid ${styledVars.CAP_PRIMARY.base} !important;
209
208
  }
210
209
  .ant-checkbox-indeterminate .ant-checkbox-inner {
211
- background-color: #42b040 !important;
212
- border-color: #42b040 !important;
210
+ background-color: ${styledVars.CAP_PRIMARY.base} !important;
211
+ border-color: ${styledVars.CAP_PRIMARY.base} !important;
213
212
  }
214
213
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
215
214
  content: '';
216
215
  position: absolute;
217
216
  top: 50%;
218
217
  left: 50%;
219
- width: 10px;
220
- height: 2px;
221
- background-color: #fff;
218
+ width: 0.625rem;
219
+ height: 0.125rem;
220
+ background-color: ${styledVars.CAP_WHITE};
222
221
  transform: translate(-50%, -50%);
223
- border-radius: 1px;
222
+ border-radius: 0.0625rem;
224
223
  }
225
224
  }
226
225
  .ant-select-tree-treenode.ant-select-tree-treenode-selected {
227
- background-color: #e9f0fe;
226
+ background-color: ${styledVars.CAP_PALE_GREY};
228
227
  }
229
228
  .ant-select-tree-list-holder-inner {
230
229
  width: fit-content !important;
@@ -235,69 +234,67 @@ export const selectStyles = css`
235
234
  flex-direction: column;
236
235
  align-items: center;
237
236
  justify-content: center;
238
- height: 200px;
239
- color: #8c8c8c;
240
- font-size: 14px;
237
+ height: 12.5rem;
238
+ color: ${styledVars.CAP_G05};
239
+ font-size: 0.875rem;
241
240
  }
242
241
  .cap-unified-select-no-result-icon {
243
- font-size: 36px;
244
- margin-bottom: 8px;
245
- color: #bfbfbf;
242
+ font-size: 2.25rem;
243
+ margin-bottom: ${styledVars.SPACING_08};
244
+ color: ${styledVars.CAP_G06};
246
245
  }
247
246
  .cap-unified-select-no-result-text {
248
247
  font-weight: 500;
249
248
  }
250
249
  .ant-tree-select:hover .ant-select-selector {
251
- border-color: #7a869a;
250
+ border-color: ${styledVars.CAP_G11};
252
251
  }
253
252
  .ant-tree-select-focused .ant-select-selector,
254
253
  .ant-tree-select-open .ant-select-selector {
255
- border-color: #7a869a;
254
+ border-color: ${styledVars.CAP_G11};
256
255
  box-shadow: none;
257
256
  outline: none;
258
257
  }
259
258
  .cap-unified-select-search-container {
260
- border-bottom: 1px solid #ebecf0 !important;
261
- line-height: 40px !important;
259
+ border-bottom: 1px solid ${styledVars.CAP_G08} !important;
260
+ line-height: 2.5rem !important;
262
261
  .ant-input-affix-wrapper {
263
- padding-left: 8px;
262
+ padding-left: ${styledVars.SPACING_08};
264
263
  }
265
264
  }
266
265
  .cap-unified-select-upload-button {
267
266
  border: none;
268
- padding-left: 15px;
267
+ padding-left: 0.9375rem;
269
268
  }
270
269
  .cap-unified-select-confirm-container {
271
270
  display: flex;
272
271
  align-items: center;
273
- height: 48px;
274
- padding: 7px;
275
- border-top: 1px solid #ebecf0;
272
+ height: 3rem;
273
+ padding: 0.4375rem;
274
+ border-top: 1px solid ${styledVars.CAP_G08};
276
275
  }
277
276
  .cap-unified-select-confirm-button-group {
278
277
  display: flex;
279
278
  padding-left: 8px;
280
279
  align-items: center;
281
- width: 100%; /* so it can push the label */
282
- button {
283
- height: 32px;
284
- width: 94px;
285
- }
286
280
  .cap-unified-select-confirm-button {
287
- background-color: #6ebd6e;
281
+ background-color: ${styledVars.CAP_GREEN01};
282
+ height: 2rem;
283
+ width: 5.875rem;
288
284
  }
289
285
  .cap-unified-select-cancel-button {
290
286
  border: transparent;
291
287
  box-shadow: none;
288
+ width: 5rem;
292
289
  }
293
290
  }
294
291
  .cap-unified-select-selected-count {
295
292
  display: flex;
296
293
  margin-left: auto; /* pushes to far right */
297
294
  font-size: 12px;
298
- font-weight: 400;
299
- line-height: 16px;
300
- color: #5e6c84;
295
+ font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
296
+ line-height: 1rem;
297
+ color: ${styledVars.CAP_G04};
301
298
  }
302
299
  .cap-unified-select-search-container {
303
300
  .ant-input-affix-wrapper {
@@ -309,12 +306,12 @@ export const selectStyles = css`
309
306
  }
310
307
 
311
308
  .ant-input-affix-wrapper:hover {
312
- border-bottom: 1px solid #7a869a !important;
309
+ border-bottom: 1px solid ${styledVars.CAP_G11} !important;
313
310
  box-shadow: none;
314
311
  }
315
312
 
316
313
  .ant-input-affix-wrapper:focus-within {
317
- border-bottom: 1px solid #091e42 !important;
314
+ border-bottom: 1px solid ${styledVars.CAP_G01} !important;
318
315
  box-shadow: none;
319
316
  outline: none;
320
317
  }
@@ -324,6 +321,22 @@ export const selectStyles = css`
324
321
  box-shadow: none !important;
325
322
  }
326
323
  }
324
+ .cap-unified-select-tree-clear-container{
325
+ display: flex;
326
+ justify-content: center;
327
+ align-items: center;
328
+ height: 2.5rem;
329
+ border-top: 1px solid #EBECF0;
330
+ cursor: pointer;
331
+ color: ${styledVars.CAP_G01};
332
+ &:hover{
333
+ background-color: ${styledVars.CAP_G08};
334
+ }
335
+ .cap-unified-select-tree-clear-label{
336
+ font-size: 0.875rem;
337
+ font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
338
+ }
339
+ }
327
340
  }
328
341
 
329
342
  &.custom-popup-container {
@@ -337,7 +350,7 @@ export const selectStyles = css`
337
350
  }
338
351
  }
339
352
  .ant-select-tree-indent {
340
- margin-left: 15px;
353
+ margin-left: 0.9375rem;
341
354
  }
342
355
  }
343
356
 
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.61",
4
+ "version": "0.1.6-alpha.63",
5
5
  "description": "Capillary UI component library with Ant Design v5",
6
6
  "main": "./index.js",
7
7
  "sideEffects": [