@capillarytech/blaze-ui 0.1.6-alpha.59 → 0.1.6-alpha.6

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.
Files changed (101) hide show
  1. package/CapHeading/CapHeading.js +71 -0
  2. package/CapHeading/index.js +1 -0
  3. package/CapHeading/styles.js +125 -0
  4. package/CapInfoNote/CapInfoNote.js +54 -0
  5. package/CapInfoNote/index.js +1 -0
  6. package/CapInfoNote/styles.js +63 -0
  7. package/CapInput/CapInput.js +1 -1
  8. package/CapInput/Number.js +1 -1
  9. package/CapInput/Search.js +1 -1
  10. package/CapInput/TextArea.js +1 -1
  11. package/CapInput/loadable.js +9 -0
  12. package/CapLabel/CapLabel.js +81 -101
  13. package/CapLabel/index.js +1 -3
  14. package/CapLabel/styles.js +212 -250
  15. package/CapRow/CapRow.js +10 -111
  16. package/CapRow/index.js +1 -3
  17. package/CapRow/styles.js +6 -47
  18. package/CapTable/loadable.js +4 -4
  19. package/CapTable/styles.js +1 -1
  20. package/CapTooltip/CapTooltip.js +25 -87
  21. package/CapTooltip/index.js +1 -3
  22. package/CapTooltip/styles.js +27 -19
  23. package/CapUnifiedSelect/CapUnifiedSelect.js +67 -546
  24. package/CapUnifiedSelect/index.js +4 -1
  25. package/CapUnifiedSelect/loadable.js +3 -0
  26. package/CapUnifiedSelect/styles.js +168 -300
  27. package/dist/235.index.js +2 -0
  28. package/dist/235.index.js.LICENSE.txt +29 -0
  29. package/dist/603.index.js +1 -0
  30. package/dist/CapInput/CapInput.js +66 -0
  31. package/dist/CapInput/Number.js +42 -0
  32. package/dist/CapInput/Search.js +35 -0
  33. package/dist/CapInput/TextArea.js +42 -0
  34. package/dist/CapInput/index.js +15 -0
  35. package/dist/CapInput/messages.js +32 -0
  36. package/dist/CapInput/styles.js +11 -0
  37. package/dist/CapTable/CapTable.js +148 -0
  38. package/dist/CapTable/index.js +9 -0
  39. package/dist/CapTable/loadable.js +23 -0
  40. package/dist/CapTable/styles.js +26 -0
  41. package/dist/LocaleHoc/index.js +40 -0
  42. package/dist/esm/CapHeading/CapHeading.js +41 -0
  43. package/dist/esm/CapHeading/index.js +1 -0
  44. package/dist/esm/CapHeading/styles.js +123 -0
  45. package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
  46. package/dist/esm/CapInfoNote/index.js +1 -0
  47. package/dist/esm/CapInfoNote/styles.js +6 -0
  48. package/dist/esm/CapInput/CapInput.js +57 -0
  49. package/dist/esm/CapInput/Number.js +35 -0
  50. package/dist/esm/CapInput/Search.js +28 -0
  51. package/dist/esm/CapInput/TextArea.js +35 -0
  52. package/dist/esm/CapInput/index.js +8 -0
  53. package/dist/esm/CapInput/loadable.js +9 -0
  54. package/dist/esm/CapInput/messages.js +25 -0
  55. package/dist/esm/CapInput/styles.js +3 -0
  56. package/dist/esm/CapLabel/CapLabel.js +50 -0
  57. package/dist/esm/CapLabel/index.js +1 -0
  58. package/dist/esm/CapLabel/styles.js +219 -0
  59. package/dist/esm/CapRow/CapRow.js +22 -0
  60. package/dist/esm/CapRow/index.js +1 -0
  61. package/dist/esm/CapRow/styles.js +5 -0
  62. package/dist/esm/CapTable/CapTable.js +140 -0
  63. package/dist/esm/CapTable/index.js +2 -0
  64. package/dist/esm/CapTable/loadable.js +12 -0
  65. package/dist/esm/CapTable/styles.js +17 -0
  66. package/dist/esm/CapTooltip/CapTooltip.js +34 -0
  67. package/dist/esm/CapTooltip/index.js +1 -0
  68. package/dist/esm/CapTooltip/styles.js +6 -0
  69. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +101 -0
  70. package/dist/esm/CapUnifiedSelect/index.js +3 -0
  71. package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
  72. package/dist/esm/CapUnifiedSelect/messages.js +23 -0
  73. package/dist/esm/CapUnifiedSelect/styles.js +15 -0
  74. package/dist/esm/LocaleHoc/index.js +31 -0
  75. package/dist/esm/index.js +11 -0
  76. package/dist/esm/styled/index.js +5 -0
  77. package/dist/esm/styled/variables.js +88 -0
  78. package/dist/esm/translations/en.js +329 -0
  79. package/dist/index.js +39 -0
  80. package/dist/index.js.LICENSE.txt +7 -0
  81. package/dist/styled/index.js +22 -0
  82. package/dist/styled/variables.js +94 -0
  83. package/dist/translations/en.js +335 -0
  84. package/index.js +1 -12
  85. package/package.json +11 -5
  86. package/.DS_Store +0 -0
  87. package/CapIcon/CapIcon.js +0 -183
  88. package/CapIcon/index.js +0 -3
  89. package/CapIcon/styles.js +0 -76
  90. package/CapSkeleton/CapSkeleton.js +0 -17
  91. package/CapSkeleton/index.js +0 -1
  92. package/CapSpin/CapSpin.js +0 -23
  93. package/CapSpin/index.js +0 -1
  94. package/CapTestSelect/CapTestSelect.js +0 -47
  95. package/CapTestSelect/index.js +0 -1
  96. package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -82
  97. package/CapTooltipWithInfo/index.js +0 -3
  98. package/CapTooltipWithInfo/styles.js +0 -22
  99. package/assets/upload.svg +0 -3
  100. package/utils/index.js +0 -1
  101. package/utils/withStyles.js +0 -24
@@ -1,6 +1,17 @@
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
+
4
15
  export const HeaderWrapper = styled.div`
5
16
  display: flex;
6
17
  align-items: center;
@@ -12,344 +23,201 @@ export const HeaderWrapper = styled.div`
12
23
  }
13
24
  `;
14
25
 
15
- export const selectStyles = css`
16
- &.cap-unified-select-container {
17
- text-align: justify;
18
- &.disabled {
19
- cursor: not-allowed;
20
- }
21
- .cap-unified-select-suffix-icon {
22
- color: ${styledVars.CAP_G01};
26
+
27
+
28
+ export const StyledInfoIcon = styled.span`
29
+ color: ${styledVars.CAP_G2};
30
+ font-size: 16px;
31
+ cursor: help;
32
+
33
+ &:hover {
34
+ color: ${styledVars.CAP_G1};
35
+ }
36
+
37
+ &.disabled {
38
+ cursor: not-allowed;
39
+ &:hover {
40
+ color: ${styledVars.CAP_G2};
23
41
  }
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
- }
42
+ }
43
+ `;
44
+
45
+ export const selectStyles = css`
46
+ &.cap-unified-select {
47
+ width: 100%;
48
+ font-family: ${styledVars.FONT_FAMILY};
49
+
50
+ .ant-select-selector {
51
+ border-radius: ${styledVars.RADIUS_04};
52
+ transition: ${styledVars.TRANSITION_ALL};
53
+ padding: 0 12px;
54
+ min-height: 32px;
55
+ display: flex;
56
+ align-items: center;
57
+
58
+ &:hover {
59
+ border-color: ${styledVars.CAP_G11};
31
60
  }
32
61
  }
33
- .ant-select-selector .ant-select-selection-placeholder{
34
- pointer-events: unset;
35
- }
36
- .ant-select-prefix {
37
- font-size: 14px;
38
- font-weight: 400;
39
- color: #091e42;
40
- line-height: 20px;
41
- }
42
- .cap-unified-select-header-label {
43
- font-family: ${styledVars.FONT_FAMILY};
44
- font-weight: 500;
45
- font-size: 14px;
46
- line-height: 20px;
47
- letter-spacing: 0px;
48
- }
49
- .cap-unified-select-header-byline-text {
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;
56
- }
57
- .ant-input-affix-wrapper .ant-input-prefix {
58
- left: 12px;
59
- }
60
- .cap-tooltip-with-info-icon {
61
- margin-top: 2px;
62
+
63
+ /* Right slot content styles */
64
+ .cap-unified-select-right-slot {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 8px;
68
+ margin-left: 8px;
62
69
  }
63
70
 
64
- .cap-unified-tree-select {
65
- min-width: 200px;
71
+ &.ant-select-focused {
72
+ .ant-select-selector {
73
+ border-color: ${styledVars.CAP_G01} !important;
74
+ box-shadow: none !important;
75
+ }
66
76
  }
67
-
68
- .ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
69
- .ant-select-selector {
70
- border-color: #7a869a !important;
71
- box-shadow: none;
72
- outline: 0;
77
+
78
+ /* Error state */
79
+ &.ant-select-status-error {
80
+ .ant-select-selector {
81
+ border-color: ${styledVars.CAP_RED};
82
+ }
73
83
  }
74
-
75
- .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
76
- background-color: #42b040;
84
+
85
+ /* Disabled state */
86
+ &.ant-select-disabled {
87
+ .ant-select-selector {
88
+ background-color: ${styledVars.CAP_G08};
89
+ cursor: not-allowed;
90
+ }
77
91
  }
92
+
93
+ /* Dropdown styles */
78
94
  .ant-select-dropdown {
79
- margin-top: -8px !important;
80
- border-radius: 4px;
81
- box-shadow:
82
- 0px 4px 8px -2px #091e4240,
83
- 0px 0px 1px 0px #091e424f;
84
- max-height: 360px;
85
- overflow: visible;
86
- }
87
-
88
- .ant-select-selection-item {
89
- background: transparent;
90
- }
91
- .ant-select-multiple .ant-select-selection-wrap {
92
- align-self: center;
93
- }
94
- .cap-unified-tree-select .ant-select-selector:focus {
95
- border: 1px solid #7a869a;
96
- }
97
- .cap-unified-tree-select .ant-select-tree-treenode {
98
- padding-left: 4px;
99
- }
100
- .cap-unified-select-status {
101
- color: #e83135;
102
- }
103
- }
95
+ padding: 4px;
96
+ border-radius: ${styledVars.RADIUS_04};
97
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
104
98
 
105
- /* Common styles for all types */
106
- &.custom-popup-container {
107
- width: max-content !important;
99
+ .ant-select-item {
100
+ border-radius: ${styledVars.RADIUS_04};
101
+ padding: 8px 12px;
102
+ transition: ${styledVars.TRANSITION_ALL};
108
103
 
109
- .ant-select-tree {
110
- .ant-select-tree-node-content-wrapper {
111
- background-color: transparent;
112
- }
113
- .ant-select-tree-node-content-wrapper:hover {
114
- background-color: transparent;
115
- }
116
- .ant-select-tree-treenode {
117
- line-height: 40px;
118
- margin-bottom: 0px;
119
- .ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
120
- height: 18px;
121
- width: 18px;
122
- border: 2px solid #b3bac5;
123
- border-radius: 4px;
124
- }
125
- &:hover {
126
- background-color: #fffbe6;
104
+ &-option-selected {
105
+ background-color: ${styledVars.CAP_PRIMARY.light};
106
+ color: ${styledVars.CAP_PRIMARY.base};
107
+ font-weight: 500;
127
108
  }
128
- &:not(.ant-select-tree-treenode-disabled)
129
- .ant-select-tree-node-content-wrapper:hover {
130
- background-color: none;
109
+
110
+ &-option-active {
111
+ background-color: ${styledVars.CAP_G08};
131
112
  }
132
113
  }
133
- .ant-select-tree-node-content-wrapper {
134
- border-radius: 0px;
135
- padding-left: 3px;
136
- }
137
- .ant-select-tree-indent {
138
- margin-left: 12px;
139
- }
140
- .ant-select-tree-switcher:not(
141
- .ant-select-tree-switcher-noop
142
- ):hover:before {
143
- background-color: transparent;
144
- }
145
- .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
146
- background-color: #42b040;
147
- border: 2px solid #42b040 !important;
148
- &:hover {
149
- background-color: #42b040;
150
- border: 2px solid #42b040 !important;
114
+
115
+ /* Search input styles */
116
+ .ant-select-search {
117
+ padding: 8px;
118
+
119
+ input {
120
+ border-radius: ${styledVars.RADIUS_04};
121
+ transition: ${styledVars.TRANSITION_ALL};
122
+
123
+ &:focus {
124
+ border-color: ${styledVars.CAP_G01};
125
+ box-shadow: none;
126
+ }
151
127
  }
152
128
  }
153
- .ant-select-tree-switcher .ant-select-tree-switcher-icon {
154
- font-size: 12px;
155
- }
156
- }
157
- .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
158
- .ant-select-tree-checkbox-inner {
159
- background-color: #42b040 !important;
160
- border-color: #42b040 !important;
161
129
  }
162
130
 
163
- .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
164
- .ant-select-tree-checkbox-inner::after {
165
- content: '';
166
- position: absolute;
167
- top: 50%;
168
- left: 50%;
169
- width: 10px;
170
- height: 2px;
171
- background-color: #fff;
172
- transform: translate(-50%, -50%);
173
- border-radius: 1px;
174
- }
175
- .cap-unified-select-upload-container {
176
- cursor: pointer;
177
- display: flex;
178
- align-items: center;
179
- border-bottom: 1px solid #f0f0f0;
180
- height: 40px;
181
- padding-left: 16px;
131
+ /* Multiple selection styles */
132
+ &.ant-select-multiple {
133
+ .ant-select-selection-item {
134
+ background-color: ${styledVars.CAP_PRIMARY.light};
135
+ border-color: ${styledVars.CAP_PRIMARY.light};
136
+ border-radius: ${styledVars.RADIUS_04};
137
+ color: ${styledVars.CAP_PRIMARY.base};
138
+ margin: 2px 4px 2px 0;
139
+ padding: 0 8px;
140
+ height: 24px;
141
+ line-height: 22px;
182
142
 
183
- .cap-unified-select-upload-label {
184
- margin-left: 12px;
185
- color: #2466ea;
186
- }
187
- }
188
- .cap-unified-select-select-all-container {
189
- padding: 9px 15px;
190
- cursor: pointer;
191
- display: flex;
192
- align-items: center;
193
- border-bottom: 1px solid #f0f0f0;
194
- height: 40px;
195
- .cap-unified-select-select-all-checkbox {
196
- display: contents !important;
197
- .ant-checkbox-inner {
198
- height: 18px;
199
- width: 18px;
200
- border: 2px solid #b3bac5;
201
- border-radius: 4px;
143
+ &-remove {
144
+ color: ${styledVars.CAP_PRIMARY.base};
145
+
146
+ &:hover {
147
+ color: ${styledVars.CAP_PRIMARY.hover};
148
+ }
202
149
  }
203
150
  }
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
- }
210
- .ant-checkbox-indeterminate .ant-checkbox-inner {
211
- background-color: #42b040 !important;
212
- border-color: #42b040 !important;
213
- }
214
- .ant-checkbox-indeterminate .ant-checkbox-inner::after {
215
- content: '';
216
- position: absolute;
217
- top: 50%;
218
- left: 50%;
219
- width: 10px;
220
- height: 2px;
221
- background-color: #fff;
222
- transform: translate(-50%, -50%);
223
- border-radius: 1px;
224
- }
225
- }
226
- .ant-select-tree-treenode.ant-select-tree-treenode-selected {
227
- background-color: #e9f0fe;
228
- }
229
- .ant-select-tree-list-holder-inner {
230
- width: fit-content !important;
231
- min-width: 100%;
232
- }
233
- .cap-unified-select-no-result {
234
- display: flex;
235
- flex-direction: column;
236
- align-items: center;
237
- justify-content: center;
238
- height: 200px;
239
- color: #8c8c8c;
240
- font-size: 14px;
241
- }
242
- .cap-unified-select-no-result-icon {
243
- font-size: 36px;
244
- margin-bottom: 8px;
245
- color: #bfbfbf;
246
- }
247
- .cap-unified-select-no-result-text {
248
- font-weight: 500;
249
- }
250
- .ant-tree-select:hover .ant-select-selector {
251
- border-color: #7a869a;
252
- }
253
- .ant-tree-select-focused .ant-select-selector,
254
- .ant-tree-select-open .ant-select-selector {
255
- border-color: #7a869a;
256
- box-shadow: none;
257
- outline: none;
258
- }
259
- .cap-unified-select-search-container {
260
- border-bottom: 1px solid #ebecf0 !important;
261
- line-height: 40px !important;
262
- .ant-input-affix-wrapper {
263
- padding-left: 8px;
151
+
152
+ .ant-select-selection-overflow {
153
+ flex-wrap: wrap;
154
+ gap: 4px;
264
155
  }
265
156
  }
266
- .cap-unified-select-upload-button {
267
- border: none;
268
- padding-left: 15px;
269
- }
270
- .cap-unified-select-confirm-container {
271
- display: flex;
272
- align-items: center;
273
- height: 48px;
274
- padding: 7px;
275
- border-top: 1px solid #ebecf0;
276
- }
277
- .cap-unified-select-confirm-button-group {
278
- display: flex;
279
- padding-left: 8px;
280
- align-items: center;
281
- width: 100%; /* so it can push the label */
282
- button {
283
- height: 32px;
284
- width: 94px;
285
- }
286
- .cap-unified-select-confirm-button {
287
- background-color: #6ebd6e;
288
- }
289
- .cap-unified-select-cancel-button {
290
- border: transparent;
291
- box-shadow: none;
157
+
158
+ /* Tree select styles */
159
+ .ant-select-tree {
160
+ padding: 4px 0;
161
+
162
+ .ant-select-tree-node-content-wrapper {
163
+ padding: 4px 8px;
164
+ border-radius: ${styledVars.RADIUS_04};
165
+ transition: ${styledVars.TRANSITION_ALL};
166
+
167
+ &:hover {
168
+ background-color: ${styledVars.CAP_G08};
169
+ }
170
+
171
+ &.ant-select-tree-node-selected {
172
+ background-color: ${styledVars.CAP_PRIMARY.light};
173
+ color: ${styledVars.CAP_PRIMARY.base};
174
+ font-weight: 500;
175
+ }
292
176
  }
293
- }
294
- .cap-unified-select-selected-count {
295
- display: flex;
296
- margin-left: auto; /* pushes to far right */
297
- font-size: 12px;
298
- font-weight: 400;
299
- line-height: 16px;
300
- color: #5e6c84;
301
- }
302
- .cap-unified-select-search-container {
303
- .ant-input-affix-wrapper {
304
- border: none;
305
- box-shadow: none;
306
- border-radius: 0;
307
- border-bottom: 1px solid transparent;
308
- transition: border-color 0.2s ease;
177
+
178
+ .ant-select-tree-switcher {
179
+ width: 24px;
180
+ height: 24px;
181
+ line-height: 24px;
309
182
  }
310
183
 
311
- .ant-input-affix-wrapper:hover {
312
- border-bottom: 1px solid #7a869a !important;
313
- box-shadow: none;
184
+ .ant-select-tree-checkbox {
185
+ margin: 4px 8px 4px 0;
314
186
  }
187
+ }
315
188
 
316
- .ant-input-affix-wrapper:focus-within {
317
- border-bottom: 1px solid #091e42 !important;
318
- box-shadow: none;
319
- outline: none;
189
+ /* Size variations */
190
+ &.ant-select-lg {
191
+ .ant-select-selector {
192
+ height: 40px;
193
+ padding: 0 16px;
320
194
  }
321
195
 
322
- .ant-input {
323
- border: none !important;
324
- box-shadow: none !important;
196
+ .ant-select-selection-item {
197
+ height: 28px;
198
+ line-height: 26px;
325
199
  }
326
200
  }
327
- }
328
201
 
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
- }
202
+ &.ant-select-sm {
203
+ .ant-select-selector {
204
+ height: 24px;
205
+ padding: 0 8px;
338
206
  }
339
- .ant-select-tree-indent {
340
- margin-left: 15px;
207
+
208
+ .ant-select-selection-item {
209
+ height: 20px;
210
+ line-height: 18px;
341
211
  }
342
212
  }
343
213
 
344
- /* Single Select */
345
- .select-popup-container {
346
- .ant-select-tree-list {
347
- .ant-select-tree-treenode-leaf {
348
- .ant-select-tree-switcher-noop {
349
- display: none;
350
- }
214
+ /* Loading state */
215
+ &.ant-select-loading {
216
+ .ant-select-arrow {
217
+ .anticon-loading {
218
+ color: ${styledVars.CAP_PRIMARY.base};
351
219
  }
352
220
  }
353
221
  }
354
222
  }
355
- `;
223
+ `;