@nutui/nutui-react 0.1.0-beta.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -135
- package/dist/esm/ActionSheet/style/index.js +1 -0
- package/dist/esm/Address/style/index.js +1 -0
- package/dist/esm/AnimatingNumbers/style/index.js +1 -0
- package/dist/esm/Avatar/style/index.js +1 -0
- package/dist/esm/BackTop/style/index.js +1 -0
- package/dist/esm/BackTop.js +1 -3
- package/dist/esm/Badge/style/index.js +1 -0
- package/dist/esm/Barrage/style/index.js +1 -0
- package/dist/esm/Button/style/index.js +1 -0
- package/dist/esm/Button.js +110 -4
- package/dist/esm/Calendar/style/index.js +1 -0
- package/dist/esm/Calendar.js +86 -0
- package/dist/esm/CalendarItem/style/index.js +1 -0
- package/dist/esm/CalendarItem.js +554 -0
- package/dist/esm/Cell/style/index.js +1 -0
- package/dist/esm/Cell.js +1 -1
- package/dist/esm/CellGroup/style/index.js +1 -0
- package/dist/esm/CellGroup.js +33 -0
- package/dist/esm/Checkbox/style/index.js +1 -0
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/CheckboxGroup/style/index.js +1 -0
- package/dist/esm/CircleProgress/style/index.js +1 -0
- package/dist/esm/Col/style/index.js +1 -0
- package/dist/esm/Col.js +60 -0
- package/dist/esm/Collapse/style/index.js +1 -0
- package/dist/esm/CollapseItem/style/index.js +1 -0
- package/dist/esm/CollapseItem.js +142 -0
- package/dist/esm/Dialog/style/index.js +1 -0
- package/dist/esm/Dialog.js +327 -0
- package/dist/esm/Divider/style/index.js +1 -0
- package/dist/esm/Drag/style/index.js +1 -0
- package/dist/esm/Drag.js +83 -140
- package/dist/esm/Elevator/style/index.js +1 -0
- package/dist/esm/Elevator.js +3 -6
- package/dist/esm/FixedNav/style/index.js +1 -0
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/Icon/style/index.js +1 -0
- package/dist/esm/Icon.js +70 -4
- package/dist/esm/Infiniteloading/style/index.js +1 -0
- package/dist/esm/Input/style/index.js +1 -0
- package/dist/esm/Input.js +1 -1
- package/dist/esm/InputNumber/style/index.js +1 -0
- package/dist/esm/Layout/style/index.js +1 -0
- package/dist/esm/NavBar/style/index.js +1 -0
- package/dist/esm/NavBar.js +1 -1
- package/dist/esm/NoticeBar/style/index.js +1 -0
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/Notify/style/index.js +1 -0
- package/dist/esm/Overlay/style/index.js +1 -0
- package/dist/esm/Pagination/style/index.js +1 -0
- package/dist/esm/Picker/style/index.js +1 -0
- package/dist/esm/Picker.js +397 -0
- package/dist/esm/Popover/style/index.js +1 -0
- package/dist/esm/Popover.js +299 -0
- package/dist/esm/Popup/style/index.js +1 -0
- package/dist/esm/Popup.js +0 -3
- package/dist/esm/Price/style/index.js +1 -0
- package/dist/esm/Radio/style/index.js +1 -0
- package/dist/esm/Radio.js +2 -3
- package/dist/esm/RadioGroup/style/index.js +1 -0
- package/dist/esm/Range/style/index.js +1 -0
- package/dist/esm/Range.js +1 -4
- package/dist/esm/Rate/style/index.js +1 -0
- package/dist/esm/Rate.js +1 -1
- package/dist/esm/Row/style/index.js +1 -0
- package/dist/esm/Row.js +48 -0
- package/dist/esm/ShortPassword/style/index.js +1 -0
- package/dist/esm/ShortPassword.js +203 -0
- package/dist/esm/Signature/style/index.js +1 -0
- package/dist/esm/Signature.js +1 -2
- package/dist/esm/Step/style/index.js +1 -0
- package/dist/esm/Steps/style/index.js +1 -0
- package/dist/esm/Swiper/style/index.js +1 -0
- package/dist/esm/Swiper.js +517 -0
- package/dist/esm/SwiperItem/style/index.js +1 -0
- package/dist/esm/SwiperItem.js +64 -0
- package/dist/esm/Switch/style/index.js +1 -0
- package/dist/esm/Switch.js +85 -0
- package/dist/esm/Tabbar/style/index.js +1 -0
- package/dist/esm/Tabbar.js +1 -4
- package/dist/esm/TabbarItem/style/index.js +1 -0
- package/dist/esm/TabbarItem.js +1 -1
- package/dist/esm/Tag/style/index.js +1 -0
- package/dist/esm/TextArea/style/index.js +1 -0
- package/dist/esm/Toast/style/index.js +1 -0
- package/dist/esm/Toast.js +294 -7
- package/dist/esm/Uploader/style/index.js +1 -0
- package/dist/esm/UserContext-b4181162.js +3 -0
- package/dist/esm/UserContext-be8097d2.js +3 -0
- package/dist/esm/date-649fe493.js +112 -0
- package/dist/esm/nutui-react.es.js +28 -15
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +14 -0
- package/dist/esm/types/src/packages/calendar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +17 -0
- package/dist/esm/types/src/packages/calendaritem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/dialog/Confirm.d.ts +7 -0
- package/dist/esm/types/src/packages/dialog/Content.d.ts +10 -0
- package/dist/esm/types/src/packages/dialog/DialogWrap.d.ts +11 -0
- package/dist/esm/types/src/packages/dialog/DialogWrapper.d.ts +8 -0
- package/dist/esm/types/src/packages/dialog/Mask.d.ts +3 -0
- package/dist/esm/types/src/packages/dialog/config.d.ts +46 -0
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -0
- package/dist/esm/types/src/packages/dialog/index.d.ts +2 -0
- package/dist/esm/types/src/packages/drag/drag.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +29 -16
- package/dist/esm/types/src/packages/nutui.react.d.ts +29 -16
- package/dist/esm/types/src/packages/picker/index.d.ts +2 -0
- package/dist/esm/types/src/packages/picker/picker.d.ts +19 -0
- package/dist/esm/types/src/packages/picker/pickerSlot.d.ts +10 -0
- package/dist/esm/types/src/packages/popover/Trigger.d.ts +21 -0
- package/dist/esm/types/src/packages/popover/index.d.ts +2 -0
- package/dist/esm/types/src/packages/popover/popover.d.ts +13 -0
- package/dist/esm/types/src/packages/row/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/index.d.ts +2 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +21 -0
- package/dist/esm/types/src/packages/steps/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/swiper/UserContext.d.ts +2 -0
- package/dist/esm/types/src/packages/swiper/index.d.ts +2 -0
- package/dist/esm/types/src/packages/swiper/swiper.d.ts +26 -0
- package/dist/esm/types/src/packages/swiperitem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/swiperitem/swiperitem.d.ts +7 -0
- package/dist/nutui.react.es.js +10683 -4344
- package/dist/nutui.react.umd.js +26 -17
- package/dist/packages/actionsheet/actionsheet.scss +1 -0
- package/dist/packages/address/address.scss +3 -0
- package/dist/packages/animatingnumbers/animatingnumbers.scss +1 -1
- package/dist/packages/backtop/backtop.scss +1 -0
- package/dist/packages/button/button.scss +1 -1
- package/dist/packages/calendar/calendar.scss +200 -0
- package/dist/packages/calendaritem/calendaritem.scss +191 -0
- package/dist/packages/cell/cell.scss +2 -0
- package/dist/packages/checkbox/checkbox.scss +1 -1
- package/dist/packages/collapse/collapse.scss +1 -1
- package/dist/packages/collapseitem/collapseitem.scss +2 -0
- package/dist/packages/dialog/dialog.scss +129 -0
- package/dist/packages/drag/drag.scss +2 -1
- package/dist/packages/fixednav/fixednav.scss +5 -0
- package/dist/packages/icon/icon.scss +1 -1
- package/dist/packages/infiniteloading/infiniteloading.scss +1 -0
- package/dist/packages/input/input.scss +1 -0
- package/dist/packages/inputnumber/inputnumber.scss +1 -0
- package/dist/packages/navbar/navbar.scss +2 -0
- package/dist/packages/noticebar/noticebar.scss +2 -0
- package/dist/packages/picker/picker.scss +104 -0
- package/dist/packages/popover/popover.scss +142 -0
- package/dist/packages/popup/popup.scss +2 -0
- package/dist/packages/radio/radio.scss +2 -0
- package/dist/packages/range/range.scss +1 -0
- package/dist/packages/rate/rate.scss +2 -0
- package/dist/packages/shortpassword/shortpassword.scss +115 -0
- package/dist/packages/signature/signature.scss +1 -0
- package/dist/packages/step/step.scss +1 -0
- package/dist/packages/swiper/swiper.scss +45 -0
- package/dist/packages/swiperitem/swiperitem.scss +3 -0
- package/dist/packages/tabbaritem/{tabbarItem.scss → tabbaritem.scss} +2 -0
- package/dist/packages/tag/tag.scss +1 -0
- package/dist/packages/toast/toast.scss +2 -0
- package/dist/packages/uploader/uploader.scss +2 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +26 -16
- package/dist/styles/variables.scss +25 -0
- package/package.json +16 -5
- package/dist/esm/button-345fb015.js +0 -110
- package/dist/esm/icon-63c0d58f.js +0 -70
- package/dist/esm/toast-420b65b7.js +0 -294
package/dist/esm/Drag.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["attract", "direction", "boundary", "children", "className"];
|
|
4
|
+
var _excluded = ["attract", "direction", "boundary", "children", "className", "style"];
|
|
4
5
|
|
|
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; }
|
|
6
7
|
|
|
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; }
|
|
8
9
|
|
|
9
|
-
import React__default, { useRef, useEffect } from 'react';
|
|
10
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
10
11
|
import { c as cn } from './bem-893ad28d.js';
|
|
12
|
+
import { useDrag } from '@use-gesture/react';
|
|
13
|
+
import { useSpring, animated } from '@react-spring/web';
|
|
11
14
|
import '@bem-react/classname';
|
|
12
15
|
var defaultProps = {
|
|
13
16
|
attract: false,
|
|
14
|
-
direction:
|
|
17
|
+
direction: undefined,
|
|
15
18
|
boundary: {
|
|
16
19
|
top: 0,
|
|
17
20
|
left: 0,
|
|
@@ -28,163 +31,103 @@ var Drag = function Drag(props) {
|
|
|
28
31
|
boundary = _defaultProps$props.boundary,
|
|
29
32
|
children = _defaultProps$props.children,
|
|
30
33
|
className = _defaultProps$props.className,
|
|
34
|
+
style = _defaultProps$props.style,
|
|
31
35
|
reset = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
32
36
|
|
|
33
37
|
var b = cn('drag');
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
useRef(0);
|
|
41
|
-
useRef(0);
|
|
42
|
-
var xPum = useRef(0);
|
|
43
|
-
var yPum = useRef(0);
|
|
44
|
-
var position = useRef({
|
|
45
|
-
x: 0,
|
|
46
|
-
y: 0
|
|
47
|
-
});
|
|
48
|
-
useRef({
|
|
49
|
-
top: 0,
|
|
50
|
-
left: 0,
|
|
51
|
-
right: 0,
|
|
52
|
-
bottom: 0
|
|
53
|
-
});
|
|
38
|
+
|
|
39
|
+
var _useState = useState(boundary),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
boundaryState = _useState2[0],
|
|
42
|
+
setBoundaryState = _useState2[1];
|
|
43
|
+
|
|
54
44
|
var myDrag = useRef(null);
|
|
55
45
|
|
|
46
|
+
var _useSpring = useSpring(function () {
|
|
47
|
+
return {
|
|
48
|
+
x: 0,
|
|
49
|
+
y: 0
|
|
50
|
+
};
|
|
51
|
+
}),
|
|
52
|
+
_useSpring2 = _slicedToArray(_useSpring, 2),
|
|
53
|
+
currstyle = _useSpring2[0],
|
|
54
|
+
api = _useSpring2[1];
|
|
55
|
+
|
|
56
|
+
var middleLine = useRef(0);
|
|
57
|
+
|
|
56
58
|
var getInfo = function getInfo() {
|
|
57
59
|
var el = myDrag.current;
|
|
58
60
|
|
|
59
61
|
if (el) {
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
target.style.left = "".concat(boundary.left, "px");
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
if (+target.style.left.split('px')[0] > 10) {
|
|
80
|
-
target.style.left = +target.style.left.split('px')[0] - 10 + 'px';
|
|
81
|
-
window.requestAnimationFrame(function () {
|
|
82
|
-
goLeft(target);
|
|
83
|
-
});
|
|
84
|
-
} else {
|
|
85
|
-
target.style.left = '0px';
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var goRight = function goRight(target, rightLocation) {
|
|
91
|
-
if (rightLocation - parseInt(target.style.left.split('px')[0]) > 10) {
|
|
92
|
-
target.style.left = parseInt(target.style.left.split('px')[0]) + 10 + 'px';
|
|
93
|
-
window.requestAnimationFrame(function () {
|
|
94
|
-
goRight(target, rightLocation);
|
|
62
|
+
var offsetWidth = el.offsetWidth,
|
|
63
|
+
offsetHeight = el.offsetHeight,
|
|
64
|
+
offsetTop = el.offsetTop,
|
|
65
|
+
offsetLeft = el.offsetLeft;
|
|
66
|
+
var _document$documentEle = document.documentElement,
|
|
67
|
+
clientWidth = _document$documentEle.clientWidth,
|
|
68
|
+
clientHeight = _document$documentEle.clientHeight;
|
|
69
|
+
var top = boundary.top,
|
|
70
|
+
left = boundary.left,
|
|
71
|
+
bottom = boundary.bottom,
|
|
72
|
+
right = boundary.right;
|
|
73
|
+
setBoundaryState({
|
|
74
|
+
top: -offsetTop + top,
|
|
75
|
+
left: -offsetLeft + left,
|
|
76
|
+
bottom: clientHeight - offsetHeight - offsetTop - bottom,
|
|
77
|
+
right: clientWidth - offsetWidth - offsetLeft - right
|
|
95
78
|
});
|
|
96
|
-
|
|
97
|
-
target.style.left = rightLocation + 'px';
|
|
79
|
+
middleLine.current = clientWidth - offsetWidth - offsetLeft - (clientWidth - offsetWidth) / 2;
|
|
98
80
|
}
|
|
99
81
|
};
|
|
100
82
|
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
83
|
+
var bind = useDrag(function (_ref) {
|
|
84
|
+
var down = _ref.down,
|
|
85
|
+
last = _ref.last,
|
|
86
|
+
_ref$offset = _slicedToArray(_ref.offset, 2),
|
|
87
|
+
x = _ref$offset[0],
|
|
88
|
+
y = _ref$offset[1];
|
|
89
|
+
|
|
90
|
+
api.start({
|
|
91
|
+
x: x,
|
|
92
|
+
y: y,
|
|
93
|
+
immediate: down
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
if (last) {
|
|
97
|
+
if (props.direction != 'y' && props.attract) {
|
|
98
|
+
if (x < middleLine.current) {
|
|
99
|
+
api.start({
|
|
100
|
+
x: boundaryState.left,
|
|
101
|
+
y: y,
|
|
102
|
+
immediate: down
|
|
103
|
+
});
|
|
104
|
+
} else {
|
|
105
|
+
api.start({
|
|
106
|
+
x: boundaryState.right,
|
|
107
|
+
y: y,
|
|
108
|
+
immediate: down
|
|
109
|
+
});
|
|
110
|
+
}
|
|
117
111
|
}
|
|
118
|
-
|
|
119
|
-
if (yPum.current < boundary.top) {
|
|
120
|
-
yPum.current = boundary.top;
|
|
121
|
-
} else if (yPum.current > screenHeight.current - elHeight.current - boundary.bottom) {
|
|
122
|
-
yPum.current = screenHeight.current - elHeight.current - boundary.bottom;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (props.direction != 'y') {
|
|
126
|
-
target.style.left = "".concat(xPum.current, "px");
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (props.direction != 'x') {
|
|
130
|
-
target.style.top = "".concat(yPum.current, "px");
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
var touchEnd = function touchEnd(e) {
|
|
136
|
-
var target = e.currentTarget;
|
|
137
|
-
var touch = e.changedTouches[0];
|
|
138
|
-
var currX = touch.clientX;
|
|
139
|
-
var rightLocation = screenWidth.current - elWidth.current - boundary.right;
|
|
140
|
-
|
|
141
|
-
if (currX > rightLocation) {
|
|
142
|
-
currX = rightLocation;
|
|
143
|
-
} else if (currX < boundary.left) {
|
|
144
|
-
currX = boundary.left;
|
|
145
|
-
} else {
|
|
146
|
-
currX = currX < screenWidth.current / 2 ? boundary.left : rightLocation;
|
|
147
112
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
window.requestAnimationFrame(function () {
|
|
156
|
-
goRight(target, rightLocation);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
var touchStart = function touchStart(e) {
|
|
163
|
-
var target = e.currentTarget;
|
|
164
|
-
var touches = e.touches[0];
|
|
165
|
-
startTop.current = target.offsetTop;
|
|
166
|
-
startLeft.current = target.offsetLeft;
|
|
167
|
-
position.current = {
|
|
168
|
-
x: touches.clientX,
|
|
169
|
-
y: touches.clientY
|
|
170
|
-
};
|
|
171
|
-
target.removeEventListener('touchmove', touchMove, false);
|
|
172
|
-
target.removeEventListener('touchend', touchEnd, false);
|
|
173
|
-
target.addEventListener('touchmove', touchMove, false);
|
|
174
|
-
target.addEventListener('touchend', touchEnd, false);
|
|
175
|
-
};
|
|
176
|
-
|
|
113
|
+
}, {
|
|
114
|
+
from: function from() {
|
|
115
|
+
return [currstyle.x.get(), currstyle.y.get()];
|
|
116
|
+
},
|
|
117
|
+
axis: direction,
|
|
118
|
+
bounds: boundaryState
|
|
119
|
+
});
|
|
177
120
|
useEffect(function () {
|
|
178
121
|
getInfo();
|
|
179
|
-
}, []);
|
|
122
|
+
}, [myDrag]);
|
|
180
123
|
return React__default.createElement("div", _objectSpread(_objectSpread({
|
|
124
|
+
style: style,
|
|
181
125
|
className: "".concat(b(), " ").concat(className)
|
|
182
126
|
}, reset), {}, {
|
|
183
|
-
ref: myDrag
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}), children);
|
|
127
|
+
ref: myDrag
|
|
128
|
+
}), React__default.createElement(animated.div, _objectSpread({
|
|
129
|
+
style: currstyle
|
|
130
|
+
}, bind()), children));
|
|
188
131
|
};
|
|
189
132
|
|
|
190
133
|
Drag.defaultProps = defaultProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/elevator/elevator.scss'
|
package/dist/esm/Elevator.js
CHANGED
|
@@ -120,13 +120,7 @@ var Elevator = function Elevator(props) {
|
|
|
120
120
|
});
|
|
121
121
|
scrollTo(index);
|
|
122
122
|
var target = e.currentTarget;
|
|
123
|
-
target.removeEventListener('touchmove', function () {
|
|
124
|
-
return touchMove(e);
|
|
125
|
-
}, false);
|
|
126
123
|
target.removeEventListener('touchend', touchEnd, false);
|
|
127
|
-
target.addEventListener('touchmove', function () {
|
|
128
|
-
return touchMove(e);
|
|
129
|
-
}, false);
|
|
130
124
|
target.addEventListener('touchend', touchEnd, false);
|
|
131
125
|
};
|
|
132
126
|
|
|
@@ -185,6 +179,9 @@ var Elevator = function Elevator(props) {
|
|
|
185
179
|
className: b('bars'),
|
|
186
180
|
onTouchStart: function onTouchStart(event) {
|
|
187
181
|
return touchStart(event);
|
|
182
|
+
},
|
|
183
|
+
onTouchMove: function onTouchMove(event) {
|
|
184
|
+
return touchMove(event);
|
|
188
185
|
}
|
|
189
186
|
}, React__default.createElement("div", {
|
|
190
187
|
className: b('bars__inner')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/fixednav/fixednav.scss'
|
package/dist/esm/FixedNav.js
CHANGED
|
@@ -7,10 +7,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
9
9
|
import React__default from 'react';
|
|
10
|
-
import
|
|
10
|
+
import Icon from './Icon.js';
|
|
11
|
+
import Overlay from './Overlay.js';
|
|
11
12
|
import { c as cn } from './bem-893ad28d.js';
|
|
12
13
|
import classNames from 'classnames';
|
|
13
|
-
import { O as Overlay } from './overlay-418bcf84.js';
|
|
14
14
|
import '@bem-react/classname';
|
|
15
15
|
var defaultProps = {
|
|
16
16
|
fixednavClass: 'nut-fixednav',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/icon/icon.scss'
|
package/dist/esm/Icon.js
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"];
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
import React__default from 'react';
|
|
10
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
5
11
|
import '@bem-react/classname';
|
|
12
|
+
var defaultProps = {
|
|
13
|
+
name: '',
|
|
14
|
+
size: '',
|
|
15
|
+
classPrefix: 'nutui-iconfont',
|
|
16
|
+
color: '',
|
|
17
|
+
tag: 'i',
|
|
18
|
+
click: function click(e) {},
|
|
19
|
+
className: ''
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function pxCheck(value) {
|
|
23
|
+
return Number.isNaN(Number(value)) ? String(value) : "".concat(value, "px");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var Icon = function Icon(props) {
|
|
27
|
+
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
28
|
+
name = _defaultProps$props.name,
|
|
29
|
+
size = _defaultProps$props.size,
|
|
30
|
+
classPrefix = _defaultProps$props.classPrefix,
|
|
31
|
+
color = _defaultProps$props.color,
|
|
32
|
+
tag = _defaultProps$props.tag,
|
|
33
|
+
children = _defaultProps$props.children,
|
|
34
|
+
className = _defaultProps$props.className,
|
|
35
|
+
style = _defaultProps$props.style,
|
|
36
|
+
click = _defaultProps$props.click,
|
|
37
|
+
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
38
|
+
|
|
39
|
+
var isImage = name ? name.indexOf('/') !== -1 : false;
|
|
40
|
+
var type = isImage ? 'img' : tag;
|
|
41
|
+
var b = cn('icon');
|
|
42
|
+
|
|
43
|
+
var handleClick = function handleClick(e) {
|
|
44
|
+
if (props.click) {
|
|
45
|
+
props.click(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var hasSrc = function hasSrc() {
|
|
50
|
+
if (isImage) return {
|
|
51
|
+
src: name
|
|
52
|
+
};
|
|
53
|
+
return {};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return React__default.createElement(type, _objectSpread(_objectSpread({
|
|
57
|
+
className: isImage ? "".concat(className || '', " ").concat(b('img')) : "".concat(className || '', " ").concat(b(null, [classPrefix]), " nut-icon-").concat(name, " "),
|
|
58
|
+
style: _objectSpread({
|
|
59
|
+
color: color,
|
|
60
|
+
fontSize: pxCheck(size),
|
|
61
|
+
width: pxCheck(size),
|
|
62
|
+
height: pxCheck(size)
|
|
63
|
+
}, style)
|
|
64
|
+
}, rest), {}, {
|
|
65
|
+
onClick: handleClick
|
|
66
|
+
}, hasSrc()), children);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Icon.defaultProps = defaultProps;
|
|
70
|
+
Icon.displayName = 'NutIcon';
|
|
71
|
+
export { Icon as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/infiniteloading/infiniteloading.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/input/input.scss'
|
package/dist/esm/Input.js
CHANGED
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
import React__default, { useState, useEffect } from 'react';
|
|
9
9
|
import { c as cn } from './bem-893ad28d.js';
|
|
10
|
-
import
|
|
10
|
+
import Icon from './Icon.js';
|
|
11
11
|
import '@bem-react/classname';
|
|
12
12
|
|
|
13
13
|
function trimExtraChar(value, _char, regExp) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/inputnumber/inputnumber.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/layout/layout.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/navbar/navbar.scss'
|
package/dist/esm/NavBar.js
CHANGED
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
7
7
|
import React__default from 'react';
|
|
8
|
-
import
|
|
8
|
+
import Icon from './Icon.js';
|
|
9
9
|
import { c as cn } from './bem-893ad28d.js';
|
|
10
10
|
import '@bem-react/classname';
|
|
11
11
|
var defaultProps = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/noticebar/noticebar.scss'
|
package/dist/esm/NoticeBar.js
CHANGED
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
8
8
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
9
|
-
import
|
|
9
|
+
import Icon from './Icon.js';
|
|
10
10
|
import { c as cn } from './bem-893ad28d.js';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import '@bem-react/classname';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/notify/notify.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/overlay/overlay.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/pagination/pagination.scss'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../packages/picker/picker.scss'
|