@ebay/ui-core-react 6.2.2-rc.1 → 6.2.3

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.

Potentially problematic release.


This version of @ebay/ui-core-react might be problematic. Click here for more details.

Files changed (171) hide show
  1. package/common/component-utils/array.polyfill.flat.js +13 -11
  2. package/common/component-utils/forwardRef.js +17 -4
  3. package/common/component-utils/usePrevious.js +3 -3
  4. package/common/component-utils/utils.js +26 -13
  5. package/common/debounce.js +7 -3
  6. package/common/event-utils/index.js +11 -8
  7. package/common/event-utils/use-key-press.js +12 -10
  8. package/common/event-utils/use-roving-index.js +24 -13
  9. package/common/floating-label-utils/hooks.js +53 -43
  10. package/common/notice-utils/notice-content.js +6 -5
  11. package/common/notice-utils/notice-cta.js +16 -5
  12. package/common/notice-utils/notice-footer.js +16 -5
  13. package/common/notice-utils/notice-title.js +17 -6
  14. package/common/random-id.js +1 -1
  15. package/common/range.js +4 -1
  16. package/common/tooltip-utils/tooltip-close-button.js +1 -1
  17. package/common/tooltip-utils/tooltip-content.js +28 -16
  18. package/common/tooltip-utils/tooltip-footer.js +6 -3
  19. package/common/tooltip-utils/tooltip-host.js +16 -5
  20. package/common/tooltip-utils/tooltip.d.ts +1 -1
  21. package/common/tooltip-utils/tooltip.js +26 -14
  22. package/common/tooltip-utils/use-tooltip.js +9 -8
  23. package/ebay-alert-dialog/alert-dialog.js +22 -11
  24. package/ebay-badge/badge.js +17 -6
  25. package/ebay-breadcrumbs/breadcrumb-item.js +18 -7
  26. package/ebay-breadcrumbs/breadcrumbs.js +30 -19
  27. package/ebay-button/button-cell.js +16 -5
  28. package/ebay-button/button-expand.d.ts +2 -4
  29. package/ebay-button/button-expand.d.ts.map +1 -1
  30. package/ebay-button/button-expand.js +10 -7
  31. package/ebay-button/button-loading.js +5 -5
  32. package/ebay-button/button-text.js +6 -3
  33. package/ebay-button/button.d.ts +1 -1
  34. package/ebay-button/button.js +43 -31
  35. package/ebay-calendar/calendar.js +111 -94
  36. package/ebay-calendar/date-utils.js +18 -9
  37. package/ebay-carousel/carousel-control-button.js +10 -9
  38. package/ebay-carousel/carousel-item.d.ts +1 -1
  39. package/ebay-carousel/carousel-item.js +25 -14
  40. package/ebay-carousel/carousel-list.js +22 -21
  41. package/ebay-carousel/carousel.js +44 -32
  42. package/ebay-carousel/helpers.js +47 -35
  43. package/ebay-carousel/scroll-to-transition.js +15 -15
  44. package/ebay-checkbox/checkbox.js +32 -21
  45. package/ebay-confirm-dialog/confirm-dialog.js +22 -11
  46. package/ebay-cta-button/cta-button.d.ts +1 -1
  47. package/ebay-cta-button/cta-button.js +20 -9
  48. package/ebay-date-textbox/date-textbox.js +53 -37
  49. package/ebay-dialog-base/components/animation.d.ts +1 -0
  50. package/ebay-dialog-base/components/animation.d.ts.map +1 -1
  51. package/ebay-dialog-base/components/animation.js +28 -25
  52. package/ebay-dialog-base/components/dialog-actions.js +5 -2
  53. package/ebay-dialog-base/components/dialog-close-button.d.ts +2 -5
  54. package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -1
  55. package/ebay-dialog-base/components/dialog-close-button.js +5 -2
  56. package/ebay-dialog-base/components/dialog-footer.js +5 -2
  57. package/ebay-dialog-base/components/dialog-header.js +15 -4
  58. package/ebay-dialog-base/components/dialog-previous-button.js +17 -6
  59. package/ebay-dialog-base/components/dialogBase.js +51 -40
  60. package/ebay-dialog-base/dialog-base-with-state.js +35 -22
  61. package/ebay-drawer-dialog/components/drawer.js +50 -27
  62. package/ebay-eek/eek-rating.js +10 -8
  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 +6 -7
  66. package/ebay-fake-menu/menu-item-separator.js +16 -5
  67. package/ebay-fake-menu/menu-item.js +26 -15
  68. package/ebay-fake-menu/menu.js +22 -11
  69. package/ebay-fake-menu-button/menu-button-item.js +2 -2
  70. package/ebay-fake-menu-button/menu-button-label.d.ts +2 -4
  71. package/ebay-fake-menu-button/menu-button-label.d.ts.map +1 -1
  72. package/ebay-fake-menu-button/menu-button-label.js +5 -2
  73. package/ebay-fake-menu-button/menu-button-separator.js +16 -5
  74. package/ebay-fake-menu-button/menu-button.js +45 -32
  75. package/ebay-fake-tabs/fake-tabs.js +23 -10
  76. package/ebay-fake-tabs/tab.js +16 -5
  77. package/ebay-field/description.js +19 -7
  78. package/ebay-field/field.js +5 -4
  79. package/ebay-field/label.js +18 -7
  80. package/ebay-fullscreen-dialog/fullscreen-dialog.js +18 -7
  81. package/ebay-icon/icon.d.ts +1 -1
  82. package/ebay-icon/icon.js +29 -17
  83. package/ebay-icon-button/icon-button.d.ts +1 -1
  84. package/ebay-icon-button/icon-button.js +27 -15
  85. package/ebay-infotip/ebay-infotip-content.js +5 -2
  86. package/ebay-infotip/ebay-infotip-heading.js +16 -5
  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 +24 -10
  90. package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
  91. package/ebay-infotip/ebay-infotip.js +34 -23
  92. package/ebay-inline-notice/inline-notice.js +27 -15
  93. package/ebay-lightbox-dialog/lightbox-dialog.js +21 -9
  94. package/ebay-listbox-button/listbox-button-option.js +18 -7
  95. package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
  96. package/ebay-listbox-button/listbox-button.js +100 -79
  97. package/ebay-menu/menu-item-separator.js +16 -5
  98. package/ebay-menu/menu-item.js +23 -12
  99. package/ebay-menu/menu.d.ts +1 -1
  100. package/ebay-menu/menu.js +64 -37
  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 +2 -4
  104. package/ebay-menu-button/menu-button-label.d.ts.map +1 -1
  105. package/ebay-menu-button/menu-button-label.js +5 -2
  106. package/ebay-menu-button/menu-button-separator.js +16 -5
  107. package/ebay-menu-button/menu-button.js +60 -46
  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 +2 -5
  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 +5 -2
  112. package/ebay-page-notice/page-notice-cta.js +6 -3
  113. package/ebay-page-notice/page-notice-footer.js +6 -3
  114. package/ebay-page-notice/page-notice-title.js +16 -5
  115. package/ebay-page-notice/page-notice.js +27 -16
  116. package/ebay-pagination/helpers.js +24 -21
  117. package/ebay-pagination/pagination-item.d.ts +1 -1
  118. package/ebay-pagination/pagination-item.js +27 -16
  119. package/ebay-pagination/pagination.js +81 -52
  120. package/ebay-panel-dialog/panel-dialog.js +21 -9
  121. package/ebay-progress-bar/progress-bar.js +16 -5
  122. package/ebay-progress-spinner/progress-spinner.js +18 -7
  123. package/ebay-progress-stepper/ebay-progress-step.js +25 -14
  124. package/ebay-progress-stepper/ebay-progress-stepper.js +21 -10
  125. package/ebay-progress-stepper/ebay-progress-title.js +5 -2
  126. package/ebay-radio/radio.js +29 -18
  127. package/ebay-section-notice/section-notice-footer.js +6 -3
  128. package/ebay-section-notice/section-notice-title.js +16 -5
  129. package/ebay-section-notice/section-notice.js +39 -24
  130. package/ebay-section-title/cta.js +16 -5
  131. package/ebay-section-title/info.js +16 -5
  132. package/ebay-section-title/overflow.js +16 -5
  133. package/ebay-section-title/section-title.js +24 -13
  134. package/ebay-section-title/subtitle.js +16 -5
  135. package/ebay-section-title/title.js +16 -5
  136. package/ebay-select/ebay-select-option.js +15 -4
  137. package/ebay-select/ebay-select.d.ts +1 -1
  138. package/ebay-select/ebay-select.js +45 -34
  139. package/ebay-signal/signal.js +17 -6
  140. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +16 -5
  141. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +38 -27
  142. package/ebay-split-button/split-button.js +21 -10
  143. package/ebay-star-rating/star-rating.js +19 -8
  144. package/ebay-star-rating-select/star-rating-select.js +31 -20
  145. package/ebay-svg/svg.js +3 -3
  146. package/ebay-switch/ebay-switch.js +21 -10
  147. package/ebay-tabs/tab-panel.js +16 -5
  148. package/ebay-tabs/tab.js +16 -5
  149. package/ebay-tabs/tabs.js +40 -26
  150. package/ebay-textbox/postfix-icon.js +18 -7
  151. package/ebay-textbox/prefix-icon.js +16 -5
  152. package/ebay-textbox/textbox.d.ts +1 -1
  153. package/ebay-textbox/textbox.js +53 -42
  154. package/ebay-toast-dialog/components/toast.js +17 -6
  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 +32 -21
  158. package/ebay-tourtip/ebay-tourtip-content.js +1 -1
  159. package/ebay-tourtip/ebay-tourtip-footer.js +7 -4
  160. package/ebay-tourtip/ebay-tourtip-heading.js +17 -6
  161. package/ebay-tourtip/ebay-tourtip-host.js +1 -1
  162. package/ebay-tourtip/ebay-tourtip.js +33 -22
  163. package/ebay-video/controls.d.ts.map +1 -1
  164. package/ebay-video/controls.js +46 -23
  165. package/ebay-video/reportButton.d.ts +2 -7
  166. package/ebay-video/reportButton.d.ts.map +1 -1
  167. package/ebay-video/reportButton.js +8 -5
  168. package/ebay-video/source.js +14 -3
  169. package/ebay-video/video.d.ts.map +1 -1
  170. package/ebay-video/video.js +80 -54
  171. package/package.json +19 -23
@@ -26,48 +26,49 @@ 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
- 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);
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);
41
42
  if (!size || !listRef.current)
42
43
  return;
43
44
  if (skipScrolling) {
44
45
  setSkipScrolling(false);
45
46
  return;
46
47
  }
47
- const list = listRef.current;
48
- const isNativeScroll = (0, helpers_1.isNativeScrolling)(list);
48
+ var list = listRef.current;
49
+ var isNativeScroll = (0, helpers_1.isNativeScrolling)(list);
49
50
  if (isNativeScroll) {
50
51
  setScrollTransitioning(true);
51
- (0, scroll_to_transition_1.scrollTransition)(list, offset, () => setScrollTransitioning(false));
52
+ (0, scroll_to_transition_1.scrollTransition)(list, offset, function () { return setScrollTransitioning(false); });
52
53
  }
53
54
  else {
54
55
  setTranslateLeft(offset);
55
56
  }
56
57
  }, [offset]);
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);
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);
60
61
  if (closest !== activeIndex) {
61
62
  setSkipScrolling(true);
62
63
  onSetActiveIndex(closest);
63
64
  onScroll({ index: closest });
64
65
  }
65
66
  }, [listRef.current, itemsRef.current, slideWidth, activeIndex, onSetActiveIndex]);
66
- const handleScroll = () => {
67
+ var handleScroll = function () {
67
68
  if (scrollTimeout.current) {
68
69
  clearTimeout(scrollTimeout.current);
69
70
  }
70
- scrollTimeout.current = setTimeout(() => {
71
+ scrollTimeout.current = setTimeout(function () {
71
72
  if (!scrollTransitioning) {
72
73
  handleFinishScrolling();
73
74
  }
@@ -76,6 +77,6 @@ const CarouselList = ({ gap = 16, itemsPerSlide, slideWidth, offset, activeIndex
76
77
  return (react_1.default.createElement("div", { className: (0, classnames_1.default)('carousel__viewport', {
77
78
  'carousel__viewport--mask': !nextControlDisabled
78
79
  }, className) },
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))));
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))));
80
81
  };
81
82
  exports.default = CarouselList;
@@ -1,4 +1,15 @@
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
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -37,57 +48,58 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
49
  };
39
50
  Object.defineProperty(exports, "__esModule", { value: true });
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");
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");
46
57
  // TO-DO:
47
58
  // Image slides
48
59
  // Auto play (+ onPlay/onPause callbacks)
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 = () => {
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 () {
62
73
  if (!containerRef.current)
63
74
  return;
64
- const { width: containerWidth } = containerRef.current.getBoundingClientRect();
75
+ var containerWidth = containerRef.current.getBoundingClientRect().width;
65
76
  setSlideWidth(containerWidth);
66
77
  };
67
- (0, react_1.useEffect)(() => {
78
+ (0, react_1.useEffect)(function () {
68
79
  window.addEventListener('resize', (0, debounce_1.debounce)(handleResize, 16));
69
- return () => {
80
+ return function () {
70
81
  window.removeEventListener('resize', (0, debounce_1.debounce)(handleResize, 16));
71
82
  };
72
83
  }, []);
73
- (0, react_1.useEffect)(() => {
84
+ (0, react_1.useEffect)(function () {
74
85
  setOffset((0, helpers_1.getOffset)(itemsRef.current, activeIndex, slideWidth));
75
86
  }, [activeIndex, slideWidth]);
76
- (0, react_1.useEffect)(() => {
87
+ (0, react_1.useEffect)(function () {
77
88
  if (index >= 0 && index <= itemCount - 1) {
78
89
  setActiveIndex(index);
79
90
  }
80
91
  }, [index]);
81
- (0, react_1.useEffect)(() => {
92
+ (0, react_1.useEffect)(function () {
82
93
  itemsRef.current = itemsRef.current.splice(0, itemCount);
83
94
  }, [children]);
84
- (0, react_1.useEffect)(() => {
85
- const { width: containerWidth } = containerRef.current.getBoundingClientRect();
95
+ (0, react_1.useEffect)(function () {
96
+ var containerWidth = containerRef.current.getBoundingClientRect().width;
86
97
  setSlideWidth(containerWidth);
87
98
  }, [containerRef.current]);
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);
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);
91
103
  setActiveIndex(nextIndex);
92
104
  if (direction === 'LEFT') {
93
105
  onPrevious(event);
@@ -95,9 +107,9 @@ const EbayCarousel = (_a) => {
95
107
  else {
96
108
  onNext(event);
97
109
  }
98
- onSlide({ slide });
110
+ onSlide({ slide: slide });
99
111
  };
100
- return (react_1.default.createElement("div", Object.assign({ className: (0, classnames_1.default)('carousel', className, {
112
+ return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('carousel', className, {
101
113
  'carousel--slides': itemsPerSlide,
102
114
  'carousel--peek': itemsPerSlide % 1 === 0
103
115
  }) }, rest),
@@ -1,56 +1,66 @@
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
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.getClosestIndex = exports.getNextIndex = exports.getSlide = exports.alterChildren = exports.getOffset = exports.getMaxOffset = exports.isNativeScrolling = exports.getRelativeRects = void 0;
4
- const react_1 = require("react");
15
+ var react_1 = require("react");
5
16
  function getRelativeRects(el) {
6
- const parent = el.parentElement;
7
- const currentLeft = parent
17
+ var parent = el.parentElement;
18
+ var currentLeft = parent
8
19
  ? parent.firstElementChild.getBoundingClientRect().left
9
20
  : 0;
10
- const { left, right } = el.getBoundingClientRect();
21
+ var _a = el.getBoundingClientRect(), left = _a.left, right = _a.right;
11
22
  return {
12
23
  left: left - currentLeft,
13
24
  right: right - currentLeft
14
25
  };
15
26
  }
16
27
  exports.getRelativeRects = getRelativeRects;
17
- const isNativeScrolling = (el) => getComputedStyle(el).overflowX !== 'visible';
28
+ var isNativeScrolling = function (el) { return getComputedStyle(el).overflowX !== 'visible'; };
18
29
  exports.isNativeScrolling = isNativeScrolling;
19
- const getMaxOffset = (items, slideWidth) => {
30
+ var getMaxOffset = function (items, slideWidth) {
20
31
  if (!items.length) {
21
32
  return 0;
22
33
  }
23
- const lastEl = items[items.length - 1];
34
+ var lastEl = items[items.length - 1];
24
35
  return Math.max(lastEl.right - slideWidth, 0) || 0;
25
36
  };
26
37
  exports.getMaxOffset = getMaxOffset;
27
- const getOffset = (items, index, slideWidth) => {
38
+ var getOffset = function (items, index, slideWidth) {
28
39
  if (!items.length) {
29
40
  return 0;
30
41
  }
31
42
  return Math.min(items[index].left, (0, exports.getMaxOffset)(items, slideWidth)) || 0;
32
43
  };
33
44
  exports.getOffset = getOffset;
34
- const alterChildren = (children, itemsRef, itemsPerSlide, slideWidth, offset, gap) => react_1.Children.map(children, (item, index) => {
35
- const { style = {} } = item.props;
36
- let itemWidth;
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;
37
48
  if (itemsPerSlide) {
38
- const itemsInSlide = itemsPerSlide + (itemsPerSlide % 1);
39
- itemWidth = `calc(${100 / itemsInSlide}% - ${((itemsInSlide - 1) * gap) / itemsInSlide}px)`;
49
+ var itemsInSlide = itemsPerSlide + (itemsPerSlide % 1);
50
+ itemWidth = "calc(".concat(100 / itemsInSlide, "% - ").concat(((itemsInSlide - 1) * gap) / itemsInSlide, "px)");
40
51
  }
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 => {
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) {
44
54
  itemsRef.current[index] = el;
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
- });
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
+ }); };
47
57
  exports.alterChildren = alterChildren;
48
58
  /**
49
59
  * Ensures that an index is valid.
50
60
  */
51
- const normalizeIndex = (index, items, itemsPerSlide) => {
61
+ var normalizeIndex = function (index, items, itemsPerSlide) {
52
62
  if (index > 0) {
53
- let result = index;
63
+ var result = index;
54
64
  result %= items.length || 1; // Ensure index is within bounds.
55
65
  result -= result % (itemsPerSlide || 1); // Round index to the nearest valid slide index.
56
66
  result = Math.abs(result); // Ensure positive value.
@@ -62,17 +72,18 @@ const normalizeIndex = (index, items, itemsPerSlide) => {
62
72
  * Gets the slide for a given index.
63
73
  * Defaults to the current index if none provided.
64
74
  */
65
- const getSlide = (activeIndex, itemsPerSlide, nextIndex = activeIndex) => {
75
+ var getSlide = function (activeIndex, itemsPerSlide, nextIndex) {
76
+ if (nextIndex === void 0) { nextIndex = activeIndex; }
66
77
  if (!itemsPerSlide) {
67
78
  return;
68
79
  }
69
80
  return Math.ceil(nextIndex / itemsPerSlide);
70
81
  };
71
82
  exports.getSlide = getSlide;
72
- const getDelta = (direction) => direction === 'LEFT' ? -1 : 1;
73
- const getNextIndex = (direction, activeIndex, items, slideWidth, itemsPerSlide) => {
74
- let i = activeIndex;
75
- let item;
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;
76
87
  // If going backward from 0, we go to the end.
77
88
  if (direction === 'LEFT' && i === 0) {
78
89
  i = items.length - 1;
@@ -80,12 +91,12 @@ const getNextIndex = (direction, activeIndex, items, slideWidth, itemsPerSlide)
80
91
  else {
81
92
  // Find the index of the next item that is not fully in view.
82
93
  do {
83
- const delta = getDelta(direction);
94
+ var delta = getDelta(direction);
84
95
  item = items[i += delta];
85
96
  } while (item && item.fullyVisible);
86
97
  if (direction === 'LEFT' && !itemsPerSlide) {
87
98
  // If going left without items per slide, go as far left as possible while keeping this item fully in view.
88
- const targetOffset = item.right - slideWidth;
99
+ var targetOffset = item.right - slideWidth;
89
100
  do {
90
101
  item = items[--i];
91
102
  } while (item && item.left >= targetOffset);
@@ -95,18 +106,19 @@ const getNextIndex = (direction, activeIndex, items, slideWidth, itemsPerSlide)
95
106
  return normalizeIndex(i, items, itemsPerSlide);
96
107
  };
97
108
  exports.getNextIndex = getNextIndex;
98
- const getClosestIndex = (scrollLeft, items, slideWidth, itemsPerSlide = 1, gap) => {
99
- let closest;
109
+ var getClosestIndex = function (scrollLeft, items, slideWidth, itemsPerSlide, gap) {
110
+ if (itemsPerSlide === void 0) { itemsPerSlide = 1; }
111
+ var closest;
100
112
  if (scrollLeft >= (0, exports.getMaxOffset)(items, slideWidth) - gap) {
101
113
  closest = items.length - 1;
102
114
  }
103
115
  else {
104
116
  // Find the closest item using a binary search on each carousel slide.
105
- const totalItems = items.length;
106
- let low = 0;
107
- let high = Math.ceil(totalItems / itemsPerSlide) - 1;
117
+ var totalItems = items.length;
118
+ var low = 0;
119
+ var high = Math.ceil(totalItems / itemsPerSlide) - 1;
108
120
  while (high - low > 1) {
109
- const mid = Math.floor((low + high) / 2);
121
+ var mid = Math.floor((low + high) / 2);
110
122
  if (scrollLeft > items[mid * itemsPerSlide].left) {
111
123
  low = mid;
112
124
  }
@@ -114,8 +126,8 @@ const getClosestIndex = (scrollLeft, items, slideWidth, itemsPerSlide = 1, gap)
114
126
  high = mid;
115
127
  }
116
128
  }
117
- const deltaLow = Math.abs(scrollLeft - items[low * itemsPerSlide].left);
118
- const deltaHigh = Math.abs(scrollLeft - items[high * itemsPerSlide].left);
129
+ var deltaLow = Math.abs(scrollLeft - items[low * itemsPerSlide].left);
130
+ var deltaHigh = Math.abs(scrollLeft - items[high * itemsPerSlide].left);
119
131
  closest = normalizeIndex((deltaLow > deltaHigh ? high : low) * itemsPerSlide, items, itemsPerSlide);
120
132
  }
121
133
  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
- const onScrollEnd = (el, fn) => {
7
- let timeout;
8
- let frame;
9
- let lastPos;
6
+ var onScrollEnd = function (el, fn) {
7
+ var timeout;
8
+ var frame;
9
+ var lastPos;
10
10
  (function checkMoved() {
11
- const { scrollLeft } = el;
11
+ var scrollLeft = el.scrollLeft;
12
12
  if (lastPos !== scrollLeft) {
13
13
  lastPos = scrollLeft;
14
- timeout = setTimeout(() => {
14
+ timeout = setTimeout(function () {
15
15
  frame = requestAnimationFrame(checkMoved);
16
16
  }, 90);
17
17
  return;
18
18
  }
19
19
  fn(lastPos);
20
20
  }());
21
- return () => {
21
+ return function () {
22
22
  clearTimeout(timeout);
23
23
  cancelAnimationFrame(frame);
24
24
  };
25
25
  };
26
- const supportsScrollBehavior = typeof window !== 'undefined' && 'scrollBehavior' in document.body.style;
26
+ var 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
- let lastPosition;
42
- let cancelInterruptTransition;
43
- let frame = requestAnimationFrame(startTime => {
44
- const { scrollLeft } = el;
45
- const distance = to - scrollLeft;
46
- const duration = 450;
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;
47
47
  (function animate(curTime) {
48
- const delta = curTime - startTime;
48
+ var delta = curTime - startTime;
49
49
  if (delta > duration) {
50
50
  el.scrollLeft = to;
51
51
  cancel();
@@ -1,4 +1,15 @@
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
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -37,41 +48,41 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
49
  };
39
50
  Object.defineProperty(exports, "__esModule", { value: true });
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;
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;
51
62
  onChange(e, { value: input === null || input === void 0 ? void 0 : input.value, checked: Boolean(input === null || input === void 0 ? void 0 : input.checked) });
52
63
  setChecked(input === null || input === void 0 ? void 0 : input.checked);
53
64
  };
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;
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;
57
68
  onKeyDown(e, { value: input.value, checked: Boolean(input.checked) });
58
69
  };
59
- const containerClass = (0, classnames_1.default)('checkbox', className, { 'checkbox--large': size === 'large' });
60
- const iconChecked = size === 'large' ?
70
+ var containerClass = (0, classnames_1.default)('checkbox', className, { 'checkbox--large': size === 'large' });
71
+ var iconChecked = size === 'large' ?
61
72
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxChecked24", className: "checkbox__checked" }) :
62
73
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxChecked18", className: "checkbox__checked" });
63
- const iconUnChecked = size === 'large' ?
74
+ var iconUnChecked = size === 'large' ?
64
75
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxUnchecked24", className: "checkbox__unchecked" }) :
65
76
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "checkboxUnchecked18", className: "checkbox__unchecked" });
66
- const ebayLabel = (0, component_utils_1.findComponent)(children, ebay_field_1.EbayLabel);
77
+ var ebayLabel = (0, component_utils_1.findComponent)(children, ebay_field_1.EbayLabel);
67
78
  return (react_1.default.createElement(react_1.default.Fragment, null,
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 })),
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 })),
70
81
  react_1.default.createElement("span", { className: "checkbox__icon", hidden: true },
71
82
  iconChecked,
72
83
  iconUnChecked)),
73
84
  ebayLabel ?
74
- (0, react_1.cloneElement)(ebayLabel, Object.assign(Object.assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
85
+ (0, react_1.cloneElement)(ebayLabel, __assign(__assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
75
86
  children));
76
87
  };
77
88
  exports.default = EbayCheckbox;
@@ -1,4 +1,15 @@
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
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -37,17 +48,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
49
  };
39
50
  Object.defineProperty(exports, "__esModule", { value: true });
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 }),
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 }),
51
62
  rest.children,
52
63
  react_1.default.createElement(ebay_dialog_base_1.EbayDialogFooter, null,
53
64
  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<Omit<Props, "ref"> & React.RefAttributes<React.FC<Props>>>;
10
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "forwardedRef" | "key" | "size" | "fluid" | "truncate" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & React.RefAttributes<React.FC<Props>>>;
11
11
  export default _default;
12
12
  //# sourceMappingURL=cta-button.d.ts.map
@@ -1,4 +1,15 @@
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
+ };
2
13
  var __rest = (this && this.__rest) || function (s, e) {
3
14
  var t = {};
4
15
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -14,15 +25,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
26
  };
16
27
  Object.defineProperty(exports, "__esModule", { value: true });
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 }),
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 }),
26
37
  react_1.default.createElement(ebay_button_1.EbayButtonCell, { type: "cta" },
27
38
  react_1.default.createElement("span", null, children),
28
39
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "arrowRight24" }))));