@nutui/nutui-react 0.1.0-beta.1
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/README.md +151 -0
- package/dist/esm/ActionSheet.js +110 -0
- package/dist/esm/Address.js +597 -0
- package/dist/esm/AnimatingNumbers.js +157 -0
- package/dist/esm/Avatar.js +70 -0
- package/dist/esm/BackTop.js +152 -0
- package/dist/esm/Badge.js +70 -0
- package/dist/esm/Barrage.js +101 -0
- package/dist/esm/Button.js +4 -0
- package/dist/esm/Cell.js +92 -0
- package/dist/esm/Checkbox.js +95 -0
- package/dist/esm/CheckboxGroup.js +107 -0
- package/dist/esm/CircleProgress.js +99 -0
- package/dist/esm/Collapse.js +108 -0
- package/dist/esm/Divider.js +38 -0
- package/dist/esm/Drag.js +192 -0
- package/dist/esm/Elevator.js +205 -0
- package/dist/esm/FixedNav.js +105 -0
- package/dist/esm/Icon.js +5 -0
- package/dist/esm/Infiniteloading.js +234 -0
- package/dist/esm/Input.js +186 -0
- package/dist/esm/InputNumber.js +194 -0
- package/dist/esm/Layout.js +20 -0
- package/dist/esm/NavBar.js +67 -0
- package/dist/esm/NoticeBar.js +340 -0
- package/dist/esm/Notify.js +251 -0
- package/dist/esm/Overlay.js +6 -0
- package/dist/esm/Pagination.js +199 -0
- package/dist/esm/Popup.js +195 -0
- package/dist/esm/Price.js +95 -0
- package/dist/esm/Radio.js +111 -0
- package/dist/esm/RadioGroup.js +103 -0
- package/dist/esm/Range.js +451 -0
- package/dist/esm/Rate.js +122 -0
- package/dist/esm/Signature.js +173 -0
- package/dist/esm/Step.js +73 -0
- package/dist/esm/Steps.js +44 -0
- package/dist/esm/Tabbar.js +74 -0
- package/dist/esm/TabbarItem.js +70 -0
- package/dist/esm/Tag.js +108 -0
- package/dist/esm/TextArea.js +126 -0
- package/dist/esm/Toast.js +8 -0
- package/dist/esm/Uploader.js +482 -0
- package/dist/esm/UserContext-68f62e66.js +3 -0
- package/dist/esm/bem-893ad28d.js +8 -0
- package/dist/esm/button-345fb015.js +110 -0
- package/dist/esm/context-aa058329.js +6 -0
- package/dist/esm/icon-63c0d58f.js +70 -0
- package/dist/esm/nutui-react.es.js +42 -0
- package/dist/esm/overlay-418bcf84.js +94 -0
- package/dist/esm/toast-420b65b7.js +294 -0
- package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +20 -0
- package/dist/esm/types/src/packages/actionsheet/index.d.ts +2 -0
- package/dist/esm/types/src/packages/address/address.d.ts +56 -0
- package/dist/esm/types/src/packages/address/customRender.d.ts +18 -0
- package/dist/esm/types/src/packages/address/existRender.d.ts +18 -0
- package/dist/esm/types/src/packages/address/index.d.ts +2 -0
- package/dist/esm/types/src/packages/animatingnumbers/animatingnumbers.d.ts +12 -0
- package/dist/esm/types/src/packages/animatingnumbers/countup.d.ts +11 -0
- package/dist/esm/types/src/packages/animatingnumbers/index.d.ts +2 -0
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +14 -0
- package/dist/esm/types/src/packages/avatar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/backtop/backtop.d.ts +15 -0
- package/dist/esm/types/src/packages/backtop/index.d.ts +2 -0
- package/dist/esm/types/src/packages/badge/badge.d.ts +13 -0
- package/dist/esm/types/src/packages/badge/index.d.ts +2 -0
- package/dist/esm/types/src/packages/barrage/barrage.d.ts +12 -0
- package/dist/esm/types/src/packages/barrage/index.d.ts +2 -0
- package/dist/esm/types/src/packages/button/button.d.ts +20 -0
- package/dist/esm/types/src/packages/button/index.d.ts +2 -0
- package/dist/esm/types/src/packages/cell/cell.d.ts +16 -0
- package/dist/esm/types/src/packages/cell/index.d.ts +2 -0
- package/dist/esm/types/src/packages/cellgroup/cellgroup.d.ts +6 -0
- package/dist/esm/types/src/packages/cellgroup/index.d.ts +2 -0
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +15 -0
- package/dist/esm/types/src/packages/checkbox/index.d.ts +2 -0
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +7 -0
- package/dist/esm/types/src/packages/checkboxgroup/index.d.ts +2 -0
- package/dist/esm/types/src/packages/circleprogress/circleprogress.d.ts +9 -0
- package/dist/esm/types/src/packages/circleprogress/index.d.ts +2 -0
- package/dist/esm/types/src/packages/col/col.d.ts +7 -0
- package/dist/esm/types/src/packages/col/index.d.ts +2 -0
- package/dist/esm/types/src/packages/collapse/collapse.d.ts +11 -0
- package/dist/esm/types/src/packages/collapse/index.d.ts +2 -0
- package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +18 -0
- package/dist/esm/types/src/packages/collapseitem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/divider/divider.d.ts +9 -0
- package/dist/esm/types/src/packages/divider/index.d.ts +2 -0
- package/dist/esm/types/src/packages/drag/drag.d.ts +14 -0
- package/dist/esm/types/src/packages/drag/index.d.ts +2 -0
- package/dist/esm/types/src/packages/elevator/elevator.d.ts +17 -0
- package/dist/esm/types/src/packages/elevator/index.d.ts +2 -0
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +22 -0
- package/dist/esm/types/src/packages/fixednav/index.d.ts +2 -0
- package/dist/esm/types/src/packages/icon/icon.d.ts +12 -0
- package/dist/esm/types/src/packages/icon/index.d.ts +2 -0
- package/dist/esm/types/src/packages/infiniteloading/index.d.ts +2 -0
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +20 -0
- package/dist/esm/types/src/packages/input/index.d.ts +2 -0
- package/dist/esm/types/src/packages/input/input.d.ts +20 -0
- package/dist/esm/types/src/packages/input/util.d.ts +1 -0
- package/dist/esm/types/src/packages/inputnumber/index.d.ts +2 -0
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +22 -0
- package/dist/esm/types/src/packages/layout/index.d.ts +2 -0
- package/dist/esm/types/src/packages/layout/layout.d.ts +4 -0
- package/dist/esm/types/src/packages/navbar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/navbar/navbar.d.ts +15 -0
- package/dist/esm/types/src/packages/noticebar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +23 -0
- package/dist/esm/types/src/packages/notify/Notification.d.ts +31 -0
- package/dist/esm/types/src/packages/notify/index.d.ts +2 -0
- package/dist/esm/types/src/packages/notify/notify.d.ts +10 -0
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +43 -0
- package/dist/esm/types/src/packages/nutui.react.d.ts +43 -0
- package/dist/esm/types/src/packages/overlay/index.d.ts +2 -0
- package/dist/esm/types/src/packages/overlay/overlay.d.ts +12 -0
- package/dist/esm/types/src/packages/pagination/index.d.ts +2 -0
- package/dist/esm/types/src/packages/pagination/pagination.d.ts +19 -0
- package/dist/esm/types/src/packages/popup/index.d.ts +2 -0
- package/dist/esm/types/src/packages/popup/popup.d.ts +23 -0
- package/dist/esm/types/src/packages/price/index.d.ts +2 -0
- package/dist/esm/types/src/packages/price/price.d.ts +11 -0
- package/dist/esm/types/src/packages/radio/context.d.ts +5 -0
- package/dist/esm/types/src/packages/radio/index.d.ts +2 -0
- package/dist/esm/types/src/packages/radio/radio.d.ts +21 -0
- package/dist/esm/types/src/packages/radiogroup/index.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +11 -0
- package/dist/esm/types/src/packages/range/index.d.ts +2 -0
- package/dist/esm/types/src/packages/range/range.d.ts +23 -0
- package/dist/esm/types/src/packages/rate/index.d.ts +2 -0
- package/dist/esm/types/src/packages/rate/rate.d.ts +16 -0
- package/dist/esm/types/src/packages/row/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/row/index.d.ts +2 -0
- package/dist/esm/types/src/packages/row/row.d.ts +9 -0
- package/dist/esm/types/src/packages/signature/index.d.ts +2 -0
- package/dist/esm/types/src/packages/signature/signature.d.ts +11 -0
- package/dist/esm/types/src/packages/step/index.d.ts +2 -0
- package/dist/esm/types/src/packages/step/step.d.ts +12 -0
- package/dist/esm/types/src/packages/steps/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/steps/index.d.ts +2 -0
- package/dist/esm/types/src/packages/steps/steps.d.ts +9 -0
- package/dist/esm/types/src/packages/switch/index.d.ts +2 -0
- package/dist/esm/types/src/packages/switch/switch.d.ts +14 -0
- package/dist/esm/types/src/packages/tabbar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/tabbar/tabbar.d.ts +13 -0
- package/dist/esm/types/src/packages/tabbaritem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/tabbaritem/tabbarItem.d.ts +13 -0
- package/dist/esm/types/src/packages/tag/index.d.ts +2 -0
- package/dist/esm/types/src/packages/tag/tag.d.ts +15 -0
- package/dist/esm/types/src/packages/textarea/index.d.ts +2 -0
- package/dist/esm/types/src/packages/textarea/textarea.d.ts +18 -0
- package/dist/esm/types/src/packages/toast/Notification.d.ts +37 -0
- package/dist/esm/types/src/packages/toast/index.d.ts +2 -0
- package/dist/esm/types/src/packages/toast/toast.d.ts +11 -0
- package/dist/esm/types/src/packages/uploader/index.d.ts +2 -0
- package/dist/esm/types/src/packages/uploader/upload.d.ts +20 -0
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +59 -0
- package/dist/esm/types/src/utils/bem.d.ts +2 -0
- package/dist/esm/types/src/utils/create/bem.d.ts +2 -0
- package/dist/esm/types/src/utils/create/index.d.ts +1 -0
- package/dist/esm/types/src/utils/date.d.ts +49 -0
- package/dist/esm/types/src/utils/index.d.ts +1 -0
- package/dist/esm/types/src/utils/raf.d.ts +2 -0
- package/dist/esm/types/src/utils/useRect/index.d.ts +17 -0
- package/dist/esm/types/src/utils/useTouch/index.d.ts +16 -0
- package/dist/nutui.react.es.js +6647 -0
- package/dist/nutui.react.umd.js +28 -0
- package/dist/packages/actionsheet/actionsheet.scss +68 -0
- package/dist/packages/address/address.scss +145 -0
- package/dist/packages/animatingnumbers/animatingnumbers.scss +3 -0
- package/dist/packages/animatingnumbers/countup.scss +36 -0
- package/dist/packages/avatar/avatar.scss +48 -0
- package/dist/packages/backtop/backtop.scss +20 -0
- package/dist/packages/badge/badge.scss +39 -0
- package/dist/packages/barrage/barrage.scss +48 -0
- package/dist/packages/button/button.scss +157 -0
- package/dist/packages/cell/cell.scss +79 -0
- package/dist/packages/cellgroup/cellgroup.scss +24 -0
- package/dist/packages/checkbox/checkbox.scss +20 -0
- package/dist/packages/checkboxgroup/checkboxgroup.scss +0 -0
- package/dist/packages/circleprogress/circleprogress.scss +65 -0
- package/dist/packages/col/col.scss +24 -0
- package/dist/packages/collapse/collapse.scss +1 -0
- package/dist/packages/collapseitem/collapseitem.scss +82 -0
- package/dist/packages/divider/divider.scss +54 -0
- package/dist/packages/drag/drag.scss +8 -0
- package/dist/packages/elevator/elevator.scss +71 -0
- package/dist/packages/fixednav/fixednav.scss +129 -0
- package/dist/packages/icon/icon.scss +40 -0
- package/dist/packages/infiniteloading/infiniteloading.scss +47 -0
- package/dist/packages/input/input.scss +47 -0
- package/dist/packages/inputnumber/inputnumber.scss +36 -0
- package/dist/packages/layout/layout.scss +2 -0
- package/dist/packages/navbar/navbar.scss +38 -0
- package/dist/packages/noticebar/noticebar.scss +111 -0
- package/dist/packages/notify/notify.scss +80 -0
- package/dist/packages/overlay/overlay.scss +50 -0
- package/dist/packages/pagination/pagination.scss +50 -0
- package/dist/packages/popup/popup.scss +149 -0
- package/dist/packages/price/price.scss +22 -0
- package/dist/packages/radio/radio.scss +58 -0
- package/dist/packages/radiogroup/radiogroup.scss +22 -0
- package/dist/packages/range/custom.scss +9 -0
- package/dist/packages/range/range.scss +96 -0
- package/dist/packages/rate/rate.scss +34 -0
- package/dist/packages/row/row.scss +51 -0
- package/dist/packages/signature/signature.scss +16 -0
- package/dist/packages/step/step.scss +190 -0
- package/dist/packages/steps/steps.scss +7 -0
- package/dist/packages/switch/switch.scss +60 -0
- package/dist/packages/tabbar/tabbar.scss +20 -0
- package/dist/packages/tabbaritem/tabbarItem.scss +61 -0
- package/dist/packages/tag/tag.scss +52 -0
- package/dist/packages/textarea/textarea.scss +39 -0
- package/dist/packages/toast/toast.scss +94 -0
- package/dist/packages/uploader/uploader.scss +72 -0
- package/dist/style.css +1 -0
- package/dist/style.es.js +7 -0
- package/dist/styles/animation/drop.scss +24 -0
- package/dist/styles/animation/ease.scss +23 -0
- package/dist/styles/animation/fade.scss +20 -0
- package/dist/styles/animation/index.scss +6 -0
- package/dist/styles/animation/rotate.scss +10 -0
- package/dist/styles/animation/zoom.scss +26 -0
- package/dist/styles/font/demo.css +539 -0
- package/dist/styles/font/demo_index.html +2718 -0
- package/dist/styles/font/iconfont.css +455 -0
- package/dist/styles/font/iconfont.eot +0 -0
- package/dist/styles/font/iconfont.js +63 -0
- package/dist/styles/font/iconfont.json +779 -0
- package/dist/styles/font/iconfont.svg +356 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/mixins/index.scss +2 -0
- package/dist/styles/mixins/make-animation.scss +24 -0
- package/dist/styles/mixins/text-ellipsis.scss +20 -0
- package/dist/styles/themes/default.scss +46 -0
- package/dist/styles/variables.scss +326 -0
- package/package.json +120 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export { default as Avatar } from './Avatar.js';
|
|
2
|
+
export { default as Button } from './Button.js';
|
|
3
|
+
export { default as Cell } from './Cell.js';
|
|
4
|
+
export { default as Icon } from './Icon.js';
|
|
5
|
+
export { default as Price } from './Price.js';
|
|
6
|
+
export { default as Overlay } from './Overlay.js';
|
|
7
|
+
export { default as Divider } from './Divider.js';
|
|
8
|
+
export { default as Layout } from './Layout.js';
|
|
9
|
+
export { default as Drag } from './Drag.js';
|
|
10
|
+
export { default as Collapse } from './Collapse.js';
|
|
11
|
+
export { default as Toast } from './Toast.js';
|
|
12
|
+
export { default as BackTop } from './BackTop.js';
|
|
13
|
+
export { default as Range } from './Range.js';
|
|
14
|
+
export { default as Infiniteloading } from './Infiniteloading.js';
|
|
15
|
+
export { default as Steps } from './Steps.js';
|
|
16
|
+
export { default as Step } from './Step.js';
|
|
17
|
+
export { default as CircleProgress } from './CircleProgress.js';
|
|
18
|
+
export { default as Popup } from './Popup.js';
|
|
19
|
+
export { default as ActionSheet } from './ActionSheet.js';
|
|
20
|
+
export { default as NoticeBar } from './NoticeBar.js';
|
|
21
|
+
export { default as Notify } from './Notify.js';
|
|
22
|
+
export { default as NavBar } from './NavBar.js';
|
|
23
|
+
export { default as Tabbar } from './Tabbar.js';
|
|
24
|
+
export { default as TabbarItem } from './TabbarItem.js';
|
|
25
|
+
export { default as InputNumber } from './InputNumber.js';
|
|
26
|
+
export { default as Elevator } from './Elevator.js';
|
|
27
|
+
export { default as FixedNav } from './FixedNav.js';
|
|
28
|
+
export { default as Pagination } from './Pagination.js';
|
|
29
|
+
export { default as Rate } from './Rate.js';
|
|
30
|
+
export { default as Uploader } from './Uploader.js';
|
|
31
|
+
export { default as Input } from './Input.js';
|
|
32
|
+
export { default as TextArea } from './TextArea.js';
|
|
33
|
+
export { default as Checkbox } from './Checkbox.js';
|
|
34
|
+
export { default as CheckboxGroup } from './CheckboxGroup.js';
|
|
35
|
+
export { default as Tag } from './Tag.js';
|
|
36
|
+
export { default as Badge } from './Badge.js';
|
|
37
|
+
export { default as AnimatingNumbers } from './AnimatingNumbers.js';
|
|
38
|
+
export { default as Radio } from './Radio.js';
|
|
39
|
+
export { default as RadioGroup } from './RadioGroup.js';
|
|
40
|
+
export { default as Signature } from './Signature.js';
|
|
41
|
+
export { default as Barrage } from './Barrage.js';
|
|
42
|
+
export { default as Address } from './Address.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "zIndex", "duration", "overlayClass", "closeOnClickOverlay", "visible", "lockScroll", "overlayStyle"];
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
11
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
var defaultOverlayProps = {
|
|
14
|
+
zIndex: 2000,
|
|
15
|
+
duration: 0.3,
|
|
16
|
+
overlayClass: '',
|
|
17
|
+
closeOnClickOverlay: true,
|
|
18
|
+
visible: false,
|
|
19
|
+
lockScroll: true,
|
|
20
|
+
overlayStyle: {}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var Overlay = function Overlay(props) {
|
|
24
|
+
var _defaultOverlayProps$ = _objectSpread(_objectSpread({}, defaultOverlayProps), props),
|
|
25
|
+
children = _defaultOverlayProps$.children,
|
|
26
|
+
zIndex = _defaultOverlayProps$.zIndex,
|
|
27
|
+
duration = _defaultOverlayProps$.duration,
|
|
28
|
+
overlayClass = _defaultOverlayProps$.overlayClass,
|
|
29
|
+
closeOnClickOverlay = _defaultOverlayProps$.closeOnClickOverlay,
|
|
30
|
+
visible = _defaultOverlayProps$.visible,
|
|
31
|
+
lockScroll = _defaultOverlayProps$.lockScroll,
|
|
32
|
+
overlayStyle = _defaultOverlayProps$.overlayStyle,
|
|
33
|
+
rest = _objectWithoutProperties(_defaultOverlayProps$, _excluded);
|
|
34
|
+
|
|
35
|
+
var _useState = useState(visible),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
show = _useState2[0],
|
|
38
|
+
setShow = _useState2[1];
|
|
39
|
+
|
|
40
|
+
var renderRef = useRef(true);
|
|
41
|
+
var intervalRef = useRef(0);
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
visible && setShow(visible);
|
|
44
|
+
lock();
|
|
45
|
+
}, [visible]);
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
return function () {
|
|
48
|
+
clearTimeout(intervalRef.current);
|
|
49
|
+
document.body.classList.remove('nut-overflow-hidden');
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
var b = cn('overlay');
|
|
53
|
+
var classes = classNames({
|
|
54
|
+
'overlay-fade-leave-active': !renderRef.current && !visible,
|
|
55
|
+
'overlay-fade-enter-active': visible,
|
|
56
|
+
'first-render': renderRef.current && !visible,
|
|
57
|
+
'hidden-render': !visible
|
|
58
|
+
}, overlayClass, b(''));
|
|
59
|
+
|
|
60
|
+
var styles = _objectSpread({
|
|
61
|
+
zIndex: zIndex,
|
|
62
|
+
animationDuration: "".concat(props.duration, "s")
|
|
63
|
+
}, overlayStyle);
|
|
64
|
+
|
|
65
|
+
var lock = function lock() {
|
|
66
|
+
if (lockScroll && visible) {
|
|
67
|
+
document.body.classList.add('nut-overflow-hidden');
|
|
68
|
+
} else {
|
|
69
|
+
document.body.classList.remove('nut-overflow-hidden');
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var handleClick = function handleClick(e) {
|
|
74
|
+
if (closeOnClickOverlay) {
|
|
75
|
+
props.onClick && props.onClick(e);
|
|
76
|
+
renderRef.current = false;
|
|
77
|
+
var id = setTimeout(function () {
|
|
78
|
+
setShow(!visible);
|
|
79
|
+
}, duration * 1000 * 0.8);
|
|
80
|
+
intervalRef.current = id;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", _objectSpread(_objectSpread({
|
|
85
|
+
className: classes,
|
|
86
|
+
style: styles
|
|
87
|
+
}, rest), {}, {
|
|
88
|
+
onClick: handleClick
|
|
89
|
+
}), children));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
Overlay.defaultProps = defaultOverlayProps;
|
|
93
|
+
Overlay.displayName = 'NutOverlay';
|
|
94
|
+
export { Overlay as O, defaultOverlayProps as d };
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
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; }
|
|
12
|
+
|
|
13
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
+
|
|
15
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
+
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import * as ReactDOM from 'react-dom';
|
|
19
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
20
|
+
import { I as Icon } from './icon-63c0d58f.js';
|
|
21
|
+
import classNames from 'classnames';
|
|
22
|
+
|
|
23
|
+
var Notification = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
+
_inherits(Notification, _React$PureComponent);
|
|
25
|
+
|
|
26
|
+
var _super = _createSuper(Notification);
|
|
27
|
+
|
|
28
|
+
function Notification(props) {
|
|
29
|
+
var _this;
|
|
30
|
+
|
|
31
|
+
_classCallCheck(this, Notification);
|
|
32
|
+
|
|
33
|
+
_this = _super.call(this, props);
|
|
34
|
+
|
|
35
|
+
_defineProperty(_assertThisInitialized(_this), "closeTimer", void 0);
|
|
36
|
+
|
|
37
|
+
_this.close = _this.close.bind(_assertThisInitialized(_this));
|
|
38
|
+
_this.startCloseTimer = _this.startCloseTimer.bind(_assertThisInitialized(_this));
|
|
39
|
+
_this.clearCloseTimer = _this.clearCloseTimer.bind(_assertThisInitialized(_this));
|
|
40
|
+
_this.close = _this.close.bind(_assertThisInitialized(_this));
|
|
41
|
+
_this.clickCover = _this.clickCover.bind(_assertThisInitialized(_this));
|
|
42
|
+
_this.state = {
|
|
43
|
+
show: true
|
|
44
|
+
};
|
|
45
|
+
return _this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
_createClass(Notification, [{
|
|
49
|
+
key: "close",
|
|
50
|
+
value: function close() {
|
|
51
|
+
this.setState({
|
|
52
|
+
show: false
|
|
53
|
+
});
|
|
54
|
+
this.clearCloseTimer();
|
|
55
|
+
this.props.onClose();
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "startCloseTimer",
|
|
59
|
+
value: function startCloseTimer() {
|
|
60
|
+
var _this2 = this;
|
|
61
|
+
|
|
62
|
+
var duration = this.props.duration;
|
|
63
|
+
|
|
64
|
+
if (duration) {
|
|
65
|
+
this.closeTimer = window.setTimeout(function () {
|
|
66
|
+
_this2.close();
|
|
67
|
+
}, duration * 1000);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "clearCloseTimer",
|
|
72
|
+
value: function clearCloseTimer() {
|
|
73
|
+
if (this.closeTimer) {
|
|
74
|
+
clearTimeout(this.closeTimer);
|
|
75
|
+
this.closeTimer = -1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
key: "clickCover",
|
|
80
|
+
value: function clickCover() {
|
|
81
|
+
var closeOnClickOverlay = this.props.closeOnClickOverlay;
|
|
82
|
+
|
|
83
|
+
if (closeOnClickOverlay) {
|
|
84
|
+
this.close();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "componentDidMount",
|
|
89
|
+
value: function componentDidMount() {
|
|
90
|
+
this.startCloseTimer();
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "componentWillUnmount",
|
|
94
|
+
value: function componentWillUnmount() {
|
|
95
|
+
this.clearCloseTimer();
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "render",
|
|
99
|
+
value: function render() {
|
|
100
|
+
var _classNames,
|
|
101
|
+
_this3 = this;
|
|
102
|
+
|
|
103
|
+
var _this$props = this.props,
|
|
104
|
+
style = _this$props.style,
|
|
105
|
+
icon = _this$props.icon,
|
|
106
|
+
msg = _this$props.msg,
|
|
107
|
+
bottom = _this$props.bottom,
|
|
108
|
+
center = _this$props.center,
|
|
109
|
+
bgColor = _this$props.bgColor,
|
|
110
|
+
coverColor = _this$props.coverColor,
|
|
111
|
+
textAlignCenter = _this$props.textAlignCenter,
|
|
112
|
+
size = _this$props.size,
|
|
113
|
+
customClass = _this$props.customClass,
|
|
114
|
+
cover = _this$props.cover,
|
|
115
|
+
type = _this$props.type;
|
|
116
|
+
this.state;
|
|
117
|
+
var toastBem = cn('toast');
|
|
118
|
+
var classes = classNames((_classNames = {}, _defineProperty(_classNames, 'nut-toast-center', center), _defineProperty(_classNames, 'nut-toast-has-icon', icon), _defineProperty(_classNames, 'nut-toast-cover', cover), _defineProperty(_classNames, 'nut-toast-loading', type === 'loading'), _defineProperty(_classNames, "customClass", customClass), _defineProperty(_classNames, 'nut-toast-' + size, true), _classNames));
|
|
119
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
120
|
+
className: "".concat(toastBem(), " ").concat(classes),
|
|
121
|
+
style: {
|
|
122
|
+
bottom: center ? 'auto' : bottom + 'px',
|
|
123
|
+
backgroundColor: cover ? coverColor : ''
|
|
124
|
+
},
|
|
125
|
+
onClick: function onClick() {
|
|
126
|
+
_this3.clickCover();
|
|
127
|
+
}
|
|
128
|
+
}, React.createElement("div", {
|
|
129
|
+
className: toastBem('inner'),
|
|
130
|
+
style: {
|
|
131
|
+
textAlign: textAlignCenter ? 'center' : 'left',
|
|
132
|
+
backgroundColor: bgColor
|
|
133
|
+
}
|
|
134
|
+
}, icon ? React.createElement("p", {
|
|
135
|
+
className: toastBem('icon-wrapper')
|
|
136
|
+
}, React.createElement(Icon, {
|
|
137
|
+
name: icon ? icon : '',
|
|
138
|
+
size: "20"
|
|
139
|
+
})) : null, React.createElement("span", {
|
|
140
|
+
className: toastBem('text')
|
|
141
|
+
}, msg))));
|
|
142
|
+
}
|
|
143
|
+
}]);
|
|
144
|
+
|
|
145
|
+
return Notification;
|
|
146
|
+
}(React.PureComponent);
|
|
147
|
+
|
|
148
|
+
_defineProperty(Notification, "newInstance", void 0);
|
|
149
|
+
|
|
150
|
+
Notification.newInstance = function (properties, callback) {
|
|
151
|
+
var element = document.createElement('div');
|
|
152
|
+
|
|
153
|
+
if (properties.id) {
|
|
154
|
+
element.setAttribute('id', "".concat(properties.id));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
document.body.appendChild(element);
|
|
158
|
+
var called = false;
|
|
159
|
+
|
|
160
|
+
function ref(instance) {
|
|
161
|
+
if (called) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
called = true;
|
|
166
|
+
callback({
|
|
167
|
+
component: instance,
|
|
168
|
+
destroy: function destroy() {
|
|
169
|
+
ReactDOM.unmountComponentAtNode(element);
|
|
170
|
+
element && element.parentNode && element.parentNode.removeChild(element);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
ReactDOM.render(React.createElement(Notification, _objectSpread(_objectSpread({}, properties), {}, {
|
|
176
|
+
ref: ref
|
|
177
|
+
})), element);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var messageInstance = null;
|
|
181
|
+
var options = {
|
|
182
|
+
msg: '',
|
|
183
|
+
id: '',
|
|
184
|
+
duration: 1.5,
|
|
185
|
+
center: true,
|
|
186
|
+
type: 'text',
|
|
187
|
+
customClass: '',
|
|
188
|
+
bottom: 30,
|
|
189
|
+
size: 'base',
|
|
190
|
+
icon: '',
|
|
191
|
+
textAlignCenter: true,
|
|
192
|
+
loadingRotate: true,
|
|
193
|
+
bgColor: 'rgba(0, 0, 0, .8)',
|
|
194
|
+
onClose: function onClose() {},
|
|
195
|
+
cover: false,
|
|
196
|
+
coverColor: 'rgba(0, 0, 0, 0)',
|
|
197
|
+
closeOnClickOverlay: false // 是否点击遮罩可关闭
|
|
198
|
+
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
function getInstance(props, callback) {
|
|
202
|
+
if (messageInstance) {
|
|
203
|
+
messageInstance.destroy();
|
|
204
|
+
messageInstance = null;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
Notification.newInstance(props, function (notification) {
|
|
208
|
+
return callback && callback(notification);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function notice(opts) {
|
|
213
|
+
function close() {
|
|
214
|
+
if (messageInstance) {
|
|
215
|
+
messageInstance.destroy();
|
|
216
|
+
messageInstance = null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
opts = _objectSpread(_objectSpread(_objectSpread({}, options), opts), {}, {
|
|
221
|
+
onClose: close
|
|
222
|
+
});
|
|
223
|
+
getInstance(opts, function (notification) {
|
|
224
|
+
messageInstance = notification;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
var errorMsg = function errorMsg(msg) {
|
|
229
|
+
if (!msg) {
|
|
230
|
+
console.warn('[NutUI Toast]: msg不能为空');
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
var Toast = {
|
|
236
|
+
text: function text(msg) {
|
|
237
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
238
|
+
errorMsg(msg);
|
|
239
|
+
return notice(_objectSpread({
|
|
240
|
+
msg: msg,
|
|
241
|
+
type: 'text'
|
|
242
|
+
}, option));
|
|
243
|
+
},
|
|
244
|
+
success: function success(msg) {
|
|
245
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
246
|
+
errorMsg(msg);
|
|
247
|
+
return notice(_objectSpread({
|
|
248
|
+
msg: msg,
|
|
249
|
+
icon: 'success',
|
|
250
|
+
type: 'success'
|
|
251
|
+
}, option));
|
|
252
|
+
},
|
|
253
|
+
fail: function fail(msg) {
|
|
254
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
255
|
+
errorMsg(msg);
|
|
256
|
+
return notice(_objectSpread({
|
|
257
|
+
msg: msg,
|
|
258
|
+
icon: 'failure',
|
|
259
|
+
type: 'fail'
|
|
260
|
+
}, option));
|
|
261
|
+
},
|
|
262
|
+
loading: function loading(msg) {
|
|
263
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
264
|
+
errorMsg(msg);
|
|
265
|
+
return notice(_objectSpread({
|
|
266
|
+
msg: msg,
|
|
267
|
+
icon: 'loading',
|
|
268
|
+
type: 'loading'
|
|
269
|
+
}, option));
|
|
270
|
+
},
|
|
271
|
+
warn: function warn(msg) {
|
|
272
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
273
|
+
errorMsg(msg);
|
|
274
|
+
return notice(_objectSpread({
|
|
275
|
+
msg: msg,
|
|
276
|
+
icon: 'tips',
|
|
277
|
+
type: 'warn'
|
|
278
|
+
}, option));
|
|
279
|
+
},
|
|
280
|
+
customIcon: function customIcon(msg) {
|
|
281
|
+
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
282
|
+
errorMsg(msg);
|
|
283
|
+
return notice(_objectSpread({
|
|
284
|
+
msg: msg
|
|
285
|
+
}, option));
|
|
286
|
+
},
|
|
287
|
+
hide: function hide() {
|
|
288
|
+
if (messageInstance) {
|
|
289
|
+
messageInstance.destroy();
|
|
290
|
+
messageInstance = null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
export { Toast as T };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export declare type ItemType<T> = {
|
|
3
|
+
[key: string]: T;
|
|
4
|
+
};
|
|
5
|
+
export interface ActionSheetProps {
|
|
6
|
+
cancelTxt: string;
|
|
7
|
+
optionTag: string;
|
|
8
|
+
optionSubTag: string;
|
|
9
|
+
chooseTagValue: string;
|
|
10
|
+
title: string;
|
|
11
|
+
color: string;
|
|
12
|
+
description: string;
|
|
13
|
+
menuItems: ItemType<string | boolean>[];
|
|
14
|
+
cancel: () => void;
|
|
15
|
+
choose: (item: any, index: number) => void;
|
|
16
|
+
visible: boolean;
|
|
17
|
+
className: string;
|
|
18
|
+
style: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export declare const ActionSheet: FunctionComponent<Partial<ActionSheetProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
+
export interface RegionData {
|
|
3
|
+
name?: string;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface NextListObj {
|
|
7
|
+
next: string;
|
|
8
|
+
value: string | RegionData;
|
|
9
|
+
custom: string;
|
|
10
|
+
selectedRegion: {};
|
|
11
|
+
}
|
|
12
|
+
export interface AddressList {
|
|
13
|
+
id?: string | number;
|
|
14
|
+
provinceName: string;
|
|
15
|
+
cityName: string;
|
|
16
|
+
countyName: string;
|
|
17
|
+
townName: string;
|
|
18
|
+
addressDetail: string;
|
|
19
|
+
selectedAddress: boolean;
|
|
20
|
+
name?: string;
|
|
21
|
+
phone?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface CloseRes {
|
|
24
|
+
data: {};
|
|
25
|
+
type: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AddressProps {
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
modelValue: boolean;
|
|
31
|
+
type: string;
|
|
32
|
+
customAddressTitle: string;
|
|
33
|
+
province: RegionData[];
|
|
34
|
+
city: RegionData[];
|
|
35
|
+
country: RegionData[];
|
|
36
|
+
town: RegionData[];
|
|
37
|
+
isShowCustomAddress: Boolean;
|
|
38
|
+
existAddress: AddressList[];
|
|
39
|
+
existAddressTitle: string;
|
|
40
|
+
customAndExistTitle: string;
|
|
41
|
+
height: string | number;
|
|
42
|
+
defaultIcon: string;
|
|
43
|
+
selectedIcon: string;
|
|
44
|
+
closeBtnIcon: string;
|
|
45
|
+
backBtnIcon: string;
|
|
46
|
+
onSelected?: (prevExistAdd: AddressList, item: AddressList, copyExistAdd: AddressList[]) => void;
|
|
47
|
+
onClose?: (cal: CloseRes) => void;
|
|
48
|
+
closeMask?: (cal: {
|
|
49
|
+
closeWay: string;
|
|
50
|
+
}) => void;
|
|
51
|
+
switchModule?: (cal: {
|
|
52
|
+
type: string;
|
|
53
|
+
}) => void;
|
|
54
|
+
onChange?: (cal: NextListObj) => void;
|
|
55
|
+
}
|
|
56
|
+
export declare const Address: FunctionComponent<Partial<AddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { RegionData } from './address';
|
|
3
|
+
export interface AddressProps {
|
|
4
|
+
type: string;
|
|
5
|
+
province: RegionData[];
|
|
6
|
+
city: RegionData[];
|
|
7
|
+
country: RegionData[];
|
|
8
|
+
town: RegionData[];
|
|
9
|
+
height: string | number;
|
|
10
|
+
onNextArea?: (cal: {
|
|
11
|
+
next: string;
|
|
12
|
+
value: string | RegionData;
|
|
13
|
+
custom: string;
|
|
14
|
+
selectedRegion: {};
|
|
15
|
+
}) => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const CustomRender: FunctionComponent<Partial<AddressProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { AddressList } from './address';
|
|
3
|
+
export interface ExistRenderProps {
|
|
4
|
+
type: string;
|
|
5
|
+
existAddress: AddressList[] | [];
|
|
6
|
+
defaultIcon: string;
|
|
7
|
+
selectedIcon: string;
|
|
8
|
+
isShowCustomAddress: Boolean;
|
|
9
|
+
customAndExistTitle: string;
|
|
10
|
+
onSelected?: (prevExistAdd: AddressList, item: AddressList, copyExistAdd: AddressList[]) => void;
|
|
11
|
+
onClose?: (cal: {
|
|
12
|
+
closeWay: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
onSwitchModule?: (cal: {
|
|
15
|
+
type: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const ExistRender: FunctionComponent<Partial<ExistRenderProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
export interface AnimatingNumbersProps {
|
|
3
|
+
}
|
|
4
|
+
declare type AnimatingNumbersStates = {};
|
|
5
|
+
export declare class AnimatingNumbers extends Component<AnimatingNumbersProps, AnimatingNumbersStates> {
|
|
6
|
+
static defaultProps: AnimatingNumbersProps;
|
|
7
|
+
static displayName: string;
|
|
8
|
+
static CountUp: React.FunctionComponent<Partial<import("./countup").CountUpProps>>;
|
|
9
|
+
constructor(props: AnimatingNumbersProps);
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface CountUpProps {
|
|
3
|
+
maxLen: number;
|
|
4
|
+
endNumber: string;
|
|
5
|
+
delaySpeed?: number;
|
|
6
|
+
easeSpeed: number;
|
|
7
|
+
thousands: boolean;
|
|
8
|
+
className: string;
|
|
9
|
+
style: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const CountUp: FunctionComponent<Partial<CountUpProps>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface AvatarProps {
|
|
3
|
+
size: AvatarSize;
|
|
4
|
+
icon: string;
|
|
5
|
+
shape: AvatarShape;
|
|
6
|
+
bgColor: string;
|
|
7
|
+
prefixCls: string;
|
|
8
|
+
src: string;
|
|
9
|
+
className: string;
|
|
10
|
+
style: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare type AvatarSize = 'large' | 'normal' | 'small';
|
|
13
|
+
export declare type AvatarShape = 'round' | 'square';
|
|
14
|
+
export declare const Avatar: FunctionComponent<Partial<AvatarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
+
export interface BackTopProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
bottom: number;
|
|
5
|
+
right: number;
|
|
6
|
+
elId: string;
|
|
7
|
+
distance: number;
|
|
8
|
+
zIndex: number;
|
|
9
|
+
isAnimation: boolean;
|
|
10
|
+
duration: number;
|
|
11
|
+
children?: HTMLElement | any;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
backTopClick: (event: MouseEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const BackTop: FunctionComponent<Partial<BackTopProps>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export interface BadgeProps {
|
|
3
|
+
value: any;
|
|
4
|
+
dot: boolean;
|
|
5
|
+
max: Number;
|
|
6
|
+
top: string;
|
|
7
|
+
right: string;
|
|
8
|
+
zIndex: string;
|
|
9
|
+
color: string;
|
|
10
|
+
icons: any;
|
|
11
|
+
}
|
|
12
|
+
export declare type BadgeType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
13
|
+
export declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BarrageProps {
|
|
3
|
+
className: string;
|
|
4
|
+
style: React.CSSProperties;
|
|
5
|
+
barrageList: Array<string>;
|
|
6
|
+
frequency: number;
|
|
7
|
+
loop: boolean;
|
|
8
|
+
speeds: number;
|
|
9
|
+
rows: number;
|
|
10
|
+
top: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const Barrage: React.ForwardRefExoticComponent<Partial<BarrageProps> & React.RefAttributes<unknown>>;
|