react-ui-basics 0.0.156 → 0.0.159

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 (58) hide show
  1. package/Animated.js +2 -1
  2. package/AutocompleteSelect.js +15 -14
  3. package/Button.js +15 -15
  4. package/Button.js.map +1 -1
  5. package/Checkbox.js +3 -2
  6. package/CircleProgress.js +2 -1
  7. package/CommonFields.js +18 -0
  8. package/CommonFields.js.map +1 -0
  9. package/DNDContainer.js +29 -28
  10. package/DNDDraggable.js +1 -0
  11. package/DNDDroppable.js +1 -0
  12. package/Dialog.js +4 -3
  13. package/DropFileInput.js +1 -0
  14. package/DroppableHorizontalList.js +18 -17
  15. package/DroppableList.js +18 -17
  16. package/Dropzone.js +6 -5
  17. package/FilteredList.js +11 -10
  18. package/FloatingActionButton.js +2 -1
  19. package/FormUploadProgress.js +2 -1
  20. package/ImageGallery.js +93 -92
  21. package/MaterialIcon.js +2 -1
  22. package/Modal.js +7 -6
  23. package/ModalMenu.js +4 -3
  24. package/ReactConstants.d.ts +18 -0
  25. package/ReactConstants.js +25 -36
  26. package/ReactConstants.js.map +1 -1
  27. package/ReactCreateElement.js +1 -0
  28. package/ReadyListener.js +1 -0
  29. package/ResizeObserver.d.ts +1 -0
  30. package/Scrollable.js +38 -37
  31. package/ScrollableTable.d.ts +15 -0
  32. package/ScrollableTable.js +19 -32
  33. package/ScrollableTable.js.map +1 -1
  34. package/Size.js +3 -2
  35. package/Snackbar.js +1 -0
  36. package/SpinningProgress.js +1 -0
  37. package/Switch.js +3 -2
  38. package/Table.d.ts +1 -1
  39. package/Table.js +30 -30
  40. package/Table.js.map +1 -1
  41. package/TextField.js +7 -6
  42. package/Tools.d.ts +1 -1
  43. package/Tools.js +19 -17
  44. package/Tools.js.map +1 -1
  45. package/_virtual/_commonjsHelpers.js +1 -0
  46. package/_virtual/_react.js +1 -0
  47. package/_virtual/react-jsx-runtime.development.js +1 -0
  48. package/bundle.css +651 -651
  49. package/index.js +2 -0
  50. package/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/router/HistoryTools.js +1 -0
  53. package/router/Link.js +3 -2
  54. package/router/NavLink.js +3 -2
  55. package/router/Route.js +10 -9
  56. package/router/index.js +1 -0
  57. package/store/ProxyTools.js +1 -0
  58. package/store/Store.js +1 -0
package/DroppableList.js CHANGED
@@ -1,3 +1,4 @@
1
+ import CommonFields from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -47,14 +48,14 @@ var DroppableList = function (_Component) {
47
48
  return function (it) {
48
49
  orNoop(initializer)(it);
49
50
  it.createPositionListener = function (e, style) {
50
- var offsetTop = e.pageY;
51
+ var offsetTop = e[CommonFields[7]];
51
52
  return function (e) {
52
- e.pageY && (style.transform = 'translateY(' + (e.pageY - offsetTop - that.scrollDiff) + 'px)');
53
+ e[CommonFields[7]] && (style.transform = 'translateY(' + (e[CommonFields[7]] - offsetTop - that.scrollDiff) + 'px)');
53
54
  };
54
55
  };
55
56
  it.initDraggedStyles = NOOP;
56
57
  it.onDragEnd = function () {
57
- var style = it.element.style;
58
+ var style = it.element[CommonFields[4]];
58
59
  inTransition = true;
59
60
  setTimeout(function () {
60
61
  var droppingDuration = props$1().droppingDuration || 100;
@@ -92,16 +93,16 @@ var DroppableList = function (_Component) {
92
93
  });
93
94
  };
94
95
  var onHover = function onHover(e, draggable) {
95
- var y = e.pageY - that.scrollOffsetY - that.scrollDiff;
96
- var transformUp = 'translateY(' + draggable.height + 'px)';
97
- var transformDown = 'translateY(-' + draggable.height + 'px)';
96
+ var y = e[CommonFields[7]] - that.scrollOffsetY - that.scrollDiff;
97
+ var transformUp = 'translateY(' + draggable[CommonFields[1]] + 'px)';
98
+ var transformDown = 'translateY(-' + draggable[CommonFields[1]] + 'px)';
98
99
  list.forEach(function (id, i) {
99
100
  if (i !== oldIndex) {
100
101
  var d = draggables[id];
101
102
  var bounds = d.bounds;
102
- var style = d.element.style;
103
+ var style = d.element[CommonFields[4]];
103
104
  if (i > oldIndex) {
104
- if (y >= bounds.top) style.transform = transformDown;else style.transform = '';
105
+ if (y >= bounds[CommonFields[2]]) style.transform = transformDown;else style.transform = '';
105
106
  } else {
106
107
  if (y <= bounds.bottom) style.transform = transformUp;else style.transform = '';
107
108
  }
@@ -109,25 +110,25 @@ var DroppableList = function (_Component) {
109
110
  });
110
111
  var i = list.findIndex(function (id) {
111
112
  var bounds = draggables[id].bounds;
112
- return y >= bounds.top && y <= bounds.bottom;
113
+ return y >= bounds[CommonFields[2]] && y <= bounds.bottom;
113
114
  });
114
- newIndex = i !== -1 ? i : list.length;
115
+ newIndex = i !== -1 ? i : list[CommonFields[5]];
115
116
  };
116
117
  var onDragStart = function onDragStart(e, draggable) {
117
118
  dragging = true;
118
119
  dropped = false;
119
120
  oldIndex = list.indexOf(props(draggable).id);
120
- that.scrollOffsetY = e.pageY - e.clientY;
121
+ that.scrollOffsetY = e[CommonFields[7]] - e.clientY;
121
122
  that.scroll = orNoop(props$1().getScrollPosition)() || 0;
122
123
  that.scrollDiff = 0;
123
124
  list.forEach(function (id) {
124
- draggables[id].bounds = draggables[id].element.getBoundingClientRect();
125
+ draggables[id].bounds = draggables[id].element[CommonFields[13]]();
125
126
  });
126
127
  };
127
128
  var reset = function reset(ignoredIndex, transition) {
128
129
  list.forEach(function (id, i) {
129
130
  if (i !== ignoredIndex) {
130
- var s = draggables[id].element.style;
131
+ var s = draggables[id].element[CommonFields[4]];
131
132
  s.transform = '';
132
133
  s.transition = transition;
133
134
  }
@@ -150,17 +151,17 @@ var DroppableList = function (_Component) {
150
151
  var onDrop = function onDrop(data) {
151
152
  dropped = true;
152
153
  var draggable = draggables[list[oldIndex]];
153
- var style = draggable.element.style;
154
- var diff = (newIndex - oldIndex) * draggable.bounds.height;
154
+ var style = draggable.element[CommonFields[4]];
155
+ var diff = (newIndex - oldIndex) * draggable.bounds[CommonFields[1]];
155
156
  var transform = style.transform;
156
- var position = transform.substring(11, transform.length - 3);
157
+ var position = transform.substring(11, transform[CommonFields[5]] - 3);
157
158
  style.transform = 'translateY(' + (position - diff) + 'px)';
158
159
  orNoop(props$1().onDrop)(data, oldIndex, newIndex);
159
160
  reset(newIndex, 'unset');
160
161
  };
161
162
  that[render] = function () {
162
163
  var _props = props$1();
163
- var className = _props.className,
164
+ var className = _props[__className],
164
165
  initializer = _props.initializer;
165
166
  return ReactCreateElement(DNDDroppable, {
166
167
  [__className]: classNames('DroppableList', className, resetting() && 'resetting'),
package/Dropzone.js CHANGED
@@ -1,3 +1,4 @@
1
+ import CommonFields from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -13,7 +14,7 @@ import { stateGS, render, propsGetter, PureComponent } from './ReactConstants.js
13
14
  var toArray = function toArray(o) {
14
15
  if (o instanceof Array) return o;
15
16
  var l = [];
16
- for (var i = 0; i < o.length; i++) {
17
+ for (var i = 0; i < o[CommonFields[5]]; i++) {
17
18
  l.push(o[i]);
18
19
  }
19
20
  return l;
@@ -68,14 +69,14 @@ var Dropzone = function (_PureComponent) {
68
69
  entries = entries.filter(function (el) {
69
70
  return el !== e.target;
70
71
  });
71
- if (entries.length === 0) isDragging(false);
72
+ if (entries[CommonFields[5]] === 0) isDragging(false);
72
73
  prevent(e);
73
74
  };
74
75
  var inputRef = createRef();
75
76
  that[render] = function () {
76
77
  var _props = props(),
77
- children = _props.children,
78
- className = _props.className,
78
+ children = _props[__children],
79
+ className = _props[__className],
79
80
  disabled = _props.disabled,
80
81
  clickable = _props.clickable,
81
82
  multiple = _props.multiple,
@@ -99,7 +100,7 @@ var Dropzone = function (_PureComponent) {
99
100
  accept: accept,
100
101
  multiple: !!multiple,
101
102
  onClick: function onClick() {
102
- inputRef().value = '';
103
+ inputRef()[CommonFields[8]] = '';
103
104
  },
104
105
  onChange: onDrop
105
106
  }), children);
package/FilteredList.js CHANGED
@@ -1,3 +1,4 @@
1
+ import CommonFields from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -41,7 +42,7 @@ var FilteredList = function (_PureComponent) {
41
42
  var filtered = _this.list.filter(function (id) {
42
43
  return !_this.hidden[id];
43
44
  });
44
- if (selectSingle && filtered.length === 1) return filtered[0];
45
+ if (selectSingle && filtered[CommonFields[5]] === 1) return filtered[0];
45
46
  return null;
46
47
  } else {
47
48
  return value;
@@ -54,10 +55,10 @@ var FilteredList = function (_PureComponent) {
54
55
  return selected === id;
55
56
  });
56
57
  if (_this.hidden[list[position]]) position = -1;
57
- while (++position < list.length) {
58
+ while (++position < list[CommonFields[5]]) {
58
59
  if (!_this.hidden[list[position]]) break;
59
60
  }
60
- if (position < list.length) {
61
+ if (position < list[CommonFields[5]]) {
61
62
  var id = list[position];
62
63
  _this.setState({
63
64
  selected: id
@@ -71,7 +72,7 @@ var FilteredList = function (_PureComponent) {
71
72
  var position = list.findIndex(function (id) {
72
73
  return selected === id;
73
74
  });
74
- if (_this.hidden[list[position]]) position = list.length;
75
+ if (_this.hidden[list[position]]) position = list[CommonFields[5]];
75
76
  while (--position >= 0) {
76
77
  if (!_this.hidden[list[position]]) break;
77
78
  }
@@ -88,9 +89,9 @@ var FilteredList = function (_PureComponent) {
88
89
  var container = _this.el;
89
90
  var scrollTop = container.getScroll();
90
91
  var height = container.getHeight();
91
- var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + child.clientHeight;
92
+ var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + child[CommonFields[9]];
92
93
  if (!isVisible) {
93
- var scrollToBottom = child.offsetTop + child.clientHeight - height;
94
+ var scrollToBottom = child.offsetTop + child[CommonFields[9]] - height;
94
95
  var scrollToTop = child.offsetTop;
95
96
  if (Math.abs(scrollTop - scrollToTop) < Math.abs(scrollTop - scrollToBottom)) {
96
97
  container.setScroll(scrollToTop);
@@ -103,7 +104,7 @@ var FilteredList = function (_PureComponent) {
103
104
  _this.setState({
104
105
  selected: -1
105
106
  });
106
- _this.el.scrollTop = 0;
107
+ _this.el[CommonFields[11]] = 0;
107
108
  };
108
109
  _this.scrollTo = function (id) {
109
110
  return _this.el.setScroll(_this.elements[id] && _this.elements[id].offsetTop);
@@ -138,12 +139,12 @@ var FilteredList = function (_PureComponent) {
138
139
  data = _this$props.data,
139
140
  labels = _this$props.labels,
140
141
  filter = _this$props.filter,
141
- className = _this$props.className,
142
+ className = _this$props[__className],
142
143
  selected = _this$props.selected,
143
144
  inline = _this$props.inline,
144
145
  childComponent = _this$props.childComponent,
145
146
  childProps = _this$props.childProps,
146
- style = _this$props.style,
147
+ style = _this$props[CommonFields[4]],
147
148
  scroll = _this$props.scroll;
148
149
  return ReactCreateElement(Scrollable, {
149
150
  [__className]: classNames('FilteredList', className, inline ? 'inline' : 'popup'),
@@ -216,7 +217,7 @@ var ItemWrapper = function (_React$Component) {
216
217
  onMouseEnter = _this$props2.onMouseEnter,
217
218
  onMouseLeave = _this$props2.onMouseLeave,
218
219
  classProvider = _this$props2.classProvider,
219
- className = _this$props2.className,
220
+ className = _this$props2[__className],
220
221
  childComponent = _this$props2.childComponent,
221
222
  childProps = _this$props2.childProps;
222
223
  var child = React.createElement(childComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
@@ -1,3 +1,4 @@
1
+ import CommonFields from "./CommonFields";
1
2
  import 'react';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -14,7 +15,7 @@ var FloatingActionButton = function FloatingActionButton(_ref) {
14
15
  var icon = _ref.icon,
15
16
  onClick = _ref.onClick,
16
17
  mini = _ref.mini,
17
- className = _ref.className,
18
+ className = _ref[__className],
18
19
  hidden = _ref.hidden;
19
20
  return ReactCreateElement(Button, {
20
21
  onClick: onClick,
@@ -1,3 +1,4 @@
1
+ import CommonFields from "./CommonFields";
1
2
  import React from 'react';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -19,7 +20,7 @@ var defaultValueFormat = function defaultValueFormat(value, loaded, total) {
19
20
  return ReactCreateElement(React.Fragment, null, formatNumberWithMaxLength(loaded, 1, abbreviation, 4), "/", formatNumberWithMaxLength(total, 1, abbreviation, 4), ReactCreateElement("br", null), abbreviation);
20
21
  };
21
22
  var FormUploadProgress = function FormUploadProgress(_ref) {
22
- var value = _ref.value,
23
+ var value = _ref[CommonFields[8]],
23
24
  cancel = _ref.cancel,
24
25
  loaded = _ref.loaded,
25
26
  total = _ref.total,