@chaoswise/ui 3.1.0 → 3.1.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/lib/Antd5/app/style/index.js +2 -1
- package/lib/Antd5/breadcrumb/style/index.js +1 -1
- package/lib/Antd5/checkbox/Checkbox.js +33 -5
- package/lib/Antd5/checkbox/Group.js +7 -2
- package/lib/Antd5/checkbox/assets/duigou1.js +29 -0
- package/lib/Antd5/checkbox/assets/duigou2.js +29 -0
- package/lib/Antd5/checkbox/style/index.js +106 -3
- package/lib/Antd5/message/PurePanel.js +40 -22
- package/lib/Antd5/message/assets/Close.js +22 -0
- package/lib/Antd5/message/style/index.js +47 -8
- package/lib/Antd5/message/useMessage.js +15 -3
- package/lib/Antd5/radio/radio.js +4 -10
- package/lib/Antd5/radio/style/index.js +65 -80
- package/lib/Antd5/upload/Upload.js +83 -55
- package/lib/Antd5/upload/UploadList/ListItem.js +9 -15
- package/lib/Antd5/upload/UploadList/index.js +47 -33
- package/lib/Antd5/upload/style/dragger.js +26 -5
- package/lib/Antd5/upload/style/list.js +7 -2
- package/lib/AppHolder/index.js +2 -1
- package/lib/CWColorPicker/index.js +8 -4
- package/lib/CWTree/index.js +13 -6
- package/lib/ConfigProvider/ConfigProvider.js +2 -0
- package/lib/ConfigProvider/theme/default.js +9 -2
- package/lib/Header/UserSetting/TenantTree.js +0 -1
- package/lib/Pagination/index.style.js +1 -1
- package/lib/SiderMenu/index.style.js +4 -2
- package/lib/Slider/index.style.js +2 -1
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
14
14
|
color: colorText,
|
|
15
15
|
fontSize: fontSize,
|
|
16
16
|
lineHeight: lineHeight,
|
|
17
|
-
fontFamily: fontFamily
|
|
17
|
+
fontFamily: fontFamily,
|
|
18
|
+
height: "100%"
|
|
18
19
|
}, "&".concat(componentCls, "-rtl"), {
|
|
19
20
|
direction: 'rtl'
|
|
20
21
|
}));
|
|
@@ -34,7 +34,7 @@ var genBreadcrumbStyle = function genBreadcrumbStyle(token) {
|
|
|
34
34
|
color: token.linkHoverColor,
|
|
35
35
|
backgroundColor: token.colorBgTextHover
|
|
36
36
|
}
|
|
37
|
-
}, genFocusStyle(token))),
|
|
37
|
+
}, genFocusStyle(token))), "li:last-child", {
|
|
38
38
|
color: token.lastItemColor
|
|
39
39
|
}), "".concat(componentCls, "-separator"), {
|
|
40
40
|
marginInline: token.separatorMargin,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled", "type", "render", "option"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
14
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import RcCheckbox from 'rc-checkbox';
|
|
@@ -27,6 +27,10 @@ import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
|
27
27
|
import { FormItemInputContext } from '../form/context';
|
|
28
28
|
import GroupContext from './GroupContext';
|
|
29
29
|
import useStyle from './style';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import Duigou01 from "./assets/duigou1";
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import Duigou02 from "./assets/duigou2";
|
|
30
34
|
var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
31
35
|
var _ref;
|
|
32
36
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -41,12 +45,16 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
41
45
|
_props$skipGroup = props.skipGroup,
|
|
42
46
|
skipGroup = _props$skipGroup === void 0 ? false : _props$skipGroup,
|
|
43
47
|
disabled = props.disabled,
|
|
48
|
+
type = props.type,
|
|
49
|
+
render = props.render,
|
|
50
|
+
option = props.option,
|
|
44
51
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
45
52
|
var _React$useContext = React.useContext(ConfigContext),
|
|
46
53
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
47
54
|
direction = _React$useContext.direction,
|
|
48
55
|
checkbox = _React$useContext.checkbox;
|
|
49
56
|
var checkboxGroup = React.useContext(GroupContext);
|
|
57
|
+
var newTypeExist = type == "checkbox_" ? true : false;
|
|
50
58
|
var _React$useContext2 = React.useContext(FormItemInputContext),
|
|
51
59
|
isFormItemInput = _React$useContext2.isFormItemInput;
|
|
52
60
|
var contextDisabled = React.useContext(DisabledContext);
|
|
@@ -103,8 +111,15 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
103
111
|
checkboxProps.name = checkboxGroup.name;
|
|
104
112
|
checkboxProps.checked = checkboxGroup.value.includes(restProps.value);
|
|
105
113
|
}
|
|
106
|
-
var classString = classNames("".concat(prefixCls, "-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-wrapper-checked"), checkboxProps.checked), "".concat(prefixCls, "-wrapper-disabled"), mergedDisabled), "".concat(prefixCls, "-wrapper-in-form-item"), isFormItemInput), checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, cssVarCls, rootCls, hashId);
|
|
114
|
+
var classString = classNames("".concat(prefixCls, "-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-wrapper-checked"), checkboxProps.checked), "".concat(prefixCls, "-wrapper-disabled"), mergedDisabled), "".concat(prefixCls, "-wrapper-in-form-item"), isFormItemInput), "".concat(prefixCls, "-checkbox_-wrapper"), newTypeExist), "".concat(prefixCls, "-checkbox_-wrapper-checked"), checkboxProps.checked && newTypeExist), "".concat(prefixCls, "-checkbox_-wrapper-disabled"), mergedDisabled && newTypeExist), "".concat(prefixCls, "-checkbox_-wrapper-custom"), render), checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, cssVarCls, rootCls, hashId);
|
|
107
115
|
var checkboxClass = classNames(_defineProperty({}, "".concat(prefixCls, "-indeterminate"), indeterminate), TARGET_CLS, hashId);
|
|
116
|
+
function renderImg() {
|
|
117
|
+
return checkboxProps.checked ? checkboxProps.disabled ? _jsx(Duigou02, {
|
|
118
|
+
className: "".concat(prefixCls, "-content-img")
|
|
119
|
+
}) : _jsx(Duigou01, {
|
|
120
|
+
className: "".concat(prefixCls, "-content-img")
|
|
121
|
+
}) : null;
|
|
122
|
+
}
|
|
108
123
|
return wrapCSSVar(_jsx(Wave, {
|
|
109
124
|
component: "Checkbox",
|
|
110
125
|
disabled: mergedDisabled,
|
|
@@ -118,9 +133,22 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
118
133
|
className: checkboxClass,
|
|
119
134
|
disabled: mergedDisabled,
|
|
120
135
|
ref: mergedRef
|
|
121
|
-
})),
|
|
136
|
+
})), newTypeExist ? render ? _jsxs("div", {
|
|
137
|
+
children: [render(option), " ", renderImg()]
|
|
138
|
+
}) : _jsxs(_Fragment, {
|
|
139
|
+
children: [_jsxs("div", {
|
|
140
|
+
className: "".concat(prefixCls, "-content"),
|
|
141
|
+
children: [_jsx("p", {
|
|
142
|
+
className: classNames("".concat(prefixCls, "-content-title"), _defineProperty({}, "".concat(prefixCls, "-content-no-title"), !(children || option !== null && option !== void 0 && option.label))),
|
|
143
|
+
children: children ? children : option !== null && option !== void 0 && option.label ? option === null || option === void 0 ? void 0 : option.label : null
|
|
144
|
+
}), (option === null || option === void 0 ? void 0 : option.describe) && _jsx("div", {
|
|
145
|
+
className: "".concat(prefixCls, "-content-description"),
|
|
146
|
+
children: option === null || option === void 0 ? void 0 : option.describe
|
|
147
|
+
})]
|
|
148
|
+
}), renderImg()]
|
|
149
|
+
}) : children !== undefined ? _jsx("span", {
|
|
122
150
|
children: children
|
|
123
|
-
})]
|
|
151
|
+
}) : null]
|
|
124
152
|
})
|
|
125
153
|
}));
|
|
126
154
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"];
|
|
2
|
+
var _excluded = ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange", "type", "render"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -36,6 +36,8 @@ var CheckboxGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36
36
|
rootClassName = props.rootClassName,
|
|
37
37
|
style = props.style,
|
|
38
38
|
onChange = props.onChange,
|
|
39
|
+
type = props.type,
|
|
40
|
+
render = props.render,
|
|
39
41
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
40
42
|
var _React$useContext = React.useContext(ConfigContext),
|
|
41
43
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -120,6 +122,9 @@ var CheckboxGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
120
122
|
title: option.title,
|
|
121
123
|
id: option.id,
|
|
122
124
|
required: option.required,
|
|
125
|
+
type: type,
|
|
126
|
+
option: option,
|
|
127
|
+
render: render,
|
|
123
128
|
children: option.label
|
|
124
129
|
}, option.value.toString());
|
|
125
130
|
}) : children;
|
|
@@ -132,7 +137,7 @@ var CheckboxGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
132
137
|
registerValue: registerValue,
|
|
133
138
|
cancelValue: cancelValue
|
|
134
139
|
};
|
|
135
|
-
var classString = classNames(groupPrefixCls, _defineProperty({}, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, cssVarCls, rootCls, hashId);
|
|
140
|
+
var classString = classNames(groupPrefixCls, _defineProperty(_defineProperty({}, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), "".concat(groupPrefixCls, "-").concat(type), type === "checkbox_"), className, rootClassName, cssVarCls, rootCls, hashId);
|
|
136
141
|
return wrapCSSVar(_jsx("div", _objectSpread(_objectSpread({
|
|
137
142
|
className: classString,
|
|
138
143
|
style: style
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { useToken } from "../../theme/internal";
|
|
10
|
+
var SvgDuigou1 = function SvgDuigou1(props) {
|
|
11
|
+
var _useToken = useToken(),
|
|
12
|
+
_useToken2 = _slicedToArray(_useToken, 2),
|
|
13
|
+
token = _useToken2[1];
|
|
14
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
19
|
+
fill: "none",
|
|
20
|
+
fillRule: "evenodd"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
d: "M24 0v22a2 2 0 0 1-2 2H0l.003-.397C.215 10.531 10.878 0 24 0Z",
|
|
23
|
+
fill: token["colorPrimary"]
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
d: "m19.07 10.856-6.089 6.639a.623.623 0 0 1-.885 0L8.731 14.12a.625.625 0 0 1 .885-.882l2.923 2.93 5.646-6.195a.624.624 0 1 1 .885.883Z",
|
|
26
|
+
fill: token["colorWhite"]
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
export default SvgDuigou1;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { useToken } from "../../theme/internal";
|
|
10
|
+
var SvgDuigou2 = function SvgDuigou2(props) {
|
|
11
|
+
var _useToken = useToken(),
|
|
12
|
+
_useToken2 = _slicedToArray(_useToken, 2),
|
|
13
|
+
token = _useToken2[1];
|
|
14
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
19
|
+
fill: "none",
|
|
20
|
+
fillRule: "evenodd"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
d: "M24 0v22a2 2 0 0 1-2 2H0l.003-.397C.215 10.531 10.878 0 24 0Z",
|
|
23
|
+
fill: token["colorPrimaryBorder"]
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
d: "m19.07 10.856-6.089 6.639a.623.623 0 0 1-.885 0L8.731 14.12a.625.625 0 0 1 .885-.882l2.923 2.93 5.646-6.195a.624.624 0 1 1 .885.883Z",
|
|
26
|
+
fill: token["colorWhite"]
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
export default SvgDuigou2;
|
|
@@ -148,6 +148,109 @@ export var genCheckboxStyle = function genCheckboxStyle(token) {
|
|
|
148
148
|
background: token.colorTextDisabled
|
|
149
149
|
}))];
|
|
150
150
|
};
|
|
151
|
+
// Styles from checkbox-card
|
|
152
|
+
var getCheckboxCardStyle = function getCheckboxCardStyle(token) {
|
|
153
|
+
var componentCls = token.componentCls,
|
|
154
|
+
borderRadius = token.borderRadius,
|
|
155
|
+
colorBgContainer = token.colorBgContainer,
|
|
156
|
+
lineWidth = token.lineWidth,
|
|
157
|
+
lineType = token.lineType,
|
|
158
|
+
colorPrimary = token.colorPrimary,
|
|
159
|
+
colorPrimaryHover = token.colorPrimaryHover,
|
|
160
|
+
colorPrimaryBorder = token.colorPrimaryBorder,
|
|
161
|
+
colorBorder = token.colorBorder,
|
|
162
|
+
colorTextDisabled = token.colorTextDisabled,
|
|
163
|
+
colorTextSecondary = token.colorTextSecondary,
|
|
164
|
+
colorTextDescription = token.colorTextDescription;
|
|
165
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-group"), _defineProperty({}, "&".concat(componentCls, "-group-checkbox_"), {
|
|
166
|
+
display: "flex",
|
|
167
|
+
flexWrap: "wrap"
|
|
168
|
+
})), "".concat(componentCls, "-wrapper").concat(componentCls, "-checkbox_-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
169
|
+
cursor: "pointer",
|
|
170
|
+
width: "242px",
|
|
171
|
+
height: "100%",
|
|
172
|
+
background: colorBgContainer,
|
|
173
|
+
display: "flex",
|
|
174
|
+
padding: "15px 23px",
|
|
175
|
+
border: "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(colorBorder),
|
|
176
|
+
whiteSpace: "normal",
|
|
177
|
+
marginRight: "16px",
|
|
178
|
+
marginBottom: "12px",
|
|
179
|
+
boxSizing: "border-box",
|
|
180
|
+
borderRadius: borderRadius
|
|
181
|
+
}, "&:hover:not(".concat(componentCls, "-checkbox_-wrapper-disabled):not(").concat(componentCls, "-checkbox_-wrapper-checked)"), {
|
|
182
|
+
border: "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(colorPrimaryHover)
|
|
183
|
+
}), "&:after", {
|
|
184
|
+
height: 0,
|
|
185
|
+
overflow: "hidden"
|
|
186
|
+
}), "> ".concat(componentCls), _defineProperty({
|
|
187
|
+
display: "block",
|
|
188
|
+
width: 0,
|
|
189
|
+
height: 0,
|
|
190
|
+
"&-checked::after": {
|
|
191
|
+
width: 0,
|
|
192
|
+
height: 0,
|
|
193
|
+
border: 0
|
|
194
|
+
},
|
|
195
|
+
"&+*": {
|
|
196
|
+
padding: 0
|
|
197
|
+
}
|
|
198
|
+
}, "".concat(componentCls, "-inner, input[type='checkbox']"), {
|
|
199
|
+
width: 0,
|
|
200
|
+
height: 0,
|
|
201
|
+
opacity: 0,
|
|
202
|
+
border: 0,
|
|
203
|
+
pointerEvents: "none"
|
|
204
|
+
})), "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty({
|
|
205
|
+
display: "flex",
|
|
206
|
+
flexDirection: "column"
|
|
207
|
+
}, "".concat(componentCls, "-content-title"), {
|
|
208
|
+
fontSize: "16px",
|
|
209
|
+
height: "24px",
|
|
210
|
+
lineHeight: "24px",
|
|
211
|
+
marginBottom: 0,
|
|
212
|
+
fontWeight: 500,
|
|
213
|
+
color: colorTextSecondary,
|
|
214
|
+
overflow: "hidden"
|
|
215
|
+
}), "".concat(componentCls, "-content-description"), {
|
|
216
|
+
fontSize: "12px",
|
|
217
|
+
color: colorTextDescription,
|
|
218
|
+
marginTop: "8px",
|
|
219
|
+
flex: 1,
|
|
220
|
+
whiteSpace: "normal",
|
|
221
|
+
lineHeight: "20px"
|
|
222
|
+
}), "".concat(componentCls, "-content-no-title"), _defineProperty({
|
|
223
|
+
height: 0
|
|
224
|
+
}, "&+".concat(componentCls, "-content-description"), {
|
|
225
|
+
marginTop: 0
|
|
226
|
+
})))), "".concat(componentCls, "-wrapper").concat(componentCls, "-checkbox_-wrapper-checked"), _defineProperty({
|
|
227
|
+
position: "relative"
|
|
228
|
+
}, "".concat(componentCls, "-content-img"), {
|
|
229
|
+
position: "absolute",
|
|
230
|
+
bottom: "-1px",
|
|
231
|
+
right: "-1px",
|
|
232
|
+
width: "24px",
|
|
233
|
+
height: "24px"
|
|
234
|
+
})), "".concat(componentCls, "-wrapper").concat(componentCls, "-checkbox_-wrapper-checked:not(").concat(componentCls, "-checkbox_-wrapper-disabled)"), {
|
|
235
|
+
border: "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(colorPrimary)
|
|
236
|
+
}), "".concat(componentCls, "-wrapper").concat(componentCls, "-checkbox_-wrapper-disabled:not(").concat(componentCls, "-checkbox_-wrapper-checked)"), _defineProperty({
|
|
237
|
+
border: "".concat(unit(lineWidth), " ").concat(lineType, " rgba(0, 0, 0, 0.09)"),
|
|
238
|
+
cursor: "not-allowed"
|
|
239
|
+
}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-content-title"), {
|
|
240
|
+
color: colorTextDisabled
|
|
241
|
+
}), "".concat(componentCls, "-content-description"), {
|
|
242
|
+
color: colorTextDisabled
|
|
243
|
+
}))), "".concat(componentCls, "-wrapper").concat(componentCls, "-checkbox_-wrapper-checked").concat(componentCls, "-checkbox_-wrapper-disabled"), _defineProperty({
|
|
244
|
+
border: "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(colorPrimaryBorder),
|
|
245
|
+
cursor: "not-allowed",
|
|
246
|
+
position: "relative",
|
|
247
|
+
overflow: "hidden"
|
|
248
|
+
}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-content-title"), {
|
|
249
|
+
color: colorTextDisabled
|
|
250
|
+
}), "".concat(componentCls, "-content-description"), {
|
|
251
|
+
color: colorTextDisabled
|
|
252
|
+
})));
|
|
253
|
+
};
|
|
151
254
|
// ============================== Export ==============================
|
|
152
255
|
export function getStyle(prefixCls, token) {
|
|
153
256
|
var checkboxToken = mergeToken(token, {
|
|
@@ -156,7 +259,7 @@ export function getStyle(prefixCls, token) {
|
|
|
156
259
|
});
|
|
157
260
|
return [genCheckboxStyle(checkboxToken)];
|
|
158
261
|
}
|
|
159
|
-
export default genStyleHooks(
|
|
160
|
-
var prefixCls =
|
|
161
|
-
return [getStyle(prefixCls, token)];
|
|
262
|
+
export default genStyleHooks("Checkbox", function (token, _ref7) {
|
|
263
|
+
var prefixCls = _ref7.prefixCls;
|
|
264
|
+
return [getStyle(prefixCls, token), getCheckboxCardStyle(token)];
|
|
162
265
|
});
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
1
|
var _excluded = ["prefixCls", "className", "type", "icon", "content"];
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
5
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
7
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -13,18 +10,22 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
11
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
12
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import CheckCircleFilled from "@ant-design/icons/CheckCircleFilled";
|
|
19
|
+
import CloseCircleFilled from "@ant-design/icons/CloseCircleFilled";
|
|
20
|
+
import ExclamationCircleFilled from "@ant-design/icons/ExclamationCircleFilled";
|
|
21
|
+
import InfoCircleFilled from "@ant-design/icons/InfoCircleFilled";
|
|
22
|
+
import LoadingOutlined from "@ant-design/icons/LoadingOutlined";
|
|
23
|
+
import classNames from "classnames";
|
|
24
|
+
import { Notice } from "rc-notification";
|
|
25
|
+
import { ConfigContext } from "../config-provider";
|
|
26
|
+
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls";
|
|
27
|
+
import useStyle from "./style";
|
|
28
|
+
import CloseSvg from "./assets/Close";
|
|
28
29
|
export var TypeIcon = {
|
|
29
30
|
info: _jsx(InfoCircleFilled, {}),
|
|
30
31
|
success: _jsx(CheckCircleFilled, {}),
|
|
@@ -36,11 +37,28 @@ export var PureContent = function PureContent(_ref) {
|
|
|
36
37
|
var prefixCls = _ref.prefixCls,
|
|
37
38
|
type = _ref.type,
|
|
38
39
|
icon = _ref.icon,
|
|
39
|
-
children = _ref.children
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
children = _ref.children,
|
|
41
|
+
onClose = _ref.onClose,
|
|
42
|
+
closable = _ref.closable,
|
|
43
|
+
dec = _ref.dec;
|
|
44
|
+
return _jsxs(_Fragment, {
|
|
45
|
+
children: [_jsxs("div", {
|
|
46
|
+
className: classNames("".concat(prefixCls, "-custom-content"), "".concat(prefixCls, "-").concat(type), _defineProperty({}, "".concat(prefixCls, "-custom-content-has-dec"), dec)),
|
|
47
|
+
children: [icon || TypeIcon[type], _jsx("span", {
|
|
48
|
+
className: "".concat(prefixCls, "-custom-header-content"),
|
|
49
|
+
children: children
|
|
50
|
+
}), closable && _jsx("span", {
|
|
51
|
+
onClick: function onClick() {
|
|
52
|
+
onClose === null || onClose === void 0 || onClose();
|
|
53
|
+
},
|
|
54
|
+
className: "".concat(prefixCls, "-custom-header-close-wrapper"),
|
|
55
|
+
children: _jsx(CloseSvg, {
|
|
56
|
+
className: "".concat(prefixCls, "-custom-header-close")
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
}), dec && _jsx("div", {
|
|
60
|
+
className: classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-custom-dec-wrapper"), true), "".concat(prefixCls, "-custom-dec-not-closable"), !closable)),
|
|
61
|
+
children: dec
|
|
44
62
|
})]
|
|
45
63
|
});
|
|
46
64
|
};
|
|
@@ -54,7 +72,7 @@ var PurePanel = function PurePanel(props) {
|
|
|
54
72
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
55
73
|
var _React$useContext = React.useContext(ConfigContext),
|
|
56
74
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
57
|
-
var prefixCls = staticPrefixCls || getPrefixCls(
|
|
75
|
+
var prefixCls = staticPrefixCls || getPrefixCls("message");
|
|
58
76
|
var rootCls = useCSSVarCls(prefixCls);
|
|
59
77
|
var _useStyle = useStyle(prefixCls, rootCls),
|
|
60
78
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
var SvgClose = function SvgClose(props) {
|
|
10
|
+
return _jsx("svg", _objectSpread(_objectSpread({
|
|
11
|
+
width: 8,
|
|
12
|
+
height: 8,
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
+
}, props), {}, {
|
|
15
|
+
children: _jsx("path", {
|
|
16
|
+
d: "M7.535 7.41a.5.5 0 0 1-.707 0L4 4.582 1.172 7.41a.5.5 0 1 1-.707-.707l2.828-2.828L.465 1.047A.5.5 0 0 1 1.172.34L4 3.168 6.828.34a.5.5 0 0 1 .707.707L4.707 3.875l2.828 2.828a.5.5 0 0 1 0 .707Z",
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
fillRule: "evenodd"
|
|
19
|
+
})
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
export default SvgClose;
|
|
@@ -51,24 +51,63 @@ var genMessageStyle = function genMessageStyle(token) {
|
|
|
51
51
|
opacity: 0
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
var noticeStyle = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
54
|
+
var noticeStyle = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
55
55
|
padding: paddingXS,
|
|
56
56
|
textAlign: 'center'
|
|
57
|
-
}, "".concat(componentCls, "-custom-content"), {
|
|
58
|
-
|
|
59
|
-
alignItems: 'center'
|
|
60
|
-
}), "".concat(componentCls, "-custom-content > ").concat(iconCls), {
|
|
57
|
+
}, "".concat(componentCls, "-custom-content > ").concat(iconCls), {
|
|
58
|
+
verticalAlign: 'text-bottom',
|
|
61
59
|
marginInlineEnd: marginXS,
|
|
62
60
|
// affected by ltr or rtl
|
|
63
61
|
fontSize: fontSizeLG
|
|
64
|
-
}), "".concat(noticeCls, "-content"), {
|
|
62
|
+
}), "".concat(noticeCls, "-content"), _defineProperty(_defineProperty(_defineProperty({
|
|
65
63
|
display: 'inline-block',
|
|
66
64
|
padding: contentPadding,
|
|
67
65
|
background: contentBg,
|
|
68
66
|
borderRadius: borderRadiusLG,
|
|
69
67
|
boxShadow: boxShadow,
|
|
70
|
-
pointerEvents: 'all'
|
|
71
|
-
|
|
68
|
+
pointerEvents: 'all',
|
|
69
|
+
maxWidth: "400px"
|
|
70
|
+
}, "&:has(".concat(componentCls, "-custom-dec-wrapper)"), {
|
|
71
|
+
paddingBottom: "12px",
|
|
72
|
+
width: "400px"
|
|
73
|
+
}), "".concat(componentCls, "-custom-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
74
|
+
display: "flex",
|
|
75
|
+
lineHeight: "22px"
|
|
76
|
+
}, "> ".concat(iconCls), {
|
|
77
|
+
fontSize: "16px",
|
|
78
|
+
width: "16px",
|
|
79
|
+
height: "16px",
|
|
80
|
+
transform: "translateY(3px)"
|
|
81
|
+
}), "".concat(componentCls, "-custom-header-content"), {
|
|
82
|
+
display: "inline-block",
|
|
83
|
+
fontSize: "14px",
|
|
84
|
+
lineHeight: "22px",
|
|
85
|
+
flex: "1",
|
|
86
|
+
flexBasis: "auto",
|
|
87
|
+
textAlign: "left",
|
|
88
|
+
marginRight: "16px",
|
|
89
|
+
wordBreak: "break-all"
|
|
90
|
+
}), "".concat(componentCls, "-custom-header-close-wrapper"), {
|
|
91
|
+
display: "inline-block",
|
|
92
|
+
height: "22px",
|
|
93
|
+
lineHeight: "22px",
|
|
94
|
+
cursor: "pointer",
|
|
95
|
+
"&:hover": {
|
|
96
|
+
color: token.colorPrimaryHover
|
|
97
|
+
}
|
|
98
|
+
}), "&".concat(componentCls, "-custom-content-has-dec"), _defineProperty({}, "".concat(componentCls, "-custom-header-content"), {
|
|
99
|
+
fontWeight: "500"
|
|
100
|
+
}))), "".concat(componentCls, "-custom-dec-wrapper"), _defineProperty({
|
|
101
|
+
textAlign: "left",
|
|
102
|
+
paddingLeft: "24px",
|
|
103
|
+
paddingRight: "32px",
|
|
104
|
+
marginTop: "6px",
|
|
105
|
+
fontSize: "14px",
|
|
106
|
+
lineHeight: "22px",
|
|
107
|
+
wordBreak: "break-all"
|
|
108
|
+
}, "&".concat(componentCls, "-custom-dec-not-closable"), {
|
|
109
|
+
paddingRight: "16px"
|
|
110
|
+
}))), "".concat(componentCls, "-success > ").concat(iconCls), {
|
|
72
111
|
color: colorSuccess
|
|
73
112
|
}), "".concat(componentCls, "-error > ").concat(iconCls), {
|
|
74
113
|
color: colorError
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["content", "icon", "type", "key", "className", "style", "onClose"];
|
|
1
|
+
var _excluded = ["content", "icon", "type", "key", "className", "style", "onClose", "closable", "dec"];
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
@@ -151,12 +151,18 @@ export function useInternalMessage(messageConfig) {
|
|
|
151
151
|
className = config.className,
|
|
152
152
|
style = config.style,
|
|
153
153
|
_onClose = config.onClose,
|
|
154
|
+
_config$closable = config.closable,
|
|
155
|
+
closable = _config$closable === void 0 ? true : _config$closable,
|
|
156
|
+
dec = config.dec,
|
|
154
157
|
restConfig = _objectWithoutProperties(config, _excluded);
|
|
155
158
|
var mergedKey = key;
|
|
156
159
|
if (mergedKey === undefined || mergedKey === null) {
|
|
157
160
|
keyIndex += 1;
|
|
158
161
|
mergedKey = "antd-message-".concat(keyIndex);
|
|
159
162
|
}
|
|
163
|
+
var onCloseCustom = function onCloseCustom() {
|
|
164
|
+
close(mergedKey);
|
|
165
|
+
};
|
|
160
166
|
return wrapPromiseFn(function (resolve) {
|
|
161
167
|
originOpen(_objectSpread(_objectSpread({}, restConfig), {}, {
|
|
162
168
|
key: mergedKey,
|
|
@@ -164,6 +170,9 @@ export function useInternalMessage(messageConfig) {
|
|
|
164
170
|
prefixCls: prefixCls,
|
|
165
171
|
type: type,
|
|
166
172
|
icon: icon,
|
|
173
|
+
onClose: onCloseCustom,
|
|
174
|
+
closable: closable,
|
|
175
|
+
dec: dec,
|
|
167
176
|
children: content
|
|
168
177
|
}),
|
|
169
178
|
placement: 'top',
|
|
@@ -195,7 +204,8 @@ export function useInternalMessage(messageConfig) {
|
|
|
195
204
|
};
|
|
196
205
|
var keys = ['info', 'success', 'warning', 'error', 'loading'];
|
|
197
206
|
keys.forEach(function (type) {
|
|
198
|
-
var typeOpen = function typeOpen(jointContent, duration, onClose) {
|
|
207
|
+
var typeOpen = function typeOpen(jointContent, duration, onClose, dec) {
|
|
208
|
+
var closable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
199
209
|
var config;
|
|
200
210
|
if (jointContent && _typeof(jointContent) === 'object' && 'content' in jointContent) {
|
|
201
211
|
config = jointContent;
|
|
@@ -215,7 +225,9 @@ export function useInternalMessage(messageConfig) {
|
|
|
215
225
|
}
|
|
216
226
|
var mergedConfig = _objectSpread(_objectSpread({
|
|
217
227
|
onClose: mergedOnClose,
|
|
218
|
-
duration: mergedDuration
|
|
228
|
+
duration: mergedDuration,
|
|
229
|
+
dec: dec,
|
|
230
|
+
closable: closable
|
|
219
231
|
}, config), {}, {
|
|
220
232
|
type: type
|
|
221
233
|
});
|
package/lib/Antd5/radio/radio.js
CHANGED
|
@@ -97,11 +97,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
97
97
|
ref: mergedRef
|
|
98
98
|
})), newTypeExist ? render ? render(option) : _jsxs(_Fragment, {
|
|
99
99
|
children: [(option === null || option === void 0 ? void 0 : option.icon) && _jsx("div", {
|
|
100
|
-
className: classNames({
|
|
101
|
-
"cw-radio-icon-wrapper": true,
|
|
102
|
-
"cw-radio-icon-unchecked-disabled": radioProps.disabled && !radioProps.checked,
|
|
103
|
-
"cw-radio-icon-checked-disabled": radioProps.disabled && radioProps.checked
|
|
104
|
-
}),
|
|
100
|
+
className: classNames("".concat(prefixCls, "-icon-wrapper"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-icon-unchecked-disabled"), radioProps.disabled && !radioProps.checked), "".concat(prefixCls, "-icon-checked-disabled"), radioProps.disabled && radioProps.checked)),
|
|
105
101
|
style: {
|
|
106
102
|
background: option !== null && option !== void 0 && option.iconBackGround ? typeof (option === null || option === void 0 ? void 0 : option.iconBackGround) === "function" ? option === null || option === void 0 ? void 0 : option.iconBackGround({
|
|
107
103
|
disabled: radioProps.disabled,
|
|
@@ -113,14 +109,12 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
113
109
|
checked: radioProps.checked
|
|
114
110
|
}) : option === null || option === void 0 ? void 0 : option.icon
|
|
115
111
|
}), _jsxs("div", {
|
|
116
|
-
className:
|
|
112
|
+
className: "".concat(prefixCls, "-content"),
|
|
117
113
|
children: [children && _jsx("p", {
|
|
118
|
-
className:
|
|
114
|
+
className: "".concat(prefixCls, "-content-title"),
|
|
119
115
|
children: children
|
|
120
116
|
}), (option === null || option === void 0 ? void 0 : option.describe) && _jsx("div", {
|
|
121
|
-
className: classNames("
|
|
122
|
-
"cw-radio-content-description_": !children
|
|
123
|
-
}),
|
|
117
|
+
className: classNames("".concat(prefixCls, "-content-description"), _defineProperty({}, "".concat(prefixCls, "-content-description_"), !children)),
|
|
124
118
|
children: option === null || option === void 0 ? void 0 : option.describe
|
|
125
119
|
})]
|
|
126
120
|
})]
|