@kaiheila/ui-components 0.1.14 → 0.1.17
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/dist/main.css +40 -48
- package/dist/ui-components.js +19 -10
- package/package.json +1 -1
package/dist/main.css
CHANGED
|
@@ -243,6 +243,7 @@ textarea {
|
|
|
243
243
|
.chuanyu-button.disabled,
|
|
244
244
|
.chuanyu-button:disabled {
|
|
245
245
|
cursor: not-allowed;
|
|
246
|
+
opacity: 0.5;
|
|
246
247
|
}
|
|
247
248
|
.chuanyu-button.size-xs {
|
|
248
249
|
font-size: 12px;
|
|
@@ -294,19 +295,15 @@ textarea {
|
|
|
294
295
|
.chuanyu-button.type-primary:not(.disabled):active {
|
|
295
296
|
background-color: var(--color-primary-active);
|
|
296
297
|
}
|
|
297
|
-
.chuanyu-button.type-primary:disabled {
|
|
298
|
-
opacity: 0.5;
|
|
299
|
-
background-color: var(--color-primary);
|
|
300
|
-
}
|
|
301
298
|
.chuanyu-button.type-simple-primary {
|
|
302
299
|
background-color: transparent;
|
|
303
300
|
color: var(--color-primary);
|
|
304
301
|
}
|
|
305
|
-
.chuanyu-button.type-simple-primary:hover {
|
|
302
|
+
.chuanyu-button.type-simple-primary:not(.disabled):hover {
|
|
306
303
|
background-color: var(--color-primary);
|
|
307
304
|
color: #fff;
|
|
308
305
|
}
|
|
309
|
-
.chuanyu-button.type-simple-primary:active {
|
|
306
|
+
.chuanyu-button.type-simple-primary:not(.disabled):active {
|
|
310
307
|
background-color: var(--color-primary-active);
|
|
311
308
|
color: #fff;
|
|
312
309
|
}
|
|
@@ -316,13 +313,9 @@ textarea {
|
|
|
316
313
|
.chuanyu-button.type-appprimary:not(.disabled):hover {
|
|
317
314
|
background-color: var(--color-primary-hover);
|
|
318
315
|
}
|
|
319
|
-
.chuanyu-button.type-appprimary:active {
|
|
316
|
+
.chuanyu-button.type-appprimary:not(.disabled):active {
|
|
320
317
|
background-color: var(--color-primary-active);
|
|
321
318
|
}
|
|
322
|
-
.chuanyu-button.type-appprimary:disabled {
|
|
323
|
-
opacity: 0.5;
|
|
324
|
-
background-color: var(--color-primary);
|
|
325
|
-
}
|
|
326
319
|
.chuanyu-button.type-danger {
|
|
327
320
|
background-color: var(--color-error);
|
|
328
321
|
}
|
|
@@ -372,10 +365,6 @@ textarea {
|
|
|
372
365
|
.chuanyu-button.type-simple:not(.disabled):active {
|
|
373
366
|
background-color: var(--button-simple-active);
|
|
374
367
|
}
|
|
375
|
-
.chuanyu-button.type-simple:disabled {
|
|
376
|
-
opacity: 0.5;
|
|
377
|
-
background-color: transparent;
|
|
378
|
-
}
|
|
379
368
|
.chuanyu-button.type-default {
|
|
380
369
|
color: var(--text-description-color);
|
|
381
370
|
background-color: var(--button-default);
|
|
@@ -387,9 +376,8 @@ textarea {
|
|
|
387
376
|
background-color: var(--button-default-active);
|
|
388
377
|
}
|
|
389
378
|
.chuanyu-button.type-default:disabled {
|
|
390
|
-
cursor: not-allowed;
|
|
391
379
|
opacity: 0.5;
|
|
392
|
-
background:
|
|
380
|
+
background-color: var(--button-default);
|
|
393
381
|
}
|
|
394
382
|
.chuanyu-button.type-ghost {
|
|
395
383
|
color: var(--text-description-color);
|
|
@@ -402,21 +390,17 @@ textarea {
|
|
|
402
390
|
.chuanyu-button.type-ghost:not(.disabled):active {
|
|
403
391
|
background-color: var(--button-simple-active);
|
|
404
392
|
}
|
|
405
|
-
.chuanyu-button.type-ghost:disabled {
|
|
406
|
-
cursor: not-allowed;
|
|
407
|
-
opacity: 0.5;
|
|
408
|
-
}
|
|
409
393
|
.chuanyu-button.type-ghost-danger {
|
|
410
394
|
color: var(--color-error);
|
|
411
395
|
border-color: var(--color-error);
|
|
412
396
|
border-width: 1px;
|
|
413
397
|
border-style: solid;
|
|
414
398
|
}
|
|
415
|
-
.chuanyu-button.type-ghost-danger:hover {
|
|
399
|
+
.chuanyu-button.type-ghost-danger:not(.disabled):hover {
|
|
416
400
|
color: var(--color-error-hover);
|
|
417
401
|
border-color: var(--color-error-hover);
|
|
418
402
|
}
|
|
419
|
-
.chuanyu-button.type-ghost-danger:active {
|
|
403
|
+
.chuanyu-button.type-ghost-danger:not(.disabled):active {
|
|
420
404
|
color: var(--color-error-hover);
|
|
421
405
|
border-color: var(--color-error-hover);
|
|
422
406
|
}
|
|
@@ -425,10 +409,10 @@ textarea {
|
|
|
425
409
|
background-color: transparent;
|
|
426
410
|
border: 1px solid rgba(228, 75, 77);
|
|
427
411
|
}
|
|
428
|
-
.chuanyu-button.type-simple-danger:hover {
|
|
412
|
+
.chuanyu-button.type-simple-danger:not(.disabled):hover {
|
|
429
413
|
border: 1px solid rgba(230, 93, 95);
|
|
430
414
|
}
|
|
431
|
-
.chuanyu-button.type-simple-danger:active {
|
|
415
|
+
.chuanyu-button.type-simple-danger:not(.disabled):active {
|
|
432
416
|
background-color: rgba(228, 75, 77, 0.1);
|
|
433
417
|
}
|
|
434
418
|
.chuanyu-button.loading .loading-ico {
|
|
@@ -1067,16 +1051,20 @@ textarea {
|
|
|
1067
1051
|
border-radius: 12px;
|
|
1068
1052
|
border: 1px solid var(--border-color);
|
|
1069
1053
|
}
|
|
1070
|
-
.selector-search-select
|
|
1054
|
+
.selector-search-select.disabled {
|
|
1055
|
+
cursor: not-allowed;
|
|
1056
|
+
opacity: 0.5;
|
|
1057
|
+
}
|
|
1058
|
+
.selector-search-select:not(.disabled):hover {
|
|
1071
1059
|
border-color: var(--border-hover-color);
|
|
1072
1060
|
}
|
|
1073
|
-
.selector-search-select:active,
|
|
1074
|
-
.selector-search-select.active {
|
|
1061
|
+
.selector-search-select:not(.disabled):active,
|
|
1062
|
+
.selector-search-select:not(.disabled).active {
|
|
1075
1063
|
border-color: var(--border-hover-color);
|
|
1076
1064
|
box-shadow: 0 0 0 3px var(--border-active-color);
|
|
1077
1065
|
}
|
|
1078
|
-
.selector-search-select:active .dropdown-icon,
|
|
1079
|
-
.selector-search-select.active .dropdown-icon {
|
|
1066
|
+
.selector-search-select:not(.disabled):active .dropdown-icon,
|
|
1067
|
+
.selector-search-select:not(.disabled).active .dropdown-icon {
|
|
1080
1068
|
transform: translateY(-50%) rotate(180deg);
|
|
1081
1069
|
}
|
|
1082
1070
|
.selector-search-select .selector-search-label {
|
|
@@ -1244,7 +1232,7 @@ body .__react_component_tooltip.type-success {
|
|
|
1244
1232
|
z-index: 100;
|
|
1245
1233
|
pointer-events: none;
|
|
1246
1234
|
border-radius: 10px;
|
|
1247
|
-
background-color: #
|
|
1235
|
+
background-color: #7acc35;
|
|
1248
1236
|
}
|
|
1249
1237
|
body .__react_component_tooltip.type-success.useMaxWidth {
|
|
1250
1238
|
max-width: 160px;
|
|
@@ -1262,16 +1250,16 @@ body .__react_component_tooltip.type-success .user-fullname {
|
|
|
1262
1250
|
vertical-align: middle;
|
|
1263
1251
|
}
|
|
1264
1252
|
body .__react_component_tooltip.type-success.place-right:after {
|
|
1265
|
-
border-right-color: #
|
|
1253
|
+
border-right-color: #7acc35;
|
|
1266
1254
|
}
|
|
1267
1255
|
body .__react_component_tooltip.type-success.place-top:after {
|
|
1268
|
-
border-top-color: #
|
|
1256
|
+
border-top-color: #7acc35;
|
|
1269
1257
|
}
|
|
1270
1258
|
body .__react_component_tooltip.type-success.place-bottom:after {
|
|
1271
|
-
border-bottom-color: #
|
|
1259
|
+
border-bottom-color: #7acc35;
|
|
1272
1260
|
}
|
|
1273
1261
|
body .__react_component_tooltip.type-success.place-left:after {
|
|
1274
|
-
border-left-color: #
|
|
1262
|
+
border-left-color: #7acc35;
|
|
1275
1263
|
}
|
|
1276
1264
|
body .__react_component_tooltip.type-dark {
|
|
1277
1265
|
margin-top: 0;
|
|
@@ -1308,7 +1296,6 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1308
1296
|
border: 2px solid var(--text-tip-color);
|
|
1309
1297
|
cursor: pointer;
|
|
1310
1298
|
transition: 0.3s ease-out all;
|
|
1311
|
-
top: -1px;
|
|
1312
1299
|
}
|
|
1313
1300
|
/*adding a wide width for larger switch text*/
|
|
1314
1301
|
.ui-switch.wide {
|
|
@@ -1324,7 +1311,7 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1324
1311
|
transition: 200ms ease-out all;
|
|
1325
1312
|
}
|
|
1326
1313
|
.ui-switch small::before {
|
|
1327
|
-
content:
|
|
1314
|
+
content: "";
|
|
1328
1315
|
position: absolute;
|
|
1329
1316
|
left: 0;
|
|
1330
1317
|
top: 0;
|
|
@@ -1343,11 +1330,11 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1343
1330
|
.ui-switch.checked small::before {
|
|
1344
1331
|
background-color: var(--color-primary);
|
|
1345
1332
|
}
|
|
1346
|
-
.ui-switch:active small::before {
|
|
1333
|
+
.ui-switch:active:not(.disabled) small::before {
|
|
1347
1334
|
left: 0;
|
|
1348
1335
|
right: -100%;
|
|
1349
1336
|
}
|
|
1350
|
-
.ui-switch.checked:active small::before {
|
|
1337
|
+
.ui-switch.checked:active:not(.disabled) small::before {
|
|
1351
1338
|
right: 0;
|
|
1352
1339
|
left: -100%;
|
|
1353
1340
|
}
|
|
@@ -1365,7 +1352,7 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1365
1352
|
right: 10%;
|
|
1366
1353
|
top: 25%;
|
|
1367
1354
|
z-index: 0;
|
|
1368
|
-
color: #
|
|
1355
|
+
color: #a9a9a9;
|
|
1369
1356
|
}
|
|
1370
1357
|
.ui-switch .on {
|
|
1371
1358
|
display: none;
|
|
@@ -1398,8 +1385,12 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1398
1385
|
cursor: pointer;
|
|
1399
1386
|
}
|
|
1400
1387
|
.kaihei-auth-switch.disabled {
|
|
1388
|
+
opacity: 0.5;
|
|
1401
1389
|
cursor: not-allowed;
|
|
1402
1390
|
}
|
|
1391
|
+
.kaihei-auth-switch:not(.disabled) .auth-status-item:hover {
|
|
1392
|
+
background-color: var(--menu-hover);
|
|
1393
|
+
}
|
|
1403
1394
|
.kaihei-auth-switch .auth-status-item {
|
|
1404
1395
|
flex: 1;
|
|
1405
1396
|
display: flex;
|
|
@@ -1410,9 +1401,6 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1410
1401
|
.kaihei-auth-switch .auth-status-item .xy-iconfont {
|
|
1411
1402
|
font-size: 24px;
|
|
1412
1403
|
}
|
|
1413
|
-
.kaihei-auth-switch .auth-status-item:hover {
|
|
1414
|
-
background-color: var(--menu-hover);
|
|
1415
|
-
}
|
|
1416
1404
|
.kaihei-auth-switch .auth-status-item.close-status {
|
|
1417
1405
|
border-top-left-radius: 8px;
|
|
1418
1406
|
border-bottom-left-radius: 8px;
|
|
@@ -1448,18 +1436,19 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1448
1436
|
position: relative;
|
|
1449
1437
|
border: 1px solid var(--border-color);
|
|
1450
1438
|
border-radius: 12px;
|
|
1439
|
+
padding: 12px 16px;
|
|
1451
1440
|
}
|
|
1452
|
-
.textarea-box.show-max-length
|
|
1453
|
-
padding-
|
|
1441
|
+
.textarea-box.show-max-length {
|
|
1442
|
+
padding-bottom: 30px;
|
|
1454
1443
|
}
|
|
1455
1444
|
.textarea-box textarea {
|
|
1445
|
+
padding: 0;
|
|
1446
|
+
margin: 0;
|
|
1456
1447
|
width: 100%;
|
|
1457
1448
|
height: 70px;
|
|
1458
|
-
padding: 8px 0 0 16px;
|
|
1459
1449
|
border: none;
|
|
1460
1450
|
background-color: initial;
|
|
1461
1451
|
color: inherit;
|
|
1462
|
-
margin-top: 1px;
|
|
1463
1452
|
line-height: 1.5;
|
|
1464
1453
|
resize: none;
|
|
1465
1454
|
}
|
|
@@ -1488,10 +1477,13 @@ body .__react_component_tooltip.type-dark.place-right:after {
|
|
|
1488
1477
|
font-family: "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
|
|
1489
1478
|
position: absolute;
|
|
1490
1479
|
bottom: 7px;
|
|
1491
|
-
right:
|
|
1480
|
+
right: 16px;
|
|
1492
1481
|
font-size: 12px;
|
|
1493
1482
|
color: var(--text-tip-color);
|
|
1494
1483
|
}
|
|
1484
|
+
.textarea-box .footer.error {
|
|
1485
|
+
color: var(--color-error);
|
|
1486
|
+
}
|
|
1495
1487
|
.textarea-box.size-sm {
|
|
1496
1488
|
border-width: 0px;
|
|
1497
1489
|
}
|
package/dist/ui-components.js
CHANGED
|
@@ -2803,7 +2803,7 @@ module.exports = require("react-dom");
|
|
|
2803
2803
|
/* 6 */
|
|
2804
2804
|
/***/ (function(module) {
|
|
2805
2805
|
|
|
2806
|
-
module.exports = JSON.parse("{\"name\":\"@kaiheila/ui-components\",\"version\":\"0.1.
|
|
2806
|
+
module.exports = JSON.parse("{\"name\":\"@kaiheila/ui-components\",\"version\":\"0.1.16\",\"description\":\"开黑啦 UI Components\",\"main\":\"dist/ui-components.js\",\"scripts\":{\"build\":\"webpack\",\"demo\":\"webpack-dev-server --config webpack.config.demo.js\"},\"keywords\":[\"UI\",\"Components\"],\"author\":\"yangchuan\",\"license\":\"ISC\",\"files\":[\"dist\"],\"devDependencies\":{\"@babel/core\":\"^7.15.5\",\"@babel/preset-env\":\"^7.15.6\",\"@babel/preset-react\":\"^7.14.5\",\"@webpack-cli/serve\":\"^1.6.0\",\"babel-loader\":\"^8.2.2\",\"classnames\":\"^2.3.1\",\"css-loader\":\"^2.1.1\",\"html-webpack-plugin\":\"^4.5.2\",\"less\":\"^4.1.2\",\"less-loader\":\"^5.0.0\",\"mini-css-extract-plugin\":\"^0.8.0\",\"prop-types\":\"^15.7.2\",\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\",\"react-tooltip\":\"^4.2.21\",\"style-loader\":\"^1.0.0\",\"url-loader\":\"^2.1.0\",\"webpack\":\"^4.40.2\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.2.1\"},\"peerDependencies\":{\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\"},\"browserslist\":{\"production\":[\">0.2%\",\"not dead\",\"not op_mini all\"],\"development\":[\"last 1 chrome version\",\"last 1 firefox version\",\"last 1 safari version\"]}}");
|
|
2807
2807
|
|
|
2808
2808
|
/***/ }),
|
|
2809
2809
|
/* 7 */
|
|
@@ -4819,7 +4819,8 @@ var search_input_SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
4819
4819
|
_this$props$size = _this$props.size,
|
|
4820
4820
|
size = _this$props$size === void 0 ? '' : _this$props$size,
|
|
4821
4821
|
_this$props$type = _this$props.type,
|
|
4822
|
-
type = _this$props$type === void 0 ? '' : _this$props$type
|
|
4822
|
+
type = _this$props$type === void 0 ? '' : _this$props$type,
|
|
4823
|
+
maxLength = _this$props.maxLength;
|
|
4823
4824
|
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
4824
4825
|
className: external_classnames_default()('search-input', size, type, {
|
|
4825
4826
|
'active': isFocus
|
|
@@ -4827,6 +4828,7 @@ var search_input_SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
4827
4828
|
}, /*#__PURE__*/external_react_default.a.createElement("input", {
|
|
4828
4829
|
ref: this.refInput,
|
|
4829
4830
|
value: value,
|
|
4831
|
+
maxLength: maxLength,
|
|
4830
4832
|
onChange: this.onChange,
|
|
4831
4833
|
onBlur: function onBlur() {
|
|
4832
4834
|
return _this2.onFocusChange(false);
|
|
@@ -6086,10 +6088,12 @@ var selector_search_SelectorSearch = /*#__PURE__*/function (_Component) {
|
|
|
6086
6088
|
filterData = _this$state.filterData,
|
|
6087
6089
|
optionsStyle = _this$state.optionsStyle;
|
|
6088
6090
|
var _this$props2 = this.props,
|
|
6091
|
+
_this$props2$disabled = _this$props2.disabled,
|
|
6092
|
+
disabled = _this$props2$disabled === void 0 ? false : _this$props2$disabled,
|
|
6089
6093
|
placeholder = _this$props2.placeholder,
|
|
6090
6094
|
renderOption = _this$props2.renderOption,
|
|
6091
|
-
_this$props2$
|
|
6092
|
-
disabledValues = _this$props2$
|
|
6095
|
+
_this$props2$disabled2 = _this$props2.disabledValues,
|
|
6096
|
+
disabledValues = _this$props2$disabled2 === void 0 ? [] : _this$props2$disabled2,
|
|
6093
6097
|
_this$props2$labelKey = _this$props2.labelKey,
|
|
6094
6098
|
labelKey = _this$props2$labelKey === void 0 ? 'label' : _this$props2$labelKey,
|
|
6095
6099
|
_this$props2$valueKey = _this$props2.valueKey,
|
|
@@ -6121,7 +6125,8 @@ var selector_search_SelectorSearch = /*#__PURE__*/function (_Component) {
|
|
|
6121
6125
|
className: "selector-search-contain"
|
|
6122
6126
|
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
6123
6127
|
className: external_classnames_default()('selector-search-select theme-input-bg-base', {
|
|
6124
|
-
'active': showList
|
|
6128
|
+
'active': showList,
|
|
6129
|
+
disabled: disabled
|
|
6125
6130
|
}),
|
|
6126
6131
|
ref: this.selectRef,
|
|
6127
6132
|
onClick: this.toggle
|
|
@@ -6873,7 +6878,7 @@ var textarea_Textarea = /*#__PURE__*/function (_Component) {
|
|
|
6873
6878
|
_this.props.onChange && _this.props.onChange(value);
|
|
6874
6879
|
});
|
|
6875
6880
|
|
|
6876
|
-
_this.maxLength =
|
|
6881
|
+
_this.maxLength = 500;
|
|
6877
6882
|
_this.state = {
|
|
6878
6883
|
focus: false,
|
|
6879
6884
|
value: props.value
|
|
@@ -6907,12 +6912,14 @@ var textarea_Textarea = /*#__PURE__*/function (_Component) {
|
|
|
6907
6912
|
size = _this$props$size === void 0 ? '' : _this$props$size,
|
|
6908
6913
|
disabled = _this$props.disabled,
|
|
6909
6914
|
_this$props$themeFocu = _this$props.themeFocus,
|
|
6910
|
-
themeFocus = _this$props$themeFocu === void 0 ? true : _this$props$themeFocu
|
|
6915
|
+
themeFocus = _this$props$themeFocu === void 0 ? true : _this$props$themeFocu,
|
|
6916
|
+
_this$props$maxLength = _this$props.maxLength,
|
|
6917
|
+
maxLength = _this$props$maxLength === void 0 ? this.maxLength : _this$props$maxLength;
|
|
6911
6918
|
var _this$state = this.state,
|
|
6912
6919
|
focus = _this$state.focus,
|
|
6913
6920
|
_this$state$value = _this$state.value,
|
|
6914
6921
|
value = _this$state$value === void 0 ? '' : _this$state$value;
|
|
6915
|
-
var
|
|
6922
|
+
var lengthLimit = value.length >= maxLength;
|
|
6916
6923
|
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
6917
6924
|
className: external_classnames_default()('textarea-box', className, size ? "size-".concat(size) : '', {
|
|
6918
6925
|
'theme-focus': themeFocus && focus,
|
|
@@ -6931,8 +6938,10 @@ var textarea_Textarea = /*#__PURE__*/function (_Component) {
|
|
|
6931
6938
|
onCompositionStart: this.onCompositionStart,
|
|
6932
6939
|
onCompositionEnd: this.onCompositionEnd
|
|
6933
6940
|
}), showMaxLength && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
6934
|
-
className:
|
|
6935
|
-
|
|
6941
|
+
className: external_classnames_default()('footer', {
|
|
6942
|
+
error: lengthLimit
|
|
6943
|
+
})
|
|
6944
|
+
}, value.length, "/", maxLength));
|
|
6936
6945
|
}
|
|
6937
6946
|
}]);
|
|
6938
6947
|
|