@capillarytech/blaze-ui 0.1.6-alpha.5 → 0.1.6-alpha.50

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/.DS_Store +0 -0
  2. package/CapIcon/CapIcon.js +183 -0
  3. package/CapIcon/index.js +3 -0
  4. package/CapIcon/styles.js +76 -0
  5. package/CapInput/CapInput.js +1 -1
  6. package/CapInput/Number.js +1 -1
  7. package/CapInput/Search.js +1 -1
  8. package/CapInput/TextArea.js +1 -1
  9. package/CapLabel/CapLabel.js +101 -81
  10. package/CapLabel/index.js +3 -1
  11. package/CapLabel/styles.js +250 -212
  12. package/CapRow/CapRow.js +111 -10
  13. package/CapRow/index.js +3 -1
  14. package/CapRow/styles.js +47 -6
  15. package/CapSkeleton/CapSkeleton.js +17 -0
  16. package/CapSkeleton/index.js +1 -0
  17. package/CapSpin/CapSpin.js +23 -0
  18. package/CapSpin/index.js +1 -0
  19. package/CapTable/loadable.js +4 -4
  20. package/CapTable/styles.js +1 -1
  21. package/CapTestSelect/CapTestSelect.js +47 -0
  22. package/CapTestSelect/index.js +1 -0
  23. package/CapTooltip/CapTooltip.js +87 -25
  24. package/CapTooltip/index.js +3 -1
  25. package/CapTooltip/styles.js +19 -27
  26. package/CapTooltipWithInfo/CapTooltipWithInfo.js +82 -0
  27. package/CapTooltipWithInfo/index.js +3 -0
  28. package/CapTooltipWithInfo/styles.js +22 -0
  29. package/CapUnifiedSelect/CapUnifiedSelect.js +308 -66
  30. package/CapUnifiedSelect/index.js +1 -4
  31. package/CapUnifiedSelect/styles.js +258 -151
  32. package/assets/upload.svg +3 -0
  33. package/index.js +12 -1
  34. package/package.json +5 -11
  35. package/utils/index.js +1 -0
  36. package/utils/withStyles.js +24 -0
  37. package/CapHeading/CapHeading.js +0 -71
  38. package/CapHeading/index.js +0 -1
  39. package/CapHeading/styles.js +0 -125
  40. package/CapInfoNote/CapInfoNote.js +0 -54
  41. package/CapInfoNote/index.js +0 -1
  42. package/CapInfoNote/styles.js +0 -63
  43. package/CapInput/loadable.js +0 -9
  44. package/CapUnifiedSelect/loadable.js +0 -3
  45. package/dist/235.index.js +0 -2
  46. package/dist/235.index.js.LICENSE.txt +0 -29
  47. package/dist/603.index.js +0 -1
  48. package/dist/CapInput/CapInput.js +0 -66
  49. package/dist/CapInput/Number.js +0 -42
  50. package/dist/CapInput/Search.js +0 -35
  51. package/dist/CapInput/TextArea.js +0 -42
  52. package/dist/CapInput/index.js +0 -15
  53. package/dist/CapInput/messages.js +0 -32
  54. package/dist/CapInput/styles.js +0 -11
  55. package/dist/CapTable/CapTable.js +0 -148
  56. package/dist/CapTable/index.js +0 -9
  57. package/dist/CapTable/loadable.js +0 -23
  58. package/dist/CapTable/styles.js +0 -26
  59. package/dist/LocaleHoc/index.js +0 -40
  60. package/dist/esm/CapHeading/CapHeading.js +0 -41
  61. package/dist/esm/CapHeading/index.js +0 -1
  62. package/dist/esm/CapHeading/styles.js +0 -123
  63. package/dist/esm/CapInfoNote/CapInfoNote.js +0 -62
  64. package/dist/esm/CapInfoNote/index.js +0 -1
  65. package/dist/esm/CapInfoNote/styles.js +0 -6
  66. package/dist/esm/CapInput/CapInput.js +0 -57
  67. package/dist/esm/CapInput/Number.js +0 -35
  68. package/dist/esm/CapInput/Search.js +0 -28
  69. package/dist/esm/CapInput/TextArea.js +0 -35
  70. package/dist/esm/CapInput/index.js +0 -8
  71. package/dist/esm/CapInput/loadable.js +0 -9
  72. package/dist/esm/CapInput/messages.js +0 -25
  73. package/dist/esm/CapInput/styles.js +0 -3
  74. package/dist/esm/CapLabel/CapLabel.js +0 -50
  75. package/dist/esm/CapLabel/index.js +0 -1
  76. package/dist/esm/CapLabel/styles.js +0 -219
  77. package/dist/esm/CapRow/CapRow.js +0 -22
  78. package/dist/esm/CapRow/index.js +0 -1
  79. package/dist/esm/CapRow/styles.js +0 -5
  80. package/dist/esm/CapTable/CapTable.js +0 -140
  81. package/dist/esm/CapTable/index.js +0 -2
  82. package/dist/esm/CapTable/loadable.js +0 -12
  83. package/dist/esm/CapTable/styles.js +0 -17
  84. package/dist/esm/CapTooltip/CapTooltip.js +0 -34
  85. package/dist/esm/CapTooltip/index.js +0 -1
  86. package/dist/esm/CapTooltip/styles.js +0 -6
  87. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +0 -101
  88. package/dist/esm/CapUnifiedSelect/index.js +0 -3
  89. package/dist/esm/CapUnifiedSelect/loadable.js +0 -4
  90. package/dist/esm/CapUnifiedSelect/messages.js +0 -23
  91. package/dist/esm/CapUnifiedSelect/styles.js +0 -15
  92. package/dist/esm/LocaleHoc/index.js +0 -31
  93. package/dist/esm/index.js +0 -11
  94. package/dist/esm/styled/index.js +0 -5
  95. package/dist/esm/styled/variables.js +0 -88
  96. package/dist/esm/translations/en.js +0 -329
  97. package/dist/index.js +0 -39
  98. package/dist/index.js.LICENSE.txt +0 -7
  99. package/dist/styled/index.js +0 -22
  100. package/dist/styled/variables.js +0 -94
  101. package/dist/translations/en.js +0 -335
@@ -23,200 +23,307 @@ export const HeaderWrapper = styled.div`
23
23
  }
24
24
  `;
25
25
 
26
+ export const DropdownFooter = styled.div`
27
+ display: flex;
28
+ justify-content: space-between;
29
+ align-items: center;
30
+ padding: 8px;
31
+ border-top: 1px solid #f0f0f0;
32
+
33
+ .footer-buttons {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 8px;
37
+ }
38
+
39
+ .total-count {
40
+ color: #8c8c8c;
41
+ font-size: 12px;
42
+ }
43
+ `;
44
+
45
+ export const SearchInputWrapper = styled.div`
46
+ padding: 8px;
47
+ border-bottom: 1px solid #f0f0f0;
48
+ `;
49
+
50
+ export const SelectAllCheckbox = styled.div`
51
+ display: flex;
52
+ align-items: center;
53
+ padding: 8px 12px;
54
+ cursor: pointer;
55
+ font-weight: 500;
56
+ border-bottom: 1px solid #f0f0f0;
57
+ user-select: none;
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
+
26
74
 
27
75
 
28
76
  export const StyledInfoIcon = styled.span`
29
- color: ${styledVars.CAP_G2};
77
+ color: ${styledVars.CAP_G05};
30
78
  font-size: 16px;
31
79
  cursor: help;
80
+ margin-left: 4px;
81
+ display: flex;
82
+ align-items: center;
32
83
 
33
84
  &:hover {
34
- color: ${styledVars.CAP_G1};
85
+ color: ${styledVars.CAP_G03};
35
86
  }
36
87
 
37
88
  &.disabled {
38
89
  cursor: not-allowed;
39
90
  &:hover {
40
- color: ${styledVars.CAP_G2};
91
+ color: ${styledVars.CAP_G05};
41
92
  }
42
93
  }
43
94
  `;
44
95
 
45
96
  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;
97
+ &.cap-unified-select-container {
98
+ text-align: justify;
99
+ .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover{
100
+ background-color: #42b040;
101
+ }
102
+ .ant-tree-select-dropdown{
103
+ padding: 0px;
104
+ }
105
+ .cap-unified-tree-select-s{
106
+ height: 40px;
107
+ width: 160px;
108
+ }
109
+ .cap-unified-tree-select-m{
110
+ height: 40px;
111
+ width: 340px;
112
+ }
113
+ .cap-unified-tree-select-l{
114
+ height: 40px;
115
+ width: 400px;
116
+ }
117
+ .cap-unified-tree-select-xl{
118
+ height: 40px;
119
+ width: 480px;
120
+ }
121
+ .cap-unified-select-upload-container{
122
+ cursor: pointer;
55
123
  display: flex;
56
124
  align-items: center;
57
-
58
- &:hover {
59
- border-color: ${styledVars.CAP_G11};
125
+ border-bottom: 1px solid #f0f0f0;
126
+ height: 40px;
127
+ padding-left: 15px;
128
+
129
+ .cap-unified-select-upload-label{
130
+ margin-left: 12px;
131
+ color: #2466EA;
60
132
  }
61
133
  }
62
-
63
- /* Right slot content styles */
64
- .cap-unified-select-right-slot {
134
+ .cap-unified-select-select-all-container{
135
+ padding: 9px 9px;
136
+ cursor: pointer;
65
137
  display: flex;
66
138
  align-items: center;
67
- gap: 8px;
68
- margin-left: 8px;
139
+ border-bottom: 1px solid #f0f0f0;
140
+ height: 40px;
69
141
  }
70
-
71
- &.ant-select-focused {
72
- .ant-select-selector {
73
- border-color: ${styledVars.CAP_G01} !important;
74
- box-shadow: none !important;
75
- }
142
+ .ant-select-dropdown{
143
+ margin-top: -5px;
144
+ border-radius: 4px;
145
+ box-shadow: 0px 4px 8px -2px #091E4240, 0px 0px 1px 0px #091E424F;
146
+ max-height: 368px;
76
147
  }
77
-
78
- /* Error state */
79
- &.ant-select-status-error {
80
- .ant-select-selector {
81
- border-color: ${styledVars.CAP_RED};
82
- }
148
+ .ant-select-prefix{
149
+ font-size: 14px;
150
+ font-weight: 400;
151
+ color: #091E42;
152
+ line-height: 20px;
83
153
  }
84
-
85
- /* Disabled state */
86
- &.ant-select-disabled {
87
- .ant-select-selector {
88
- background-color: ${styledVars.CAP_G08};
89
- cursor: not-allowed;
90
- }
154
+ .cap-unified-select-header-label{
155
+ font-family: ${styledVars.FONT_FAMILY};
156
+ font-weight: 500;
157
+ font-size: 14px;
158
+ line-height: 20px;
159
+ letter-spacing: 0px;
91
160
  }
92
-
93
- /* Dropdown styles */
94
- .ant-select-dropdown {
95
- padding: 4px;
96
- border-radius: ${styledVars.RADIUS_04};
97
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
98
-
99
- .ant-select-item {
100
- border-radius: ${styledVars.RADIUS_04};
101
- padding: 8px 12px;
102
- transition: ${styledVars.TRANSITION_ALL};
103
-
104
- &-option-selected {
105
- background-color: ${styledVars.CAP_PRIMARY.light};
106
- color: ${styledVars.CAP_PRIMARY.base};
107
- font-weight: 500;
108
- }
109
-
110
- &-option-active {
111
- background-color: ${styledVars.CAP_G08};
112
- }
113
- }
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
- }
127
- }
128
- }
161
+ .cap-unified-select-header-byline-text{
162
+ font-family: ${styledVars.FONT_FAMILY};
163
+ font-weight: 400;
164
+ font-size: 12px;
165
+ margin-top: -10px;
166
+ letter-spacing: 0px;
167
+ color: #97A0AF;
129
168
  }
130
-
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;
142
-
143
- &-remove {
144
- color: ${styledVars.CAP_PRIMARY.base};
145
-
146
- &:hover {
147
- color: ${styledVars.CAP_PRIMARY.hover};
148
- }
149
- }
169
+ .ant-input-affix-wrapper .ant-input-prefix{
170
+ left: 13px;
171
+ }
172
+ .ant-select-tree {
173
+ .ant-select-tree-node-content-wrapper{
174
+ background-color: transparent;
150
175
  }
151
-
152
- .ant-select-selection-overflow {
153
- flex-wrap: wrap;
154
- gap: 4px;
176
+ .ant-select-tree-node-content-wrapper:hover {
177
+ background-color: transparent;
155
178
  }
156
179
  }
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
- }
180
+ .ant-select-tree .ant-select-tree-switcher:not(.ant-select-tree-switcher-noop):hover:before{
181
+ background-color: transparent;
182
+ }
183
+ .ant-select-selection-item{
184
+ background: transparent;
185
+ }
186
+ .ant-select-multiple .ant-select-selection-wrap{
187
+ align-self: center;
188
+ }
189
+ .cap-unified-tree-select .ant-select-selector:hover{
190
+ border: 1px solid #7A869A;
191
+ }
192
+ .cap-unified-tree-select .ant-select-selector:focus{
193
+ border: 1px solid #7A869A;
194
+ }
195
+ .cap-unified-tree-select .cap-unified-select-select-all-checkbox{
196
+ height: 18px;
197
+ width: 18px;
198
+ border-color: #B3BAC5;
199
+ border-radius: 2px;
200
+ }
201
+ .cap-unified-tree-select .select-popup-container .ant-select-tree-switcher-noop,
202
+ .cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-switcher-noop {
203
+ display: none;
204
+ }
205
+ .cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-treenode{
206
+ padding-left: 15px;
207
+ }
208
+ .ant-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{
209
+ line-height: 40px;
210
+ margin-bottom: 0px;
211
+ .ant-select-tree-checkbox .ant-select-tree-checkbox-inner{
212
+ height: 18px;
213
+ width: 18px;
214
+ border: 2px solid #B3BAC5;
176
215
  }
177
-
178
- .ant-select-tree-switcher {
179
- width: 24px;
180
- height: 24px;
181
- line-height: 24px;
216
+ &:hover{
217
+ background-color: #FFFBE6;
218
+ border-radius: 4px;
182
219
  }
183
-
184
- .ant-select-tree-checkbox {
185
- margin: 4px 8px 4px 0;
220
+ &:not(.ant-select-tree-treenode-disabled) .ant-select-tree-node-content-wrapper:hover{
221
+ background-color: none;
186
222
  }
187
223
  }
188
-
189
- /* Size variations */
190
- &.ant-select-lg {
191
- .ant-select-selector {
192
- height: 40px;
193
- padding: 0 16px;
224
+ .ant-tree-select-dropdown .ant-select-tree .ant-select-tree-node-content-wrapper{
225
+ border-radius: 0px;
226
+ padding-left: 12px;
227
+ }
228
+ .ant-select-tree-treenode.ant-select-tree-treenode-selected{
229
+ background-color: #E9F0FE;
230
+ color: #2466EA;
231
+ }
232
+ .cap-unified-select-no-result{
233
+ display: flex;
234
+ flex-direction: column;
235
+ align-items: center;
236
+ justify-content: center;
237
+ height: 200px;
238
+ color: #8c8c8c;
239
+ font-size: 14px;
240
+ }
241
+ .cap-unified-select-no-result-icon{
242
+ font-size: 36px;
243
+ margin-bottom: 8px;
244
+ color: #bfbfbf;
245
+ }
246
+ .cap-unified-select-no-result-text{
247
+ font-weight: 500;
248
+ }
249
+ .ant-tree-select:hover .ant-select-selector {
250
+ border-color: #7A869A;
251
+ }
252
+ .ant-tree-select-focused .ant-select-selector,
253
+ .ant-tree-select-open .ant-select-selector {
254
+ border-color: #7A869A;
255
+ box-shadow: none;
256
+ outline: none;
257
+ }
258
+ .cap-unified-select-search-container{
259
+ border-bottom: 1px solid #EBECF0 !important;
260
+ line-height: 40px !important;
261
+ .ant-input-affix-wrapper{
262
+ padding-left: 8px;
194
263
  }
195
-
196
- .ant-select-selection-item {
197
- height: 28px;
198
- line-height: 26px;
264
+ }
265
+ .cap-unified-select-upload-button{
266
+ border: none;
267
+ padding-left: 15px;
268
+ }
269
+ .cap-unified-select-confirm-container {
270
+ display: flex;
271
+ align-items: center;
272
+ height: 48px;
273
+ padding: 7px;
274
+ border-top: 1px solid #EBECF0;
275
+ }
276
+ .cap-unified-select-confirm-button-group {
277
+ display: flex;
278
+ padding-left: 8px;
279
+ align-items: center;
280
+ width: 100%; /* so it can push the label */
281
+ button{
282
+ height: 32px;
283
+ width: 94px;
284
+ }
285
+ .cap-unified-select-confirm-button{
286
+ background-color: #6ebd6e;
199
287
  }
288
+ .cap-unified-select-cancel-button{
289
+ border: transparent;
290
+ box-shadow: none;
291
+ }
292
+ }
293
+ .cap-unified-select-selected-count {
294
+ display: flex;
295
+ margin-left: auto; /* pushes to far right */
296
+ font-size: 12px;
297
+ font-weight: 400;
298
+ line-height: 16px;
299
+ color: #5E6C84;
300
+ }
301
+ .cap-unified-select-status{
302
+ color: #E83135;
200
303
  }
304
+ .cap-unified-select-search-container {
305
+ .ant-input-affix-wrapper {
306
+ border: none;
307
+ box-shadow: none;
308
+ border-radius: 0;
309
+ }
201
310
 
202
- &.ant-select-sm {
203
- .ant-select-selector {
204
- height: 24px;
205
- padding: 0 8px;
311
+ .ant-input-affix-wrapper:hover {
312
+ border: none;
313
+ box-shadow: none;
314
+ border-bottom: 1px solid #EBECF0;
206
315
  }
207
316
 
208
- .ant-select-selection-item {
209
- height: 20px;
210
- line-height: 18px;
317
+ .ant-input-affix-wrapper:focus-within {
318
+ border: none;
319
+ box-shadow: none;
320
+ border-bottom: 1px solid #091E42;
321
+ outline: none;
211
322
  }
212
- }
213
323
 
214
- /* Loading state */
215
- &.ant-select-loading {
216
- .ant-select-arrow {
217
- .anticon-loading {
218
- color: ${styledVars.CAP_PRIMARY.base};
219
- }
324
+ .ant-input {
325
+ border: none !important;
326
+ box-shadow: none !important;
220
327
  }
221
328
  }
222
329
  }
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00031 13.0631V3.79511L4.46431 6.33111C4.07431 6.72111 3.44131 6.72111 3.05031 6.33111C2.65931 5.94011 2.65931 5.30711 3.05031 4.91611L7.29331 0.674109C7.68331 0.283109 8.31631 0.283109 8.70731 0.674109L12.9493 4.91611C13.3403 5.30711 13.3403 5.94011 12.9493 6.33111C12.5593 6.72111 11.9263 6.72111 11.5353 6.33111L9.00031 3.79511V13.0631C9.00031 13.5761 8.55231 13.9911 8.00031 13.9911C7.44731 13.9911 7.00031 13.5761 7.00031 13.0631ZM14.9975 12.9942C15.5495 12.9942 15.9975 13.4412 15.9975 13.9942V16.9302C15.9985 16.9502 15.9995 16.9712 15.9995 16.9912C15.9995 17.0342 15.9965 17.0772 15.9895 17.1192C15.9285 17.6122 15.5075 17.9942 14.9975 17.9942C14.9565 17.9942 14.9175 17.9922 14.8785 17.9872C14.8405 17.9902 14.8015 17.9912 14.7625 17.9912H1.23751C1.21394 17.9912 1.19217 17.9861 1.1704 17.981C1.15245 17.9768 1.13449 17.9726 1.11551 17.9712C1.10076 17.9725 1.0868 17.9767 1.07275 17.9809C1.05538 17.986 1.03786 17.9912 1.01851 17.9912C0.606512 17.9912 0.253512 17.7412 0.101512 17.3852C0.0365117 17.2642 -0.000488281 17.1312 -0.000488281 16.9912C-0.000488281 16.9769 0.00426292 16.9638 0.00903728 16.9506C0.013294 16.9388 0.017569 16.9269 0.0185117 16.9142V13.9912C0.0185117 13.4382 0.466512 12.9912 1.01851 12.9912C1.57151 12.9912 2.01851 13.4382 2.01851 13.9912V15.9912H13.9975V13.9942C13.9975 13.4412 14.4455 12.9942 14.9975 12.9942Z" fill="#2466EA"/>
3
+ </svg>
package/index.js CHANGED
@@ -1,10 +1,21 @@
1
1
  // Import and export all components
2
+ export { default as CapIcon } from './CapIcon';
2
3
  export { default as CapInput } from './CapInput';
4
+ export { default as CapLabel } from './CapLabel';
5
+ export { default as CapRow } from './CapRow';
6
+ export { default as CapSkeleton } from './CapSkeleton';
7
+ export { default as CapSpin } from './CapSpin';
3
8
  export { default as CapTable } from './CapTable';
9
+ export { default as CapTooltip } from './CapTooltip';
10
+ export { default as CapTooltipWithInfo } from './CapTooltipWithInfo';
11
+ export { default as CapUnifiedSelect } from './CapUnifiedSelect';
4
12
 
5
13
  // Export utilities
6
14
  export { default as LocaleHoc } from './LocaleHoc';
7
15
 
8
16
  // Export styled utilities
9
17
  export * as styledVars from './styled/variables';
10
- export { default as styled } from './styled';
18
+ export { default as styled } from './styled';
19
+
20
+ // Export utils
21
+ export * as Utils from './utils';
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
3
  "author": "Capillary Technologies",
4
- "version": "0.1.6-alpha.5",
4
+ "version": "0.1.6-alpha.50",
5
5
  "description": "Capillary UI component library with Ant Design v5",
6
- "main": "./dist/index.js",
7
- "module": "./dist/esm/index.js",
8
- "jsnext:main": "./dist/esm/index.js",
6
+ "main": "./index.js",
9
7
  "sideEffects": [
10
8
  "*.css",
11
9
  "*.less",
@@ -26,16 +24,12 @@
26
24
  "!**/tests"
27
25
  ],
28
26
  "homepage": "https://github.com/Capillary/blaze-ui",
29
- "peerDependencies": {
30
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
31
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
32
- },
33
27
  "dependencies": {
34
- "antd": "^5.12.0",
35
28
  "@ant-design/icons": "^5.2.6",
36
29
  "@capillarytech/cap-ui-utils": "^3.0.4",
30
+ "antd-v5": "npm:antd@^5.26.7",
37
31
  "prop-types": "^15.8.1",
38
- "styled-components": "^5.3.11",
39
- "react-intl": "^6.5.0"
32
+ "react-intl": "2.7.2",
33
+ "styled-components": "^5.3.11"
40
34
  }
41
35
  }
package/utils/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as withStyles } from './withStyles';
@@ -0,0 +1,24 @@
1
+ import styled from 'styled-components';
2
+
3
+ /**
4
+ * Enhances a React component with additional styles using styled-components.
5
+ * @param {React.ComponentType} WrappedComponent - The React component to enhance.
6
+ * @param {TemplateStringsArray} styles - CSS styles as a TemplateStringsArray.
7
+ * @returns {React.ComponentType} Returns the enhanced styled component.
8
+ */
9
+ const withStyledComponent = (WrappedComponent, styles) => {
10
+ /**
11
+ * A styled component generated by combining WrappedComponent with additional styles.
12
+ * @type {React.ComponentType}
13
+ */
14
+ const StyledComponent = styled(WrappedComponent)`
15
+ ${styles};
16
+ `;
17
+
18
+ // Set default props from the original component to the styled component
19
+ StyledComponent.defaultProps = WrappedComponent.defaultProps;
20
+
21
+ return StyledComponent;
22
+ };
23
+
24
+ export default withStyledComponent;
@@ -1,71 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { HeadingWrapper, HeadingSpan } from './styles';
4
-
5
- const CapHeading = ({ type = 'h5', children, as, ...rest }) => {
6
- return (
7
- <HeadingWrapper type={type} as={as || 'div'} {...rest}>
8
- {children}
9
- </HeadingWrapper>
10
- );
11
- };
12
-
13
- CapHeading.propTypes = {
14
- type: PropTypes.oneOf([
15
- 'h0',
16
- 'h1',
17
- 'h2',
18
- 'h3',
19
- 'h4',
20
- 'h5',
21
- 'h6',
22
- 'h7',
23
- 'h8',
24
- 'h9',
25
- 'h10',
26
- 'label1',
27
- 'label2',
28
- 'label3',
29
- 'label4',
30
- 'label5',
31
- 'label6',
32
- ]),
33
- children: PropTypes.node,
34
- as: PropTypes.string,
35
- };
36
-
37
- // Inline span version
38
- const CapHeadingSpan = ({ type = 'h5', children, ...rest }) => {
39
- return (
40
- <HeadingSpan type={type} {...rest}>
41
- {children}
42
- </HeadingSpan>
43
- );
44
- };
45
-
46
- CapHeadingSpan.propTypes = {
47
- type: PropTypes.oneOf([
48
- 'h0',
49
- 'h1',
50
- 'h2',
51
- 'h3',
52
- 'h4',
53
- 'h5',
54
- 'h6',
55
- 'h7',
56
- 'h8',
57
- 'h9',
58
- 'h10',
59
- 'label1',
60
- 'label2',
61
- 'label3',
62
- 'label4',
63
- 'label5',
64
- 'label6',
65
- ]),
66
- children: PropTypes.node,
67
- };
68
-
69
- CapHeading.Span = CapHeadingSpan;
70
-
71
- export default CapHeading;
@@ -1 +0,0 @@
1
- export { default } from './CapHeading';