@aloudata/aloudata-design 0.4.8-beta.4 → 0.4.8-beta.5
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/Modal/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
var _excluded = ["className", "
|
|
2
|
-
_excluded2 = ["
|
|
1
|
+
var _excluded = ["className", "type", "loading", "size", "disabled", "shape"],
|
|
2
|
+
_excluded2 = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "okText", "cancelText", "icon", "title"],
|
|
3
3
|
_excluded3 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
|
|
4
4
|
_excluded4 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
|
|
5
5
|
_excluded5 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
|
|
6
|
-
_excluded6 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"]
|
|
6
|
+
_excluded6 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
|
|
7
|
+
_excluded7 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"];
|
|
8
|
+
|
|
9
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
10
|
|
|
8
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
12
|
|
|
@@ -11,8 +14,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
11
14
|
|
|
12
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
16
|
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
18
|
|
|
18
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -31,6 +32,7 @@ var DEFAULT_WIDTH = 552;
|
|
|
31
32
|
|
|
32
33
|
function getButtonProps(buttonProps, defaultBtnType, okType) {
|
|
33
34
|
var btnType = okType || defaultBtnType;
|
|
35
|
+
|
|
34
36
|
var buttonClassName = buttonProps.className,
|
|
35
37
|
_buttonProps$type = buttonProps.type,
|
|
36
38
|
type = _buttonProps$type === void 0 ? btnType : _buttonProps$type,
|
|
@@ -39,15 +41,17 @@ function getButtonProps(buttonProps, defaultBtnType, okType) {
|
|
|
39
41
|
size = _buttonProps$size === void 0 ? 'middle' : _buttonProps$size,
|
|
40
42
|
disabled = buttonProps.disabled,
|
|
41
43
|
_buttonProps$shape = buttonProps.shape,
|
|
42
|
-
shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape
|
|
43
|
-
|
|
44
|
+
shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape,
|
|
45
|
+
restProps = _objectWithoutProperties(buttonProps, _excluded);
|
|
46
|
+
|
|
47
|
+
return _objectSpread(_objectSpread({}, restProps), {}, {
|
|
44
48
|
disabled: loading ? true : disabled,
|
|
45
49
|
loading: loading,
|
|
46
50
|
type: getButtonType(type),
|
|
47
51
|
className: classNames(btnPrefix, "".concat(btnPrefix, "-").concat(type), buttonClassName, getButtonSizeClass(size)),
|
|
48
52
|
danger: getDangerStatus(type),
|
|
49
53
|
shape: getShape(shape)
|
|
50
|
-
};
|
|
54
|
+
});
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
var OriginModal = function OriginModal(props) {
|
|
@@ -61,9 +65,13 @@ var OriginModal = function OriginModal(props) {
|
|
|
61
65
|
okButtonProps = _props$okButtonProps === void 0 ? {} : _props$okButtonProps,
|
|
62
66
|
_props$cancelButtonPr = props.cancelButtonProps,
|
|
63
67
|
cancelButtonProps = _props$cancelButtonPr === void 0 ? {} : _props$cancelButtonPr,
|
|
68
|
+
_props$okText = props.okText,
|
|
69
|
+
okText = _props$okText === void 0 ? "确定" : _props$okText,
|
|
70
|
+
_props$cancelText = props.cancelText,
|
|
71
|
+
cancelText = _props$cancelText === void 0 ? "取消" : _props$cancelText,
|
|
64
72
|
icon = props.icon,
|
|
65
73
|
title = props.title,
|
|
66
|
-
restProps = _objectWithoutProperties(props,
|
|
74
|
+
restProps = _objectWithoutProperties(props, _excluded2);
|
|
67
75
|
|
|
68
76
|
return /*#__PURE__*/React.createElement(AntdModal, _extends({}, restProps, {
|
|
69
77
|
title: /*#__PURE__*/React.createElement("div", {
|
|
@@ -78,6 +86,8 @@ var OriginModal = function OriginModal(props) {
|
|
|
78
86
|
className: classNames('ald-modal', className),
|
|
79
87
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
80
88
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
89
|
+
okText: okText,
|
|
90
|
+
cancelText: cancelText,
|
|
81
91
|
width: width || DEFAULT_WIDTH,
|
|
82
92
|
closeIcon: closeIcon || /*#__PURE__*/React.createElement(CloseLLine, {
|
|
83
93
|
size: 16,
|
|
@@ -97,7 +107,7 @@ Modal.info = function infoFn(props) {
|
|
|
97
107
|
cancelButtonProps = _props$cancelButtonPr2 === void 0 ? {} : _props$cancelButtonPr2,
|
|
98
108
|
okType = props.okType,
|
|
99
109
|
width = props.width,
|
|
100
|
-
restProps = _objectWithoutProperties(props,
|
|
110
|
+
restProps = _objectWithoutProperties(props, _excluded3);
|
|
101
111
|
|
|
102
112
|
return AntdModal.success(_objectSpread({
|
|
103
113
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
@@ -119,7 +129,7 @@ Modal.success = function successFn(props) {
|
|
|
119
129
|
cancelButtonProps = _props$cancelButtonPr3 === void 0 ? {} : _props$cancelButtonPr3,
|
|
120
130
|
okType = props.okType,
|
|
121
131
|
width = props.width,
|
|
122
|
-
restProps = _objectWithoutProperties(props,
|
|
132
|
+
restProps = _objectWithoutProperties(props, _excluded4);
|
|
123
133
|
|
|
124
134
|
return AntdModal.success(_objectSpread({
|
|
125
135
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
@@ -141,7 +151,7 @@ Modal.error = function errorFn(props) {
|
|
|
141
151
|
cancelButtonProps = _props$cancelButtonPr4 === void 0 ? {} : _props$cancelButtonPr4,
|
|
142
152
|
okType = props.okType,
|
|
143
153
|
width = props.width,
|
|
144
|
-
restProps = _objectWithoutProperties(props,
|
|
154
|
+
restProps = _objectWithoutProperties(props, _excluded5);
|
|
145
155
|
|
|
146
156
|
return AntdModal.success(_objectSpread({
|
|
147
157
|
okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
|
|
@@ -163,7 +173,7 @@ Modal.warning = function modalWarn(props) {
|
|
|
163
173
|
cancelButtonProps = _props$cancelButtonPr5 === void 0 ? {} : _props$cancelButtonPr5,
|
|
164
174
|
okType = props.okType,
|
|
165
175
|
width = props.width,
|
|
166
|
-
restProps = _objectWithoutProperties(props,
|
|
176
|
+
restProps = _objectWithoutProperties(props, _excluded6);
|
|
167
177
|
|
|
168
178
|
return AntdModal.success(_objectSpread({
|
|
169
179
|
okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
|
|
@@ -185,7 +195,7 @@ Modal.confirm = function confirmFn(props) {
|
|
|
185
195
|
cancelButtonProps = _props$cancelButtonPr6 === void 0 ? {} : _props$cancelButtonPr6,
|
|
186
196
|
okType = props.okType,
|
|
187
197
|
width = props.width,
|
|
188
|
-
restProps = _objectWithoutProperties(props,
|
|
198
|
+
restProps = _objectWithoutProperties(props, _excluded7);
|
|
189
199
|
|
|
190
200
|
return AntdModal.success(_objectSpread({
|
|
191
201
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
@@ -43,8 +43,10 @@ export default function Radio(props) {
|
|
|
43
43
|
} else if (groupContext.type === 'iconButton') {
|
|
44
44
|
if (groupContext.radioGroupStyle === 'filled') {
|
|
45
45
|
otherClass = 'ald-radio-icon-button-wrapper-filled';
|
|
46
|
-
} else {
|
|
46
|
+
} else if (groupContext.radioGroupStyle === 'border') {
|
|
47
47
|
otherClass = 'ald-radio-icon-button-wrapper-border';
|
|
48
|
+
} else {
|
|
49
|
+
otherClass = 'ald-radio-icon-button-wrapper-border-primary';
|
|
48
50
|
}
|
|
49
51
|
} else {
|
|
50
52
|
// 当type未设置或者是radio时
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import '../../style/index.less';
|
|
2
2
|
|
|
3
|
-
@radio-icon-button-padding-large:
|
|
3
|
+
@radio-icon-button-padding-large: 8px;
|
|
4
4
|
@radio-icon-button-padding-middle: 9px;
|
|
5
|
-
@radio-icon-button-padding-small:
|
|
5
|
+
@radio-icon-button-padding-small: 7px;
|
|
6
6
|
@radio-group-height-large: 36px;
|
|
7
7
|
@radio-group-height-middle: 32px;
|
|
8
8
|
@radio-group-height-small: 28px;
|
|
@@ -114,7 +114,9 @@
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.ald-radio-button-wrapper-border-primary,
|
|
117
|
-
.ald-radio-button-wrapper-border
|
|
117
|
+
.ald-radio-button-wrapper-border,
|
|
118
|
+
.ald-radio-icon-button-wrapper-border,
|
|
119
|
+
.ald-radio-icon-button-wrapper-border-primary {
|
|
118
120
|
&.ald-radio-label.ald-radio-wrapper-disabled {
|
|
119
121
|
opacity: 0.5;
|
|
120
122
|
|
|
@@ -191,7 +193,8 @@
|
|
|
191
193
|
|
|
192
194
|
.ald-radio-button-wrapper-border,
|
|
193
195
|
.ald-radio-button-wrapper-border-primary,
|
|
194
|
-
.ald-radio-icon-button-wrapper-border
|
|
196
|
+
.ald-radio-icon-button-wrapper-border,
|
|
197
|
+
.ald-radio-icon-button-wrapper-border-primary {
|
|
195
198
|
position: relative;
|
|
196
199
|
display: flex;
|
|
197
200
|
align-items: center;
|
|
@@ -231,7 +234,8 @@
|
|
|
231
234
|
// button选中状态下的样式
|
|
232
235
|
.ald-radio-wrapper-checked.ald-radio-button-wrapper-border,
|
|
233
236
|
.ald-radio-wrapper-checked.ald-radio-button-wrapper-border-primary,
|
|
234
|
-
.ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-border
|
|
237
|
+
.ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-border,
|
|
238
|
+
.ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-border-primary {
|
|
235
239
|
background: @BG80;
|
|
236
240
|
transition: background 0.5s ease;
|
|
237
241
|
|
|
@@ -242,7 +246,8 @@
|
|
|
242
246
|
}
|
|
243
247
|
}
|
|
244
248
|
|
|
245
|
-
.ald-radio-wrapper-checked.ald-radio-button-wrapper-border-primary
|
|
249
|
+
.ald-radio-wrapper-checked.ald-radio-button-wrapper-border-primary,
|
|
250
|
+
.ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-border-primary {
|
|
246
251
|
background: @B40;
|
|
247
252
|
transition: background 0.5s ease;
|
|
248
253
|
|
|
@@ -310,6 +315,12 @@
|
|
|
310
315
|
&.ald-radio-group-middle {
|
|
311
316
|
height: @radio-group-height-middle;
|
|
312
317
|
|
|
318
|
+
.ald-radio-label {
|
|
319
|
+
.ald-radio-desc {
|
|
320
|
+
font-size: @font-size-middle;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
313
324
|
.ald-radio-icon-button-wrapper-filled {
|
|
314
325
|
padding: 0 @radio-icon-button-padding-middle;
|
|
315
326
|
}
|
|
@@ -319,13 +330,17 @@
|
|
|
319
330
|
padding: 0 @radio-button-padding-middle - 1;
|
|
320
331
|
}
|
|
321
332
|
|
|
322
|
-
.ald-radio-icon-button-wrapper-border
|
|
333
|
+
.ald-radio-icon-button-wrapper-border,
|
|
334
|
+
.ald-radio-icon-button-wrapper-border-primary {
|
|
323
335
|
padding: 0 @radio-icon-button-padding-middle - 1;
|
|
324
|
-
}
|
|
325
336
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
337
|
+
&.ald-radio-label .ald-radio-desc {
|
|
338
|
+
font-size: 14px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&:not(:last-child) {
|
|
342
|
+
padding: 0 @radio-icon-button-padding-middle 0
|
|
343
|
+
@radio-icon-button-padding-middle - 1;
|
|
329
344
|
}
|
|
330
345
|
}
|
|
331
346
|
}
|
|
@@ -333,6 +348,12 @@
|
|
|
333
348
|
&.ald-radio-group-small {
|
|
334
349
|
height: @radio-group-height-small;
|
|
335
350
|
|
|
351
|
+
.ald-radio-label {
|
|
352
|
+
.ald-radio-desc {
|
|
353
|
+
font-size: @font-size-small;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
336
357
|
.ald-radio-icon-button-wrapper-filled {
|
|
337
358
|
padding: 0 @radio-icon-button-padding-small;
|
|
338
359
|
}
|
|
@@ -342,19 +363,24 @@
|
|
|
342
363
|
padding: 0 @radio-button-padding-small - 1;
|
|
343
364
|
}
|
|
344
365
|
|
|
345
|
-
.ald-radio-icon-button-wrapper-border
|
|
366
|
+
.ald-radio-icon-button-wrapper-border,
|
|
367
|
+
.ald-radio-icon-button-wrapper-border-primary {
|
|
346
368
|
padding: 0 @radio-icon-button-padding-small - 1;
|
|
347
|
-
}
|
|
348
369
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
370
|
+
&.ald-radio-label .ald-radio-desc {
|
|
371
|
+
font-size: 14px;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
&:not(:last-child) {
|
|
375
|
+
padding: 0 @radio-icon-button-padding-small 0
|
|
376
|
+
@radio-icon-button-padding-small - 1;
|
|
352
377
|
}
|
|
353
378
|
}
|
|
354
379
|
|
|
355
380
|
.ald-radio-button-wrapper-border,
|
|
356
381
|
.ald-radio-icon-button-wrapper-border,
|
|
357
382
|
.ald-radio-button-wrapper-border-primary,
|
|
383
|
+
.ald-radio-icon-button-wrapper-border-primary,
|
|
358
384
|
.ald-radio-button-wrapper-filled,
|
|
359
385
|
.ald-radio-icon-button-wrapper-filled {
|
|
360
386
|
&:first-of-type {
|
|
@@ -374,6 +400,12 @@
|
|
|
374
400
|
&.ald-radio-group.ald-radio-group-large {
|
|
375
401
|
height: @radio-group-height-large;
|
|
376
402
|
|
|
403
|
+
.ald-radio-label {
|
|
404
|
+
.ald-radio-desc {
|
|
405
|
+
font-size: @font-size-large;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
377
409
|
.ald-radio-icon-button-wrapper-filled {
|
|
378
410
|
padding: 0 @radio-icon-button-padding-large;
|
|
379
411
|
}
|
|
@@ -383,19 +415,24 @@
|
|
|
383
415
|
padding: 0 @radio-button-padding-large - 1;
|
|
384
416
|
}
|
|
385
417
|
|
|
386
|
-
.ald-radio-icon-button-wrapper-border
|
|
418
|
+
.ald-radio-icon-button-wrapper-border,
|
|
419
|
+
.ald-radio-icon-button-wrapper-border-primary {
|
|
387
420
|
padding: 0 @radio-icon-button-padding-large - 1;
|
|
388
|
-
}
|
|
389
421
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
422
|
+
&.ald-radio-label .ald-radio-desc {
|
|
423
|
+
font-size: 20px;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
&:not(:last-child) {
|
|
427
|
+
padding: 0 @radio-icon-button-padding-large 0
|
|
428
|
+
@radio-icon-button-padding-large - 1;
|
|
393
429
|
}
|
|
394
430
|
}
|
|
395
431
|
|
|
396
432
|
.ald-radio-button-wrapper-border,
|
|
397
433
|
.ald-radio-icon-button-wrapper-border,
|
|
398
434
|
.ald-radio-button-wrapper-border-primary,
|
|
435
|
+
.ald-radio-icon-button-wrapper-border-primary,
|
|
399
436
|
.ald-radio-button-wrapper-filled,
|
|
400
437
|
.ald-radio-icon-button-wrapper-filled {
|
|
401
438
|
&:first-of-type {
|