@qsxy/element-plus-react 1.0.0-next.11 → 1.0.0-next.13
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/Avatar/Avatar.d.ts +2 -2
- package/dist/Avatar/Avatar.js +13 -6
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +15 -3
- package/dist/Checkbox/Checkbox.js +14 -12
- package/dist/Checkbox/CheckboxButton.js +15 -14
- package/dist/Checkbox/typings.d.ts +2 -1
- package/dist/Dropdown/Dropdown.d.ts +3 -3
- package/dist/Dropdown/Dropdown.js +20 -6
- package/dist/Dropdown/typings.d.ts +8 -1
- package/dist/Input/Input.js +3 -2
- package/dist/Input/typings.d.ts +1 -1
- package/dist/InputNumber/InputNumber.d.ts +2 -2
- package/dist/InputNumber/InputNumber.js +10 -5
- package/dist/Loading/Loading.d.ts +7 -2
- package/dist/Loading/Loading.js +108 -57
- package/dist/Loading/typings.d.ts +7 -1
- package/dist/Message/Main.d.ts +0 -7
- package/dist/Message/Main.js +0 -7
- package/dist/Message/Message.d.ts +2 -2
- package/dist/Message/Message.js +4 -3
- package/dist/Message/index.d.ts +0 -8
- package/dist/Message/index.js +5 -9
- package/dist/MessageBox/MessageBox.js +2 -1
- package/dist/MessageBox/index.d.ts +5 -5
- package/dist/MessageBox/index.js +1 -0
- package/dist/Notification/Main.d.ts +0 -7
- package/dist/Notification/Main.js +0 -7
- package/dist/Popover/Popover.d.ts +3 -2
- package/dist/Popover/Popover.js +10 -5
- package/dist/Popover/typings.d.ts +0 -1
- package/dist/Radio/Radio.js +14 -10
- package/dist/Radio/RadioButton.d.ts +2 -2
- package/dist/Radio/RadioButton.js +14 -4
- package/dist/Radio/typings.d.ts +2 -1
- package/dist/Switch/Switch.js +9 -3
- package/dist/Table/Table.d.ts +0 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/hooks/useSelection.d.ts +1 -1
- package/dist/Tag/Tag.js +19 -8
- package/dist/TimePicker/TimeSpinnerPanel.js +5 -5
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/Tooltip.js +6 -6
- package/dist/Upload/use-handlers.d.ts +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/theme-chalk/message/index.scss +11 -3
- package/dist/theme-chalk/avatar/index.scss +0 -50
- package/dist/theme-chalk/badge/index.scss +0 -63
- package/dist/theme-chalk/breadcrumb/index.scss +0 -65
- package/dist/theme-chalk/build.scss +0 -2
- package/dist/theme-chalk/button/_mixins.scss +0 -317
- package/dist/theme-chalk/button/button-group.scss +0 -83
- package/dist/theme-chalk/button/button.scss +0 -382
- package/dist/theme-chalk/button/index.scss +0 -2
- package/dist/theme-chalk/calendar/date-picker.scss +0 -112
- package/dist/theme-chalk/calendar/date-range-picker.scss +0 -139
- package/dist/theme-chalk/calendar/date-table.scss +0 -156
- package/dist/theme-chalk/calendar/index.scss +0 -6
- package/dist/theme-chalk/calendar/month-table.scss +0 -92
- package/dist/theme-chalk/calendar/picker-panel.scss +0 -136
- package/dist/theme-chalk/calendar/year-table.scss +0 -107
- package/dist/theme-chalk/card/index.scss +0 -44
- package/dist/theme-chalk/carousel/index.scss +0 -237
- package/dist/theme-chalk/cascader/cascader-panel.scss +0 -184
- package/dist/theme-chalk/cascader/cascader.scss +0 -239
- package/dist/theme-chalk/cascader/index.scss +0 -2
- package/dist/theme-chalk/checkbox/index.scss +0 -255
- package/dist/theme-chalk/checkbox-button/index.scss +0 -117
- package/dist/theme-chalk/checkbox-group/index.scss +0 -33
- package/dist/theme-chalk/col/_mixins.scss +0 -62
- package/dist/theme-chalk/col/index.scss +0 -50
- package/dist/theme-chalk/collapse/index.scss +0 -84
- package/dist/theme-chalk/color-picker/index.scss +0 -340
- package/dist/theme-chalk/common/_var.scss +0 -6
- package/dist/theme-chalk/common/index.d.ts +0 -1
- package/dist/theme-chalk/common/index.js +0 -1
- package/dist/theme-chalk/common/index.scss +0 -222
- package/dist/theme-chalk/date-picker/index.scss +0 -253
- package/dist/theme-chalk/date-time-picker/index.scss +0 -3
- package/dist/theme-chalk/date-time-picker/time-picker.scss +0 -83
- package/dist/theme-chalk/date-time-picker/time-range-picker.scss +0 -32
- package/dist/theme-chalk/descriptions/descriptions-item.scss +0 -66
- package/dist/theme-chalk/descriptions/descriptions.scss +0 -160
- package/dist/theme-chalk/descriptions/index.scss +0 -2
- package/dist/theme-chalk/dev.scss +0 -2
- package/dist/theme-chalk/dialog/index.scss +0 -190
- package/dist/theme-chalk/display.scss +0 -46
- package/dist/theme-chalk/divider/index.scss +0 -51
- package/dist/theme-chalk/doc.scss +0 -2
- package/dist/theme-chalk/drawer/index.scss +0 -250
- package/dist/theme-chalk/dropdown/index.scss +0 -147
- package/dist/theme-chalk/empty/index.scss +0 -69
- package/dist/theme-chalk/fonts/fa-brands-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/theme-chalk/form/index.scss +0 -378
- package/dist/theme-chalk/icon/fonts.scss +0 -9
- package/dist/theme-chalk/icon/index.scss +0 -44
- package/dist/theme-chalk/icon/scss/_animated.scss +0 -205
- package/dist/theme-chalk/icon/scss/_bordered-pulled.scss +0 -20
- package/dist/theme-chalk/icon/scss/_core.scss +0 -33
- package/dist/theme-chalk/icon/scss/_duotone-icons.scss +0 -12
- package/dist/theme-chalk/icon/scss/_fixed-width.scss +0 -7
- package/dist/theme-chalk/icon/scss/_functions.scss +0 -57
- package/dist/theme-chalk/icon/scss/_icons.scss +0 -11
- package/dist/theme-chalk/icon/scss/_list.scss +0 -20
- package/dist/theme-chalk/icon/scss/_mixins.scss +0 -102
- package/dist/theme-chalk/icon/scss/_rotated-flipped.scss +0 -31
- package/dist/theme-chalk/icon/scss/_screen-reader.scss +0 -14
- package/dist/theme-chalk/icon/scss/_shims.scss +0 -2606
- package/dist/theme-chalk/icon/scss/_sizing.scss +0 -16
- package/dist/theme-chalk/icon/scss/_stacked.scss +0 -32
- package/dist/theme-chalk/icon/scss/_variables.scss +0 -9189
- package/dist/theme-chalk/icon/scss/brands.scss +0 -27
- package/dist/theme-chalk/icon/scss/duotone.scss +0 -72
- package/dist/theme-chalk/icon/scss/fontawesome.scss +0 -13
- package/dist/theme-chalk/icon/scss/index.scss +0 -15
- package/dist/theme-chalk/icon/scss/light.scss +0 -21
- package/dist/theme-chalk/icon/scss/regular.scss +0 -21
- package/dist/theme-chalk/icon/scss/solid.scss +0 -21
- package/dist/theme-chalk/icon/scss/thin.scss +0 -21
- package/dist/theme-chalk/icon/scss/v4-shims.scss +0 -3
- package/dist/theme-chalk/index.scss +0 -67
- package/dist/theme-chalk/input/_mixins.scss +0 -16
- package/dist/theme-chalk/input/index.scss +0 -3
- package/dist/theme-chalk/input/input-range.scss +0 -208
- package/dist/theme-chalk/input/input.scss +0 -577
- package/dist/theme-chalk/input-number/index.scss +0 -172
- package/dist/theme-chalk/link/index.scss +0 -99
- package/dist/theme-chalk/loading/index.scss +0 -94
- package/dist/theme-chalk/message/index.scss +0 -169
- package/dist/theme-chalk/message-box/index.scss +0 -184
- package/dist/theme-chalk/notification/index.scss +0 -155
- package/dist/theme-chalk/pagination/index.scss +0 -515
- package/dist/theme-chalk/placeholder/index.scss +0 -135
- package/dist/theme-chalk/popconfirm/index.scss +0 -35
- package/dist/theme-chalk/popover/index.scss +0 -54
- package/dist/theme-chalk/popper/index.scss +0 -86
- package/dist/theme-chalk/progress/index.scss +0 -155
- package/dist/theme-chalk/radio/index.scss +0 -2
- package/dist/theme-chalk/radio/radio-button.scss +0 -128
- package/dist/theme-chalk/radio/radio.scss +0 -171
- package/dist/theme-chalk/radio-group/index.scss +0 -31
- package/dist/theme-chalk/row/index.scss +0 -30
- package/dist/theme-chalk/scrollbar/index.scss +0 -103
- package/dist/theme-chalk/select/index.scss +0 -244
- package/dist/theme-chalk/select/option-group.scss +0 -54
- package/dist/theme-chalk/select/option.scss +0 -63
- package/dist/theme-chalk/select/select-dropdown.scss +0 -57
- package/dist/theme-chalk/switch/index.scss +0 -273
- package/dist/theme-chalk/table/index.scss +0 -714
- package/dist/theme-chalk/tabs/index.scss +0 -620
- package/dist/theme-chalk/tag/index.scss +0 -360
- package/dist/theme-chalk/time-line/_timeline-item.scss +0 -90
- package/dist/theme-chalk/time-line/_timeline.scss +0 -50
- package/dist/theme-chalk/time-line/index.scss +0 -2
- package/dist/theme-chalk/time-picker/index.scss +0 -109
- package/dist/theme-chalk/tooltip/index.scss +0 -13
- package/dist/theme-chalk/transfer/index.scss +0 -247
- package/dist/theme-chalk/transition/index.scss +0 -756
- package/dist/theme-chalk/tree/_directory.scss +0 -73
- package/dist/theme-chalk/tree/_tree.scss +0 -401
- package/dist/theme-chalk/tree/index.scss +0 -2
- package/dist/theme-chalk/tree-select/index.scss +0 -25
- package/dist/theme-chalk/upload/index.scss +0 -631
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AvatarProps } from './typings';
|
|
3
|
-
declare const Avatar:
|
|
3
|
+
declare const Avatar: React.MemoExoticComponent<React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>>;
|
|
4
4
|
export default Avatar;
|
package/dist/Avatar/Avatar.js
CHANGED
|
@@ -1,4 +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
|
+
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); }
|
|
2
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; }
|
|
3
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; }
|
|
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; }
|
|
@@ -12,11 +13,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
14
|
/* eslint-disable indent */
|
|
14
15
|
import classNames from 'classnames';
|
|
15
|
-
import React, { memo, useEffect, useMemo, useState } from 'react';
|
|
16
|
+
import React, { forwardRef, memo, useEffect, useMemo, useState } from 'react';
|
|
16
17
|
import Icon from "../Icon/Icon";
|
|
17
18
|
import { addUnit, isNotEmpty, isNumber, isString } from "../Util/base";
|
|
18
|
-
import { useClassNames } from "../hooks";
|
|
19
|
-
var Avatar = /*#__PURE__*/memo(function (props) {
|
|
19
|
+
import { partitionHTMLProps, useClassNames } from "../hooks";
|
|
20
|
+
var Avatar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
21
|
var icon = props.icon,
|
|
21
22
|
_props$size = props.size,
|
|
22
23
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
@@ -30,6 +31,11 @@ var Avatar = /*#__PURE__*/memo(function (props) {
|
|
|
30
31
|
_props$classPrefix = props.classPrefix,
|
|
31
32
|
classPrefix = _props$classPrefix === void 0 ? 'avatar' : _props$classPrefix,
|
|
32
33
|
onError = props.onError;
|
|
34
|
+
var _partitionHTMLProps = partitionHTMLProps(props, {
|
|
35
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
36
|
+
}),
|
|
37
|
+
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
38
|
+
tooltipEvents = _partitionHTMLProps2[0];
|
|
33
39
|
var _useClassNames = useClassNames(classPrefix),
|
|
34
40
|
b = _useClassNames.b,
|
|
35
41
|
m = _useClassNames.m,
|
|
@@ -70,10 +76,11 @@ var Avatar = /*#__PURE__*/memo(function (props) {
|
|
|
70
76
|
name: icon
|
|
71
77
|
}) : props.children;
|
|
72
78
|
}, [icon, props.children]);
|
|
73
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
80
|
+
ref: ref,
|
|
74
81
|
className: avatarClass,
|
|
75
82
|
style: _objectSpread(_objectSpread({}, sizeStyle), props.style)
|
|
76
|
-
}, (src || srcSet) && !hasLoadError ? /*#__PURE__*/React.createElement("img", {
|
|
83
|
+
}, tooltipEvents), (src || srcSet) && !hasLoadError ? /*#__PURE__*/React.createElement("img", {
|
|
77
84
|
src: src,
|
|
78
85
|
alt: alt,
|
|
79
86
|
srcSet: srcSet,
|
|
@@ -82,6 +89,6 @@ var Avatar = /*#__PURE__*/memo(function (props) {
|
|
|
82
89
|
},
|
|
83
90
|
onError: handleError
|
|
84
91
|
}) : children);
|
|
85
|
-
});
|
|
92
|
+
}));
|
|
86
93
|
Avatar.displayName = 'ElAvatar';
|
|
87
94
|
export default Avatar;
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BadgeProps } from './typings';
|
|
3
|
-
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement
|
|
3
|
+
declare const Badge: React.MemoExoticComponent<React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>>;
|
|
4
4
|
export default Badge;
|
package/dist/Badge/Badge.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
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
2
|
var _templateObject;
|
|
3
|
+
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); }
|
|
3
4
|
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
5
|
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
6
|
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; }
|
|
6
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
8
|
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
9
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
16
|
import classNames from 'classnames';
|
|
10
17
|
import isNumber from 'lodash/isNumber';
|
|
11
18
|
import React, { forwardRef, memo, useMemo, useRef } from 'react';
|
|
12
19
|
import Transition from "../Transition/Transition";
|
|
13
|
-
import { useClassNames } from "../hooks";
|
|
20
|
+
import { partitionHTMLProps, useClassNames } from "../hooks";
|
|
14
21
|
var Badge = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
22
|
var _props$type = props.type,
|
|
16
23
|
type = _props$type === void 0 ? 'danger' : _props$type,
|
|
@@ -26,6 +33,11 @@ var Badge = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
26
33
|
badgeClass = props.badgeClass,
|
|
27
34
|
_props$badgeStyle = props.badgeStyle,
|
|
28
35
|
badgeStyle = _props$badgeStyle === void 0 ? {} : _props$badgeStyle;
|
|
36
|
+
var _partitionHTMLProps = partitionHTMLProps(props, {
|
|
37
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
38
|
+
}),
|
|
39
|
+
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
40
|
+
tooltipEvents = _partitionHTMLProps2[0];
|
|
29
41
|
var _useClassNames = useClassNames('badge'),
|
|
30
42
|
b = _useClassNames.b,
|
|
31
43
|
e = _useClassNames.e,
|
|
@@ -41,11 +53,11 @@ var Badge = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
41
53
|
}
|
|
42
54
|
return "".concat(value);
|
|
43
55
|
}, [isDot, max, value]);
|
|
44
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
45
57
|
ref: ref,
|
|
46
58
|
className: classNames(b(), props.className),
|
|
47
59
|
style: props.style
|
|
48
|
-
}, props.children, /*#__PURE__*/React.createElement(Transition, {
|
|
60
|
+
}, tooltipEvents), props.children, /*#__PURE__*/React.createElement(Transition, {
|
|
49
61
|
nodeRef: nodeRef,
|
|
50
62
|
name: b('zoom-in-center', false),
|
|
51
63
|
visible: !hidden && (!!content || isDot) && !(!showZero && value === 0),
|
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
-
var _excluded = ["checked", "className", "children", "defaultChecked", "title", "indeterminate", "readOnly", "name", "value", "onClick", "onCheckboxClick", "onChange", "prevent"
|
|
3
|
+
var _excluded = ["checked", "className", "children", "defaultChecked", "title", "indeterminate", "readOnly", "name", "value", "onClick", "onCheckboxClick", "onChange", "prevent"];
|
|
4
4
|
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); }
|
|
5
5
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
6
6
|
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; }
|
|
@@ -44,8 +44,6 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
44
44
|
onChange = props.onChange,
|
|
45
45
|
_props$prevent = props.prevent,
|
|
46
46
|
prevent = _props$prevent === void 0 ? false : _props$prevent,
|
|
47
|
-
onMouseEnter = props.onMouseEnter,
|
|
48
|
-
onMouseLeave = props.onMouseLeave,
|
|
49
47
|
rest = _objectWithoutProperties(props, _excluded);
|
|
50
48
|
var disabled = useDisabled(disabledContext || props.disabled);
|
|
51
49
|
var size = useSize(groupSize !== null && groupSize !== void 0 ? groupSize : props.size);
|
|
@@ -67,9 +65,13 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
67
65
|
e = _useClassNames.e,
|
|
68
66
|
is = _useClassNames.is;
|
|
69
67
|
var _partitionHTMLProps = partitionHTMLProps(rest),
|
|
70
|
-
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps,
|
|
71
|
-
htmlInputProps = _partitionHTMLProps2[0]
|
|
72
|
-
|
|
68
|
+
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
69
|
+
htmlInputProps = _partitionHTMLProps2[0];
|
|
70
|
+
var _partitionHTMLProps3 = partitionHTMLProps(props, {
|
|
71
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
72
|
+
}),
|
|
73
|
+
_partitionHTMLProps4 = _slicedToArray(_partitionHTMLProps3, 1),
|
|
74
|
+
tooltipEvents = _partitionHTMLProps4[0];
|
|
73
75
|
var inputRef = useRef(null);
|
|
74
76
|
var containerRef = useRef(null);
|
|
75
77
|
var handleChange = useCallback(function (event) {
|
|
@@ -83,6 +85,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
83
85
|
}, [checked, disabled, readOnly, setChecked, onChange, value, onGroupChange]);
|
|
84
86
|
useImperativeHandle(ref, function () {
|
|
85
87
|
return {
|
|
88
|
+
ref: containerRef,
|
|
86
89
|
get input() {
|
|
87
90
|
return inputRef.current;
|
|
88
91
|
},
|
|
@@ -98,11 +101,10 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
98
101
|
checked: checked,
|
|
99
102
|
disabled: disabled
|
|
100
103
|
}), m(_defineProperty({}, size, size)), className),
|
|
101
|
-
ref: containerRef
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, restProps), /*#__PURE__*/React.createElement("input", _extends({
|
|
104
|
+
ref: containerRef
|
|
105
|
+
}, tooltipEvents, {
|
|
106
|
+
onClick: onClick
|
|
107
|
+
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
106
108
|
key: name
|
|
107
109
|
}, htmlInputProps, {
|
|
108
110
|
name: name,
|
|
@@ -130,7 +132,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
130
132
|
}), /*#__PURE__*/React.createElement("span", {
|
|
131
133
|
className: e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["label"])))
|
|
132
134
|
}, children));
|
|
133
|
-
}, [b, checked, children, className, disabled, e, handleChange, htmlInputProps, indeterminate, is, m, name, onCheckboxClick, onClick,
|
|
135
|
+
}, [b, checked, children, className, disabled, e, handleChange, htmlInputProps, indeterminate, is, m, name, onCheckboxClick, onClick, prevent, readOnly, size, tooltipEvents, value]);
|
|
134
136
|
return title ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
135
137
|
content: title
|
|
136
138
|
}, main) : main;
|
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
var _templateObject, _templateObject2;
|
|
3
|
-
var _excluded = ["checked", "className", "children", "defaultChecked", "title", "indeterminate", "readOnly", "name", "value", "
|
|
3
|
+
var _excluded = ["checked", "className", "children", "defaultChecked", "title", "indeterminate", "readOnly", "name", "value", "onCheckboxClick", "onChange", "prevent"];
|
|
4
4
|
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); }
|
|
5
5
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
6
6
|
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; }
|
|
@@ -39,16 +39,18 @@ var CheckboxButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
39
39
|
_props$name = props.name,
|
|
40
40
|
name = _props$name === void 0 ? nameContext : _props$name,
|
|
41
41
|
value = props.value,
|
|
42
|
-
onClick = props.onClick,
|
|
43
42
|
onCheckboxClick = props.onCheckboxClick,
|
|
44
43
|
onChange = props.onChange,
|
|
45
44
|
_props$prevent = props.prevent,
|
|
46
45
|
prevent = _props$prevent === void 0 ? false : _props$prevent,
|
|
47
|
-
onMouseEnter = props.onMouseEnter,
|
|
48
|
-
onMouseLeave = props.onMouseLeave,
|
|
49
46
|
rest = _objectWithoutProperties(props, _excluded);
|
|
50
47
|
var disabled = useDisabled(disabledContext || props.disabled);
|
|
51
48
|
var size = useSize(groupSize !== null && groupSize !== void 0 ? groupSize : props.size);
|
|
49
|
+
var _partitionHTMLProps = partitionHTMLProps(props, {
|
|
50
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
51
|
+
}),
|
|
52
|
+
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
53
|
+
tooltipEvents = _partitionHTMLProps2[0];
|
|
52
54
|
var isChecked = useCallback(function () {
|
|
53
55
|
if (typeof groupValue !== 'undefined') {
|
|
54
56
|
return groupValue instanceof Array ? groupValue.some(function (i) {
|
|
@@ -66,11 +68,12 @@ var CheckboxButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
66
68
|
m = _useClassNames.m,
|
|
67
69
|
e = _useClassNames.e,
|
|
68
70
|
is = _useClassNames.is;
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
htmlInputProps =
|
|
72
|
-
restProps =
|
|
71
|
+
var _partitionHTMLProps3 = partitionHTMLProps(rest),
|
|
72
|
+
_partitionHTMLProps4 = _slicedToArray(_partitionHTMLProps3, 2),
|
|
73
|
+
htmlInputProps = _partitionHTMLProps4[0],
|
|
74
|
+
restProps = _partitionHTMLProps4[1];
|
|
73
75
|
var inputRef = useRef(null);
|
|
76
|
+
var containerRef = useRef(null);
|
|
74
77
|
var handleChange = useCallback(function (event) {
|
|
75
78
|
var nextChecked = !checked;
|
|
76
79
|
if (disabled || readOnly) {
|
|
@@ -82,6 +85,7 @@ var CheckboxButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
85
|
}, [checked, disabled, readOnly, setChecked, onChange, value, onGroupChange]);
|
|
83
86
|
useImperativeHandle(ref, function () {
|
|
84
87
|
return {
|
|
88
|
+
ref: containerRef,
|
|
85
89
|
get input() {
|
|
86
90
|
return inputRef.current;
|
|
87
91
|
},
|
|
@@ -97,11 +101,8 @@ var CheckboxButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
97
101
|
checked: checked,
|
|
98
102
|
disabled: disabled
|
|
99
103
|
}), m(_defineProperty({}, size, size)), className),
|
|
100
|
-
ref:
|
|
101
|
-
|
|
102
|
-
onMouseEnter: onMouseEnter,
|
|
103
|
-
onMouseLeave: onMouseLeave
|
|
104
|
-
}, restProps), /*#__PURE__*/React.createElement("input", _extends({
|
|
104
|
+
ref: containerRef
|
|
105
|
+
}, tooltipEvents), /*#__PURE__*/React.createElement("input", _extends({
|
|
105
106
|
key: name
|
|
106
107
|
}, htmlInputProps, {
|
|
107
108
|
name: name,
|
|
@@ -127,7 +128,7 @@ var CheckboxButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
127
128
|
disabled: disabled
|
|
128
129
|
}))
|
|
129
130
|
}, children));
|
|
130
|
-
}, [b, checked, children, className, disabled, e, handleChange, htmlInputProps, indeterminate, is, m, name, onCheckboxClick,
|
|
131
|
+
}, [b, checked, children, className, disabled, e, handleChange, htmlInputProps, indeterminate, is, m, name, onCheckboxClick, prevent, readOnly, size, tooltipEvents, value]);
|
|
131
132
|
return title ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
132
133
|
content: title
|
|
133
134
|
}, main) : main;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
2
|
import { BaseProps, FormControlBaseProps, NativeProps } from '../types/common';
|
|
3
3
|
export type ValueType = string | number;
|
|
4
4
|
export type CheckboxRef = {
|
|
5
|
+
ref: RefObject<HTMLSpanElement>;
|
|
5
6
|
input: HTMLInputElement;
|
|
6
7
|
isChcked: () => boolean;
|
|
7
8
|
setChecked: (value: boolean) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DropdownProps } from './typings';
|
|
3
|
-
declare const Dropdown:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownProps, DropdownRef } from './typings';
|
|
3
|
+
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<DropdownRef>>;
|
|
4
4
|
export default Dropdown;
|
|
@@ -11,12 +11,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import React, { useCallback } from 'react';
|
|
14
|
+
import React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
|
|
15
15
|
import Tooltip from "../Tooltip/Tooltip";
|
|
16
16
|
import { mergeDefaultProps } from "../Util";
|
|
17
|
-
import { partitionAnimationProps, partitionPopperPropsUtils, useClassNames } from "../hooks";
|
|
17
|
+
import { partitionAnimationProps, partitionHTMLProps, partitionPopperPropsUtils, useClassNames } from "../hooks";
|
|
18
18
|
import { DropdownContext } from "./DropdownContext";
|
|
19
|
-
var Dropdown = function
|
|
19
|
+
var Dropdown = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
20
|
props = mergeDefaultProps({
|
|
21
21
|
hideOnClick: true,
|
|
22
22
|
showArrow: true,
|
|
@@ -46,9 +46,15 @@ var Dropdown = function Dropdown(props) {
|
|
|
46
46
|
var _partitionAnimationPr = partitionAnimationProps(rest),
|
|
47
47
|
_partitionAnimationPr2 = _slicedToArray(_partitionAnimationPr, 1),
|
|
48
48
|
transitionProps = _partitionAnimationPr2[0];
|
|
49
|
+
var _partitionHTMLProps = partitionHTMLProps(props, {
|
|
50
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
51
|
+
}),
|
|
52
|
+
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
53
|
+
tooltipEvents = _partitionHTMLProps2[0];
|
|
49
54
|
var _useClassNames = useClassNames(classPrefix),
|
|
50
55
|
b = _useClassNames.b,
|
|
51
56
|
e = _useClassNames.e;
|
|
57
|
+
var containerRef = useRef(null);
|
|
52
58
|
|
|
53
59
|
/** 显示 */
|
|
54
60
|
var handleMouseEnter = useCallback(function (event) {
|
|
@@ -61,10 +67,18 @@ var Dropdown = function Dropdown(props) {
|
|
|
61
67
|
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(event);
|
|
62
68
|
visiblechange === null || visiblechange === void 0 || visiblechange(false);
|
|
63
69
|
}, [onMouseLeave, visiblechange]);
|
|
64
|
-
|
|
70
|
+
useImperativeHandle(ref, function () {
|
|
71
|
+
return {
|
|
72
|
+
ref: containerRef,
|
|
73
|
+
handleOpen: onMouseEnter,
|
|
74
|
+
handleClose: onMouseLeave
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
78
|
+
ref: containerRef,
|
|
65
79
|
className: classNames(b(), props.className),
|
|
66
80
|
style: props.style
|
|
67
|
-
}, /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
81
|
+
}, tooltipEvents), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
68
82
|
classPrefix: classPrefix,
|
|
69
83
|
triggerRef: props.children,
|
|
70
84
|
popperClass: e(_templateObject || (_templateObject = _taggedTemplateLiteral(["popper"]))),
|
|
@@ -86,6 +100,6 @@ var Dropdown = function Dropdown(props) {
|
|
|
86
100
|
}, menu),
|
|
87
101
|
unmountOnExit: true
|
|
88
102
|
}, popperProps, transitionProps)));
|
|
89
|
-
};
|
|
103
|
+
});
|
|
90
104
|
Dropdown.displayName = 'Dropdown';
|
|
91
105
|
export default Dropdown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
2
|
import { PopperOptions } from '../Popper';
|
|
3
3
|
import { TransitionProps } from '../Transition';
|
|
4
4
|
import { AnimationEventProps, BaseProps, NativeProps } from '../types/common';
|
|
@@ -40,3 +40,10 @@ export interface DropdownItemProps extends BaseProps, NativeProps {
|
|
|
40
40
|
/** 是否为激活状态 */
|
|
41
41
|
active?: boolean;
|
|
42
42
|
}
|
|
43
|
+
export type DropdownRef = {
|
|
44
|
+
ref: RefObject<HTMLDivElement>;
|
|
45
|
+
/** 打开下拉菜单 */
|
|
46
|
+
handleOpen?: () => void;
|
|
47
|
+
/** 关闭下拉菜单 */
|
|
48
|
+
handleClose?: () => void;
|
|
49
|
+
};
|
package/dist/Input/Input.js
CHANGED
|
@@ -162,6 +162,7 @@ function InternalInput(props, ref) {
|
|
|
162
162
|
|
|
163
163
|
/** 在点击由 clearable 属性生成的清空按钮时触发 */
|
|
164
164
|
var handelClear = useCallback(function (event) {
|
|
165
|
+
event.stopPropagation();
|
|
165
166
|
setValue('');
|
|
166
167
|
if (clearRef.current) {
|
|
167
168
|
addStyle(clearRef.current, 'display', 'none');
|
|
@@ -321,14 +322,14 @@ function InternalInput(props, ref) {
|
|
|
321
322
|
className: e(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["suffix"]))),
|
|
322
323
|
style: {
|
|
323
324
|
display: 'none'
|
|
324
|
-
}
|
|
325
|
+
},
|
|
326
|
+
onClick: handelClear
|
|
325
327
|
}, /*#__PURE__*/React.createElement("span", {
|
|
326
328
|
className: e(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["suffix-inner"])))
|
|
327
329
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
328
330
|
prefix: "fal",
|
|
329
331
|
name: "circle-xmark",
|
|
330
332
|
className: classNames(e(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["icon"]))), e(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["clear"])))),
|
|
331
|
-
onClick: handelClear,
|
|
332
333
|
onMouseDown: function onMouseDown(event) {
|
|
333
334
|
event.preventDefault();
|
|
334
335
|
event.stopPropagation();
|
package/dist/Input/typings.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface InputProps extends FormControlBaseProps<ValueType>, BaseProps,
|
|
|
69
69
|
/** 是否隐藏值 */
|
|
70
70
|
hiddenValue?: boolean;
|
|
71
71
|
/** 在点击由 clearable 属性生成的清空按钮时触发 */
|
|
72
|
-
onClear?: (e: MouseEvent) => void;
|
|
72
|
+
onClear?: (e: React.MouseEvent) => void;
|
|
73
73
|
/** 在 Input 值改变时触发 */
|
|
74
74
|
onChange?: (value: ValueType, event?: React.ChangeEvent) => void;
|
|
75
75
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputNumberProps, InputNumberRef } from './typings';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const InputNumber: React.MemoExoticComponent<React.ForwardRefExoticComponent<InputNumberProps<import("./typings").ValueType> & React.RefAttributes<InputNumberRef>>>;
|
|
4
|
+
export default InputNumber;
|
|
@@ -25,7 +25,7 @@ import Icon from "../Icon/Icon";
|
|
|
25
25
|
import Input from "../Input/Input";
|
|
26
26
|
import { floatAdd, floatSub, formatNumber, isEmpty, isNotEmpty, mergeDefaultProps } from "../Util";
|
|
27
27
|
import { partitionHTMLProps, useClassNames, useControlled, useDisabled, useSize } from "../hooks";
|
|
28
|
-
var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
28
|
+
var InputNumber = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
29
|
props = mergeDefaultProps({
|
|
30
30
|
step: 1,
|
|
31
31
|
precision: 0,
|
|
@@ -60,6 +60,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
60
60
|
var _partitionHTMLProps = partitionHTMLProps(rest),
|
|
61
61
|
_partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
|
|
62
62
|
htmlInputProps = _partitionHTMLProps2[0];
|
|
63
|
+
var _partitionHTMLProps3 = partitionHTMLProps(props, {
|
|
64
|
+
htmlProps: ['onMouseEnter', 'onMouseLeave', 'onClick', 'onContextMenu']
|
|
65
|
+
}),
|
|
66
|
+
_partitionHTMLProps4 = _slicedToArray(_partitionHTMLProps3, 1),
|
|
67
|
+
tooltipEvents = _partitionHTMLProps4[0];
|
|
63
68
|
var _useControlled = useControlled(props.value, props.defaultValue),
|
|
64
69
|
_useControlled2 = _slicedToArray(_useControlled, 2),
|
|
65
70
|
value = _useControlled2[0],
|
|
@@ -178,13 +183,13 @@ var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
178
183
|
blur: inputRef.current.blur
|
|
179
184
|
};
|
|
180
185
|
});
|
|
181
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
186
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
182
187
|
className: classNames(b(), m(_defineProperty({}, size, size)), is({
|
|
183
188
|
'controls-right': controlsPositionRight
|
|
184
189
|
}), props.className),
|
|
185
190
|
style: props.style,
|
|
186
191
|
ref: containerRef
|
|
187
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
192
|
+
}, tooltipEvents), /*#__PURE__*/React.createElement("span", {
|
|
188
193
|
className: classNames(e(_templateObject || (_templateObject = _taggedTemplateLiteral(["decrease"]))), is({
|
|
189
194
|
disabled: disabled || value == minProp
|
|
190
195
|
})),
|
|
@@ -245,6 +250,6 @@ var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
245
250
|
}, []),
|
|
246
251
|
ref: inputRef
|
|
247
252
|
}, omit(htmlInputProps, ['disabled', 'size', 'onInput', 'onKeyDown', 'onKeyUp', 'size', 'onChange', 'style', 'className', 'type', 'name', 'prefix', 'readOnly', 'maxLength', 'minLength']))));
|
|
248
|
-
});
|
|
253
|
+
}));
|
|
249
254
|
InputNumber.displayName = 'ElInputNumber';
|
|
250
|
-
export default
|
|
255
|
+
export default InputNumber;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, RefObject } from 'react';
|
|
2
2
|
import { LoadingProps, LoadingService } from './typings';
|
|
3
|
+
export declare class Main {
|
|
4
|
+
ref: RefObject<any>;
|
|
5
|
+
root: any;
|
|
6
|
+
constructor(props: LoadingProps);
|
|
7
|
+
render(props: LoadingProps): void;
|
|
8
|
+
}
|
|
3
9
|
declare const Loading: CompInterface;
|
|
4
10
|
interface CompInterface extends FC<LoadingProps> {
|
|
5
11
|
displayName?: string;
|
|
6
|
-
defaultProps?: Partial<LoadingProps>;
|
|
7
12
|
service: LoadingService;
|
|
8
13
|
}
|
|
9
14
|
export default Loading;
|