@enact/limestone 1.3.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci-branch.yml +21 -0
- package/.github/workflows/ci-pull-request.yml +16 -0
- package/.github/workflows/ci-reusable.yml +73 -0
- package/ActionGuide/ActionGuide.d.ts +5 -4
- package/ActionGuide/ActionGuide.module.css +1 -1
- package/Alert/Alert.d.ts +13 -2
- package/Alert/Alert.js +39 -5
- package/Alert/Alert.module.css +48 -1
- package/Alert/tests/Alert-specs.js +91 -0
- package/BodyText/BodyText.d.ts +5 -4
- package/BodyText/BodyText.module.css +7 -7
- package/Button/Button.d.ts +17 -12
- package/Button/Button.js +1 -1
- package/Button/Button.module.css +195 -268
- package/Button/tests/Button-specs.js +26 -0
- package/CHANGELOG.md +254 -0
- package/Card/Card.d.ts +40 -12
- package/Card/Card.js +164 -28
- package/Card/Card.module.css +277 -58
- package/Card/tests/Card-specs.js +67 -3
- package/Checkbox/Checkbox.d.ts +8 -7
- package/Checkbox/Checkbox.js +3 -1
- package/Checkbox/Checkbox.module.css +213 -120
- package/Checkbox/tests/Checkbox-specs.js +1 -1
- package/CheckboxItem/CheckboxItem.d.ts +22 -7
- package/CheckboxItem/CheckboxItem.js +71 -4
- package/Chips/Chip.js +72 -13
- package/Chips/Chip.module.css +3 -3
- package/Chips/Chips.js +37 -17
- package/Chips/Chips.module.css +1 -1
- package/Chips/tests/Chip-specs.js +43 -13
- package/Chips/tests/Chips-specs.js +31 -21
- package/ColorPicker/ColorPicker.js +27 -25
- package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
- package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +567 -549
- package/DatePicker/DatePicker.d.ts +4 -5
- package/DayPicker/DayPicker.d.ts +8 -7
- package/DayPicker/DaySelectorDecorator.js +12 -7
- package/Dropdown/Dropdown.d.ts +11 -13
- package/Dropdown/Dropdown.module.css +13 -9
- package/Dropdown/DropdownList.js +80 -54
- package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
- package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
- package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
- package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
- package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
- package/Heading/Heading.d.ts +9 -8
- package/Heading/Heading.js +2 -2
- package/Heading/Heading.module.css +5 -5
- package/Icon/Icon.d.ts +15 -4
- package/Icon/Icon.js +49 -2
- package/Icon/Icon.module.css +1 -1
- package/Icon/IconList.js +27 -1
- package/IconItem/IconItem.d.ts +13 -12
- package/IconItem/IconItem.js +15 -0
- package/IconItem/IconItem.module.css +107 -1
- package/IconItem/tests/IconItem-specs.js +30 -1
- package/Image/Image.d.ts +5 -4
- package/Image/Image.js +6 -4
- package/ImageItem/ImageItem.d.ts +11 -10
- package/ImageItem/ImageItem.js +37 -31
- package/ImageItem/ImageItem.module.css +30 -30
- package/ImageItem/tests/ImageItem-specs.js +3 -10
- package/Input/Input.js +21 -3
- package/Input/Input.module.css +37 -8
- package/Input/InputField.js +79 -24
- package/Input/InputField.module.css +273 -41
- package/Input/InputFieldDecoratorIcon.js +1 -0
- package/Input/InputFieldSpotlightDecorator.js +257 -228
- package/Input/index.d.ts +120 -111
- package/Input/tests/Input-specs.js +26 -0
- package/Input/tests/InputField-specs.js +170 -3
- package/Input/tests/InputPopup-specs.js +1 -1
- package/Item/Item.d.ts +16 -9
- package/Item/Item.js +20 -2
- package/Item/Item.module.css +1 -1
- package/KeyGuide/KeyGuide.d.ts +8 -7
- package/KeyGuide/KeyGuide.js +29 -27
- package/KeyGuide/KeyGuide.module.css +25 -1
- package/Marquee/Marquee.d.ts +2 -4
- package/MediaOverlay/MediaOverlay.d.ts +12 -11
- package/MediaOverlay/MediaOverlay.js +43 -21
- package/MediaOverlay/MediaOverlay.module.css +114 -15
- package/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
- package/MediaPlayer/MediaControls.js +195 -13
- package/MediaPlayer/MediaControls.module.css +3 -2
- package/MediaPlayer/MediaSlider.module.css +7 -20
- package/MediaPlayer/index.d.ts +59 -7
- package/MediaPlayer/tests/util-specs.js +4 -1
- package/PageViews/PageViews.js +232 -82
- package/PageViews/PageViews.module.css +3 -0
- package/PageViews/PageViewsRouter.js +100 -42
- package/PageViews/tests/PageViews-specs.js +171 -0
- package/Panels/Header.js +54 -34
- package/Panels/Header.module.css +83 -31
- package/Panels/Panel.module.css +1 -1
- package/Panels/index.d.ts +7 -8
- package/Picker/Picker.d.ts +4 -5
- package/Picker/Picker.module.css +2 -2
- package/Popup/Popup.js +245 -242
- package/Popup/Popup.module.css +24 -24
- package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
- package/PopupTabLayout/PopupTabLayout.js +26 -18
- package/PopupTabLayout/PopupTabLayout.module.css +53 -16
- package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
- package/ProgressBar/ProgressBar.d.ts +5 -4
- package/ProgressBar/ProgressBarTooltip.module.css +12 -12
- package/ProgressButton/ProgressButton.d.ts +4 -5
- package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
- package/RadioItem/RadioItem.d.ts +18 -5
- package/RadioItem/RadioItem.js +69 -2
- package/RadioItem/RadioItem.module.css +36 -36
- package/RangePicker/RangePicker.module.css +2 -2
- package/Scroller/EditableWrapper.js +28 -18
- package/Scroller/Scroller.d.ts +20 -16
- package/Scroller/Scroller.js +20 -13
- package/Scroller/Scroller.module.css +4 -4
- package/Scroller/useThemeScroller.js +3 -3
- package/Slider/Slider.d.ts +20 -14
- package/Slider/Slider.js +71 -14
- package/Slider/Slider.module.css +464 -91
- package/Slider/SliderBehaviorDecorator.js +16 -14
- package/Slider/tests/Slider-specs.js +53 -1
- package/Slider/utils.js +23 -7
- package/Spinner/Spinner.d.ts +5 -4
- package/Spinner/Spinner.js +10 -8
- package/Spinner/Spinner.module.css +9 -9
- package/Steps/Steps.d.ts +5 -4
- package/Steps/Steps.js +9 -5
- package/Switch/Switch.d.ts +8 -7
- package/Switch/Switch.module.css +100 -13
- package/SwitchItem/SwitchItem.d.ts +9 -6
- package/TabLayout/RefocusDecorator.js +26 -18
- package/TabLayout/TabGroup.js +3 -2
- package/TabLayout/TabGroup.module.css +2 -2
- package/TabLayout/TabLayout.d.ts +6 -0
- package/TabLayout/TabLayout.js +11 -1
- package/TabLayout/TabLayout.module.css +18 -0
- package/TabLayout/tests/TabGroup-specs.js +1 -1
- package/TabLayout/tests/TabLayout-specs.js +52 -0
- package/ThemeDecorator/AccessibilityDecorator.js +12 -11
- package/ThemeDecorator/I18nFontDecorator.js +6 -4
- package/ThemeDecorator/ThemeDecorator.d.ts +16 -10
- package/ThemeDecorator/ThemeDecorator.js +24 -9
- package/ThemeDecorator/fontGenerator.js +1 -1
- package/ThemeDecorator/screenTypes.json +1 -0
- package/TimePicker/TimePicker.module.css +1 -1
- package/TimePicker/TimePickerBase.js +5 -3
- package/TooltipDecorator/Tooltip.module.css +1 -2
- package/TooltipDecorator/TooltipDecorator.js +12 -7
- package/TooltipDecorator/tests/useTooltip-specs.js +5 -2
- package/TooltipDecorator/tests/util-specs.js +12 -0
- package/TooltipDecorator/useTooltip.js +1 -1
- package/TooltipDecorator/util.js +18 -11
- package/VideoPlayer/Feedback.js +3 -0
- package/VideoPlayer/Feedback.module.css +5 -9
- package/VideoPlayer/FeedbackIcons.js +1 -1
- package/VideoPlayer/FeedbackTooltip.module.css +55 -11
- package/VideoPlayer/VideoPlayer.d.ts +44 -18
- package/VideoPlayer/VideoPlayer.js +153 -47
- package/VideoPlayer/VideoPlayer.module.css +28 -11
- package/VirtualList/VirtualList.d.ts +9 -2
- package/VirtualList/VirtualList.js +51 -24
- package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
- package/VirtualList/tests/VirtualList-specs.js +28 -1
- package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
- package/VirtualList/useSpotlight.js +1 -1
- package/WizardPanels/WizardPanels.module.css +2 -2
- package/WizardPanels/index.d.ts +4 -2
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/$L/$L.js +3 -3
- package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
- package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
- package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
- package/internal/DateTime/DateTime.module.css +1 -0
- package/internal/DateTime/DateTimeDecorator.js +5 -4
- package/internal/Panels/PanelsRouter.js +48 -31
- 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 +2 -2
- package/internal/Picker/SpottablePicker.js +15 -13
- package/internal/SharedStateDecorator/SharedStateDecorator.js +78 -99
- package/internal/validators/validators.js +21 -2
- package/package.json +18 -15
- package/styles/colors-highcontrast.less +9 -1
- package/styles/colors.less +12 -7
- package/styles/motion-mixins.less +66 -0
- package/styles/motions.less +78 -0
- package/styles/variables.less +176 -150
- package/useScroll/HoverToScroll.js +23 -17
- package/useScroll/Scrollbar.js +14 -10
- package/useScroll/ScrollbarPlaceholder.js +3 -5
- package/useScroll/ScrollbarTrack.js +7 -5
- package/useScroll/ScrollbarTrack.module.css +8 -8
- package/useScroll/useEvent.js +14 -3
- package/useScroll/useScroll.js +12 -2
- package/useScroll/useScroll.module.css +6 -6
- package/.travis.yml +0 -40
|
@@ -56,8 +56,9 @@ var SliderBehaviorDecorator = exports.SliderBehaviorDecorator = (0, _hoc["defaul
|
|
|
56
56
|
var emitSpotlightEvents = config.emitSpotlightEvents;
|
|
57
57
|
|
|
58
58
|
// eslint-disable-next-line no-shadow
|
|
59
|
-
var
|
|
59
|
+
var _SliderBehaviorDecorator = function SliderBehaviorDecorator(props) {
|
|
60
60
|
var sliderBehaviorProps = (0, _util.setDefaultProps)(props, sliderBehaviorDefaultProps);
|
|
61
|
+
(0, _util.checkPropTypes)(_SliderBehaviorDecorator, sliderBehaviorProps);
|
|
61
62
|
var paused = (0, _react.useMemo)(function () {
|
|
62
63
|
return new _Pause["default"]();
|
|
63
64
|
}, []);
|
|
@@ -81,12 +82,10 @@ var SliderBehaviorDecorator = exports.SliderBehaviorDecorator = (0, _hoc["defaul
|
|
|
81
82
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
82
83
|
prevValue = _useState0[0],
|
|
83
84
|
setPrevValue = _useState0[1];
|
|
84
|
-
(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}, [prevValue, sliderBehaviorProps.value]);
|
|
85
|
+
if (sliderBehaviorProps.value && sliderBehaviorProps.value !== prevValue) {
|
|
86
|
+
setUseHintText(false);
|
|
87
|
+
setPrevValue(sliderBehaviorProps.value);
|
|
88
|
+
}
|
|
90
89
|
(0, _react.useEffect)(function () {
|
|
91
90
|
return function () {
|
|
92
91
|
paused.resume();
|
|
@@ -95,19 +94,22 @@ var SliderBehaviorDecorator = exports.SliderBehaviorDecorator = (0, _hoc["defaul
|
|
|
95
94
|
|
|
96
95
|
var getValueText = (0, _react.useCallback)(function () {
|
|
97
96
|
var ariaValueText = sliderBehaviorProps['aria-valuetext'],
|
|
97
|
+
colorPicker = sliderBehaviorProps.colorPicker,
|
|
98
98
|
max = sliderBehaviorProps.max,
|
|
99
99
|
min = sliderBehaviorProps.min,
|
|
100
100
|
orientation = sliderBehaviorProps.orientation,
|
|
101
101
|
_sliderBehaviorProps$ = sliderBehaviorProps.value,
|
|
102
102
|
value = _sliderBehaviorProps$ === void 0 ? min : _sliderBehaviorProps$;
|
|
103
|
+
var sliderMax = colorPicker ? 360 : max;
|
|
104
|
+
var sliderMin = colorPicker ? 0 : min;
|
|
103
105
|
var valueText = ariaValueText != null ? ariaValueText : value;
|
|
104
106
|
var verticalHint = "".concat(new _IString["default"]((0, _$L["default"])('From {startValue} to {lastValue}')).format({
|
|
105
|
-
startValue:
|
|
106
|
-
lastValue:
|
|
107
|
+
startValue: sliderMin,
|
|
108
|
+
lastValue: sliderMax
|
|
107
109
|
}), " ").concat(valueText, " ").concat((0, _$L["default"])('change a value with up down button'));
|
|
108
110
|
var horizontalHint = "".concat(new _IString["default"]((0, _$L["default"])('From {startValue} to {lastValue}')).format({
|
|
109
|
-
startValue:
|
|
110
|
-
lastValue:
|
|
111
|
+
startValue: sliderMin,
|
|
112
|
+
lastValue: sliderMax
|
|
111
113
|
}), " ").concat(valueText, " ").concat((0, _$L["default"])('change a value with left right button'));
|
|
112
114
|
if (useHintText) {
|
|
113
115
|
return orientation === 'horizontal' ? horizontalHint : verticalHint;
|
|
@@ -170,8 +172,8 @@ var SliderBehaviorDecorator = exports.SliderBehaviorDecorator = (0, _hoc["defaul
|
|
|
170
172
|
onFocus: handleFocus
|
|
171
173
|
}));
|
|
172
174
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
_SliderBehaviorDecorator.displayName = 'SliderBehaviorDecorator';
|
|
176
|
+
_SliderBehaviorDecorator.propTypes = {
|
|
175
177
|
activateOnSelect: _propTypes["default"].bool,
|
|
176
178
|
'aria-valuetext': _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
177
179
|
max: _propTypes["default"].number,
|
|
@@ -179,6 +181,6 @@ var SliderBehaviorDecorator = exports.SliderBehaviorDecorator = (0, _hoc["defaul
|
|
|
179
181
|
orientation: _propTypes["default"].string,
|
|
180
182
|
value: _propTypes["default"].number
|
|
181
183
|
};
|
|
182
|
-
return
|
|
184
|
+
return _SliderBehaviorDecorator;
|
|
183
185
|
});
|
|
184
186
|
var _default = exports["default"] = SliderBehaviorDecorator;
|
|
@@ -101,7 +101,8 @@ describe('Slider', function () {
|
|
|
101
101
|
});
|
|
102
102
|
test('should set "aria-valuetext" to value when value is changed', function () {
|
|
103
103
|
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
104
|
-
defaultValue: 10
|
|
104
|
+
defaultValue: 10,
|
|
105
|
+
showMinMax: true
|
|
105
106
|
}));
|
|
106
107
|
var slider = _react.screen.getByRole('slider');
|
|
107
108
|
focus(slider);
|
|
@@ -110,6 +111,32 @@ describe('Slider', function () {
|
|
|
110
111
|
var expectedValue = '11';
|
|
111
112
|
expect(slider).toHaveAttribute(expectedAttribute, expectedValue);
|
|
112
113
|
});
|
|
114
|
+
test('should be pressed when selected', function () {
|
|
115
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {}));
|
|
116
|
+
var slider = _react.screen.getByRole('slider');
|
|
117
|
+
|
|
118
|
+
// Select by key
|
|
119
|
+
_react.fireEvent.keyDown(slider, {
|
|
120
|
+
key: 'Enter',
|
|
121
|
+
code: 'Enter',
|
|
122
|
+
keyCode: 13,
|
|
123
|
+
which: 13
|
|
124
|
+
});
|
|
125
|
+
expect(slider).toHaveClass('pressed');
|
|
126
|
+
_react.fireEvent.keyUp(slider, {
|
|
127
|
+
key: 'Enter',
|
|
128
|
+
code: 'Enter',
|
|
129
|
+
keyCode: 13,
|
|
130
|
+
which: 13
|
|
131
|
+
});
|
|
132
|
+
expect(slider).not.toHaveClass('pressed');
|
|
133
|
+
|
|
134
|
+
// Select by pointer
|
|
135
|
+
_react.fireEvent.mouseDown(slider);
|
|
136
|
+
expect(slider).toHaveClass('pressed');
|
|
137
|
+
_react.fireEvent.mouseUp(slider);
|
|
138
|
+
expect(slider).not.toHaveClass('pressed');
|
|
139
|
+
});
|
|
113
140
|
test('should activate the slider on enter keyup', function () {
|
|
114
141
|
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
115
142
|
activateOnSelect: true
|
|
@@ -570,4 +597,29 @@ describe('Slider', function () {
|
|
|
570
597
|
var tooltip = _react.screen.queryByText('0');
|
|
571
598
|
expect(tooltip).toBeNull();
|
|
572
599
|
});
|
|
600
|
+
test('should apply `colorPicker`', function () {
|
|
601
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
602
|
+
colorPicker: true
|
|
603
|
+
}));
|
|
604
|
+
var slider = _react.screen.getByRole('slider');
|
|
605
|
+
var expected = 'colorPicker';
|
|
606
|
+
expect(slider).toHaveClass(expected);
|
|
607
|
+
});
|
|
608
|
+
test('should fire `onChange` with `onChange` type when value changed for `colorPicker`', function () {
|
|
609
|
+
var handleChange = jest.fn();
|
|
610
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
611
|
+
activateOnSelect: true,
|
|
612
|
+
colorPicker: true,
|
|
613
|
+
defaultValue: 50,
|
|
614
|
+
onChange: handleChange
|
|
615
|
+
}));
|
|
616
|
+
var slider = _react.screen.getByRole('slider');
|
|
617
|
+
activate(slider);
|
|
618
|
+
leftKeyDown(slider);
|
|
619
|
+
var expected = {
|
|
620
|
+
type: 'onChange'
|
|
621
|
+
};
|
|
622
|
+
var actual = handleChange.mock.calls.length && handleChange.mock.calls[0][0];
|
|
623
|
+
expect(actual).toMatchObject(expected);
|
|
624
|
+
});
|
|
573
625
|
});
|
package/Slider/utils.js
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.handleIncrementByWheel = exports.handleIncrement = exports.handleDecrementByWheel = exports.handleDecrement = exports.forwardSpotlightEvents = exports.emitChange = void 0;
|
|
6
|
+
exports.hueGradient = exports.handleIncrementByWheel = exports.handleIncrement = exports.handleDecrementByWheel = exports.handleDecrement = exports.forwardSpotlightEvents = exports.emitChange = void 0;
|
|
7
7
|
var _handle = require("@enact/core/handle");
|
|
8
8
|
var _keymap = require("@enact/core/keymap");
|
|
9
9
|
var _util = require("@enact/core/util");
|
|
10
10
|
var _utils = require("@enact/ui/Slider/utils");
|
|
11
|
+
var hueGradient = exports.hueGradient = function hueGradient(orientation) {
|
|
12
|
+
return "linear-gradient(".concat(orientation === 'horizontal' ? 'to right' : 'to top', ", \n\thsla(0, 100%, 50%, 1),\n\thsla(10, 100%, 50%, 1),\n\thsla(20, 100%, 50%, 1),\n\thsla(30, 100%, 50%, 1),\n\thsla(40, 100%, 50%, 1),\n\thsla(50, 100%, 50%, 1),\n\thsla(60, 100%, 50%, 1),\n\thsla(70, 100%, 50%, 1),\n\thsla(80, 100%, 50%, 1),\n\thsla(90, 100%, 50%, 1),\n\thsla(100, 100%, 50%, 1),\n\thsla(110, 100%, 50%, 1),\n\thsla(120, 100%, 50%, 1),\n\thsla(130, 100%, 50%, 1),\n\thsla(140, 100%, 50%, 1),\n\thsla(150, 100%, 50%, 1),\n\thsla(160, 100%, 50%, 1),\n\thsla(170, 100%, 50%, 1),\n\thsla(180, 100%, 50%, 1),\n\thsla(190, 100%, 50%, 1),\n\thsla(200, 100%, 50%, 1),\n\thsla(210, 100%, 50%, 1),\n\thsla(220, 100%, 50%, 1),\n\thsla(230, 100%, 50%, 1),\n\thsla(240, 100%, 50%, 1),\n\thsla(250, 100%, 50%, 1),\n\thsla(260, 100%, 50%, 1),\n\thsla(270, 100%, 50%, 1),\n\thsla(280, 100%, 50%, 1),\n\thsla(290, 100%, 50%, 1),\n\thsla(300, 100%, 50%, 1),\n\thsla(310, 100%, 50%, 1),\n\thsla(320, 100%, 50%, 1),\n\thsla(330, 100%, 50%, 1),\n\thsla(340, 100%, 50%, 1),\n\thsla(350, 100%, 50%, 1),\n\thsla(360, 100%, 50%, 1))");
|
|
13
|
+
};
|
|
11
14
|
var nop = function nop() {};
|
|
12
15
|
var handleAcceleratedKeyDown = function handleAcceleratedKeyDown(ev, prop, _ref) {
|
|
13
16
|
var spotlightAccelerator = _ref.current;
|
|
@@ -73,17 +76,30 @@ var checkInterval = function checkInterval(ev, _ref0, context) {
|
|
|
73
76
|
};
|
|
74
77
|
var emitChange = exports.emitChange = function emitChange(direction) {
|
|
75
78
|
return (0, _handle.forwardCustom)('onChange', function (ev, _ref1) {
|
|
76
|
-
var
|
|
79
|
+
var colorPicker = _ref1.colorPicker,
|
|
80
|
+
knobStep = _ref1.knobStep,
|
|
77
81
|
max = _ref1.max,
|
|
78
82
|
min = _ref1.min,
|
|
79
83
|
step = _ref1.step,
|
|
80
84
|
_ref1$value = _ref1.value,
|
|
81
85
|
value = _ref1$value === void 0 ? min : _ref1$value;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
if (colorPicker) {
|
|
87
|
+
var newValue = (0, _util.clamp)(0, 360, value + calcStep(knobStep, step) * direction);
|
|
88
|
+
return {
|
|
89
|
+
value: newValue,
|
|
90
|
+
proportion: (0, _utils.calcProportion)(min, max, newValue),
|
|
91
|
+
color: {
|
|
92
|
+
hex: (0, _utils.hslToHex)(value),
|
|
93
|
+
hsl: "hsla(".concat(value, ", 100%, 50%, 1)")
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
} else {
|
|
97
|
+
var _newValue = (0, _util.clamp)(min, max, value + calcStep(knobStep, step) * direction);
|
|
98
|
+
return {
|
|
99
|
+
value: _newValue,
|
|
100
|
+
proportion: (0, _utils.calcProportion)(min, max, _newValue)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
87
103
|
});
|
|
88
104
|
};
|
|
89
105
|
var isActive = function isActive(ev, props) {
|
package/Spinner/Spinner.d.ts
CHANGED
|
@@ -37,8 +37,10 @@ export class SpinnerBase extends React.Component<
|
|
|
37
37
|
Merge<React.HTMLProps<HTMLElement>, SpinnerBaseProps>
|
|
38
38
|
> {}
|
|
39
39
|
|
|
40
|
-
export interface SpinnerProps
|
|
41
|
-
|
|
40
|
+
export interface SpinnerProps extends Merge<
|
|
41
|
+
SpinnerBaseProps,
|
|
42
|
+
SpinnerDecoratorProps
|
|
43
|
+
> {
|
|
42
44
|
/**
|
|
43
45
|
* Determines how far the click-blocking should extend.
|
|
44
46
|
*
|
|
@@ -55,8 +57,7 @@ export class Spinner extends React.Component<
|
|
|
55
57
|
Merge<React.HTMLProps<HTMLElement>, SpinnerProps>
|
|
56
58
|
> {}
|
|
57
59
|
|
|
58
|
-
export interface SpinnerDecoratorProps
|
|
59
|
-
extends limestone_Skinnable_SkinnableProps {}
|
|
60
|
+
export interface SpinnerDecoratorProps extends limestone_Skinnable_SkinnableProps {}
|
|
60
61
|
export function SpinnerDecorator<P>(
|
|
61
62
|
Component: React.ComponentType<P> | string,
|
|
62
63
|
): React.ComponentType<P & SpinnerDecoratorProps>;
|
package/Spinner/Spinner.js
CHANGED
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.SpinnerDecorator = exports.SpinnerBase = exports.Spinner = void 0;
|
|
7
7
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
8
8
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
9
|
-
var
|
|
9
|
+
var _util = require("@enact/core/util");
|
|
10
|
+
var _spotlight = _interopRequireDefault(require("@enact/spotlight"));
|
|
11
|
+
var _Pause = _interopRequireDefault(require("@enact/spotlight/Pause"));
|
|
10
12
|
var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
|
|
13
|
+
var _Spinner = _interopRequireDefault(require("@enact/ui/Spinner"));
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
var _compose = _interopRequireDefault(require("ramda/src/compose"));
|
|
12
16
|
var _react = require("react");
|
|
13
|
-
var _Pause = _interopRequireDefault(require("@enact/spotlight/Pause"));
|
|
14
|
-
var _Spinner = _interopRequireDefault(require("@enact/ui/Spinner"));
|
|
15
|
-
var _spotlight = _interopRequireDefault(require("@enact/spotlight"));
|
|
16
17
|
var _$L = _interopRequireDefault(require("../internal/$L"));
|
|
17
18
|
var _Marquee = _interopRequireDefault(require("../Marquee"));
|
|
18
19
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
@@ -191,7 +192,8 @@ var SpinnerBase = exports.SpinnerBase = (0, _kind["default"])({
|
|
|
191
192
|
* @private
|
|
192
193
|
*/
|
|
193
194
|
var SpinnerSpotlightDecorator = (0, _hoc["default"])(function (config, Wrapped) {
|
|
194
|
-
var
|
|
195
|
+
var _SpinnerSpotlight = function SpinnerSpotlight(props) {
|
|
196
|
+
(0, _util.checkPropTypes)(_SpinnerSpotlight, props);
|
|
195
197
|
var paused = (0, _react.useMemo)(function () {
|
|
196
198
|
return new _Pause["default"]('Spinner');
|
|
197
199
|
}, []);
|
|
@@ -213,8 +215,8 @@ var SpinnerSpotlightDecorator = (0, _hoc["default"])(function (config, Wrapped)
|
|
|
213
215
|
}, [blockClickOn, paused]);
|
|
214
216
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, props));
|
|
215
217
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
+
_SpinnerSpotlight.displayName = 'SpinnerSpotlightDecorator';
|
|
219
|
+
_SpinnerSpotlight.propTypes = /** @lends limestone/Spinner.Spinner.prototype */{
|
|
218
220
|
/**
|
|
219
221
|
* Determines how far the click-blocking should extend.
|
|
220
222
|
*
|
|
@@ -227,7 +229,7 @@ var SpinnerSpotlightDecorator = (0, _hoc["default"])(function (config, Wrapped)
|
|
|
227
229
|
*/
|
|
228
230
|
blockClickOn: _propTypes["default"].oneOf(['screen', 'container', null])
|
|
229
231
|
};
|
|
230
|
-
return
|
|
232
|
+
return _SpinnerSpotlight;
|
|
231
233
|
});
|
|
232
234
|
|
|
233
235
|
/**
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
border-radius: 20.8125rem;
|
|
61
61
|
width: 2rem;
|
|
62
62
|
height: 2rem;
|
|
63
|
-
padding:
|
|
63
|
+
padding: var(--primitive-spacing-24);
|
|
64
64
|
margin-left: auto;
|
|
65
65
|
margin-right: auto;
|
|
66
66
|
}
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
:global(.enact-locale-non-latin) .spinner .client {
|
|
136
136
|
font-family: "Limestone";
|
|
137
137
|
font-weight: var(--primitive-font-weight-light);
|
|
138
|
-
font-size:
|
|
138
|
+
font-size: var(--primitive-font-size-54);
|
|
139
139
|
font-style: normal;
|
|
140
140
|
}
|
|
141
141
|
:global(.enact-locale-km) .spinner .client {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
height: 1rem;
|
|
176
176
|
}
|
|
177
177
|
.spinner.small .bg {
|
|
178
|
-
padding:
|
|
178
|
+
padding: var(--primitive-spacing-12);
|
|
179
179
|
}
|
|
180
180
|
.spinner.small .decorator {
|
|
181
181
|
-webkit-mask-image: radial-gradient(transparent 0.35417rem, black 0.375rem);
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
color: var(--semantic-color-on-background-sub);
|
|
207
207
|
}
|
|
208
208
|
.spinner:global(.neutral) .bg {
|
|
209
|
-
background-color: var(--semantic-color-surface-
|
|
209
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
210
210
|
}
|
|
211
211
|
.spinner:global(.neutral) .decorator {
|
|
212
212
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
color: var(--semantic-color-on-background-sub);
|
|
228
228
|
}
|
|
229
229
|
:global(.enact-a11y-high-contrast) .spinner:global(.neutral):global(.highContrast) .bg {
|
|
230
|
-
background-color: var(--semantic-color-surface-
|
|
230
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
231
231
|
}
|
|
232
232
|
:global(.enact-a11y-high-contrast) .spinner:global(.neutral):global(.highContrast) .decorator {
|
|
233
233
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
color: var(--semantic-color-on-background-sub);
|
|
249
249
|
}
|
|
250
250
|
.spinner:global(.light) .bg {
|
|
251
|
-
background-color: var(--semantic-color-surface-
|
|
251
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
252
252
|
}
|
|
253
253
|
.spinner:global(.light) .decorator {
|
|
254
254
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
color: var(--semantic-color-on-background-sub);
|
|
273
273
|
}
|
|
274
274
|
.spinner:global(.game) .bg {
|
|
275
|
-
background-color: var(--semantic-color-surface-
|
|
275
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
276
276
|
}
|
|
277
277
|
.spinner:global(.game) .decorator {
|
|
278
278
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
color: var(--semantic-color-on-background-sub);
|
|
296
296
|
}
|
|
297
297
|
:global(.green) .spinner:global(.game) .bg {
|
|
298
|
-
background-color: var(--semantic-color-surface-
|
|
298
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
299
299
|
}
|
|
300
300
|
:global(.green) .spinner:global(.game) .decorator {
|
|
301
301
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
color: var(--semantic-color-on-background-sub);
|
|
319
319
|
}
|
|
320
320
|
:global(.orange) .spinner:global(.game) .bg {
|
|
321
|
-
background-color: var(--semantic-color-surface-
|
|
321
|
+
background-color: var(--semantic-color-surface-spinner);
|
|
322
322
|
}
|
|
323
323
|
:global(.orange) .spinner:global(.game) .decorator {
|
|
324
324
|
background: conic-gradient(color(from var(--semantic-color-on-background-main) srgb r g b / 0.2) 57.5%, var(--semantic-color-on-background-main) 100%);
|
package/Steps/Steps.d.ts
CHANGED
|
@@ -100,14 +100,15 @@ export class StepsBase extends React.Component<
|
|
|
100
100
|
Merge<React.HTMLProps<HTMLElement>, StepsBaseProps>
|
|
101
101
|
> {}
|
|
102
102
|
|
|
103
|
-
export interface StepsDecoratorProps
|
|
104
|
-
extends limestone_Skinnable_SkinnableProps {}
|
|
103
|
+
export interface StepsDecoratorProps extends limestone_Skinnable_SkinnableProps {}
|
|
105
104
|
export function StepsDecorator<P>(
|
|
106
105
|
Component: React.ComponentType<P> | string,
|
|
107
106
|
): React.ComponentType<P & StepsDecoratorProps>;
|
|
108
107
|
|
|
109
|
-
export interface StepsProps
|
|
110
|
-
|
|
108
|
+
export interface StepsProps extends Merge<
|
|
109
|
+
StepsBaseProps,
|
|
110
|
+
StepsDecoratorProps
|
|
111
|
+
> {}
|
|
111
112
|
/**
|
|
112
113
|
* A full-featured Limestone-styled step component.
|
|
113
114
|
*/
|
package/Steps/Steps.js
CHANGED
|
@@ -15,7 +15,8 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
15
15
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
16
16
|
var _StepsModule = _interopRequireDefault(require("./Steps.module.css"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
var _excluded = ["
|
|
18
|
+
var _excluded = ["className", "css"],
|
|
19
|
+
_excluded2 = ["css", "iconComponent", "size", "steps"];
|
|
19
20
|
/**
|
|
20
21
|
* Provides Limestone styled component to indicate progress along a continuum.
|
|
21
22
|
*
|
|
@@ -40,11 +41,14 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
40
41
|
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; }
|
|
41
42
|
var PageIndicator = function PageIndicator(_ref) {
|
|
42
43
|
var className = _ref.className,
|
|
43
|
-
css = _ref.css
|
|
44
|
+
css = _ref.css,
|
|
45
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
delete rest.children;
|
|
47
|
+
delete rest.size;
|
|
44
48
|
var mergedClasses = (0, _classnames["default"])(css.pageIndicator, className);
|
|
45
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread({
|
|
46
50
|
className: mergedClasses
|
|
47
|
-
});
|
|
51
|
+
}, rest));
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
/**
|
|
@@ -258,7 +262,7 @@ var StepsBase = exports.StepsBase = (0, _kind["default"])({
|
|
|
258
262
|
iconComponent = _ref4.iconComponent,
|
|
259
263
|
size = _ref4.size,
|
|
260
264
|
steps = _ref4.steps,
|
|
261
|
-
rest = _objectWithoutProperties(_ref4,
|
|
265
|
+
rest = _objectWithoutProperties(_ref4, _excluded2);
|
|
262
266
|
delete rest.current;
|
|
263
267
|
delete rest.currentIcon;
|
|
264
268
|
delete rest.futureIcon;
|
package/Switch/Switch.d.ts
CHANGED
|
@@ -29,17 +29,18 @@ export class SwitchBase extends React.Component<
|
|
|
29
29
|
Merge<React.HTMLProps<HTMLElement>, SwitchBaseProps>
|
|
30
30
|
> {}
|
|
31
31
|
|
|
32
|
-
export interface SwitchDecoratorProps
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
> {}
|
|
32
|
+
export interface SwitchDecoratorProps extends Merge<
|
|
33
|
+
ui_Toggleable_ToggleableProps,
|
|
34
|
+
spotlight_Spottable_SpottableProps
|
|
35
|
+
> {}
|
|
37
36
|
export function SwitchDecorator<P>(
|
|
38
37
|
Component: React.ComponentType<P> | string,
|
|
39
38
|
): React.ComponentType<P & SwitchDecoratorProps>;
|
|
40
39
|
|
|
41
|
-
export interface SwitchProps
|
|
42
|
-
|
|
40
|
+
export interface SwitchProps extends Merge<
|
|
41
|
+
SwitchBaseProps,
|
|
42
|
+
SwitchDecoratorProps
|
|
43
|
+
> {}
|
|
43
44
|
/**
|
|
44
45
|
* A Limestone-styled component that looks like a toggle switch.
|
|
45
46
|
*
|
package/Switch/Switch.module.css
CHANGED
|
@@ -1,9 +1,92 @@
|
|
|
1
|
+
/* ---------------------------------------
|
|
2
|
+
Animations
|
|
3
|
+
------------------------------------------ */
|
|
4
|
+
:root {
|
|
5
|
+
/* Bounce
|
|
6
|
+
------------------------------------------ */
|
|
7
|
+
--lime-bounce-motion: var(--lime-bounce-animation-name) var(--lime-bounce-motion-duration) var(--lime-bounce-motion-easing-function);
|
|
8
|
+
--lime-check-motion: var(--lime-check-animation-name) var(--lime-check-motion-duration) forwards;
|
|
9
|
+
}
|
|
10
|
+
/* ---------------------------------------
|
|
11
|
+
Animations properties
|
|
12
|
+
------------------------------------------ */
|
|
13
|
+
:root {
|
|
14
|
+
/* ---------------------------------------
|
|
15
|
+
Durations
|
|
16
|
+
------------------------------------------ */
|
|
17
|
+
--lime-motion-default-duration: 200ms;
|
|
18
|
+
--lime-motion-medium1-duration: 250ms;
|
|
19
|
+
--lime-motion-medium2-duration: 300ms;
|
|
20
|
+
--lime-motion-medium4-duration: 400ms;
|
|
21
|
+
--lime-motion-long2-duration: 500ms;
|
|
22
|
+
--lime-bounce-motion-duration: var(--lime-motion-medium2-duration);
|
|
23
|
+
--lime-check-motion-duration: var(--lime-motion-medium4-duration);
|
|
24
|
+
--lime-focus-in-motion-duration: var(--lime-motion-medium2-duration);
|
|
25
|
+
--lime-focus-out-motion-duration: var(--lime-motion-long2-duration);
|
|
26
|
+
--lime-press-motion-duration: var(--lime-motion-medium1-duration);
|
|
27
|
+
--lime-release-motion-duration: var(--lime-motion-medium2-duration);
|
|
28
|
+
/* ---------------------------------------
|
|
29
|
+
Easing functions
|
|
30
|
+
------------------------------------------ */
|
|
31
|
+
--lime-default-motion-easing-function: ease-out;
|
|
32
|
+
--lime-EIO-motion-easing-function: cubic-bezier(0.2, 0, 0.05, 1);
|
|
33
|
+
--lime-EO-motion-easing-function: cubic-bezier(0.1, 0.6, 0.15, 1);
|
|
34
|
+
--lime-bounce-motion-easing-function: var(--lime-default-motion-easing-function);
|
|
35
|
+
--lime-focus-in-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
36
|
+
--lime-focus-out-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
37
|
+
--lime-press-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
38
|
+
--lime-release-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
39
|
+
/* ---------------------------------------
|
|
40
|
+
Keyframes names
|
|
41
|
+
------------------------------------------ */
|
|
42
|
+
--lime-bounce-animation-name: bounce-motion;
|
|
43
|
+
--lime-check-animation-name: check-motion;
|
|
44
|
+
/* ---------------------------------------
|
|
45
|
+
Keyframes values
|
|
46
|
+
------------------------------------------ */
|
|
47
|
+
--lime-bounce-motion-offset-default-value: 0.125rem;
|
|
48
|
+
}
|
|
49
|
+
/* ---------------------------------------
|
|
50
|
+
Keyframes
|
|
51
|
+
------------------------------------------ */
|
|
52
|
+
/* Bounce
|
|
53
|
+
------------------------------------------ */
|
|
54
|
+
@keyframes bounce-motion {
|
|
55
|
+
0% {
|
|
56
|
+
transform: translateX(0);
|
|
57
|
+
}
|
|
58
|
+
50% {
|
|
59
|
+
transform: translateX(var(--lime-bounce-motion-offset-value, --lime-bounce-motion-offset-default-value));
|
|
60
|
+
}
|
|
61
|
+
80% {
|
|
62
|
+
transform: translateX(calc(var(--lime-bounce-motion-offset-value, --lime-bounce-motion-offset-default-value) / -2));
|
|
63
|
+
}
|
|
64
|
+
100% {
|
|
65
|
+
transform: translateX(0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/* Check
|
|
69
|
+
------------------------------------------ */
|
|
70
|
+
@keyframes check-motion {
|
|
71
|
+
0% {
|
|
72
|
+
transform: translateX(0);
|
|
73
|
+
}
|
|
74
|
+
100% {
|
|
75
|
+
transform: translateX(100%);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/* ---------------------------------------
|
|
79
|
+
Motion Variables
|
|
80
|
+
------------------------------------------ */
|
|
81
|
+
/* ---------------------------------------
|
|
82
|
+
Motion Mixins
|
|
83
|
+
------------------------------------------ */
|
|
1
84
|
.switch {
|
|
2
85
|
display: inline-block;
|
|
3
86
|
position: relative;
|
|
4
87
|
}
|
|
5
88
|
.switch .client {
|
|
6
|
-
border-radius:
|
|
89
|
+
border-radius: var(--primitive-radius-30);
|
|
7
90
|
width: 2.5rem;
|
|
8
91
|
height: 1.25rem;
|
|
9
92
|
position: relative;
|
|
@@ -15,7 +98,7 @@
|
|
|
15
98
|
visibility: visible;
|
|
16
99
|
height: 1rem;
|
|
17
100
|
width: 1rem;
|
|
18
|
-
font-size:
|
|
101
|
+
font-size: var(--primitive-font-size-84);
|
|
19
102
|
line-height: 1.25rem;
|
|
20
103
|
margin: 0;
|
|
21
104
|
position: absolute;
|
|
@@ -32,15 +115,19 @@
|
|
|
32
115
|
.switch.animated .icon {
|
|
33
116
|
transition: left 200ms, background-color 200ms;
|
|
34
117
|
}
|
|
118
|
+
.switch.animated.selected .icon {
|
|
119
|
+
animation: var(--lime-bounce-animation-name) var(--lime-bounce-motion-duration) var(--lime-bounce-motion-easing-function);
|
|
120
|
+
--lime-bounce-motion-offset-value: var(--lime-bounce-motion-offset-default-value);
|
|
121
|
+
}
|
|
35
122
|
.switch:global(.spottable) {
|
|
36
|
-
margin:
|
|
123
|
+
margin: var(--primitive-spacing-36);
|
|
37
124
|
}
|
|
38
125
|
.switch:global(.spottable) .bg {
|
|
39
126
|
position: absolute;
|
|
40
|
-
top: -
|
|
41
|
-
right: -
|
|
42
|
-
bottom: -
|
|
43
|
-
left: -
|
|
127
|
+
top: calc(var(--primitive-spacing-36) * -1);
|
|
128
|
+
right: calc(var(--primitive-spacing-36) * -1);
|
|
129
|
+
bottom: calc(var(--primitive-spacing-36) * -1);
|
|
130
|
+
left: calc(var(--primitive-spacing-36) * -1);
|
|
44
131
|
z-index: -1;
|
|
45
132
|
}
|
|
46
133
|
.switch:global(.neutral) .client {
|
|
@@ -71,7 +158,7 @@
|
|
|
71
158
|
border-radius: var(--semantic-radius-button);
|
|
72
159
|
}
|
|
73
160
|
.switch:global(.neutral):global(.spottable) .bg {
|
|
74
|
-
border-radius:
|
|
161
|
+
border-radius: var(--primitive-radius-24);
|
|
75
162
|
will-change: box-shadow, box-shadow;
|
|
76
163
|
opacity: 0;
|
|
77
164
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -156,7 +243,7 @@
|
|
|
156
243
|
border-radius: var(--semantic-radius-button);
|
|
157
244
|
}
|
|
158
245
|
:global(.enact-a11y-high-contrast) .switch:global(.neutral):global(.highContrast):global(.spottable) .bg {
|
|
159
|
-
border-radius:
|
|
246
|
+
border-radius: var(--primitive-radius-24);
|
|
160
247
|
will-change: box-shadow, box-shadow;
|
|
161
248
|
opacity: 0;
|
|
162
249
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -241,7 +328,7 @@
|
|
|
241
328
|
border-radius: var(--semantic-radius-button);
|
|
242
329
|
}
|
|
243
330
|
.switch:global(.light):global(.spottable) .bg {
|
|
244
|
-
border-radius:
|
|
331
|
+
border-radius: var(--primitive-radius-24);
|
|
245
332
|
will-change: box-shadow, box-shadow;
|
|
246
333
|
opacity: 0;
|
|
247
334
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -331,7 +418,7 @@
|
|
|
331
418
|
border-radius: 0;
|
|
332
419
|
}
|
|
333
420
|
.switch:global(.game):global(.spottable) .bg {
|
|
334
|
-
border-radius:
|
|
421
|
+
border-radius: var(--primitive-radius-24);
|
|
335
422
|
will-change: box-shadow, box-shadow;
|
|
336
423
|
opacity: 0;
|
|
337
424
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -420,7 +507,7 @@
|
|
|
420
507
|
border-radius: 0;
|
|
421
508
|
}
|
|
422
509
|
:global(.green) .switch:global(.game):global(.spottable) .bg {
|
|
423
|
-
border-radius:
|
|
510
|
+
border-radius: var(--primitive-radius-24);
|
|
424
511
|
will-change: box-shadow, box-shadow;
|
|
425
512
|
opacity: 0;
|
|
426
513
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -509,7 +596,7 @@
|
|
|
509
596
|
border-radius: 0;
|
|
510
597
|
}
|
|
511
598
|
:global(.orange) .switch:global(.game):global(.spottable) .bg {
|
|
512
|
-
border-radius:
|
|
599
|
+
border-radius: var(--primitive-radius-24);
|
|
513
600
|
will-change: box-shadow, box-shadow;
|
|
514
601
|
opacity: 0;
|
|
515
602
|
background-color: var(--semantic-color-surface-default-focused);
|
|
@@ -7,8 +7,10 @@ import * as React from "react";
|
|
|
7
7
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
8
8
|
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
|
|
9
9
|
|
|
10
|
-
export interface SwitchItemBaseProps
|
|
11
|
-
|
|
10
|
+
export interface SwitchItemBaseProps extends Omit<
|
|
11
|
+
limestone_Item_ItemProps,
|
|
12
|
+
"iconComponent"
|
|
13
|
+
> {
|
|
12
14
|
/**
|
|
13
15
|
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
14
16
|
corresponding internal elements and states of this component.
|
|
@@ -34,14 +36,15 @@ export class SwitchItemBase extends React.Component<
|
|
|
34
36
|
Merge<React.HTMLProps<HTMLElement>, SwitchItemBaseProps>
|
|
35
37
|
> {}
|
|
36
38
|
|
|
37
|
-
export interface SwitchItemDecoratorProps
|
|
38
|
-
extends ui_Toggleable_ToggleableProps {}
|
|
39
|
+
export interface SwitchItemDecoratorProps extends ui_Toggleable_ToggleableProps {}
|
|
39
40
|
export function SwitchItemDecorator<P>(
|
|
40
41
|
Component: React.ComponentType<P> | string,
|
|
41
42
|
): React.ComponentType<P & SwitchItemDecoratorProps>;
|
|
42
43
|
|
|
43
|
-
export interface SwitchItemProps
|
|
44
|
-
|
|
44
|
+
export interface SwitchItemProps extends Merge<
|
|
45
|
+
SwitchItemBaseProps,
|
|
46
|
+
SwitchItemDecoratorProps
|
|
47
|
+
> {}
|
|
45
48
|
/**
|
|
46
49
|
* A Limestone-styled item with a switch component.
|
|
47
50
|
*
|