@capillarytech/blaze-ui 0.1.6-alpha.6 → 0.1.6-alpha.61
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.
- package/.DS_Store +0 -0
- package/CapIcon/CapIcon.js +183 -0
- package/CapIcon/index.js +3 -0
- package/CapIcon/styles.js +76 -0
- package/CapInput/CapInput.js +2 -2
- package/CapInput/Number.js +1 -1
- package/CapInput/Search.js +1 -1
- package/CapInput/TextArea.js +1 -1
- package/CapLabel/CapLabel.js +101 -81
- package/CapLabel/index.js +3 -1
- package/CapLabel/styles.js +250 -212
- package/CapRow/CapRow.js +111 -10
- package/CapRow/index.js +3 -1
- package/CapRow/styles.js +47 -6
- package/CapSkeleton/CapSkeleton.js +17 -0
- package/CapSkeleton/index.js +1 -0
- package/CapSpin/CapSpin.js +23 -0
- package/CapSpin/index.js +1 -0
- package/CapTable/loadable.js +4 -4
- package/CapTable/styles.js +1 -1
- package/CapTestSelect/CapTestSelect.js +47 -0
- package/CapTestSelect/index.js +1 -0
- package/CapTooltip/CapTooltip.js +87 -25
- package/CapTooltip/index.js +3 -1
- package/CapTooltip/styles.js +19 -27
- package/CapTooltipWithInfo/CapTooltipWithInfo.js +82 -0
- package/CapTooltipWithInfo/index.js +3 -0
- package/CapTooltipWithInfo/styles.js +22 -0
- package/CapUnifiedSelect/CapUnifiedSelect.js +415 -74
- package/CapUnifiedSelect/index.js +1 -4
- package/CapUnifiedSelect/styles.js +300 -168
- package/assets/upload.svg +3 -0
- package/index.js +12 -1
- package/package.json +6 -12
- package/utils/index.js +1 -0
- package/utils/withMemo.js +33 -0
- package/utils/withStyles.js +24 -0
- package/CapHeading/CapHeading.js +0 -71
- package/CapHeading/index.js +0 -1
- package/CapHeading/styles.js +0 -125
- package/CapInfoNote/CapInfoNote.js +0 -54
- package/CapInfoNote/index.js +0 -1
- package/CapInfoNote/styles.js +0 -63
- package/CapInput/loadable.js +0 -9
- package/CapUnifiedSelect/loadable.js +0 -3
- package/dist/235.index.js +0 -2
- package/dist/235.index.js.LICENSE.txt +0 -29
- package/dist/603.index.js +0 -1
- package/dist/CapInput/CapInput.js +0 -66
- package/dist/CapInput/Number.js +0 -42
- package/dist/CapInput/Search.js +0 -35
- package/dist/CapInput/TextArea.js +0 -42
- package/dist/CapInput/index.js +0 -15
- package/dist/CapInput/messages.js +0 -32
- package/dist/CapInput/styles.js +0 -11
- package/dist/CapTable/CapTable.js +0 -148
- package/dist/CapTable/index.js +0 -9
- package/dist/CapTable/loadable.js +0 -23
- package/dist/CapTable/styles.js +0 -26
- package/dist/LocaleHoc/index.js +0 -40
- package/dist/esm/CapHeading/CapHeading.js +0 -41
- package/dist/esm/CapHeading/index.js +0 -1
- package/dist/esm/CapHeading/styles.js +0 -123
- package/dist/esm/CapInfoNote/CapInfoNote.js +0 -62
- package/dist/esm/CapInfoNote/index.js +0 -1
- package/dist/esm/CapInfoNote/styles.js +0 -6
- package/dist/esm/CapInput/CapInput.js +0 -57
- package/dist/esm/CapInput/Number.js +0 -35
- package/dist/esm/CapInput/Search.js +0 -28
- package/dist/esm/CapInput/TextArea.js +0 -35
- package/dist/esm/CapInput/index.js +0 -8
- package/dist/esm/CapInput/loadable.js +0 -9
- package/dist/esm/CapInput/messages.js +0 -25
- package/dist/esm/CapInput/styles.js +0 -3
- package/dist/esm/CapLabel/CapLabel.js +0 -50
- package/dist/esm/CapLabel/index.js +0 -1
- package/dist/esm/CapLabel/styles.js +0 -219
- package/dist/esm/CapRow/CapRow.js +0 -22
- package/dist/esm/CapRow/index.js +0 -1
- package/dist/esm/CapRow/styles.js +0 -5
- package/dist/esm/CapTable/CapTable.js +0 -140
- package/dist/esm/CapTable/index.js +0 -2
- package/dist/esm/CapTable/loadable.js +0 -12
- package/dist/esm/CapTable/styles.js +0 -17
- package/dist/esm/CapTooltip/CapTooltip.js +0 -34
- package/dist/esm/CapTooltip/index.js +0 -1
- package/dist/esm/CapTooltip/styles.js +0 -6
- package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +0 -101
- package/dist/esm/CapUnifiedSelect/index.js +0 -3
- package/dist/esm/CapUnifiedSelect/loadable.js +0 -4
- package/dist/esm/CapUnifiedSelect/messages.js +0 -23
- package/dist/esm/CapUnifiedSelect/styles.js +0 -15
- package/dist/esm/LocaleHoc/index.js +0 -31
- package/dist/esm/index.js +0 -11
- package/dist/esm/styled/index.js +0 -5
- package/dist/esm/styled/variables.js +0 -88
- package/dist/esm/translations/en.js +0 -329
- package/dist/index.js +0 -39
- package/dist/index.js.LICENSE.txt +0 -7
- package/dist/styled/index.js +0 -22
- package/dist/styled/variables.js +0 -94
- package/dist/translations/en.js +0 -335
|
@@ -1,17 +1,6 @@
|
|
|
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
|
-
|
|
15
4
|
export const HeaderWrapper = styled.div`
|
|
16
5
|
display: flex;
|
|
17
6
|
align-items: center;
|
|
@@ -23,201 +12,344 @@ export const HeaderWrapper = styled.div`
|
|
|
23
12
|
}
|
|
24
13
|
`;
|
|
25
14
|
|
|
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};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
15
|
export const selectStyles = css`
|
|
46
|
-
&.cap-unified-select {
|
|
47
|
-
|
|
48
|
-
|
|
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};
|
|
60
|
-
}
|
|
16
|
+
&.cap-unified-select-container {
|
|
17
|
+
text-align: justify;
|
|
18
|
+
&.disabled {
|
|
19
|
+
cursor: not-allowed;
|
|
61
20
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.cap-unified-select-right-slot {
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
gap: 8px;
|
|
68
|
-
margin-left: 8px;
|
|
21
|
+
.cap-unified-select-suffix-icon {
|
|
22
|
+
color: ${styledVars.CAP_G01};
|
|
69
23
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
+
}
|
|
75
31
|
}
|
|
76
32
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
&.ant-select-status-error {
|
|
80
|
-
.ant-select-selector {
|
|
81
|
-
border-color: ${styledVars.CAP_RED};
|
|
82
|
-
}
|
|
33
|
+
.ant-select-selector .ant-select-selection-placeholder{
|
|
34
|
+
pointer-events: unset;
|
|
83
35
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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;
|
|
91
62
|
}
|
|
92
63
|
|
|
93
|
-
|
|
64
|
+
.cap-unified-tree-select {
|
|
65
|
+
min-width: 200px;
|
|
66
|
+
}
|
|
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;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
76
|
+
background-color: #42b040;
|
|
77
|
+
}
|
|
94
78
|
.ant-select-dropdown {
|
|
95
|
-
|
|
96
|
-
border-radius:
|
|
97
|
-
box-shadow:
|
|
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
|
+
}
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
transition: ${styledVars.TRANSITION_ALL};
|
|
105
|
+
/* Common styles for all types */
|
|
106
|
+
&.custom-popup-container {
|
|
107
|
+
width: max-content !important;
|
|
103
108
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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;
|
|
108
124
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
125
|
+
&:hover {
|
|
126
|
+
background-color: #fffbe6;
|
|
127
|
+
}
|
|
128
|
+
&:not(.ant-select-tree-treenode-disabled)
|
|
129
|
+
.ant-select-tree-node-content-wrapper:hover {
|
|
130
|
+
background-color: none;
|
|
112
131
|
}
|
|
113
132
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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;
|
|
127
151
|
}
|
|
128
152
|
}
|
|
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;
|
|
129
161
|
}
|
|
130
162
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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;
|
|
142
182
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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;
|
|
149
202
|
}
|
|
150
203
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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;
|
|
155
224
|
}
|
|
156
225
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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;
|
|
176
264
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
265
|
+
}
|
|
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;
|
|
182
285
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
286
|
+
.cap-unified-select-confirm-button {
|
|
287
|
+
background-color: #6ebd6e;
|
|
288
|
+
}
|
|
289
|
+
.cap-unified-select-cancel-button {
|
|
290
|
+
border: transparent;
|
|
291
|
+
box-shadow: none;
|
|
186
292
|
}
|
|
187
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;
|
|
309
|
+
}
|
|
188
310
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
height: 40px;
|
|
193
|
-
padding: 0 16px;
|
|
311
|
+
.ant-input-affix-wrapper:hover {
|
|
312
|
+
border-bottom: 1px solid #7a869a !important;
|
|
313
|
+
box-shadow: none;
|
|
194
314
|
}
|
|
195
315
|
|
|
196
|
-
.ant-
|
|
197
|
-
|
|
198
|
-
|
|
316
|
+
.ant-input-affix-wrapper:focus-within {
|
|
317
|
+
border-bottom: 1px solid #091e42 !important;
|
|
318
|
+
box-shadow: none;
|
|
319
|
+
outline: none;
|
|
199
320
|
}
|
|
200
|
-
}
|
|
201
321
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
padding: 0 8px;
|
|
322
|
+
.ant-input {
|
|
323
|
+
border: none !important;
|
|
324
|
+
box-shadow: none !important;
|
|
206
325
|
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
207
328
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|
+
}
|
|
338
|
+
}
|
|
339
|
+
.ant-select-tree-indent {
|
|
340
|
+
margin-left: 15px;
|
|
211
341
|
}
|
|
212
342
|
}
|
|
213
343
|
|
|
214
|
-
/*
|
|
215
|
-
|
|
216
|
-
.ant-select-
|
|
217
|
-
.
|
|
218
|
-
|
|
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
|
+
}
|
|
219
351
|
}
|
|
220
352
|
}
|
|
221
353
|
}
|
|
222
354
|
}
|
|
223
|
-
`;
|
|
355
|
+
`;
|
|
@@ -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.
|
|
4
|
+
"version": "0.1.6-alpha.61",
|
|
5
5
|
"description": "Capillary UI component library with Ant Design v5",
|
|
6
|
-
"main": "./
|
|
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
|
-
"
|
|
35
|
-
"@ant-design/icons": "^5.2.6",
|
|
28
|
+
"@ant-design-v5/icons": "npm:@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
|
-
"
|
|
39
|
-
"
|
|
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,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const withMemo = (Component, isEqual, log = false) => {
|
|
4
|
+
const defaultIsEqual = (prevProps, nextProps) => {
|
|
5
|
+
const prevKeys = Object.keys(prevProps).filter((key) => key !== 'intl');
|
|
6
|
+
const changedProps = [];
|
|
7
|
+
const isEqual = prevKeys.every((key) => {
|
|
8
|
+
const areEqual = prevProps[key] === nextProps[key];
|
|
9
|
+
if (!areEqual) {
|
|
10
|
+
changedProps.push({
|
|
11
|
+
key,
|
|
12
|
+
prevValue: prevProps[key],
|
|
13
|
+
nextValue: nextProps[key],
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return areEqual;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
if (log && changedProps.length > 0) {
|
|
20
|
+
// eslint-disable-next-line no-console
|
|
21
|
+
console.log('Props changed:', changedProps);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return isEqual;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
if (typeof isEqual !== 'function') {
|
|
28
|
+
return React.memo(Component, defaultIsEqual);
|
|
29
|
+
}
|
|
30
|
+
return React.memo(Component, isEqual);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default withMemo;
|
|
@@ -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;
|