@qn-pandora/pandora-component 2.2.1 → 3.0.2
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/CHANGELOG.json +25 -0
- package/CHANGELOG.md +11 -0
- package/es/components/AutoComplete/style.css +4 -1
- package/es/components/Button/index.js +1 -1
- package/es/components/Button/style.css +0 -1
- package/es/components/Button/style.less +0 -1
- package/es/components/Card/index.js +2 -1
- package/es/components/Card/style.css +10 -2
- package/es/components/CheckTransformList/Item/index.js +1 -1
- package/es/components/CheckTransformList/index.js +1 -1
- package/es/components/CheckTransformList/style.css +26 -8
- package/es/components/CheckboxList/index.d.ts +1 -0
- package/es/components/CheckboxList/index.js +3 -2
- package/es/components/Collapse/Panel/index.js +2 -1
- package/es/components/Collapse/index.js +2 -1
- package/es/components/CollapsiblePanel/index.d.ts +2 -2
- package/es/components/ConfigProvider/index.js +2 -1
- package/es/components/DateTimePicker/Base/index.js +2 -2
- package/es/components/DateTimePicker/Base/style.css +7 -12
- package/es/components/DateTimePicker/DisplayInput/style.css +17 -7
- package/es/components/DateTimePicker/constants.js +1 -1
- package/es/components/DateTimePicker/index.d.ts +2 -1
- package/es/components/DateTimePicker/style.css +155 -57
- package/es/components/Input/index.js +2 -1
- package/es/components/Input/style.css +17 -7
- package/es/components/InputNumber/style.css +1 -1
- package/es/components/Menu/Option.d.ts +1 -1
- package/es/components/Menu/index.d.ts +2 -2
- package/es/components/Menu/style.css +4 -0
- package/es/components/NameLimiter/index.d.ts +3 -13
- package/es/components/NameLimiter/index.js +31 -39
- package/es/components/NameLimiter/style.css +9 -1
- package/es/components/NameLimiter/style.less +10 -1
- package/es/components/OptionList/PopoverOptionList/style.css +155 -57
- package/es/components/OptionList/index.js +2 -1
- package/es/components/OptionList/style.css +155 -57
- package/es/components/RangeInput/style.css +18 -8
- package/es/components/RemarkName/index.d.ts +0 -2
- package/es/components/RemarkName/index.js +2 -4
- package/es/components/RemarkName/style.css +9 -5
- package/es/components/RemarkName/style.less +0 -5
- package/es/components/Selector/style.css +4 -1
- package/es/components/SolidRadioGroup/index.js +7 -4
- package/es/components/SolidRadioGroup/style.css +4 -1
- package/es/components/SolidRadioGroup/style.less +5 -0
- package/es/components/Steps/index.js +2 -1
- package/es/components/Table/index.d.ts +9 -24
- package/es/components/Table/index.js +40 -8
- package/es/components/Table/style.css +10 -6
- package/es/components/Tabs/style.css +10 -2
- package/es/components/TagList/Tag/style.css +3 -3
- package/es/components/TagList/Tag/style.less +3 -3
- package/es/components/TagList/index.js +3 -2
- package/es/components/TagList/style.css +3 -3
- package/es/components/TagList/style.less +8 -8
- package/es/index.css +225 -97
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.less +1 -1
- package/es/style/theme.less +4 -3
- package/lib/components/AutoComplete/style.css +4 -1
- package/lib/components/Button/index.js +1 -1
- package/lib/components/Button/style.css +0 -1
- package/lib/components/Button/style.less +0 -1
- package/lib/components/Card/index.js +1 -1
- package/lib/components/Card/style.css +10 -2
- package/lib/components/CheckTransformList/Item/index.js +1 -1
- package/lib/components/CheckTransformList/index.js +1 -1
- package/lib/components/CheckTransformList/style.css +26 -8
- package/lib/components/CheckboxList/index.d.ts +1 -0
- package/lib/components/CheckboxList/index.js +3 -2
- package/lib/components/Collapse/Panel/index.js +2 -1
- package/lib/components/Collapse/index.js +1 -1
- package/lib/components/CollapsiblePanel/index.d.ts +2 -2
- package/lib/components/ConfigProvider/index.js +1 -1
- package/lib/components/DateTimePicker/Base/index.js +2 -2
- package/lib/components/DateTimePicker/Base/style.css +7 -12
- package/lib/components/DateTimePicker/DisplayInput/style.css +17 -7
- package/lib/components/DateTimePicker/constants.js +1 -1
- package/lib/components/DateTimePicker/index.d.ts +2 -1
- package/lib/components/DateTimePicker/style.css +155 -57
- package/lib/components/Input/index.js +1 -1
- package/lib/components/Input/style.css +17 -7
- package/lib/components/InputNumber/style.css +1 -1
- package/lib/components/Menu/Option.d.ts +1 -1
- package/lib/components/Menu/index.d.ts +2 -2
- package/lib/components/Menu/style.css +4 -0
- package/lib/components/NameLimiter/index.d.ts +3 -13
- package/lib/components/NameLimiter/index.js +31 -38
- package/lib/components/NameLimiter/style.css +9 -1
- package/lib/components/NameLimiter/style.less +10 -1
- package/lib/components/OptionList/PopoverOptionList/style.css +155 -57
- package/lib/components/OptionList/index.js +1 -1
- package/lib/components/OptionList/style.css +155 -57
- package/lib/components/RangeInput/style.css +18 -8
- package/lib/components/RemarkName/index.d.ts +0 -2
- package/lib/components/RemarkName/index.js +2 -4
- package/lib/components/RemarkName/style.css +9 -5
- package/lib/components/RemarkName/style.less +0 -5
- package/lib/components/Selector/style.css +4 -1
- package/lib/components/SolidRadioGroup/index.js +6 -3
- package/lib/components/SolidRadioGroup/style.css +4 -1
- package/lib/components/SolidRadioGroup/style.less +5 -0
- package/lib/components/Steps/index.js +1 -1
- package/lib/components/Table/index.d.ts +9 -24
- package/lib/components/Table/index.js +39 -7
- package/lib/components/Table/style.css +10 -6
- package/lib/components/Tabs/style.css +10 -2
- package/lib/components/TagList/Tag/style.css +3 -3
- package/lib/components/TagList/Tag/style.less +3 -3
- package/lib/components/TagList/index.js +2 -2
- package/lib/components/TagList/style.css +3 -3
- package/lib/components/TagList/style.less +8 -8
- package/lib/index.css +1985 -1857
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/index.less +4 -4
- package/lib/style/theme.less +4 -3
- package/package.json +24 -24
- package/es/components/NameLimiter/transformer.d.ts +0 -6
- package/es/components/NameLimiter/transformer.js +0 -84
- package/lib/components/NameLimiter/transformer.d.ts +0 -6
- package/lib/components/NameLimiter/transformer.js +0 -91
@@ -113,100 +113,198 @@
|
|
113
113
|
display: block;
|
114
114
|
width: 8.48528137px;
|
115
115
|
height: 8.48528137px;
|
116
|
+
overflow: hidden;
|
116
117
|
background: transparent;
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
118
|
+
pointer-events: none;
|
119
|
+
}
|
120
|
+
.ant-popover-arrow-content {
|
121
|
+
position: absolute;
|
122
|
+
top: 0;
|
123
|
+
right: 0;
|
124
|
+
bottom: 0;
|
125
|
+
left: 0;
|
126
|
+
display: block;
|
127
|
+
width: 6px;
|
128
|
+
height: 6px;
|
129
|
+
margin: auto;
|
130
|
+
background-color: #ffffff;
|
131
|
+
content: '';
|
132
|
+
pointer-events: auto;
|
133
|
+
}
|
134
|
+
.ant-popover-placement-top .ant-popover-arrow,
|
135
|
+
.ant-popover-placement-topLeft .ant-popover-arrow,
|
136
|
+
.ant-popover-placement-topRight .ant-popover-arrow {
|
137
|
+
bottom: 1.51471863px;
|
138
|
+
}
|
139
|
+
.ant-popover-placement-top .ant-popover-arrow-content,
|
140
|
+
.ant-popover-placement-topLeft .ant-popover-arrow-content,
|
141
|
+
.ant-popover-placement-topRight .ant-popover-arrow-content {
|
130
142
|
-webkit-box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
131
143
|
box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
144
|
+
-webkit-transform: translateY(-4.24264069px) rotate(45deg);
|
145
|
+
transform: translateY(-4.24264069px) rotate(45deg);
|
132
146
|
}
|
133
|
-
.ant-popover-placement-top
|
147
|
+
.ant-popover-placement-top .ant-popover-arrow {
|
134
148
|
left: 50%;
|
135
|
-
-webkit-transform: translateX(-50%)
|
136
|
-
transform: translateX(-50%)
|
149
|
+
-webkit-transform: translateX(-50%);
|
150
|
+
transform: translateX(-50%);
|
137
151
|
}
|
138
|
-
.ant-popover-placement-topLeft
|
152
|
+
.ant-popover-placement-topLeft .ant-popover-arrow {
|
139
153
|
left: 16px;
|
140
154
|
}
|
141
|
-
.ant-popover-placement-topRight
|
155
|
+
.ant-popover-placement-topRight .ant-popover-arrow {
|
142
156
|
right: 16px;
|
143
157
|
}
|
144
|
-
.ant-popover-placement-right
|
145
|
-
.ant-popover-placement-rightTop
|
146
|
-
.ant-popover-placement-rightBottom
|
147
|
-
left:
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
158
|
+
.ant-popover-placement-right .ant-popover-arrow,
|
159
|
+
.ant-popover-placement-rightTop .ant-popover-arrow,
|
160
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow {
|
161
|
+
left: 1.51471863px;
|
162
|
+
}
|
163
|
+
.ant-popover-placement-right .ant-popover-arrow-content,
|
164
|
+
.ant-popover-placement-rightTop .ant-popover-arrow-content,
|
165
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow-content {
|
152
166
|
-webkit-box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);
|
153
167
|
box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);
|
168
|
+
-webkit-transform: translateX(4.24264069px) rotate(45deg);
|
169
|
+
transform: translateX(4.24264069px) rotate(45deg);
|
154
170
|
}
|
155
|
-
.ant-popover-placement-right
|
171
|
+
.ant-popover-placement-right .ant-popover-arrow {
|
156
172
|
top: 50%;
|
157
|
-
-webkit-transform: translateY(-50%)
|
158
|
-
transform: translateY(-50%)
|
173
|
+
-webkit-transform: translateY(-50%);
|
174
|
+
transform: translateY(-50%);
|
159
175
|
}
|
160
|
-
.ant-popover-placement-rightTop
|
176
|
+
.ant-popover-placement-rightTop .ant-popover-arrow {
|
161
177
|
top: 12px;
|
162
178
|
}
|
163
|
-
.ant-popover-placement-rightBottom
|
179
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow {
|
164
180
|
bottom: 12px;
|
165
181
|
}
|
166
|
-
.ant-popover-placement-bottom
|
167
|
-
.ant-popover-placement-bottomLeft
|
168
|
-
.ant-popover-placement-bottomRight
|
169
|
-
top:
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
182
|
+
.ant-popover-placement-bottom .ant-popover-arrow,
|
183
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow,
|
184
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow {
|
185
|
+
top: 1.51471863px;
|
186
|
+
}
|
187
|
+
.ant-popover-placement-bottom .ant-popover-arrow-content,
|
188
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow-content,
|
189
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow-content {
|
174
190
|
-webkit-box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
|
175
191
|
box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
|
192
|
+
-webkit-transform: translateY(4.24264069px) rotate(45deg);
|
193
|
+
transform: translateY(4.24264069px) rotate(45deg);
|
176
194
|
}
|
177
|
-
.ant-popover-placement-bottom
|
195
|
+
.ant-popover-placement-bottom .ant-popover-arrow {
|
178
196
|
left: 50%;
|
179
|
-
-webkit-transform: translateX(-50%)
|
180
|
-
transform: translateX(-50%)
|
197
|
+
-webkit-transform: translateX(-50%);
|
198
|
+
transform: translateX(-50%);
|
181
199
|
}
|
182
|
-
.ant-popover-placement-bottomLeft
|
200
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow {
|
183
201
|
left: 16px;
|
184
202
|
}
|
185
|
-
.ant-popover-placement-bottomRight
|
203
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow {
|
186
204
|
right: 16px;
|
187
205
|
}
|
188
|
-
.ant-popover-placement-left
|
189
|
-
.ant-popover-placement-leftTop
|
190
|
-
.ant-popover-placement-leftBottom
|
191
|
-
right:
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
206
|
+
.ant-popover-placement-left .ant-popover-arrow,
|
207
|
+
.ant-popover-placement-leftTop .ant-popover-arrow,
|
208
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow {
|
209
|
+
right: 1.51471863px;
|
210
|
+
}
|
211
|
+
.ant-popover-placement-left .ant-popover-arrow-content,
|
212
|
+
.ant-popover-placement-leftTop .ant-popover-arrow-content,
|
213
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow-content {
|
196
214
|
-webkit-box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);
|
197
215
|
box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);
|
216
|
+
-webkit-transform: translateX(-4.24264069px) rotate(45deg);
|
217
|
+
transform: translateX(-4.24264069px) rotate(45deg);
|
198
218
|
}
|
199
|
-
.ant-popover-placement-left
|
219
|
+
.ant-popover-placement-left .ant-popover-arrow {
|
200
220
|
top: 50%;
|
201
|
-
-webkit-transform: translateY(-50%)
|
202
|
-
transform: translateY(-50%)
|
221
|
+
-webkit-transform: translateY(-50%);
|
222
|
+
transform: translateY(-50%);
|
203
223
|
}
|
204
|
-
.ant-popover-placement-leftTop
|
224
|
+
.ant-popover-placement-leftTop .ant-popover-arrow {
|
205
225
|
top: 12px;
|
206
226
|
}
|
207
|
-
.ant-popover-placement-leftBottom
|
227
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow {
|
208
228
|
bottom: 12px;
|
209
229
|
}
|
230
|
+
.ant-popover-pink .ant-popover-inner {
|
231
|
+
background-color: #eb2f96;
|
232
|
+
}
|
233
|
+
.ant-popover-pink .ant-popover-arrow-content {
|
234
|
+
background-color: #eb2f96;
|
235
|
+
}
|
236
|
+
.ant-popover-magenta .ant-popover-inner {
|
237
|
+
background-color: #eb2f96;
|
238
|
+
}
|
239
|
+
.ant-popover-magenta .ant-popover-arrow-content {
|
240
|
+
background-color: #eb2f96;
|
241
|
+
}
|
242
|
+
.ant-popover-red .ant-popover-inner {
|
243
|
+
background-color: #f5222d;
|
244
|
+
}
|
245
|
+
.ant-popover-red .ant-popover-arrow-content {
|
246
|
+
background-color: #f5222d;
|
247
|
+
}
|
248
|
+
.ant-popover-volcano .ant-popover-inner {
|
249
|
+
background-color: #fa541c;
|
250
|
+
}
|
251
|
+
.ant-popover-volcano .ant-popover-arrow-content {
|
252
|
+
background-color: #fa541c;
|
253
|
+
}
|
254
|
+
.ant-popover-orange .ant-popover-inner {
|
255
|
+
background-color: #fa8c16;
|
256
|
+
}
|
257
|
+
.ant-popover-orange .ant-popover-arrow-content {
|
258
|
+
background-color: #fa8c16;
|
259
|
+
}
|
260
|
+
.ant-popover-yellow .ant-popover-inner {
|
261
|
+
background-color: #fadb14;
|
262
|
+
}
|
263
|
+
.ant-popover-yellow .ant-popover-arrow-content {
|
264
|
+
background-color: #fadb14;
|
265
|
+
}
|
266
|
+
.ant-popover-gold .ant-popover-inner {
|
267
|
+
background-color: #faad14;
|
268
|
+
}
|
269
|
+
.ant-popover-gold .ant-popover-arrow-content {
|
270
|
+
background-color: #faad14;
|
271
|
+
}
|
272
|
+
.ant-popover-cyan .ant-popover-inner {
|
273
|
+
background-color: #13c2c2;
|
274
|
+
}
|
275
|
+
.ant-popover-cyan .ant-popover-arrow-content {
|
276
|
+
background-color: #13c2c2;
|
277
|
+
}
|
278
|
+
.ant-popover-lime .ant-popover-inner {
|
279
|
+
background-color: #a0d911;
|
280
|
+
}
|
281
|
+
.ant-popover-lime .ant-popover-arrow-content {
|
282
|
+
background-color: #a0d911;
|
283
|
+
}
|
284
|
+
.ant-popover-green .ant-popover-inner {
|
285
|
+
background-color: #52c41a;
|
286
|
+
}
|
287
|
+
.ant-popover-green .ant-popover-arrow-content {
|
288
|
+
background-color: #52c41a;
|
289
|
+
}
|
290
|
+
.ant-popover-blue .ant-popover-inner {
|
291
|
+
background-color: #1890ff;
|
292
|
+
}
|
293
|
+
.ant-popover-blue .ant-popover-arrow-content {
|
294
|
+
background-color: #1890ff;
|
295
|
+
}
|
296
|
+
.ant-popover-geekblue .ant-popover-inner {
|
297
|
+
background-color: #2f54eb;
|
298
|
+
}
|
299
|
+
.ant-popover-geekblue .ant-popover-arrow-content {
|
300
|
+
background-color: #2f54eb;
|
301
|
+
}
|
302
|
+
.ant-popover-purple .ant-popover-inner {
|
303
|
+
background-color: #722ed1;
|
304
|
+
}
|
305
|
+
.ant-popover-purple .ant-popover-arrow-content {
|
306
|
+
background-color: #722ed1;
|
307
|
+
}
|
210
308
|
.ant-popover-rtl {
|
211
309
|
direction: rtl;
|
212
310
|
text-align: right;
|
@@ -27,7 +27,7 @@ import { Password } from './Password';
|
|
27
27
|
import { TextArea } from './TextArea';
|
28
28
|
import NumberInput from './NumberInput';
|
29
29
|
var useCallback = React.useCallback;
|
30
|
-
|
30
|
+
function Input(props) {
|
31
31
|
var onChange = props.onChange, restProps = __rest(props, ["onChange"]);
|
32
32
|
var handleChange = useCallback(function (e) {
|
33
33
|
if (onChange) {
|
@@ -40,3 +40,4 @@ Input.DebounceInput = debounceWrapper(Input);
|
|
40
40
|
Input.Password = Password;
|
41
41
|
Input.TextArea = TextArea;
|
42
42
|
Input.NumberInput = NumberInput;
|
43
|
+
export default Input;
|
@@ -132,8 +132,8 @@ textarea.ant-input-affix-wrapper {
|
|
132
132
|
outline: none;
|
133
133
|
}
|
134
134
|
.ant-input-affix-wrapper > input.ant-input:focus {
|
135
|
-
-webkit-box-shadow: none;
|
136
|
-
box-shadow: none;
|
135
|
+
-webkit-box-shadow: none !important;
|
136
|
+
box-shadow: none !important;
|
137
137
|
}
|
138
138
|
.ant-input-affix-wrapper::before {
|
139
139
|
width: 0;
|
@@ -158,7 +158,7 @@ textarea.ant-input-affix-wrapper {
|
|
158
158
|
.ant-input-suffix {
|
159
159
|
margin-left: 4px;
|
160
160
|
}
|
161
|
-
.ant-input-clear-icon {
|
161
|
+
.anticon.ant-input-clear-icon {
|
162
162
|
margin: 0 4px;
|
163
163
|
color: rgba(0, 0, 0, 0.25);
|
164
164
|
font-size: 12px;
|
@@ -167,16 +167,16 @@ textarea.ant-input-affix-wrapper {
|
|
167
167
|
-webkit-transition: color 0.3s;
|
168
168
|
transition: color 0.3s;
|
169
169
|
}
|
170
|
-
.ant-input-clear-icon:hover {
|
170
|
+
.anticon.ant-input-clear-icon:hover {
|
171
171
|
color: rgba(0, 0, 0, 0.45);
|
172
172
|
}
|
173
|
-
.ant-input-clear-icon:active {
|
173
|
+
.anticon.ant-input-clear-icon:active {
|
174
174
|
color: rgba(0, 0, 0, 0.65);
|
175
175
|
}
|
176
|
-
.ant-input-clear-icon-hidden {
|
176
|
+
.anticon.ant-input-clear-icon-hidden {
|
177
177
|
visibility: hidden;
|
178
178
|
}
|
179
|
-
.ant-input-clear-icon:last-child {
|
179
|
+
.anticon.ant-input-clear-icon:last-child {
|
180
180
|
margin-right: 0;
|
181
181
|
}
|
182
182
|
.ant-input-affix-wrapper-textarea-with-clear-btn {
|
@@ -391,6 +391,16 @@ textarea.ant-input {
|
|
391
391
|
.ant-input-group-addon .ant-select-focused .ant-select-selector {
|
392
392
|
color: #7a869a;
|
393
393
|
}
|
394
|
+
.ant-input-group-addon .ant-cascader-picker {
|
395
|
+
margin: -9px -12px;
|
396
|
+
background-color: transparent;
|
397
|
+
}
|
398
|
+
.ant-input-group-addon .ant-cascader-picker .ant-cascader-input {
|
399
|
+
text-align: left;
|
400
|
+
border: 0;
|
401
|
+
-webkit-box-shadow: none;
|
402
|
+
box-shadow: none;
|
403
|
+
}
|
394
404
|
.ant-input-group > .ant-input:first-child,
|
395
405
|
.ant-input-group-addon:first-child {
|
396
406
|
border-top-right-radius: 0;
|
@@ -113,6 +113,7 @@ textarea.ant-input-number {
|
|
113
113
|
font-weight: bold;
|
114
114
|
line-height: 0;
|
115
115
|
text-align: center;
|
116
|
+
border-left: 1px solid #e5e5e5;
|
116
117
|
-webkit-transition: all 0.1s linear;
|
117
118
|
transition: all 0.1s linear;
|
118
119
|
}
|
@@ -255,7 +256,6 @@ textarea.ant-input-number {
|
|
255
256
|
width: 22px;
|
256
257
|
height: 100%;
|
257
258
|
background: #ffffff;
|
258
|
-
border-left: 1px solid #e5e5e5;
|
259
259
|
border-radius: 0 2px 2px 0;
|
260
260
|
opacity: 0;
|
261
261
|
-webkit-transition: opacity 0.24s linear 0.1s;
|
@@ -13,9 +13,9 @@ export interface IMenuProps extends Omit<MenuProps, 'options' | 'mode'> {
|
|
13
13
|
}
|
14
14
|
export declare function Menue(props: React.PropsWithChildren<IMenuProps>): JSX.Element;
|
15
15
|
export declare namespace Menue {
|
16
|
-
var Divider
|
16
|
+
var Divider;
|
17
17
|
var Item: typeof import("antd/lib/menu/MenuItem").default;
|
18
18
|
var SubMenu: typeof import("antd/lib/menu/SubMenu").default;
|
19
|
-
var ItemGroup
|
19
|
+
var ItemGroup;
|
20
20
|
}
|
21
21
|
export default Menue;
|
@@ -121,6 +121,10 @@
|
|
121
121
|
-webkit-transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
122
122
|
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
123
123
|
}
|
124
|
+
.ant-menu-title-content {
|
125
|
+
-webkit-transition: color 0.3s;
|
126
|
+
transition: color 0.3s;
|
127
|
+
}
|
124
128
|
.ant-menu-item a {
|
125
129
|
color: #7a869a;
|
126
130
|
}
|
@@ -1,21 +1,11 @@
|
|
1
|
-
|
2
|
-
export declare enum SplitType {
|
3
|
-
End = "end",
|
4
|
-
Between = "between"
|
5
|
-
}
|
1
|
+
/// <reference types="react" />
|
6
2
|
/**
|
7
|
-
*
|
3
|
+
* 对于超出容器宽度的名称进行省略,使用Tooltip展示。
|
8
4
|
*/
|
9
5
|
export interface INameLimiterProps {
|
10
6
|
/** 资源名称 */
|
11
7
|
name: string;
|
12
|
-
/** 展示的最大长度,资源名称超过该长度会展示前后个一半的资源名称,中间使用省略号 */
|
13
|
-
length: number;
|
14
8
|
/** 用于显示Tooltip的title */
|
15
9
|
title?: string;
|
16
|
-
/** 省略号位置 */
|
17
|
-
type?: SplitType;
|
18
|
-
}
|
19
|
-
export default class NameLimiter extends React.PureComponent<INameLimiterProps, any> {
|
20
|
-
render(): JSX.Element;
|
21
10
|
}
|
11
|
+
export default function NameLimiter({ name, title }: INameLimiterProps): JSX.Element;
|
@@ -1,42 +1,34 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
var __read = (this && this.__read) || function (o, n) {
|
2
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
3
|
+
if (!m) return o;
|
4
|
+
var i = m.call(o), r, ar = [], e;
|
5
|
+
try {
|
6
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
7
|
+
}
|
8
|
+
catch (error) { e = { error: error }; }
|
9
|
+
finally {
|
10
|
+
try {
|
11
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
12
|
+
}
|
13
|
+
finally { if (e) throw e.error; }
|
14
|
+
}
|
15
|
+
return ar;
|
16
|
+
};
|
17
|
+
import React, { useLayoutEffect, useRef, useState } from 'react';
|
15
18
|
import { Tooltip } from 'antd';
|
16
19
|
import { SDK_PREFIX } from '../../constants/style';
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
27
|
-
}
|
28
|
-
NameLimiter.prototype.render = function () {
|
29
|
-
var _a = this.props, name = _a.name, length = _a.length, title = _a.title, type = _a.type;
|
30
|
-
var displayName = name;
|
31
|
-
var needFormat = getBytes(displayName) > length;
|
32
|
-
var nameSpan = (React.createElement("span", null, needFormat
|
33
|
-
? getTransformerString(displayName, length, type)
|
34
|
-
: displayName));
|
35
|
-
if (title || needFormat) {
|
36
|
-
return (React.createElement(Tooltip, { overlayClassName: SDK_PREFIX + "-name-tooltip", placement: "top", title: title || displayName }, nameSpan));
|
20
|
+
export default function NameLimiter(_a) {
|
21
|
+
var name = _a.name, title = _a.title;
|
22
|
+
var _b = __read(useState(false), 2), ellipsis = _b[0], setEllipsis = _b[1];
|
23
|
+
var _c = __read(useState(false), 2), visible = _c[0], setVisible = _c[1];
|
24
|
+
var ref = useRef(null);
|
25
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
26
|
+
useLayoutEffect(function () {
|
27
|
+
if (!ref.current) {
|
28
|
+
return;
|
37
29
|
}
|
38
|
-
|
39
|
-
};
|
40
|
-
return
|
41
|
-
|
42
|
-
|
30
|
+
setEllipsis(ref.current.clientWidth < ref.current.scrollWidth);
|
31
|
+
});
|
32
|
+
return (React.createElement(Tooltip, { overlayClassName: SDK_PREFIX + "-name-limit-tooltip", placement: "top", title: title || name, visible: (!!title || ellipsis) && visible, onVisibleChange: setVisible },
|
33
|
+
React.createElement("span", { className: SDK_PREFIX + "-name-limit", ref: ref }, name)));
|
34
|
+
}
|
@@ -268,7 +268,15 @@
|
|
268
268
|
.ant-btn-sm {
|
269
269
|
padding: 0 7px;
|
270
270
|
}
|
271
|
-
.pandora-sdk-name-
|
271
|
+
.pandora-sdk-name-limit {
|
272
|
+
max-width: 100%;
|
273
|
+
display: inline-block;
|
274
|
+
vertical-align: top;
|
275
|
+
white-space: nowrap;
|
276
|
+
text-overflow: ellipsis;
|
277
|
+
overflow: hidden;
|
278
|
+
}
|
279
|
+
.pandora-sdk-name-limit-tooltip .ant-tooltip-inner {
|
272
280
|
max-width: 400px !important;
|
273
281
|
max-height: 200px !important;
|
274
282
|
overflow: auto;
|
@@ -1,7 +1,16 @@
|
|
1
1
|
@import 'antd/lib/tooltip/style/index.less';
|
2
2
|
@import '../../style/theme.less';
|
3
3
|
|
4
|
-
.@{sdk-prefix}-name-
|
4
|
+
.@{sdk-prefix}-name-limit {
|
5
|
+
max-width: 100%;
|
6
|
+
display: inline-block;
|
7
|
+
vertical-align: top;
|
8
|
+
white-space: nowrap;
|
9
|
+
text-overflow: ellipsis;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.@{sdk-prefix}-name-limit-tooltip {
|
5
14
|
.@{ant-prefix}-tooltip-inner {
|
6
15
|
max-width: 400px !important;
|
7
16
|
max-height: 200px !important;
|