react-ui-basics 0.0.159 → 0.0.162
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/Animated.js +11 -10
- package/AutocompleteSelect.js +76 -77
- package/Button.js +24 -25
- package/Checkbox.js +10 -11
- package/CircleProgress.js +5 -6
- package/CommonFields.js +23 -16
- package/DNDContainer.js +47 -48
- package/DNDDraggable.js +9 -10
- package/DNDDroppable.js +8 -9
- package/Dialog.js +18 -19
- package/DropFileInput.js +4 -5
- package/DroppableHorizontalList.js +26 -27
- package/DroppableList.js +26 -27
- package/Dropzone.js +19 -20
- package/FilteredList.js +43 -44
- package/FloatingActionButton.js +6 -7
- package/FormUploadProgress.js +9 -10
- package/ImageGallery.js +125 -126
- package/MaterialIcon.js +5 -6
- package/Modal.js +19 -20
- package/ModalMenu.js +12 -13
- package/ReactConstants.d.ts +5 -4
- package/ReactConstants.js +6 -3
- package/ReactCreateElement.js +2 -1
- package/ReadyListener.js +10 -11
- package/Scrollable.js +52 -53
- package/ScrollableTable.js +4 -5
- package/Size.js +5 -6
- package/Snackbar.js +7 -8
- package/SpinningProgress.js +5 -6
- package/Switch.js +20 -21
- package/Table.d.ts +0 -1
- package/Table.js +50 -57
- package/TextField.js +24 -25
- package/Tools.d.ts +1 -0
- package/Tools.js +14 -13
- package/_virtual/_commonjsHelpers.js +2 -1
- package/_virtual/_react.js +2 -1
- package/_virtual/react-jsx-runtime.development.js +2 -1
- package/bundle.css +784 -784
- package/index.js +8 -7
- package/package.json +1 -1
- package/router/HistoryTools.js +2 -1
- package/router/Link.js +6 -7
- package/router/NavLink.js +5 -6
- package/router/Route.js +15 -16
- package/router/index.js +2 -3
- package/store/ProxyTools.js +2 -3
- package/store/Store.js +2 -3
- package/Animated.js.map +0 -1
- package/AutocompleteSelect.js.map +0 -1
- package/Button.js.map +0 -1
- package/Checkbox.js.map +0 -1
- package/CircleProgress.js.map +0 -1
- package/CommonFields.js.map +0 -1
- package/DNDContainer.js.map +0 -1
- package/DNDDraggable.js.map +0 -1
- package/DNDDroppable.js.map +0 -1
- package/Dialog.js.map +0 -1
- package/DropFileInput.js.map +0 -1
- package/DroppableHorizontalList.js.map +0 -1
- package/DroppableList.js.map +0 -1
- package/Dropzone.js.map +0 -1
- package/FilteredList.js.map +0 -1
- package/FloatingActionButton.js.map +0 -1
- package/FormUploadProgress.js.map +0 -1
- package/ImageGallery.js.map +0 -1
- package/MaterialIcon.js.map +0 -1
- package/Modal.js.map +0 -1
- package/ModalMenu.js.map +0 -1
- package/ReactConstants.js.map +0 -1
- package/ReactCreateElement.js.map +0 -1
- package/ReadyListener.js.map +0 -1
- package/Scrollable.js.map +0 -1
- package/ScrollableTable.js.map +0 -1
- package/Size.js.map +0 -1
- package/Snackbar.js.map +0 -1
- package/SpinningProgress.js.map +0 -1
- package/Switch.js.map +0 -1
- package/Table.js.map +0 -1
- package/TextField.js.map +0 -1
- package/Tools.js.map +0 -1
- package/index.js.map +0 -1
package/Scrollable.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
3
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
|
-
import {className as __className} from "./ReactConstants";
|
|
7
|
-
import {children as __children} from "./ReactConstants";
|
|
8
7
|
import 'react';
|
|
9
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
10
9
|
import PropTypes from 'prop-types';
|
|
@@ -84,14 +83,14 @@ var Scrollable = function (_PureComponent) {
|
|
|
84
83
|
var offsetWidth = offsetWidthOf(viewport);
|
|
85
84
|
var scrollbarHeight = offsetHeightOf(scrollbar);
|
|
86
85
|
var scrollbarWidth = offsetWidthOf(scrollbarH);
|
|
87
|
-
var position = viewport
|
|
88
|
-
var positionH = viewport
|
|
86
|
+
var position = __scrollTop(viewport) / (scrollHeight - offsetHeight);
|
|
87
|
+
var positionH = __scrollLeft(viewport) / (scrollWidth - offsetWidth);
|
|
89
88
|
if (position > 1) {
|
|
90
|
-
viewport
|
|
89
|
+
viewport.scrollTop = scrollHeight - offsetHeight;
|
|
91
90
|
position = 1;
|
|
92
91
|
}
|
|
93
|
-
styleOf(thumb)
|
|
94
|
-
styleOf(thumbH)
|
|
92
|
+
styleOf(thumb).top = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
|
|
93
|
+
styleOf(thumbH).left = positionH * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
|
|
95
94
|
if (position >= 0.98) {
|
|
96
95
|
!scrolledToBottom && orNoop(props().onScrolledToBottom)();
|
|
97
96
|
scrolledToBottom = true;
|
|
@@ -109,16 +108,16 @@ var Scrollable = function (_PureComponent) {
|
|
|
109
108
|
var reset = function reset() {
|
|
110
109
|
removeEventListener(WINDOW, 'mouseup', reset);
|
|
111
110
|
removeEventListener(WINDOW, 'mousemove', moveListener);
|
|
112
|
-
viewport
|
|
111
|
+
__style(viewport).scrollBehavior = '';
|
|
113
112
|
scrolling = false;
|
|
114
113
|
};
|
|
115
114
|
var moveListener = function moveListener(e) {
|
|
116
115
|
if (!scrolling) return;
|
|
117
116
|
if (scrolling === 'v') {
|
|
118
|
-
viewport
|
|
117
|
+
viewport.scrollTop += (e.clientY - lastY) * ratio;
|
|
119
118
|
lastY = e.clientY;
|
|
120
119
|
} else if (scrolling === 'h') {
|
|
121
|
-
viewport
|
|
120
|
+
viewport.scrollLeft += (e.clientX - lastX) * ratioH;
|
|
122
121
|
lastX = e.clientX;
|
|
123
122
|
}
|
|
124
123
|
};
|
|
@@ -126,7 +125,7 @@ var Scrollable = function (_PureComponent) {
|
|
|
126
125
|
lastY = e.clientY;
|
|
127
126
|
scrolling = 'v';
|
|
128
127
|
ratio = scrollHeightOf(viewport) / offsetHeightOf(viewport);
|
|
129
|
-
viewport
|
|
128
|
+
__style(viewport).scrollBehavior = 'unset';
|
|
130
129
|
addEventListener(WINDOW, 'mouseup', reset);
|
|
131
130
|
addEventListener(WINDOW, 'mousemove', moveListener);
|
|
132
131
|
};
|
|
@@ -136,45 +135,45 @@ var Scrollable = function (_PureComponent) {
|
|
|
136
135
|
lastX = e.clientX;
|
|
137
136
|
scrolling = 'h';
|
|
138
137
|
ratioH = scrollWidthOf(viewport) / offsetWidthOf(viewport);
|
|
139
|
-
viewport
|
|
138
|
+
__style(viewport).scrollBehavior = 'unset';
|
|
140
139
|
addEventListener(WINDOW, 'mouseup', reset);
|
|
141
140
|
addEventListener(WINDOW, 'mousemove', moveListener);
|
|
142
141
|
};
|
|
143
142
|
thumbH.ondragstart = preventDefault;
|
|
144
143
|
thumbH.onmouseup = reset;
|
|
145
144
|
scrollbar.onclick = function (e) {
|
|
146
|
-
if (e
|
|
147
|
-
var thumbPosition = parseInt(styleOf(thumb)
|
|
148
|
-
viewport
|
|
145
|
+
if (__target(e) === scrollbar) {
|
|
146
|
+
var thumbPosition = parseInt(__top(styleOf(thumb)));
|
|
147
|
+
viewport.scrollTop += offsetHeightOf(viewport) * 0.9 * (e.offsetY < thumbPosition ? -1 : 1);
|
|
149
148
|
}
|
|
150
149
|
};
|
|
151
150
|
scrollbarH.onclick = function (e) {
|
|
152
|
-
if (e
|
|
153
|
-
var thumbPosition = parseInt(styleOf(thumbH)
|
|
154
|
-
viewport
|
|
151
|
+
if (__target(e) === scrollbarH) {
|
|
152
|
+
var thumbPosition = parseInt(__left(styleOf(thumbH)));
|
|
153
|
+
viewport.scrollLeft += offsetWidthOf(viewport) * 0.9 * (e.offsetX < thumbPosition ? -1 : 1);
|
|
155
154
|
}
|
|
156
155
|
};
|
|
157
156
|
var adjustScrollWidth = function adjustScrollWidth() {
|
|
158
157
|
if (NATIVE_SCROLL_WIDTH < 0) {
|
|
159
|
-
NATIVE_SCROLL_WIDTH = viewport.offsetWidth - viewport
|
|
158
|
+
NATIVE_SCROLL_WIDTH = viewport.offsetWidth - __clientWidth(viewport);
|
|
160
159
|
if (NATIVE_SCROLL_WIDTH === 0 && scrollHeightOf(viewport) !== offsetHeightOf(viewport)) {
|
|
161
160
|
NATIVE_SCROLL_WIDTH = -1;
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
if (NATIVE_SCROLL_HEIGHT < 0) {
|
|
165
|
-
NATIVE_SCROLL_HEIGHT = viewport.offsetHeight - viewport
|
|
164
|
+
NATIVE_SCROLL_HEIGHT = viewport.offsetHeight - __clientHeight(viewport);
|
|
166
165
|
if (NATIVE_SCROLL_HEIGHT === 0 && scrollWidthOf(viewport) !== offsetWidthOf(viewport)) {
|
|
167
166
|
NATIVE_SCROLL_HEIGHT = -1;
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
if (!adjustedScrollWidth) {
|
|
171
170
|
if (NATIVE_SCROLL_WIDTH >= 0 && status() !== WITHOUT_SCROLL) {
|
|
172
|
-
styleOf(viewport).paddingRight = NATIVE_SCROLL_WIDTH + scrollbar
|
|
173
|
-
styleOf(viewport).marginRight = -NATIVE_SCROLL_WIDTH - scrollbar
|
|
171
|
+
styleOf(viewport).paddingRight = NATIVE_SCROLL_WIDTH + __clientWidth(scrollbar) + 'px';
|
|
172
|
+
styleOf(viewport).marginRight = -NATIVE_SCROLL_WIDTH - __clientWidth(scrollbar) + 'px';
|
|
174
173
|
}
|
|
175
174
|
if (NATIVE_SCROLL_HEIGHT >= 0 && statusH() !== WITHOUT_SCROLL) {
|
|
176
|
-
styleOf(viewport).paddingBottom = NATIVE_SCROLL_HEIGHT + scrollbarH
|
|
177
|
-
styleOf(viewport).marginBottom = -NATIVE_SCROLL_HEIGHT - scrollbarH
|
|
175
|
+
styleOf(viewport).paddingBottom = NATIVE_SCROLL_HEIGHT + __clientHeight(scrollbarH) + 'px';
|
|
176
|
+
styleOf(viewport).marginBottom = -NATIVE_SCROLL_HEIGHT - __clientHeight(scrollbarH) + 'px';
|
|
178
177
|
}
|
|
179
178
|
adjustedScrollWidth = true;
|
|
180
179
|
}
|
|
@@ -215,15 +214,15 @@ var Scrollable = function (_PureComponent) {
|
|
|
215
214
|
var newRatio = scrollHeight / scrollbarHeight;
|
|
216
215
|
if (ratio === newRatio && Number.isFinite(newRatio) || Number.isNaN(newRatio)) return;
|
|
217
216
|
var offsetHeight = offsetHeightOf(viewport);
|
|
218
|
-
var horizontalScrollBarOffset = statusH() !== WITHOUT_SCROLL ? scrollbarH
|
|
217
|
+
var horizontalScrollBarOffset = statusH() !== WITHOUT_SCROLL ? __clientHeight(scrollbarH) + Math.max(NATIVE_SCROLL_HEIGHT, 0) : 0;
|
|
219
218
|
var containerOffsetHeight = offsetHeightOf(container) + horizontalScrollBarOffset;
|
|
220
219
|
if (containerOffsetHeight === scrollHeight && status() === WITHOUT_SCROLL) return;
|
|
221
|
-
if (props().autoScrollTop && scrollHeight - offsetHeight - viewport
|
|
222
|
-
viewport
|
|
220
|
+
if (props().autoScrollTop && scrollHeight - offsetHeight - __scrollTop(viewport) <= 20 && newRatio < ratio && Number.isFinite(newRatio) && Number.isFinite(ratio)) {
|
|
221
|
+
viewport.scrollTop = 0;
|
|
223
222
|
}
|
|
224
223
|
ratio = newRatio;
|
|
225
|
-
styleOf(thumb)
|
|
226
|
-
styleOf(container)
|
|
224
|
+
styleOf(thumb).height = scrollbarHeight / newRatio + 'px';
|
|
225
|
+
styleOf(container).height = scrollHeight - horizontalScrollBarOffset + 'px';
|
|
227
226
|
containerOffsetHeight = offsetHeightOf(container) + horizontalScrollBarOffset;
|
|
228
227
|
if (scrollBarModeOf(props()) === SCROLLBAR_MODE_HIDDEN) {
|
|
229
228
|
if (status() !== WITHOUT_SCROLL) hideScrollbar(scrollbar, viewport);
|
|
@@ -237,8 +236,8 @@ var Scrollable = function (_PureComponent) {
|
|
|
237
236
|
}
|
|
238
237
|
scrolledToBottom = false;
|
|
239
238
|
scrolledToTop = false;
|
|
240
|
-
var position = viewport
|
|
241
|
-
styleOf(thumb)
|
|
239
|
+
var position = __scrollTop(viewport) / (scrollHeight - offsetHeight);
|
|
240
|
+
styleOf(thumb).top = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
|
|
242
241
|
};
|
|
243
242
|
var updateHorizontalScrollbar = function updateHorizontalScrollbar() {
|
|
244
243
|
var scrollWidth = scrollWidthOf(viewport);
|
|
@@ -247,16 +246,16 @@ var Scrollable = function (_PureComponent) {
|
|
|
247
246
|
var newRatio = scrollWidth / scrollbarWidth;
|
|
248
247
|
if (ratioH === newRatio && Number.isFinite(newRatio) || Number.isNaN(newRatio)) return;
|
|
249
248
|
var offsetWidth = offsetWidthOf(viewport);
|
|
250
|
-
var verticalScrollBarOffset = status() !== WITHOUT_SCROLL ? scrollbar
|
|
249
|
+
var verticalScrollBarOffset = status() !== WITHOUT_SCROLL ? __clientWidth(scrollbar) + Math.max(NATIVE_SCROLL_WIDTH, 0) : 0;
|
|
251
250
|
var containerOffsetWidth = offsetWidthOf(container) + verticalScrollBarOffset;
|
|
252
251
|
if (containerOffsetWidth === scrollWidth && statusH() === WITHOUT_SCROLL) return;
|
|
253
252
|
ratioH = newRatio;
|
|
254
|
-
styleOf(thumbH)
|
|
253
|
+
styleOf(thumbH).width = scrollbarWidth / newRatio + 'px';
|
|
255
254
|
if (horizontalScrollBarModeOf(props()) === SCROLLBAR_MODE_HIDDEN) {
|
|
256
255
|
if (statusH() !== WITHOUT_SCROLL) hideHorizontalScrollbar(scrollbarH, viewport);
|
|
257
256
|
return;
|
|
258
257
|
}
|
|
259
|
-
styleOf(container)
|
|
258
|
+
styleOf(container).width = scrollWidth - verticalScrollBarOffset + 'px';
|
|
260
259
|
containerOffsetWidth = offsetWidthOf(container) + verticalScrollBarOffset;
|
|
261
260
|
if (containerOffsetWidth < scrollWidth) {
|
|
262
261
|
adjustedScrollWidth = false;
|
|
@@ -264,8 +263,8 @@ var Scrollable = function (_PureComponent) {
|
|
|
264
263
|
} else {
|
|
265
264
|
hideHorizontalScrollbar(scrollbarH, viewport);
|
|
266
265
|
}
|
|
267
|
-
var position = viewport
|
|
268
|
-
styleOf(thumbH)
|
|
266
|
+
var position = __scrollLeft(viewport) / (scrollWidth - offsetWidth);
|
|
267
|
+
styleOf(thumbH).left = position * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
|
|
269
268
|
};
|
|
270
269
|
initTimeout = setTimeout(function () {
|
|
271
270
|
resizeInterval = setInterval(function () {
|
|
@@ -274,45 +273,45 @@ var Scrollable = function (_PureComponent) {
|
|
|
274
273
|
}, 50);
|
|
275
274
|
}, 200);
|
|
276
275
|
};
|
|
277
|
-
that[
|
|
278
|
-
that[
|
|
279
|
-
that[
|
|
276
|
+
that[ReactConstants[0]] = init;
|
|
277
|
+
that[ReactConstants[1]] = clear;
|
|
278
|
+
that[ReactConstants[2]] = function (prevProps) {
|
|
280
279
|
if (scrollBarModeOf(props()) !== scrollBarModeOf(prevProps)) init();else if (onScroll(props()) !== onScroll(prevProps)) init();
|
|
281
280
|
};
|
|
282
281
|
that.setScroll = function (y) {
|
|
283
|
-
viewportRef()
|
|
282
|
+
viewportRef().scrollTop = y;
|
|
284
283
|
};
|
|
285
284
|
that.getScroll = function () {
|
|
286
|
-
return viewportRef()
|
|
285
|
+
return __scrollTop(viewportRef());
|
|
287
286
|
};
|
|
288
287
|
that.getScrollHeight = function () {
|
|
289
288
|
return scrollHeightOf(viewportRef());
|
|
290
289
|
};
|
|
291
290
|
that.getHeight = function () {
|
|
292
|
-
return containerRef()
|
|
291
|
+
return __clientHeight(containerRef());
|
|
293
292
|
};
|
|
294
|
-
that[
|
|
293
|
+
that[ReactConstants[3]] = function () {
|
|
295
294
|
var _props = props();
|
|
296
|
-
var className = _props[
|
|
297
|
-
children = _props[
|
|
295
|
+
var className = _props[ReactConstants[5]],
|
|
296
|
+
children = _props[ReactConstants[4]];
|
|
298
297
|
return ReactCreateElement("div", {
|
|
299
|
-
[
|
|
298
|
+
[ReactConstants[5]]: classNames('Scrollable', className, status() || WITH_SCROLL, statusH() + '-horizontal'),
|
|
300
299
|
style: styleOf(_props),
|
|
301
300
|
ref: containerRef
|
|
302
301
|
}, ReactCreateElement("div", {
|
|
303
|
-
[
|
|
302
|
+
[ReactConstants[5]]: "viewport",
|
|
304
303
|
ref: viewportRef
|
|
305
304
|
}, children), ReactCreateElement("div", {
|
|
306
|
-
[
|
|
305
|
+
[ReactConstants[5]]: classNames('scrollbar', scrollBarModeOf(_props) || SCROLLBAR_MODE_AUTO),
|
|
307
306
|
ref: scrollbarRef
|
|
308
307
|
}, ReactCreateElement("div", {
|
|
309
|
-
[
|
|
308
|
+
[ReactConstants[5]]: "thumb",
|
|
310
309
|
ref: thumbRef
|
|
311
310
|
})), ReactCreateElement("div", {
|
|
312
|
-
[
|
|
311
|
+
[ReactConstants[5]]: classNames('scrollbar horizontal', horizontalScrollBarModeOf(_props)),
|
|
313
312
|
ref: horizontalScrollbarRef
|
|
314
313
|
}, ReactCreateElement("div", {
|
|
315
|
-
[
|
|
314
|
+
[ReactConstants[5]]: "thumb",
|
|
316
315
|
ref: horizontalThumbRef
|
|
317
316
|
})));
|
|
318
317
|
};
|
|
@@ -329,7 +328,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
329
328
|
Scrollable.propTypes = {
|
|
330
329
|
scrollBarMode: PropTypes.oneOf([SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_HIDDEN, SCROLLBAR_MODE_VISIBLE]),
|
|
331
330
|
horizontalScrollBarMode: PropTypes.oneOf([SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_HIDDEN, SCROLLBAR_MODE_VISIBLE]),
|
|
332
|
-
[
|
|
331
|
+
[ReactConstants[5]]: PropTypes.string,
|
|
333
332
|
style: PropTypes.object,
|
|
334
333
|
onScrolledToBottom: PropTypes.func,
|
|
335
334
|
onScrolledToTop: PropTypes.func,
|
package/ScrollableTable.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
|
|
3
4
|
import { jsx as jsxRuntime_2 } from 'react/jsx-runtime';
|
|
4
5
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
7
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
-
import {className as __className} from "./ReactConstants";
|
|
8
|
-
import {children as __children} from "./ReactConstants";
|
|
9
8
|
import Table from './Table.js';
|
|
10
9
|
import Scrollable from './Scrollable.js';
|
|
11
10
|
import { render, props, PureComponent } from './ReactConstants.js';
|
|
@@ -17,8 +16,8 @@ var ScrollableTable = /** @class */ (function (_super) {
|
|
|
17
16
|
var _this = _super.call(this, properties) || this;
|
|
18
17
|
var that = _this;
|
|
19
18
|
var scrollableRef = createRef();
|
|
20
|
-
that[
|
|
21
|
-
return jsxRuntime_2("div", __extends({ [
|
|
19
|
+
that[ReactConstants[3]] = function () {
|
|
20
|
+
return jsxRuntime_2("div", __extends({ [ReactConstants[5]]: "ScrollableTable" }, { [ReactConstants[4]]: jsxRuntime_2(Scrollable, __extends({ ref: scrollableRef }, props(that).scrollableProps, { [ReactConstants[4]]: jsxRuntime_2(Table, __extends({}, props(that))) })) }));
|
|
22
21
|
};
|
|
23
22
|
that.getScrollable = function () { return scrollableRef(); };
|
|
24
23
|
return _this;
|
package/Size.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import 'react';
|
|
3
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
|
-
import {className as __className} from "./ReactConstants";
|
|
7
|
-
import {children as __children} from "./ReactConstants";
|
|
8
7
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
8
|
import { isUndefined } from './Tools.js';
|
|
10
9
|
|
|
11
10
|
var Size = function Size(_ref) {
|
|
12
|
-
var value = _ref
|
|
11
|
+
var value = __value(_ref);
|
|
13
12
|
return ReactCreateElement("span", {
|
|
14
|
-
[
|
|
13
|
+
[ReactConstants[5]]: "Size"
|
|
15
14
|
}, formatNumber(value, 1), "\xA0", formatAbbreviation(value));
|
|
16
15
|
};
|
|
17
16
|
var formatNumberWithMaxLength = function formatNumberWithMaxLength(size, fractionalLength, toAbbreviation, maxLength) {
|
|
@@ -21,7 +20,7 @@ var formatNumberWithMaxLength = function formatNumberWithMaxLength(size, fractio
|
|
|
21
20
|
do {
|
|
22
21
|
result = formatNumber(size, fractionalLength, toAbbreviation);
|
|
23
22
|
fractionalLength--;
|
|
24
|
-
} while (maxLength !== -1 && fractionalLength >= 0 && result
|
|
23
|
+
} while (maxLength !== -1 && fractionalLength >= 0 && __length(result) > maxLength);
|
|
25
24
|
return result;
|
|
26
25
|
};
|
|
27
26
|
function formatNumber(size, fractionalLength, toAbbreviation) {
|
package/Snackbar.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, slicedToArray as _slicedToArray, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
3
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
|
-
import {className as __className} from "./ReactConstants";
|
|
7
|
-
import {children as __children} from "./ReactConstants";
|
|
8
7
|
import 'react';
|
|
9
8
|
import ReactDOM from 'react-dom';
|
|
10
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
@@ -28,16 +27,16 @@ var Snackbar = function (_PureComponent) {
|
|
|
28
27
|
getText = _stateGSs2[1],
|
|
29
28
|
clazzName = _stateGSs2[2];
|
|
30
29
|
var timeout;
|
|
31
|
-
that[
|
|
30
|
+
that[ReactConstants[1]] = function () {
|
|
32
31
|
clearTimeout(timeout);
|
|
33
32
|
};
|
|
34
|
-
that[
|
|
33
|
+
that[ReactConstants[3]] = function () {
|
|
35
34
|
var _props = props(that);
|
|
36
35
|
var container = _props.container;
|
|
37
36
|
var el = ReactCreateElement("div", {
|
|
38
|
-
[
|
|
37
|
+
[ReactConstants[5]]: classNames("Snackbar", _props[ReactConstants[5]], isShow() && shown, clazzName())
|
|
39
38
|
}, ReactCreateElement("div", {
|
|
40
|
-
[
|
|
39
|
+
[ReactConstants[5]]: "message"
|
|
41
40
|
}, getText() || _props.text));
|
|
42
41
|
return container ? ReactDOM.createPortal(el, container) : el;
|
|
43
42
|
};
|
|
@@ -63,7 +62,7 @@ var Snackbar = function (_PureComponent) {
|
|
|
63
62
|
}(PureComponent);
|
|
64
63
|
if (process.env.NODE_ENV !== 'production') {
|
|
65
64
|
Snackbar.propTypes = {
|
|
66
|
-
[
|
|
65
|
+
[ReactConstants[5]]: PropTypes.string,
|
|
67
66
|
text: PropTypes.string,
|
|
68
67
|
container: PropTypes.node
|
|
69
68
|
};
|
package/SpinningProgress.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import 'react';
|
|
3
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
|
-
import {className as __className} from "./ReactConstants";
|
|
7
|
-
import {children as __children} from "./ReactConstants";
|
|
8
7
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
8
|
|
|
10
9
|
var SpinningProgress = function SpinningProgress() {
|
|
11
10
|
return ReactCreateElement("div", {
|
|
12
|
-
[
|
|
11
|
+
[ReactConstants[5]]: "SpinningProgress"
|
|
13
12
|
}, ReactCreateElement("svg", {
|
|
14
|
-
[
|
|
13
|
+
[ReactConstants[5]]: "circular",
|
|
15
14
|
viewBox: "0 0 24 24"
|
|
16
15
|
}, ReactCreateElement("circle", {
|
|
17
|
-
[
|
|
16
|
+
[ReactConstants[5]]: "line",
|
|
18
17
|
cx: "12",
|
|
19
18
|
cy: "12",
|
|
20
19
|
r: "8.75",
|
package/Switch.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactConstants from "./ReactConstants";
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
3
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
|
-
import {className as __className} from "./ReactConstants";
|
|
7
|
-
import {children as __children} from "./ReactConstants";
|
|
8
7
|
import 'react';
|
|
9
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
10
9
|
import { classNames, getRandomId } from './Tools.js';
|
|
@@ -19,34 +18,34 @@ var Switch = function (_PureComponent) {
|
|
|
19
18
|
_classCallCheck(this, Switch);
|
|
20
19
|
_this = _super.call(this, props);
|
|
21
20
|
var randomId = getRandomId('sw-');
|
|
22
|
-
_this[
|
|
23
|
-
var _this$props = _this
|
|
21
|
+
_this[ReactConstants[3]] = function () {
|
|
22
|
+
var _this$props = __props(_this),
|
|
24
23
|
label = _this$props.label,
|
|
25
|
-
className = _this$props[
|
|
24
|
+
className = _this$props[ReactConstants[5]],
|
|
26
25
|
labelOn = _this$props.labelOn,
|
|
27
26
|
labelOff = _this$props.labelOff,
|
|
28
|
-
onChange = _this$props
|
|
29
|
-
value = _this$props
|
|
30
|
-
onClick = _this$props
|
|
31
|
-
var id = _this.
|
|
27
|
+
onChange = _this$props[ReactConstants[7]],
|
|
28
|
+
value = __value(_this$props),
|
|
29
|
+
onClick = _this$props[ReactConstants[6]];
|
|
30
|
+
var id = __props(_this).id || randomId;
|
|
32
31
|
return ReactCreateElement("div", {
|
|
33
|
-
[
|
|
34
|
-
|
|
32
|
+
[ReactConstants[5]]: classNames("Switch", className),
|
|
33
|
+
[ReactConstants[6]]: onClick
|
|
35
34
|
}, ReactCreateElement("input", {
|
|
36
35
|
type: "checkbox",
|
|
37
36
|
id: id,
|
|
38
|
-
[
|
|
39
|
-
|
|
37
|
+
[ReactConstants[5]]: "switch-input",
|
|
38
|
+
[ReactConstants[7]]: onChange,
|
|
40
39
|
checked: value
|
|
41
40
|
}), ReactCreateElement("label", {
|
|
42
41
|
htmlFor: id,
|
|
43
|
-
[
|
|
42
|
+
[ReactConstants[5]]: "switch-label"
|
|
44
43
|
}, label && ReactCreateElement("span", {
|
|
45
|
-
[
|
|
44
|
+
[ReactConstants[5]]: "label"
|
|
46
45
|
}, label), labelOn && ReactCreateElement("span", {
|
|
47
|
-
[
|
|
46
|
+
[ReactConstants[5]]: "toggle--on"
|
|
48
47
|
}, labelOn), labelOff && ReactCreateElement("span", {
|
|
49
|
-
[
|
|
48
|
+
[ReactConstants[5]]: "toggle--off"
|
|
50
49
|
}, labelOff)));
|
|
51
50
|
};
|
|
52
51
|
return _this;
|
|
@@ -56,13 +55,13 @@ var Switch = function (_PureComponent) {
|
|
|
56
55
|
var Switch$1 = Switch;
|
|
57
56
|
if (process.env.NODE_ENV !== 'production') {
|
|
58
57
|
Switch.propTypes = {
|
|
59
|
-
[
|
|
58
|
+
[ReactConstants[5]]: PropTypes.string,
|
|
60
59
|
label: PropTypes.string,
|
|
61
60
|
labelOn: PropTypes.string,
|
|
62
61
|
labelOff: PropTypes.string,
|
|
63
62
|
value: PropTypes.bool,
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
[ReactConstants[7]]: PropTypes.func,
|
|
64
|
+
[ReactConstants[6]]: PropTypes.func,
|
|
66
65
|
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
67
66
|
};
|
|
68
67
|
}
|