@nutui/nutui-react 2.3.11 → 2.3.12
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/CHANGELOG.md +18 -0
- package/dist/esm/ActionSheet.js +30 -86
- package/dist/esm/Address.js +80 -184
- package/dist/esm/Animate.js +21 -49
- package/dist/esm/AnimatingNumbers.js +47 -136
- package/dist/esm/Audio.js +88 -159
- package/dist/esm/Avatar.js +44 -91
- package/dist/esm/AvatarCropper.js +149 -268
- package/dist/esm/AvatarGroup.js +13 -44
- package/dist/esm/BackTop.js +34 -75
- package/dist/esm/Badge.js +0 -3
- package/dist/esm/Barrage.js +49 -83
- package/dist/esm/Button.js +0 -4
- package/dist/esm/Calendar.js +27 -119
- package/dist/esm/CalendarCard.js +180 -291
- package/dist/esm/CalendarItem.js +253 -314
- package/dist/esm/Card.js +38 -72
- package/dist/esm/Cascader.js +0 -17
- package/dist/esm/Cell.js +27 -62
- package/dist/esm/CellGroup.js +16 -45
- package/dist/esm/Checkbox.js +0 -6
- package/dist/esm/CheckboxGroup.js +49 -88
- package/dist/esm/CircleProgress.js +42 -93
- package/dist/esm/Col.js +17 -48
- package/dist/esm/Collapse.js +18 -49
- package/dist/esm/CollapseItem.js +0 -3
- package/dist/esm/ConfigProvider.js +3 -4
- package/dist/esm/CountDown.js +62 -101
- package/dist/esm/DatePicker.js +87 -127
- package/dist/esm/Dialog.js +117 -203
- package/dist/esm/Divider.js +16 -36
- package/dist/esm/Drag.js +32 -76
- package/dist/esm/Elevator.js +94 -133
- package/dist/esm/Ellipsis.js +71 -92
- package/dist/esm/Empty.js +31 -71
- package/dist/esm/FixedNav.js +32 -81
- package/dist/esm/Form.js +28 -61
- package/dist/esm/FormItem.js +0 -3
- package/dist/esm/Grid.js +27 -52
- package/dist/esm/GridItem.js +0 -4
- package/dist/esm/Image.js +47 -102
- package/dist/esm/ImagePreview.js +82 -135
- package/dist/esm/Indicator.js +0 -2
- package/dist/esm/InfiniteLoading.js +77 -159
- package/dist/esm/Input.js +57 -125
- package/dist/esm/InputNumber.js +66 -96
- package/dist/esm/Layout.js +4 -28
- package/dist/esm/Loading.js +13 -40
- package/dist/esm/Menu.js +51 -114
- package/dist/esm/MenuItem.js +0 -13
- package/dist/esm/NavBar.js +46 -85
- package/dist/esm/NoticeBar.js +153 -226
- package/dist/esm/Notify.js +87 -195
- package/dist/esm/NumberKeyboard.js +84 -150
- package/dist/esm/Overlay.js +0 -8
- package/dist/esm/Pagination.js +58 -97
- package/dist/esm/Picker.js +215 -283
- package/dist/esm/Popover.js +111 -160
- package/dist/esm/Popup.js +0 -12
- package/dist/esm/Price.js +23 -60
- package/dist/esm/Progress.js +47 -77
- package/dist/esm/PullToRefresh.js +94 -202
- package/dist/esm/Radio.js +0 -6
- package/dist/esm/RadioGroup.js +23 -56
- package/dist/esm/Range.js +113 -177
- package/dist/esm/Rate.js +48 -95
- package/dist/esm/Row.js +19 -43
- package/dist/esm/SafeArea.js +0 -2
- package/dist/esm/SearchBar.js +52 -119
- package/dist/esm/ShortPassword.js +58 -106
- package/dist/esm/SideNavBar.js +34 -59
- package/dist/esm/SideNavBarItem.js +7 -36
- package/dist/esm/Signature.js +49 -84
- package/dist/esm/Skeleton.js +31 -68
- package/dist/esm/Space.js +7 -34
- package/dist/esm/Step.js +35 -64
- package/dist/esm/Steps.js +16 -40
- package/dist/esm/Sticky.js +64 -109
- package/dist/esm/SubSideNavBar.js +42 -71
- package/dist/esm/Swipe.js +79 -143
- package/dist/esm/Swiper.js +136 -183
- package/dist/esm/SwiperItem.js +13 -38
- package/dist/esm/Switch.js +20 -53
- package/dist/esm/TabPane.js +6 -30
- package/dist/esm/Tabbar.js +29 -60
- package/dist/esm/TabbarItem.js +0 -4
- package/dist/esm/Table.js +92 -141
- package/dist/esm/Tabs.js +0 -7
- package/dist/esm/Tag.js +30 -74
- package/dist/esm/TextArea.js +37 -82
- package/dist/esm/TimeDetail.js +20 -58
- package/dist/esm/TimeSelect.js +57 -95
- package/dist/esm/Toast.js +110 -219
- package/dist/esm/Tour.js +88 -132
- package/dist/esm/TrendArrow.js +32 -74
- package/dist/esm/Uploader.js +226 -346
- package/dist/esm/UserContext.js +1 -1
- package/dist/esm/Video.js +34 -67
- package/dist/esm/VirtualList.js +127 -160
- package/dist/esm/WaterMark.js +24 -68
- package/dist/esm/badge2.js +23 -53
- package/dist/esm/button2.js +30 -63
- package/dist/esm/can-use-dom.js +1 -1
- package/dist/esm/cascader2.js +308 -538
- package/dist/esm/checkbox2.js +59 -96
- package/dist/esm/collapseitem2.js +48 -86
- package/dist/esm/configprovider2.js +43 -1003
- package/dist/esm/context.js +1 -1
- package/dist/esm/context2.js +1 -1
- package/dist/esm/context3.js +1 -1
- package/dist/esm/context4.js +1 -1
- package/dist/esm/context5.js +8 -8
- package/dist/esm/date.js +88 -66
- package/dist/esm/formitem2.js +236 -1526
- package/dist/esm/get-scroll-parent.js +8 -10
- package/dist/esm/griditem2.js +34 -52
- package/dist/esm/index.js +5 -12
- package/dist/esm/indicator2.js +13 -42
- package/dist/esm/menuitem2.js +81 -124
- package/dist/esm/overlay2.js +39 -78
- package/dist/esm/pad-zero.js +3 -4
- package/dist/esm/popup2.js +79 -124
- package/dist/esm/px-check.js +2 -2
- package/dist/esm/radio2.js +48 -79
- package/dist/esm/raf.js +5 -3
- package/dist/esm/render.js +17 -54
- package/dist/esm/safearea2.js +3 -5
- package/dist/esm/supports-passive.js +3 -3
- package/dist/esm/tabbaritem2.js +42 -58
- package/dist/esm/tabs2.js +82 -120
- package/dist/esm/tslib.es6.js +47 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
- package/dist/esm/typings.js +1 -1
- package/dist/esm/use-click-away.js +9 -13
- package/dist/esm/use-client-rect.js +4 -4
- package/dist/esm/use-props-value.js +10 -15
- package/dist/esm/use-refs.js +5 -7
- package/dist/esm/use-touch.js +16 -20
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +465 -485
- package/dist/nutui.react.umd.js +462 -482
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/types/index.d.ts +98 -98
- package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
- package/dist/types/packages/address/address.d.ts +1 -1
- package/dist/types/packages/address/address.taro.d.ts +1 -1
- package/dist/types/packages/address/customRender.d.ts +1 -1
- package/dist/types/packages/address/customRender.taro.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
- package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +1 -1
- package/dist/types/packages/cell/cell.taro.d.ts +1 -1
- package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
- package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/index.d.ts +2 -2
- package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
- package/dist/types/packages/empty/empty.d.ts +16 -4
- package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
- package/dist/types/packages/form/form.d.ts +1 -1
- package/dist/types/packages/form/form.taro.d.ts +1 -1
- package/dist/types/packages/form/index.d.ts +1 -1
- package/dist/types/packages/form/index.taro.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +2 -0
- package/dist/types/packages/menu/menu.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
- package/dist/types/packages/nutui.react.d.ts +98 -98
- package/dist/types/packages/nutui.react.taro.d.ts +98 -98
- package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
- package/dist/types/packages/picker/picker.d.ts +1 -1
- package/dist/types/packages/picker/picker.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +1 -1
- package/dist/types/packages/popup/popup.d.ts +1 -1
- package/dist/types/packages/popup/popup.taro.d.ts +1 -1
- package/dist/types/packages/radio/radio.d.ts +2 -2
- package/dist/types/packages/radio/radio.taro.d.ts +2 -2
- package/dist/types/packages/rate/rate.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
- package/dist/types/packages/swiper/index.d.ts +1 -1
- package/dist/types/packages/swiper/index.taro.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
- package/dist/types/packages/tour/tour.d.ts +1 -1
- package/dist/types/packages/tour/tour.taro.d.ts +1 -1
- package/package.json +5 -1
package/dist/esm/Dialog.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
var _excluded = ["visible", "footer", "hideConfirmButton", "hideCancelButton", "lockScroll", "disableConfirmButton", "closeOnOverlayClick", "confirmText", "cancelText", "closeIconPosition", "closeIcon", "onClose", "onCancel", "onConfirm", "beforeCancel", "beforeClose"];
|
|
4
|
-
function ownKeys(e, r) {
|
|
5
|
-
var t = Object.keys(e);
|
|
6
|
-
if (Object.getOwnPropertySymbols) {
|
|
7
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
8
|
-
r && (o = o.filter(function(r2) {
|
|
9
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
10
|
-
})), t.push.apply(t, o);
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
}
|
|
14
|
-
function _objectSpread(e) {
|
|
15
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
16
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
17
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
18
|
-
_defineProperty(e, r2, t[r2]);
|
|
19
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
20
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return e;
|
|
24
|
-
}
|
|
1
|
+
import { _ as __rest } from "./tslib.es6.js";
|
|
25
2
|
import React__default, { forwardRef } from "react";
|
|
26
3
|
import classNames from "classnames";
|
|
27
4
|
import { Close } from "@nutui/icons-react";
|
|
@@ -32,17 +9,12 @@ import { d as defaultOverlayProps } from "./overlay2.js";
|
|
|
32
9
|
import { C as ComponentDefaults } from "./typings.js";
|
|
33
10
|
import Overlay from "./Overlay.js";
|
|
34
11
|
import { useConfig } from "./ConfigProvider.js";
|
|
35
|
-
import "react-dom";
|
|
36
|
-
import "./use-touch.js";
|
|
37
|
-
import "./get-scroll-parent.js";
|
|
38
|
-
import "./can-use-dom.js";
|
|
39
|
-
import "./supports-passive.js";
|
|
40
12
|
function ConfirmDialog(props) {
|
|
41
|
-
return React__default.createElement(Dialog,
|
|
13
|
+
return React__default.createElement(Dialog, Object.assign({}, props), props.content);
|
|
42
14
|
}
|
|
43
|
-
|
|
15
|
+
const normalizeConfig = (config) => {
|
|
44
16
|
if (config.isNotice) {
|
|
45
|
-
|
|
17
|
+
let { icon } = config;
|
|
46
18
|
if (!icon && icon !== null) {
|
|
47
19
|
switch (config.noticeType) {
|
|
48
20
|
case "alert":
|
|
@@ -54,67 +26,59 @@ var normalizeConfig = function normalizeConfig2(config) {
|
|
|
54
26
|
}
|
|
55
27
|
return config;
|
|
56
28
|
};
|
|
57
|
-
|
|
58
|
-
|
|
29
|
+
const confirm = (config, renderFunc) => {
|
|
30
|
+
const div = document.createElement("div");
|
|
59
31
|
document.body.appendChild(div);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var render$1 = function render$12(props, callback) {
|
|
64
|
-
render(React__default.createElement(ConfirmDialog, _objectSpread(_objectSpread({}, props), {}, {
|
|
65
|
-
onCancel: function onCancel2() {
|
|
66
|
-
return _onCancel();
|
|
67
|
-
}
|
|
68
|
-
})), div);
|
|
32
|
+
let dialogConfig = Object.assign(Object.assign({}, config), { visible: false });
|
|
33
|
+
const render$1 = (props, callback) => {
|
|
34
|
+
render(React__default.createElement(ConfirmDialog, Object.assign({}, props, { onCancel: () => onCancel() })), div);
|
|
69
35
|
callback && callback();
|
|
70
36
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
37
|
+
const renderFunction = renderFunc || render$1;
|
|
38
|
+
const onConfirm = () => {
|
|
39
|
+
const _onConfirm = config.onConfirm || config.onConfirm;
|
|
40
|
+
const ret = _onConfirm === null || _onConfirm === void 0 ? void 0 : _onConfirm();
|
|
75
41
|
if (ret && ret.then) {
|
|
76
42
|
renderFunction(dialogConfig);
|
|
77
|
-
ret.then(
|
|
78
|
-
|
|
79
|
-
},
|
|
43
|
+
ret.then(() => {
|
|
44
|
+
onCancel(true);
|
|
45
|
+
}, (e) => {
|
|
80
46
|
console.error(e);
|
|
81
47
|
renderFunction(dialogConfig);
|
|
82
48
|
});
|
|
83
49
|
}
|
|
84
50
|
if (!ret) {
|
|
85
|
-
|
|
51
|
+
onCancel(true);
|
|
86
52
|
}
|
|
87
53
|
};
|
|
88
54
|
dialogConfig.onConfirm = onConfirm;
|
|
89
55
|
dialogConfig = normalizeConfig(dialogConfig);
|
|
90
56
|
dialogConfig.visible = true;
|
|
91
57
|
renderFunction(dialogConfig);
|
|
92
|
-
|
|
58
|
+
const destroy = () => {
|
|
93
59
|
unmount(div);
|
|
94
|
-
if (div
|
|
60
|
+
if (div === null || div === void 0 ? void 0 : div.parentNode) {
|
|
95
61
|
div.parentNode.removeChild(div);
|
|
96
62
|
}
|
|
97
63
|
};
|
|
98
|
-
|
|
99
|
-
!
|
|
64
|
+
const onCancel = (confirm2) => {
|
|
65
|
+
!confirm2 && config.onCancel && config.onCancel();
|
|
100
66
|
dialogConfig.visible = false;
|
|
101
|
-
dialogConfig.onClose =
|
|
67
|
+
dialogConfig.onClose = () => {
|
|
102
68
|
config.onClose && config.onClose();
|
|
103
69
|
};
|
|
104
|
-
renderFunction(dialogConfig,
|
|
70
|
+
renderFunction(dialogConfig, () => {
|
|
105
71
|
destroy();
|
|
106
72
|
});
|
|
107
73
|
};
|
|
108
|
-
|
|
109
|
-
dialogConfig =
|
|
110
|
-
title: config.title
|
|
111
|
-
}, newConfig);
|
|
74
|
+
const update = (newConfig) => {
|
|
75
|
+
dialogConfig = Object.assign(Object.assign(Object.assign({}, dialogConfig), { title: config.title }), newConfig);
|
|
112
76
|
dialogConfig = normalizeConfig(dialogConfig);
|
|
113
77
|
renderFunction(dialogConfig);
|
|
114
78
|
};
|
|
115
|
-
|
|
79
|
+
const close = () => {
|
|
116
80
|
dialogConfig.visible = false;
|
|
117
|
-
dialogConfig.onClose =
|
|
81
|
+
dialogConfig.onClose = () => {
|
|
118
82
|
config.onClose && config.onClose();
|
|
119
83
|
destroy();
|
|
120
84
|
};
|
|
@@ -125,176 +89,126 @@ var confirm = function confirm2(config, renderFunc) {
|
|
|
125
89
|
update
|
|
126
90
|
};
|
|
127
91
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return title ? React__default.createElement("div", {
|
|
134
|
-
className: "".concat(classPrefix, "-header")
|
|
135
|
-
}, title) : null;
|
|
92
|
+
const Content = (props) => {
|
|
93
|
+
const { visible, title, header, footer, close, footerDirection, onClick, children } = props;
|
|
94
|
+
const classPrefix = "nut-dialog";
|
|
95
|
+
const renderHeader = () => {
|
|
96
|
+
return title ? React__default.createElement("div", { className: `${classPrefix}-header` }, title) : null;
|
|
136
97
|
};
|
|
137
|
-
|
|
138
|
-
return footer ? React__default.createElement("div", {
|
|
139
|
-
|
|
140
|
-
}, footer) : null;
|
|
98
|
+
const renderFooter = () => {
|
|
99
|
+
return footer ? React__default.createElement("div", { className: classNames(`${classPrefix}-footer`, {
|
|
100
|
+
[footerDirection]: footerDirection
|
|
101
|
+
}) }, footer) : null;
|
|
141
102
|
};
|
|
142
|
-
|
|
103
|
+
const handleClick = (e) => {
|
|
143
104
|
onClick && onClick(e);
|
|
144
105
|
};
|
|
145
|
-
return React__default.createElement(
|
|
146
|
-
|
|
147
|
-
style: props.style,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
106
|
+
return React__default.createElement(
|
|
107
|
+
"div",
|
|
108
|
+
{ className: classNames(`${classPrefix}-outer`, props.className), style: props.style, onClick: (e) => handleClick(e) },
|
|
109
|
+
close,
|
|
110
|
+
header,
|
|
111
|
+
React__default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{ className: classPrefix, style: { display: visible ? "flex" : "none" } },
|
|
114
|
+
renderHeader(),
|
|
115
|
+
React__default.createElement(
|
|
116
|
+
"div",
|
|
117
|
+
{ className: `${classPrefix}-content` },
|
|
118
|
+
React__default.createElement(React__default.Fragment, null, children)
|
|
119
|
+
),
|
|
120
|
+
renderFooter()
|
|
121
|
+
)
|
|
122
|
+
);
|
|
159
123
|
};
|
|
160
124
|
Content.displayName = "NutContent";
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
onClose: function onClose() {
|
|
168
|
-
},
|
|
169
|
-
onOverlayClick: function onOverlayClick(e) {
|
|
170
|
-
return true;
|
|
171
|
-
}
|
|
172
|
-
}, defaultOverlayProps);
|
|
173
|
-
var DialogWrap = function DialogWrap2(props) {
|
|
174
|
-
var visible = props.visible, overlay = props.overlay, overlayStyle = props.overlayStyle, overlayClassName = props.overlayClassName, closeOnOverlayClick = props.closeOnOverlayClick, lockScroll = props.lockScroll, onClose2 = props.onClose, onCancel2 = props.onCancel, onOverlayClick2 = props.onOverlayClick;
|
|
175
|
-
var onHandleClickOverlay = function onHandleClickOverlay2(e) {
|
|
125
|
+
const defaultDialogProps = Object.assign(Object.assign(Object.assign({}, ComponentDefaults), { overlay: true, overlayStyle: {}, overlayClassName: "", onCancel: () => {
|
|
126
|
+
}, onClose: () => {
|
|
127
|
+
}, onOverlayClick: (e) => true }), defaultOverlayProps);
|
|
128
|
+
const DialogWrap = (props) => {
|
|
129
|
+
const { visible, overlay, overlayStyle, overlayClassName, closeOnOverlayClick, lockScroll, onClose, onCancel, onOverlayClick } = props;
|
|
130
|
+
const onHandleClickOverlay = (e) => {
|
|
176
131
|
if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
|
|
177
|
-
|
|
178
|
-
closed && (
|
|
179
|
-
closed && (
|
|
132
|
+
const closed = onOverlayClick && onOverlayClick(e);
|
|
133
|
+
closed && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
134
|
+
closed && (onCancel === null || onCancel === void 0 ? void 0 : onCancel());
|
|
180
135
|
}
|
|
181
136
|
};
|
|
182
|
-
return React__default.createElement(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
visible,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
classNames: "fadeDialog",
|
|
193
|
-
unmountOnExit: true,
|
|
194
|
-
appear: true
|
|
195
|
-
}, React__default.createElement(Content, _objectSpread(_objectSpread({}, props), {}, {
|
|
196
|
-
visible
|
|
197
|
-
}))));
|
|
137
|
+
return React__default.createElement(
|
|
138
|
+
React__default.Fragment,
|
|
139
|
+
null,
|
|
140
|
+
overlay ? React__default.createElement(Overlay, { style: overlayStyle, className: classNames("nut-dialog-overlay", overlayClassName), visible, closeOnOverlayClick, lockScroll, onClick: onHandleClickOverlay }) : null,
|
|
141
|
+
React__default.createElement(
|
|
142
|
+
CSSTransition,
|
|
143
|
+
{ in: visible, timeout: 300, classNames: "fadeDialog", unmountOnExit: true, appear: true },
|
|
144
|
+
React__default.createElement(Content, Object.assign({}, props, { visible }))
|
|
145
|
+
)
|
|
146
|
+
);
|
|
198
147
|
};
|
|
199
148
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
200
149
|
DialogWrap.displayName = "NutDialogWrap";
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
closeOnOverlayClick
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
disableConfirmButton: false,
|
|
209
|
-
footerDirection: "horizontal",
|
|
210
|
-
lockScroll: true,
|
|
211
|
-
closeIconPosition: "top-right",
|
|
212
|
-
closeIcon: false,
|
|
213
|
-
beforeCancel: function beforeCancel() {
|
|
214
|
-
return true;
|
|
215
|
-
},
|
|
216
|
-
beforeClose: function beforeClose() {
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
var BaseDialog = function BaseDialog2(props, ref) {
|
|
221
|
-
var _useConfig = useConfig(), locale = _useConfig.locale;
|
|
222
|
-
var visible = props.visible, footer = props.footer, hideConfirmButton = props.hideConfirmButton, hideCancelButton = props.hideCancelButton, lockScroll = props.lockScroll, disableConfirmButton = props.disableConfirmButton, closeOnOverlayClick = props.closeOnOverlayClick, confirmText = props.confirmText, cancelText = props.cancelText, closeIconPosition = props.closeIconPosition, closeIcon = props.closeIcon, onClose2 = props.onClose, onCancel2 = props.onCancel, onConfirm = props.onConfirm, beforeCancel2 = props.beforeCancel, beforeClose2 = props.beforeClose, restProps = _objectWithoutProperties(props, _excluded);
|
|
223
|
-
var classPrefix = "nut-dialog";
|
|
224
|
-
var renderFooter = function renderFooter2() {
|
|
150
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { confirmText: "", cancelText: "", overlay: true, closeOnOverlayClick: true, hideConfirmButton: false, hideCancelButton: false, disableConfirmButton: false, footerDirection: "horizontal", lockScroll: true, closeIconPosition: "top-right", closeIcon: false, beforeCancel: () => true, beforeClose: () => true });
|
|
151
|
+
const BaseDialog = (props, ref) => {
|
|
152
|
+
const { locale } = useConfig();
|
|
153
|
+
const { visible, footer, hideConfirmButton, hideCancelButton, lockScroll, disableConfirmButton, closeOnOverlayClick, confirmText, cancelText, closeIconPosition, closeIcon, onClose, onCancel, onConfirm, beforeCancel, beforeClose } = props;
|
|
154
|
+
__rest(props, ["visible", "footer", "hideConfirmButton", "hideCancelButton", "lockScroll", "disableConfirmButton", "closeOnOverlayClick", "confirmText", "cancelText", "closeIconPosition", "closeIcon", "onClose", "onCancel", "onConfirm", "beforeCancel", "beforeClose"]);
|
|
155
|
+
const classPrefix = "nut-dialog";
|
|
156
|
+
const renderFooter = () => {
|
|
225
157
|
if (footer === null)
|
|
226
158
|
return "";
|
|
227
|
-
|
|
159
|
+
const handleCancel = (e) => {
|
|
228
160
|
e.stopPropagation();
|
|
229
|
-
if (!(
|
|
161
|
+
if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel()))
|
|
230
162
|
return;
|
|
231
|
-
if (!(
|
|
163
|
+
if (!(beforeClose === null || beforeClose === void 0 ? void 0 : beforeClose()))
|
|
232
164
|
return;
|
|
233
|
-
|
|
234
|
-
|
|
165
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
166
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
235
167
|
};
|
|
236
|
-
|
|
168
|
+
const handleOk = (e) => {
|
|
237
169
|
e.stopPropagation();
|
|
238
|
-
|
|
239
|
-
onConfirm === null || onConfirm === void 0
|
|
170
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
171
|
+
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(e);
|
|
240
172
|
};
|
|
241
|
-
return footer || React__default.createElement(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
}, cancelText || locale.cancel), !hideConfirmButton && React__default.createElement(Button, {
|
|
248
|
-
type: "primary",
|
|
249
|
-
className: classNames("".concat(classPrefix, "-footer-ok"), {
|
|
173
|
+
return footer || React__default.createElement(
|
|
174
|
+
React__default.Fragment,
|
|
175
|
+
null,
|
|
176
|
+
!hideCancelButton && React__default.createElement(Button, { type: "default", className: `${classPrefix}-footer-cancel`, onClick: (e) => handleCancel(e) }, cancelText || locale.cancel),
|
|
177
|
+
!hideConfirmButton && React__default.createElement(Button, { type: "primary", className: classNames(`${classPrefix}-footer-ok`, {
|
|
250
178
|
disabled: disableConfirmButton
|
|
251
|
-
}),
|
|
252
|
-
|
|
253
|
-
onClick: function onClick(e) {
|
|
254
|
-
return handleOk(e);
|
|
255
|
-
}
|
|
256
|
-
}, confirmText || locale.confirm));
|
|
179
|
+
}), disabled: disableConfirmButton, onClick: (e) => handleOk(e) }, confirmText || locale.confirm)
|
|
180
|
+
);
|
|
257
181
|
};
|
|
258
|
-
|
|
182
|
+
const renderCloseIcon = () => {
|
|
259
183
|
if (!closeIcon)
|
|
260
184
|
return null;
|
|
261
|
-
|
|
262
|
-
if (!(
|
|
185
|
+
const handleCancel = () => {
|
|
186
|
+
if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel()))
|
|
263
187
|
return;
|
|
264
|
-
if (!(
|
|
188
|
+
if (!(beforeClose === null || beforeClose === void 0 ? void 0 : beforeClose()))
|
|
265
189
|
return;
|
|
266
|
-
|
|
267
|
-
|
|
190
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
191
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
268
192
|
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}, React__default.isValidElement(closeIcon) ? closeIcon : React__default.createElement(Close, null));
|
|
193
|
+
const closeClasses = classNames({
|
|
194
|
+
[`${classPrefix}-close`]: true,
|
|
195
|
+
[`${classPrefix}-close-${closeIconPosition}`]: true
|
|
196
|
+
});
|
|
197
|
+
return React__default.createElement("div", { className: closeClasses, onClick: handleCancel }, React__default.isValidElement(closeIcon) ? closeIcon : React__default.createElement(Close, null));
|
|
274
198
|
};
|
|
275
|
-
return React__default.createElement(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
visible,
|
|
281
|
-
lockScroll,
|
|
282
|
-
footer: renderFooter(),
|
|
283
|
-
close: renderCloseIcon(),
|
|
284
|
-
onClose: onClose2,
|
|
285
|
-
onCancel: onCancel2
|
|
286
|
-
})));
|
|
199
|
+
return React__default.createElement(
|
|
200
|
+
"div",
|
|
201
|
+
{ style: { display: visible ? "block" : "none" } },
|
|
202
|
+
React__default.createElement(DialogWrap, Object.assign({}, props, { visible, lockScroll, footer: renderFooter(), close: renderCloseIcon(), onClose, onCancel }))
|
|
203
|
+
);
|
|
287
204
|
};
|
|
288
|
-
|
|
289
|
-
Dialog.confirm =
|
|
290
|
-
return confirm
|
|
205
|
+
const Dialog = forwardRef(BaseDialog);
|
|
206
|
+
Dialog.confirm = (props) => {
|
|
207
|
+
return confirm(props);
|
|
291
208
|
};
|
|
292
|
-
["alert"].forEach(
|
|
293
|
-
Dialog[type] =
|
|
294
|
-
return confirm
|
|
295
|
-
isNotice: false,
|
|
296
|
-
noticeType: type
|
|
297
|
-
}));
|
|
209
|
+
["alert"].forEach((type) => {
|
|
210
|
+
Dialog[type] = (props) => {
|
|
211
|
+
return confirm(Object.assign(Object.assign({}, props), { isNotice: false, noticeType: type }));
|
|
298
212
|
};
|
|
299
213
|
});
|
|
300
214
|
Dialog.defaultProps = defaultProps;
|
package/dist/esm/Divider.js
CHANGED
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
var _excluded = ["children", "contentPosition", "style", "className", "direction"];
|
|
4
|
-
function ownKeys(e, r) {
|
|
5
|
-
var t = Object.keys(e);
|
|
6
|
-
if (Object.getOwnPropertySymbols) {
|
|
7
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
8
|
-
r && (o = o.filter(function(r2) {
|
|
9
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
10
|
-
})), t.push.apply(t, o);
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
}
|
|
14
|
-
function _objectSpread(e) {
|
|
15
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
16
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
17
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
18
|
-
_defineProperty(e, r2, t[r2]);
|
|
19
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
20
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return e;
|
|
24
|
-
}
|
|
1
|
+
import { _ as __rest } from "./tslib.es6.js";
|
|
25
2
|
import React__default from "react";
|
|
26
3
|
import classNames from "classnames";
|
|
27
4
|
import { C as ComponentDefaults } from "./typings.js";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
5
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { contentPosition: "center", direction: "horizontal" });
|
|
6
|
+
const classPrefix = `nut-divider`;
|
|
7
|
+
const Divider = (props) => {
|
|
8
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, contentPosition, style, className, direction } = _a, rest = __rest(_a, ["children", "contentPosition", "style", "className", "direction"]);
|
|
9
|
+
const classes = direction === "horizontal" ? classNames({
|
|
10
|
+
[`${classPrefix}`]: true,
|
|
11
|
+
[`${classPrefix}-center`]: children,
|
|
12
|
+
[`${classPrefix}-left`]: contentPosition === "left",
|
|
13
|
+
[`${classPrefix}-right`]: contentPosition === "right",
|
|
14
|
+
[`${classPrefix}-hairline`]: true
|
|
15
|
+
}) : classNames({
|
|
16
|
+
[`${classPrefix}`]: true,
|
|
17
|
+
[`${classPrefix}-vertical`]: direction === "vertical"
|
|
18
|
+
});
|
|
19
|
+
return React__default.createElement("div", Object.assign({ className: `${classes} ${className || ""}`, style }, rest), children);
|
|
40
20
|
};
|
|
41
21
|
Divider.defaultProps = defaultProps;
|
|
42
22
|
Divider.displayName = "NutDivider";
|
package/dist/esm/Drag.js
CHANGED
|
@@ -1,60 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["attract", "direction", "boundary", "children", "className", "style"];
|
|
5
|
-
function ownKeys(e, r) {
|
|
6
|
-
var t = Object.keys(e);
|
|
7
|
-
if (Object.getOwnPropertySymbols) {
|
|
8
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
9
|
-
r && (o = o.filter(function(r2) {
|
|
10
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
11
|
-
})), t.push.apply(t, o);
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
}
|
|
15
|
-
function _objectSpread(e) {
|
|
16
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
17
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
18
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
19
|
-
_defineProperty(e, r2, t[r2]);
|
|
20
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
21
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return e;
|
|
25
|
-
}
|
|
1
|
+
import { _ as __rest } from "./tslib.es6.js";
|
|
26
2
|
import React__default, { useState, useRef, useEffect } from "react";
|
|
27
3
|
import { useDrag } from "@use-gesture/react";
|
|
28
4
|
import { useSpring, animated } from "@react-spring/web";
|
|
29
5
|
import { C as ComponentDefaults } from "./typings.js";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
y: 0
|
|
49
|
-
};
|
|
50
|
-
}), _useSpring2 = _slicedToArray(_useSpring, 2), currstyle = _useSpring2[0], api = _useSpring2[1];
|
|
51
|
-
var middleLine = useRef(0);
|
|
52
|
-
var getInfo = function getInfo2() {
|
|
53
|
-
var el = myDrag.current;
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { attract: false, direction: void 0, boundary: {
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
bottom: 0
|
|
11
|
+
} });
|
|
12
|
+
const Drag = (props) => {
|
|
13
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { attract, direction, boundary, children, className, style } = _a, reset = __rest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
|
|
14
|
+
const classPrefix = "nut-drag";
|
|
15
|
+
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
16
|
+
const myDrag = useRef(null);
|
|
17
|
+
const [currstyle, api] = useSpring(() => ({
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0
|
|
20
|
+
}));
|
|
21
|
+
const middleLine = useRef(0);
|
|
22
|
+
const getInfo = () => {
|
|
23
|
+
const el = myDrag.current;
|
|
54
24
|
if (el) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
25
|
+
const { offsetWidth, offsetHeight, offsetTop, offsetLeft } = el;
|
|
26
|
+
const { clientWidth, clientHeight } = document.documentElement;
|
|
27
|
+
const { top, left, bottom, right } = boundary;
|
|
58
28
|
setBoundaryState({
|
|
59
29
|
top: -offsetTop + top,
|
|
60
30
|
left: -offsetLeft + left,
|
|
@@ -64,21 +34,12 @@ var Drag = function Drag2(props) {
|
|
|
64
34
|
middleLine.current = clientWidth - offsetWidth - offsetLeft - (clientWidth - offsetWidth) / 2;
|
|
65
35
|
}
|
|
66
36
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
api.start({
|
|
70
|
-
x,
|
|
71
|
-
y,
|
|
72
|
-
immediate: down
|
|
73
|
-
});
|
|
37
|
+
const bind = useDrag(({ down, last, offset: [x, y] }) => {
|
|
38
|
+
api.start({ x, y, immediate: down });
|
|
74
39
|
if (last) {
|
|
75
40
|
if (props.direction !== "y" && props.attract) {
|
|
76
41
|
if (x < middleLine.current) {
|
|
77
|
-
api.start({
|
|
78
|
-
x: boundaryState.left,
|
|
79
|
-
y,
|
|
80
|
-
immediate: down
|
|
81
|
-
});
|
|
42
|
+
api.start({ x: boundaryState.left, y, immediate: down });
|
|
82
43
|
} else {
|
|
83
44
|
api.start({
|
|
84
45
|
x: boundaryState.right,
|
|
@@ -89,23 +50,18 @@ var Drag = function Drag2(props) {
|
|
|
89
50
|
}
|
|
90
51
|
}
|
|
91
52
|
}, {
|
|
92
|
-
from:
|
|
93
|
-
return [currstyle.x.get(), currstyle.y.get()];
|
|
94
|
-
},
|
|
53
|
+
from: () => [currstyle.x.get(), currstyle.y.get()],
|
|
95
54
|
axis: direction,
|
|
96
55
|
bounds: boundaryState
|
|
97
56
|
});
|
|
98
|
-
useEffect(
|
|
57
|
+
useEffect(() => {
|
|
99
58
|
getInfo();
|
|
100
59
|
}, [myDrag]);
|
|
101
|
-
return React__default.createElement(
|
|
102
|
-
|
|
103
|
-
className:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}), React__default.createElement(animated.div, _objectSpread({
|
|
107
|
-
style: currstyle
|
|
108
|
-
}, bind()), children));
|
|
60
|
+
return React__default.createElement(
|
|
61
|
+
"div",
|
|
62
|
+
Object.assign({ style, className: `${classPrefix} ${className}` }, reset, { ref: myDrag }),
|
|
63
|
+
React__default.createElement(animated.div, Object.assign({ style: currstyle }, bind()), children)
|
|
64
|
+
);
|
|
109
65
|
};
|
|
110
66
|
Drag.defaultProps = defaultProps;
|
|
111
67
|
Drag.displayName = "NutDrag";
|