@easyv/react-components 0.0.18 → 0.0.21
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/Form/index.less +5 -0
- package/dist/Modal/index.d.ts +14 -2
- package/dist/Modal/index.js +26 -2
- package/dist/Modal/index.less +9 -5
- package/package.json +1 -1
package/dist/Form/index.less
CHANGED
package/dist/Modal/index.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModalProps } from '@arco-design/web-react';
|
|
2
|
+
import { ConfirmProps } from '@arco-design/web-react/es/Modal/confirm';
|
|
2
3
|
import './index.less';
|
|
3
|
-
|
|
4
|
+
declare function XModal({ simple, className, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace XModal {
|
|
6
|
+
var confirm: (props: ConfirmProps) => import("@arco-design/web-react/es/Modal/interface").ModalReturnProps;
|
|
7
|
+
var error: (props: ConfirmProps) => import("@arco-design/web-react/es/Modal/interface").ModalReturnProps;
|
|
8
|
+
var info: (props: ConfirmProps) => import("@arco-design/web-react/es/Modal/interface").ModalReturnProps;
|
|
9
|
+
var success: (props: ConfirmProps) => import("@arco-design/web-react/es/Modal/interface").ModalReturnProps;
|
|
10
|
+
var warning: (props: ConfirmProps) => import("@arco-design/web-react/es/Modal/interface").ModalReturnProps;
|
|
11
|
+
var useModal: typeof import("@arco-design/web-react/es/Modal/useModal").default;
|
|
12
|
+
var destroyAll: () => void;
|
|
13
|
+
var config: (config: import("@arco-design/web-react/es/Modal/config").ModalConfigType) => void;
|
|
14
|
+
}
|
|
15
|
+
export default XModal;
|
|
4
16
|
export type * from './interface';
|
|
5
17
|
export type * from './interface';
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["simple", "className"];
|
|
2
3
|
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; }
|
|
3
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
import { CloseOutlined } from '@easyv/react-icons';
|
|
11
|
+
import classNames from 'classnames';
|
|
7
12
|
import { Modal } from '@arco-design/web-react';
|
|
8
13
|
import "./index.less";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
15
|
var originModalConfirm = Modal.confirm;
|
|
10
|
-
export default
|
|
16
|
+
export default function XModal(_ref) {
|
|
17
|
+
var simple = _ref.simple,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
21
|
+
className: classNames(className, {
|
|
22
|
+
'arco-modal-simple': simple
|
|
23
|
+
})
|
|
24
|
+
}, props), {}, {
|
|
25
|
+
closeIcon: /*#__PURE__*/_jsx(CloseOutlined, {})
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
11
28
|
function confirm(props) {
|
|
12
29
|
var _props$okButtonProps, _props$autoFocus;
|
|
13
30
|
return originModalConfirm(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -17,4 +34,11 @@ function confirm(props) {
|
|
|
17
34
|
autoFocus: (_props$autoFocus = props.autoFocus) !== null && _props$autoFocus !== void 0 ? _props$autoFocus : false
|
|
18
35
|
}));
|
|
19
36
|
}
|
|
20
|
-
|
|
37
|
+
XModal.confirm = confirm;
|
|
38
|
+
XModal.error = Modal.error;
|
|
39
|
+
XModal.info = Modal.info;
|
|
40
|
+
XModal.success = Modal.success;
|
|
41
|
+
XModal.warning = Modal.warning;
|
|
42
|
+
XModal.useModal = Modal.useModal;
|
|
43
|
+
XModal.destroyAll = Modal.destroyAll;
|
|
44
|
+
XModal.config = Modal.config;
|
package/dist/Modal/index.less
CHANGED
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.arco-modal-close-icon {
|
|
12
|
+
right: 24px;
|
|
13
|
+
top: 21px;
|
|
12
14
|
font-size: 14px;
|
|
15
|
+
cursor: pointer;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
.arco-modal-content {
|
|
@@ -22,19 +25,20 @@
|
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
.arco-modal-simple {
|
|
25
|
-
|
|
26
|
-
padding: 20px;
|
|
28
|
+
padding: 0;
|
|
27
29
|
|
|
28
30
|
.arco-modal-header {
|
|
29
|
-
margin-bottom:
|
|
31
|
+
margin-bottom: 0;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.arco-modal-content {
|
|
33
|
-
padding-
|
|
35
|
+
padding-top: 8px;
|
|
36
|
+
padding-bottom: 0;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
.arco-modal-footer {
|
|
37
|
-
margin-top:
|
|
40
|
+
margin-top: 0;
|
|
38
41
|
text-align: right;
|
|
42
|
+
padding: 24px;
|
|
39
43
|
}
|
|
40
44
|
}
|