@enact/ui 4.9.2 → 5.0.0-alpha.2
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 +20 -22
- package/AnnounceDecorator/AnnounceDecorator.js +5 -5
- package/AnnounceDecorator/tests/Announce-specs.js +1 -1
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +1 -1
- package/AnnounceDecorator/tests/useAnnounce-specs.js +1 -1
- package/AnnounceDecorator/useAnnounce.js +1 -1
- package/BodyText/BodyText.js +5 -5
- package/BodyText/tests/BodyText-specs.js +1 -1
- package/Button/Button.js +5 -5
- package/Button/tests/Button-specs.js +3 -3
- package/CHANGELOG.md +33 -0
- package/Cancelable/Cancelable.js +22 -24
- package/Cancelable/tests/Cancelable-specs.js +4 -4
- package/Changeable/Changeable.js +22 -24
- package/Changeable/tests/Changeable-specs.js +1 -1
- package/ComponentOverride/ComponentOverride.js +4 -4
- package/FloatingLayer/FloatingLayer.js +20 -22
- package/FloatingLayer/FloatingLayerContainer.js +6 -7
- package/FloatingLayer/FloatingLayerDecorator.js +5 -5
- package/FloatingLayer/Scrim.js +18 -20
- package/FloatingLayer/tests/FloatingLayer-specs.js +1 -1
- package/FloatingLayer/tests/Scrim-specs.js +1 -1
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +2 -2
- package/FloatingLayer/useFloatingLayer.js +4 -4
- package/FloatingLayer/useFloatingLayerDecorator.js +1 -1
- package/ForwardRef/ForwardRef.js +3 -3
- package/Group/Group.js +5 -5
- package/Group/GroupItem.js +5 -5
- package/Group/tests/Group-specs.js +4 -4
- package/Heading/Heading.js +5 -5
- package/Heading/tests/Heading-specs.js +1 -1
- package/Icon/Icon.js +5 -5
- package/Icon/tests/Icon-specs.js +1 -1
- package/Image/Image.js +5 -5
- package/Image/tests/Image-specs.js +1 -1
- package/ImageItem/ImageItem.js +5 -5
- package/ImageItem/tests/ImageItem-specs.js +3 -3
- package/Item/Item.js +5 -5
- package/Item/tests/Item-specs.js +3 -3
- package/LabeledIcon/LabeledIcon.js +5 -5
- package/LabeledIcon/tests/LabeledIcon-specs.js +1 -1
- package/Layout/Cell.js +5 -5
- package/Layout/Layout.js +5 -5
- package/Layout/tests/Layout-specs.js +7 -7
- package/Marquee/MarqueeBase.js +5 -5
- package/Marquee/MarqueeController.js +3 -3
- package/Marquee/MarqueeDecorator.js +30 -51
- package/Marquee/index.d.ts +10 -14
- package/Marquee/index.js +1 -1
- package/Marquee/tests/Marquee-specs.js +5 -6
- package/Marquee/useMarqueeController.js +2 -2
- package/Measurable/Measurable.js +8 -8
- package/Measurable/tests/Measurable-specs.js +8 -10
- package/Media/Media.js +17 -19
- package/Placeholder/PlaceholderControllerDecorator.js +22 -24
- package/Placeholder/PlaceholderDecorator.js +20 -22
- package/Placeholder/index.js +1 -1
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +2 -2
- package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
- package/ProgressBar/ProgressBar.js +5 -5
- package/ProgressBar/tests/ProgressBar-specs.js +1 -1
- package/Repeater/Repeater.js +5 -5
- package/Repeater/tests/Repeater-specs.js +3 -3
- package/Resizable/Resizable.js +3 -3
- package/Resizable/tests/Resizable-specs.js +2 -2
- package/Resizable/tests/useResize-specs.js +3 -3
- package/Resizable/useResize.js +3 -3
- package/Routable/Link.js +17 -19
- package/Routable/Routable.js +5 -5
- package/Routable/Route.js +1 -1
- package/Routable/Router.js +22 -24
- package/Routable/tests/Routable-specs.js +9 -9
- package/Routable/tests/Router-specs.js +1 -1
- package/Routable/util.js +1 -1
- package/Scroller/Scroller.d.ts +0 -120
- package/Scroller/Scroller.js +3 -11
- package/Scroller/ScrollerBasic.js +19 -21
- package/Scroller/tests/Scroller-specs.js +1 -1
- package/Skinnable/Skinnable.js +5 -5
- package/Skinnable/tests/Skinnable-specs.js +3 -3
- package/Skinnable/tests/useSkins-specs.js +3 -3
- package/Skinnable/util.js +1 -1
- package/Slider/Knob.js +5 -5
- package/Slider/PositionDecorator.js +25 -27
- package/Slider/Slider.js +5 -5
- package/Slider/tests/Slider-specs.js +1 -1
- package/Slottable/Slottable.js +3 -5
- package/Slottable/tests/Slottable-specs.js +1 -1
- package/Slottable/tests/useSlots-specs.js +1 -1
- package/Slottable/useSlots.js +5 -5
- package/Spinner/Spinner.js +5 -5
- package/ToggleIcon/ToggleIcon.js +5 -5
- package/ToggleIcon/tests/ToggleIcon-specs.js +3 -3
- package/Toggleable/Toggle.js +6 -7
- package/Toggleable/Toggleable.js +6 -6
- package/Toggleable/tests/Toggleable-specs.js +1 -1
- package/Toggleable/useToggle.js +8 -8
- package/Touchable/ClickAllow.js +5 -6
- package/Touchable/Drag.js +6 -6
- package/Touchable/Flick.js +7 -8
- package/Touchable/Hold.js +7 -8
- package/Touchable/Pinch.js +6 -6
- package/Touchable/Touch.js +6 -7
- package/Touchable/Touchable.js +5 -5
- package/Touchable/config.js +2 -2
- package/Touchable/tests/Touchable-specs.js +3 -3
- package/Touchable/tests/useTouch-specs.js +5 -5
- package/Touchable/useTouch.js +7 -7
- package/Transition/Transition.js +17 -19
- package/Transition/tests/Transition-specs.js +7 -7
- package/ViewManager/Arranger.js +3 -3
- package/ViewManager/TransitionGroup.js +18 -20
- package/ViewManager/View.js +15 -17
- package/ViewManager/ViewManager.js +25 -27
- package/ViewManager/tests/View-specs.js +1 -1
- package/ViewManager/tests/ViewManager-specs.js +16 -18
- package/VirtualList/VirtualList.d.ts +0 -158
- package/VirtualList/VirtualList.js +3 -17
- package/VirtualList/VirtualListBasic.js +42 -43
- package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualGridList-specs.js +6 -6
- package/VirtualList/tests/VirtualList-native-specs.js +5 -5
- package/VirtualList/tests/VirtualList-specs.js +7 -7
- package/internal/IdProvider/IdProvider.js +3 -3
- package/internal/IdProvider/Provider.js +5 -6
- package/internal/IdProvider/tests/IdProvider-specs.js +3 -3
- package/internal/IdProvider/tests/useId-specs.js +3 -3
- package/internal/IdProvider/useId.js +1 -1
- package/internal/Pure/Pure.js +20 -22
- package/internal/Pure/tests/Pure-specs.js +15 -17
- package/internal/localized-fonts/localized-fonts.js +4 -4
- package/internal/selection/selection.js +1 -1
- package/package.json +5 -4
- package/resolution/ResolutionDecorator.js +21 -23
- package/resolution/index.js +2 -2
- package/resolution/tests/ResolutionDecorator-specs.js +1 -1
- package/useControlledState/tests/useControlledState-specs.js +5 -5
- package/useControlledState/useControlledState.js +4 -4
- package/useScroll/ScrollAnimator.js +6 -7
- package/useScroll/Scrollbar.js +5 -5
- package/useScroll/ScrollbarTrack.js +5 -5
- package/useScroll/useScroll.js +9 -9
- package/useScroll/utilDOM.js +1 -1
- package/GridListImageItem/GridListImageItem.d.ts +0 -85
- package/GridListImageItem/GridListImageItem.js +0 -250
- package/GridListImageItem/GridListImageItem.module.css +0 -28
- package/GridListImageItem/package.json +0 -3
- package/IconButton/IconButton.d.ts +0 -115
- package/IconButton/IconButton.js +0 -253
- package/IconButton/IconButton.module.css +0 -11
- package/IconButton/package.json +0 -3
- package/IconButton/tests/IconButton-specs.js +0 -29
- package/RadioDecorator/RadioControllerDecorator.js +0 -101
- package/RadioDecorator/RadioDecorator.d.ts +0 -35
- package/RadioDecorator/RadioDecorator.js +0 -177
- package/RadioDecorator/package.json +0 -3
- package/RadioDecorator/tests/RadioDecorator-specs.js +0 -247
- package/Scrollable/ScrollAnimator.js +0 -130
- package/Scrollable/ScrollThumb.js +0 -57
- package/Scrollable/ScrollThumb.module.css +0 -34
- package/Scrollable/Scrollable.js +0 -1430
- package/Scrollable/Scrollable.module.css +0 -36
- package/Scrollable/ScrollableNative.js +0 -1429
- package/Scrollable/Scrollbar.js +0 -281
- package/Scrollable/Scrollbar.module.css +0 -24
- package/Scrollable/package.json +0 -3
- package/Scroller/UiScroller.module.css +0 -10
- package/Scroller/UiScrollerBase.js +0 -372
- package/SlotItem/SlotItem.d.ts +0 -118
- package/SlotItem/SlotItem.js +0 -248
- package/SlotItem/SlotItem.module.css +0 -12
- package/SlotItem/package.json +0 -3
- package/SlotItem/tests/SlotItem-specs.js +0 -24
- package/ToggleItem/ToggleItem.d.ts +0 -132
- package/ToggleItem/ToggleItem.js +0 -301
- package/ToggleItem/ToggleItem.module.css +0 -9
- package/ToggleItem/package.json +0 -3
- package/ToggleItem/tests/ToggleItem-specs.js +0 -120
- package/VirtualList/UiVirtualList.module.css +0 -26
- package/VirtualList/UiVirtualListBase.js +0 -1410
- package/VirtualList/VirtualListBase.js +0 -33
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.ScrollAnimator = void 0;
|
|
7
7
|
var _util = require("@enact/core/util");
|
|
8
8
|
var _clamp = _interopRequireDefault(require("ramda/src/clamp"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
function _classCallCheck(
|
|
11
|
-
function _defineProperties(
|
|
12
|
-
function _createClass(
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
var
|
|
16
16
|
// Use eases library
|
|
@@ -70,7 +70,7 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
|
|
|
70
70
|
this.type = 'ease-out';
|
|
71
71
|
this.timingFunction = timingFunctions[type || this.type];
|
|
72
72
|
}
|
|
73
|
-
_createClass(ScrollAnimator, [{
|
|
73
|
+
return _createClass(ScrollAnimator, [{
|
|
74
74
|
key: "simulate",
|
|
75
75
|
value: function simulate(sourceX, sourceY, velocityX, velocityY) {
|
|
76
76
|
var stepX = clampVelocity(velocityX * frameTime),
|
|
@@ -125,6 +125,5 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}]);
|
|
128
|
-
return ScrollAnimator;
|
|
129
128
|
}();
|
|
130
129
|
var _default = exports["default"] = ScrollAnimator;
|
package/useScroll/Scrollbar.js
CHANGED
|
@@ -21,14 +21,14 @@ var _ScrollbarModule = _interopRequireDefault(require("./Scrollbar.module.css"))
|
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
var _excluded = ["className", "clientSize", "corner", "css", "minThumbSize", "scrollbarHandle", "vertical"],
|
|
23
23
|
_excluded2 = ["corner", "css", "minThumbSize", "vertical"];
|
|
24
|
-
function _interopRequireDefault(
|
|
24
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
25
25
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
26
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
|
-
function _defineProperty(
|
|
28
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
27
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
29
29
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
|
-
function _objectWithoutProperties(
|
|
31
|
-
function _objectWithoutPropertiesLoose(
|
|
30
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
31
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
32
32
|
var scrollbarTrackHidingDelay = 900; // 900ms + 100ms(fade out duration) = 1000ms.
|
|
33
33
|
|
|
34
34
|
var addClass = function addClass(element, className) {
|
|
@@ -18,14 +18,14 @@ var _excluded = ["vertical"];
|
|
|
18
18
|
* @ui
|
|
19
19
|
* @private
|
|
20
20
|
*/
|
|
21
|
-
function _interopRequireDefault(
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
22
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
function _defineProperty(
|
|
25
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
24
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
26
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
|
-
function _objectWithoutProperties(
|
|
28
|
-
function _objectWithoutPropertiesLoose(
|
|
27
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
29
29
|
var ScrollbarTrack = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
30
30
|
var _props$vertical = props.vertical,
|
|
31
31
|
vertical = _props$vertical === void 0 ? true : _props$vertical,
|
package/useScroll/useScroll.js
CHANGED
|
@@ -36,20 +36,20 @@ var _excluded = ["componentRef"],
|
|
|
36
36
|
* @private
|
|
37
37
|
*/
|
|
38
38
|
// scrollMode 'native'
|
|
39
|
-
function _interopRequireDefault(
|
|
40
|
-
function _slicedToArray(
|
|
39
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
40
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
41
41
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
42
|
-
function _unsupportedIterableToArray(
|
|
43
|
-
function _arrayLikeToArray(
|
|
42
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
43
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
44
44
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
45
|
-
function _arrayWithHoles(
|
|
45
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
46
46
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
47
47
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
48
|
-
function _defineProperty(
|
|
49
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
48
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
49
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
50
50
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
51
|
-
function _objectWithoutProperties(
|
|
52
|
-
function _objectWithoutPropertiesLoose(
|
|
51
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
52
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
53
53
|
var constants = exports.constants = {
|
|
54
54
|
animationDuration: 1000,
|
|
55
55
|
epsilon: 1,
|
package/useScroll/utilDOM.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.utilDOM = exports["default"] = void 0;
|
|
7
7
|
var _warning = _interopRequireDefault(require("warning"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
// At the end, wes should not use DOM APIs as well as the APIs in the `utilDOM`. If we use them, we have to try to remove them first if possible.
|
|
10
10
|
|
|
11
11
|
var utilDOM = exports.utilDOM = function () {
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// Type definitions for ui/GridListImageItem
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
6
|
-
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
|
|
7
|
-
|
|
8
|
-
export interface GridListImageItemProps {
|
|
9
|
-
/**
|
|
10
|
-
* The primary caption to be displayed with the image.
|
|
11
|
-
*/
|
|
12
|
-
caption?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The component used to render the captions
|
|
15
|
-
*/
|
|
16
|
-
captionComponent?: string | React.ComponentType;
|
|
17
|
-
/**
|
|
18
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
19
|
-
corresponding internal elements and states of this component.
|
|
20
|
-
*
|
|
21
|
-
* The following classes are supported:
|
|
22
|
-
* * `icon` - The icon component class for default selection overlay
|
|
23
|
-
* * `image` - The image component class
|
|
24
|
-
* * `selected` - Applied when `selected` prop is `true`
|
|
25
|
-
* * `caption` - The caption component class
|
|
26
|
-
* * `subCaption` - The subCaption component class
|
|
27
|
-
*/
|
|
28
|
-
css?: object;
|
|
29
|
-
/**
|
|
30
|
-
* The component used to render the default check icon when selected.
|
|
31
|
-
If there is custom selectionOverlay component, this icon will not be shown.
|
|
32
|
-
*/
|
|
33
|
-
iconComponent?: React.ComponentType;
|
|
34
|
-
/**
|
|
35
|
-
* The component used to render the image component
|
|
36
|
-
*/
|
|
37
|
-
imageComponent?: React.ComponentType;
|
|
38
|
-
/**
|
|
39
|
-
* Placeholder image used while
|
|
40
|
-
is loaded.
|
|
41
|
-
*/
|
|
42
|
-
placeholder?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Applies a selected visual effect to the image, but only if `selectionOverlayShowing`
|
|
45
|
-
is also `true` .
|
|
46
|
-
*/
|
|
47
|
-
selected?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* The custom selection overlay component to render.
|
|
50
|
-
*
|
|
51
|
-
* A component can be a stateless functional component, `kind()` or React component.
|
|
52
|
-
The following is an example with custom selection overlay kind.
|
|
53
|
-
*
|
|
54
|
-
* Example:
|
|
55
|
-
* ```
|
|
56
|
-
const SelectionOverlay = kind({
|
|
57
|
-
render: () => <div>custom overlay</div>
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
<GridListImageItem selectionOverlay={SelectionOverlay} />
|
|
61
|
-
```
|
|
62
|
-
*/
|
|
63
|
-
selectionOverlay?: Function;
|
|
64
|
-
/**
|
|
65
|
-
* Shows a selection overlay with a centered icon. When `selected` is true, a check mark is shown.
|
|
66
|
-
*/
|
|
67
|
-
selectionOverlayShowing?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* The absolute URL path to the image.
|
|
70
|
-
*/
|
|
71
|
-
source?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The second caption line to be displayed with the image.
|
|
74
|
-
*/
|
|
75
|
-
subCaption?: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A basic grid list image item without any behavior.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
export class GridListImageItem extends React.Component<
|
|
82
|
-
Merge<React.HTMLProps<HTMLElement>, GridListImageItemProps>
|
|
83
|
-
> {}
|
|
84
|
-
|
|
85
|
-
export default GridListImageItem;
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.GridListImageItem = void 0;
|
|
7
|
-
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
9
|
-
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
10
|
-
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _react = require("react");
|
|
12
|
-
var _Layout = require("../Layout");
|
|
13
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
14
|
-
var _Image = _interopRequireDefault(require("../Image"));
|
|
15
|
-
var _GridListImageItemModule = _interopRequireDefault(require("./GridListImageItem.module.css"));
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
var _excluded = ["css", "imageComponent", "placeholder", "source", "selectionOverlay", "subComponents"];
|
|
18
|
-
/**
|
|
19
|
-
* Unstyled grid list image item components and behaviors to be customized by a theme or application.
|
|
20
|
-
*
|
|
21
|
-
* @module ui/GridListImageItem
|
|
22
|
-
* @exports GridListImageItem
|
|
23
|
-
* @deprecated Will be removed in 5.0.0. Use {@link ui/ImageItem} instead.
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* A basic grid list image item without any behavior.
|
|
27
|
-
*
|
|
28
|
-
* @class GridListImageItem
|
|
29
|
-
* @memberof ui/GridListImageItem
|
|
30
|
-
* @ui
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
34
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
|
-
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; }
|
|
37
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
38
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
39
|
-
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; }
|
|
40
|
-
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; }
|
|
41
|
-
var GridListImageItem = exports.GridListImageItem = (0, _kind["default"])({
|
|
42
|
-
name: 'ui:GridListImageItem',
|
|
43
|
-
propTypes: /** @lends ui/GridListImageItem.GridListImageItem.prototype */{
|
|
44
|
-
/**
|
|
45
|
-
* The primary caption to be displayed with the image.
|
|
46
|
-
*
|
|
47
|
-
* @type {String}
|
|
48
|
-
* @public
|
|
49
|
-
*/
|
|
50
|
-
caption: _propTypes2["default"].string,
|
|
51
|
-
/**
|
|
52
|
-
* The component used to render the captions
|
|
53
|
-
*
|
|
54
|
-
* @type {String|Component}
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
captionComponent: _propTypes["default"].renderable,
|
|
58
|
-
/**
|
|
59
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
60
|
-
* corresponding internal elements and states of this component.
|
|
61
|
-
*
|
|
62
|
-
* The following classes are supported:
|
|
63
|
-
*
|
|
64
|
-
* * `icon` - The icon component class for default selection overlay
|
|
65
|
-
* * `image` - The image component class
|
|
66
|
-
* * `selected` - Applied when `selected` prop is `true`
|
|
67
|
-
* * `caption` - The caption component class
|
|
68
|
-
* * `subCaption` - The subCaption component class
|
|
69
|
-
*
|
|
70
|
-
* @type {Object}
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
css: _propTypes2["default"].object,
|
|
74
|
-
/**
|
|
75
|
-
* The component used to render the default check icon when selected.
|
|
76
|
-
* If there is custom selectionOverlay component, this icon will not be shown.
|
|
77
|
-
*
|
|
78
|
-
* @type {Component}
|
|
79
|
-
* @default ui/Icon.Icon
|
|
80
|
-
* @public
|
|
81
|
-
*/
|
|
82
|
-
iconComponent: _propTypes["default"].component,
|
|
83
|
-
/**
|
|
84
|
-
* The component used to render the image component
|
|
85
|
-
*
|
|
86
|
-
* @type {Component}
|
|
87
|
-
* @default ui/Image.Image
|
|
88
|
-
* @public
|
|
89
|
-
*/
|
|
90
|
-
imageComponent: _propTypes["default"].component,
|
|
91
|
-
/**
|
|
92
|
-
* Placeholder image used while {@link ui/GridListImageItem.GridListImageItem.source|source}
|
|
93
|
-
* is loaded.
|
|
94
|
-
*
|
|
95
|
-
* @type {String}
|
|
96
|
-
* @public
|
|
97
|
-
*/
|
|
98
|
-
placeholder: _propTypes2["default"].string,
|
|
99
|
-
/**
|
|
100
|
-
* Applies a selected visual effect to the image, but only if `selectionOverlayShowing`
|
|
101
|
-
* is also `true`.
|
|
102
|
-
*
|
|
103
|
-
* @type {Boolean}
|
|
104
|
-
* @default false
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
selected: _propTypes2["default"].bool,
|
|
108
|
-
/**
|
|
109
|
-
* The custom selection overlay component to render.
|
|
110
|
-
*
|
|
111
|
-
* A component can be a stateless functional component, `kind()` or React component.
|
|
112
|
-
* The following is an example with custom selection overlay kind.
|
|
113
|
-
*
|
|
114
|
-
* Example:
|
|
115
|
-
* ```
|
|
116
|
-
* const SelectionOverlay = kind({
|
|
117
|
-
* render: () => <div>custom overlay</div>
|
|
118
|
-
* });
|
|
119
|
-
*
|
|
120
|
-
* <GridListImageItem selectionOverlay={SelectionOverlay} />
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* @type {Function}
|
|
124
|
-
* @public
|
|
125
|
-
*/
|
|
126
|
-
selectionOverlay: _propTypes2["default"].func,
|
|
127
|
-
/**
|
|
128
|
-
* Shows a selection overlay with a centered icon. When `selected` is true, a check mark is shown.
|
|
129
|
-
*
|
|
130
|
-
* @type {Boolean}
|
|
131
|
-
* @default false
|
|
132
|
-
* @public
|
|
133
|
-
*/
|
|
134
|
-
selectionOverlayShowing: _propTypes2["default"].bool,
|
|
135
|
-
/**
|
|
136
|
-
* The absolute URL path to the image.
|
|
137
|
-
*
|
|
138
|
-
* @type {String}
|
|
139
|
-
* @public
|
|
140
|
-
*/
|
|
141
|
-
source: _propTypes2["default"].string,
|
|
142
|
-
/**
|
|
143
|
-
* The second caption line to be displayed with the image.
|
|
144
|
-
*
|
|
145
|
-
* @type {String}
|
|
146
|
-
* @public
|
|
147
|
-
*/
|
|
148
|
-
subCaption: _propTypes2["default"].string,
|
|
149
|
-
/**
|
|
150
|
-
* The components that will be shown below the image.
|
|
151
|
-
*
|
|
152
|
-
* @type {Array|Element}
|
|
153
|
-
* @private
|
|
154
|
-
*/
|
|
155
|
-
subComponents: _propTypes2["default"].oneOfType([_propTypes2["default"].array, _propTypes2["default"].element])
|
|
156
|
-
},
|
|
157
|
-
defaultProps: {
|
|
158
|
-
captionComponent: 'div',
|
|
159
|
-
iconComponent: _Icon["default"],
|
|
160
|
-
imageComponent: _Image["default"],
|
|
161
|
-
selected: false,
|
|
162
|
-
selectionOverlayShowing: false
|
|
163
|
-
},
|
|
164
|
-
styles: {
|
|
165
|
-
css: _GridListImageItemModule["default"],
|
|
166
|
-
className: 'gridListImageItem',
|
|
167
|
-
publicClassNames: true
|
|
168
|
-
},
|
|
169
|
-
computed: {
|
|
170
|
-
className: function className(_ref) {
|
|
171
|
-
var caption = _ref.caption,
|
|
172
|
-
selected = _ref.selected,
|
|
173
|
-
styler = _ref.styler,
|
|
174
|
-
subCaption = _ref.subCaption;
|
|
175
|
-
return styler.append({
|
|
176
|
-
selected: selected,
|
|
177
|
-
caption: caption,
|
|
178
|
-
subCaption: subCaption
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
selectionOverlay: function selectionOverlay(_ref2) {
|
|
182
|
-
var css = _ref2.css,
|
|
183
|
-
IconComponent = _ref2.iconComponent,
|
|
184
|
-
SelectionOverlay = _ref2.selectionOverlay,
|
|
185
|
-
selectionOverlayShowing = _ref2.selectionOverlayShowing;
|
|
186
|
-
if (selectionOverlayShowing) {
|
|
187
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
188
|
-
className: css.overlayContainer,
|
|
189
|
-
children: SelectionOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectionOverlay, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
190
|
-
className: css.overlayComponent,
|
|
191
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
192
|
-
className: css.icon,
|
|
193
|
-
children: "check"
|
|
194
|
-
})
|
|
195
|
-
})
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
subComponents: function subComponents(_ref3) {
|
|
200
|
-
var caption = _ref3.caption,
|
|
201
|
-
Caption = _ref3.captionComponent,
|
|
202
|
-
css = _ref3.css,
|
|
203
|
-
subCaption = _ref3.subCaption,
|
|
204
|
-
_subComponents = _ref3.subComponents;
|
|
205
|
-
return _subComponents ? _subComponents : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
206
|
-
children: [caption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
207
|
-
className: css.caption,
|
|
208
|
-
component: Caption,
|
|
209
|
-
shrink: true,
|
|
210
|
-
children: caption
|
|
211
|
-
}) : null, subCaption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
212
|
-
className: css.subCaption,
|
|
213
|
-
component: Caption,
|
|
214
|
-
shrink: true,
|
|
215
|
-
children: subCaption
|
|
216
|
-
}) : null]
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
render: (0, _deprecate["default"])(function (_ref4) {
|
|
221
|
-
var css = _ref4.css,
|
|
222
|
-
ImageComponent = _ref4.imageComponent,
|
|
223
|
-
placeholder = _ref4.placeholder,
|
|
224
|
-
source = _ref4.source,
|
|
225
|
-
selectionOverlay = _ref4.selectionOverlay,
|
|
226
|
-
subComponents = _ref4.subComponents,
|
|
227
|
-
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
228
|
-
delete rest.caption;
|
|
229
|
-
delete rest.captionComponent;
|
|
230
|
-
delete rest.iconComponent;
|
|
231
|
-
delete rest.selected;
|
|
232
|
-
delete rest.selectionOverlayShowing;
|
|
233
|
-
delete rest.subCaption;
|
|
234
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Column, _objectSpread(_objectSpread({}, rest), {}, {
|
|
235
|
-
inline: true,
|
|
236
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
237
|
-
className: css.image,
|
|
238
|
-
component: ImageComponent,
|
|
239
|
-
placeholder: placeholder,
|
|
240
|
-
src: source,
|
|
241
|
-
children: selectionOverlay
|
|
242
|
-
}), subComponents]
|
|
243
|
-
}));
|
|
244
|
-
}, {
|
|
245
|
-
name: 'ui/GridListImageItem',
|
|
246
|
-
replacedBy: 'ui/ImageItem',
|
|
247
|
-
until: '5.0.0'
|
|
248
|
-
})
|
|
249
|
-
});
|
|
250
|
-
var _default = exports["default"] = GridListImageItem;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.gridListImageItem {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
}
|
|
4
|
-
.gridListImageItem .icon {
|
|
5
|
-
position: relative;
|
|
6
|
-
}
|
|
7
|
-
.gridListImageItem .image {
|
|
8
|
-
display: block;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
.gridListImageItem .overlayComponent {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|
|
19
|
-
.gridListImageItem .overlayContainer {
|
|
20
|
-
background-color: transparent;
|
|
21
|
-
pointer-events: none;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}
|
|
24
|
-
.gridListImageItem .caption,
|
|
25
|
-
.gridListImageItem .selected,
|
|
26
|
-
.gridListImageItem .subCaption {
|
|
27
|
-
/* Public Class Names */
|
|
28
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
// Type definitions for ui/IconButton
|
|
2
|
-
|
|
3
|
-
import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
|
|
4
|
-
import { TouchableProps as ui_Touchable_TouchableProps } from "@enact/ui/Touchable";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
8
|
-
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
|
|
9
|
-
|
|
10
|
-
export interface IconButtonBaseProps {
|
|
11
|
-
/**
|
|
12
|
-
* This is the root component used to render the button and will receive all props except
|
|
13
|
-
`icon` .
|
|
14
|
-
*/
|
|
15
|
-
buttonComponent: React.ComponentType | JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* The component used to render the .
|
|
18
|
-
*
|
|
19
|
-
* This component will receive the `flip` and `size` property set on the `IconButton` as well as the
|
|
20
|
-
`icon` class to customize its styling.
|
|
21
|
-
*/
|
|
22
|
-
iconComponent: React.ComponentType;
|
|
23
|
-
/**
|
|
24
|
-
* Additional children that follow the icon.
|
|
25
|
-
*
|
|
26
|
-
* If `icon` isn't specified but `children` is, `children` is used as the icon's value.
|
|
27
|
-
*/
|
|
28
|
-
children?: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Called with a reference to the root component.
|
|
31
|
-
*
|
|
32
|
-
* When using , the `ref` prop is forwarded to this
|
|
33
|
-
component as `componentRef` .
|
|
34
|
-
*/
|
|
35
|
-
componentRef?: object | Function;
|
|
36
|
-
/**
|
|
37
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
38
|
-
corresponding internal elements and states of this component.
|
|
39
|
-
*
|
|
40
|
-
* The following classes are supported:
|
|
41
|
-
* * `iconButton` - The root component class
|
|
42
|
-
* * `icon` - The class
|
|
43
|
-
* * `large` - Applied when `size` prop is `'large'`
|
|
44
|
-
* * `small` - Applied when `size` prop is `'small'`
|
|
45
|
-
* * `pressed` - Applied when `pressed` prop is `true`
|
|
46
|
-
*/
|
|
47
|
-
css?: object;
|
|
48
|
-
/**
|
|
49
|
-
* Disables IconButton.
|
|
50
|
-
*
|
|
51
|
-
* When `true` , the button is shown as disabled and does not generate
|
|
52
|
-
`onClick` .
|
|
53
|
-
*/
|
|
54
|
-
disabled?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Flip the icon horizontally, vertically or both.
|
|
57
|
-
*/
|
|
58
|
-
flip?: "both" | "horizontal" | "vertical";
|
|
59
|
-
/**
|
|
60
|
-
* The icon displayed within the IconButton.
|
|
61
|
-
*
|
|
62
|
-
* If not specified, `children` is used as the icon value instead.
|
|
63
|
-
*/
|
|
64
|
-
icon?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Applies the `pressed` CSS class.
|
|
67
|
-
*/
|
|
68
|
-
pressed?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Applies the `selected` CSS class.
|
|
71
|
-
*/
|
|
72
|
-
selected?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* The size of the button.
|
|
75
|
-
*
|
|
76
|
-
* Applies the CSS class which can be customized by
|
|
77
|
-
.
|
|
78
|
-
*/
|
|
79
|
-
size?: string;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A ui-styled button without any behavior.
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
export class IconButtonBase extends React.Component<
|
|
86
|
-
Merge<React.HTMLProps<HTMLElement>, IconButtonBaseProps>
|
|
87
|
-
> {}
|
|
88
|
-
|
|
89
|
-
export interface IconButtonDecoratorProps
|
|
90
|
-
extends Merge<ui_ForwardRef_ForwardRefProps, ui_Touchable_TouchableProps> {}
|
|
91
|
-
export function IconButtonDecorator<P>(
|
|
92
|
-
Component: React.ComponentType<P> | string,
|
|
93
|
-
): React.ComponentType<P & IconButtonDecoratorProps>;
|
|
94
|
-
|
|
95
|
-
export interface IconButtonProps
|
|
96
|
-
extends Omit<
|
|
97
|
-
Merge<IconButtonBaseProps, IconButtonDecoratorProps>,
|
|
98
|
-
"componentRef"
|
|
99
|
-
> {}
|
|
100
|
-
/**
|
|
101
|
-
* A minimally styled, but interactive, Button ready for customization by a theme.
|
|
102
|
-
*
|
|
103
|
-
* Example:
|
|
104
|
-
* ```
|
|
105
|
-
<IconButton size="small">
|
|
106
|
-
plus
|
|
107
|
-
</IconButton>
|
|
108
|
-
```
|
|
109
|
-
*/
|
|
110
|
-
|
|
111
|
-
export class IconButton extends React.Component<
|
|
112
|
-
Merge<React.HTMLProps<HTMLElement>, IconButtonProps>
|
|
113
|
-
> {}
|
|
114
|
-
|
|
115
|
-
export default IconButton;
|