@enact/ui 4.6.2 → 4.7.0
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/AnnounceDecorator/Announce.js +27 -17
- package/AnnounceDecorator/AnnounceDecorator.js +14 -7
- package/AnnounceDecorator/useAnnounce.js +1 -2
- package/BodyText/BodyText.js +14 -8
- package/Button/Button.js +16 -10
- package/CHANGELOG.md +10 -0
- package/Cancelable/Cancelable.js +13 -7
- package/Changeable/Changeable.js +11 -7
- package/ComponentOverride/ComponentOverride.js +18 -7
- package/FloatingLayer/FloatingLayer.js +10 -11
- package/FloatingLayer/FloatingLayerDecorator.js +9 -6
- package/ForwardRef/ForwardRef.js +11 -7
- package/GridListImageItem/GridListImageItem.js +16 -9
- package/Group/Group.js +17 -8
- package/Group/GroupItem.js +14 -10
- package/Heading/Heading.js +20 -9
- package/Icon/Icon.js +15 -8
- package/IconButton/IconButton.js +22 -9
- package/Image/Image.js +16 -8
- package/ImageItem/ImageItem.js +9 -1
- package/Item/Item.js +17 -9
- package/LabeledIcon/LabeledIcon.js +16 -8
- package/Layout/Cell.js +27 -4
- package/Layout/Layout.d.ts +22 -5
- package/Layout/Layout.js +154 -32
- package/Layout/Layout.module.css +8 -0
- package/Layout/tests/Layout-specs.js +39 -0
- package/Marquee/MarqueeController.js +50 -0
- package/Marquee/MarqueeDecorator.js +40 -2
- package/Measurable/Measurable.js +11 -7
- package/Media/Media.js +30 -23
- package/Placeholder/PlaceholderControllerDecorator.js +9 -8
- package/Placeholder/PlaceholderDecorator.js +7 -8
- package/ProgressBar/ProgressBar.js +12 -1
- package/RadioDecorator/RadioDecorator.js +13 -7
- package/Repeater/Repeater.js +14 -10
- package/Resizable/Resizable.js +12 -8
- package/Routable/Link.js +8 -8
- package/Routable/Routable.js +15 -8
- package/Routable/Router.js +10 -10
- package/Scrollable/ScrollThumb.js +8 -9
- package/Scrollable/Scrollable.js +23 -1
- package/Scrollable/ScrollableNative.js +12 -0
- package/Scroller/Scroller.js +8 -1
- package/Scroller/ScrollerBasic.js +8 -9
- package/Scroller/UiScrollerBase.js +11 -12
- package/Skinnable/Skinnable.js +19 -7
- package/Skinnable/useSkins.js +1 -2
- package/Slider/Knob.js +8 -8
- package/Slider/Slider.js +16 -9
- package/SlotItem/SlotItem.js +20 -8
- package/Slottable/Slottable.js +14 -8
- package/Spinner/Spinner.js +24 -9
- package/ToggleIcon/ToggleIcon.js +21 -9
- package/ToggleItem/ToggleItem.js +14 -1
- package/Toggleable/Toggleable.js +11 -7
- package/Toggleable/useToggle.js +0 -1
- package/Touchable/Drag.js +2 -1
- package/Touchable/Flick.js +2 -0
- package/Touchable/Hold.js +2 -0
- package/Touchable/Pinch.js +2 -1
- package/Touchable/Touch.js +3 -3
- package/Touchable/Touchable.js +7 -0
- package/Touchable/useTouch.js +0 -1
- package/Transition/Transition.js +19 -3
- package/ViewManager/Arranger.js +4 -1
- package/ViewManager/TransitionGroup.js +5 -4
- package/ViewManager/View.js +3 -2
- package/ViewManager/ViewManager.js +25 -9
- package/ViewManager/tests/ViewManager-specs.js +44 -0
- package/VirtualList/UiVirtualListBase.js +4 -0
- package/VirtualList/VirtualList.js +11 -1
- package/VirtualList/VirtualListBasic.js +4 -0
- package/internal/IdProvider/IdProvider.js +6 -7
- package/internal/IdProvider/useId.js +0 -1
- package/internal/Pure/Pure.js +11 -7
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +36 -7
- package/resolution/resolution.js +23 -7
- package/useScroll/ScrollbarTrack.js +8 -8
- package/useScroll/useScroll.js +17 -1
|
@@ -26,14 +26,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
26
26
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
27
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
30
|
+
* Default config for `PlaceholderControllerDecorator`.
|
|
31
|
+
*
|
|
32
|
+
* @memberof ui/Placeholder.PlaceholderControllerDecorator
|
|
33
|
+
* @hocconfig
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
37
36
|
var defaultConfig = {
|
|
38
37
|
/**
|
|
39
38
|
* The bounds of the container represented by an object with `height` and `width` members.
|
|
@@ -150,6 +149,8 @@ var PlaceholderControllerDecorator = (0, _hoc["default"])(defaultConfig, functio
|
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
}
|
|
152
|
+
|
|
153
|
+
// queue up notifications when placeholders are first created
|
|
153
154
|
}, {
|
|
154
155
|
key: "setThresholds",
|
|
155
156
|
value: function setThresholds(top, left) {
|
|
@@ -23,14 +23,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
23
23
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
24
24
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
27
|
+
* Default config for PlaceholderDecorator.
|
|
28
|
+
*
|
|
29
|
+
* @memberof ui/Placeholder.PlaceholderDecorator
|
|
30
|
+
* @hocconfig
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
34
33
|
var defaultConfig = {
|
|
35
34
|
/**
|
|
36
35
|
* Configures the style of the placeholder element
|
|
@@ -21,7 +21,18 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
21
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
22
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
24
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
25
|
+
* A basic progress bar component that can display the progress of something in a horizontal,
|
|
26
|
+
* vertical, or radial bar format.
|
|
27
|
+
*
|
|
28
|
+
* A secondary independent progress indicator can be displayed, to indicate
|
|
29
|
+
* an additional degree of information, often used as a background loading progress.
|
|
30
|
+
*
|
|
31
|
+
* @module ui/ProgressBar
|
|
32
|
+
* @exports ProgressBar
|
|
33
|
+
* @exports ProgressBarBase
|
|
34
|
+
* @exports ProgressBarDecorator
|
|
35
|
+
*/
|
|
25
36
|
var progressToProportion = function progressToProportion(value) {
|
|
26
37
|
return (0, _clamp["default"])(0, 1, value);
|
|
27
38
|
};
|
|
@@ -31,13 +31,19 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
31
31
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
32
32
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
33
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
34
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
35
|
+
* A higher-order component that manages activation of components.
|
|
36
|
+
*
|
|
37
|
+
* @module ui/RadioDecorator
|
|
38
|
+
* @exports RadioDecorator
|
|
39
|
+
* @exports RadioControllerDecorator
|
|
40
|
+
* @deprecated Will be removed in 5.0.0.
|
|
41
|
+
*/ /**
|
|
42
|
+
* Default config for `RadioDecorator`.
|
|
43
|
+
*
|
|
44
|
+
* @memberof ui/RadioDecorator.RadioDecorator
|
|
45
|
+
* @hocconfig
|
|
46
|
+
*/
|
|
41
47
|
var defaultConfig = {
|
|
42
48
|
/**
|
|
43
49
|
* The event indicating the wrapped component is activated
|
package/Repeater/Repeater.js
CHANGED
|
@@ -17,16 +17,20 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
21
|
+
* A repeater component.
|
|
22
|
+
*
|
|
23
|
+
* @module ui/Repeater
|
|
24
|
+
* @exports Repeater
|
|
25
|
+
*/ /**
|
|
26
|
+
* A stateless component that stamps out copies of `childComponent`, without
|
|
27
|
+
* [RepeaterDecorator](ui/Repeater.RepeaterDecorator) applied.
|
|
28
|
+
*
|
|
29
|
+
* @class RepeaterBase
|
|
30
|
+
* @memberof ui/Repeater
|
|
31
|
+
* @ui
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
30
34
|
var RepeaterBase = (0, _kind["default"])({
|
|
31
35
|
name: 'Repeater',
|
|
32
36
|
propTypes: /** @lends ui/Repeater.RepeaterBase.prototype */{
|
package/Resizable/Resizable.js
CHANGED
|
@@ -24,14 +24,18 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
24
24
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
25
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
28
|
+
* A higher-order component that handles component resize event.
|
|
29
|
+
*
|
|
30
|
+
* @module ui/Resizable
|
|
31
|
+
* @exports Resizable
|
|
32
|
+
*/ /**
|
|
33
|
+
* Used internally for things to notify children that they need to resize because of a parent
|
|
34
|
+
* update.
|
|
35
|
+
*
|
|
36
|
+
* @type Object
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
35
39
|
var ResizeContext = /*#__PURE__*/(0, _react.createContext)();
|
|
36
40
|
|
|
37
41
|
/**
|
package/Routable/Link.js
CHANGED
|
@@ -13,6 +13,14 @@ var _react = require("react");
|
|
|
13
13
|
var _useLink = _interopRequireDefault(require("./useLink"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
var _excluded = ["path"];
|
|
16
|
+
/**
|
|
17
|
+
* A base component that is used to make a link.
|
|
18
|
+
*
|
|
19
|
+
* @class LinkBase
|
|
20
|
+
* @ui
|
|
21
|
+
* @memberof ui/Routable
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
16
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
@@ -31,14 +39,6 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
31
39
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
40
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
41
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
34
|
-
/**
|
|
35
|
-
* A base component that is used to make a link.
|
|
36
|
-
*
|
|
37
|
-
* @class LinkBase
|
|
38
|
-
* @ui
|
|
39
|
-
* @memberof ui/Routable
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
42
|
var LinkBase = (0, _kind["default"])({
|
|
43
43
|
name: 'Link',
|
|
44
44
|
propTypes: /** @lends ui/Routable.Link.prototype */{
|
package/Routable/Routable.js
CHANGED
|
@@ -48,18 +48,25 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
48
48
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
49
49
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
50
50
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
51
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
52
|
+
* Utilities for working with routes.
|
|
53
|
+
*
|
|
54
|
+
* @module ui/Routable
|
|
55
|
+
* @exports Routable
|
|
56
|
+
* @exports Route
|
|
57
|
+
* @exports Link
|
|
58
|
+
* @exports Linkable
|
|
59
|
+
*/ /**
|
|
60
|
+
* Default config for {@link ui/Routable.Routable|Routable}.
|
|
61
|
+
*
|
|
62
|
+
* @memberof ui/Routable.Routable
|
|
63
|
+
* @hocconfig
|
|
64
|
+
*/
|
|
58
65
|
var defaultConfig = {
|
|
59
66
|
/**
|
|
60
67
|
* The event to listen to for path changes.
|
|
61
68
|
*
|
|
62
|
-
* This defines the actual name of the {@link ui/Routable.Routable
|
|
69
|
+
* This defines the actual name of the {@link ui/Routable.Routable.navigate|navigate}
|
|
63
70
|
* property.
|
|
64
71
|
*
|
|
65
72
|
* @type {String}
|
package/Routable/Router.js
CHANGED
|
@@ -14,6 +14,15 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
var _excluded = ["path", "children", "component"],
|
|
15
15
|
_excluded2 = ["component", "componentRef"];
|
|
16
16
|
var _class;
|
|
17
|
+
/**
|
|
18
|
+
* A Router component for use with {@link ui/ViewManager.ViewManager|ViewManager}
|
|
19
|
+
*
|
|
20
|
+
* @class Router
|
|
21
|
+
* @memberof ui/Routable
|
|
22
|
+
* @mixes ui/ForwardRef.ForwardRef
|
|
23
|
+
* @ui
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
17
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
27
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
28
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -32,15 +41,6 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
|
|
|
32
41
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
34
43
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
-
/**
|
|
36
|
-
* A Router component for use with {@link ui/ViewManager.ViewManager|ViewManager}
|
|
37
|
-
*
|
|
38
|
-
* @class Router
|
|
39
|
-
* @memberof ui/Routable
|
|
40
|
-
* @mixes ui/ForwardRef.ForwardRef
|
|
41
|
-
* @ui
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
44
|
var RouterBase = (_class = /*#__PURE__*/function (_ReactComponent) {
|
|
45
45
|
_inherits(RouterBase, _ReactComponent);
|
|
46
46
|
var _super = _createSuper(RouterBase);
|
|
@@ -152,7 +152,7 @@ var RouterBase = (_class = /*#__PURE__*/function (_ReactComponent) {
|
|
|
152
152
|
*/
|
|
153
153
|
component: _propTypes["default"].renderable,
|
|
154
154
|
/**
|
|
155
|
-
* Called with a reference to {@link ui/Routable.
|
|
155
|
+
* Called with a reference to {@link ui/Routable.RouterBase.component|component}.
|
|
156
156
|
*
|
|
157
157
|
* @type {Object|Function}
|
|
158
158
|
* @private
|
|
@@ -13,15 +13,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
14
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
17
|
+
* An unstyled scroll thumb without any behavior.
|
|
18
|
+
*
|
|
19
|
+
* @class ScrollThumb
|
|
20
|
+
* @memberof ui/Scrollable
|
|
21
|
+
* @ui
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
25
24
|
var ScrollThumb = (0, _kind["default"])({
|
|
26
25
|
name: 'ui:ScrollThumb',
|
|
27
26
|
propTypes: /** @lends ui/Scrollable.ScrollThumb.prototype */{
|
package/Scrollable/Scrollable.js
CHANGED
|
@@ -41,7 +41,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
41
41
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
42
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
43
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
45
|
+
* Unstyled scrollable components and behaviors to be customized by a theme or application.
|
|
46
|
+
*
|
|
47
|
+
* @module ui/Scrollable
|
|
48
|
+
* @exports constants
|
|
49
|
+
* @exports Scrollable
|
|
50
|
+
* @exports ScrollableBase
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
45
53
|
var constants = {
|
|
46
54
|
animationDuration: 1000,
|
|
47
55
|
epsilon: 1,
|
|
@@ -739,6 +747,16 @@ var ScrollableBase = /*#__PURE__*/function (_Component) {
|
|
|
739
747
|
}
|
|
740
748
|
|
|
741
749
|
// constants
|
|
750
|
+
|
|
751
|
+
// The ratio of wheel 'delta' units to pixels scrolled.
|
|
752
|
+
// status
|
|
753
|
+
// overscroll
|
|
754
|
+
// bounds info
|
|
755
|
+
// wheel/drag/flick info
|
|
756
|
+
// scroll info
|
|
757
|
+
// component info
|
|
758
|
+
// scroll animator
|
|
759
|
+
// drag/flick event handlers
|
|
742
760
|
}, {
|
|
743
761
|
key: "calculateDistanceByWheel",
|
|
744
762
|
value: function calculateDistanceByWheel(deltaMode, delta, maxPixel) {
|
|
@@ -753,6 +771,8 @@ var ScrollableBase = /*#__PURE__*/function (_Component) {
|
|
|
753
771
|
}
|
|
754
772
|
return delta;
|
|
755
773
|
}
|
|
774
|
+
|
|
775
|
+
// overscroll effect
|
|
756
776
|
}, {
|
|
757
777
|
key: "forwardScrollEvent",
|
|
758
778
|
value:
|
|
@@ -793,6 +813,8 @@ var ScrollableBase = /*#__PURE__*/function (_Component) {
|
|
|
793
813
|
this.updateThumb(this.verticalScrollbarRef, bounds);
|
|
794
814
|
}
|
|
795
815
|
}
|
|
816
|
+
|
|
817
|
+
// scroll start/stop
|
|
796
818
|
}, {
|
|
797
819
|
key: "start",
|
|
798
820
|
value: function start(_ref) {
|
|
@@ -752,6 +752,16 @@ var ScrollableBaseNative = /*#__PURE__*/function (_Component) {
|
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
// constants
|
|
755
|
+
|
|
756
|
+
// The ratio of wheel 'delta' units to pixels scrolled.
|
|
757
|
+
// status
|
|
758
|
+
// overscroll
|
|
759
|
+
// bounds info
|
|
760
|
+
// wheel/drag/flick info
|
|
761
|
+
// scroll info
|
|
762
|
+
// component info
|
|
763
|
+
// scroll animator
|
|
764
|
+
// event handler for browser native scroll
|
|
755
765
|
}, {
|
|
756
766
|
key: "calculateDistanceByWheel",
|
|
757
767
|
value: function calculateDistanceByWheel(deltaMode, delta, maxPixel) {
|
|
@@ -772,6 +782,8 @@ var ScrollableBaseNative = /*#__PURE__*/function (_Component) {
|
|
|
772
782
|
* - for horizontal scroll, supports wheel action on any children nodes since web engine cannot support this
|
|
773
783
|
* - for vertical scroll, supports wheel action on scrollbars only
|
|
774
784
|
*/
|
|
785
|
+
|
|
786
|
+
// overscroll effect
|
|
775
787
|
}, {
|
|
776
788
|
key: "forwardScrollEvent",
|
|
777
789
|
value:
|
package/Scroller/Scroller.js
CHANGED
|
@@ -29,7 +29,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
29
29
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
30
30
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
31
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
32
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
33
|
+
* Unstyled scroller components and behaviors to be customized by a theme or application.
|
|
34
|
+
*
|
|
35
|
+
* @module ui/Scroller
|
|
36
|
+
* @exports Scroller
|
|
37
|
+
* @exports ScrollerBase
|
|
38
|
+
* @exports ScrollerBasic
|
|
39
|
+
*/
|
|
33
40
|
var nop = function nop() {};
|
|
34
41
|
|
|
35
42
|
/**
|
|
@@ -29,15 +29,14 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
29
29
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
30
30
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
31
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
33
|
+
* An unstyled base scroller component.
|
|
34
|
+
*
|
|
35
|
+
* @class ScrollerBasic
|
|
36
|
+
* @memberof ui/Scroller
|
|
37
|
+
* @ui
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
41
40
|
var ScrollerBasic = /*#__PURE__*/function (_Component) {
|
|
42
41
|
_inherits(ScrollerBasic, _Component);
|
|
43
42
|
var _super = _createSuper(ScrollerBasic);
|
|
@@ -29,18 +29,17 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
29
29
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
30
30
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
31
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
33
|
+
* An unstyled base scroller component.
|
|
34
|
+
*
|
|
35
|
+
* In most circumstances, you will want to use the Scrollable version.
|
|
36
|
+
*
|
|
37
|
+
* @class ScrollerBase
|
|
38
|
+
* @memberof ui/Scroller
|
|
39
|
+
* @ui
|
|
40
|
+
* @public
|
|
41
|
+
* @deprecated Will be removed in 5.0.0.
|
|
42
|
+
*/
|
|
44
43
|
var ScrollerBase = /*#__PURE__*/function (_Component) {
|
|
45
44
|
_inherits(ScrollerBase, _Component);
|
|
46
45
|
var _super = _createSuper(ScrollerBase);
|
package/Skinnable/Skinnable.js
CHANGED
|
@@ -17,6 +17,25 @@ var _useSkins = _interopRequireDefault(require("./useSkins"));
|
|
|
17
17
|
var _util = require("./util");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
var _excluded = ["className", "skin", "skinVariants"];
|
|
20
|
+
/**
|
|
21
|
+
* A higher-order component for customizing the visual appearance throughout an application.
|
|
22
|
+
*
|
|
23
|
+
* This is the base-level implementation of this component. It will typically never be accessed
|
|
24
|
+
* directly, and only be instantiated with a configuration once inside a visual library.
|
|
25
|
+
* Interface libraries will supply a set of supported skins which will
|
|
26
|
+
* be accessible to their components.
|
|
27
|
+
*
|
|
28
|
+
* @module ui/Skinnable
|
|
29
|
+
* @exports Skinnable
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Default config for `Skinnable`.
|
|
34
|
+
*
|
|
35
|
+
* @memberof ui/Skinnable.Skinnable
|
|
36
|
+
* @hocconfig
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
20
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
40
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
41
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -25,13 +44,6 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
25
44
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
45
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
46
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
28
|
-
/**
|
|
29
|
-
* Default config for `Skinnable`.
|
|
30
|
-
*
|
|
31
|
-
* @memberof ui/Skinnable.Skinnable
|
|
32
|
-
* @hocconfig
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
47
|
var defaultConfig = {
|
|
36
48
|
/**
|
|
37
49
|
* The prop in which to pass the skinVariants value to the wrapped component. The recommended
|
package/Skinnable/useSkins.js
CHANGED
|
@@ -26,8 +26,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
26
26
|
* @class SkinContext
|
|
27
27
|
* @memberof ui/Skinnable
|
|
28
28
|
* @private
|
|
29
|
-
*/
|
|
30
|
-
var SkinContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
29
|
+
*/var SkinContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Configuration for `useSkins`
|