@enact/ui 4.5.1 → 4.5.3
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 +1 -40
- package/AnnounceDecorator/AnnounceDecorator.js +3 -21
- package/AnnounceDecorator/tests/Announce-specs.js +2 -7
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -6
- package/AnnounceDecorator/tests/useAnnounce-specs.js +8 -19
- package/AnnounceDecorator/useAnnounce.js +0 -6
- package/BodyText/BodyText.js +6 -26
- package/BodyText/tests/BodyText-specs.js +0 -19
- package/Button/Button.js +26 -56
- package/Button/tests/Button-specs.js +0 -26
- package/CHANGELOG.md +10 -0
- package/Cancelable/Cancelable.js +8 -47
- package/Cancelable/cancelHandler.js +5 -12
- package/Cancelable/modalHandler.js +3 -11
- package/Cancelable/tests/Cancelable-specs.js +3 -57
- package/Changeable/Changeable.js +2 -34
- package/Changeable/tests/Changeable-specs.js +20 -66
- package/ComponentOverride/ComponentOverride.js +1 -13
- package/FloatingLayer/FloatingLayer.js +17 -73
- package/FloatingLayer/FloatingLayerContainer.js +0 -15
- package/FloatingLayer/FloatingLayerDecorator.js +4 -17
- package/FloatingLayer/Scrim.js +9 -53
- package/FloatingLayer/index.js +0 -4
- package/FloatingLayer/tests/FloatingLayer-specs.js +8 -22
- package/FloatingLayer/tests/Scrim-specs.js +0 -9
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +0 -13
- package/FloatingLayer/useFloatingLayer.js +3 -14
- package/FloatingLayer/useFloatingLayerDecorator.js +3 -11
- package/ForwardRef/ForwardRef.js +1 -10
- package/GridListImageItem/GridListImageItem.js +17 -50
- package/Group/Group.js +4 -35
- package/Group/GroupItem.js +15 -32
- package/Group/tests/Group-specs.js +0 -32
- package/Heading/Heading.js +7 -35
- package/Heading/tests/Heading-specs.js +81 -14
- package/Icon/Icon.js +14 -48
- package/Icon/tests/Icon-specs.js +0 -22
- package/IconButton/IconButton.js +12 -50
- package/IconButton/tests/IconButton-specs.js +0 -7
- package/Image/Image.js +16 -45
- package/Image/tests/Image-specs.js +0 -14
- package/ImageItem/ImageItem.js +17 -46
- package/ImageItem/tests/ImageItem-specs.js +0 -25
- package/Item/Item.js +8 -32
- package/Item/tests/Item-specs.js +0 -24
- package/LabeledIcon/LabeledIcon.js +19 -50
- package/LabeledIcon/tests/LabeledIcon-specs.js +0 -14
- package/Layout/Cell.js +11 -37
- package/Layout/Layout.js +14 -37
- package/Layout/tests/Layout-specs.js +10 -39
- package/Marquee/MarqueeBase.js +31 -64
- package/Marquee/MarqueeController.js +11 -72
- package/Marquee/MarqueeDecorator.js +62 -196
- package/Marquee/index.js +1 -5
- package/Marquee/tests/Marquee-specs.js +258 -87
- package/Measurable/Measurable.js +12 -34
- package/Measurable/tests/Measurable-specs.js +115 -0
- package/Media/Media.js +15 -65
- package/Media/tests/Media-specs.js +168 -0
- package/Placeholder/PlaceholderControllerDecorator.js +7 -43
- package/Placeholder/PlaceholderDecorator.js +7 -38
- package/Placeholder/index.js +0 -4
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +25 -0
- package/Placeholder/tests/PlaceholderDecorator-specs.js +28 -0
- package/ProgressBar/ProgressBar.js +13 -44
- package/ProgressBar/tests/ProgressBar-specs.js +0 -17
- package/RadioDecorator/RadioControllerDecorator.js +1 -29
- package/RadioDecorator/RadioDecorator.js +4 -42
- package/RadioDecorator/tests/RadioDecorator-specs.js +12 -49
- package/Repeater/Repeater.js +9 -33
- package/Repeater/tests/Repeater-specs.js +0 -38
- package/Resizable/Resizable.js +7 -35
- package/Resizable/tests/Resizable-specs.js +34 -0
- package/Routable/Link.js +8 -44
- package/Routable/Routable.js +10 -33
- package/Routable/Route.js +0 -6
- package/Routable/Router.js +13 -56
- package/Routable/tests/Routable-specs.js +7 -33
- package/Routable/tests/Router-specs.js +18 -44
- package/Routable/useLink.js +4 -8
- package/Routable/util.js +18 -24
- package/Scrollable/ScrollAnimator.js +49 -65
- package/Scrollable/ScrollThumb.js +2 -13
- package/Scrollable/Scrollable.js +179 -386
- package/Scrollable/ScrollableNative.js +188 -391
- package/Scrollable/Scrollbar.js +28 -100
- package/Scroller/Scroller.js +15 -39
- package/Scroller/ScrollerBasic.js +34 -89
- package/Scroller/UiScrollerBase.js +31 -84
- package/Skinnable/Skinnable.js +11 -38
- package/Skinnable/tests/Skinnable-specs.js +3 -74
- package/Skinnable/tests/useSkins-specs.js +1 -13
- package/Skinnable/tests/util-specs.js +0 -14
- package/Skinnable/useSkins.js +8 -15
- package/Skinnable/util.js +9 -20
- package/Slider/Knob.js +5 -24
- package/Slider/PositionDecorator.js +16 -54
- package/Slider/Slider.js +26 -64
- package/Slider/tests/Slider-specs.js +94 -7
- package/Slider/utils.js +0 -2
- package/SlotItem/SlotItem.js +15 -41
- package/SlotItem/tests/SlotItem-specs.js +0 -5
- package/Slottable/Slottable.js +4 -12
- package/Slottable/tests/Slottable-specs.js +19 -46
- package/Slottable/tests/useSlots-specs.js +27 -65
- package/Slottable/useSlots.js +8 -33
- package/Spinner/Spinner.js +15 -42
- package/Spinner/tests/Spinner-specs.js +0 -15
- package/ToggleIcon/ToggleIcon.js +10 -36
- package/ToggleIcon/tests/ToggleIcon-specs.js +0 -16
- package/ToggleItem/ToggleItem.js +15 -52
- package/ToggleItem/tests/ToggleItem-specs.js +0 -30
- package/Toggleable/Toggle.js +1 -15
- package/Toggleable/Toggleable.js +12 -45
- package/Toggleable/tests/Toggleable-specs.js +28 -96
- package/Toggleable/useToggle.js +3 -19
- package/Touchable/ClickAllow.js +5 -14
- package/Touchable/Drag.js +16 -54
- package/Touchable/Flick.js +11 -42
- package/Touchable/Hold.js +21 -68
- package/Touchable/Touch.js +37 -65
- package/Touchable/Touchable.js +32 -71
- package/Touchable/config.js +8 -22
- package/Touchable/tests/Touchable-specs.js +270 -119
- package/Touchable/tests/useTouch-specs.js +6 -80
- package/Touchable/useTouch.js +17 -34
- package/Transition/Transition.js +37 -118
- package/Transition/tests/Transition-specs.js +20 -60
- package/ViewManager/Arranger.js +10 -22
- package/ViewManager/TransitionGroup.js +31 -106
- package/ViewManager/View.js +35 -91
- package/ViewManager/ViewManager.js +19 -83
- package/ViewManager/tests/View-specs.js +0 -17
- package/ViewManager/tests/ViewManager-specs.js +236 -305
- package/ViewManager/tests/test-utils.js +0 -8
- package/VirtualList/UiVirtualListBase.js +256 -406
- package/VirtualList/VirtualList.js +29 -69
- package/VirtualList/VirtualListBase.js +0 -3
- package/VirtualList/VirtualListBasic.js +270 -428
- package/VirtualList/tests/VirtualList-specs.js +9 -37
- package/internal/IdProvider/IdProvider.js +7 -21
- package/internal/IdProvider/Provider.js +4 -17
- package/internal/IdProvider/tests/IdProvider-specs.js +44 -0
- package/internal/IdProvider/tests/useId-specs.js +7 -22
- package/internal/IdProvider/useId.js +0 -6
- package/internal/Pure/Pure.js +3 -30
- package/internal/Pure/tests/Pure-specs.js +88 -0
- package/internal/localized-fonts/localized-fonts.js +33 -62
- package/internal/localized-fonts/tests/localized-fonts-specs.js +33 -0
- package/internal/selection/selection.js +1 -6
- package/internal/selection/tests/selection-specs.js +6 -4
- package/internal/validators/tests/validators-specs.js +80 -0
- package/internal/validators/validators.js +14 -34
- package/package.json +8 -2
- package/resolution/ResolutionDecorator.js +4 -40
- package/resolution/index.js +0 -7
- package/resolution/resolution.js +42 -80
- package/resolution/tests/ResolutionDecorator-specs.js +4 -11
- package/resolution/tests/resolution-specs.js +2 -2
- package/useControlledState/tests/useControlledState-specs.js +15 -46
- package/useControlledState/useControlledState.js +11 -22
- package/useScroll/ScrollAnimator.js +49 -65
- package/useScroll/Scrollbar.js +22 -58
- package/useScroll/ScrollbarTrack.js +3 -19
- package/useScroll/useScroll.js +267 -454
- package/useScroll/utilDOM.js +8 -14
- package/useScroll/utilEvent.js +0 -4
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("@testing-library/jest-dom");
|
|
4
|
-
|
|
5
4
|
var _react = require("@testing-library/react");
|
|
6
|
-
|
|
7
5
|
var _FloatingLayer = require("../FloatingLayer");
|
|
8
|
-
|
|
9
6
|
var _FloatingLayerDecorator = _interopRequireDefault(require("../FloatingLayerDecorator"));
|
|
10
|
-
|
|
11
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
|
|
13
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
|
|
15
9
|
describe('FloatingLayer Specs', function () {
|
|
16
10
|
var Root = (0, _FloatingLayerDecorator["default"])('div');
|
|
17
11
|
test('should not render if FloatingLayer is not open', function () {
|
|
@@ -23,9 +17,7 @@ describe('FloatingLayer Specs', function () {
|
|
|
23
17
|
})
|
|
24
18
|
})
|
|
25
19
|
}));
|
|
26
|
-
|
|
27
20
|
var floatingLayerContainer = _react.screen.queryByTestId('floatingLayer');
|
|
28
|
-
|
|
29
21
|
expect(floatingLayerContainer).not.toBeInTheDocument();
|
|
30
22
|
});
|
|
31
23
|
test('should render if FloatingLayer is open', function () {
|
|
@@ -38,9 +30,7 @@ describe('FloatingLayer Specs', function () {
|
|
|
38
30
|
})
|
|
39
31
|
})
|
|
40
32
|
}));
|
|
41
|
-
|
|
42
33
|
var floatingLayerContainer = _react.screen.getByTestId('floatingLayer');
|
|
43
|
-
|
|
44
34
|
expect(floatingLayerContainer).toBeInTheDocument();
|
|
45
35
|
});
|
|
46
36
|
test('should fire onOpen event with type when FloatingLayer is open', function () {
|
|
@@ -64,18 +54,16 @@ describe('FloatingLayer Specs', function () {
|
|
|
64
54
|
});
|
|
65
55
|
test('should fire onClose event with type when FloatingLayer is closed', function () {
|
|
66
56
|
var handleClose = jest.fn();
|
|
67
|
-
|
|
68
57
|
var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FloatingLayer.FloatingLayerBase, {
|
|
59
|
+
onClose: handleClose,
|
|
60
|
+
open: true,
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
62
|
+
children: "Hi"
|
|
63
|
+
})
|
|
74
64
|
})
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
rerender = _render.rerender;
|
|
78
|
-
|
|
65
|
+
})),
|
|
66
|
+
rerender = _render.rerender;
|
|
79
67
|
rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
80
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FloatingLayer.FloatingLayerBase, {
|
|
81
69
|
onClose: handleClose,
|
|
@@ -101,11 +89,9 @@ describe('FloatingLayer Specs', function () {
|
|
|
101
89
|
})
|
|
102
90
|
})
|
|
103
91
|
}));
|
|
104
|
-
|
|
105
92
|
_react.fireEvent.keyUp(_react.screen.getByText('Hi'), {
|
|
106
93
|
keyCode: 27
|
|
107
94
|
});
|
|
108
|
-
|
|
109
95
|
var expectedType = {
|
|
110
96
|
type: 'onDismiss',
|
|
111
97
|
detail: {
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("@testing-library/jest-dom");
|
|
4
|
-
|
|
5
4
|
var _react = require("@testing-library/react");
|
|
6
|
-
|
|
7
5
|
var _Scrim = _interopRequireDefault(require("../Scrim"));
|
|
8
|
-
|
|
9
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
|
|
11
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
-
|
|
13
8
|
describe('Scrim Specs', function () {
|
|
14
9
|
test('should be translucent by default', function () {
|
|
15
10
|
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Scrim["default"], {
|
|
16
11
|
"data-testid": "scrim"
|
|
17
12
|
}));
|
|
18
13
|
var expected = 'translucent';
|
|
19
|
-
|
|
20
14
|
var scrimContainer = _react.screen.getByTestId('scrim');
|
|
21
|
-
|
|
22
15
|
expect(scrimContainer).toHaveClass(expected);
|
|
23
16
|
});
|
|
24
17
|
test('should only render 1 translucent scrim at a time', function () {
|
|
@@ -26,9 +19,7 @@ describe('Scrim Specs', function () {
|
|
|
26
19
|
"data-testid": "rootElement",
|
|
27
20
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Scrim["default"], {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Scrim["default"], {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Scrim["default"], {})]
|
|
28
21
|
}));
|
|
29
|
-
|
|
30
22
|
var childrenElements = _react.screen.getByTestId('rootElement').children;
|
|
31
|
-
|
|
32
23
|
var expectedLength = 1;
|
|
33
24
|
expect(childrenElements).toHaveLength(expectedLength);
|
|
34
25
|
var expectedClassname = 'translucent';
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("@testing-library/jest-dom");
|
|
4
|
-
|
|
5
4
|
var _react = require("@testing-library/react");
|
|
6
|
-
|
|
7
5
|
var _FloatingLayer = require("../FloatingLayer");
|
|
8
|
-
|
|
9
6
|
var _FloatingLayerDecorator = require("../FloatingLayerDecorator");
|
|
10
|
-
|
|
11
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
|
|
13
8
|
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; }
|
|
14
|
-
|
|
15
9
|
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; }
|
|
16
|
-
|
|
17
10
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
|
|
19
11
|
describe('FloatingLayer Specs', function () {
|
|
20
12
|
function Root(props) {
|
|
21
13
|
var hook = (0, _FloatingLayerDecorator.useFloatingLayerDecorator)();
|
|
22
14
|
return hook.provideFloatingLayer( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread({}, props), "floatWrapped"));
|
|
23
15
|
}
|
|
24
|
-
|
|
25
16
|
test('should not render if FloatingLayer is not open', function () {
|
|
26
17
|
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
27
18
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FloatingLayer.FloatingLayerBase, {
|
|
@@ -31,9 +22,7 @@ describe('FloatingLayer Specs', function () {
|
|
|
31
22
|
})
|
|
32
23
|
})
|
|
33
24
|
}));
|
|
34
|
-
|
|
35
25
|
var floatingLayerContainer = _react.screen.queryByTestId('floatingLayer');
|
|
36
|
-
|
|
37
26
|
expect(floatingLayerContainer).not.toBeInTheDocument();
|
|
38
27
|
});
|
|
39
28
|
test('should render if FloatingLayer is open', function () {
|
|
@@ -46,9 +35,7 @@ describe('FloatingLayer Specs', function () {
|
|
|
46
35
|
})
|
|
47
36
|
})
|
|
48
37
|
}));
|
|
49
|
-
|
|
50
38
|
var floatingLayerContainer = _react.screen.getByTestId('floatingLayer');
|
|
51
|
-
|
|
52
39
|
expect(floatingLayerContainer).toBeInTheDocument();
|
|
53
40
|
});
|
|
54
41
|
});
|
|
@@ -5,29 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
exports.useFloatingLayer = useFloatingLayer;
|
|
8
|
-
|
|
9
8
|
var _react = require("react");
|
|
10
|
-
|
|
11
9
|
var _FloatingLayerDecorator = require("./FloatingLayerDecorator");
|
|
12
|
-
|
|
13
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
|
|
15
11
|
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."); }
|
|
16
|
-
|
|
17
12
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
|
|
19
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
-
|
|
21
14
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
-
|
|
23
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
|
|
25
16
|
function useFloatingLayer() {
|
|
26
17
|
var _useState = (0, _react.useState)(null),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
floatingLayerId = _useState2[0],
|
|
20
|
+
setId = _useState2[1];
|
|
31
21
|
var handler = (0, _react.useCallback)(function (ev) {
|
|
32
22
|
if (ev.action === 'mount' && ev.floatingLayer) {
|
|
33
23
|
setId(ev.floatingLayer.id);
|
|
@@ -43,6 +33,5 @@ function useFloatingLayer() {
|
|
|
43
33
|
floatingLayerId: floatingLayerId
|
|
44
34
|
};
|
|
45
35
|
}
|
|
46
|
-
|
|
47
36
|
var _default = useFloatingLayer;
|
|
48
37
|
exports["default"] = _default;
|
|
@@ -5,18 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.FloatingLayerContext = void 0;
|
|
7
7
|
exports.useFloatingLayerDecorator = useFloatingLayerDecorator;
|
|
8
|
-
|
|
9
8
|
var _useClass = _interopRequireDefault(require("@enact/core/useClass"));
|
|
10
|
-
|
|
11
9
|
var _react = require("react");
|
|
12
|
-
|
|
13
10
|
var _FloatingLayerContainer = _interopRequireDefault(require("./FloatingLayerContainer"));
|
|
14
|
-
|
|
15
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
|
|
17
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
|
-
|
|
19
13
|
var FloatingLayerContext = /*#__PURE__*/(0, _react.createContext)();
|
|
14
|
+
|
|
20
15
|
/**
|
|
21
16
|
* Configuration for `useFloatingLayerDecorator`
|
|
22
17
|
*
|
|
@@ -42,14 +37,12 @@ var FloatingLayerContext = /*#__PURE__*/(0, _react.createContext)();
|
|
|
42
37
|
* @returns {useFloatingLayerDecoratorInterface}
|
|
43
38
|
* @private
|
|
44
39
|
*/
|
|
45
|
-
|
|
46
40
|
exports.FloatingLayerContext = FloatingLayerContext;
|
|
47
|
-
|
|
48
41
|
function useFloatingLayerDecorator() {
|
|
49
42
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50
43
|
var className = config.className,
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
_config$floatLayerId = config.floatLayerId,
|
|
45
|
+
floatLayerId = _config$floatLayerId === void 0 ? 'floatLayer' : _config$floatLayerId;
|
|
53
46
|
var floating = (0, _useClass["default"])(_FloatingLayerContainer["default"], {
|
|
54
47
|
floatLayerId: floatLayerId
|
|
55
48
|
});
|
|
@@ -73,6 +66,5 @@ function useFloatingLayerDecorator() {
|
|
|
73
66
|
provideFloatingLayer: provideFloatingLayer
|
|
74
67
|
};
|
|
75
68
|
}
|
|
76
|
-
|
|
77
69
|
var _default = useFloatingLayerDecorator;
|
|
78
70
|
exports["default"] = _default;
|
package/ForwardRef/ForwardRef.js
CHANGED
|
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.ForwardRef = void 0;
|
|
7
|
-
|
|
8
7
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
9
|
-
|
|
10
8
|
var _react = require("react");
|
|
11
|
-
|
|
12
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
11
|
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; }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
13
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
14
|
/**
|
|
23
15
|
* Default config for {@link ui/ForwardRef.ForwardRef}.
|
|
24
16
|
*
|
|
@@ -35,6 +27,7 @@ var defaultConfig = {
|
|
|
35
27
|
*/
|
|
36
28
|
prop: 'forwardRef'
|
|
37
29
|
};
|
|
30
|
+
|
|
38
31
|
/**
|
|
39
32
|
* A higher-order component that adapts [`React.forwardRef`](https://reactjs.org/docs/forwarding-refs.html)
|
|
40
33
|
* to be chainable with other HOCs.
|
|
@@ -56,12 +49,10 @@ var defaultConfig = {
|
|
|
56
49
|
* @hoc
|
|
57
50
|
* @public
|
|
58
51
|
*/
|
|
59
|
-
|
|
60
52
|
var ForwardRef = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
|
|
61
53
|
var prop = config.prop;
|
|
62
54
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
63
55
|
var withRef = _objectSpread(_objectSpread({}, props), {}, _defineProperty({}, prop, ref));
|
|
64
|
-
|
|
65
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, withRef));
|
|
66
57
|
});
|
|
67
58
|
});
|
|
@@ -4,41 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.GridListImageItem = void 0;
|
|
7
|
-
|
|
8
7
|
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
11
|
-
|
|
12
9
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
13
|
-
|
|
14
10
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
var _react = require("react");
|
|
17
|
-
|
|
18
12
|
var _Layout = require("../Layout");
|
|
19
|
-
|
|
20
13
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
21
|
-
|
|
22
14
|
var _Image = _interopRequireDefault(require("../Image"));
|
|
23
|
-
|
|
24
15
|
var _GridListImageItemModule = _interopRequireDefault(require("./GridListImageItem.module.css"));
|
|
25
|
-
|
|
26
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
|
|
28
17
|
var _excluded = ["css", "imageComponent", "placeholder", "source", "selectionOverlay", "subComponents"];
|
|
29
|
-
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
-
|
|
32
19
|
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; }
|
|
33
|
-
|
|
34
20
|
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; }
|
|
35
|
-
|
|
36
21
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
-
|
|
38
22
|
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; }
|
|
39
|
-
|
|
40
23
|
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
|
-
|
|
42
24
|
/**
|
|
43
25
|
* A basic grid list image item without any behavior.
|
|
44
26
|
*
|
|
@@ -49,9 +31,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
49
31
|
*/
|
|
50
32
|
var GridListImageItem = (0, _kind["default"])({
|
|
51
33
|
name: 'ui:GridListImageItem',
|
|
52
|
-
propTypes:
|
|
53
|
-
/** @lends ui/GridListImageItem.GridListImageItem.prototype */
|
|
54
|
-
{
|
|
34
|
+
propTypes: /** @lends ui/GridListImageItem.GridListImageItem.prototype */{
|
|
55
35
|
/**
|
|
56
36
|
* The primary caption to be displayed with the image.
|
|
57
37
|
*
|
|
@@ -59,7 +39,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
59
39
|
* @public
|
|
60
40
|
*/
|
|
61
41
|
caption: _propTypes2["default"].string,
|
|
62
|
-
|
|
63
42
|
/**
|
|
64
43
|
* The component used to render the captions
|
|
65
44
|
*
|
|
@@ -67,7 +46,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
67
46
|
* @public
|
|
68
47
|
*/
|
|
69
48
|
captionComponent: _propTypes["default"].renderable,
|
|
70
|
-
|
|
71
49
|
/**
|
|
72
50
|
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
73
51
|
* corresponding internal elements and states of this component.
|
|
@@ -84,7 +62,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
84
62
|
* @public
|
|
85
63
|
*/
|
|
86
64
|
css: _propTypes2["default"].object,
|
|
87
|
-
|
|
88
65
|
/**
|
|
89
66
|
* The component used to render the default check icon when selected.
|
|
90
67
|
* If there is custom selectionOverlay component, this icon will not be shown.
|
|
@@ -94,7 +71,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
94
71
|
* @public
|
|
95
72
|
*/
|
|
96
73
|
iconComponent: _propTypes["default"].component,
|
|
97
|
-
|
|
98
74
|
/**
|
|
99
75
|
* The component used to render the image component
|
|
100
76
|
*
|
|
@@ -103,7 +79,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
103
79
|
* @public
|
|
104
80
|
*/
|
|
105
81
|
imageComponent: _propTypes["default"].component,
|
|
106
|
-
|
|
107
82
|
/**
|
|
108
83
|
* Placeholder image used while [source]{@link ui/GridListImageItem.GridListImageItem#source}
|
|
109
84
|
* is loaded.
|
|
@@ -112,7 +87,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
112
87
|
* @public
|
|
113
88
|
*/
|
|
114
89
|
placeholder: _propTypes2["default"].string,
|
|
115
|
-
|
|
116
90
|
/**
|
|
117
91
|
* Applies a selected visual effect to the image, but only if `selectionOverlayShowing`
|
|
118
92
|
* is also `true`.
|
|
@@ -122,7 +96,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
122
96
|
* @public
|
|
123
97
|
*/
|
|
124
98
|
selected: _propTypes2["default"].bool,
|
|
125
|
-
|
|
126
99
|
/**
|
|
127
100
|
* The custom selection overlay component to render.
|
|
128
101
|
*
|
|
@@ -142,7 +115,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
142
115
|
* @public
|
|
143
116
|
*/
|
|
144
117
|
selectionOverlay: _propTypes2["default"].func,
|
|
145
|
-
|
|
146
118
|
/**
|
|
147
119
|
* Shows a selection overlay with a centered icon. When `selected` is true, a check mark is shown.
|
|
148
120
|
*
|
|
@@ -151,7 +123,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
151
123
|
* @public
|
|
152
124
|
*/
|
|
153
125
|
selectionOverlayShowing: _propTypes2["default"].bool,
|
|
154
|
-
|
|
155
126
|
/**
|
|
156
127
|
* The absolute URL path to the image.
|
|
157
128
|
*
|
|
@@ -159,7 +130,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
159
130
|
* @public
|
|
160
131
|
*/
|
|
161
132
|
source: _propTypes2["default"].string,
|
|
162
|
-
|
|
163
133
|
/**
|
|
164
134
|
* The second caption line to be displayed with the image.
|
|
165
135
|
*
|
|
@@ -167,7 +137,6 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
167
137
|
* @public
|
|
168
138
|
*/
|
|
169
139
|
subCaption: _propTypes2["default"].string,
|
|
170
|
-
|
|
171
140
|
/**
|
|
172
141
|
* The components that will be shown below the image.
|
|
173
142
|
*
|
|
@@ -191,9 +160,9 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
191
160
|
computed: {
|
|
192
161
|
className: function className(_ref) {
|
|
193
162
|
var caption = _ref.caption,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
163
|
+
selected = _ref.selected,
|
|
164
|
+
styler = _ref.styler,
|
|
165
|
+
subCaption = _ref.subCaption;
|
|
197
166
|
return styler.append({
|
|
198
167
|
selected: selected,
|
|
199
168
|
caption: caption,
|
|
@@ -202,10 +171,9 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
202
171
|
},
|
|
203
172
|
selectionOverlay: function selectionOverlay(_ref2) {
|
|
204
173
|
var css = _ref2.css,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
174
|
+
IconComponent = _ref2.iconComponent,
|
|
175
|
+
SelectionOverlay = _ref2.selectionOverlay,
|
|
176
|
+
selectionOverlayShowing = _ref2.selectionOverlayShowing;
|
|
209
177
|
if (selectionOverlayShowing) {
|
|
210
178
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
211
179
|
className: css.overlayContainer,
|
|
@@ -221,10 +189,10 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
221
189
|
},
|
|
222
190
|
subComponents: function subComponents(_ref3) {
|
|
223
191
|
var caption = _ref3.caption,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
192
|
+
Caption = _ref3.captionComponent,
|
|
193
|
+
css = _ref3.css,
|
|
194
|
+
subCaption = _ref3.subCaption,
|
|
195
|
+
_subComponents = _ref3.subComponents;
|
|
228
196
|
return _subComponents ? _subComponents : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
229
197
|
children: [caption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
230
198
|
className: css.caption,
|
|
@@ -242,13 +210,12 @@ var GridListImageItem = (0, _kind["default"])({
|
|
|
242
210
|
},
|
|
243
211
|
render: (0, _deprecate["default"])(function (_ref4) {
|
|
244
212
|
var css = _ref4.css,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
213
|
+
ImageComponent = _ref4.imageComponent,
|
|
214
|
+
placeholder = _ref4.placeholder,
|
|
215
|
+
source = _ref4.source,
|
|
216
|
+
selectionOverlay = _ref4.selectionOverlay,
|
|
217
|
+
subComponents = _ref4.subComponents,
|
|
218
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
252
219
|
delete rest.caption;
|
|
253
220
|
delete rest.captionComponent;
|
|
254
221
|
delete rest.iconComponent;
|
package/Group/Group.js
CHANGED
|
@@ -11,39 +11,22 @@ Object.defineProperty(exports, "GroupItem", {
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
exports["default"] = void 0;
|
|
14
|
-
|
|
15
14
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
16
|
-
|
|
17
15
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
18
|
-
|
|
19
16
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
20
|
-
|
|
21
17
|
var _compose = _interopRequireDefault(require("ramda/src/compose"));
|
|
22
|
-
|
|
23
18
|
var _Changeable = _interopRequireDefault(require("../Changeable"));
|
|
24
|
-
|
|
25
19
|
var _ForwardRef = _interopRequireDefault(require("../ForwardRef"));
|
|
26
|
-
|
|
27
20
|
var _Repeater = _interopRequireDefault(require("../Repeater"));
|
|
28
|
-
|
|
29
21
|
var _GroupItem = require("./GroupItem");
|
|
30
|
-
|
|
31
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
|
-
|
|
33
23
|
var _excluded = ["componentRef"];
|
|
34
|
-
|
|
35
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
36
|
-
|
|
37
25
|
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; }
|
|
38
|
-
|
|
39
26
|
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; }
|
|
40
|
-
|
|
41
27
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
42
|
-
|
|
43
28
|
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; }
|
|
44
|
-
|
|
45
29
|
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; }
|
|
46
|
-
|
|
47
30
|
/**
|
|
48
31
|
* A stateless component that supports selection of its child items via configurable
|
|
49
32
|
* properties and events.
|
|
@@ -55,9 +38,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
55
38
|
*/
|
|
56
39
|
var GroupBase = (0, _kind["default"])({
|
|
57
40
|
name: 'Group',
|
|
58
|
-
propTypes:
|
|
59
|
-
/** @lends ui/Group.Group.prototype */
|
|
60
|
-
{
|
|
41
|
+
propTypes: /** @lends ui/Group.Group.prototype */{
|
|
61
42
|
/**
|
|
62
43
|
* Component type to repeat. This can be a React component or a string describing a DOM
|
|
63
44
|
* node (e.g. `'div'`)
|
|
@@ -67,7 +48,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
67
48
|
* @public
|
|
68
49
|
*/
|
|
69
50
|
childComponent: _propTypes["default"].renderable.isRequired,
|
|
70
|
-
|
|
71
51
|
/**
|
|
72
52
|
* An array of data to be mapped onto the `childComponent`.
|
|
73
53
|
* This supports two data types. If an array of strings is provided, the strings will be
|
|
@@ -87,7 +67,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
87
67
|
children: _propTypes2["default"].oneOfType([_propTypes2["default"].arrayOf(_propTypes2["default"].string), _propTypes2["default"].arrayOf(_propTypes2["default"].shape({
|
|
88
68
|
key: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number]).isRequired
|
|
89
69
|
}))]).isRequired,
|
|
90
|
-
|
|
91
70
|
/**
|
|
92
71
|
* The property on each `childComponent` that receives the data in `children`
|
|
93
72
|
*
|
|
@@ -96,7 +75,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
96
75
|
* @public
|
|
97
76
|
*/
|
|
98
77
|
childProp: _propTypes2["default"].string,
|
|
99
|
-
|
|
100
78
|
/**
|
|
101
79
|
* The name of the event that triggers activation.
|
|
102
80
|
*
|
|
@@ -105,7 +83,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
105
83
|
* @public
|
|
106
84
|
*/
|
|
107
85
|
childSelect: _propTypes2["default"].string,
|
|
108
|
-
|
|
109
86
|
/**
|
|
110
87
|
* Called with a reference to the root component.
|
|
111
88
|
*
|
|
@@ -116,7 +93,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
116
93
|
* @public
|
|
117
94
|
*/
|
|
118
95
|
componentRef: _propTypes["default"].ref,
|
|
119
|
-
|
|
120
96
|
/**
|
|
121
97
|
* The property on each `childComponent` that receives the index of the item
|
|
122
98
|
*
|
|
@@ -125,7 +101,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
125
101
|
* @public
|
|
126
102
|
*/
|
|
127
103
|
indexProp: _propTypes2["default"].string,
|
|
128
|
-
|
|
129
104
|
/**
|
|
130
105
|
* An object containing properties to be passed to each child.
|
|
131
106
|
*
|
|
@@ -133,7 +108,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
133
108
|
* @public
|
|
134
109
|
*/
|
|
135
110
|
itemProps: _propTypes2["default"].object,
|
|
136
|
-
|
|
137
111
|
/**
|
|
138
112
|
* Callback method to be invoked when an item is activated.
|
|
139
113
|
*
|
|
@@ -141,7 +115,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
141
115
|
* @public
|
|
142
116
|
*/
|
|
143
117
|
onSelect: _propTypes2["default"].func,
|
|
144
|
-
|
|
145
118
|
/**
|
|
146
119
|
* Selection mode for the group
|
|
147
120
|
*
|
|
@@ -156,7 +129,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
156
129
|
* @public
|
|
157
130
|
*/
|
|
158
131
|
select: _propTypes2["default"].oneOf(['single', 'radio', 'multiple']),
|
|
159
|
-
|
|
160
132
|
/**
|
|
161
133
|
* The index(es) of the currently activated item.
|
|
162
134
|
*
|
|
@@ -164,7 +136,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
164
136
|
* @public
|
|
165
137
|
*/
|
|
166
138
|
selected: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].array]),
|
|
167
|
-
|
|
168
139
|
/**
|
|
169
140
|
* The key that will hold the value in the event passed to `onSelect`.
|
|
170
141
|
*
|
|
@@ -173,7 +144,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
173
144
|
* @public
|
|
174
145
|
*/
|
|
175
146
|
selectedEventProp: _propTypes2["default"].string,
|
|
176
|
-
|
|
177
147
|
/**
|
|
178
148
|
* The name of the DOM property that represents the selected state.
|
|
179
149
|
*
|
|
@@ -202,8 +172,7 @@ var GroupBase = (0, _kind["default"])({
|
|
|
202
172
|
},
|
|
203
173
|
render: function render(_ref2) {
|
|
204
174
|
var componentRef = _ref2.componentRef,
|
|
205
|
-
|
|
206
|
-
|
|
175
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
207
176
|
delete rest.onSelect;
|
|
208
177
|
delete rest.childSelect;
|
|
209
178
|
delete rest.select;
|
|
@@ -218,6 +187,7 @@ var GroupBase = (0, _kind["default"])({
|
|
|
218
187
|
}));
|
|
219
188
|
}
|
|
220
189
|
});
|
|
190
|
+
|
|
221
191
|
/**
|
|
222
192
|
* A higher-order component that adds behavior to [Group]{@link ui/Group.GroupBase}.
|
|
223
193
|
*
|
|
@@ -227,7 +197,6 @@ var GroupBase = (0, _kind["default"])({
|
|
|
227
197
|
* @mixes ui/Changeable.Changeable
|
|
228
198
|
* @public
|
|
229
199
|
*/
|
|
230
|
-
|
|
231
200
|
exports.GroupBase = GroupBase;
|
|
232
201
|
var GroupDecorator = (0, _compose["default"])((0, _ForwardRef["default"])({
|
|
233
202
|
prop: 'componentRef'
|
|
@@ -235,6 +204,7 @@ var GroupDecorator = (0, _compose["default"])((0, _ForwardRef["default"])({
|
|
|
235
204
|
change: 'onSelect',
|
|
236
205
|
prop: 'selected'
|
|
237
206
|
}));
|
|
207
|
+
|
|
238
208
|
/**
|
|
239
209
|
* A component that supports selection of its child items via configurable properties and
|
|
240
210
|
* events.
|
|
@@ -249,7 +219,6 @@ var GroupDecorator = (0, _compose["default"])((0, _ForwardRef["default"])({
|
|
|
249
219
|
* @ui
|
|
250
220
|
* @public
|
|
251
221
|
*/
|
|
252
|
-
|
|
253
222
|
exports.GroupDecorator = GroupDecorator;
|
|
254
223
|
var Group = GroupDecorator(GroupBase);
|
|
255
224
|
exports.Group = Group;
|