@capillarytech/blaze-ui 0.1.6-alpha.4 → 0.1.6-alpha.41
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/CapInput/CapInput.js +1 -1
- package/CapInput/Number.js +1 -1
- package/CapInput/Search.js +1 -1
- package/CapInput/TextArea.js +1 -1
- 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/CapUnifiedSelect/CapUnifiedSelect.js +252 -61
- package/CapUnifiedSelect/index.js +1 -4
- package/CapUnifiedSelect/styles.js +170 -166
- package/assets/upload.svg +3 -0
- package/index.js +7 -1
- package/package.json +7 -11
- package/utils/index.js +1 -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/CapLabel/CapLabel.js +0 -106
- package/CapLabel/index.js +0 -1
- package/CapLabel/styles.js +0 -221
- package/CapRow/CapRow.js +0 -22
- package/CapRow/index.js +0 -1
- package/CapRow/styles.js +0 -9
- package/CapTooltip/CapTooltip.js +0 -36
- package/CapTooltip/index.js +0 -1
- package/CapTooltip/styles.js +0 -42
- 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
|
@@ -23,201 +23,205 @@ 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.
|
|
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.
|
|
85
|
+
color: ${styledVars.CAP_G03};
|
|
35
86
|
}
|
|
36
87
|
|
|
37
88
|
&.disabled {
|
|
38
89
|
cursor: not-allowed;
|
|
39
90
|
&:hover {
|
|
40
|
-
color: ${styledVars.
|
|
91
|
+
color: ${styledVars.CAP_G05};
|
|
41
92
|
}
|
|
42
93
|
}
|
|
43
94
|
`;
|
|
44
95
|
|
|
45
96
|
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
|
-
}
|
|
97
|
+
&.cap-unified-select-container {
|
|
98
|
+
.ant-tree-select-dropdown{
|
|
99
|
+
padding: 0px !important;
|
|
61
100
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
101
|
+
.cap-unified-tree-select{
|
|
102
|
+
height: 40px !important;
|
|
103
|
+
width: 340px !important;
|
|
104
|
+
}
|
|
105
|
+
.cap-unified-select-upload-container{
|
|
106
|
+
cursor: pointer !important;
|
|
107
|
+
display: flex !important;
|
|
108
|
+
align-items: center !important;
|
|
109
|
+
border-bottom: 1px solid #f0f0f0 !important;
|
|
110
|
+
height: 40px !important;
|
|
111
|
+
}
|
|
112
|
+
.cap-unified-select-select-all-container{
|
|
113
|
+
padding: 8px 12px !important;
|
|
114
|
+
cursor: pointer !important;
|
|
115
|
+
display: flex !important;
|
|
116
|
+
align-items: center !important;
|
|
117
|
+
border-bottom: 1px solid #f0f0f0 !important;
|
|
118
|
+
height: 40px !important;
|
|
119
|
+
}
|
|
120
|
+
.ant-select-dropdown{
|
|
121
|
+
margin-top: -5px !important;
|
|
122
|
+
border-radius: 4px !important;
|
|
123
|
+
box-shadow: 0px 4px 8px -2px #091E4240, 0px 0px 1px 0px #091E424F !important;
|
|
124
|
+
}
|
|
125
|
+
.ant-select-prefix{
|
|
126
|
+
font-size: 14px !important;
|
|
127
|
+
font-weight: 400 !important;
|
|
128
|
+
color: #091E42 !important;
|
|
129
|
+
line-height: 20px !important;
|
|
130
|
+
}
|
|
131
|
+
.cap-unified-select-header-label{
|
|
132
|
+
font-family: ${styledVars.FONT_FAMILY} !important;
|
|
133
|
+
font-weight: 500 !important;
|
|
134
|
+
font-size: 14px !important;
|
|
135
|
+
line-height: 20px !important;
|
|
136
|
+
letter-spacing: 0px !important;
|
|
137
|
+
}
|
|
138
|
+
.cap-unified-select-header-tooltip{
|
|
139
|
+
width: 16px !important;
|
|
140
|
+
height: 16px !important;
|
|
141
|
+
color: ${styledVars.CAP_G06} !important;
|
|
142
|
+
}
|
|
143
|
+
.cap-unified-select-header-byline-text{
|
|
144
|
+
font-family: ${styledVars.FONT_FAMILY} !important;
|
|
145
|
+
font-weight: 400 !important;
|
|
146
|
+
font-size: 12px !important;
|
|
147
|
+
margin-top: -10px;
|
|
148
|
+
letter-spacing: 0px !important;
|
|
149
|
+
color: #97A0AF !important;
|
|
150
|
+
}
|
|
151
|
+
.cap-unified-tree-select .ant-select-selector:hover{
|
|
152
|
+
border: 1px solid #7A869A !important;
|
|
153
|
+
}
|
|
154
|
+
.cap-unified-tree-select .select-popup-container .ant-select-tree-switcher-noop,
|
|
155
|
+
.cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-switcher-noop {
|
|
156
|
+
display: none !important;
|
|
157
|
+
}
|
|
158
|
+
.ant-tree-select-dropdown .treeSelect-popup-container .ant-select-tree .ant-select-tree-treenode{
|
|
159
|
+
margin: 0px !important;
|
|
160
|
+
}
|
|
161
|
+
.ant-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{
|
|
162
|
+
line-height: 40px !important;
|
|
163
|
+
margin-bottom: 0px !important;
|
|
164
|
+
}
|
|
165
|
+
.cap-unified-tree-select .multiSelect-popup-container .ant-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{
|
|
166
|
+
margin-left: 10px !important;
|
|
167
|
+
}
|
|
168
|
+
.multiSelect-popup-container .ant-select-tree-treenode{
|
|
169
|
+
margin-left: 10px !important;
|
|
170
|
+
}
|
|
171
|
+
.cap-unified-select-no-result{
|
|
65
172
|
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
66
174
|
align-items: center;
|
|
67
|
-
|
|
68
|
-
|
|
175
|
+
justify-content: center;
|
|
176
|
+
height: 200px;
|
|
177
|
+
color: #8c8c8c;
|
|
178
|
+
font-size: 14px;
|
|
69
179
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
box-shadow: none !important;
|
|
75
|
-
}
|
|
180
|
+
.cap-unified-select-no-result-icon{
|
|
181
|
+
font-size: 36px;
|
|
182
|
+
margin-bottom: 8px;
|
|
183
|
+
color: #bfbfbf;
|
|
76
184
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
&.ant-select-status-error {
|
|
80
|
-
.ant-select-selector {
|
|
81
|
-
border-color: ${styledVars.CAP_RED};
|
|
82
|
-
}
|
|
185
|
+
.cap-unified-select-no-result-text{
|
|
186
|
+
font-weight: 500;
|
|
83
187
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
&.ant-select-disabled {
|
|
87
|
-
.ant-select-selector {
|
|
88
|
-
background-color: ${styledVars.CAP_G08};
|
|
89
|
-
cursor: not-allowed;
|
|
90
|
-
}
|
|
188
|
+
.ant-tree-select:hover .ant-select-selector {
|
|
189
|
+
border-color: #7A869A !important;
|
|
91
190
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
}
|
|
191
|
+
.ant-tree-select-focused .ant-select-selector,
|
|
192
|
+
.ant-tree-select-open .ant-select-selector {
|
|
193
|
+
border-color: #7A869A !important;
|
|
194
|
+
box-shadow: none !important;
|
|
195
|
+
outline: none !important; /* remove blue outline */
|
|
129
196
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.ant-select-selection-overflow {
|
|
153
|
-
flex-wrap: wrap;
|
|
154
|
-
gap: 4px;
|
|
155
|
-
}
|
|
197
|
+
.cap-unified-select-search-container{
|
|
198
|
+
border-bottom: 1px solid #EBECF0 !important;
|
|
199
|
+
line-height: 40px !important;
|
|
156
200
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.ant-select-tree-switcher {
|
|
179
|
-
width: 24px;
|
|
180
|
-
height: 24px;
|
|
181
|
-
line-height: 24px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.ant-select-tree-checkbox {
|
|
185
|
-
margin: 4px 8px 4px 0;
|
|
186
|
-
}
|
|
201
|
+
.cap-unified-select-upload-button{
|
|
202
|
+
color: ${styledVars.CAP_BLUE01} !important;
|
|
203
|
+
display: flex !important;
|
|
204
|
+
align-items: center !important;
|
|
205
|
+
font-size: 14px !important;
|
|
206
|
+
font-weight: 400 !important;
|
|
207
|
+
line-height: 20px !important;
|
|
187
208
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.ant-select-selection-item {
|
|
197
|
-
height: 28px;
|
|
198
|
-
line-height: 26px;
|
|
199
|
-
}
|
|
209
|
+
.cap-unified-select-confirm-container{
|
|
210
|
+
display: flex !important;
|
|
211
|
+
justify-content: space-between !important;
|
|
212
|
+
align-items: center !important;
|
|
213
|
+
padding: 8px 12px !important;
|
|
214
|
+
border-top: 1px solid #f0f0f0 !important;
|
|
200
215
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.ant-select-selector {
|
|
204
|
-
height: 24px;
|
|
205
|
-
padding: 0 8px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.ant-select-selection-item {
|
|
209
|
-
height: 20px;
|
|
210
|
-
line-height: 18px;
|
|
211
|
-
}
|
|
216
|
+
.cap-unified-select-confirm-button{
|
|
217
|
+
margin-right: 8px !important;
|
|
212
218
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
}
|
|
219
|
+
.cap-unified-select-selected-count{
|
|
220
|
+
color: ${styledVars.CAP_G05} !important;
|
|
221
|
+
font-size: 14px !important;
|
|
222
|
+
}
|
|
223
|
+
.cap-unified-select-status{
|
|
224
|
+
color: #E83135 !important;
|
|
221
225
|
}
|
|
222
226
|
}
|
|
223
227
|
`;
|
|
@@ -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,16 @@
|
|
|
1
1
|
// Import and export all components
|
|
2
2
|
export { default as CapInput } from './CapInput';
|
|
3
|
+
export { default as CapSkeleton } from './CapSkeleton';
|
|
4
|
+
export { default as CapSpin } from './CapSpin';
|
|
3
5
|
export { default as CapTable } from './CapTable';
|
|
6
|
+
export { default as CapUnifiedSelect } from './CapUnifiedSelect';
|
|
4
7
|
|
|
5
8
|
// Export utilities
|
|
6
9
|
export { default as LocaleHoc } from './LocaleHoc';
|
|
7
10
|
|
|
8
11
|
// Export styled utilities
|
|
9
12
|
export * as styledVars from './styled/variables';
|
|
10
|
-
export { default as styled } from './styled';
|
|
13
|
+
export { default as styled } from './styled';
|
|
14
|
+
|
|
15
|
+
// Export utils
|
|
16
|
+
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
|
-
"description": "Capillary UI component library",
|
|
6
|
-
"main": "./
|
|
7
|
-
"module": "./dist/esm/index.js",
|
|
8
|
-
"jsnext:main": "./dist/esm/index.js",
|
|
4
|
+
"version": "0.1.6-alpha.41",
|
|
5
|
+
"description": "Capillary UI component library with Ant Design v5",
|
|
6
|
+
"main": "./index.js",
|
|
9
7
|
"sideEffects": [
|
|
10
8
|
"*.css",
|
|
11
9
|
"*.less",
|
|
@@ -26,14 +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": {
|
|
28
|
+
"@ant-design/icons": "^5.2.6",
|
|
34
29
|
"@capillarytech/cap-ui-utils": "^3.0.4",
|
|
30
|
+
"antd-v5": "npm:antd@^5.26.7",
|
|
35
31
|
"prop-types": "^15.8.1",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
32
|
+
"react-intl": "2.7.2",
|
|
33
|
+
"styled-components": "^5.3.11"
|
|
38
34
|
}
|
|
39
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;
|
package/CapHeading/CapHeading.js
DELETED
|
@@ -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;
|
package/CapHeading/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CapHeading';
|
package/CapHeading/styles.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import * as styledVars from '../styled/variables';
|
|
3
|
-
|
|
4
|
-
const headings = {
|
|
5
|
-
h0: {
|
|
6
|
-
fontSize: '28px',
|
|
7
|
-
fontWeight: '500',
|
|
8
|
-
color: styledVars.CAP_G01,
|
|
9
|
-
lineHeight: '36px',
|
|
10
|
-
},
|
|
11
|
-
h1: {
|
|
12
|
-
fontSize: '24px',
|
|
13
|
-
fontWeight: '500',
|
|
14
|
-
color: styledVars.CAP_G01,
|
|
15
|
-
lineHeight: '32px',
|
|
16
|
-
},
|
|
17
|
-
h2: {
|
|
18
|
-
fontSize: '20px',
|
|
19
|
-
fontWeight: '500',
|
|
20
|
-
color: styledVars.CAP_G01,
|
|
21
|
-
lineHeight: '28px',
|
|
22
|
-
},
|
|
23
|
-
h3: {
|
|
24
|
-
fontSize: '16px',
|
|
25
|
-
fontWeight: '500',
|
|
26
|
-
color: styledVars.CAP_G01,
|
|
27
|
-
lineHeight: '24px',
|
|
28
|
-
},
|
|
29
|
-
h4: {
|
|
30
|
-
fontSize: '14px',
|
|
31
|
-
fontWeight: '500',
|
|
32
|
-
color: styledVars.CAP_G01,
|
|
33
|
-
lineHeight: '20px',
|
|
34
|
-
},
|
|
35
|
-
h5: {
|
|
36
|
-
fontSize: '14px',
|
|
37
|
-
fontWeight: 'normal',
|
|
38
|
-
color: styledVars.CAP_G01,
|
|
39
|
-
lineHeight: '20px',
|
|
40
|
-
},
|
|
41
|
-
h6: {
|
|
42
|
-
color: styledVars.CAP_G04,
|
|
43
|
-
fontSize: '14px',
|
|
44
|
-
fontWeight: 'normal',
|
|
45
|
-
lineHeight: '20px',
|
|
46
|
-
},
|
|
47
|
-
h7: {
|
|
48
|
-
fontSize: '20px',
|
|
49
|
-
fontWeight: '500',
|
|
50
|
-
color: styledVars.CAP_G04,
|
|
51
|
-
lineHeight: '28px',
|
|
52
|
-
},
|
|
53
|
-
h8: {
|
|
54
|
-
fontSize: '14px',
|
|
55
|
-
fontWeight: '400',
|
|
56
|
-
color: styledVars.CAP_G01,
|
|
57
|
-
lineHeight: '20px',
|
|
58
|
-
},
|
|
59
|
-
h9: {
|
|
60
|
-
fontSize: '14px',
|
|
61
|
-
fontWeight: '500',
|
|
62
|
-
color: styledVars.CAP_WHITE,
|
|
63
|
-
lineHeight: '20px',
|
|
64
|
-
},
|
|
65
|
-
h10: {
|
|
66
|
-
fontSize: '12px',
|
|
67
|
-
fontWeight: '500',
|
|
68
|
-
color: styledVars.CAP_G01,
|
|
69
|
-
lineHeight: '16px',
|
|
70
|
-
},
|
|
71
|
-
label1: {
|
|
72
|
-
color: styledVars.CAP_G04,
|
|
73
|
-
fontSize: '12px',
|
|
74
|
-
fontWeight: 'normal',
|
|
75
|
-
lineHeight: '20px',
|
|
76
|
-
},
|
|
77
|
-
label2: {
|
|
78
|
-
color: styledVars.CAP_G01,
|
|
79
|
-
fontSize: '12px',
|
|
80
|
-
fontWeight: 'normal',
|
|
81
|
-
lineHeight: '20px',
|
|
82
|
-
},
|
|
83
|
-
label3: {
|
|
84
|
-
color: styledVars.CAP_G05,
|
|
85
|
-
fontSize: '12px',
|
|
86
|
-
fontWeight: 'normal',
|
|
87
|
-
lineHeight: '20px',
|
|
88
|
-
},
|
|
89
|
-
label4: {
|
|
90
|
-
color: styledVars.CAP_G04,
|
|
91
|
-
fontSize: '12px',
|
|
92
|
-
fontWeight: 'normal',
|
|
93
|
-
lineHeight: '16px',
|
|
94
|
-
},
|
|
95
|
-
label5: {
|
|
96
|
-
color: styledVars.CAP_G04,
|
|
97
|
-
fontSize: '16px',
|
|
98
|
-
fontWeight: 'normal',
|
|
99
|
-
lineHeight: '24px',
|
|
100
|
-
},
|
|
101
|
-
label6: {
|
|
102
|
-
color: styledVars.CAP_G01,
|
|
103
|
-
fontSize: '16px',
|
|
104
|
-
fontWeight: 'normal',
|
|
105
|
-
lineHeight: '24px',
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const headingStyles = css`
|
|
110
|
-
font-size: ${props => headings[props.type].fontSize};
|
|
111
|
-
font-weight: ${props => headings[props.type].fontWeight};
|
|
112
|
-
color: ${props => headings[props.type].color};
|
|
113
|
-
line-height: ${props => headings[props.type].lineHeight};
|
|
114
|
-
margin: 0;
|
|
115
|
-
padding: 0;
|
|
116
|
-
`;
|
|
117
|
-
|
|
118
|
-
export const HeadingWrapper = styled.div`
|
|
119
|
-
${headingStyles}
|
|
120
|
-
`;
|
|
121
|
-
|
|
122
|
-
export const HeadingSpan = styled.span`
|
|
123
|
-
${headingStyles}
|
|
124
|
-
display: inline-block;
|
|
125
|
-
`;
|