@enact/ui 5.0.0-alpha.3 → 5.0.0-alpha.5
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/AnnounceDecorator.js +2 -2
- package/AnnounceDecorator/tests/Announce-specs.js +2 -2
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -2
- package/AnnounceDecorator/tests/useAnnounce-specs.js +3 -3
- package/BodyText/BodyText.js +2 -2
- package/BodyText/tests/BodyText-specs.js +6 -6
- package/Button/Button.js +2 -2
- package/Button/tests/Button-specs.js +10 -10
- package/CHANGELOG.md +22 -1
- package/Cancelable/tests/Cancelable-specs.js +19 -19
- package/Card/Card.d.ts +77 -0
- package/Card/Card.js +215 -0
- package/Card/Card.module.css +31 -0
- package/Card/package.json +3 -0
- package/Card/tests/Card-specs.js +90 -0
- package/Changeable/tests/Changeable-specs.js +25 -25
- package/ComponentOverride/ComponentOverride.js +3 -3
- package/FloatingLayer/FloatingLayer.js +3 -3
- package/FloatingLayer/FloatingLayerDecorator.js +3 -3
- package/FloatingLayer/Scrim.js +2 -2
- package/FloatingLayer/tests/FloatingLayer-specs.js +6 -6
- package/FloatingLayer/tests/Scrim-specs.js +2 -2
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -3
- package/Group/Group.js +2 -2
- package/Group/GroupItem.js +2 -2
- package/Group/tests/Group-specs.js +11 -11
- package/Heading/Heading.js +2 -2
- package/Heading/tests/Heading-specs.js +14 -14
- package/Icon/Icon.js +3 -2
- package/Icon/tests/Icon-specs.js +9 -9
- package/Image/Image.js +2 -2
- package/Image/tests/Image-specs.js +5 -5
- package/ImageItem/ImageItem.js +2 -2
- package/ImageItem/tests/ImageItem-specs.js +11 -11
- package/Item/Item.js +2 -2
- package/Item/tests/Item-specs.js +7 -7
- package/LabeledIcon/LabeledIcon.js +3 -3
- package/LabeledIcon/tests/LabeledIcon-specs.js +4 -4
- package/Layout/Cell.js +2 -2
- package/Layout/Layout.js +2 -2
- package/Layout/tests/Layout-specs.js +10 -10
- package/Marquee/MarqueeBase.js +2 -2
- package/Marquee/MarqueeController.js +1 -1
- package/Marquee/MarqueeDecorator.js +2 -2
- package/Marquee/tests/Marquee-specs.js +44 -44
- package/Measurable/tests/Measurable-specs.js +3 -3
- package/Media/Media.js +3 -3
- package/Media/tests/Media-specs.js +12 -12
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +1 -1
- package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
- package/ProgressBar/ProgressBar.js +2 -2
- package/ProgressBar/tests/ProgressBar-specs.js +7 -7
- package/Repeater/Repeater.js +2 -2
- package/Repeater/tests/Repeater-specs.js +14 -14
- package/Resizable/tests/Resizable-specs.js +1 -1
- package/Resizable/tests/useResize-specs.js +1 -1
- package/Routable/Link.js +2 -2
- package/Routable/Routable.js +2 -2
- package/Routable/Router.js +2 -2
- package/Routable/tests/Routable-specs.js +1 -1
- package/Routable/tests/Router-specs.js +10 -10
- package/Routable/util.js +3 -3
- package/Scroller/ScrollerBasic.js +2 -2
- package/Scroller/tests/Scroller-specs.js +3 -3
- package/Skinnable/Skinnable.js +3 -3
- package/Skinnable/tests/Skinnable-specs.js +19 -19
- package/Skinnable/tests/useSkins-specs.js +14 -14
- package/Slider/Knob.js +2 -2
- package/Slider/Slider.js +2 -2
- package/Slider/tests/Slider-specs.js +7 -7
- package/Slottable/tests/Slottable-specs.js +10 -10
- package/Slottable/tests/useSlots-specs.js +10 -10
- package/Slottable/useSlots.js +2 -2
- package/Spinner/Spinner.js +2 -2
- package/Spinner/tests/Spinner-specs.js +5 -5
- package/ToggleIcon/ToggleIcon.js +2 -2
- package/ToggleIcon/tests/ToggleIcon-specs.js +5 -5
- package/Toggleable/Toggleable.js +2 -2
- package/Toggleable/tests/Toggleable-specs.js +41 -41
- package/Toggleable/useToggle.js +2 -2
- package/Touchable/Touchable.js +2 -2
- package/Touchable/tests/Touchable-specs.js +38 -38
- package/Touchable/tests/useTouch-specs.js +17 -17
- package/Transition/Transition.js +2 -2
- package/Transition/tests/Transition-specs.js +11 -11
- package/ViewManager/ViewManager.js +2 -2
- package/ViewManager/tests/View-specs.js +13 -13
- package/ViewManager/tests/ViewManager-specs.js +50 -50
- package/VirtualList/VirtualListBasic.js +3 -3
- package/VirtualList/tests/VirtualGridList-native-specs.js +8 -8
- package/VirtualList/tests/VirtualGridList-specs.js +25 -25
- package/VirtualList/tests/VirtualList-native-specs.js +9 -9
- package/VirtualList/tests/VirtualList-specs.js +31 -31
- package/internal/IdProvider/tests/IdProvider-specs.js +2 -2
- package/internal/IdProvider/tests/useId-specs.js +6 -6
- package/internal/Pure/tests/Pure-specs.js +5 -5
- package/package.json +7 -7
- package/resolution/index.d.ts +5 -1
- package/resolution/resolution.js +5 -1
- package/resolution/tests/ResolutionDecorator-specs.js +2 -2
- package/resolution/tests/resolution-specs.js +46 -19
- package/styles/mixins.less +0 -2
- package/useControlledState/tests/useControlledState-specs.js +10 -10
- package/useScroll/ScrollAnimator.js +3 -3
- package/useScroll/Scrollbar.js +2 -2
- package/useScroll/ScrollbarTrack.js +2 -2
- package/useScroll/useScroll.js +5 -2
package/Item/tests/Item-specs.js
CHANGED
|
@@ -14,14 +14,14 @@ var tap = function tap(node) {
|
|
|
14
14
|
};
|
|
15
15
|
describe('Item', function () {
|
|
16
16
|
test('should render an item', function () {
|
|
17
|
-
(0, _react.render)(
|
|
17
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
18
18
|
children: "I am an item"
|
|
19
19
|
}));
|
|
20
20
|
var actual = _react.screen.getByText('I am an item');
|
|
21
21
|
expect(actual).toBeInTheDocument();
|
|
22
22
|
});
|
|
23
23
|
test('should render a disabled item', function () {
|
|
24
|
-
(0, _react.render)(
|
|
24
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
25
25
|
disabled: true,
|
|
26
26
|
children: "I am a disabled item"
|
|
27
27
|
}));
|
|
@@ -29,7 +29,7 @@ describe('Item', function () {
|
|
|
29
29
|
expect(actual).toHaveAttribute('disabled');
|
|
30
30
|
});
|
|
31
31
|
test('should render an inline item', function () {
|
|
32
|
-
(0, _react.render)(
|
|
32
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
33
33
|
inline: true,
|
|
34
34
|
children: "I am an inline item"
|
|
35
35
|
}));
|
|
@@ -40,7 +40,7 @@ describe('Item', function () {
|
|
|
40
40
|
describe('events', function () {
|
|
41
41
|
test('should call onTap when tapped', function () {
|
|
42
42
|
var handleClick = jest.fn();
|
|
43
|
-
(0, _react.render)(
|
|
43
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
44
44
|
onTap: handleClick,
|
|
45
45
|
children: "I am a normal item"
|
|
46
46
|
}));
|
|
@@ -51,7 +51,7 @@ describe('Item', function () {
|
|
|
51
51
|
});
|
|
52
52
|
test('should not call onTap when tapped and disabled', function () {
|
|
53
53
|
var handleClick = jest.fn();
|
|
54
|
-
(0, _react.render)(
|
|
54
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
55
55
|
disabled: true,
|
|
56
56
|
onTap: handleClick,
|
|
57
57
|
children: "I am a disabled item"
|
|
@@ -63,7 +63,7 @@ describe('Item', function () {
|
|
|
63
63
|
test('should call onClick when clicked', /*#__PURE__*/_asyncToGenerator(function* () {
|
|
64
64
|
var handleClick = jest.fn();
|
|
65
65
|
var user = _userEvent["default"].setup();
|
|
66
|
-
(0, _react.render)(
|
|
66
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
67
67
|
onClick: handleClick,
|
|
68
68
|
children: "I am a normal Item"
|
|
69
69
|
}));
|
|
@@ -75,7 +75,7 @@ describe('Item', function () {
|
|
|
75
75
|
test('should not call onClick when clicked and disabled', /*#__PURE__*/_asyncToGenerator(function* () {
|
|
76
76
|
var handleClick = jest.fn();
|
|
77
77
|
var user = _userEvent["default"].setup();
|
|
78
|
-
(0, _react.render)(
|
|
78
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Item["default"], {
|
|
79
79
|
disabled: true,
|
|
80
80
|
onClick: handleClick,
|
|
81
81
|
children: "I am a disabled Item"
|
|
@@ -38,8 +38,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
38
38
|
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; }
|
|
39
39
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
40
40
|
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); }
|
|
41
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
42
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
41
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
42
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
43
43
|
var LabeledIconBase = exports.LabeledIconBase = (0, _kind["default"])({
|
|
44
44
|
name: 'ui:LabeledIcon',
|
|
45
45
|
propTypes: /** @lends ui/LabeledIcon.LabeledIconBase.prototype */{
|
|
@@ -204,7 +204,7 @@ var LabeledIconBase = exports.LabeledIconBase = (0, _kind["default"])({
|
|
|
204
204
|
// `icon` is normally passed to `iconComponent` as children, but if `icon` is instead a
|
|
205
205
|
// rendered JSX component, it should become a child of `Cell.icon` and iconComponent should
|
|
206
206
|
// use Cell's default value. We must also reposition the `icon` class
|
|
207
|
-
if (
|
|
207
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(icon)) {
|
|
208
208
|
icon = (0, _ComponentOverride["default"])({
|
|
209
209
|
component: icon,
|
|
210
210
|
className: iconClassName,
|
|
@@ -19,7 +19,7 @@ var iconComponent = function iconComponent(_ref) {
|
|
|
19
19
|
};
|
|
20
20
|
describe('LabeledIcon Specs', function () {
|
|
21
21
|
test('should insert the icon source into the icon when using the prop approach', function () {
|
|
22
|
-
(0, _react.render)(
|
|
22
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_LabeledIcon["default"], {
|
|
23
23
|
icon: iconName,
|
|
24
24
|
iconComponent: iconComponent,
|
|
25
25
|
children: iconLabel
|
|
@@ -30,7 +30,7 @@ describe('LabeledIcon Specs', function () {
|
|
|
30
30
|
expect(icon.textContent).toBe(expected);
|
|
31
31
|
});
|
|
32
32
|
test('should insert the icon source into the icon slot element', function () {
|
|
33
|
-
(0, _react.render)(
|
|
33
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_LabeledIcon["default"], {
|
|
34
34
|
iconComponent: iconComponent,
|
|
35
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("icon", {
|
|
36
36
|
children: iconName
|
|
@@ -42,7 +42,7 @@ describe('LabeledIcon Specs', function () {
|
|
|
42
42
|
expect(icon.textContent).toBe(expected);
|
|
43
43
|
});
|
|
44
44
|
test('should insert custom icon components into the icon slot', function () {
|
|
45
|
-
(0, _react.render)(
|
|
45
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_LabeledIcon["default"], {
|
|
46
46
|
iconComponent: iconComponent,
|
|
47
47
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("icon", {
|
|
48
48
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon["default"], {
|
|
@@ -56,7 +56,7 @@ describe('LabeledIcon Specs', function () {
|
|
|
56
56
|
});
|
|
57
57
|
test('should return a DOM node reference for `componentRef`', function () {
|
|
58
58
|
var ref = jest.fn();
|
|
59
|
-
(0, _react.render)(
|
|
59
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_LabeledIcon["default"], {
|
|
60
60
|
icon: iconName,
|
|
61
61
|
iconComponent: iconComponent,
|
|
62
62
|
ref: ref
|
package/Layout/Cell.js
CHANGED
|
@@ -14,8 +14,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
var _excluded = ["component", "componentCss", "componentRef"],
|
|
15
15
|
_excluded2 = ["key"];
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
18
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
package/Layout/Layout.js
CHANGED
|
@@ -31,8 +31,8 @@ var _LayoutModule = _interopRequireDefault(require("./Layout.module.css"));
|
|
|
31
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
32
|
var _excluded = ["component", "componentRef"];
|
|
33
33
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
34
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
35
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
34
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
35
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
36
36
|
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; }
|
|
37
37
|
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; }
|
|
38
38
|
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; }
|
|
@@ -24,7 +24,7 @@ describe('Layout Specs', function () {
|
|
|
24
24
|
value = _ref2[0],
|
|
25
25
|
resolved = _ref2[1];
|
|
26
26
|
test("should apply '".concat(resolved, "' style value given an align prop value of \"").concat(value, "\""), function () {
|
|
27
|
-
(0, _react.render)(
|
|
27
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
28
28
|
align: value,
|
|
29
29
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
30
30
|
children: "Body"
|
|
@@ -38,7 +38,7 @@ describe('Layout Specs', function () {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
test('should apply a class for inline', function () {
|
|
41
|
-
(0, _react.render)(
|
|
41
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
42
42
|
inline: true,
|
|
43
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
44
44
|
children: "Body"
|
|
@@ -58,7 +58,7 @@ describe('Layout Specs', function () {
|
|
|
58
58
|
vals.forEach(function (value) {
|
|
59
59
|
test("should apply classes for ".concat(prop), function () {
|
|
60
60
|
var propValue = _defineProperty({}, prop, value);
|
|
61
|
-
(0, _react.render)(
|
|
61
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], _objectSpread(_objectSpread({}, propValue), {}, {
|
|
62
62
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
63
63
|
children: "Body"
|
|
64
64
|
})
|
|
@@ -75,7 +75,7 @@ describe('Layout Specs', function () {
|
|
|
75
75
|
cellBooleanPropClasses.forEach(function (prop) {
|
|
76
76
|
test("should apply a class for ".concat(prop), function () {
|
|
77
77
|
var props = _defineProperty({}, prop, true);
|
|
78
|
-
(0, _react.render)(
|
|
78
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, _objectSpread(_objectSpread({}, props), {}, {
|
|
79
79
|
children: "Body"
|
|
80
80
|
})));
|
|
81
81
|
var layout = _react.screen.getByText('Body');
|
|
@@ -91,7 +91,7 @@ describe('Layout Specs', function () {
|
|
|
91
91
|
vals.forEach(function (value) {
|
|
92
92
|
test("should apply flexBasis styles the size prop value ".concat(value), function () {
|
|
93
93
|
var propValue = _defineProperty({}, prop, value);
|
|
94
|
-
(0, _react.render)(
|
|
94
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
95
95
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, _objectSpread(_objectSpread({}, propValue), {}, {
|
|
96
96
|
children: "Body"
|
|
97
97
|
}))
|
|
@@ -105,7 +105,7 @@ describe('Layout Specs', function () {
|
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
107
|
test('should apply a class for grow', function () {
|
|
108
|
-
(0, _react.render)(
|
|
108
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
109
109
|
children: "Body"
|
|
110
110
|
}));
|
|
111
111
|
var cell = _react.screen.getByText('Body');
|
|
@@ -113,7 +113,7 @@ describe('Layout Specs', function () {
|
|
|
113
113
|
expect(cell).toHaveClass(expected);
|
|
114
114
|
});
|
|
115
115
|
test('should apply classes for grow and size and flexBasis styles the size prop value 100px', function () {
|
|
116
|
-
(0, _react.render)(
|
|
116
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
117
117
|
style: {
|
|
118
118
|
width: "300px"
|
|
119
119
|
},
|
|
@@ -134,7 +134,7 @@ describe('Layout Specs', function () {
|
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
136
|
test('should not be apply a class for grow when using shrink', function () {
|
|
137
|
-
(0, _react.render)(
|
|
137
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
138
138
|
grow: true,
|
|
139
139
|
shrink: true,
|
|
140
140
|
children: "Body"
|
|
@@ -145,7 +145,7 @@ describe('Layout Specs', function () {
|
|
|
145
145
|
});
|
|
146
146
|
test('should return a DOM node reference for `componentRef` on `Layout`', function () {
|
|
147
147
|
var ref = jest.fn();
|
|
148
|
-
(0, _react.render)(
|
|
148
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
149
149
|
ref: ref
|
|
150
150
|
}));
|
|
151
151
|
var expected = 'DIV';
|
|
@@ -154,7 +154,7 @@ describe('Layout Specs', function () {
|
|
|
154
154
|
});
|
|
155
155
|
test('should return a DOM node reference for `componentRef` on `Cell`', function () {
|
|
156
156
|
var ref = jest.fn();
|
|
157
|
-
(0, _react.render)(
|
|
157
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
158
158
|
ref: ref
|
|
159
159
|
}));
|
|
160
160
|
var expected = 'DIV';
|
package/Marquee/MarqueeBase.js
CHANGED
|
@@ -18,8 +18,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
18
18
|
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; }
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
20
|
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); }
|
|
21
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
22
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
21
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
23
23
|
var isEventSource = function isEventSource(ev) {
|
|
24
24
|
return ev.target === ev.currentTarget;
|
|
25
25
|
};
|
|
@@ -60,7 +60,7 @@ var MarqueeController = exports.MarqueeController = (0, _hoc["default"])(default
|
|
|
60
60
|
onFocus: handleFocus
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
return provideMarqueeControllerContext(
|
|
63
|
+
return provideMarqueeControllerContext(/*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, wrappedProps)));
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
66
|
var _default = exports["default"] = MarqueeController;
|
|
@@ -25,8 +25,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
|
|
|
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
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 _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
29
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
28
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
29
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
30
30
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
31
31
|
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); } }
|
|
32
32
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|