@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
@@ -26,49 +26,48 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- var react_1 = __importStar(require("react"));
30
- var classnames_1 = __importDefault(require("classnames"));
31
- var helpers_1 = require("./helpers");
32
- var scroll_to_transition_1 = require("./scroll-to-transition");
33
- var CarouselList = function (_a) {
34
- var _b = _a.gap, gap = _b === void 0 ? 16 : _b, itemsPerSlide = _a.itemsPerSlide, slideWidth = _a.slideWidth, offset = _a.offset, activeIndex = _a.activeIndex, nextControlDisabled = _a.nextControlDisabled, className = _a.className, itemsRef = _a.itemsRef, children = _a.children, onSetActiveIndex = _a.onSetActiveIndex, onScroll = _a.onScroll;
35
- var _c = (0, react_1.useState)(0), translateLeft = _c[0], setTranslateLeft = _c[1];
36
- var _d = (0, react_1.useState)(false), skipScrolling = _d[0], setSkipScrolling = _d[1];
37
- var _e = (0, react_1.useState)(false), scrollTransitioning = _e[0], setScrollTransitioning = _e[1];
38
- var listRef = (0, react_1.useRef)(null);
39
- var scrollTimeout = (0, react_1.useRef)(null);
40
- (0, react_1.useEffect)(function () {
41
- var size = react_1.Children.count(children);
29
+ const react_1 = __importStar(require("react"));
30
+ const classnames_1 = __importDefault(require("classnames"));
31
+ const helpers_1 = require("./helpers");
32
+ const scroll_to_transition_1 = require("./scroll-to-transition");
33
+ const CarouselList = ({ gap = 16, itemsPerSlide, slideWidth, offset, activeIndex, nextControlDisabled, className, itemsRef, children, onSetActiveIndex, onScroll }) => {
34
+ const [translateLeft, setTranslateLeft] = (0, react_1.useState)(0);
35
+ const [skipScrolling, setSkipScrolling] = (0, react_1.useState)(false);
36
+ const [scrollTransitioning, setScrollTransitioning] = (0, react_1.useState)(false);
37
+ const listRef = (0, react_1.useRef)(null);
38
+ const scrollTimeout = (0, react_1.useRef)(null);
39
+ (0, react_1.useEffect)(() => {
40
+ const size = react_1.Children.count(children);
42
41
  if (!size || !listRef.current)
43
42
  return;
44
43
  if (skipScrolling) {
45
44
  setSkipScrolling(false);
46
45
  return;
47
46
  }
48
- var list = listRef.current;
49
- var isNativeScroll = (0, helpers_1.isNativeScrolling)(list);
47
+ const list = listRef.current;
48
+ const isNativeScroll = (0, helpers_1.isNativeScrolling)(list);
50
49
  if (isNativeScroll) {
51
50
  setScrollTransitioning(true);
52
- (0, scroll_to_transition_1.scrollTransition)(list, offset, function () { return setScrollTransitioning(false); });
51
+ (0, scroll_to_transition_1.scrollTransition)(list, offset, () => setScrollTransitioning(false));
53
52
  }
54
53
  else {
55
54
  setTranslateLeft(offset);
56
55
  }
57
56
  }, [offset]);
58
- var handleFinishScrolling = (0, react_1.useCallback)(function () {
59
- var scrollLeft = listRef.current.scrollLeft;
60
- var closest = (0, helpers_1.getClosestIndex)(scrollLeft, itemsRef.current, slideWidth, itemsPerSlide, gap);
57
+ const handleFinishScrolling = (0, react_1.useCallback)(() => {
58
+ const scrollLeft = listRef.current.scrollLeft;
59
+ const closest = (0, helpers_1.getClosestIndex)(scrollLeft, itemsRef.current, slideWidth, itemsPerSlide, gap);
61
60
  if (closest !== activeIndex) {
62
61
  setSkipScrolling(true);
63
62
  onSetActiveIndex(closest);
64
63
  onScroll({ index: closest });
65
64
  }
66
65
  }, [listRef.current, itemsRef.current, slideWidth, activeIndex, onSetActiveIndex]);
67
- var handleScroll = function () {
66
+ const handleScroll = () => {
68
67
  if (scrollTimeout.current) {
69
68
  clearTimeout(scrollTimeout.current);
70
69
  }
71
- scrollTimeout.current = setTimeout(function () {
70
+ scrollTimeout.current = setTimeout(() => {
72
71
  if (!scrollTransitioning) {
73
72
  handleFinishScrolling();
74
73
  }
@@ -77,6 +76,6 @@ var CarouselList = function (_a) {
77
76
  return (react_1.default.createElement("div", { className: (0, classnames_1.default)('carousel__viewport', {
78
77
  'carousel__viewport--mask': !nextControlDisabled
79
78
  }, className) },
80
- react_1.default.createElement("ul", { className: "carousel__list", ref: listRef, onScroll: handleScroll, style: { transform: "translate3d(".concat(-translateLeft, "px, 0, 0)") } }, (0, helpers_1.alterChildren)(children, itemsRef, itemsPerSlide, slideWidth, offset, gap))));
79
+ react_1.default.createElement("ul", { className: "carousel__list", ref: listRef, onScroll: handleScroll, style: { transform: `translate3d(${-translateLeft}px, 0, 0)` } }, (0, helpers_1.alterChildren)(children, itemsRef, itemsPerSlide, slideWidth, offset, gap))));
81
80
  };
82
81
  exports.default = CarouselList;
@@ -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,58 +37,57 @@ 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 classnames_1 = __importDefault(require("classnames"));
53
- var carousel_control_button_1 = __importDefault(require("./carousel-control-button"));
54
- var carousel_list_1 = __importDefault(require("./carousel-list"));
55
- var helpers_1 = require("./helpers");
56
- var debounce_1 = require("../common/debounce");
40
+ const react_1 = __importStar(require("react"));
41
+ const classnames_1 = __importDefault(require("classnames"));
42
+ const carousel_control_button_1 = __importDefault(require("./carousel-control-button"));
43
+ const carousel_list_1 = __importDefault(require("./carousel-list"));
44
+ const helpers_1 = require("./helpers");
45
+ const debounce_1 = require("../common/debounce");
57
46
  // TO-DO:
58
47
  // Image slides
59
48
  // Auto play (+ onPlay/onPause callbacks)
60
- var EbayCarousel = function (_a) {
61
- var _b = _a.gap, gap = _b === void 0 ? 16 : _b, _c = _a.index, index = _c === void 0 ? 0 : _c, _itemsPerSlide = _a.itemsPerSlide, a11yPreviousText = _a.a11yPreviousText, a11yNextText = _a.a11yNextText, _d = _a.onScroll, onScroll = _d === void 0 ? function () { } : _d, _e = _a.onNext, onNext = _e === void 0 ? function () { } : _e, _f = _a.onPrevious, onPrevious = _f === void 0 ? function () { } : _f, _g = _a.onSlide, onSlide = _g === void 0 ? function () { } : _g, className = _a.className, children = _a.children, rest = __rest(_a, ["gap", "index", "itemsPerSlide", "a11yPreviousText", "a11yNextText", "onScroll", "onNext", "onPrevious", "onSlide", "className", "children"]);
62
- var _h = (0, react_1.useState)(index), activeIndex = _h[0], setActiveIndex = _h[1];
63
- var _j = (0, react_1.useState)(0), slideWidth = _j[0], setSlideWidth = _j[1];
64
- var _k = (0, react_1.useState)(0), offset = _k[0], setOffset = _k[1];
65
- var containerRef = (0, react_1.useRef)(null);
66
- var itemsRef = (0, react_1.useRef)([]);
67
- var itemCount = react_1.Children.count(children);
68
- var itemsPerSlide = Math.floor(_itemsPerSlide) || undefined;
69
- var isSingleSlide = itemCount <= itemsPerSlide;
70
- var prevControlDisabled = isSingleSlide || offset === 0;
71
- var nextControlDisabled = isSingleSlide || (offset === (0, helpers_1.getMaxOffset)(itemsRef.current, slideWidth));
72
- var handleResize = function () {
49
+ const EbayCarousel = (_a) => {
50
+ var { gap = 16, index = 0, itemsPerSlide: _itemsPerSlide, a11yPreviousText, a11yNextText, onScroll = () => { }, onNext = () => { }, onPrevious = () => { }, onSlide = () => { }, className, children } = _a, rest = __rest(_a, ["gap", "index", "itemsPerSlide", "a11yPreviousText", "a11yNextText", "onScroll", "onNext", "onPrevious", "onSlide", "className", "children"]);
51
+ const [activeIndex, setActiveIndex] = (0, react_1.useState)(index);
52
+ const [slideWidth, setSlideWidth] = (0, react_1.useState)(0);
53
+ const [offset, setOffset] = (0, react_1.useState)(0);
54
+ const containerRef = (0, react_1.useRef)(null);
55
+ const itemsRef = (0, react_1.useRef)([]);
56
+ const itemCount = react_1.Children.count(children);
57
+ const itemsPerSlide = Math.floor(_itemsPerSlide) || undefined;
58
+ const isSingleSlide = itemCount <= itemsPerSlide;
59
+ const prevControlDisabled = isSingleSlide || offset === 0;
60
+ const nextControlDisabled = isSingleSlide || (offset === (0, helpers_1.getMaxOffset)(itemsRef.current, slideWidth));
61
+ const handleResize = () => {
73
62
  if (!containerRef.current)
74
63
  return;
75
- var containerWidth = containerRef.current.getBoundingClientRect().width;
64
+ const { width: containerWidth } = containerRef.current.getBoundingClientRect();
76
65
  setSlideWidth(containerWidth);
77
66
  };
78
- (0, react_1.useEffect)(function () {
67
+ (0, react_1.useEffect)(() => {
79
68
  window.addEventListener('resize', (0, debounce_1.debounce)(handleResize, 16));
80
- return function () {
69
+ return () => {
81
70
  window.removeEventListener('resize', (0, debounce_1.debounce)(handleResize, 16));
82
71
  };
83
72
  }, []);
84
- (0, react_1.useEffect)(function () {
73
+ (0, react_1.useEffect)(() => {
85
74
  setOffset((0, helpers_1.getOffset)(itemsRef.current, activeIndex, slideWidth));
86
75
  }, [activeIndex, slideWidth]);
87
- (0, react_1.useEffect)(function () {
76
+ (0, react_1.useEffect)(() => {
88
77
  if (index >= 0 && index <= itemCount - 1) {
89
78
  setActiveIndex(index);
90
79
  }
91
80
  }, [index]);
92
- (0, react_1.useEffect)(function () {
81
+ (0, react_1.useEffect)(() => {
93
82
  itemsRef.current = itemsRef.current.splice(0, itemCount);
94
83
  }, [children]);
95
- (0, react_1.useEffect)(function () {
96
- var containerWidth = containerRef.current.getBoundingClientRect().width;
84
+ (0, react_1.useEffect)(() => {
85
+ const { width: containerWidth } = containerRef.current.getBoundingClientRect();
97
86
  setSlideWidth(containerWidth);
98
87
  }, [containerRef.current]);
99
- var handleControlClick = function (event, _a) {
100
- var direction = _a.direction;
101
- var nextIndex = (0, helpers_1.getNextIndex)(direction, activeIndex, itemsRef.current, slideWidth, itemsPerSlide);
102
- var slide = (0, helpers_1.getSlide)(activeIndex, itemsPerSlide, nextIndex);
88
+ const handleControlClick = (event, { direction }) => {
89
+ const nextIndex = (0, helpers_1.getNextIndex)(direction, activeIndex, itemsRef.current, slideWidth, itemsPerSlide);
90
+ const slide = (0, helpers_1.getSlide)(activeIndex, itemsPerSlide, nextIndex);
103
91
  setActiveIndex(nextIndex);
104
92
  if (direction === 'LEFT') {
105
93
  onPrevious(event);
@@ -107,9 +95,9 @@ var EbayCarousel = function (_a) {
107
95
  else {
108
96
  onNext(event);
109
97
  }
110
- onSlide({ slide: slide });
98
+ onSlide({ slide });
111
99
  };
112
- return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('carousel', className, {
100
+ return (react_1.default.createElement("div", Object.assign({ className: (0, classnames_1.default)('carousel', className, {
113
101
  'carousel--slides': itemsPerSlide,
114
102
  'carousel--peek': itemsPerSlide % 1 === 0
115
103
  }) }, rest),
@@ -1,66 +1,56 @@
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
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.getClosestIndex = exports.getNextIndex = exports.getSlide = exports.alterChildren = exports.getOffset = exports.getMaxOffset = exports.isNativeScrolling = exports.getRelativeRects = void 0;
15
- var react_1 = require("react");
4
+ const react_1 = require("react");
16
5
  function getRelativeRects(el) {
17
- var parent = el.parentElement;
18
- var currentLeft = parent
6
+ const parent = el.parentElement;
7
+ const currentLeft = parent
19
8
  ? parent.firstElementChild.getBoundingClientRect().left
20
9
  : 0;
21
- var _a = el.getBoundingClientRect(), left = _a.left, right = _a.right;
10
+ const { left, right } = el.getBoundingClientRect();
22
11
  return {
23
12
  left: left - currentLeft,
24
13
  right: right - currentLeft
25
14
  };
26
15
  }
27
16
  exports.getRelativeRects = getRelativeRects;
28
- var isNativeScrolling = function (el) { return getComputedStyle(el).overflowX !== 'visible'; };
17
+ const isNativeScrolling = (el) => getComputedStyle(el).overflowX !== 'visible';
29
18
  exports.isNativeScrolling = isNativeScrolling;
30
- var getMaxOffset = function (items, slideWidth) {
19
+ const getMaxOffset = (items, slideWidth) => {
31
20
  if (!items.length) {
32
21
  return 0;
33
22
  }
34
- var lastEl = items[items.length - 1];
23
+ const lastEl = items[items.length - 1];
35
24
  return Math.max(lastEl.right - slideWidth, 0) || 0;
36
25
  };
37
26
  exports.getMaxOffset = getMaxOffset;
38
- var getOffset = function (items, index, slideWidth) {
27
+ const getOffset = (items, index, slideWidth) => {
39
28
  if (!items.length) {
40
29
  return 0;
41
30
  }
42
31
  return Math.min(items[index].left, (0, exports.getMaxOffset)(items, slideWidth)) || 0;
43
32
  };
44
33
  exports.getOffset = getOffset;
45
- var alterChildren = function (children, itemsRef, itemsPerSlide, slideWidth, offset, gap) { return react_1.Children.map(children, function (item, index) {
46
- var _a = item.props.style, style = _a === void 0 ? {} : _a;
47
- var itemWidth;
34
+ const alterChildren = (children, itemsRef, itemsPerSlide, slideWidth, offset, gap) => react_1.Children.map(children, (item, index) => {
35
+ const { style = {} } = item.props;
36
+ let itemWidth;
48
37
  if (itemsPerSlide) {
49
- var itemsInSlide = itemsPerSlide + (itemsPerSlide % 1);
50
- itemWidth = "calc(".concat(100 / itemsInSlide, "% - ").concat(((itemsInSlide - 1) * gap) / itemsInSlide, "px)");
38
+ const itemsInSlide = itemsPerSlide + (itemsPerSlide % 1);
39
+ itemWidth = `calc(${100 / itemsInSlide}% - ${((itemsInSlide - 1) * gap) / itemsInSlide}px)`;
51
40
  }
52
- var isStartOfSlide = itemsPerSlide ? index % itemsPerSlide === 0 : true;
53
- return (0, react_1.cloneElement)(item, __assign(__assign({}, item.props), { slideWidth: slideWidth, offset: offset, ref: function (el) {
41
+ const isStartOfSlide = itemsPerSlide ? index % itemsPerSlide === 0 : true;
42
+ return (0, react_1.cloneElement)(item, Object.assign(Object.assign({}, item.props), { slideWidth,
43
+ offset, ref: el => {
54
44
  itemsRef.current[index] = el;
55
- }, className: isStartOfSlide ? 'carousel__snap-point' : item.props.className, style: __assign(__assign({}, style), { width: itemWidth || style.width, marginRight: gap && index !== react_1.Children.count(children) - 1 ? "".concat(gap, "px") : style.marginRight }) }));
56
- }); };
45
+ }, className: isStartOfSlide ? 'carousel__snap-point' : item.props.className, style: Object.assign(Object.assign({}, style), { width: itemWidth || style.width, marginRight: gap && index !== react_1.Children.count(children) - 1 ? `${gap}px` : style.marginRight }) }));
46
+ });
57
47
  exports.alterChildren = alterChildren;
58
48
  /**
59
49
  * Ensures that an index is valid.
60
50
  */
61
- var normalizeIndex = function (index, items, itemsPerSlide) {
51
+ const normalizeIndex = (index, items, itemsPerSlide) => {
62
52
  if (index > 0) {
63
- var result = index;
53
+ let result = index;
64
54
  result %= items.length || 1; // Ensure index is within bounds.
65
55
  result -= result % (itemsPerSlide || 1); // Round index to the nearest valid slide index.
66
56
  result = Math.abs(result); // Ensure positive value.
@@ -72,18 +62,17 @@ var normalizeIndex = function (index, items, itemsPerSlide) {
72
62
  * Gets the slide for a given index.
73
63
  * Defaults to the current index if none provided.
74
64
  */
75
- var getSlide = function (activeIndex, itemsPerSlide, nextIndex) {
76
- if (nextIndex === void 0) { nextIndex = activeIndex; }
65
+ const getSlide = (activeIndex, itemsPerSlide, nextIndex = activeIndex) => {
77
66
  if (!itemsPerSlide) {
78
67
  return;
79
68
  }
80
69
  return Math.ceil(nextIndex / itemsPerSlide);
81
70
  };
82
71
  exports.getSlide = getSlide;
83
- var getDelta = function (direction) { return direction === 'LEFT' ? -1 : 1; };
84
- var getNextIndex = function (direction, activeIndex, items, slideWidth, itemsPerSlide) {
85
- var i = activeIndex;
86
- var item;
72
+ const getDelta = (direction) => direction === 'LEFT' ? -1 : 1;
73
+ const getNextIndex = (direction, activeIndex, items, slideWidth, itemsPerSlide) => {
74
+ let i = activeIndex;
75
+ let item;
87
76
  // If going backward from 0, we go to the end.
88
77
  if (direction === 'LEFT' && i === 0) {
89
78
  i = items.length - 1;
@@ -91,12 +80,12 @@ var getNextIndex = function (direction, activeIndex, items, slideWidth, itemsPer
91
80
  else {
92
81
  // Find the index of the next item that is not fully in view.
93
82
  do {
94
- var delta = getDelta(direction);
83
+ const delta = getDelta(direction);
95
84
  item = items[i += delta];
96
85
  } while (item && item.fullyVisible);
97
86
  if (direction === 'LEFT' && !itemsPerSlide) {
98
87
  // If going left without items per slide, go as far left as possible while keeping this item fully in view.
99
- var targetOffset = item.right - slideWidth;
88
+ const targetOffset = item.right - slideWidth;
100
89
  do {
101
90
  item = items[--i];
102
91
  } while (item && item.left >= targetOffset);
@@ -106,19 +95,18 @@ var getNextIndex = function (direction, activeIndex, items, slideWidth, itemsPer
106
95
  return normalizeIndex(i, items, itemsPerSlide);
107
96
  };
108
97
  exports.getNextIndex = getNextIndex;
109
- var getClosestIndex = function (scrollLeft, items, slideWidth, itemsPerSlide, gap) {
110
- if (itemsPerSlide === void 0) { itemsPerSlide = 1; }
111
- var closest;
98
+ const getClosestIndex = (scrollLeft, items, slideWidth, itemsPerSlide = 1, gap) => {
99
+ let closest;
112
100
  if (scrollLeft >= (0, exports.getMaxOffset)(items, slideWidth) - gap) {
113
101
  closest = items.length - 1;
114
102
  }
115
103
  else {
116
104
  // Find the closest item using a binary search on each carousel slide.
117
- var totalItems = items.length;
118
- var low = 0;
119
- var high = Math.ceil(totalItems / itemsPerSlide) - 1;
105
+ const totalItems = items.length;
106
+ let low = 0;
107
+ let high = Math.ceil(totalItems / itemsPerSlide) - 1;
120
108
  while (high - low > 1) {
121
- var mid = Math.floor((low + high) / 2);
109
+ const mid = Math.floor((low + high) / 2);
122
110
  if (scrollLeft > items[mid * itemsPerSlide].left) {
123
111
  low = mid;
124
112
  }
@@ -126,8 +114,8 @@ var getClosestIndex = function (scrollLeft, items, slideWidth, itemsPerSlide, ga
126
114
  high = mid;
127
115
  }
128
116
  }
129
- var deltaLow = Math.abs(scrollLeft - items[low * itemsPerSlide].left);
130
- var deltaHigh = Math.abs(scrollLeft - items[high * itemsPerSlide].left);
117
+ const deltaLow = Math.abs(scrollLeft - items[low * itemsPerSlide].left);
118
+ const deltaHigh = Math.abs(scrollLeft - items[high * itemsPerSlide].left);
131
119
  closest = normalizeIndex((deltaLow > deltaHigh ? high : low) * itemsPerSlide, items, itemsPerSlide);
132
120
  }
133
121
  return closest;
@@ -3,27 +3,27 @@
3
3
  // todo: replace with ebayui-core-react/ebay-carousel when it's ready
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.scrollTransition = void 0;
6
- var onScrollEnd = function (el, fn) {
7
- var timeout;
8
- var frame;
9
- var lastPos;
6
+ const onScrollEnd = (el, fn) => {
7
+ let timeout;
8
+ let frame;
9
+ let lastPos;
10
10
  (function checkMoved() {
11
- var scrollLeft = el.scrollLeft;
11
+ const { scrollLeft } = el;
12
12
  if (lastPos !== scrollLeft) {
13
13
  lastPos = scrollLeft;
14
- timeout = setTimeout(function () {
14
+ timeout = setTimeout(() => {
15
15
  frame = requestAnimationFrame(checkMoved);
16
16
  }, 90);
17
17
  return;
18
18
  }
19
19
  fn(lastPos);
20
20
  }());
21
- return function () {
21
+ return () => {
22
22
  clearTimeout(timeout);
23
23
  cancelAnimationFrame(frame);
24
24
  };
25
25
  };
26
- var supportsScrollBehavior = typeof window !== 'undefined' && 'scrollBehavior' in document.body.style;
26
+ const supportsScrollBehavior = typeof window !== 'undefined' && 'scrollBehavior' in document.body.style;
27
27
  /**
28
28
  * Utility to animate scroll position of an element using an `ease-out` curve over 250ms.
29
29
  * Cancels the animation if the user touches back down.
@@ -38,14 +38,14 @@ function scrollTransition(el, to, fn) {
38
38
  el.scrollTo({ left: to });
39
39
  return onScrollEnd(el, fn);
40
40
  }
41
- var lastPosition;
42
- var cancelInterruptTransition;
43
- var frame = requestAnimationFrame(function (startTime) {
44
- var scrollLeft = el.scrollLeft;
45
- var distance = to - scrollLeft;
46
- var duration = 450;
41
+ let lastPosition;
42
+ let cancelInterruptTransition;
43
+ let frame = requestAnimationFrame(startTime => {
44
+ const { scrollLeft } = el;
45
+ const distance = to - scrollLeft;
46
+ const duration = 450;
47
47
  (function animate(curTime) {
48
- var delta = curTime - startTime;
48
+ const delta = curTime - startTime;
49
49
  if (delta > duration) {
50
50
  el.scrollLeft = to;
51
51
  cancel();
@@ -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,41 +37,41 @@ 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 classnames_1 = __importDefault(require("classnames"));
53
- var ebay_icon_1 = require("../ebay-icon");
54
- var ebay_field_1 = require("../ebay-field");
55
- var component_utils_1 = require("../common/component-utils");
56
- var isControlled = function (checked) { return typeof checked !== 'undefined'; };
57
- var EbayCheckbox = function (_a) {
58
- var id = _a.id, _b = _a.size, size = _b === void 0 ? 'default' : _b, className = _a.className, style = _a.style, checked = _a.checked, _c = _a.defaultChecked, defaultChecked = _c === void 0 ? false : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.onFocus, onFocus = _e === void 0 ? function () { } : _e, _f = _a.onKeyDown, onKeyDown = _f === void 0 ? function () { } : _f, children = _a.children, inputRef = _a.inputRef, rest = __rest(_a, ["id", "size", "className", "style", "checked", "defaultChecked", "onChange", "onFocus", "onKeyDown", "children", "inputRef"]);
59
- var _g = (0, react_1.useState)(defaultChecked), isChecked = _g[0], setChecked = _g[1];
60
- var handleChange = function (e) {
61
- var input = e.target;
40
+ const react_1 = __importStar(require("react"));
41
+ const classnames_1 = __importDefault(require("classnames"));
42
+ const ebay_icon_1 = require("../ebay-icon");
43
+ const ebay_field_1 = require("../ebay-field");
44
+ const component_utils_1 = require("../common/component-utils");
45
+ const isControlled = checked => typeof checked !== 'undefined';
46
+ const EbayCheckbox = (_a) => {
47
+ var { id, size = 'default', className, style, checked, defaultChecked = false, onChange = () => { }, onFocus = () => { }, onKeyDown = () => { }, children, inputRef } = _a, rest = __rest(_a, ["id", "size", "className", "style", "checked", "defaultChecked", "onChange", "onFocus", "onKeyDown", "children", "inputRef"]);
48
+ const [isChecked, setChecked] = (0, react_1.useState)(defaultChecked);
49
+ const handleChange = (e) => {
50
+ const input = e.target;
62
51
  onChange(e, { value: input === null || input === void 0 ? void 0 : input.value, checked: Boolean(input === null || input === void 0 ? void 0 : input.checked) });
63
52
  setChecked(input === null || input === void 0 ? void 0 : input.checked);
64
53
  };
65
- var handleFocus = function (e) { var _a, _b; return onFocus(e, { value: (_a = e.target) === null || _a === void 0 ? void 0 : _a.value, checked: Boolean((_b = e.target) === null || _b === void 0 ? void 0 : _b.checked) }); };
66
- var handleKeyDown = function (e) {
67
- var input = e.target;
54
+ const handleFocus = (e) => { var _a, _b; return onFocus(e, { value: (_a = e.target) === null || _a === void 0 ? void 0 : _a.value, checked: Boolean((_b = e.target) === null || _b === void 0 ? void 0 : _b.checked) }); };
55
+ const handleKeyDown = (e) => {
56
+ const input = e.target;
68
57
  onKeyDown(e, { value: input.value, checked: Boolean(input.checked) });
69
58
  };
70
- var containerClass = (0, classnames_1.default)('checkbox', className, { 'checkbox--large': size === 'large' });
71
- var iconChecked = size === 'large' ?
59
+ const containerClass = (0, classnames_1.default)('checkbox', className, { 'checkbox--large': size === 'large' });
60
+ const iconChecked = size === 'large' ?
72
61
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxChecked24", className: "checkbox__checked" }) :
73
62
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxChecked18", className: "checkbox__checked" });
74
- var iconUnChecked = size === 'large' ?
63
+ const iconUnChecked = size === 'large' ?
75
64
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxUnchecked24", className: "checkbox__unchecked" }) :
76
65
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxUnchecked18", className: "checkbox__unchecked" });
77
- var ebayLabel = (0, component_utils_1.findComponent)(children, ebay_field_1.EbayLabel);
66
+ const ebayLabel = (0, component_utils_1.findComponent)(children, ebay_field_1.EbayLabel);
78
67
  return (react_1.default.createElement(react_1.default.Fragment, null,
79
- react_1.default.createElement("span", { className: containerClass, style: __assign(__assign({}, style), { alignItems: 'center' }) },
80
- react_1.default.createElement("input", __assign({}, rest, { id: id, className: "checkbox__control", type: "checkbox", checked: isControlled(checked) ? checked : isChecked, onChange: handleChange, onFocus: handleFocus, onKeyDown: handleKeyDown, ref: inputRef })),
68
+ react_1.default.createElement("span", { className: containerClass, style: Object.assign(Object.assign({}, style), { alignItems: 'center' }) },
69
+ react_1.default.createElement("input", Object.assign({}, rest, { id: id, className: "checkbox__control", type: "checkbox", checked: isControlled(checked) ? checked : isChecked, onChange: handleChange, onFocus: handleFocus, onKeyDown: handleKeyDown, ref: inputRef })),
81
70
  react_1.default.createElement("span", { className: "checkbox__icon", hidden: true },
82
71
  iconChecked,
83
72
  iconUnChecked)),
84
73
  ebayLabel ?
85
- (0, react_1.cloneElement)(ebayLabel, __assign(__assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
74
+ (0, react_1.cloneElement)(ebayLabel, Object.assign(Object.assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
86
75
  children));
87
76
  };
88
77
  exports.default = EbayCheckbox;
@@ -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,17 +37,17 @@ 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 classnames_1 = __importDefault(require("classnames"));
53
- var ebay_dialog_base_1 = require("../ebay-dialog-base");
54
- var ebay_button_1 = require("../ebay-button");
55
- var classPrefix = 'confirm-dialog';
56
- var EbayConfirmDialog = function (_a) {
57
- var _b = _a.a11yCloseText, a11yCloseText = _b === void 0 ? 'Close Dialog' : _b, confirmText = _a.confirmText, rejectText = _a.rejectText, _c = _a.onReject, onReject = _c === void 0 ? function () { } : _c, _d = _a.onConfirm, onConfirm = _d === void 0 ? function () { } : _d, rest = __rest(_a, ["a11yCloseText", "confirmText", "rejectText", "onReject", "onConfirm"]);
58
- var confirmBtnRef = (0, react_1.useRef)(null);
59
- var confirmId = 'confirm-dialog-confirm';
60
- var mainId = 'confirm-dialog-main';
61
- return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, __assign({ focus: confirmBtnRef }, rest, { a11yCloseText: a11yCloseText, role: "dialog", mainId: mainId, classPrefix: classPrefix, className: (0, classnames_1.default)(rest.className, "".concat(classPrefix, "--mask-fade")), windowClass: "".concat(classPrefix, "__window ").concat(classPrefix, "__window--fade"), buttonPosition: "hidden", onCloseBtnClick: onReject }),
40
+ const react_1 = __importStar(require("react"));
41
+ const classnames_1 = __importDefault(require("classnames"));
42
+ const ebay_dialog_base_1 = require("../ebay-dialog-base");
43
+ const ebay_button_1 = require("../ebay-button");
44
+ const classPrefix = 'confirm-dialog';
45
+ const EbayConfirmDialog = (_a) => {
46
+ var { a11yCloseText = 'Close Dialog', confirmText, rejectText, onReject = () => { }, onConfirm = () => { } } = _a, rest = __rest(_a, ["a11yCloseText", "confirmText", "rejectText", "onReject", "onConfirm"]);
47
+ const confirmBtnRef = (0, react_1.useRef)(null);
48
+ const confirmId = 'confirm-dialog-confirm';
49
+ const mainId = 'confirm-dialog-main';
50
+ return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({ focus: confirmBtnRef }, rest, { a11yCloseText: a11yCloseText, role: "dialog", mainId: mainId, classPrefix: classPrefix, className: (0, classnames_1.default)(rest.className, `${classPrefix}--mask-fade`), windowClass: `${classPrefix}__window ${classPrefix}__window--fade`, buttonPosition: "hidden", onCloseBtnClick: onReject }),
62
51
  rest.children,
63
52
  react_1.default.createElement(ebay_dialog_base_1.EbayDialogFooter, null,
64
53
  react_1.default.createElement(ebay_button_1.EbayButton, { onClick: onReject, className: "confirm-dialog__reject" }, rejectText),
@@ -7,6 +7,6 @@ type Props = HTMLAnchorProps & {
7
7
  size?: Size;
8
8
  forwardedRef?: RefObject<HTMLAnchorElement>;
9
9
  };
10
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "forwardedRef" | "key" | "size" | "fluid" | "truncate" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & React.RefAttributes<React.FC<Props>>>;
10
+ declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<React.FC<Props>>>;
11
11
  export default _default;
12
12
  //# sourceMappingURL=cta-button.d.ts.map
@@ -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,15 +14,15 @@ 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 classnames_1 = __importDefault(require("classnames"));
30
- var forwardRef_1 = require("../common/component-utils/forwardRef");
31
- var ebay_icon_1 = require("../ebay-icon");
32
- var ebay_button_1 = require("../ebay-button");
33
- var EbayCtaButton = function (_a) {
34
- var size = _a.size, children = _a.children, fluid = _a.fluid, truncate = _a.truncate, forwardedRef = _a.forwardedRef, extraClasses = _a.className, rest = __rest(_a, ["size", "children", "fluid", "truncate", "forwardedRef", "className"]);
35
- var className = (0, classnames_1.default)(extraClasses, 'cta-btn', { 'cta-btn--large': size === 'large' }, { 'cta-btn--fluid': fluid }, { 'cta-btn--truncated': truncate });
36
- return (react_1.default.createElement("a", __assign({}, rest, { className: className, ref: forwardedRef }),
17
+ const react_1 = __importDefault(require("react"));
18
+ const classnames_1 = __importDefault(require("classnames"));
19
+ const forwardRef_1 = require("../common/component-utils/forwardRef");
20
+ const ebay_icon_1 = require("../ebay-icon");
21
+ const ebay_button_1 = require("../ebay-button");
22
+ const EbayCtaButton = (_a) => {
23
+ var { size, children, fluid, truncate, forwardedRef, className: extraClasses } = _a, rest = __rest(_a, ["size", "children", "fluid", "truncate", "forwardedRef", "className"]);
24
+ const className = (0, classnames_1.default)(extraClasses, 'cta-btn', { 'cta-btn--large': size === 'large' }, { 'cta-btn--fluid': fluid }, { 'cta-btn--truncated': truncate });
25
+ return (react_1.default.createElement("a", Object.assign({}, rest, { className: className, ref: forwardedRef }),
37
26
  react_1.default.createElement(ebay_button_1.EbayButtonCell, { type: "cta" },
38
27
  react_1.default.createElement("span", null, children),
39
28
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "arrowRight24" }))));