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.
Files changed (83) hide show
  1. package/Animated.js +11 -10
  2. package/AutocompleteSelect.js +76 -77
  3. package/Button.js +24 -25
  4. package/Checkbox.js +10 -11
  5. package/CircleProgress.js +5 -6
  6. package/CommonFields.js +23 -16
  7. package/DNDContainer.js +47 -48
  8. package/DNDDraggable.js +9 -10
  9. package/DNDDroppable.js +8 -9
  10. package/Dialog.js +18 -19
  11. package/DropFileInput.js +4 -5
  12. package/DroppableHorizontalList.js +26 -27
  13. package/DroppableList.js +26 -27
  14. package/Dropzone.js +19 -20
  15. package/FilteredList.js +43 -44
  16. package/FloatingActionButton.js +6 -7
  17. package/FormUploadProgress.js +9 -10
  18. package/ImageGallery.js +125 -126
  19. package/MaterialIcon.js +5 -6
  20. package/Modal.js +19 -20
  21. package/ModalMenu.js +12 -13
  22. package/ReactConstants.d.ts +5 -4
  23. package/ReactConstants.js +6 -3
  24. package/ReactCreateElement.js +2 -1
  25. package/ReadyListener.js +10 -11
  26. package/Scrollable.js +52 -53
  27. package/ScrollableTable.js +4 -5
  28. package/Size.js +5 -6
  29. package/Snackbar.js +7 -8
  30. package/SpinningProgress.js +5 -6
  31. package/Switch.js +20 -21
  32. package/Table.d.ts +0 -1
  33. package/Table.js +50 -57
  34. package/TextField.js +24 -25
  35. package/Tools.d.ts +1 -0
  36. package/Tools.js +14 -13
  37. package/_virtual/_commonjsHelpers.js +2 -1
  38. package/_virtual/_react.js +2 -1
  39. package/_virtual/react-jsx-runtime.development.js +2 -1
  40. package/bundle.css +784 -784
  41. package/index.js +8 -7
  42. package/package.json +1 -1
  43. package/router/HistoryTools.js +2 -1
  44. package/router/Link.js +6 -7
  45. package/router/NavLink.js +5 -6
  46. package/router/Route.js +15 -16
  47. package/router/index.js +2 -3
  48. package/store/ProxyTools.js +2 -3
  49. package/store/Store.js +2 -3
  50. package/Animated.js.map +0 -1
  51. package/AutocompleteSelect.js.map +0 -1
  52. package/Button.js.map +0 -1
  53. package/Checkbox.js.map +0 -1
  54. package/CircleProgress.js.map +0 -1
  55. package/CommonFields.js.map +0 -1
  56. package/DNDContainer.js.map +0 -1
  57. package/DNDDraggable.js.map +0 -1
  58. package/DNDDroppable.js.map +0 -1
  59. package/Dialog.js.map +0 -1
  60. package/DropFileInput.js.map +0 -1
  61. package/DroppableHorizontalList.js.map +0 -1
  62. package/DroppableList.js.map +0 -1
  63. package/Dropzone.js.map +0 -1
  64. package/FilteredList.js.map +0 -1
  65. package/FloatingActionButton.js.map +0 -1
  66. package/FormUploadProgress.js.map +0 -1
  67. package/ImageGallery.js.map +0 -1
  68. package/MaterialIcon.js.map +0 -1
  69. package/Modal.js.map +0 -1
  70. package/ModalMenu.js.map +0 -1
  71. package/ReactConstants.js.map +0 -1
  72. package/ReactCreateElement.js.map +0 -1
  73. package/ReadyListener.js.map +0 -1
  74. package/Scrollable.js.map +0 -1
  75. package/ScrollableTable.js.map +0 -1
  76. package/Size.js.map +0 -1
  77. package/Snackbar.js.map +0 -1
  78. package/SpinningProgress.js.map +0 -1
  79. package/Switch.js.map +0 -1
  80. package/Table.js.map +0 -1
  81. package/TextField.js.map +0 -1
  82. package/Tools.js.map +0 -1
  83. package/index.js.map +0 -1
package/Scrollable.js CHANGED
@@ -1,10 +1,9 @@
1
- import CommonFields from "./CommonFields";
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[CommonFields[11]] / (scrollHeight - offsetHeight);
88
- var positionH = viewport[CommonFields[12]] / (scrollWidth - offsetWidth);
86
+ var position = __scrollTop(viewport) / (scrollHeight - offsetHeight);
87
+ var positionH = __scrollLeft(viewport) / (scrollWidth - offsetWidth);
89
88
  if (position > 1) {
90
- viewport[CommonFields[11]] = scrollHeight - offsetHeight;
89
+ viewport.scrollTop = scrollHeight - offsetHeight;
91
90
  position = 1;
92
91
  }
93
- styleOf(thumb)[CommonFields[2]] = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
94
- styleOf(thumbH)[CommonFields[3]] = positionH * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
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[CommonFields[4]].scrollBehavior = '';
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[CommonFields[11]] += (e.clientY - lastY) * ratio;
117
+ viewport.scrollTop += (e.clientY - lastY) * ratio;
119
118
  lastY = e.clientY;
120
119
  } else if (scrolling === 'h') {
121
- viewport[CommonFields[12]] += (e.clientX - lastX) * ratioH;
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[CommonFields[4]].scrollBehavior = 'unset';
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[CommonFields[4]].scrollBehavior = 'unset';
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.target === scrollbar) {
147
- var thumbPosition = parseInt(styleOf(thumb)[CommonFields[2]]);
148
- viewport[CommonFields[11]] += offsetHeightOf(viewport) * 0.9 * (e.offsetY < thumbPosition ? -1 : 1);
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.target === scrollbarH) {
153
- var thumbPosition = parseInt(styleOf(thumbH)[CommonFields[3]]);
154
- viewport[CommonFields[12]] += offsetWidthOf(viewport) * 0.9 * (e.offsetX < thumbPosition ? -1 : 1);
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[CommonFields[10]];
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[CommonFields[9]];
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[CommonFields[10]] + 'px';
173
- styleOf(viewport).marginRight = -NATIVE_SCROLL_WIDTH - scrollbar[CommonFields[10]] + 'px';
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[CommonFields[9]] + 'px';
177
- styleOf(viewport).marginBottom = -NATIVE_SCROLL_HEIGHT - scrollbarH[CommonFields[9]] + 'px';
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[CommonFields[9]] + Math.max(NATIVE_SCROLL_HEIGHT, 0) : 0;
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[CommonFields[11]] <= 20 && newRatio < ratio && Number.isFinite(newRatio) && Number.isFinite(ratio)) {
222
- viewport[CommonFields[11]] = 0;
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)[CommonFields[1]] = scrollbarHeight / newRatio + 'px';
226
- styleOf(container)[CommonFields[1]] = scrollHeight - horizontalScrollBarOffset + 'px';
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[CommonFields[11]] / (scrollHeight - offsetHeight);
241
- styleOf(thumb)[CommonFields[2]] = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
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[CommonFields[10]] + Math.max(NATIVE_SCROLL_WIDTH, 0) : 0;
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)[CommonFields[0]] = scrollbarWidth / newRatio + 'px';
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)[CommonFields[0]] = scrollWidth - verticalScrollBarOffset + 'px';
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[CommonFields[12]] / (scrollWidth - offsetWidth);
268
- styleOf(thumbH)[CommonFields[3]] = position * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
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[componentDidMount] = init;
278
- that[componentWillUnmount] = clear;
279
- that[componentDidUpdate] = function (prevProps) {
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()[CommonFields[11]] = y;
282
+ viewportRef().scrollTop = y;
284
283
  };
285
284
  that.getScroll = function () {
286
- return viewportRef()[CommonFields[11]];
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()[CommonFields[9]];
291
+ return __clientHeight(containerRef());
293
292
  };
294
- that[render] = function () {
293
+ that[ReactConstants[3]] = function () {
295
294
  var _props = props();
296
- var className = _props[__className],
297
- children = _props[__children];
295
+ var className = _props[ReactConstants[5]],
296
+ children = _props[ReactConstants[4]];
298
297
  return ReactCreateElement("div", {
299
- [__className]: classNames('Scrollable', className, status() || WITH_SCROLL, statusH() + '-horizontal'),
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
- [__className]: "viewport",
302
+ [ReactConstants[5]]: "viewport",
304
303
  ref: viewportRef
305
304
  }, children), ReactCreateElement("div", {
306
- [__className]: classNames('scrollbar', scrollBarModeOf(_props) || SCROLLBAR_MODE_AUTO),
305
+ [ReactConstants[5]]: classNames('scrollbar', scrollBarModeOf(_props) || SCROLLBAR_MODE_AUTO),
307
306
  ref: scrollbarRef
308
307
  }, ReactCreateElement("div", {
309
- [__className]: "thumb",
308
+ [ReactConstants[5]]: "thumb",
310
309
  ref: thumbRef
311
310
  })), ReactCreateElement("div", {
312
- [__className]: classNames('scrollbar horizontal', horizontalScrollBarModeOf(_props)),
311
+ [ReactConstants[5]]: classNames('scrollbar horizontal', horizontalScrollBarModeOf(_props)),
313
312
  ref: horizontalScrollbarRef
314
313
  }, ReactCreateElement("div", {
315
- [__className]: "thumb",
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
- [__className]: PropTypes.string,
331
+ [ReactConstants[5]]: PropTypes.string,
333
332
  style: PropTypes.object,
334
333
  onScrolledToBottom: PropTypes.func,
335
334
  onScrolledToTop: PropTypes.func,
@@ -1,11 +1,10 @@
1
- import CommonFields from "./CommonFields";
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[render] = function () {
21
- return jsxRuntime_2("div", __extends({ [__className]: "ScrollableTable" }, { [__children]: jsxRuntime_2(Scrollable, __extends({ ref: scrollableRef }, props(that).scrollableProps, { [__children]: jsxRuntime_2(Table, __extends({}, props(that))) })) }));
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 CommonFields from "./CommonFields";
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[CommonFields[8]];
11
+ var value = __value(_ref);
13
12
  return ReactCreateElement("span", {
14
- [__className]: "Size"
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[CommonFields[5]] > maxLength);
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 CommonFields from "./CommonFields";
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[componentWillUnmount] = function () {
30
+ that[ReactConstants[1]] = function () {
32
31
  clearTimeout(timeout);
33
32
  };
34
- that[render] = function () {
33
+ that[ReactConstants[3]] = function () {
35
34
  var _props = props(that);
36
35
  var container = _props.container;
37
36
  var el = ReactCreateElement("div", {
38
- [__className]: classNames("Snackbar", _props[className], isShow() && shown, clazzName())
37
+ [ReactConstants[5]]: classNames("Snackbar", _props[ReactConstants[5]], isShow() && shown, clazzName())
39
38
  }, ReactCreateElement("div", {
40
- [__className]: "message"
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
- [__className]: PropTypes.string,
65
+ [ReactConstants[5]]: PropTypes.string,
67
66
  text: PropTypes.string,
68
67
  container: PropTypes.node
69
68
  };
@@ -1,20 +1,19 @@
1
- import CommonFields from "./CommonFields";
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
- [__className]: "SpinningProgress"
11
+ [ReactConstants[5]]: "SpinningProgress"
13
12
  }, ReactCreateElement("svg", {
14
- [__className]: "circular",
13
+ [ReactConstants[5]]: "circular",
15
14
  viewBox: "0 0 24 24"
16
15
  }, ReactCreateElement("circle", {
17
- [__className]: "line",
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 CommonFields from "./CommonFields";
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[render] = function () {
23
- var _this$props = _this.props,
21
+ _this[ReactConstants[3]] = function () {
22
+ var _this$props = __props(_this),
24
23
  label = _this$props.label,
25
- className = _this$props[__className],
24
+ className = _this$props[ReactConstants[5]],
26
25
  labelOn = _this$props.labelOn,
27
26
  labelOff = _this$props.labelOff,
28
- onChange = _this$props.onChange,
29
- value = _this$props[CommonFields[8]],
30
- onClick = _this$props.onClick;
31
- var id = _this.props.id || randomId;
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
- [__className]: classNames("Switch", className),
34
- onClick: onClick
32
+ [ReactConstants[5]]: classNames("Switch", className),
33
+ [ReactConstants[6]]: onClick
35
34
  }, ReactCreateElement("input", {
36
35
  type: "checkbox",
37
36
  id: id,
38
- [__className]: "switch-input",
39
- onChange: onChange,
37
+ [ReactConstants[5]]: "switch-input",
38
+ [ReactConstants[7]]: onChange,
40
39
  checked: value
41
40
  }), ReactCreateElement("label", {
42
41
  htmlFor: id,
43
- [__className]: "switch-label"
42
+ [ReactConstants[5]]: "switch-label"
44
43
  }, label && ReactCreateElement("span", {
45
- [__className]: "label"
44
+ [ReactConstants[5]]: "label"
46
45
  }, label), labelOn && ReactCreateElement("span", {
47
- [__className]: "toggle--on"
46
+ [ReactConstants[5]]: "toggle--on"
48
47
  }, labelOn), labelOff && ReactCreateElement("span", {
49
- [__className]: "toggle--off"
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
- [__className]: PropTypes.string,
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
- onChange: PropTypes.func,
65
- onClick: PropTypes.func,
63
+ [ReactConstants[7]]: PropTypes.func,
64
+ [ReactConstants[6]]: PropTypes.func,
66
65
  id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
67
66
  };
68
67
  }
package/Table.d.ts CHANGED
@@ -51,7 +51,6 @@ export interface TableState<T> {
51
51
  sortBy?: string;
52
52
  comparator?: Comparator;
53
53
  data?: T[];
54
- editing?: any;
55
54
  }
56
55
  declare class Table<T> extends Component<TableProps<T>, TableState<T>> {
57
56
  constructor(properties: any);