@enact/limestone 1.9.3 → 1.10.1
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/.github/workflows/ci-reusable.yml +2 -2
- package/ActionGuide/ActionGuide.module.css +4 -0
- package/Alert/Alert.d.ts +9 -0
- package/Alert/Alert.js +35 -4
- package/Alert/Alert.module.css +12 -1
- package/Alert/tests/Alert-specs.js +91 -0
- package/BodyText/BodyText.module.css +21 -0
- package/Button/Button.module.css +72 -40
- package/Button/tests/Button-specs.js +26 -0
- package/CHANGELOG.md +74 -0
- package/Card/Card.d.ts +4 -4
- package/Card/Card.js +10 -8
- package/Card/Card.module.css +31 -7
- package/Card/tests/Card-specs.js +39 -5
- package/Checkbox/Checkbox.module.css +4 -0
- package/CheckboxItem/CheckboxItem.js +6 -4
- package/Chips/Chip.js +12 -6
- package/Chips/Chip.module.css +3 -0
- package/Chips/Chips.js +12 -6
- package/Chips/tests/Chip-specs.js +25 -5
- package/Chips/tests/Chips-specs.js +12 -2
- package/ColorPicker/ColorPicker.js +27 -25
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +32 -22
- package/DayPicker/DaySelectorDecorator.js +12 -7
- package/Dropdown/Dropdown.module.css +4 -0
- package/Dropdown/DropdownList.js +74 -53
- package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
- package/Heading/Heading.d.ts +1 -1
- package/Heading/Heading.js +2 -2
- package/Heading/Heading.module.css +16 -0
- package/Icon/Icon.d.ts +1 -0
- package/Icon/Icon.js +1 -0
- package/Icon/Icon.module.css +12 -0
- package/Icon/IconList.js +2 -0
- package/IconItem/IconItem.module.css +19 -3
- package/IconItem/tests/IconItem-specs.js +30 -1
- package/Image/Image.js +6 -4
- package/ImageItem/ImageItem.module.css +17 -0
- package/Input/Input.js +12 -1
- package/Input/Input.module.css +25 -9
- package/Input/InputField.js +75 -24
- package/Input/InputField.module.css +280 -45
- package/Input/InputFieldDecoratorIcon.js +1 -0
- package/Input/InputFieldSpotlightDecorator.js +53 -8
- package/Input/index.d.ts +105 -93
- package/Input/tests/Input-specs.js +26 -0
- package/Input/tests/InputField-specs.js +149 -3
- package/Input/tests/InputPopup-specs.js +1 -1
- package/Item/Item.module.css +2 -1
- package/KeyGuide/KeyGuide.js +29 -27
- package/KeyGuide/KeyGuide.module.css +10 -0
- package/MediaOverlay/MediaOverlay.module.css +16 -4
- package/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
- package/MediaPlayer/MediaControls.module.css +3 -0
- package/MediaPlayer/Times.module.css +4 -0
- package/MediaPlayer/tests/util-specs.js +4 -1
- package/PageViews/PageViews.js +134 -69
- package/PageViews/PageViews.module.css +7 -0
- package/PageViews/PageViewsRouter.js +91 -42
- package/PageViews/tests/PageViews-specs.js +87 -0
- package/Panels/Header.js +6 -4
- package/Panels/Header.module.css +37 -31
- package/Popup/Popup.js +5 -4
- package/PopupTabLayout/PopupTabLayout.js +11 -9
- package/PopupTabLayout/PopupTabLayout.module.css +18 -0
- package/RadioItem/RadioItem.js +7 -5
- package/RadioItem/RadioItem.module.css +5 -0
- package/Scroller/EditableWrapper.js +19 -15
- package/Scroller/Scroller.js +11 -10
- package/Scroller/Scroller.module.css +10 -0
- package/Scroller/tests/Scroller-specs.js +91 -2
- package/Scroller/useThemeScroller.js +6 -3
- package/Slider/Slider.d.ts +4 -0
- package/Slider/Slider.js +40 -16
- package/Slider/Slider.module.css +150 -3
- package/Slider/SliderBehaviorDecorator.js +16 -14
- package/Slider/tests/Slider-specs.js +51 -0
- package/Slider/utils.js +23 -7
- package/Spinner/Spinner.js +10 -8
- package/Steps/Steps.module.css +3 -0
- package/Switch/Switch.module.css +15 -1
- package/TabLayout/RefocusDecorator.js +14 -12
- package/TabLayout/TabGroup.module.css +1 -1
- package/TabLayout/tests/TabGroup-specs.js +1 -1
- package/ThemeDecorator/AccessibilityDecorator.js +12 -11
- package/ThemeDecorator/I18nFontDecorator.js +6 -4
- package/ThemeDecorator/ThemeDecorator.d.ts +7 -0
- package/ThemeDecorator/ThemeDecorator.js +24 -9
- package/TimePicker/TimePicker.module.css +3 -0
- package/TimePicker/TimePickerBase.js +5 -3
- package/TooltipDecorator/Tooltip.module.css +4 -0
- package/TooltipDecorator/TooltipDecorator.js +12 -7
- package/TooltipDecorator/tests/useTooltip-specs.js +5 -2
- package/VideoPlayer/Feedback.module.css +3 -0
- package/VideoPlayer/FeedbackTooltip.module.css +7 -0
- package/VideoPlayer/MediaTitle.module.css +8 -0
- package/VideoPlayer/VideoPlayer.js +25 -24
- package/VirtualList/VirtualList.js +20 -18
- package/VirtualList/useSpotlight.js +1 -1
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
- package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
- package/internal/DateTime/DateTime.module.css +3 -0
- package/internal/DateTime/DateTimeDecorator.js +5 -4
- package/internal/Panels/PanelsRouter.js +35 -29
- package/internal/Panels/useAutoFocus.js +10 -6
- package/internal/Panels/useFocusOnTransition.js +4 -3
- package/internal/Picker/Picker.js +7 -5
- package/internal/Picker/Picker.module.css +22 -0
- package/internal/Picker/SpottablePicker.js +15 -13
- package/internal/SharedStateDecorator/SharedStateDecorator.js +6 -4
- package/package.json +15 -12
- package/styles/colors.less +1 -0
- package/styles/variables.less +118 -26
- package/useScroll/HoverToScroll.js +15 -12
- package/useScroll/Scrollbar.js +14 -10
- package/useScroll/ScrollbarPlaceholder.js +4 -1
- package/useScroll/ScrollbarTrack.js +7 -5
- package/useScroll/useEvent.js +7 -2
- package/useScroll/useScroll.js +10 -2
|
@@ -7,12 +7,13 @@ exports.PageViewsRouter = PageViewsRouter;
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
9
9
|
var _useChainRefs = _interopRequireDefault(require("@enact/core/useChainRefs"));
|
|
10
|
+
var _util = require("@enact/core/util");
|
|
10
11
|
var _spotlight = _interopRequireDefault(require("@enact/spotlight"));
|
|
11
12
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _react = require("react");
|
|
13
14
|
var _Panels = require("../internal/Panels");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _excluded = ["autoFocus", "children", "componentRef", "data-spotlight-id", "index", "onTransition", "onWillTransition", "rtl"],
|
|
16
|
+
var _excluded = ["autoFocus", "bannerMode", "children", "componentRef", "data-spotlight-id", "index", "onFooterCloseClick", "onFooterNextClick", "onNextClick", "onPrevClick", "onTransition", "onWillTransition", "rtl", "showFooterButtons"],
|
|
16
17
|
_excluded2 = ["onWillTransition"]; // single-index ViewManagers need some help knowing when the transition direction needs to change
|
|
17
18
|
// because the index is always 0 from its perspective.
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -24,36 +25,44 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
24
25
|
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; }
|
|
25
26
|
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; }
|
|
26
27
|
function useReverseTransition(index, rtl) {
|
|
27
|
-
var prevIndex = (0,
|
|
28
|
+
var prevIndex = (0, _util.usePrevious)(index);
|
|
28
29
|
var reverse = false;
|
|
29
|
-
if (prevIndex
|
|
30
|
-
reverse = rtl ? index > prevIndex
|
|
30
|
+
if (prevIndex !== index) {
|
|
31
|
+
reverse = rtl ? index > prevIndex : index < prevIndex;
|
|
31
32
|
}
|
|
32
|
-
prevIndex.current = index;
|
|
33
33
|
return {
|
|
34
34
|
reverseTransition: reverse
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* PageViewsRouter passes children, index and transition handlers
|
|
39
|
+
* PageViewsRouter passes children, index and transition handlers.
|
|
40
40
|
*
|
|
41
41
|
* @class PageViewsRouter
|
|
42
42
|
* @memberof limestone/PageViews
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
45
|
function PageViewsRouter(Wrapped) {
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
var _PageViewsProvider = function PageViewsProvider(props) {
|
|
47
|
+
var pageViewsProviderProps = (0, _util.setDefaultProps)(props, {
|
|
48
|
+
index: 0
|
|
49
|
+
});
|
|
50
|
+
(0, _util.checkPropTypes)(_PageViewsProvider, pageViewsProviderProps);
|
|
51
|
+
var autoFocus = pageViewsProviderProps.autoFocus,
|
|
52
|
+
bannerMode = pageViewsProviderProps.bannerMode,
|
|
53
|
+
children = pageViewsProviderProps.children,
|
|
54
|
+
componentRef = pageViewsProviderProps.componentRef,
|
|
55
|
+
spotlightId = pageViewsProviderProps['data-spotlight-id'],
|
|
56
|
+
index = pageViewsProviderProps.index,
|
|
57
|
+
onFooterCloseClick = pageViewsProviderProps.onFooterCloseClick,
|
|
58
|
+
onFooterNextClick = pageViewsProviderProps.onFooterNextClick,
|
|
59
|
+
onNextClick = pageViewsProviderProps.onNextClick,
|
|
60
|
+
onPrevClick = pageViewsProviderProps.onPrevClick,
|
|
61
|
+
onTransition = pageViewsProviderProps.onTransition,
|
|
62
|
+
onWillTransition = pageViewsProviderProps.onWillTransition,
|
|
63
|
+
rtl = pageViewsProviderProps.rtl,
|
|
64
|
+
showFooterButtons = pageViewsProviderProps.showFooterButtons,
|
|
65
|
+
rest = _objectWithoutProperties(pageViewsProviderProps, _excluded);
|
|
57
66
|
var uniqueId = (0, _react.useId)();
|
|
58
67
|
var totalIndex = _react.Children.count(children);
|
|
59
68
|
var _useToggleRole = (0, _Panels.useToggleRole)(),
|
|
@@ -65,8 +74,42 @@ function PageViewsRouter(Wrapped) {
|
|
|
65
74
|
var ref = (0, _useChainRefs["default"])(autoFocusRef, a11yRef, componentRef);
|
|
66
75
|
var _useReverseTransition = useReverseTransition(index, rtl),
|
|
67
76
|
reverseTransition = _useReverseTransition.reverseTransition;
|
|
77
|
+
var navigationSource = (0, _react.useRef)(null); // 'internal-next' | 'internal-prev' | 'footer' | null
|
|
78
|
+
|
|
79
|
+
(0, _react.useEffect)(function () {
|
|
80
|
+
if (showFooterButtons && !bannerMode) {
|
|
81
|
+
_spotlight["default"].focus(spotlightId, {
|
|
82
|
+
enterTo: 'default-element'
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}, [bannerMode, showFooterButtons, spotlightId]);
|
|
86
|
+
var handleNextClick = (0, _react.useCallback)(function (ev) {
|
|
87
|
+
navigationSource.current = 'internal-next';
|
|
88
|
+
onNextClick === null || onNextClick === void 0 || onNextClick(ev);
|
|
89
|
+
}, [onNextClick]);
|
|
90
|
+
var handlePrevClick = (0, _react.useCallback)(function (ev) {
|
|
91
|
+
navigationSource.current = 'internal-prev';
|
|
92
|
+
onPrevClick === null || onPrevClick === void 0 || onPrevClick(ev);
|
|
93
|
+
}, [onPrevClick]);
|
|
94
|
+
var handleFooterNextClick = (0, _react.useCallback)(function (ev) {
|
|
95
|
+
navigationSource.current = 'footer';
|
|
96
|
+
onFooterNextClick === null || onFooterNextClick === void 0 || onFooterNextClick(ev);
|
|
97
|
+
}, [onFooterNextClick]);
|
|
98
|
+
var handleTransition = (0, _react.useCallback)(function (ev) {
|
|
99
|
+
if (showFooterButtons && !bannerMode) {
|
|
100
|
+
var source = navigationSource.current;
|
|
101
|
+
var newIndex = ev.index;
|
|
102
|
+
if (source === 'footer' || source === 'internal-next' && newIndex === totalIndex - 1 || source === 'internal-prev' && newIndex === 0) {
|
|
103
|
+
_spotlight["default"].focus(spotlightId, {
|
|
104
|
+
enterTo: 'default-element'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
navigationSource.current = null;
|
|
109
|
+
onTransition === null || onTransition === void 0 || onTransition(ev);
|
|
110
|
+
}, [bannerMode, onTransition, showFooterButtons, spotlightId, totalIndex]);
|
|
68
111
|
var _useFocusOnTransition = (0, _Panels.useFocusOnTransition)({
|
|
69
|
-
onTransition:
|
|
112
|
+
onTransition: handleTransition,
|
|
70
113
|
onWillTransition: onWillTransition,
|
|
71
114
|
spotlightId: spotlightId
|
|
72
115
|
}),
|
|
@@ -82,18 +125,24 @@ function PageViewsRouter(Wrapped) {
|
|
|
82
125
|
};
|
|
83
126
|
}, []);
|
|
84
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread(_objectSpread(_objectSpread({}, rest), transition), {}, {
|
|
128
|
+
bannerMode: bannerMode,
|
|
85
129
|
componentRef: ref,
|
|
86
130
|
"data-spotlight-id": spotlightId,
|
|
87
131
|
index: index,
|
|
88
|
-
|
|
132
|
+
onFooterCloseClick: onFooterCloseClick,
|
|
133
|
+
onFooterNextClick: handleFooterNextClick,
|
|
134
|
+
onNextClick: handleNextClick,
|
|
135
|
+
onPrevClick: handlePrevClick,
|
|
89
136
|
onWillTransition: handleWillTransition,
|
|
90
137
|
reverseTransition: reverseTransition,
|
|
91
138
|
rtl: rtl,
|
|
139
|
+
showFooterButtons: showFooterButtons,
|
|
140
|
+
totalIndex: totalIndex,
|
|
92
141
|
uniqueId: uniqueId,
|
|
93
142
|
children: children
|
|
94
143
|
}));
|
|
95
144
|
};
|
|
96
|
-
|
|
145
|
+
_PageViewsProvider.propTypes = /** @lends limestone/PageViews.PageViewsRouter.prototype */{
|
|
97
146
|
/**
|
|
98
147
|
* Sets the strategy used to automatically focus an element within the PageViews upon render.
|
|
99
148
|
* When set to 'none', focus is not set only on the first render.
|
|
@@ -111,19 +160,19 @@ function PageViewsRouter(Wrapped) {
|
|
|
111
160
|
*/
|
|
112
161
|
componentRef: _propTypes["default"].ref,
|
|
113
162
|
/**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
163
|
+
* The spotlight id for the panel.
|
|
164
|
+
*
|
|
165
|
+
* @type {String}
|
|
166
|
+
* @private
|
|
167
|
+
*/
|
|
119
168
|
'data-spotlight-id': _propTypes2["default"].string,
|
|
120
169
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
170
|
+
* The currently selected step.
|
|
171
|
+
*
|
|
172
|
+
* @type {Number}
|
|
173
|
+
* @default 0
|
|
174
|
+
* @private
|
|
175
|
+
*/
|
|
127
176
|
index: _propTypes2["default"].number,
|
|
128
177
|
/**
|
|
129
178
|
* Disables panel transitions.
|
|
@@ -133,18 +182,18 @@ function PageViewsRouter(Wrapped) {
|
|
|
133
182
|
*/
|
|
134
183
|
noAnimation: _propTypes2["default"].bool,
|
|
135
184
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
185
|
+
* Called when a transition completes.
|
|
186
|
+
*
|
|
187
|
+
* @type {Function}
|
|
188
|
+
* @private
|
|
189
|
+
*/
|
|
141
190
|
onTransition: _propTypes2["default"].func,
|
|
142
191
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
192
|
+
* Called when a transition begins.
|
|
193
|
+
*
|
|
194
|
+
* @type {Function}
|
|
195
|
+
* @private
|
|
196
|
+
*/
|
|
148
197
|
onWillTransition: _propTypes2["default"].func,
|
|
149
198
|
/**
|
|
150
199
|
* Used to determine the transition direction.
|
|
@@ -154,6 +203,6 @@ function PageViewsRouter(Wrapped) {
|
|
|
154
203
|
*/
|
|
155
204
|
rtl: _propTypes2["default"].bool
|
|
156
205
|
};
|
|
157
|
-
return
|
|
206
|
+
return _PageViewsProvider;
|
|
158
207
|
}
|
|
159
208
|
var _default = exports["default"] = PageViewsRouter;
|
|
@@ -273,4 +273,91 @@ describe('PageViews Specs', function () {
|
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
}));
|
|
276
|
+
test('should render footer Close and Next buttons when `showFooterButtons` is true', function () {
|
|
277
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
278
|
+
showFooterButtons: true,
|
|
279
|
+
index: 0,
|
|
280
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
281
|
+
}));
|
|
282
|
+
expect(_react.screen.getByText('Close')).toBeInTheDocument();
|
|
283
|
+
expect(_react.screen.getByText('Next')).toBeInTheDocument();
|
|
284
|
+
});
|
|
285
|
+
test('should not render footer Next button on the last page', function () {
|
|
286
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
287
|
+
showFooterButtons: true,
|
|
288
|
+
index: 1,
|
|
289
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
290
|
+
}));
|
|
291
|
+
expect(_react.screen.getByText('Close')).toBeInTheDocument();
|
|
292
|
+
expect(_react.screen.queryByText('Next')).toBeNull();
|
|
293
|
+
});
|
|
294
|
+
test('should not render footer buttons when `bannerMode` is true', function () {
|
|
295
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
296
|
+
showFooterButtons: true,
|
|
297
|
+
bannerMode: true,
|
|
298
|
+
index: 0,
|
|
299
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
300
|
+
}));
|
|
301
|
+
expect(_react.screen.queryByText('Close')).toBeNull();
|
|
302
|
+
});
|
|
303
|
+
test('should fire `onFooterNextClick`, `onChange`, and `onTransition` when footer Next button is clicked', /*#__PURE__*/_asyncToGenerator(function* () {
|
|
304
|
+
var handleChange = jest.fn();
|
|
305
|
+
var handleFooterNextClick = jest.fn();
|
|
306
|
+
var spy = jest.fn();
|
|
307
|
+
var user = _userEvent["default"].setup();
|
|
308
|
+
var index = 0;
|
|
309
|
+
var _render3 = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
310
|
+
showFooterButtons: true,
|
|
311
|
+
index: index,
|
|
312
|
+
onChange: handleChange,
|
|
313
|
+
onFooterNextClick: handleFooterNextClick,
|
|
314
|
+
onTransition: spy,
|
|
315
|
+
noAnimation: true,
|
|
316
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
317
|
+
})),
|
|
318
|
+
rerender = _render3.rerender;
|
|
319
|
+
yield user.click(_react.screen.getByText('Next'));
|
|
320
|
+
yield (0, _react.waitFor)(function () {
|
|
321
|
+
expect(handleChange).toHaveBeenCalledWith({
|
|
322
|
+
index: 1,
|
|
323
|
+
type: 'onChange'
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
yield (0, _react.waitFor)(function () {
|
|
327
|
+
expect(handleFooterNextClick).toHaveBeenCalled();
|
|
328
|
+
});
|
|
329
|
+
spy.mockClear();
|
|
330
|
+
index++;
|
|
331
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
332
|
+
showFooterButtons: true,
|
|
333
|
+
index: index,
|
|
334
|
+
onChange: handleChange,
|
|
335
|
+
onFooterNextClick: handleFooterNextClick,
|
|
336
|
+
onTransition: spy,
|
|
337
|
+
noAnimation: true,
|
|
338
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
339
|
+
}));
|
|
340
|
+
var expected = {
|
|
341
|
+
index: index,
|
|
342
|
+
type: 'onTransition'
|
|
343
|
+
};
|
|
344
|
+
var actual = spy.mock.calls.length && spy.mock.calls[0][0];
|
|
345
|
+
yield (0, _react.waitFor)(function () {
|
|
346
|
+
expect(actual).toMatchObject(expected);
|
|
347
|
+
});
|
|
348
|
+
}));
|
|
349
|
+
test('should fire `onFooterCloseClick` when footer Close button is clicked', /*#__PURE__*/_asyncToGenerator(function* () {
|
|
350
|
+
var handleFooterCloseClick = jest.fn();
|
|
351
|
+
var user = _userEvent["default"].setup();
|
|
352
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.PageViews, {
|
|
353
|
+
showFooterButtons: true,
|
|
354
|
+
index: 0,
|
|
355
|
+
onFooterCloseClick: handleFooterCloseClick,
|
|
356
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Page, {})]
|
|
357
|
+
}));
|
|
358
|
+
yield user.click(_react.screen.getByText('Close'));
|
|
359
|
+
yield (0, _react.waitFor)(function () {
|
|
360
|
+
expect(handleFooterCloseClick).toHaveBeenCalled();
|
|
361
|
+
});
|
|
362
|
+
}));
|
|
276
363
|
});
|
package/Panels/Header.js
CHANGED
|
@@ -7,7 +7,8 @@ exports["default"] = exports.HeaderBase = exports.Header = void 0;
|
|
|
7
7
|
var _handle = require("@enact/core/handle");
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
9
9
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
10
|
-
var _util = require("@enact/
|
|
10
|
+
var _util = require("@enact/core/util");
|
|
11
|
+
var _util2 = require("@enact/i18n/util");
|
|
11
12
|
var _SpotlightContainerDecorator = _interopRequireDefault(require("@enact/spotlight/SpotlightContainerDecorator"));
|
|
12
13
|
var _Layout = require("@enact/ui/Layout");
|
|
13
14
|
var _resolution = require("@enact/ui/resolution");
|
|
@@ -20,7 +21,7 @@ var _Button = _interopRequireDefault(require("../Button"));
|
|
|
20
21
|
var _Heading = _interopRequireDefault(require("../Heading"));
|
|
21
22
|
var _$L = _interopRequireDefault(require("../internal/$L"));
|
|
22
23
|
var _Panels = require("../internal/Panels");
|
|
23
|
-
var
|
|
24
|
+
var _util3 = require("../internal/Panels/util");
|
|
24
25
|
var _PopupTabLayoutStateContext = require("../PopupTabLayout/PopupTabLayoutStateContext");
|
|
25
26
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
26
27
|
var _HeaderModule = _interopRequireDefault(require("./Header.module.css"));
|
|
@@ -375,7 +376,7 @@ var HeaderBase = exports.HeaderBase = (0, _kind["default"])({
|
|
|
375
376
|
title = _ref2.title,
|
|
376
377
|
titleId = _ref2.titleId,
|
|
377
378
|
type = _ref2.type;
|
|
378
|
-
var direction = (0,
|
|
379
|
+
var direction = (0, _util2.isRtlText)(title) || (0, _util2.isRtlText)(subtitle) ? 'rtl' : 'ltr';
|
|
379
380
|
var titleHeading = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], _objectSpread(_objectSpread({}, centered ? {
|
|
380
381
|
slotSize: slotSize
|
|
381
382
|
} : {}), {}, {
|
|
@@ -530,7 +531,8 @@ var ContextAsDefaultsHeader = function ContextAsDefaultsHeader(Wrapped) {
|
|
|
530
531
|
// eslint-disable-next-line no-shadow
|
|
531
532
|
function ContextAsDefaultsHeader(props) {
|
|
532
533
|
var _ref4;
|
|
533
|
-
|
|
534
|
+
(0, _util.checkPropTypes)(ContextAsDefaultsHeader, props);
|
|
535
|
+
var _useContextAsDefaults = (0, _util3.useContextAsDefaults)(props),
|
|
534
536
|
contextProps = _useContextAsDefaults.contextProps,
|
|
535
537
|
provideContextAsDefaults = _useContextAsDefaults.provideContextAsDefaults;
|
|
536
538
|
var _use = (0, _react.use)(_Panels.PanelsStateContext),
|
package/Panels/Header.module.css
CHANGED
|
@@ -17,25 +17,6 @@
|
|
|
17
17
|
.header .titlesRow .back {
|
|
18
18
|
margin-inline-start: 0;
|
|
19
19
|
}
|
|
20
|
-
.header .titlesRow .back:global(.largeText) {
|
|
21
|
-
font-family: "Limestone";
|
|
22
|
-
font-size: var(--primitive-font-size-60);
|
|
23
|
-
font-style: normal;
|
|
24
|
-
font-weight: var(--primitive-font-weight-semibold);
|
|
25
|
-
font-kerning: normal;
|
|
26
|
-
height: 2.75rem;
|
|
27
|
-
line-height: 2.5rem;
|
|
28
|
-
min-width: 2.75rem;
|
|
29
|
-
}
|
|
30
|
-
:global(.enact-locale-non-latin) .header .titlesRow .back:global(.largeText) {
|
|
31
|
-
font-family: "Limestone";
|
|
32
|
-
}
|
|
33
|
-
:global(.enact-locale-non-latin) .header .titlesRow .back:global(.largeText) {
|
|
34
|
-
font-family: "Limestone";
|
|
35
|
-
font-size: var(--primitive-font-size-54);
|
|
36
|
-
font-style: normal;
|
|
37
|
-
font-weight: var(--primitive-font-weight-bold);
|
|
38
|
-
}
|
|
39
20
|
.header .titlesRow .close {
|
|
40
21
|
margin-inline-end: 0;
|
|
41
22
|
}
|
|
@@ -103,6 +84,12 @@
|
|
|
103
84
|
.header.centered:not(.isPopupHeader) .slotBelow {
|
|
104
85
|
text-align: center;
|
|
105
86
|
}
|
|
87
|
+
.header.centered:not(.isPopupHeader).mini .title {
|
|
88
|
+
margin-top: calc(abs(-18px) / 2);
|
|
89
|
+
}
|
|
90
|
+
:global(.enact-orientation-portrait) .header.centered:not(.isPopupHeader).standard .title {
|
|
91
|
+
margin-top: calc(abs(-18px) / -2);
|
|
92
|
+
}
|
|
106
93
|
.header .title {
|
|
107
94
|
margin: 0;
|
|
108
95
|
}
|
|
@@ -127,25 +114,21 @@
|
|
|
127
114
|
margin: var(--primitive-spacing-18) calc(var(--primitive-spacing-36) * -1) 0 calc(var(--primitive-spacing-36) * -1);
|
|
128
115
|
}
|
|
129
116
|
.header.standard.slotBefore:not(.centered) .slotBefore,
|
|
130
|
-
.header.mini.slotBefore:not(.centered) .slotBefore,
|
|
131
117
|
.header.wizard.slotBefore:not(.centered) .slotBefore {
|
|
132
118
|
margin-left: 0;
|
|
133
119
|
margin-right: var(--primitive-spacing-36);
|
|
134
120
|
}
|
|
135
121
|
:global(.enact-locale-right-to-left) .header.standard.slotBefore:not(.centered) .slotBefore,
|
|
136
|
-
:global(.enact-locale-right-to-left) .header.mini.slotBefore:not(.centered) .slotBefore,
|
|
137
122
|
:global(.enact-locale-right-to-left) .header.wizard.slotBefore:not(.centered) .slotBefore {
|
|
138
123
|
margin-left: var(--primitive-spacing-36);
|
|
139
124
|
margin-right: 0;
|
|
140
125
|
}
|
|
141
126
|
.header.standard.slotAfter:not(.centered) .slotAfter,
|
|
142
|
-
.header.mini.slotAfter:not(.centered) .slotAfter,
|
|
143
127
|
.header.wizard.slotAfter:not(.centered) .slotAfter {
|
|
144
128
|
margin-left: var(--primitive-spacing-36);
|
|
145
129
|
margin-right: 0;
|
|
146
130
|
}
|
|
147
131
|
:global(.enact-locale-right-to-left) .header.standard.slotAfter:not(.centered) .slotAfter,
|
|
148
|
-
:global(.enact-locale-right-to-left) .header.mini.slotAfter:not(.centered) .slotAfter,
|
|
149
132
|
:global(.enact-locale-right-to-left) .header.wizard.slotAfter:not(.centered) .slotAfter {
|
|
150
133
|
margin-left: 0;
|
|
151
134
|
margin-right: var(--primitive-spacing-36);
|
|
@@ -185,21 +168,21 @@
|
|
|
185
168
|
:global(.enact-locale-non-latin) .header.compact .title {
|
|
186
169
|
font-size: 1.875rem;
|
|
187
170
|
}
|
|
188
|
-
.header.compact.slotBefore
|
|
171
|
+
.header.compact.slotBefore .slotBefore {
|
|
189
172
|
margin-left: 0;
|
|
190
|
-
margin-right: var(--primitive-spacing-
|
|
173
|
+
margin-right: var(--primitive-spacing-12);
|
|
191
174
|
}
|
|
192
|
-
:global(.enact-locale-right-to-left) .header.compact.slotBefore
|
|
193
|
-
margin-left: var(--primitive-spacing-
|
|
175
|
+
:global(.enact-locale-right-to-left) .header.compact.slotBefore .slotBefore {
|
|
176
|
+
margin-left: var(--primitive-spacing-12);
|
|
194
177
|
margin-right: 0;
|
|
195
178
|
}
|
|
196
|
-
.header.compact.slotAfter
|
|
197
|
-
margin-left: var(--primitive-spacing-
|
|
179
|
+
.header.compact.slotAfter .slotAfter {
|
|
180
|
+
margin-left: var(--primitive-spacing-12);
|
|
198
181
|
margin-right: 0;
|
|
199
182
|
}
|
|
200
|
-
:global(.enact-locale-right-to-left) .header.compact.slotAfter
|
|
183
|
+
:global(.enact-locale-right-to-left) .header.compact.slotAfter .slotAfter {
|
|
201
184
|
margin-left: 0;
|
|
202
|
-
margin-right: var(--primitive-spacing-
|
|
185
|
+
margin-right: var(--primitive-spacing-12);
|
|
203
186
|
}
|
|
204
187
|
.header.compact.isPopupHeader.slotAfter {
|
|
205
188
|
padding-left: 1.25rem;
|
|
@@ -234,6 +217,10 @@
|
|
|
234
217
|
.header.wizard.centered .subtitle {
|
|
235
218
|
text-align: center;
|
|
236
219
|
}
|
|
220
|
+
:global(.enact-orientation-portrait) .header.wizard.slotBefore .slotBefore,
|
|
221
|
+
:global(.enact-orientation-portrait) .header.wizard.slotAfter .slotAfter {
|
|
222
|
+
margin-top: NaNrem + -18px) * -1);
|
|
223
|
+
}
|
|
237
224
|
.header.mini {
|
|
238
225
|
margin: 0 0 0.75rem 0;
|
|
239
226
|
padding: 0.86458rem 1.25rem 0.55208rem 1.25rem;
|
|
@@ -250,6 +237,25 @@
|
|
|
250
237
|
:global(.enact-locale-non-latin) .header.mini .title {
|
|
251
238
|
font-size: 1.875rem;
|
|
252
239
|
}
|
|
240
|
+
.header.mini .title:not(.isPopupHeader) {
|
|
241
|
+
margin-top: calc(abs(-18px) / 2);
|
|
242
|
+
}
|
|
243
|
+
.header.mini.slotBefore .slotBefore {
|
|
244
|
+
margin-left: 0;
|
|
245
|
+
margin-right: var(--primitive-spacing-12);
|
|
246
|
+
}
|
|
247
|
+
:global(.enact-locale-right-to-left) .header.mini.slotBefore .slotBefore {
|
|
248
|
+
margin-left: var(--primitive-spacing-12);
|
|
249
|
+
margin-right: 0;
|
|
250
|
+
}
|
|
251
|
+
.header.mini.slotAfter .slotAfter {
|
|
252
|
+
margin-left: var(--primitive-spacing-12);
|
|
253
|
+
margin-right: 0;
|
|
254
|
+
}
|
|
255
|
+
:global(.enact-locale-right-to-left) .header.mini.slotAfter .slotAfter {
|
|
256
|
+
margin-left: 0;
|
|
257
|
+
margin-right: var(--primitive-spacing-12);
|
|
258
|
+
}
|
|
253
259
|
.header.mini.withSubtitle:not(.noSubtitle) .titlesRow {
|
|
254
260
|
padding-bottom: 70.2px;
|
|
255
261
|
}
|
package/Popup/Popup.js
CHANGED
|
@@ -320,7 +320,8 @@ var popupDefaultProps = {
|
|
|
320
320
|
* @ui
|
|
321
321
|
* @public
|
|
322
322
|
*/
|
|
323
|
-
var
|
|
323
|
+
var _Popup = exports.Popup = function Popup(props) {
|
|
324
|
+
(0, _util.checkPropTypes)(_Popup, props);
|
|
324
325
|
var componentProps = (0, _util.setDefaultProps)(props, popupDefaultProps);
|
|
325
326
|
var noAnimation = componentProps.noAnimation,
|
|
326
327
|
noAutoDismiss = componentProps.noAutoDismiss,
|
|
@@ -564,8 +565,8 @@ var Popup = exports.Popup = function Popup(props) {
|
|
|
564
565
|
}))
|
|
565
566
|
});
|
|
566
567
|
};
|
|
567
|
-
|
|
568
|
-
|
|
568
|
+
_Popup.displayName = 'Popup';
|
|
569
|
+
_Popup.propTypes = /** @lends limestone/Popup.Popup.prototype */{
|
|
569
570
|
/**
|
|
570
571
|
* Prevents closing the popup via 5-way navigation out of the content.
|
|
571
572
|
*
|
|
@@ -689,4 +690,4 @@ Popup.propTypes = /** @lends limestone/Popup.Popup.prototype */{
|
|
|
689
690
|
*/
|
|
690
691
|
spotlightRestrict: _propTypes["default"].oneOf(['self-first', 'self-only'])
|
|
691
692
|
};
|
|
692
|
-
var _default = exports["default"] =
|
|
693
|
+
var _default = exports["default"] = _Popup;
|
|
@@ -527,9 +527,10 @@ var tabPanelsHandlers = {
|
|
|
527
527
|
* @ui
|
|
528
528
|
* @public
|
|
529
529
|
*/
|
|
530
|
-
var
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
var _TabPanelsBase = exports.TabPanelsBase = function TabPanelsBase(props) {
|
|
531
|
+
(0, _util.checkPropTypes)(_TabPanelsBase, props);
|
|
532
|
+
var rtl = props.rtl,
|
|
533
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
533
534
|
var onTransition = (0, _react.use)(_TabLayout.TabLayoutContext);
|
|
534
535
|
var handlers = (0, _useHandlers["default"])(tabPanelsHandlers, _objectSpread({
|
|
535
536
|
rtl: rtl
|
|
@@ -542,7 +543,7 @@ var TabPanelsBase = exports.TabPanelsBase = function TabPanelsBase(_ref9) {
|
|
|
542
543
|
css: _PopupTabLayoutModule["default"]
|
|
543
544
|
}, handlers));
|
|
544
545
|
};
|
|
545
|
-
|
|
546
|
+
_TabPanelsBase.propTypes = {
|
|
546
547
|
rtl: _propTypes["default"].bool
|
|
547
548
|
};
|
|
548
549
|
|
|
@@ -557,7 +558,7 @@ TabPanelsBase.propTypes = {
|
|
|
557
558
|
*/
|
|
558
559
|
var TabPanels = exports.TabPanels = (0, _I18nDecorator.I18nContextDecorator)({
|
|
559
560
|
rtlProp: 'rtl'
|
|
560
|
-
},
|
|
561
|
+
}, _TabPanelsBase);
|
|
561
562
|
|
|
562
563
|
/**
|
|
563
564
|
* Omits the close button.
|
|
@@ -585,9 +586,10 @@ var TabPanels = exports.TabPanels = (0, _I18nDecorator.I18nContextDecorator)({
|
|
|
585
586
|
* @ui
|
|
586
587
|
* @public
|
|
587
588
|
*/
|
|
588
|
-
var
|
|
589
|
-
|
|
590
|
-
|
|
589
|
+
var _TabPanel = exports.TabPanel = function TabPanel(props) {
|
|
590
|
+
(0, _util.checkPropTypes)(_TabPanel, props);
|
|
591
|
+
var spotlightId = props.spotlightId,
|
|
592
|
+
rest = _objectWithoutProperties(props, _excluded3);
|
|
591
593
|
(0, _react.useEffect)(function () {
|
|
592
594
|
_spotlight["default"].set(spotlightId, {
|
|
593
595
|
partition: true
|
|
@@ -599,7 +601,7 @@ var TabPanel = exports.TabPanel = function TabPanel(_ref0) {
|
|
|
599
601
|
spotlightId: spotlightId
|
|
600
602
|
}));
|
|
601
603
|
};
|
|
602
|
-
|
|
604
|
+
_TabPanel.propTypes = {
|
|
603
605
|
/**
|
|
604
606
|
* The container id for {@link spotlight/SpotlightContainerDecorator/#SpotlightContainerDecorator.spotlightId|Spotlight container}.
|
|
605
607
|
*
|
|
@@ -64,6 +64,9 @@
|
|
|
64
64
|
.popupTabLayout:global(.neutral) .tabGroup .tab .icon {
|
|
65
65
|
--icon-size: 2rem;
|
|
66
66
|
}
|
|
67
|
+
.popupTabLayout:global(.neutral) .tabGroup .tab:global(.largeText) .icon {
|
|
68
|
+
--icon-size: 2.4rem;
|
|
69
|
+
}
|
|
67
70
|
:global(.noAnimation) .popupTabLayout:global(.neutral) .tabs,
|
|
68
71
|
:global(.noAnimation) .popupTabLayout:global(.neutral) .content .panels::before {
|
|
69
72
|
box-shadow: none;
|
|
@@ -92,6 +95,9 @@
|
|
|
92
95
|
:global(.enact-a11y-high-contrast) .popupTabLayout:global(.neutral):global(.highContrast) .tabGroup .tab .icon {
|
|
93
96
|
--icon-size: 2rem;
|
|
94
97
|
}
|
|
98
|
+
:global(.enact-a11y-high-contrast) .popupTabLayout:global(.neutral):global(.highContrast) .tabGroup .tab:global(.largeText) .icon {
|
|
99
|
+
--icon-size: 2.4rem;
|
|
100
|
+
}
|
|
95
101
|
:global(.noAnimation) :global(.enact-a11y-high-contrast) .popupTabLayout:global(.neutral):global(.highContrast) .tabs,
|
|
96
102
|
:global(.noAnimation) :global(.enact-a11y-high-contrast) .popupTabLayout:global(.neutral):global(.highContrast) .content .panels::before {
|
|
97
103
|
box-shadow: none;
|
|
@@ -120,6 +126,9 @@
|
|
|
120
126
|
.popupTabLayout:global(.light) .tabGroup .tab .icon {
|
|
121
127
|
--icon-size: 2rem;
|
|
122
128
|
}
|
|
129
|
+
.popupTabLayout:global(.light) .tabGroup .tab:global(.largeText) .icon {
|
|
130
|
+
--icon-size: 2.4rem;
|
|
131
|
+
}
|
|
123
132
|
:global(.noAnimation) .popupTabLayout:global(.light) .tabs,
|
|
124
133
|
:global(.noAnimation) .popupTabLayout:global(.light) .content .panels::before {
|
|
125
134
|
box-shadow: none;
|
|
@@ -151,6 +160,9 @@
|
|
|
151
160
|
.popupTabLayout:global(.game) .tabGroup .tab .icon {
|
|
152
161
|
--icon-size: 2rem;
|
|
153
162
|
}
|
|
163
|
+
.popupTabLayout:global(.game) .tabGroup .tab:global(.largeText) .icon {
|
|
164
|
+
--icon-size: 2.4rem;
|
|
165
|
+
}
|
|
154
166
|
:global(.noAnimation) .popupTabLayout:global(.game) .tabs,
|
|
155
167
|
:global(.noAnimation) .popupTabLayout:global(.game) .content .panels::before {
|
|
156
168
|
box-shadow: none;
|
|
@@ -181,6 +193,9 @@
|
|
|
181
193
|
:global(.green) .popupTabLayout:global(.game) .tabGroup .tab .icon {
|
|
182
194
|
--icon-size: 2rem;
|
|
183
195
|
}
|
|
196
|
+
:global(.green) .popupTabLayout:global(.game) .tabGroup .tab:global(.largeText) .icon {
|
|
197
|
+
--icon-size: 2.4rem;
|
|
198
|
+
}
|
|
184
199
|
:global(.noAnimation) :global(.green) .popupTabLayout:global(.game) .tabs,
|
|
185
200
|
:global(.noAnimation) :global(.green) .popupTabLayout:global(.game) .content .panels::before {
|
|
186
201
|
box-shadow: none;
|
|
@@ -211,6 +226,9 @@
|
|
|
211
226
|
:global(.orange) .popupTabLayout:global(.game) .tabGroup .tab .icon {
|
|
212
227
|
--icon-size: 2rem;
|
|
213
228
|
}
|
|
229
|
+
:global(.orange) .popupTabLayout:global(.game) .tabGroup .tab:global(.largeText) .icon {
|
|
230
|
+
--icon-size: 2.4rem;
|
|
231
|
+
}
|
|
214
232
|
:global(.noAnimation) :global(.orange) .popupTabLayout:global(.game) .tabs,
|
|
215
233
|
:global(.noAnimation) :global(.orange) .popupTabLayout:global(.game) .content .panels::before {
|
|
216
234
|
box-shadow: none;
|
package/RadioItem/RadioItem.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.RadioItemGroup = exports.RadioItemDecorator = exports.RadioItemBase = exports.RadioItem = void 0;
|
|
7
7
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
8
|
+
var _util = require("@enact/core/util");
|
|
8
9
|
var _Group = _interopRequireDefault(require("@enact/ui/Group"));
|
|
9
10
|
var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
|
|
10
11
|
var _Slottable = _interopRequireDefault(require("@enact/ui/Slottable"));
|
|
@@ -161,16 +162,13 @@ var RadioItem = exports.RadioItem = (0, _Pure["default"])(RadioItemDecorator(Rad
|
|
|
161
162
|
* @public
|
|
162
163
|
*/
|
|
163
164
|
var _RadioItemGroup = exports.RadioItemGroup = function RadioItemGroup(props) {
|
|
165
|
+
(0, _util.checkPropTypes)(_RadioItemGroup, props);
|
|
164
166
|
var children = props.children,
|
|
165
167
|
groupId = props.groupId,
|
|
166
168
|
itemProps = props.itemProps,
|
|
167
169
|
rest = _objectWithoutProperties(props, _excluded2);
|
|
168
|
-
_RadioItemGroup.propTypes = {
|
|
169
|
-
groupId: _propTypes["default"].string,
|
|
170
|
-
itemProps: _propTypes["default"].object
|
|
171
|
-
};
|
|
172
170
|
if (typeof children[0] === 'string') {
|
|
173
|
-
// The case of multiple radio items are represented by string array instead of `RadioItem`
|
|
171
|
+
// The case of multiple radio items are represented by string array instead of `RadioItem` components using `ui/Group`
|
|
174
172
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
175
173
|
role: "region",
|
|
176
174
|
"aria-labelledby": groupId || "radioItemGroup",
|
|
@@ -208,4 +206,8 @@ var _RadioItemGroup = exports.RadioItemGroup = function RadioItemGroup(props) {
|
|
|
208
206
|
});
|
|
209
207
|
}
|
|
210
208
|
};
|
|
209
|
+
_RadioItemGroup.propTypes = {
|
|
210
|
+
groupId: _propTypes["default"].string,
|
|
211
|
+
itemProps: _propTypes["default"].object
|
|
212
|
+
};
|
|
211
213
|
var _default = exports["default"] = RadioItem;
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
.radioItem .icon {
|
|
8
8
|
border-radius: var(--semantic-radius-full);
|
|
9
9
|
font-size: var(--primitive-font-size-48);
|
|
10
|
+
--icon-size: 1.25rem;
|
|
11
|
+
}
|
|
12
|
+
.radioItem .icon:global(.largeText) {
|
|
13
|
+
font-size: var(--primitive-font-size-56);
|
|
14
|
+
--icon-size: 1.5rem;
|
|
10
15
|
}
|
|
11
16
|
.radioItem:global(.neutral) .icon {
|
|
12
17
|
color: transparent;
|