@aloudata/aloudata-design 0.4.8-beta.1 → 0.4.8-beta.11

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.
Files changed (39) hide show
  1. package/dist/Button/index.js +5 -5
  2. package/dist/Button/style/index.less +48 -44
  3. package/dist/Button/style/variables.less +13 -13
  4. package/dist/Checkbox/style/index.less +7 -3
  5. package/dist/DoubleCircleIcon/index.d.ts +1 -0
  6. package/dist/DoubleCircleIcon/index.js +5 -2
  7. package/dist/DoubleCircleIcon/style/index.less +33 -1
  8. package/dist/Dropdown/style/index.less +11 -10
  9. package/dist/Empty/image/SearchSmall.js +5 -0
  10. package/dist/Empty/style/index.less +11 -0
  11. package/dist/Icon/icons.js +32 -0
  12. package/dist/Input/style/index.less +54 -39
  13. package/dist/Menu/style/index.less +73 -2
  14. package/dist/Modal/index.d.ts +4 -1
  15. package/dist/Modal/index.js +178 -67
  16. package/dist/Modal/style/index.less +46 -6
  17. package/dist/Radio/components/Group/index.js +7 -4
  18. package/dist/Radio/components/Radio/index.js +9 -6
  19. package/dist/Radio/interface/radioGroup.d.ts +6 -1
  20. package/dist/Radio/style/index.less +152 -46
  21. package/dist/Select/components/MultipleOption.d.ts +1 -0
  22. package/dist/Select/components/MultipleOption.js +7 -3
  23. package/dist/Select/components/SingleOption.d.ts +1 -0
  24. package/dist/Select/components/SingleOption.js +6 -2
  25. package/dist/Select/index.js +70 -9
  26. package/dist/Select/style/index.less +7 -3
  27. package/dist/Select/style/multiple.less +13 -2
  28. package/dist/Select/style/single.less +12 -1
  29. package/dist/Select/style/status.less +1 -1
  30. package/dist/Table/style/index.less +9 -7
  31. package/dist/Tabs/index.d.ts +15 -0
  32. package/dist/Tabs/index.js +37 -6
  33. package/dist/Tabs/style/index.less +38 -1
  34. package/dist/notification/demo/index.js +24 -7
  35. package/dist/notification/index.d.ts +9 -1
  36. package/dist/notification/index.js +148 -1
  37. package/dist/notification/style/index.less +28 -0
  38. package/dist/style/themes/default/index.less +25 -25
  39. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
  @import '../../Icon/index.less';
3
3
  @import './dropdown.less';
4
4
 
5
- .ald-menu.ant-menu {
5
+ .ant-menu-light.ald-menu.ant-menu {
6
6
  &.ant-menu-root.ant-menu-vertical {
7
7
  border: none;
8
8
  }
@@ -23,7 +23,7 @@
23
23
  transition: none;
24
24
 
25
25
  &:hover {
26
- background-color: @BG90 !important;
26
+ background-color: @BG90;
27
27
  }
28
28
 
29
29
  &:active {
@@ -68,3 +68,74 @@
68
68
  }
69
69
  }
70
70
  }
71
+
72
+ .ant-menu-submenu.ant-menu-submenu-popup.ant-menu{
73
+ .ant-menu-vertical {
74
+ border: none;
75
+ }
76
+
77
+ .ant-menu-item,
78
+ .ant-menu-submenu,
79
+ .ant-menu-item-selected {
80
+ margin: 0;
81
+ height: initial;
82
+ padding: 6px 12px;
83
+ line-height: 20px;
84
+ font-size: 13px;
85
+ width: 100%;
86
+ border-radius: 0;
87
+ border: none;
88
+ background-color: @BG100;
89
+ color: @NL0;
90
+ transition: none;
91
+
92
+ &:hover {
93
+ background-color: @BG90 !important;
94
+ }
95
+
96
+ &:active {
97
+ background-color: none;
98
+ }
99
+
100
+ &:not(.ant-menu-item-selected):active {
101
+ background-color: @BG90;
102
+ }
103
+
104
+ &.ant-menu-item-disabled {
105
+ color: @NL50 !important;
106
+ transition: none;
107
+ background-color: @BG100 !important;
108
+ cursor: default;
109
+ }
110
+
111
+ .ant-menu-submenu-title {
112
+ line-height: 20px;
113
+ font-size: 13px;
114
+ width: 100%;
115
+ padding:0;
116
+ height: initial;
117
+ margin:0;
118
+
119
+ &:hover{
120
+ background: none;
121
+ }
122
+ }
123
+ }
124
+
125
+ .ant-menu.ant-menu-sub{
126
+ padding:4px 0;
127
+ }
128
+
129
+ .ant-menu-title-content{
130
+ line-height: 20px;
131
+ font-size: 13px;
132
+ width: 100%;
133
+ padding:0;
134
+ height: initial;
135
+ margin:0;
136
+
137
+ &:hover{
138
+ background: none;
139
+ }
140
+ }
141
+ }
@@ -16,11 +16,14 @@ export interface ModalProps extends Omit<AntdModalProps, 'okButtonProps' | 'canc
16
16
  cancelButtonProps?: IButtonProps;
17
17
  okButtonProps?: IButtonProps;
18
18
  okType?: ButtonType;
19
+ paddingLess?: boolean;
19
20
  }
20
- export interface ModalFuncProps extends Omit<AntdModalFuncProps, 'okButtonProps' | 'cancelButtonProps' | 'okType'> {
21
+ export interface ModalFuncProps extends Omit<AntdModalFuncProps, 'okButtonProps' | 'cancelButtonProps' | 'okType' | 'icon'> {
21
22
  cancelButtonProps?: IButtonProps;
22
23
  okButtonProps?: IButtonProps;
23
24
  okType?: ButtonType;
25
+ subTitle?: React.ReactNode;
26
+ icon?: React.ReactElement;
24
27
  }
25
28
  declare const OriginModal: IModalInterface;
26
29
  export declare type ModalFunc = (props: ModalFuncProps) => {
@@ -1,9 +1,12 @@
1
- var _excluded = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "icon", "title"],
2
- _excluded2 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
3
- _excluded3 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
4
- _excluded4 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
5
- _excluded5 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"],
6
- _excluded6 = ["icon", "okButtonProps", "cancelButtonProps", "okType", "width"];
1
+ var _excluded = ["className", "type", "loading", "size", "disabled", "shape"],
2
+ _excluded2 = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "okText", "cancelText", "icon", "title", "paddingLess"],
3
+ _excluded3 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
4
+ _excluded4 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
5
+ _excluded5 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
6
+ _excluded6 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
7
+ _excluded7 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "className", "okText", "cancelText"];
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; }
@@ -24,6 +25,7 @@ import useModal from 'antd/lib/modal/useModal/index';
24
25
  import classNames from 'classnames';
25
26
  import React from 'react';
26
27
  import { btnPrefix, getButtonSizeClass, getButtonType, getDangerStatus, getShape } from "../Button";
28
+ import DoubleCircleIcon from "../DoubleCircleIcon";
27
29
  import theme from "../style/themes/default/themeColor.module.less"; // export type { ModalProps, ModalFuncProps };
28
30
 
29
31
  export var destroyFns = [];
@@ -31,6 +33,7 @@ var DEFAULT_WIDTH = 552;
31
33
 
32
34
  function getButtonProps(buttonProps, defaultBtnType, okType) {
33
35
  var btnType = okType || defaultBtnType;
36
+
34
37
  var buttonClassName = buttonProps.className,
35
38
  _buttonProps$type = buttonProps.type,
36
39
  type = _buttonProps$type === void 0 ? btnType : _buttonProps$type,
@@ -39,17 +42,34 @@ function getButtonProps(buttonProps, defaultBtnType, okType) {
39
42
  size = _buttonProps$size === void 0 ? 'middle' : _buttonProps$size,
40
43
  disabled = buttonProps.disabled,
41
44
  _buttonProps$shape = buttonProps.shape,
42
- shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape;
43
- return {
45
+ shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape,
46
+ restProps = _objectWithoutProperties(buttonProps, _excluded);
47
+
48
+ return _objectSpread(_objectSpread({}, restProps), {}, {
44
49
  disabled: loading ? true : disabled,
45
50
  loading: loading,
46
51
  type: getButtonType(type),
47
52
  className: classNames(btnPrefix, "".concat(btnPrefix, "-").concat(type), buttonClassName, getButtonSizeClass(size)),
48
53
  danger: getDangerStatus(type),
49
54
  shape: getShape(shape)
50
- };
55
+ });
51
56
  }
52
57
 
58
+ var ModalTitle = function ModalTitle(_ref) {
59
+ var icon = _ref.icon,
60
+ title = _ref.title,
61
+ subTitle = _ref.subTitle;
62
+ return /*#__PURE__*/React.createElement("div", {
63
+ className: 'ald-modal-title-container'
64
+ }, icon, /*#__PURE__*/React.createElement("div", {
65
+ className: 'ald-modal-text-container'
66
+ }, title && /*#__PURE__*/React.createElement("div", {
67
+ className: 'title'
68
+ }, title), subTitle && /*#__PURE__*/React.createElement("div", {
69
+ className: 'subTitle'
70
+ }, subTitle)));
71
+ };
72
+
53
73
  var OriginModal = function OriginModal(props) {
54
74
  var className = props.className,
55
75
  children = props.children,
@@ -61,26 +81,41 @@ var OriginModal = function OriginModal(props) {
61
81
  okButtonProps = _props$okButtonProps === void 0 ? {} : _props$okButtonProps,
62
82
  _props$cancelButtonPr = props.cancelButtonProps,
63
83
  cancelButtonProps = _props$cancelButtonPr === void 0 ? {} : _props$cancelButtonPr,
84
+ _props$okText = props.okText,
85
+ okText = _props$okText === void 0 ? '确定' : _props$okText,
86
+ _props$cancelText = props.cancelText,
87
+ cancelText = _props$cancelText === void 0 ? '取消' : _props$cancelText,
64
88
  icon = props.icon,
65
89
  title = props.title,
66
- restProps = _objectWithoutProperties(props, _excluded);
90
+ paddingLess = props.paddingLess,
91
+ restProps = _objectWithoutProperties(props, _excluded2);
67
92
 
68
93
  return /*#__PURE__*/React.createElement(AntdModal, _extends({}, restProps, {
69
- title: /*#__PURE__*/React.createElement("div", {
70
- className: 'ald-modal-title-container'
71
- }, icon, /*#__PURE__*/React.createElement("div", {
72
- className: 'ald-modal-text-container'
73
- }, title && /*#__PURE__*/React.createElement("div", {
74
- className: 'title'
75
- }, title), subTitle && /*#__PURE__*/React.createElement("div", {
76
- className: 'subTitle'
77
- }, subTitle))),
78
- className: classNames('ald-modal', className),
94
+ title: ModalTitle({
95
+ icon: icon,
96
+ title: title,
97
+ subTitle: subTitle
98
+ }) // title={
99
+ // <div className={'ald-modal-title-container'}>
100
+ // {icon}
101
+ // <div className={'ald-modal-text-container'}>
102
+ // {title && <div className={'title'}>{title}</div>}
103
+ // {subTitle && <div className={'subTitle'}>{subTitle}</div>}
104
+ // </div>
105
+ // </div>
106
+ // }
107
+ ,
108
+ className: classNames('ald-modal', className, {
109
+ 'ald-modal-padding-less': paddingLess
110
+ }),
79
111
  okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
80
- cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
112
+ cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary'),
113
+ okText: okText,
114
+ cancelText: cancelText,
81
115
  width: width || DEFAULT_WIDTH,
82
116
  closeIcon: closeIcon || /*#__PURE__*/React.createElement(CloseLLine, {
83
117
  size: 16,
118
+ fill: theme.NL40,
84
119
  className: "ald-modal-close"
85
120
  })
86
121
  }), children);
@@ -90,112 +125,188 @@ OriginModal.useModal = useModal;
90
125
  var Modal = OriginModal;
91
126
 
92
127
  Modal.info = function infoFn(props) {
93
- var icon = props.icon,
94
- _props$okButtonProps2 = props.okButtonProps,
128
+ var _props$okButtonProps2 = props.okButtonProps,
95
129
  okButtonProps = _props$okButtonProps2 === void 0 ? {} : _props$okButtonProps2,
96
130
  _props$cancelButtonPr2 = props.cancelButtonProps,
97
131
  cancelButtonProps = _props$cancelButtonPr2 === void 0 ? {} : _props$cancelButtonPr2,
98
132
  okType = props.okType,
99
133
  width = props.width,
100
- restProps = _objectWithoutProperties(props, _excluded2);
134
+ title = props.title,
135
+ subTitle = props.subTitle,
136
+ _props$okText2 = props.okText,
137
+ okText = _props$okText2 === void 0 ? '确定' : _props$okText2,
138
+ _props$cancelText2 = props.cancelText,
139
+ cancelText = _props$cancelText2 === void 0 ? '取消' : _props$cancelText2,
140
+ className = props.className,
141
+ restProps = _objectWithoutProperties(props, _excluded3);
101
142
 
102
- return AntdModal.success(_objectSpread({
143
+ return AntdModal.info(_objectSpread({
103
144
  okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
104
145
  cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
105
146
  width: width || DEFAULT_WIDTH,
106
- icon: icon || /*#__PURE__*/React.createElement(InfoCircleLine, {
107
- size: 16,
108
- fill: theme.B40,
109
- className: "ald-modal-close"
110
- })
147
+ className: classNames('ald-modal', className),
148
+ title: ModalTitle({
149
+ icon: /*#__PURE__*/React.createElement(DoubleCircleIcon, {
150
+ type: "info"
151
+ }, /*#__PURE__*/React.createElement(InfoCircleLine, {
152
+ size: 16,
153
+ fill: theme.B40,
154
+ className: "ald-modal-close"
155
+ })),
156
+ title: title,
157
+ subTitle: subTitle
158
+ }),
159
+ okText: okText,
160
+ cancelText: cancelText
111
161
  }, restProps));
112
162
  };
113
163
 
114
164
  Modal.success = function successFn(props) {
115
- var icon = props.icon,
116
- _props$okButtonProps3 = props.okButtonProps,
165
+ var _props$okButtonProps3 = props.okButtonProps,
117
166
  okButtonProps = _props$okButtonProps3 === void 0 ? {} : _props$okButtonProps3,
118
167
  _props$cancelButtonPr3 = props.cancelButtonProps,
119
168
  cancelButtonProps = _props$cancelButtonPr3 === void 0 ? {} : _props$cancelButtonPr3,
120
169
  okType = props.okType,
121
170
  width = props.width,
122
- restProps = _objectWithoutProperties(props, _excluded3);
171
+ title = props.title,
172
+ subTitle = props.subTitle,
173
+ _props$okText3 = props.okText,
174
+ okText = _props$okText3 === void 0 ? '确定' : _props$okText3,
175
+ _props$cancelText3 = props.cancelText,
176
+ cancelText = _props$cancelText3 === void 0 ? '取消' : _props$cancelText3,
177
+ className = props.className,
178
+ restProps = _objectWithoutProperties(props, _excluded4);
123
179
 
124
180
  return AntdModal.success(_objectSpread({
125
181
  okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
126
182
  cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
127
183
  width: width || DEFAULT_WIDTH,
128
- icon: icon || /*#__PURE__*/React.createElement(CheckCircleDuotone, {
129
- fill: [theme.SA40, theme.ND0],
130
- size: 16,
131
- theme: "multi-color"
132
- })
184
+ className: classNames('ald-modal', className),
185
+ title: ModalTitle({
186
+ icon: /*#__PURE__*/React.createElement(DoubleCircleIcon, {
187
+ type: "success"
188
+ }, /*#__PURE__*/React.createElement(CheckCircleDuotone, {
189
+ fill: [theme.SA40, theme.ND0],
190
+ size: 16,
191
+ theme: "multi-color"
192
+ })),
193
+ title: title,
194
+ subTitle: subTitle
195
+ }),
196
+ okText: okText,
197
+ cancelText: cancelText
133
198
  }, restProps));
134
199
  };
135
200
 
136
201
  Modal.error = function errorFn(props) {
137
- var icon = props.icon,
138
- _props$okButtonProps4 = props.okButtonProps,
202
+ var _props$okButtonProps4 = props.okButtonProps,
139
203
  okButtonProps = _props$okButtonProps4 === void 0 ? {} : _props$okButtonProps4,
140
204
  _props$cancelButtonPr4 = props.cancelButtonProps,
141
205
  cancelButtonProps = _props$cancelButtonPr4 === void 0 ? {} : _props$cancelButtonPr4,
142
206
  okType = props.okType,
143
207
  width = props.width,
144
- restProps = _objectWithoutProperties(props, _excluded4);
208
+ title = props.title,
209
+ subTitle = props.subTitle,
210
+ _props$okText4 = props.okText,
211
+ okText = _props$okText4 === void 0 ? '确定' : _props$okText4,
212
+ _props$cancelText4 = props.cancelText,
213
+ cancelText = _props$cancelText4 === void 0 ? '取消' : _props$cancelText4,
214
+ className = props.className,
215
+ restProps = _objectWithoutProperties(props, _excluded5);
145
216
 
146
- return AntdModal.success(_objectSpread({
217
+ return AntdModal.error(_objectSpread({
147
218
  okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
148
219
  cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
149
220
  width: width || DEFAULT_WIDTH,
150
- icon: icon || /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
151
- fill: [theme.SC40, theme.ND0],
152
- size: 16,
153
- theme: "multi-color"
154
- })
221
+ className: classNames('ald-modal', className),
222
+ title: ModalTitle({
223
+ icon: /*#__PURE__*/React.createElement(DoubleCircleIcon, {
224
+ type: "error"
225
+ }, /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
226
+ fill: [theme.SC40, theme.ND0],
227
+ size: 16,
228
+ theme: "multi-color"
229
+ })),
230
+ title: title,
231
+ subTitle: subTitle
232
+ }),
233
+ okText: okText,
234
+ cancelText: cancelText
155
235
  }, restProps));
156
236
  };
157
237
 
158
238
  Modal.warning = function modalWarn(props) {
159
- var icon = props.icon,
160
- _props$okButtonProps5 = props.okButtonProps,
239
+ var _props$okButtonProps5 = props.okButtonProps,
161
240
  okButtonProps = _props$okButtonProps5 === void 0 ? {} : _props$okButtonProps5,
162
241
  _props$cancelButtonPr5 = props.cancelButtonProps,
163
242
  cancelButtonProps = _props$cancelButtonPr5 === void 0 ? {} : _props$cancelButtonPr5,
164
243
  okType = props.okType,
165
244
  width = props.width,
166
- restProps = _objectWithoutProperties(props, _excluded5);
245
+ title = props.title,
246
+ subTitle = props.subTitle,
247
+ _props$okText5 = props.okText,
248
+ okText = _props$okText5 === void 0 ? '确定' : _props$okText5,
249
+ _props$cancelText5 = props.cancelText,
250
+ cancelText = _props$cancelText5 === void 0 ? '取消' : _props$cancelText5,
251
+ className = props.className,
252
+ restProps = _objectWithoutProperties(props, _excluded6);
167
253
 
168
- return AntdModal.success(_objectSpread({
254
+ return AntdModal.warning(_objectSpread({
169
255
  okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
170
256
  cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
171
257
  width: width || DEFAULT_WIDTH,
172
- icon: icon || /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
173
- fill: [theme.SB40, theme.ND0],
174
- theme: "multi-color",
175
- size: 16
176
- })
258
+ // className: classNames('ald-modal-warning', className),
259
+ className: classNames('ald-modal ald-modal-warning', className),
260
+ title: ModalTitle({
261
+ icon: /*#__PURE__*/React.createElement(DoubleCircleIcon, {
262
+ type: "warning"
263
+ }, /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
264
+ fill: [theme.SB40, theme.ND0],
265
+ theme: "multi-color",
266
+ size: 16
267
+ })),
268
+ title: title,
269
+ subTitle: subTitle
270
+ }),
271
+ okText: okText,
272
+ cancelText: cancelText
177
273
  }, restProps));
178
274
  };
179
275
 
180
276
  Modal.confirm = function confirmFn(props) {
181
- var icon = props.icon,
182
- _props$okButtonProps6 = props.okButtonProps,
277
+ var _props$okButtonProps6 = props.okButtonProps,
183
278
  okButtonProps = _props$okButtonProps6 === void 0 ? {} : _props$okButtonProps6,
184
279
  _props$cancelButtonPr6 = props.cancelButtonProps,
185
280
  cancelButtonProps = _props$cancelButtonPr6 === void 0 ? {} : _props$cancelButtonPr6,
186
281
  okType = props.okType,
187
282
  width = props.width,
188
- restProps = _objectWithoutProperties(props, _excluded6);
283
+ title = props.title,
284
+ subTitle = props.subTitle,
285
+ className = props.className,
286
+ _props$okText6 = props.okText,
287
+ okText = _props$okText6 === void 0 ? '确定' : _props$okText6,
288
+ _props$cancelText6 = props.cancelText,
289
+ cancelText = _props$cancelText6 === void 0 ? '取消' : _props$cancelText6,
290
+ restProps = _objectWithoutProperties(props, _excluded7);
189
291
 
190
- return AntdModal.success(_objectSpread({
292
+ return AntdModal.confirm(_objectSpread({
191
293
  okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
192
294
  cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
193
295
  width: width || DEFAULT_WIDTH,
194
- icon: icon || /*#__PURE__*/React.createElement(InfoCircleLine, {
195
- size: 16,
196
- fill: theme.SB40,
197
- className: "ald-modal-close"
198
- })
296
+ className: classNames('ald-modal', className),
297
+ title: ModalTitle({
298
+ icon: /*#__PURE__*/React.createElement(DoubleCircleIcon, {
299
+ type: "info"
300
+ }, /*#__PURE__*/React.createElement(InfoCircleLine, {
301
+ size: 16,
302
+ fill: theme.B40,
303
+ className: "ald-modal-close"
304
+ })),
305
+ title: title,
306
+ subTitle: subTitle
307
+ }),
308
+ okText: okText,
309
+ cancelText: cancelText
199
310
  }, restProps));
200
311
  };
201
312
 
@@ -17,9 +17,10 @@
17
17
  .ald-modal-title-container {
18
18
  display: flex;
19
19
  align-items: center;
20
+ gap: 12px;
20
21
 
21
22
  .ald-modal-text-container {
22
- margin-left: 12px;
23
+ // margin-left: 12px;
23
24
  flex: 1;
24
25
  }
25
26
 
@@ -61,12 +62,21 @@
61
62
  font-size: 13px;
62
63
  }
63
64
 
64
- .ant-modal-footer{
65
+ .ant-modal-footer {
65
66
  .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
66
67
  margin-bottom: 0;
67
68
  margin-inline-start: 12px;
68
69
  }
69
- }
70
+ }
71
+
72
+ }
73
+
74
+ .ald-modal-padding-less{
75
+ .ant-modal-content {
76
+ .ant-modal-body{
77
+ margin: 0 -24px;
78
+ }
79
+ }
70
80
  }
71
81
 
72
82
  .ant-modal-confirm {
@@ -75,15 +85,45 @@
75
85
  flex: 1;
76
86
  overflow: initial;
77
87
  margin-inline-start: 12px;
78
-
88
+
79
89
  & + .ant-modal-confirm-content {
80
90
  margin-block-start: 16px;
81
- margin-left:28px;
91
+ margin-left: 28px;
82
92
  }
83
93
  }
94
+
84
95
  }
85
96
 
86
- .ant-modal-confirm-btns{
97
+ .ant-modal-confirm-body{
98
+ display: block;
99
+
100
+ > span.anticon{
101
+ display: none;
102
+
103
+ +.ant-modal-confirm-title+.ant-modal-confirm-content{
104
+ margin-left: 0;
105
+ margin-top: 16px;
106
+ }
107
+ }
108
+ }
109
+
110
+ .ant-modal-confirm-btns {
87
111
  margin-block-start: 16px;
88
112
  }
89
113
  }
114
+
115
+ .ald-modal-warning {
116
+ .ant-modal-confirm-btns {
117
+ .ald-btn {
118
+ background-color: @SB40;
119
+ border-color: @SB40;
120
+
121
+ &:hover,
122
+ &:active,
123
+ &:focus {
124
+ background-color: @SB40;
125
+ border-color: @SB40;
126
+ }
127
+ }
128
+ }
129
+ }
@@ -12,9 +12,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
12
12
 
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
 
15
- import React, { createContext, useRef } from 'react';
16
- import useMergedState from 'rc-util/lib/hooks/useMergedState';
17
15
  import classNames from 'classnames';
16
+ import useMergedState from 'rc-util/lib/hooks/useMergedState';
17
+ import React, { createContext, useRef } from 'react';
18
18
  export var RadioGroupContext = /*#__PURE__*/createContext({});
19
19
  export default function RadioGroup(props) {
20
20
  var children = props.children,
@@ -24,7 +24,9 @@ export default function RadioGroup(props) {
24
24
  size = _props$size === void 0 ? 'middle' : _props$size,
25
25
  _props$type = props.type,
26
26
  type = _props$type === void 0 ? 'radio' : _props$type,
27
- className = props.className; // 滑块的ref
27
+ className = props.className,
28
+ _props$disabled = props.disabled,
29
+ disabled = _props$disabled === void 0 ? false : _props$disabled; // 滑块的ref
28
30
 
29
31
  var sliderRef = useRef(null); // 该hooks与useState相同,但是当props中有value值时,优先使用value的值
30
32
 
@@ -63,7 +65,8 @@ export default function RadioGroup(props) {
63
65
  radioGroupStyle: radioGroupStyle,
64
66
  size: size,
65
67
  type: type,
66
- sliderRef: sliderRef
68
+ sliderRef: sliderRef,
69
+ disabled: disabled
67
70
  }
68
71
  }, /*#__PURE__*/React.createElement("div", {
69
72
  className: getWrapperClass()
@@ -5,10 +5,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  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; }
6
6
 
7
7
  import classNames from 'classnames';
8
- import React, { useContext, useEffect, useRef } from 'react';
9
8
  import _ from 'lodash';
10
- import { RadioGroupContext } from "../Group";
9
+ import React, { useContext, useEffect, useRef } from 'react';
11
10
  import { getUUID } from "../../../_utils/hooks/useId";
11
+ import { RadioGroupContext } from "../Group";
12
12
  export default function Radio(props) {
13
13
  var groupContext = useContext(RadioGroupContext);
14
14
  var labelRef = useRef(null);
@@ -17,7 +17,7 @@ export default function Radio(props) {
17
17
  var radioProps = _objectSpread({}, props);
18
18
 
19
19
  if (!_.isEmpty(groupContext)) {
20
- radioProps.disabled = props.disabled;
20
+ radioProps.disabled = groupContext.disabled || props.disabled;
21
21
  radioProps.checked = !props.disabled && groupContext.value === props.value;
22
22
  } else {
23
23
  radioProps.checked = !('checked' in props) ? props.defaultChecked : radioProps.checked;
@@ -35,14 +35,18 @@ export default function Radio(props) {
35
35
  if (groupContext.type === 'button') {
36
36
  if (groupContext.radioGroupStyle === 'filled') {
37
37
  otherClass = 'ald-radio-button-wrapper-filled';
38
- } else {
38
+ } else if (groupContext.radioGroupStyle === 'border') {
39
39
  otherClass = 'ald-radio-button-wrapper-border';
40
+ } else {
41
+ otherClass = 'ald-radio-button-wrapper-border-primary';
40
42
  }
41
43
  } else if (groupContext.type === 'iconButton') {
42
44
  if (groupContext.radioGroupStyle === 'filled') {
43
45
  otherClass = 'ald-radio-icon-button-wrapper-filled';
44
- } else {
46
+ } else if (groupContext.radioGroupStyle === 'border') {
45
47
  otherClass = 'ald-radio-icon-button-wrapper-border';
48
+ } else {
49
+ otherClass = 'ald-radio-icon-button-wrapper-border-primary';
46
50
  }
47
51
  } else {
48
52
  // 当type未设置或者是radio时
@@ -67,7 +71,6 @@ export default function Radio(props) {
67
71
 
68
72
  var onChange = function onChange() {
69
73
  if (groupContext !== null && groupContext !== void 0 && groupContext.onChange) {
70
- // console.log(e);
71
74
  // input事件的value会被toString,所以此处进行一个覆盖
72
75
  groupContext.onChange(props.value);
73
76
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export declare type TRadioGroupStyle = 'border' | 'filled';
2
+ export declare type TRadioGroupStyle = 'border' | 'filled' | 'borderPrimary';
3
3
  export declare type TRadioSize = 'large' | 'middle' | 'small' | 'default';
4
4
  export declare type TRadioType = 'radio' | 'button' | 'iconButton';
5
5
  export interface IRadioGroupProps {
@@ -13,6 +13,11 @@ export interface IRadioGroupProps {
13
13
  * @default -
14
14
  */
15
15
  defaultValue?: any;
16
+ /**
17
+ * @description 整组禁用
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
16
21
  /**
17
22
  * @description 设置按钮组的大小,有'large' | 'middle'('default') | 'small
18
23
  * @default 'middle'