react-ui-basics 0.0.158 → 0.0.161

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 (82) hide show
  1. package/Animated.js +11 -10
  2. package/AutocompleteSelect.js +62 -63
  3. package/Button.js +21 -22
  4. package/Checkbox.js +7 -8
  5. package/CircleProgress.js +5 -6
  6. package/CommonFields.js +23 -15
  7. package/DNDContainer.js +47 -48
  8. package/DNDDraggable.js +8 -9
  9. package/DNDDroppable.js +8 -9
  10. package/Dialog.js +16 -17
  11. package/DropFileInput.js +4 -5
  12. package/DroppableHorizontalList.js +26 -27
  13. package/DroppableList.js +26 -27
  14. package/Dropzone.js +17 -18
  15. package/FilteredList.js +40 -41
  16. package/FloatingActionButton.js +4 -5
  17. package/FormUploadProgress.js +8 -9
  18. package/ImageGallery.js +121 -122
  19. package/MaterialIcon.js +5 -6
  20. package/Modal.js +17 -18
  21. package/ModalMenu.js +10 -11
  22. package/ReactConstants.d.ts +2 -0
  23. package/ReactConstants.js +2 -1
  24. package/ReactCreateElement.js +2 -0
  25. package/ReadyListener.js +9 -10
  26. package/Scrollable.js +50 -51
  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 +14 -15
  32. package/Table.js +26 -27
  33. package/TextField.js +17 -18
  34. package/Tools.d.ts +1 -0
  35. package/Tools.js +14 -12
  36. package/_virtual/_commonjsHelpers.js +2 -0
  37. package/_virtual/_react.js +2 -0
  38. package/_virtual/react-jsx-runtime.development.js +2 -0
  39. package/bundle.css +446 -446
  40. package/index.js +3 -3
  41. package/package.json +1 -1
  42. package/router/HistoryTools.js +2 -0
  43. package/router/Link.js +5 -6
  44. package/router/NavLink.js +5 -6
  45. package/router/Route.js +15 -16
  46. package/router/index.js +2 -3
  47. package/store/ProxyTools.js +2 -3
  48. package/store/Store.js +2 -3
  49. package/Animated.js.map +0 -1
  50. package/AutocompleteSelect.js.map +0 -1
  51. package/Button.js.map +0 -1
  52. package/Checkbox.js.map +0 -1
  53. package/CircleProgress.js.map +0 -1
  54. package/CommonFields.js.map +0 -1
  55. package/DNDContainer.js.map +0 -1
  56. package/DNDDraggable.js.map +0 -1
  57. package/DNDDroppable.js.map +0 -1
  58. package/Dialog.js.map +0 -1
  59. package/DropFileInput.js.map +0 -1
  60. package/DroppableHorizontalList.js.map +0 -1
  61. package/DroppableList.js.map +0 -1
  62. package/Dropzone.js.map +0 -1
  63. package/FilteredList.js.map +0 -1
  64. package/FloatingActionButton.js.map +0 -1
  65. package/FormUploadProgress.js.map +0 -1
  66. package/ImageGallery.js.map +0 -1
  67. package/MaterialIcon.js.map +0 -1
  68. package/Modal.js.map +0 -1
  69. package/ModalMenu.js.map +0 -1
  70. package/ReactConstants.js.map +0 -1
  71. package/ReactCreateElement.js.map +0 -1
  72. package/ReadyListener.js.map +0 -1
  73. package/Scrollable.js.map +0 -1
  74. package/ScrollableTable.js.map +0 -1
  75. package/Size.js.map +0 -1
  76. package/Snackbar.js.map +0 -1
  77. package/SpinningProgress.js.map +0 -1
  78. package/Switch.js.map +0 -1
  79. package/Table.js.map +0 -1
  80. package/TextField.js.map +0 -1
  81. package/Tools.js.map +0 -1
  82. package/index.js.map +0 -1
package/Animated.js CHANGED
@@ -1,10 +1,9 @@
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";
1
3
  import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, defineProperty as _defineProperty, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js';
2
- import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
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 from 'react';
9
8
  import PropTypes from 'prop-types';
10
9
  import { setOf, clearTimeout, allPropsExcept, classNames, requestAnimationFrame, setTimeout } from './Tools.js';
@@ -76,14 +75,14 @@ var Animated = function (_PureComponent) {
76
75
  _this = _super.call(this, properties);
77
76
  var that = _assertThisInitialized(_this);
78
77
  that.state = animatedState(!!properties[value]);
79
- that[componentDidMount] = function () {
78
+ that[ReactConstants[0]] = function () {
80
79
  var _props = props(that);
81
80
  if (!!_props[value]) processMounting(that, _props[mounting], _props[mountingDelay]);
82
81
  };
83
- that[componentWillUnmount] = function () {
82
+ that[ReactConstants[1]] = function () {
84
83
  clearTimer(that);
85
84
  };
86
- that[render] = function () {
85
+ that[ReactConstants[3]] = function () {
87
86
  var _state = state(that);
88
87
  if (!_state[enabled]) return null;
89
88
  var _props = props(that),
@@ -94,13 +93,15 @@ var Animated = function (_PureComponent) {
94
93
  var childStyles = styles["default"];
95
94
  if (isMounting) childStyles = styles[mounting];else if (isUnMounting) childStyles = styles[unmounting];else if (isMounted) childStyles = styles[mounted] || styles[mounting];
96
95
  var otherProps = allPropsExcept(_props, selfProps);
97
- return React.Children.map(_props[children], function (child) {
96
+ return React.Children.map(_props[ReactConstants[4]], function (child) {
98
97
  var _objectSpread2$1;
99
- return child && React.cloneElement(child, _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, className, classNames(props(child)[className], _props[className], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting)), _defineProperty(_objectSpread2$1, "style", _objectSpread2(_objectSpread2({}, props(child)[__style]), childStyles)), _objectSpread2$1), otherProps));
98
+ return child && React.cloneElement(child, _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, className, classNames(props(child)[ReactConstants[5]], _props[ReactConstants[5]], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting)), _defineProperty(_objectSpread2$1, "style", _objectSpread2(_objectSpread2({}, __style(props(child))), childStyles)), _objectSpread2$1), otherProps));
100
99
  });
101
100
  };
102
- that[componentDidUpdate] = function () {
103
- var _props = props(that),
101
+ that[ReactConstants[2]] = function () {
102
+ var p = props;
103
+ var t = that;
104
+ var _props = p(t) || props(that),
104
105
  _state = state(that),
105
106
  v = _props[value],
106
107
  mountingDuration = _props[mounting],
@@ -1,10 +1,9 @@
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";
1
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, toConsumableArray as _toConsumableArray } from './_virtual/_rollupPluginBabelHelpers.js';
2
- import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
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 from 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import PropTypes from 'prop-types';
@@ -30,7 +29,7 @@ var DummyChild = function DummyChild(_ref) {
30
29
  onClick = _ref.onClick;
31
30
  orNoop(dataConsumer)(label || id);
32
31
  return ReactCreateElement("div", {
33
- [__className]: "DummyChild",
32
+ [ReactConstants[5]]: "DummyChild",
34
33
  onClick: onClick
35
34
  }, label || id);
36
35
  };
@@ -68,7 +67,7 @@ var AutocompleteSelect = function (_PureComponent) {
68
67
  _classCallCheck(this, AutocompleteSelect);
69
68
  _this = _super.call(this, props);
70
69
  _this.initSelected = function (_ref2, _ref3) {
71
- var value = _ref2[__value],
70
+ var value = __value(_ref2),
72
71
  mode = _ref2.mode,
73
72
  allowCustom = _ref2.allowCustom;
74
73
  var _ref3$filterValue = _ref3.filterValue,
@@ -89,10 +88,10 @@ var AutocompleteSelect = function (_PureComponent) {
89
88
  };
90
89
  });
91
90
  _this.onClickOutside = function () {
92
- var _this$props = _this.props,
91
+ var _this$props = __props(_this),
93
92
  allowCustom = _this$props.allowCustom,
94
93
  required = _this$props.required;
95
- var filterValue = _this.state.filterValue;
94
+ var filterValue = __state(_this).filterValue;
96
95
  if (allowCustom && (!!filterValue || !required)) {
97
96
  _this.onSelect();
98
97
  }
@@ -102,17 +101,17 @@ var AutocompleteSelect = function (_PureComponent) {
102
101
  _this.onCancel();
103
102
  };
104
103
  _this.onCancel = function () {
105
- orNoop(_this.props.onCancel)();
104
+ orNoop(__props(_this).onCancel)();
106
105
  };
107
106
  _this.onSelect = function (selectedId) {
108
- var _this$props2 = _this.props,
107
+ var _this$props2 = __props(_this),
109
108
  mode = _this$props2.mode,
110
109
  required = _this$props2.required,
111
110
  allowCustom = _this$props2.allowCustom,
112
111
  onSelect = _this$props2.onSelect,
113
112
  onChange = _this$props2.onChange,
114
113
  defaultValue = _this$props2["default"];
115
- var _this$state = _this.state,
114
+ var _this$state = __state(_this),
116
115
  filterValue = _this$state.filterValue,
117
116
  currentSelection = _this$state.selected;
118
117
  if (selectedId == null && (!!filterValue || !required) && allowCustom && (!_this.input || !_this.input.check())) selectedId = filterValue.trim();
@@ -124,7 +123,7 @@ var AutocompleteSelect = function (_PureComponent) {
124
123
  var selected = _objectSpread2({}, currentSelection);
125
124
  if (selected[selectedId] && (defaultValue || isMultiSelect)) {
126
125
  delete selected[selectedId];
127
- if (defaultValue && Object.keys(selected)[__length] === 0) selected[defaultValue] = defaultValue;
126
+ if (defaultValue && Object.keys(selected).length === 0) selected[defaultValue] = defaultValue;
128
127
  } else if (isSelected && isMultiSelect) {
129
128
  selected[selectedId] = selectedId;
130
129
  } else if (isSelected) {
@@ -150,33 +149,33 @@ var AutocompleteSelect = function (_PureComponent) {
150
149
  selected: {},
151
150
  filterValue: ''
152
151
  });
153
- orNoop(_this.props.onSelect)(null);
154
- orNoop(_this.props.onChange)([]);
155
- _this.initSelected(_this.props, _this.state);
152
+ orNoop(__props(_this).onSelect)(null);
153
+ orNoop(__props(_this).onChange)([]);
154
+ _this.initSelected(__props(_this), __state(_this));
156
155
  };
157
156
  _this.remove = function (id) {
158
- var result = _objectSpread2(_objectSpread2({}, _this.state), {}, {
159
- selected: _objectSpread2({}, _this.state.selected),
157
+ var result = _objectSpread2(_objectSpread2({}, __state(_this)), {}, {
158
+ selected: _objectSpread2({}, __state(_this).selected),
160
159
  filterValue: ''
161
160
  });
162
161
  delete result.selected[id];
163
162
  _this.setState(result);
164
- orNoop(_this.props.onChange)(Object.values(result.selected));
163
+ orNoop(__props(_this).onChange)(Object.values(result.selected));
165
164
  };
166
165
  _this.onChange = function (event) {
167
- var value = event.target[__value];
166
+ var value = __target(event).value;
168
167
  _this.setState({
169
168
  filterValue: value
170
169
  });
171
- _this.props.onFilterInputChange == null ? void 0 : _this.props.onFilterInputChange(value);
170
+ __props(_this).onFilterInputChange == null ? void 0 : __props(_this).onFilterInputChange(value);
172
171
  };
173
172
  var that = _assertThisInitialized(_this);
174
173
  that.state = {
175
- selected: prepareSelected(props[__value]),
174
+ selected: prepareSelected(__value(props)),
176
175
  isActive: !!props.focused
177
176
  };
178
177
  that.randomId = getRandomId('acs-');
179
- var data = props.data,
178
+ var data = __data(props),
180
179
  getSelected = props.getSelected;
181
180
  isFunction(data) && data(function (data) {
182
181
  return that.setState({
@@ -184,48 +183,48 @@ var AutocompleteSelect = function (_PureComponent) {
184
183
  });
185
184
  });
186
185
  getSelected && getSelected(function () {
187
- return Object.values(that.state.selected);
186
+ return Object.values(__state(that).selected);
188
187
  });
189
188
  return _this;
190
189
  }
191
190
  _createClass(AutocompleteSelect, [{
192
- key: "componentDidMount",
191
+ key: [ReactConstants[0]],
193
192
  value: function componentDidMount() {
194
193
  var _this2 = this;
195
194
  addEventListener(DOCUMENT, 'mousedown', this.listener = function (e) {
196
- if (_this2.state.isActive && _this2.el && !_this2.el.contains(e.target)) {
195
+ if (__state(_this2).isActive && _this2.el && !_this2.el.contains(__target(e))) {
197
196
  _this2.onClickOutside();
198
197
  }
199
198
  });
200
- if (this.props.required) {
199
+ if (__props(this).required) {
201
200
  var form = findParent(this.el.parentNode, 'form');
202
201
  if (form) {
203
202
  addEventListener(this.submitButton = form.querySelector('button[type=submit]'), 'click', this.formSubmitListener = function (e) {
204
- var errored = Object.keys(_this2.state.selected)[__length] === 0;
203
+ var errored = Object.keys(__state(_this2).selected).length === 0;
205
204
  _this2.setState({
206
205
  errored: errored
207
206
  });
208
207
  });
209
208
  }
210
209
  }
211
- this.initSelected(this.props, this.state);
210
+ this.initSelected(__props(this), __state(this));
212
211
  }
213
212
  }, {
214
- key: "componentDidUpdate",
213
+ key: [ReactConstants[2]],
215
214
  value: function componentDidUpdate(prevProps, prevState, snapshot) {
216
- if (this.props[__value] !== prevProps[__value]) this.initSelected(this.props, this.state);
215
+ if (__props(this).value !== __value(prevProps)) this.initSelected(__props(this), __state(this));
217
216
  }
218
217
  }, {
219
- key: "componentWillUnmount",
218
+ key: [ReactConstants[1]],
220
219
  value: function componentWillUnmount() {
221
220
  removeEventListener(DOCUMENT, 'mousedown', this.listener);
222
221
  removeEventListener(this.submitButton, 'click', this.formSubmitListener);
223
222
  }
224
223
  }, {
225
- key: "render",
224
+ key: [ReactConstants[3]],
226
225
  value: function render() {
227
226
  var _this3 = this;
228
- var _this$props3 = this.props,
227
+ var _this$props3 = __props(this),
229
228
  childComponent = _this$props3.childComponent,
230
229
  childProps = _this$props3.childProps,
231
230
  withArrow = _this$props3.withArrow,
@@ -237,44 +236,44 @@ var AutocompleteSelect = function (_PureComponent) {
237
236
  mode = _this$props3.mode,
238
237
  selectedMode = _this$props3.selectedMode,
239
238
  prefilter = _this$props3.prefilter,
240
- className = _this$props3[__className],
239
+ className = _this$props3[ReactConstants[5]],
241
240
  scrollToValue = _this$props3.scrollToValue,
242
241
  scroll = _this$props3.scroll,
243
242
  required = _this$props3.required,
244
243
  allowCustom = _this$props3.allowCustom,
245
244
  inlineSelected = _this$props3.inlineSelected,
246
245
  removeIcon = _this$props3.removeIcon;
247
- var id = this.props.id || this.randomId;
248
- var selectedComponent = this.props.selectedComponent || childComponent;
249
- var _this$state2 = this.state,
246
+ var id = __props(this).id || this.randomId;
247
+ var selectedComponent = __props(this).selectedComponent || childComponent;
248
+ var _this$state2 = __state(this),
250
249
  _this$state2$selected = _this$state2.selected,
251
250
  selected = _this$state2$selected === void 0 ? {} : _this$state2$selected,
252
251
  _this$state2$filterVa = _this$state2.filterValue,
253
252
  filterValue = _this$state2$filterVa === void 0 ? '' : _this$state2$filterVa,
254
253
  errored = _this$state2.errored;
255
- var isActive = this.state.isActive;
256
- if (this.props.isActive !== UNDEFINED) {
257
- isActive = this.props.isActive;
254
+ var isActive = __state(this).isActive;
255
+ if (__props(this).isActive !== UNDEFINED) {
256
+ isActive = __props(this).isActive;
258
257
  }
259
- var _this$props4 = this.props,
260
- _this$props4$data = _this$props4.data,
258
+ var _this$props4 = __props(this),
259
+ _this$props4$data = __data(_this$props4),
261
260
  data = _this$props4$data === void 0 ? [] : _this$props4$data,
262
261
  _this$props4$labels = _this$props4.labels,
263
262
  labels = _this$props4$labels === void 0 ? {} : _this$props4$labels;
264
- if (this.state.data) data = this.state.data;
263
+ if (__state(this).data) data = __state(this).data;
265
264
  if (!Array.isArray(data)) data = [];
266
265
  var selectedIds = Object.values(selected);
267
- var hasSelected = selectedIds[__length] !== 0;
266
+ var hasSelected = __length(selectedIds) !== 0;
268
267
  var setActive = function setActive(e) {
269
268
  stopPropagation(e);
270
269
  _this3.setState({
271
270
  isActive: true
272
271
  }, function () {
273
- return scrollToValue && selectedIds[__length] > 0 && _this3.list.scrollTo(selectedIds[0]);
272
+ return scrollToValue && __length(selectedIds) > 0 && _this3.list.scrollTo(selectedIds[0]);
274
273
  });
275
274
  };
276
275
  var toggle = function toggle(e) {
277
- if (!_this3.state.isActive) {
276
+ if (!__state(_this3).isActive) {
278
277
  setActive(e);
279
278
  } else {
280
279
  stopPropagation(e);
@@ -291,10 +290,10 @@ var AutocompleteSelect = function (_PureComponent) {
291
290
  var filterFunction = this.createFilter(prefilter, filterValue, filterValueTrimmed.toLowerCase(), filter);
292
291
  return ReactCreateElement("div", {
293
292
  id: id,
294
- [__className]: classNames('AutocompleteSelect', mode, isMultipleSelect(mode) && 'multi', className, withFilter ? 'withFilter' : 'withoutFilter', isActive && 'active', errored && 'errored', inlineSelected && 'inlineSelected', hasSelected && 'hasSelected'),
293
+ [ReactConstants[5]]: classNames('AutocompleteSelect', mode, isMultipleSelect(mode) && 'multi', className, withFilter ? 'withFilter' : 'withoutFilter', isActive && 'active', errored && 'errored', inlineSelected && 'inlineSelected', hasSelected && 'hasSelected'),
295
294
  ref: ref('el', this)
296
295
  }, label && ReactCreateElement("label", {
297
- [__className]: classNames("label", (hasSelected || filterValue) && 'active', hasSelected && 'hasSelected'),
296
+ [ReactConstants[5]]: classNames("label", (hasSelected || filterValue) && 'active', hasSelected && 'hasSelected'),
298
297
  htmlFor: 'f-' + id,
299
298
  onClick: function onClick() {
300
299
  if (mode === MODE_MULTIPLE_MINI_INLINE || !isActive) {
@@ -302,20 +301,20 @@ var AutocompleteSelect = function (_PureComponent) {
302
301
  }
303
302
  }
304
303
  }, label, required && ' *', withArrow && ReactCreateElement("span", {
305
- [__className]: "arrow"
304
+ [ReactConstants[5]]: "arrow"
306
305
  })), (!isActive || mode === MODE_MULTIPLE || mode === MODE_INLINE_MULTIPLE || mode === MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE_AUTO || !withFilter) && !inlineSelected && hasSelected && ReactCreateElement("div", {
307
- [__className]: classNames('selected', !label && 'nolabel', (mode === MODE_MULTIPLE_MINI || mode === MODE_MINI || mode === MODE_MULTIPLE_MINI_INLINE) && 'clickable', selectedMode),
306
+ [ReactConstants[5]]: classNames('selected', !label && 'nolabel', (mode === MODE_MULTIPLE_MINI || mode === MODE_MINI || mode === MODE_MULTIPLE_MINI_INLINE) && 'clickable', selectedMode),
308
307
  onClick: toggle
309
308
  }, selectedMode === 'full' && selectedIds.map(function (id) {
310
309
  return ReactCreateElement("div", {
311
- [__className]: "value",
310
+ [ReactConstants[5]]: "value",
312
311
  key: id
313
312
  }, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
314
313
  id: id,
315
314
  label: getLabel(labels, id),
316
315
  onClick: setActive
317
316
  })), ReactCreateElement("div", {
318
- [__className]: "button remove",
317
+ [ReactConstants[5]]: "button remove",
319
318
  onClick: function onClick(e) {
320
319
  stopPropagation(e);
321
320
  _this3.remove(id);
@@ -328,23 +327,23 @@ var AutocompleteSelect = function (_PureComponent) {
328
327
  id: id,
329
328
  label: getLabel(labels, id),
330
329
  onClick: setActive
331
- })), id !== selectedIds[selectedIds[__length] - 1] && ', ');
330
+ })), id !== selectedIds[__length(selectedIds) - 1] && ', ');
332
331
  }), !label && withArrow && ReactCreateElement("span", {
333
- [__className]: "arrow"
332
+ [ReactConstants[5]]: "arrow"
334
333
  }), withReset && ReactCreateElement(Button, {
335
- [__className]: "reset",
334
+ [ReactConstants[5]]: "reset",
336
335
  raised: false,
337
336
  onClick: this.clean
338
337
  }, removeIcon)), inlineSelected && hasSelected && ReactCreateElement(React.Fragment, null, selectedMode === 'full' && selectedIds.map(function (id) {
339
338
  return ReactCreateElement("div", {
340
- [__className]: "value",
339
+ [ReactConstants[5]]: "value",
341
340
  key: id
342
341
  }, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
343
342
  id: id,
344
343
  label: getLabel(labels, id),
345
344
  onClick: setActive
346
345
  })), ReactCreateElement("div", {
347
- [__className]: "button remove",
346
+ [ReactConstants[5]]: "button remove",
348
347
  onClick: function onClick(e) {
349
348
  stopPropagation(e);
350
349
  _this3.remove(id);
@@ -357,9 +356,9 @@ var AutocompleteSelect = function (_PureComponent) {
357
356
  id: id,
358
357
  label: getLabel(labels, id),
359
358
  onClick: setActive
360
- })), id !== selectedIds[selectedIds[__length] - 1] && ', ');
361
- })), (isActive || !hasSelected && mode !== MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE || mode === MODE_MULTIPLE_AUTO && selectedIds[__length] > 1 || mode === MODE_INLINE_MULTIPLE) && ReactCreateElement("div", {
362
- [__className]: "input",
359
+ })), id !== selectedIds[__length(selectedIds) - 1] && ', ');
360
+ })), (isActive || !hasSelected && mode !== MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE || mode === MODE_MULTIPLE_AUTO && __length(selectedIds) > 1 || mode === MODE_INLINE_MULTIPLE) && ReactCreateElement("div", {
361
+ [ReactConstants[5]]: "input",
363
362
  "data-value": filterValue
364
363
  }, withFilter && ReactCreateElement(TextField, {
365
364
  autoComplete: "new-password",
@@ -374,7 +373,7 @@ var AutocompleteSelect = function (_PureComponent) {
374
373
  isActive: true
375
374
  });
376
375
  },
377
- check: this.props.filterCheck,
376
+ check: __props(this).filterCheck,
378
377
  onKeyDown: function onKeyDown(e) {
379
378
  var keyCode = e.keyCode;
380
379
  if (keyCode === 38
@@ -394,8 +393,8 @@ var AutocompleteSelect = function (_PureComponent) {
394
393
  _this3.onSelect(_this3.getSelected());
395
394
  } else if (keyCode === 8
396
395
  ) {
397
- if (!filterValue && selectedIds[__length] !== 0 && isMultipleSelect(mode)) {
398
- _this3.remove(selectedIds[selectedIds[__length] - 1]);
396
+ if (!filterValue && __length(selectedIds) !== 0 && isMultipleSelect(mode)) {
397
+ _this3.remove(selectedIds[__length(selectedIds) - 1]);
399
398
  }
400
399
  _this3.reset();
401
400
  } else if (keyCode === 46
@@ -412,7 +411,7 @@ var AutocompleteSelect = function (_PureComponent) {
412
411
  }
413
412
  }
414
413
  }), !withFilter && inputLabel && ReactCreateElement("label", null, inputLabel)), ReactCreateElement(FilteredList, {
415
- [__className]: classNames(isActive && 'visible'),
414
+ [ReactConstants[5]]: classNames(isActive && 'visible'),
416
415
  ref: ref('list', this),
417
416
  filter: filterFunction,
418
417
  selectSingle: !allowCustom,
package/Button.js CHANGED
@@ -1,10 +1,9 @@
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";
1
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
- import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
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, createRef, DOCUMENT, addEventListener, orNoop } from './Tools.js';
@@ -23,14 +22,14 @@ var Button = function (_PureComponent) {
23
22
  var ripple = createRef();
24
23
  var rippleClassName = stateGS(that);
25
24
  var onMouseDown = function onMouseDown(e) {
26
- if (!_this.props.withRipple) return;
27
- var rect = el()[__getBoundingClientRect]();
25
+ if (!props(that).withRipple) return;
26
+ var rect = el().getBoundingClientRect();
28
27
  var rippleElement = ripple();
29
- var style = rippleElement[__style];
28
+ var style = __style(rippleElement);
30
29
  var body = DOCUMENT.body;
31
- style[__height] = style[__width] = Math.max(rect[__width], rect[__height]) + 'px';
32
- style[__top] = e[__pageY] - rect[__top] - rippleElement.offsetHeight / 2 - body[__scrollTop] + 'px';
33
- style[__left] = e[__pageX] - rect[__left] - rippleElement.offsetWidth / 2 - body[__scrollLeft] + 'px';
30
+ style.height = style.width = Math.max(__width(rect), __height(rect)) + 'px';
31
+ style.top = __pageY(e) - __top(rect) - rippleElement.offsetHeight / 2 - __scrollTop(body) + 'px';
32
+ style.left = __pageX(e) - __left(rect) - rippleElement.offsetWidth / 2 - __scrollLeft(body) + 'px';
34
33
  rippleClassName('show');
35
34
  addEventListener(rippleElement, 'animationend', function () {
36
35
  rippleClassName('showed');
@@ -39,28 +38,28 @@ var Button = function (_PureComponent) {
39
38
  var onFocus = function onFocus(e) {
40
39
  orNoop(props(that).onFocus)(e);
41
40
  if (rippleClassName() === 'show') return;
42
- var rect = el()[__getBoundingClientRect]();
43
- var style = ripple()[__style];
44
- var size = Math.max(rect[__width], rect[__height]) * 0.8;
45
- style[__height] = style[__width] = size + 'px';
46
- style[__top] = rect[__height] / 2 - size / 2 + 'px';
47
- style[__left] = rect[__width] / 2 - size / 2 + 'px';
41
+ var rect = el().getBoundingClientRect();
42
+ var style = __style(ripple());
43
+ var size = Math.max(__width(rect), __height(rect)) * 0.8;
44
+ style.height = style.width = size + 'px';
45
+ style.top = __height(rect) / 2 - size / 2 + 'px';
46
+ style.left = __width(rect) / 2 - size / 2 + 'px';
48
47
  rippleClassName('focused');
49
48
  };
50
- that[render] = function () {
49
+ that[ReactConstants[3]] = function () {
51
50
  var _props = props(that),
52
- children = _props[__children],
51
+ children = _props[ReactConstants[4]],
53
52
  type = _props.type,
54
- className = _props[__className],
53
+ className = _props[ReactConstants[5]],
55
54
  onClick = _props.onClick,
56
55
  flat = _props.flat,
57
56
  _props$raised = _props.raised,
58
57
  raised = _props$raised === void 0 ? !flat : _props$raised,
59
58
  round = _props.round,
60
- style = _props[__style],
59
+ style = __style(_props),
61
60
  disabled = _props.disabled;
62
61
  return ReactCreateElement("button", {
63
- [__className]: classNames('Button', className, disabled && 'disabled', raised && 'raised', flat && 'flat', round && 'round'),
62
+ [ReactConstants[5]]: classNames('Button', className, disabled && 'disabled', raised && 'raised', flat && 'flat', round && 'round'),
64
63
  onFocus: onFocus,
65
64
  disabled: disabled,
66
65
  style: style,
@@ -69,7 +68,7 @@ var Button = function (_PureComponent) {
69
68
  onMouseDown: onMouseDown,
70
69
  ref: el
71
70
  }, children, ReactCreateElement("span", {
72
- [__className]: classNames("ripple", rippleClassName()),
71
+ [ReactConstants[5]]: classNames("ripple", rippleClassName()),
73
72
  ref: ripple
74
73
  }));
75
74
  };
@@ -85,7 +84,7 @@ if (process.env.NODE_ENV !== 'production') {
85
84
  disabled: PropTypes.bool,
86
85
  withRipple: PropTypes.bool,
87
86
  type: PropTypes.oneOf(['button', 'submit', 'reset']),
88
- [__className]: PropTypes.string,
87
+ [ReactConstants[5]]: PropTypes.string,
89
88
  onClick: PropTypes.func,
90
89
  onFocus: PropTypes.func,
91
90
  style: PropTypes.object
package/Checkbox.js CHANGED
@@ -1,10 +1,9 @@
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";
1
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
- import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
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';
@@ -20,17 +19,17 @@ var Checkbox = function (_PureComponent) {
20
19
  _this = _super.call(this, properties);
21
20
  var randomId = getRandomId('cb-');
22
21
  var props = propsGetter(_assertThisInitialized(_this));
23
- _this[render] = function () {
22
+ _this[ReactConstants[3]] = function () {
24
23
  var _props = props(),
25
24
  label = _props.label,
26
25
  name = _props.name,
27
26
  onChange = _props.onChange,
28
- value = _props[__value],
29
- className = _props[__className],
27
+ value = __value(_props),
28
+ className = _props[ReactConstants[5]],
30
29
  disabled = _props.disabled;
31
30
  var id = props().id || randomId;
32
31
  return ReactCreateElement("div", {
33
- [__className]: classNames("Checkbox", className)
32
+ [ReactConstants[5]]: classNames("Checkbox", className)
34
33
  }, ReactCreateElement("input", {
35
34
  name: name,
36
35
  id: id,
@@ -51,7 +50,7 @@ if (process.env.NODE_ENV !== 'production') {
51
50
  onChange: PropTypes.func.isRequired,
52
51
  value: PropTypes.bool,
53
52
  disabled: PropTypes.bool,
54
- [__className]: PropTypes.string,
53
+ [ReactConstants[5]]: PropTypes.string,
55
54
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
56
55
  name: PropTypes.string,
57
56
  id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
package/CircleProgress.js CHANGED
@@ -1,10 +1,9 @@
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";
1
3
  import 'react';
2
- import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
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 PropTypes from 'prop-types';
10
9
 
@@ -14,14 +13,14 @@ var dashoffset = function dashoffset(percent) {
14
13
  return length * (100 - percent) / 100;
15
14
  };
16
15
  var CircleProgress = function CircleProgress(_ref) {
17
- var value = _ref[__value];
16
+ var value = __value(_ref);
18
17
  value = Number.parseFloat(value);
19
18
  return ReactCreateElement("div", {
20
- [__className]: "CircleProgress"
19
+ [ReactConstants[5]]: "CircleProgress"
21
20
  }, ReactCreateElement("svg", {
22
21
  viewBox: "0 0 24 24"
23
22
  }, ReactCreateElement("path", {
24
- [__className]: "line",
23
+ [ReactConstants[5]]: "line",
25
24
  style: {
26
25
  strokeDashoffset: dashoffset(Number.isFinite(value) ? value : 0),
27
26
  strokeDasharray: length
package/CommonFields.js CHANGED
@@ -1,17 +1,25 @@
1
- var width = 'width';
2
- var height = 'height';
3
- var top = 'top';
4
- var left = 'left';
5
- var style = 'style';
6
- var length = 'length';
7
- var pageX = 'pageX';
8
- var pageY = 'pageY';
9
- var value = 'value';
10
- var clientHeight = 'clientHeight';
11
- var clientWidth = 'clientWidth';
12
- var scrollTop = 'scrollTop';
13
- var scrollLeft = 'scrollLeft';
14
- var getBoundingClientRect = 'getBoundingClientRect';
1
+ var createAccessor = function createAccessor(field) {
2
+ return function (o) {
3
+ return o[field];
4
+ };
5
+ };
6
+ var width = createAccessor('width');
7
+ var height = createAccessor('height');
8
+ var top = createAccessor('top');
9
+ var left = createAccessor('left');
10
+ var style = createAccessor('style');
11
+ var length = createAccessor('length');
12
+ var pageX = createAccessor('pageX');
13
+ var pageY = createAccessor('pageY');
14
+ var value = createAccessor('value');
15
+ var clientHeight = createAccessor('clientHeight');
16
+ var clientWidth = createAccessor('clientWidth');
17
+ var scrollTop = createAccessor('scrollTop');
18
+ var scrollLeft = createAccessor('scrollLeft');
19
+ var target = createAccessor('target');
20
+ var data = createAccessor('data');
21
+ var state = createAccessor('state');
22
+ var props = createAccessor('props');
15
23
 
16
- export { clientHeight, clientWidth, getBoundingClientRect, height, left, length, pageX, pageY, scrollLeft, scrollTop, style, top, value, width };
24
+ export { clientHeight, clientWidth, createAccessor, data, height, left, length, pageX, pageY, props, scrollLeft, scrollTop, state, style, target, top, value, width };
17
25
  //# sourceMappingURL=CommonFields.js.map