@enact/ui 4.9.0-alpha.3 → 5.0.0-alpha.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.
Files changed (152) hide show
  1. package/AnnounceDecorator/Announce.js +1 -1
  2. package/AnnounceDecorator/AnnounceDecorator.js +2 -2
  3. package/BodyText/BodyText.js +2 -2
  4. package/BodyText/tests/BodyText-specs.js +1 -1
  5. package/Button/Button.js +2 -2
  6. package/CHANGELOG.md +25 -0
  7. package/Cancelable/Cancelable.js +1 -1
  8. package/Cancelable/tests/Cancelable-specs.js +2 -2
  9. package/Changeable/Changeable.js +1 -1
  10. package/ComponentOverride/ComponentOverride.js +2 -2
  11. package/FloatingLayer/FloatingLayer.js +2 -2
  12. package/FloatingLayer/FloatingLayerContainer.js +1 -1
  13. package/FloatingLayer/FloatingLayerDecorator.js +2 -2
  14. package/FloatingLayer/Scrim.js +2 -2
  15. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +1 -1
  16. package/ForwardRef/ForwardRef.js +1 -1
  17. package/Group/Group.js +2 -2
  18. package/Group/GroupItem.js +2 -2
  19. package/Group/tests/Group-specs.js +1 -1
  20. package/Heading/Heading.js +2 -2
  21. package/Icon/Icon.js +2 -2
  22. package/Icon/Icon.module.css +0 -1
  23. package/Icon/tests/Icon-specs.js +1 -1
  24. package/Image/Image.js +2 -2
  25. package/Image/tests/Image-specs.js +1 -1
  26. package/ImageItem/ImageItem.js +2 -2
  27. package/ImageItem/tests/ImageItem-specs.js +2 -2
  28. package/Item/Item.js +2 -2
  29. package/LabeledIcon/LabeledIcon.js +2 -2
  30. package/Layout/Cell.js +2 -2
  31. package/Layout/Layout.js +2 -2
  32. package/Layout/tests/Layout-specs.js +2 -2
  33. package/Marquee/MarqueeBase.js +2 -2
  34. package/Marquee/MarqueeController.js +1 -1
  35. package/Marquee/MarqueeDecorator.js +19 -27
  36. package/Marquee/index.d.ts +10 -14
  37. package/Marquee/tests/Marquee-specs.js +1 -1
  38. package/Marquee/useMarqueeController.js +15 -11
  39. package/Measurable/Measurable.js +1 -1
  40. package/Measurable/tests/Measurable-specs.js +2 -2
  41. package/Media/Media.js +2 -2
  42. package/Placeholder/PlaceholderControllerDecorator.js +1 -1
  43. package/Placeholder/PlaceholderDecorator.js +1 -1
  44. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +1 -1
  45. package/ProgressBar/ProgressBar.js +2 -2
  46. package/Repeater/Repeater.js +2 -2
  47. package/Repeater/tests/Repeater-specs.js +2 -2
  48. package/Resizable/Resizable.js +1 -1
  49. package/Resizable/tests/Resizable-specs.js +1 -1
  50. package/Resizable/tests/useResize-specs.js +1 -1
  51. package/Resizable/useResize.js +1 -1
  52. package/Routable/Link.js +2 -2
  53. package/Routable/Routable.js +2 -2
  54. package/Routable/Router.js +2 -2
  55. package/Routable/tests/Routable-specs.js +1 -1
  56. package/Scroller/Scroller.d.ts +0 -120
  57. package/Scroller/Scroller.js +1 -9
  58. package/Scroller/ScrollerBasic.js +2 -2
  59. package/Skinnable/Skinnable.js +2 -2
  60. package/Skinnable/tests/Skinnable-specs.js +1 -1
  61. package/Skinnable/tests/useSkins-specs.js +1 -1
  62. package/Slider/Knob.js +2 -2
  63. package/Slider/PositionDecorator.js +1 -1
  64. package/Slider/Slider.js +2 -2
  65. package/Slottable/Slottable.js +1 -3
  66. package/Slottable/useSlots.js +2 -2
  67. package/Spinner/Spinner.js +2 -2
  68. package/ToggleIcon/ToggleIcon.js +2 -2
  69. package/Toggleable/Toggle.js +1 -1
  70. package/Toggleable/Toggleable.js +3 -3
  71. package/Toggleable/useToggle.js +1 -1
  72. package/Touchable/ClickAllow.js +1 -1
  73. package/Touchable/Drag.js +1 -1
  74. package/Touchable/Flick.js +1 -1
  75. package/Touchable/Hold.js +1 -1
  76. package/Touchable/Pinch.js +1 -1
  77. package/Touchable/Touch.js +1 -1
  78. package/Touchable/Touchable.js +2 -2
  79. package/Touchable/config.js +1 -1
  80. package/Touchable/tests/Touchable-specs.js +1 -1
  81. package/Touchable/tests/useTouch-specs.js +2 -2
  82. package/Touchable/useTouch.js +1 -1
  83. package/Transition/Transition.js +2 -2
  84. package/Transition/tests/Transition-specs.js +2 -2
  85. package/ViewManager/Arranger.js +1 -1
  86. package/ViewManager/TransitionGroup.js +1 -1
  87. package/ViewManager/View.js +1 -1
  88. package/ViewManager/ViewManager.js +3 -3
  89. package/ViewManager/tests/ViewManager-specs.js +1 -1
  90. package/VirtualList/VirtualList.d.ts +0 -158
  91. package/VirtualList/VirtualList.js +1 -15
  92. package/VirtualList/VirtualListBasic.js +2 -2
  93. package/VirtualList/tests/VirtualGridList-native-specs.js +2 -2
  94. package/VirtualList/tests/VirtualGridList-specs.js +2 -2
  95. package/VirtualList/tests/VirtualList-native-specs.js +2 -2
  96. package/VirtualList/tests/VirtualList-specs.js +2 -2
  97. package/internal/IdProvider/IdProvider.js +1 -1
  98. package/internal/IdProvider/Provider.js +1 -1
  99. package/internal/IdProvider/tests/IdProvider-specs.js +1 -1
  100. package/internal/IdProvider/tests/useId-specs.js +1 -1
  101. package/internal/Pure/Pure.js +1 -1
  102. package/internal/Pure/tests/Pure-specs.js +1 -1
  103. package/package.json +3 -3
  104. package/resolution/ResolutionDecorator.js +1 -1
  105. package/resolution/index.js +1 -1
  106. package/styles/core.less +1 -5
  107. package/styles/mixins.less +5 -18
  108. package/useScroll/ScrollAnimator.js +1 -1
  109. package/useScroll/Scrollbar.js +2 -2
  110. package/useScroll/Scrollbar.module.css +1 -4
  111. package/useScroll/ScrollbarTrack.js +2 -2
  112. package/useScroll/ScrollbarTrack.module.css +0 -1
  113. package/useScroll/useScroll.js +3 -3
  114. package/useScroll/useScroll.module.css +0 -3
  115. package/GridListImageItem/GridListImageItem.d.ts +0 -85
  116. package/GridListImageItem/GridListImageItem.js +0 -250
  117. package/GridListImageItem/GridListImageItem.module.css +0 -28
  118. package/GridListImageItem/package.json +0 -3
  119. package/IconButton/IconButton.d.ts +0 -115
  120. package/IconButton/IconButton.js +0 -253
  121. package/IconButton/IconButton.module.css +0 -12
  122. package/IconButton/package.json +0 -3
  123. package/IconButton/tests/IconButton-specs.js +0 -29
  124. package/RadioDecorator/RadioControllerDecorator.js +0 -101
  125. package/RadioDecorator/RadioDecorator.d.ts +0 -35
  126. package/RadioDecorator/RadioDecorator.js +0 -177
  127. package/RadioDecorator/package.json +0 -3
  128. package/RadioDecorator/tests/RadioDecorator-specs.js +0 -247
  129. package/Scrollable/ScrollAnimator.js +0 -130
  130. package/Scrollable/ScrollThumb.js +0 -57
  131. package/Scrollable/ScrollThumb.module.css +0 -35
  132. package/Scrollable/Scrollable.js +0 -1430
  133. package/Scrollable/Scrollable.module.css +0 -39
  134. package/Scrollable/ScrollableNative.js +0 -1429
  135. package/Scrollable/Scrollbar.js +0 -281
  136. package/Scrollable/Scrollbar.module.css +0 -27
  137. package/Scrollable/package.json +0 -3
  138. package/Scroller/UiScroller.module.css +0 -10
  139. package/Scroller/UiScrollerBase.js +0 -372
  140. package/SlotItem/SlotItem.d.ts +0 -118
  141. package/SlotItem/SlotItem.js +0 -248
  142. package/SlotItem/SlotItem.module.css +0 -12
  143. package/SlotItem/package.json +0 -3
  144. package/SlotItem/tests/SlotItem-specs.js +0 -24
  145. package/ToggleItem/ToggleItem.d.ts +0 -132
  146. package/ToggleItem/ToggleItem.js +0 -301
  147. package/ToggleItem/ToggleItem.module.css +0 -9
  148. package/ToggleItem/package.json +0 -3
  149. package/ToggleItem/tests/ToggleItem-specs.js +0 -120
  150. package/VirtualList/UiVirtualList.module.css +0 -26
  151. package/VirtualList/UiVirtualListBase.js +0 -1410
  152. package/VirtualList/VirtualListBase.js +0 -33
@@ -1,281 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "ScrollThumb", {
7
- enumerable: true,
8
- get: function get() {
9
- return _ScrollThumb["default"];
10
- }
11
- });
12
- exports["default"] = exports.ScrollbarBase = exports.Scrollbar = void 0;
13
- var _classnames = _interopRequireDefault(require("classnames"));
14
- var _util = require("@enact/core/util");
15
- var _propTypes = _interopRequireDefault(require("prop-types"));
16
- var _react = require("react");
17
- var _reactDom = _interopRequireDefault(require("react-dom"));
18
- var _resolution = _interopRequireDefault(require("../resolution"));
19
- var _ScrollThumb = _interopRequireDefault(require("./ScrollThumb"));
20
- var _ScrollbarModule = _interopRequireDefault(require("./Scrollbar.module.css"));
21
- var _jsxRuntime = require("react/jsx-runtime");
22
- var _excluded = ["childRenderer", "className", "corner", "css", "vertical"];
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
24
- 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; }
25
- 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; }
26
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
28
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
31
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
32
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
33
- 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); }
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
- function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
38
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
- var minThumbSize = 18,
42
- // Size in pixels
43
- nop = function nop() {},
44
- thumbHidingDelay = 400; // in milliseconds
45
-
46
- /*
47
- * Set CSS Varaible value.
48
- *
49
- * @method
50
- * @param {Node} element - Node.
51
- * @param {String} variable - CSS Variable property.
52
- * @param {String} value - CSS Variable value.
53
- */
54
- var setCSSVariable = function setCSSVariable(element, variable, value) {
55
- _reactDom["default"].findDOMNode(element).style.setProperty(variable, value); // eslint-disable-line react/no-find-dom-node
56
- };
57
-
58
- /**
59
- * An unstyled base component for a scroll bar. It is used in {@link ui/Scrollable.Scrollable|Scrollable}.
60
- *
61
- * @class ScrollbarBase
62
- * @memberof ui/Scrollable
63
- * @ui
64
- * @private
65
- */
66
- var ScrollbarBase = exports.ScrollbarBase = /*#__PURE__*/function (_PureComponent) {
67
- _inherits(ScrollbarBase, _PureComponent);
68
- var _super = _createSuper(ScrollbarBase);
69
- function ScrollbarBase(props) {
70
- var _this;
71
- _classCallCheck(this, ScrollbarBase);
72
- _this = _super.call(this, props);
73
- _this.minThumbSizeRatio = 0;
74
- _this.ignoreMode = false;
75
- _this.update = function (bounds) {
76
- var vertical = _this.props.vertical,
77
- clientWidth = bounds.clientWidth,
78
- clientHeight = bounds.clientHeight,
79
- scrollWidth = bounds.scrollWidth,
80
- scrollHeight = bounds.scrollHeight,
81
- scrollLeft = bounds.scrollLeft,
82
- scrollTop = bounds.scrollTop,
83
- clientSize = vertical ? clientHeight : clientWidth,
84
- scrollSize = vertical ? scrollHeight : scrollWidth,
85
- scrollOrigin = vertical ? scrollTop : scrollLeft,
86
- thumbSizeRatioBase = clientSize / scrollSize,
87
- scrollThumbPositionRatio = scrollOrigin / (scrollSize - clientSize),
88
- scrollThumbSizeRatio = Math.max(_this.minThumbSizeRatio, Math.min(1, thumbSizeRatioBase));
89
- setCSSVariable(_this.thumbRef.current, '--scrollbar-size-ratio', scrollThumbSizeRatio);
90
- setCSSVariable(_this.thumbRef.current, '--scrollbar-progress-ratio', scrollThumbPositionRatio);
91
- };
92
- _this.showThumb = function () {
93
- _this.hideThumbJob.stop();
94
- _reactDom["default"].findDOMNode(_this.thumbRef.current).classList.add(_this.props.css.thumbShown); // eslint-disable-line react/no-find-dom-node
95
- };
96
- _this.startHidingThumb = function () {
97
- _this.hideThumbJob.start();
98
- };
99
- _this.hideThumb = function () {
100
- _reactDom["default"].findDOMNode(_this.thumbRef.current).classList.remove(_this.props.css.thumbShown); // eslint-disable-line react/no-find-dom-node
101
- };
102
- _this.hideThumbJob = new _util.Job(_this.hideThumb.bind(_assertThisInitialized(_this)), thumbHidingDelay);
103
- _this.calculateMetrics = function () {
104
- var primaryDimenstion = _this.props.vertical ? 'clientHeight' : 'clientWidth';
105
- var trackSize;
106
- if (_this.props.clientSize) {
107
- trackSize = _this.props.clientSize[primaryDimenstion];
108
- } else {
109
- trackSize = _this.containerRef.current[primaryDimenstion];
110
- }
111
- _this.minThumbSizeRatio = _resolution["default"].scale(minThumbSize) / trackSize;
112
- };
113
- _this.getContainerRef = function () {
114
- return _this.containerRef;
115
- };
116
- _this.containerRef = /*#__PURE__*/(0, _react.createRef)();
117
- _this.thumbRef = /*#__PURE__*/(0, _react.createRef)();
118
- return _this;
119
- }
120
- _createClass(ScrollbarBase, [{
121
- key: "componentDidMount",
122
- value: function componentDidMount() {
123
- this.calculateMetrics();
124
- }
125
- }, {
126
- key: "componentDidUpdate",
127
- value: function componentDidUpdate() {
128
- this.calculateMetrics();
129
- }
130
- }, {
131
- key: "componentWillUnmount",
132
- value: function componentWillUnmount() {
133
- this.hideThumbJob.stop();
134
- }
135
- }, {
136
- key: "render",
137
- value: function render() {
138
- var _this$props = this.props,
139
- childRenderer = _this$props.childRenderer,
140
- className = _this$props.className,
141
- corner = _this$props.corner,
142
- css = _this$props.css,
143
- vertical = _this$props.vertical,
144
- rest = _objectWithoutProperties(_this$props, _excluded),
145
- containerClassName = (0, _classnames["default"])(className, css.scrollbar, corner ? css.corner : null, vertical ? css.vertical : css.horizontal);
146
- delete rest.clientSize;
147
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, rest), {}, {
148
- className: containerClassName,
149
- ref: this.containerRef,
150
- children: childRenderer({
151
- getContainerRef: this.getContainerRef,
152
- thumbRef: this.thumbRef
153
- })
154
- }));
155
- }
156
- }]);
157
- return ScrollbarBase;
158
- }(_react.PureComponent);
159
- /**
160
- * An unstyled scroll bar. It is used in {@link ui/Scrollable.Scrollable|Scrollable}.
161
- *
162
- * @class Scrollbar
163
- * @memberof ui/Scrollable
164
- * @ui
165
- * @private
166
- */
167
- ScrollbarBase.displayName = 'ui:Scrollbar';
168
- ScrollbarBase.propTypes = /** @lends ui/Scrollable.Scrollbar.prototype */{
169
- /**
170
- * The render function for child.
171
- *
172
- * @type {Function}
173
- * @required
174
- * @private
175
- */
176
- childRenderer: _propTypes["default"].func.isRequired,
177
- /**
178
- * Client size of the container; valid values are an object that has `clientWidth` and `clientHeight`.
179
- *
180
- * @type {Object}
181
- * @property {Number} clientHeight The client height of the list.
182
- * @property {Number} clientWidth The client width of the list.
183
- * @public
184
- */
185
- clientSize: _propTypes["default"].shape({
186
- clientHeight: _propTypes["default"].number.isRequired,
187
- clientWidth: _propTypes["default"].number.isRequired
188
- }),
189
- /**
190
- * If `true`, add the corner between vertical and horizontal scrollbars.
191
- *
192
- * @type {Booelan}
193
- * @default false
194
- * @public
195
- */
196
- corner: _propTypes["default"].bool,
197
- /**
198
- * Customizes the component by mapping the supplied collection of CSS class names to the
199
- * corresponding internal Elements and states of this component.
200
- *
201
- * The following classes are supported:
202
- *
203
- * * `scrollbar` - The scrollbar component class
204
- *
205
- * @type {Object}
206
- * @public
207
- */
208
- css: _propTypes["default"].object,
209
- /**
210
- * If `true`, the scrollbar will be oriented vertically.
211
- *
212
- * @type {Boolean}
213
- * @default true
214
- * @public
215
- */
216
- vertical: _propTypes["default"].bool
217
- };
218
- ScrollbarBase.defaultProps = {
219
- childRenderer: nop,
220
- // eslint-disable-line react/default-props-match-prop-types
221
- corner: false,
222
- css: _ScrollbarModule["default"],
223
- vertical: true
224
- };
225
- var Scrollbar = exports.Scrollbar = /*#__PURE__*/function (_Component) {
226
- _inherits(Scrollbar, _Component);
227
- var _super2 = _createSuper(Scrollbar);
228
- function Scrollbar() {
229
- var _this2;
230
- _classCallCheck(this, Scrollbar);
231
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
232
- args[_key] = arguments[_key];
233
- }
234
- _this2 = _super2.call.apply(_super2, [this].concat(args));
235
- _this2.setApi = function (ref) {
236
- if (ref) {
237
- var getContainerRef = ref.getContainerRef,
238
- showThumb = ref.showThumb,
239
- startHidingThumb = ref.startHidingThumb,
240
- uiUpdate = ref.update;
241
- _this2.getContainerRef = getContainerRef;
242
- _this2.showThumb = showThumb;
243
- _this2.startHidingThumb = startHidingThumb;
244
- _this2.update = uiUpdate;
245
- }
246
- };
247
- return _this2;
248
- }
249
- _createClass(Scrollbar, [{
250
- key: "render",
251
- value: function render() {
252
- var vertical = this.props.vertical;
253
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScrollbarBase, _objectSpread(_objectSpread({}, this.props), {}, {
254
- ref: this.setApi,
255
- childRenderer: function childRenderer(_ref) {
256
- var thumbRef = _ref.thumbRef;
257
- // eslint-disable-line react/jsx-no-bind
258
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollThumb["default"], {
259
- ref: thumbRef,
260
- vertical: vertical
261
- }, "thumb");
262
- }
263
- }));
264
- }
265
- }]);
266
- return Scrollbar;
267
- }(_react.Component);
268
- Scrollbar.propTypes = /** @lends ui/Scrollable.Scrollbar.prototype */{
269
- /**
270
- * If `true`, the scrollbar will be oriented vertically.
271
- *
272
- * @type {Boolean}
273
- * @default true
274
- * @public
275
- */
276
- vertical: _propTypes["default"].bool
277
- };
278
- Scrollbar.defaultProps = {
279
- vertical: true
280
- };
281
- var _default = exports["default"] = Scrollbar;
@@ -1,27 +0,0 @@
1
- .scrollbar {
2
- background: inherit;
3
- display: flex;
4
- border-color: transparent;
5
- visibility: visible;
6
- opacity: 1;
7
- flex: none;
8
- transform: translateZ(0);
9
- -webkit-transform: translateZ(0);
10
- transition: opacity 0.1s linear;
11
- -moz-transition: opacity 0.1s linear;
12
- -webkit-transition: opacity 0.1s linear;
13
- /* ScrollThumb */
14
- }
15
- .scrollbar.vertical {
16
- flex-direction: column;
17
- }
18
- :global(.enact-locale-right-to-left) .scrollbar.horizontal {
19
- direction: ltr;
20
- transform: scaleX(-1);
21
- }
22
- .scrollbar.corner {
23
- -webkit-padding-end: 0.125rem;
24
- }
25
- .scrollbar .thumbShown {
26
- opacity: 1;
27
- }
@@ -1,3 +0,0 @@
1
- {
2
- "main": "Scrollable.js"
3
- }
@@ -1,10 +0,0 @@
1
- .scroller {
2
- /* hide native scrollbar */
3
- scrollbar-width: none;
4
- will-change: transform;
5
- /* hide native scrollbar */
6
- /* NOTE: Needs to be revisited whether it can be replaced with scrollbar-width */
7
- }
8
- .scroller::-webkit-scrollbar {
9
- display: none;
10
- }