@ebay/ui-core-react 6.2.1 → 6.3.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.
Files changed (171) hide show
  1. package/common/component-utils/array.polyfill.flat.js +11 -13
  2. package/common/component-utils/forwardRef.js +4 -17
  3. package/common/component-utils/usePrevious.js +3 -3
  4. package/common/component-utils/utils.js +13 -26
  5. package/common/debounce.js +3 -7
  6. package/common/event-utils/index.js +8 -11
  7. package/common/event-utils/use-key-press.js +10 -12
  8. package/common/event-utils/use-roving-index.js +13 -24
  9. package/common/floating-label-utils/hooks.js +43 -53
  10. package/common/notice-utils/notice-content.js +5 -6
  11. package/common/notice-utils/notice-cta.js +5 -16
  12. package/common/notice-utils/notice-footer.js +5 -16
  13. package/common/notice-utils/notice-title.js +6 -17
  14. package/common/random-id.js +1 -1
  15. package/common/range.js +1 -4
  16. package/common/tooltip-utils/tooltip-close-button.js +1 -1
  17. package/common/tooltip-utils/tooltip-content.js +16 -28
  18. package/common/tooltip-utils/tooltip-footer.js +3 -6
  19. package/common/tooltip-utils/tooltip-host.js +5 -16
  20. package/common/tooltip-utils/tooltip.d.ts +1 -1
  21. package/common/tooltip-utils/tooltip.js +14 -26
  22. package/common/tooltip-utils/use-tooltip.js +8 -9
  23. package/ebay-alert-dialog/alert-dialog.js +11 -22
  24. package/ebay-badge/badge.js +6 -17
  25. package/ebay-breadcrumbs/breadcrumb-item.js +7 -18
  26. package/ebay-breadcrumbs/breadcrumbs.js +19 -30
  27. package/ebay-button/button-cell.js +5 -16
  28. package/ebay-button/button-expand.d.ts +4 -2
  29. package/ebay-button/button-expand.d.ts.map +1 -1
  30. package/ebay-button/button-expand.js +7 -10
  31. package/ebay-button/button-loading.js +5 -5
  32. package/ebay-button/button-text.js +3 -6
  33. package/ebay-button/button.d.ts +1 -1
  34. package/ebay-button/button.js +31 -43
  35. package/ebay-calendar/calendar.js +94 -111
  36. package/ebay-calendar/date-utils.js +9 -18
  37. package/ebay-carousel/carousel-control-button.js +9 -10
  38. package/ebay-carousel/carousel-item.d.ts +1 -1
  39. package/ebay-carousel/carousel-item.js +14 -25
  40. package/ebay-carousel/carousel-list.js +21 -22
  41. package/ebay-carousel/carousel.js +32 -44
  42. package/ebay-carousel/helpers.js +35 -47
  43. package/ebay-carousel/scroll-to-transition.js +15 -15
  44. package/ebay-checkbox/checkbox.js +21 -32
  45. package/ebay-confirm-dialog/confirm-dialog.js +11 -22
  46. package/ebay-cta-button/cta-button.d.ts +1 -1
  47. package/ebay-cta-button/cta-button.js +9 -20
  48. package/ebay-date-textbox/date-textbox.js +37 -53
  49. package/ebay-dialog-base/components/animation.d.ts +0 -1
  50. package/ebay-dialog-base/components/animation.d.ts.map +1 -1
  51. package/ebay-dialog-base/components/animation.js +25 -28
  52. package/ebay-dialog-base/components/dialog-actions.js +2 -5
  53. package/ebay-dialog-base/components/dialog-close-button.d.ts +5 -2
  54. package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -1
  55. package/ebay-dialog-base/components/dialog-close-button.js +2 -5
  56. package/ebay-dialog-base/components/dialog-footer.js +2 -5
  57. package/ebay-dialog-base/components/dialog-header.js +4 -15
  58. package/ebay-dialog-base/components/dialog-previous-button.js +6 -17
  59. package/ebay-dialog-base/components/dialogBase.js +40 -51
  60. package/ebay-dialog-base/dialog-base-with-state.js +22 -35
  61. package/ebay-drawer-dialog/components/drawer.js +27 -50
  62. package/ebay-eek/eek-rating.js +8 -10
  63. package/ebay-eek/eek-util.d.ts +1 -1
  64. package/ebay-eek/eek-util.d.ts.map +1 -1
  65. package/ebay-eek/eek-util.js +7 -6
  66. package/ebay-fake-menu/menu-item-separator.js +5 -16
  67. package/ebay-fake-menu/menu-item.js +15 -26
  68. package/ebay-fake-menu/menu.js +11 -22
  69. package/ebay-fake-menu-button/menu-button-item.js +2 -2
  70. package/ebay-fake-menu-button/menu-button-label.d.ts +4 -2
  71. package/ebay-fake-menu-button/menu-button-label.d.ts.map +1 -1
  72. package/ebay-fake-menu-button/menu-button-label.js +2 -5
  73. package/ebay-fake-menu-button/menu-button-separator.js +5 -16
  74. package/ebay-fake-menu-button/menu-button.js +32 -45
  75. package/ebay-fake-tabs/fake-tabs.js +10 -23
  76. package/ebay-fake-tabs/tab.js +5 -16
  77. package/ebay-field/description.js +7 -19
  78. package/ebay-field/field.js +4 -5
  79. package/ebay-field/label.js +7 -18
  80. package/ebay-fullscreen-dialog/fullscreen-dialog.js +7 -18
  81. package/ebay-icon/icon.d.ts +1 -1
  82. package/ebay-icon/icon.js +17 -29
  83. package/ebay-icon-button/icon-button.d.ts +1 -1
  84. package/ebay-icon-button/icon-button.js +15 -27
  85. package/ebay-infotip/ebay-infotip-content.js +2 -5
  86. package/ebay-infotip/ebay-infotip-heading.js +5 -16
  87. package/ebay-infotip/ebay-infotip-host.d.ts +2 -2
  88. package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
  89. package/ebay-infotip/ebay-infotip-host.js +10 -24
  90. package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
  91. package/ebay-infotip/ebay-infotip.js +23 -34
  92. package/ebay-inline-notice/inline-notice.js +15 -27
  93. package/ebay-lightbox-dialog/lightbox-dialog.js +9 -21
  94. package/ebay-listbox-button/listbox-button-option.js +7 -18
  95. package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
  96. package/ebay-listbox-button/listbox-button.js +79 -100
  97. package/ebay-menu/menu-item-separator.js +5 -16
  98. package/ebay-menu/menu-item.js +12 -23
  99. package/ebay-menu/menu.d.ts +1 -1
  100. package/ebay-menu/menu.js +37 -64
  101. package/ebay-menu-button/README.md +1 -1
  102. package/ebay-menu-button/menu-button-item.js +1 -1
  103. package/ebay-menu-button/menu-button-label.d.ts +4 -2
  104. package/ebay-menu-button/menu-button-label.d.ts.map +1 -1
  105. package/ebay-menu-button/menu-button-label.js +2 -5
  106. package/ebay-menu-button/menu-button-separator.js +5 -16
  107. package/ebay-menu-button/menu-button.js +46 -60
  108. package/ebay-notice-base/components/ebay-notice-content/notice-content.js +1 -1
  109. package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts +5 -2
  110. package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -1
  111. package/ebay-notice-base/components/ebay-notice-title/notice-title.js +2 -5
  112. package/ebay-page-notice/page-notice-cta.js +3 -6
  113. package/ebay-page-notice/page-notice-footer.js +3 -6
  114. package/ebay-page-notice/page-notice-title.js +5 -16
  115. package/ebay-page-notice/page-notice.js +16 -27
  116. package/ebay-pagination/helpers.js +21 -24
  117. package/ebay-pagination/pagination-item.d.ts +1 -1
  118. package/ebay-pagination/pagination-item.js +16 -27
  119. package/ebay-pagination/pagination.js +52 -81
  120. package/ebay-panel-dialog/panel-dialog.js +9 -21
  121. package/ebay-progress-bar/progress-bar.js +5 -16
  122. package/ebay-progress-spinner/progress-spinner.js +7 -18
  123. package/ebay-progress-stepper/ebay-progress-step.js +14 -25
  124. package/ebay-progress-stepper/ebay-progress-stepper.js +10 -21
  125. package/ebay-progress-stepper/ebay-progress-title.js +2 -5
  126. package/ebay-radio/radio.js +18 -29
  127. package/ebay-section-notice/section-notice-footer.js +3 -6
  128. package/ebay-section-notice/section-notice-title.js +5 -16
  129. package/ebay-section-notice/section-notice.js +24 -39
  130. package/ebay-section-title/cta.js +5 -16
  131. package/ebay-section-title/info.js +5 -16
  132. package/ebay-section-title/overflow.js +5 -16
  133. package/ebay-section-title/section-title.js +13 -24
  134. package/ebay-section-title/subtitle.js +5 -16
  135. package/ebay-section-title/title.js +5 -16
  136. package/ebay-select/ebay-select-option.js +4 -15
  137. package/ebay-select/ebay-select.d.ts +1 -1
  138. package/ebay-select/ebay-select.js +34 -45
  139. package/ebay-signal/signal.js +6 -17
  140. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +5 -16
  141. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +27 -38
  142. package/ebay-split-button/split-button.js +10 -21
  143. package/ebay-star-rating/star-rating.js +8 -19
  144. package/ebay-star-rating-select/star-rating-select.js +20 -31
  145. package/ebay-svg/svg.js +3 -3
  146. package/ebay-switch/ebay-switch.js +10 -21
  147. package/ebay-tabs/tab-panel.js +5 -16
  148. package/ebay-tabs/tab.js +5 -16
  149. package/ebay-tabs/tabs.js +26 -40
  150. package/ebay-textbox/postfix-icon.js +7 -18
  151. package/ebay-textbox/prefix-icon.js +5 -16
  152. package/ebay-textbox/textbox.d.ts +1 -1
  153. package/ebay-textbox/textbox.js +42 -53
  154. package/ebay-toast-dialog/components/toast.js +6 -17
  155. package/ebay-tooltip/ebay-tooltip-content.js +1 -1
  156. package/ebay-tooltip/ebay-tooltip-host.js +1 -1
  157. package/ebay-tooltip/ebay-tooltip.js +21 -32
  158. package/ebay-tourtip/ebay-tourtip-content.js +1 -1
  159. package/ebay-tourtip/ebay-tourtip-footer.js +4 -7
  160. package/ebay-tourtip/ebay-tourtip-heading.js +6 -17
  161. package/ebay-tourtip/ebay-tourtip-host.js +1 -1
  162. package/ebay-tourtip/ebay-tourtip.js +22 -33
  163. package/ebay-video/controls.d.ts.map +1 -1
  164. package/ebay-video/controls.js +23 -46
  165. package/ebay-video/reportButton.d.ts +7 -2
  166. package/ebay-video/reportButton.d.ts.map +1 -1
  167. package/ebay-video/reportButton.js +5 -8
  168. package/ebay-video/source.js +3 -14
  169. package/ebay-video/video.d.ts.map +1 -1
  170. package/ebay-video/video.js +54 -80
  171. package/package.json +23 -18
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -48,32 +37,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
48
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
49
38
  };
50
39
  Object.defineProperty(exports, "__esModule", { value: true });
51
- var react_1 = __importStar(require("react"));
52
- var component_utils_1 = require("../common/component-utils");
53
- var tooltip_utils_1 = require("../common/tooltip-utils");
54
- var ebay_tourtip_content_1 = __importDefault(require("./ebay-tourtip-content"));
55
- var ebay_tourtip_host_1 = __importDefault(require("./ebay-tourtip-host"));
56
- var ebay_tourtip_footer_1 = __importDefault(require("./ebay-tourtip-footer"));
57
- var ebay_tourtip_heading_1 = __importDefault(require("./ebay-tourtip-heading"));
58
- var EbayTourtip = function (_a) {
59
- var a11yCloseText = _a.a11yCloseText, ariaLabel = _a["aria-label"], className = _a.className, children = _a.children, onCollapse = _a.onCollapse, onExpand = _a.onExpand, overlayStyle = _a.overlayStyle, pointer = _a.pointer, rest = __rest(_a, ["a11yCloseText", 'aria-label', "className", "children", "onCollapse", "onExpand", "overlayStyle", "pointer"]);
60
- var hostRef = (0, react_1.useRef)();
61
- var _b = (0, tooltip_utils_1.useTooltip)({ onExpand: onExpand, onCollapse: onCollapse, initialExpanded: true, hostRef: hostRef }), isExpanded = _b.isExpanded, collapseTooltip = _b.collapseTooltip;
62
- var containerRef = (0, react_1.useRef)();
63
- var content = (0, component_utils_1.findComponent)(children, ebay_tourtip_content_1.default);
40
+ const react_1 = __importStar(require("react"));
41
+ const component_utils_1 = require("../common/component-utils");
42
+ const tooltip_utils_1 = require("../common/tooltip-utils");
43
+ const ebay_tourtip_content_1 = __importDefault(require("./ebay-tourtip-content"));
44
+ const ebay_tourtip_host_1 = __importDefault(require("./ebay-tourtip-host"));
45
+ const ebay_tourtip_footer_1 = __importDefault(require("./ebay-tourtip-footer"));
46
+ const ebay_tourtip_heading_1 = __importDefault(require("./ebay-tourtip-heading"));
47
+ const EbayTourtip = (_a) => {
48
+ var { a11yCloseText, 'aria-label': ariaLabel, className, children, onCollapse, onExpand, overlayStyle, pointer } = _a, rest = __rest(_a, ["a11yCloseText", 'aria-label', "className", "children", "onCollapse", "onExpand", "overlayStyle", "pointer"]);
49
+ const hostRef = (0, react_1.useRef)();
50
+ const { isExpanded, collapseTooltip } = (0, tooltip_utils_1.useTooltip)({ onExpand, onCollapse, initialExpanded: true, hostRef });
51
+ const containerRef = (0, react_1.useRef)();
52
+ const content = (0, component_utils_1.findComponent)(children, ebay_tourtip_content_1.default);
64
53
  if (!content) {
65
- throw new Error("EbayTourtip: Please use a EbayTourtipContent that defines the content of the tourtip");
54
+ throw new Error(`EbayTourtip: Please use a EbayTourtipContent that defines the content of the tourtip`);
66
55
  }
67
- var _c = content.props, contentChildren = _c.children, contentProps = _c.contentProps;
68
- var host = (0, component_utils_1.findComponent)(children, ebay_tourtip_host_1.default);
56
+ const { children: contentChildren, contentProps } = content.props;
57
+ const host = (0, component_utils_1.findComponent)(children, ebay_tourtip_host_1.default);
69
58
  if (!host) {
70
- throw new Error("EbayTourtip: Please use a EbayTourtipHost that defines the host of the tourtip");
59
+ throw new Error(`EbayTourtip: Please use a EbayTourtipHost that defines the host of the tourtip`);
71
60
  }
72
- var heading = (0, component_utils_1.findComponent)(children, ebay_tourtip_heading_1.default);
73
- var footer = (0, component_utils_1.findComponent)(children, ebay_tourtip_footer_1.default);
74
- return (react_1.default.createElement(tooltip_utils_1.Tooltip, __assign({}, rest, { className: className, type: "tourtip", isExpanded: isExpanded, ref: containerRef }),
75
- react_1.default.createElement(tooltip_utils_1.TooltipHost, __assign({}, host.props, { forwardedRef: hostRef, "aria-label": ariaLabel, "aria-expanded": isExpanded })),
76
- react_1.default.createElement(tooltip_utils_1.TooltipContent, __assign({}, contentProps, { a11yCloseText: a11yCloseText, onClose: collapseTooltip, pointer: pointer, showCloseButton: true, style: overlayStyle, type: "tourtip" }),
61
+ const heading = (0, component_utils_1.findComponent)(children, ebay_tourtip_heading_1.default);
62
+ const footer = (0, component_utils_1.findComponent)(children, ebay_tourtip_footer_1.default);
63
+ return (react_1.default.createElement(tooltip_utils_1.Tooltip, Object.assign({}, rest, { className: className, type: "tourtip", isExpanded: isExpanded, ref: containerRef }),
64
+ react_1.default.createElement(tooltip_utils_1.TooltipHost, Object.assign({}, host.props, { forwardedRef: hostRef, "aria-label": ariaLabel, "aria-expanded": isExpanded })),
65
+ react_1.default.createElement(tooltip_utils_1.TooltipContent, Object.assign({}, contentProps, { a11yCloseText: a11yCloseText, onClose: collapseTooltip, pointer: pointer, showCloseButton: true, style: overlayStyle, type: "tourtip" }),
77
66
  heading,
78
67
  contentChildren,
79
68
  footer && (react_1.default.createElement(tooltip_utils_1.TooltipFooter, { type: "tourtip" }, footer)))));
@@ -1 +1 @@
1
- {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/ebay-video/controls.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,CAAC,QAAQ,aAAW,GAAG;IAAE,MAAM,MAAA;CAAE,CA2B9D"}
1
+ {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/ebay-video/controls.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,CAAC,QAAQ,aAAW,GAAG;IAAE,MAAM,EAAE,GAAG,CAAA;CAAE,CAkCnE"}
@@ -1,63 +1,40 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
6
  exports.customControls = void 0;
22
- var react_1 = __importDefault(require("react"));
23
- var react_dom_1 = __importDefault(require("react-dom"));
7
+ const react_1 = __importDefault(require("react"));
8
+ const client_1 = require("react-dom/client");
24
9
  // need that for broken definitions workaround
25
10
  // @ts-ignore
26
- var shaka_player_ui_1 = require("shaka-player/dist/shaka-player.ui");
27
- var reportButton_1 = require("./reportButton");
28
- function customControls(onReport) {
29
- if (onReport === void 0) { onReport = function () { }; }
11
+ const shaka_player_ui_1 = require("shaka-player/dist/shaka-player.ui");
12
+ const reportButton_1 = require("./reportButton");
13
+ function customControls(onReport = () => { }) {
30
14
  // Have to contain in order to not execute until shaka is downloaded
31
15
  // eslint-disable-next-line no-extra-parens
32
- var Report = /** @class */ (function (_super) {
33
- __extends(class_1, _super);
34
- function class_1(parent, controls, text) {
35
- var _this = _super.call(this, parent, controls) || this;
36
- appendChild(parent, react_1.default.createElement(reportButton_1.ReportButton, null, text), function (button) {
16
+ const Report = class extends shaka_player_ui_1.ui.Element {
17
+ constructor(parent, controls, text) {
18
+ super(parent, controls);
19
+ const tempEl = document.createElement('div');
20
+ const buttonCallback = () => {
21
+ const reportButton = tempEl.firstChild;
22
+ parent.appendChild(reportButton);
23
+ tempEl.remove();
37
24
  // have to listen to clicks this way (React onClick will not work):
38
- _this.eventManager.listen(button, 'click', onReport);
39
- });
40
- return _this;
25
+ this.eventManager.listen(reportButton, 'click', onReport);
26
+ };
27
+ (0, client_1.createRoot)(tempEl).render(react_1.default.createElement(reportButton_1.ReportButton, { callback: buttonCallback }, text));
41
28
  }
42
- return class_1;
43
- }(shaka_player_ui_1.ui.Element));
44
- Report.Factory = /** @class */ (function () {
45
- function class_2(reportText) {
29
+ };
30
+ Report.Factory = class {
31
+ constructor(reportText) {
46
32
  this.reportText = reportText;
47
33
  }
48
- class_2.prototype.create = function (rootElement, controls) {
34
+ create(rootElement, controls) {
49
35
  return new Report(rootElement, controls, this.reportText);
50
- };
51
- return class_2;
52
- }());
53
- return { Report: Report };
36
+ }
37
+ };
38
+ return { Report };
54
39
  }
55
40
  exports.customControls = customControls;
56
- function appendChild(container, reactElement, callback) {
57
- var tempEl = document.createElement('div');
58
- react_dom_1.default.render(reactElement, tempEl, function () {
59
- var child = tempEl.firstChild;
60
- container.appendChild(child);
61
- callback(child);
62
- });
63
- }
@@ -1,3 +1,8 @@
1
- import { FC } from 'react';
2
- export declare const ReportButton: FC;
1
+ import { JSX, ReactNode } from 'react';
2
+ type ReportButtonProps = {
3
+ callback?: (button: HTMLElement) => void;
4
+ children?: ReactNode;
5
+ };
6
+ export declare const ReportButton: ({ callback, children }: ReportButtonProps) => JSX.Element;
7
+ export {};
3
8
  //# sourceMappingURL=reportButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reportButton.d.ts","sourceRoot":"","sources":["../../src/ebay-video/reportButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,eAAO,MAAM,YAAY,EAAE,EAI1B,CAAA"}
1
+ {"version":3,"file":"reportButton.d.ts","sourceRoot":"","sources":["../../src/ebay-video/reportButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG7C,KAAK,iBAAiB,GAAG;IACrB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,2BAA4B,iBAAiB,KAAG,WAIxE,CAAA"}
@@ -4,12 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ReportButton = void 0;
7
- var react_1 = __importDefault(require("react"));
8
- var ebay_icon_1 = require("../ebay-icon");
9
- var ReportButton = function (_a) {
10
- var children = _a.children;
11
- return (react_1.default.createElement("button", { className: "video-player__report-button" },
12
- react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "flag24" }),
13
- children));
14
- };
7
+ const react_1 = __importDefault(require("react"));
8
+ const ebay_icon_1 = require("../ebay-icon");
9
+ const ReportButton = ({ callback, children }) => (react_1.default.createElement("button", { className: "video-player__report-button", ref: callback },
10
+ react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "flag24" }),
11
+ children));
15
12
  exports.ReportButton = ReportButton;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __rest = (this && this.__rest) || function (s, e) {
14
3
  var t = {};
15
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -25,9 +14,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
15
  };
27
16
  Object.defineProperty(exports, "__esModule", { value: true });
28
- var react_1 = __importDefault(require("react"));
29
- var EbayVideoSource = function (_a) {
17
+ const react_1 = __importDefault(require("react"));
18
+ const EbayVideoSource = (_a) => {
30
19
  var rest = __rest(_a, []);
31
- return react_1.default.createElement("source", __assign({}, rest));
20
+ return react_1.default.createElement("source", Object.assign({}, rest));
32
21
  };
33
22
  exports.default = EbayVideoSource;
@@ -1 +1 @@
1
- {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/ebay-video/video.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAkB,UAAU,EAA+B,MAAM,OAAO,CAAA;AAS1G,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAClB,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,gBAAgB,CAAC,GAAG;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqOjC,CAAA;AAgBD,eAAe,SAAS,CAAA"}
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/ebay-video/video.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAkB,UAAU,EAA+B,MAAM,OAAO,CAAA;AAS1G,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAClB,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,gBAAgB,CAAC,GAAG;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmOjC,CAAA;AAgBD,eAAe,SAAS,CAAA"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -44,76 +33,63 @@ var __rest = (this && this.__rest) || function (s, e) {
44
33
  }
45
34
  return t;
46
35
  };
47
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
48
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
49
- if (ar || !(i in from)) {
50
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
51
- ar[i] = from[i];
52
- }
53
- }
54
- return to.concat(ar || Array.prototype.slice.call(from));
55
- };
56
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
57
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
58
38
  };
59
39
  Object.defineProperty(exports, "__esModule", { value: true });
60
- var react_1 = __importStar(require("react"));
61
- var classnames_1 = __importDefault(require("classnames"));
40
+ const react_1 = __importStar(require("react"));
41
+ const classnames_1 = __importDefault(require("classnames"));
62
42
  // need that for broken definitions workaround
63
43
  // @ts-ignore
64
- var shaka_player_ui_1 = __importDefault(require("shaka-player/dist/shaka-player.ui"));
65
- var component_utils_1 = require("../common/component-utils");
66
- var ebay_icon_1 = require("../ebay-icon");
67
- var ebay_progress_spinner_1 = require("../ebay-progress-spinner");
68
- var source_1 = __importDefault(require("./source"));
69
- var const_1 = require("./const");
70
- var controls_1 = require("./controls");
71
- var EbayVideo = function (_a) {
72
- var width = _a.width, height = _a.height, thumbnail = _a.thumbnail, action = _a.action, muted = _a.muted, _b = _a.playView, playView = _b === void 0 ? 'inline' : _b, a11yLoadText = _a.a11yLoadText, a11yPlayText = _a.a11yPlayText, reportText = _a.reportText, volumeSlider = _a.volumeSlider, _c = _a.volume, volume = _c === void 0 ? 1 : _c, hideReportButton = _a.hideReportButton, errorText = _a.errorText, _d = _a.onVolumeChange, onVolumeChange = _d === void 0 ? function () {
73
- } : _d, _e = _a.onLoadError, onLoadError = _e === void 0 ? function () {
74
- } : _e, _f = _a.onPlay, onPlay = _f === void 0 ? function () {
75
- } : _f, _g = _a.onReport, onReport = _g === void 0 ? function () {
76
- } : _g, children = _a.children, rest = __rest(_a, ["width", "height", "thumbnail", "action", "muted", "playView", "a11yLoadText", "a11yPlayText", "reportText", "volumeSlider", "volume", "hideReportButton", "errorText", "onVolumeChange", "onLoadError", "onPlay", "onReport", "children"]);
77
- var _h = (0, react_1.useState)(), loaded = _h[0], setLoaded = _h[1];
78
- var _j = (0, react_1.useState)(), buffering = _j[0], setBuffering = _j[1];
79
- var _k = (0, react_1.useState)(), playing = _k[0], setPlaying = _k[1];
80
- var _l = (0, react_1.useState)(), failed = _l[0], setFailed = _l[1];
81
- var containerRef = (0, react_1.useRef)(null);
82
- var videoRef = (0, react_1.useRef)(null);
83
- var playerRef = (0, react_1.useRef)(null);
84
- var uiRef = (0, react_1.useRef)(null);
85
- var sources = (0, component_utils_1.filterByType)(children, source_1.default).map(function (_a) {
86
- var props = _a.props;
87
- return props;
88
- });
89
- var handleError = function (err) {
44
+ const shaka_player_ui_1 = __importDefault(require("shaka-player/dist/shaka-player.ui"));
45
+ const component_utils_1 = require("../common/component-utils");
46
+ const ebay_icon_1 = require("../ebay-icon");
47
+ const ebay_progress_spinner_1 = require("../ebay-progress-spinner");
48
+ const source_1 = __importDefault(require("./source"));
49
+ const const_1 = require("./const");
50
+ const controls_1 = require("./controls");
51
+ const EbayVideo = (_a) => {
52
+ var { width, height, thumbnail, action, muted, playView = 'inline', a11yLoadText, a11yPlayText, reportText, volumeSlider, volume = 1, hideReportButton, errorText, onVolumeChange = () => {
53
+ }, onLoadError = () => {
54
+ }, onPlay = () => {
55
+ }, onReport = () => {
56
+ }, children } = _a, rest = __rest(_a, ["width", "height", "thumbnail", "action", "muted", "playView", "a11yLoadText", "a11yPlayText", "reportText", "volumeSlider", "volume", "hideReportButton", "errorText", "onVolumeChange", "onLoadError", "onPlay", "onReport", "children"]);
57
+ const [loaded, setLoaded] = (0, react_1.useState)();
58
+ const [buffering, setBuffering] = (0, react_1.useState)();
59
+ const [playing, setPlaying] = (0, react_1.useState)();
60
+ const [failed, setFailed] = (0, react_1.useState)();
61
+ const containerRef = (0, react_1.useRef)(null);
62
+ const videoRef = (0, react_1.useRef)(null);
63
+ const playerRef = (0, react_1.useRef)(null);
64
+ const uiRef = (0, react_1.useRef)(null);
65
+ const sources = (0, component_utils_1.filterByType)(children, source_1.default).map(({ props }) => props);
66
+ const handleError = (err) => {
90
67
  setLoaded(true);
91
68
  setFailed(true);
92
69
  onLoadError(err);
93
70
  };
94
- var loadSource = function (index) {
71
+ const loadSource = (index = 0) => {
95
72
  var _a;
96
- if (index === void 0) { index = 0; }
97
73
  if (!sources.length || !playerRef.current)
98
74
  return;
99
75
  setLoaded(false);
100
76
  playerRef.current
101
77
  .load((_a = sources[index]) === null || _a === void 0 ? void 0 : _a.src)
102
- .then(function () {
78
+ .then(() => {
103
79
  setFailed(false);
104
80
  })
105
- .catch(function (err) {
81
+ .catch(err => {
106
82
  console.error(err);
107
83
  switch (err.code) {
108
84
  case const_1.ERROR_ANOTHER_LOAD:
109
85
  return;
110
86
  case const_1.ERROR_NO_PLAYER:
111
- setTimeout(function () { return loadSource(index); }, 0);
87
+ setTimeout(() => loadSource(index), 0);
112
88
  break;
113
89
  default: {
114
- var nextIndex_1 = sources.length > index + 1 && index + 1;
115
- if (nextIndex_1) {
116
- setTimeout(function () { return loadSource(nextIndex_1); }, 0);
90
+ const nextIndex = sources.length > index + 1 && index + 1;
91
+ if (nextIndex) {
92
+ setTimeout(() => loadSource(nextIndex), 0);
117
93
  }
118
94
  else {
119
95
  handleError(err);
@@ -121,13 +97,13 @@ var EbayVideo = function (_a) {
121
97
  }
122
98
  }
123
99
  })
124
- .finally(function () {
100
+ .finally(() => {
125
101
  setLoaded(true);
126
102
  });
127
103
  };
128
- (0, react_1.useEffect)(function () {
129
- var video = videoRef.current;
130
- var container = containerRef.current;
104
+ (0, react_1.useEffect)(() => {
105
+ const video = videoRef.current;
106
+ const container = containerRef.current;
131
107
  if (!video || !container)
132
108
  return;
133
109
  video.volume = volume;
@@ -136,7 +112,7 @@ var EbayVideo = function (_a) {
136
112
  if (!playerRef.current)
137
113
  return;
138
114
  playerRef.current.addEventListener('error', handleError);
139
- playerRef.current.addEventListener('buffering', function (e) {
115
+ playerRef.current.addEventListener('buffering', (e) => {
140
116
  setBuffering(e.buffering);
141
117
  });
142
118
  uiRef.current = new shaka_player_ui_1.default.ui.Overlay(playerRef.current, container, video, reportText);
@@ -146,7 +122,7 @@ var EbayVideo = function (_a) {
146
122
  addSeekBar: false
147
123
  });
148
124
  if (!hideReportButton) {
149
- var Report = (0, controls_1.customControls)(onReport).Report;
125
+ const { Report } = (0, controls_1.customControls)(onReport);
150
126
  shaka_player_ui_1.default.ui.Controls.registerElement('report', new Report.Factory(reportText));
151
127
  }
152
128
  loadSource();
@@ -156,7 +132,7 @@ var EbayVideo = function (_a) {
156
132
  // uiRef.current.destroy()
157
133
  // }
158
134
  }, []);
159
- (0, react_1.useEffect)(function () {
135
+ (0, react_1.useEffect)(() => {
160
136
  switch (action) {
161
137
  case 'play':
162
138
  videoRef.current.play();
@@ -167,16 +143,16 @@ var EbayVideo = function (_a) {
167
143
  default:
168
144
  }
169
145
  }, [action]);
170
- var showControls = function () {
146
+ const showControls = () => {
171
147
  if (!uiRef.current)
172
148
  return;
173
- var updatedControls = volumeSlider ? {
149
+ const updatedControls = volumeSlider ? {
174
150
  controlPanelElements: withVolumeControl(const_1.defaultVideoConfig.controlPanelElements)
175
151
  } : {};
176
- uiRef.current.configure(__assign(__assign({}, const_1.defaultVideoConfig), updatedControls));
152
+ uiRef.current.configure(Object.assign(Object.assign({}, const_1.defaultVideoConfig), updatedControls));
177
153
  videoRef.current.controls = false;
178
154
  };
179
- var handlePlaying = function (e) {
155
+ const handlePlaying = (e) => {
180
156
  e.stopPropagation();
181
157
  showControls();
182
158
  if (playView === 'fullscreen') {
@@ -185,24 +161,24 @@ var EbayVideo = function (_a) {
185
161
  setPlaying(true);
186
162
  onPlay(e, { player: playerRef.current });
187
163
  };
188
- var handleOnPlayClick = function () {
164
+ const handleOnPlayClick = () => {
189
165
  videoRef.current.play();
190
166
  };
191
- var handleVolumeChange = function (e) {
192
- var eventTarget = e.currentTarget;
167
+ const handleVolumeChange = (e) => {
168
+ const eventTarget = e.currentTarget;
193
169
  onVolumeChange(e, {
194
170
  volume: Math.round((eventTarget.volume + Number.EPSILON) * 100) / 100,
195
171
  muted: eventTarget.muted
196
172
  });
197
173
  };
198
- var handleOnPause = function () {
174
+ const handleOnPause = () => {
199
175
  // On IOS, the controls force showing up if the video exist fullscreen while playing.
200
176
  // This forces the controls to always hide
201
177
  videoRef.current.controls = false;
202
178
  };
203
- var style = {
204
- width: width ? "".concat(width, "px") : undefined,
205
- height: height ? "".concat(height, "px") : undefined
179
+ const style = {
180
+ width: width ? `${width}px` : undefined,
181
+ height: height ? `${height}px` : undefined
206
182
  };
207
183
  return (react_1.default.createElement("div", { style: style, className: (0, classnames_1.default)('video-player', { 'video-player--poster': !playing }) },
208
184
  !playing && loaded && !failed && !buffering &&
@@ -210,9 +186,7 @@ var EbayVideo = function (_a) {
210
186
  react_1.default.createElement("button", { onClick: handleOnPlayClick, className: "shaka-play-button", style: { opacity: 1, zIndex: 999 }, "aria-label": a11yPlayText },
211
187
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "playFilled64Colored" }))),
212
188
  react_1.default.createElement("div", { className: "video-player__container", ref: containerRef },
213
- react_1.default.createElement("video", __assign({ ref: videoRef, style: style, poster: thumbnail, muted: muted || false, onPlaying: handlePlaying, onPause: handleOnPause, onVolumeChange: handleVolumeChange }, rest), sources.map(function (source, i) {
214
- react_1.default.createElement("source", __assign({ key: i }, source));
215
- }))),
189
+ react_1.default.createElement("video", Object.assign({ ref: videoRef, style: style, poster: thumbnail, muted: muted || false, onPlaying: handlePlaying, onPause: handleOnPause, onVolumeChange: handleVolumeChange }, rest), sources.map((source, i) => react_1.default.createElement("source", Object.assign({ key: i }, source))))),
216
190
  react_1.default.createElement("div", { className: (0, classnames_1.default)('video-player__overlay', { 'video-player__overlay--hidden': !failed }) },
217
191
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "attention64" }),
218
192
  react_1.default.createElement("div", { className: "video-player__overlay-text" }, errorText)),
@@ -222,13 +196,13 @@ var EbayVideo = function (_a) {
222
196
  react_1.default.createElement(ebay_progress_spinner_1.EbayProgressSpinner, { size: "large", "aria-label": a11yLoadText }))));
223
197
  };
224
198
  function withVolumeControl(controls) {
225
- var insertAt = controls.length - 2 > 0 ? controls.length - 2 : controls.length;
226
- var controlsWithVolume = __spreadArray([], controls, true);
199
+ const insertAt = controls.length - 2 > 0 ? controls.length - 2 : controls.length;
200
+ const controlsWithVolume = [...controls];
227
201
  controlsWithVolume.splice(insertAt, 0, 'volume');
228
202
  return controlsWithVolume;
229
203
  }
230
204
  function hideSpinner(container) {
231
- var shakaSpinner = container.querySelectorAll('.shaka-spinner')[0];
205
+ const shakaSpinner = container.querySelectorAll('.shaka-spinner')[0];
232
206
  if (shakaSpinner) {
233
207
  shakaSpinner.setAttribute('hidden', '');
234
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebay/ui-core-react",
3
- "version": "6.2.1",
3
+ "version": "6.3.0",
4
4
  "description": "Skin components build off React",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
@@ -13,8 +13,9 @@
13
13
  "eslint-local": "eslint . --ext ts,tsx",
14
14
  "eslint": "eslint . --ext .ts,.tsx -f checkstyle -o ./lint/checkstyle-result.xml",
15
15
  "format": "eslint . --fix 'src/**/*.{ts,tsx}'",
16
- "storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 9001 -c .storybook",
17
- "storybook-node16": "start-storybook -p 9001 -c .storybook",
16
+ "storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 9001 -c .storybook",
17
+ "storybook-node16": "storybook dev -p 9001 -c .storybook",
18
+ "build-storybook": "storybook build",
18
19
  "test": "yarn jest",
19
20
  "build": "yarn typecheck && yarn tsc",
20
21
  "typecheck": "tsc --project tsconfig.typecheck.json",
@@ -43,8 +44,8 @@
43
44
  "license": "ISC",
44
45
  "peerDependencies": {
45
46
  "@ebay/skin": "^17.0.0",
46
- "react": "^16.0.0",
47
- "react-dom": "^16.0.0",
47
+ "react": ">= 16.0.0",
48
+ "react-dom": ">= 16.0.0",
48
49
  "shaka-player": "^4.3.2"
49
50
  },
50
51
  "dependencies": {
@@ -55,23 +56,26 @@
55
56
  "react-remove-scroll": "^2.2.0"
56
57
  },
57
58
  "devDependencies": {
59
+ "@babel/preset-env": "^7.23.9",
60
+ "@babel/preset-react": "^7.23.3",
61
+ "@babel/preset-typescript": "^7.23.3",
58
62
  "@babel/register": "^7.0.0",
59
63
  "@ebay/skin": "^17.0.0",
60
64
  "@microsoft/eslint-formatter-sarif": "^3.0.0",
61
- "@storybook/addon-a11y": "^6.5.6",
62
- "@storybook/addon-essentials": "^6.5.6",
63
- "@storybook/addon-knobs": "^6.0.28",
64
- "@storybook/addon-storyshots": "^6.5.6",
65
- "@storybook/react": "^6.5.6",
66
- "@storybook/storybook-deployer": "^2.8.11",
65
+ "@storybook/addon-a11y": "^7.6.12",
66
+ "@storybook/addon-essentials": "^7.4.6",
67
+ "@storybook/addon-storysource": "^7.6.12",
68
+ "@storybook/react": "^7.6.12",
69
+ "@storybook/react-webpack5": "^7.6.12",
67
70
  "@testing-library/dom": "^7.29.4",
68
71
  "@testing-library/jest-dom": "^6.1.4",
69
- "@testing-library/react": "^12",
72
+ "@testing-library/react": "^14.2.2",
70
73
  "@testing-library/react-hooks": "^7",
71
74
  "@testing-library/user-event": "^12",
72
75
  "@types/classnames": "^2.2.11",
73
- "@types/react": "^16.0",
74
- "@types/react-dom": "^16.0",
76
+ "@types/jest": "^29.5.12",
77
+ "@types/react": "^18",
78
+ "@types/react-dom": "^18",
75
79
  "@typescript-eslint/eslint-plugin": "^4.4.0",
76
80
  "@typescript-eslint/parser": "^4.10.0",
77
81
  "babel-loader": "^8.1.0",
@@ -92,11 +96,11 @@
92
96
  "jest-pnp-resolver": "^1.2.3",
93
97
  "lint-staged": "^10.5.3",
94
98
  "node-require-context": "^1.0.0",
95
- "react": "^16.0.0",
99
+ "react": "^18",
96
100
  "react-docgen-typescript-loader": "^3.7.2",
97
- "react-dom": "^16.0.0",
101
+ "react-dom": "^18",
98
102
  "shaka-player": "^4.3.2",
99
- "storybook-addon-jsx": "^7.3.14",
103
+ "storybook": "^7.5.1",
100
104
  "style-loader": "^2.0.0",
101
105
  "svgson": "^4.0.0",
102
106
  "ts-jest": "^29.1.1",
@@ -104,6 +108,7 @@
104
108
  "typescript": "4"
105
109
  },
106
110
  "resolutions": {
107
- "@types/react": "^16.14.2"
111
+ "@storybook/addon-actions": "~7.5.3",
112
+ "string-width": "4.2.3"
108
113
  }
109
114
  }