@ebay/ui-core-react 7.1.0-alpha.2 → 7.1.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 (143) hide show
  1. package/common/tooltip-utils/index.d.ts +2 -2
  2. package/common/tooltip-utils/index.d.ts.map +1 -1
  3. package/ebay-button/README.md +4 -0
  4. package/ebay-button/index.d.ts +2 -2
  5. package/ebay-button/index.d.ts.map +1 -1
  6. package/ebay-carousel/index.d.ts +1 -1
  7. package/ebay-carousel/index.d.ts.map +1 -1
  8. package/ebay-date-textbox/index.d.ts +1 -1
  9. package/ebay-date-textbox/index.d.ts.map +1 -1
  10. package/ebay-dialog-base/index.d.ts +1 -1
  11. package/ebay-dialog-base/index.d.ts.map +1 -1
  12. package/ebay-eek/index.d.ts +1 -1
  13. package/ebay-eek/index.d.ts.map +1 -1
  14. package/ebay-fake-menu/index.d.ts +1 -1
  15. package/ebay-fake-menu/index.d.ts.map +1 -1
  16. package/ebay-fake-menu-button/index.d.ts +1 -1
  17. package/ebay-fake-menu-button/index.d.ts.map +1 -1
  18. package/ebay-field/index.d.ts +2 -2
  19. package/ebay-field/index.d.ts.map +1 -1
  20. package/ebay-icon/index.d.ts +2 -2
  21. package/ebay-icon/index.d.ts.map +1 -1
  22. package/ebay-icon/types.d.ts +1 -1
  23. package/ebay-icon/types.d.ts.map +1 -1
  24. package/ebay-icon-button/index.d.ts +1 -1
  25. package/ebay-icon-button/index.d.ts.map +1 -1
  26. package/ebay-infotip/index.d.ts +1 -1
  27. package/ebay-infotip/index.d.ts.map +1 -1
  28. package/ebay-inline-notice/index.d.ts +1 -1
  29. package/ebay-inline-notice/index.d.ts.map +1 -1
  30. package/ebay-menu/index.d.ts +2 -2
  31. package/ebay-menu/index.d.ts.map +1 -1
  32. package/ebay-menu-button/index.d.ts +1 -1
  33. package/ebay-menu-button/index.d.ts.map +1 -1
  34. package/ebay-page-notice/index.d.ts +1 -1
  35. package/ebay-page-notice/index.d.ts.map +1 -1
  36. package/ebay-pagination/index.d.ts +1 -1
  37. package/ebay-pagination/index.d.ts.map +1 -1
  38. package/ebay-progress-bar/index.d.ts +1 -1
  39. package/ebay-progress-bar/index.d.ts.map +1 -1
  40. package/ebay-progress-stepper/index.d.ts +1 -1
  41. package/ebay-progress-stepper/index.d.ts.map +1 -1
  42. package/ebay-section-notice/index.d.ts +1 -1
  43. package/ebay-section-notice/index.d.ts.map +1 -1
  44. package/ebay-section-notice/section-notice.d.ts.map +1 -1
  45. package/ebay-section-notice.js +1 -1
  46. package/ebay-select/index.d.ts +1 -1
  47. package/ebay-select/index.d.ts.map +1 -1
  48. package/ebay-signal/index.d.ts +1 -1
  49. package/ebay-signal/index.d.ts.map +1 -1
  50. package/ebay-snackbar-dialog/index.d.ts +1 -1
  51. package/ebay-snackbar-dialog/index.d.ts.map +1 -1
  52. package/ebay-split-button/index.d.ts +1 -1
  53. package/ebay-split-button/index.d.ts.map +1 -1
  54. package/ebay-star-rating/index.d.ts +1 -2
  55. package/ebay-star-rating/index.d.ts.map +1 -1
  56. package/ebay-star-rating/star-rating.d.ts +1 -1
  57. package/ebay-star-rating/star-rating.d.ts.map +1 -1
  58. package/ebay-star-rating-select/index.d.ts +1 -2
  59. package/ebay-star-rating-select/index.d.ts.map +1 -1
  60. package/ebay-svg/svg.d.ts.map +1 -1
  61. package/ebay-svg.js +1 -1
  62. package/ebay-textbox/index.d.ts +2 -2
  63. package/ebay-textbox/index.d.ts.map +1 -1
  64. package/ebay-tooltip/index.d.ts +1 -1
  65. package/ebay-tooltip/index.d.ts.map +1 -1
  66. package/ebay-tourtip/index.d.ts +1 -1
  67. package/ebay-tourtip/index.d.ts.map +1 -1
  68. package/ebay-video/index.d.ts +2 -2
  69. package/ebay-video/index.d.ts.map +1 -1
  70. package/package.json +2 -3
  71. package/array.polyfill.flat-Bj5UhY_-.mjs +0 -10
  72. package/badge-BX5HuO-3.mjs +0 -9
  73. package/button-B06HeRsZ.mjs +0 -63
  74. package/calendar-Dq0eM9VC.mjs +0 -216
  75. package/debounce-u81vJ6wg.mjs +0 -9
  76. package/dialog-previous-button-gmkm4c8J.mjs +0 -146
  77. package/drawer-Dcg135Bb.mjs +0 -40
  78. package/ebay-alert-dialog.mjs +0 -22
  79. package/ebay-badge.mjs +0 -4
  80. package/ebay-breadcrumbs.mjs +0 -39
  81. package/ebay-button.mjs +0 -5
  82. package/ebay-calendar.mjs +0 -4
  83. package/ebay-carousel.mjs +0 -229
  84. package/ebay-checkbox.mjs +0 -43
  85. package/ebay-confirm-dialog.mjs +0 -24
  86. package/ebay-cta-button.mjs +0 -20
  87. package/ebay-date-textbox.mjs +0 -74
  88. package/ebay-dialog-base.mjs +0 -9
  89. package/ebay-drawer-dialog.mjs +0 -4
  90. package/ebay-eek.mjs +0 -42
  91. package/ebay-fake-menu-button.mjs +0 -7
  92. package/ebay-fake-menu.mjs +0 -9
  93. package/ebay-fake-tabs.mjs +0 -27
  94. package/ebay-field.mjs +0 -19
  95. package/ebay-fullscreen-dialog.mjs +0 -9
  96. package/ebay-icon-button.mjs +0 -4
  97. package/ebay-icon.mjs +0 -4
  98. package/ebay-infotip.mjs +0 -59
  99. package/ebay-inline-notice.mjs +0 -31
  100. package/ebay-lightbox-dialog.mjs +0 -11
  101. package/ebay-listbox-button.mjs +0 -170
  102. package/ebay-menu-button.mjs +0 -82
  103. package/ebay-menu.mjs +0 -9
  104. package/ebay-notice-base.mjs +0 -7
  105. package/ebay-page-notice.mjs +0 -42
  106. package/ebay-pagination.mjs +0 -159
  107. package/ebay-panel-dialog.mjs +0 -11
  108. package/ebay-progress-bar.mjs +0 -6
  109. package/ebay-progress-spinner.mjs +0 -4
  110. package/ebay-progress-stepper.mjs +0 -63
  111. package/ebay-radio.mjs +0 -42
  112. package/ebay-section-notice.mjs +0 -46
  113. package/ebay-section-title.mjs +0 -24
  114. package/ebay-select.mjs +0 -69
  115. package/ebay-signal.mjs +0 -9
  116. package/ebay-snackbar-dialog.mjs +0 -46
  117. package/ebay-split-button.mjs +0 -20
  118. package/ebay-star-rating-select.mjs +0 -36
  119. package/ebay-star-rating.mjs +0 -8
  120. package/ebay-svg.mjs +0 -4753
  121. package/ebay-switch.mjs +0 -25
  122. package/ebay-tabs.mjs +0 -66
  123. package/ebay-textbox.mjs +0 -8
  124. package/ebay-toast-dialog.mjs +0 -9
  125. package/ebay-tooltip.mjs +0 -39
  126. package/ebay-tourtip.mjs +0 -43
  127. package/ebay-video.mjs +0 -173
  128. package/hooks-r29zhPsY.mjs +0 -63
  129. package/icon-B_a65KUD.mjs +0 -42
  130. package/icon-button-Dy8rjzH7.mjs +0 -24
  131. package/index-B5oC9Rl1.mjs +0 -22
  132. package/label-DgOo6Mql.mjs +0 -19
  133. package/menu-CR1Dxl2m.mjs +0 -154
  134. package/menu-button-label-vVnRKJRU.mjs +0 -68
  135. package/menu-item-jlKZ3uT4.mjs +0 -67
  136. package/notice-content-BVZMfcMH.mjs +0 -4
  137. package/notice-content-CdXVjKzD.mjs +0 -9
  138. package/notice-footer-BFa2IeY9.mjs +0 -10
  139. package/progress-spinner-BugUcF5c.mjs +0 -19
  140. package/range-DC7seOVT.mjs +0 -4
  141. package/textbox-BxYjEAZK.mjs +0 -100
  142. package/use-tooltip-Bibsm2rU.mjs +0 -158
  143. package/utils-BipBqkOS.mjs +0 -21
package/ebay-carousel.mjs DELETED
@@ -1,229 +0,0 @@
1
- import g, { Children as N, cloneElement as H, useState as w, useRef as y, useEffect as R, useCallback as W, useImperativeHandle as G } from "react";
2
- import S from "classnames";
3
- import { E as X, w as j } from "./icon-B_a65KUD.mjs";
4
- import { d as A } from "./debounce-u81vJ6wg.mjs";
5
- import "./array.polyfill.flat-Bj5UhY_-.mjs";
6
- const J = {
7
- prev: "chevronLeft12",
8
- next: "chevronRight12"
9
- }, K = {
10
- prev: "LEFT",
11
- next: "RIGHT"
12
- }, $ = ({ type: t, label: e, hidden: n, disabled: r, onClick: l }) => {
13
- const o = (c) => {
14
- l(c, { direction: K[t] });
15
- };
16
- return g.createElement(
17
- "button",
18
- { className: S("carousel__control", `carousel__control--${t}`), "aria-label": e, "aria-disabled": r, disabled: r, onClick: o },
19
- g.createElement(X, { className: S("icon", `icon--carousel-${t}`), focusable: !1, name: J[t], "aria-hidden": n })
20
- );
21
- };
22
- function Q(t) {
23
- const e = t.parentElement, n = e ? e.firstElementChild.getBoundingClientRect().left : 0, { left: r, right: l } = t.getBoundingClientRect();
24
- return {
25
- left: r - n,
26
- right: l - n
27
- };
28
- }
29
- const U = (t) => getComputedStyle(t).overflowX !== "visible", F = (t, e) => {
30
- if (!t.length)
31
- return 0;
32
- const n = t[t.length - 1];
33
- return Math.max(n.right - e, 0) || 0;
34
- }, Y = (t, e, n) => t.length && Math.min(t[e].left, F(t, n)) || 0, Z = (t, e, n, r, l, o) => N.map(t, (c, s) => {
35
- const { style: a = {} } = c.props;
36
- let f;
37
- if (n) {
38
- const i = n + n % 1;
39
- f = `calc(${100 / i}% - ${(i - 1) * o / i}px)`;
40
- }
41
- const u = n ? s % n === 0 : !0;
42
- return H(c, {
43
- ...c.props,
44
- slideWidth: r,
45
- offset: l,
46
- ref: (i) => {
47
- e.current[s] = i;
48
- },
49
- className: u ? "carousel__snap-point" : c.props.className,
50
- style: {
51
- ...a,
52
- width: f || a.width,
53
- marginRight: o && s !== N.count(t) - 1 ? `${o}px` : a.marginRight
54
- }
55
- });
56
- }), D = (t, e, n) => {
57
- if (t > 0) {
58
- let r = t;
59
- return r %= e.length || 1, r -= r % (n || 1), r = Math.abs(r), r;
60
- }
61
- return 0;
62
- }, P = (t, e, n = t) => {
63
- if (e)
64
- return Math.ceil(n / e);
65
- }, tt = (t) => t === "LEFT" ? -1 : 1, et = (t, e, n, r, l) => {
66
- let o = e, c;
67
- if (t === "LEFT" && o === 0)
68
- o = n.length - 1;
69
- else {
70
- do {
71
- const s = tt(t);
72
- c = n[o += s];
73
- } while (c && c.fullyVisible);
74
- if (t === "LEFT" && !l) {
75
- const s = c.right - r;
76
- do
77
- c = n[--o];
78
- while (c && c.left >= s);
79
- o += 1;
80
- }
81
- }
82
- return D(o, n, l);
83
- }, nt = (t, e, n, r = 1, l) => {
84
- let o;
85
- if (t >= F(e, n) - l)
86
- o = e.length - 1;
87
- else {
88
- const c = e.length;
89
- let s = 0, a = Math.ceil(c / r) - 1;
90
- for (; a - s > 1; ) {
91
- const i = Math.floor((s + a) / 2);
92
- t > e[i * r].left ? s = i : a = i;
93
- }
94
- const f = Math.abs(t - e[s * r].left), u = Math.abs(t - e[a * r].left);
95
- o = D((f > u ? a : s) * r, e, r);
96
- }
97
- return o;
98
- }, rt = (t, e) => {
99
- let n, r, l;
100
- return function o() {
101
- const { scrollLeft: c } = t;
102
- if (l !== c) {
103
- l = c, n = setTimeout(() => {
104
- r = requestAnimationFrame(o);
105
- }, 90);
106
- return;
107
- }
108
- e(l);
109
- }(), () => {
110
- clearTimeout(n), cancelAnimationFrame(r);
111
- };
112
- }, ot = typeof window < "u" && "scrollBehavior" in document.body.style;
113
- function V(t, e, n) {
114
- if (ot)
115
- return t.scrollTo({ left: e }), rt(t, n);
116
- let r, l, o = requestAnimationFrame((i) => {
117
- const { scrollLeft: d } = t, L = e - d, h = 450;
118
- (function T(C) {
119
- const m = C - i;
120
- if (m > h)
121
- return t.scrollLeft = e, c(), n();
122
- t.scrollLeft = ct(m / h) * L + d, o = requestAnimationFrame(T);
123
- })(i);
124
- });
125
- return t.addEventListener("touchstart", s), c;
126
- function c() {
127
- cancelAnimationFrame(o), r === void 0 ? f() : (l && l(), u());
128
- }
129
- function s() {
130
- c(), r = t.scrollLeft, t.addEventListener("touchend", a);
131
- }
132
- function a() {
133
- u(), r === t.scrollLeft && (l = V(t, e, n));
134
- }
135
- function f() {
136
- t.removeEventListener("touchstart", s);
137
- }
138
- function u() {
139
- t.removeEventListener("touchend", a);
140
- }
141
- }
142
- function ct(t) {
143
- return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
144
- }
145
- const lt = ({ gap: t = 16, itemsPerSlide: e, slideWidth: n, offset: r, activeIndex: l, nextControlDisabled: o, className: c, itemsRef: s, children: a, onSetActiveIndex: f, onScroll: u }) => {
146
- const [i, d] = w(0), [L, h] = w(!1), [T, C] = w(!1), m = y(null), E = y(null);
147
- R(() => {
148
- if (!N.count(a) || !m.current)
149
- return;
150
- if (L) {
151
- h(!1);
152
- return;
153
- }
154
- const v = m.current;
155
- U(v) ? (C(!0), V(v, r, () => C(!1))) : d(r);
156
- }, [r]);
157
- const b = W(() => {
158
- const p = m.current.scrollLeft, v = nt(p, s.current, n, e, t);
159
- v !== l && (h(!0), f(v), u({ index: v }));
160
- }, [m.current, s.current, n, l, f]), _ = () => {
161
- E.current && clearTimeout(E.current), E.current = setTimeout(() => {
162
- T || b();
163
- }, 640);
164
- };
165
- return g.createElement(
166
- "div",
167
- { className: S("carousel__viewport", {
168
- "carousel__viewport--mask": !o
169
- }, c) },
170
- g.createElement("ul", { className: "carousel__list", ref: m, onScroll: _, style: { transform: `translate3d(${-i}px, 0, 0)` } }, Z(a, s, e, n, r, t))
171
- );
172
- }, dt = ({ gap: t = 16, index: e = 0, itemsPerSlide: n, a11yPreviousText: r, a11yNextText: l, onScroll: o = () => {
173
- }, onNext: c = () => {
174
- }, onPrevious: s = () => {
175
- }, onSlide: a = () => {
176
- }, className: f, children: u, ...i }) => {
177
- const [d, L] = w(e), [h, T] = w(0), [C, m] = w(0), E = y(null), b = y([]), _ = N.count(u), p = Math.floor(n) || void 0, v = _ <= p, k = v || C === 0, x = v || C === F(b.current, h), M = () => {
178
- if (!E.current)
179
- return;
180
- const { width: I } = E.current.getBoundingClientRect();
181
- T(I);
182
- };
183
- R(() => (window.addEventListener("resize", A(M, 16)), () => {
184
- window.removeEventListener("resize", A(M, 16));
185
- }), []), R(() => {
186
- m(Y(b.current, d, h));
187
- }, [d, h]), R(() => {
188
- e >= 0 && e <= _ - 1 && L(e);
189
- }, [e]), R(() => {
190
- b.current = b.current.splice(0, _);
191
- }, [u]), R(() => {
192
- const { width: I } = E.current.getBoundingClientRect();
193
- T(I);
194
- }, [E.current]);
195
- const B = (I, { direction: O }) => {
196
- const z = et(O, d, b.current, h, p), q = P(d, p, z);
197
- L(z), O === "LEFT" ? s(I) : c(I), a({ slide: q });
198
- };
199
- return g.createElement(
200
- "div",
201
- { className: S("carousel", f, {
202
- "carousel--slides": p,
203
- "carousel--peek": p % 1 === 0
204
- }), ...i },
205
- g.createElement(
206
- "div",
207
- { ref: E, className: "carousel__container" },
208
- g.createElement($, { label: r, type: "prev", disabled: k, onClick: B }),
209
- g.createElement(lt, { itemsRef: b, offset: C, gap: t, itemsPerSlide: p, nextControlDisabled: x, activeIndex: d, onScroll: o, onSetActiveIndex: L, slideWidth: h }, u),
210
- g.createElement($, { type: "next", label: l, disabled: x, onClick: B })
211
- )
212
- );
213
- }, st = ({ slideWidth: t, offset: e, forwardedRef: n, children: r, ...l }) => {
214
- const o = y(), [c, s] = w(!1);
215
- return G(n, () => {
216
- if (!o.current)
217
- return;
218
- const { left: a, right: f } = Q(o.current), u = a === void 0 || a - e >= -0.01 && f - e <= t + 0.01;
219
- return s(u), {
220
- left: a,
221
- right: f,
222
- fullyVisible: u
223
- };
224
- }, [t, e]), g.createElement("li", { ref: o, "aria-hidden": !c, ...l }, r);
225
- }, mt = j(st);
226
- export {
227
- dt as EbayCarousel,
228
- mt as EbayCarouselItem
229
- };
package/ebay-checkbox.mjs DELETED
@@ -1,43 +0,0 @@
1
- import a, { useState as F, cloneElement as B } from "react";
2
- import L from "classnames";
3
- import { E as n } from "./icon-B_a65KUD.mjs";
4
- import { L as U } from "./label-DgOo6Mql.mjs";
5
- import { f as w } from "./utils-BipBqkOS.mjs";
6
- const D = (o) => typeof o < "u", q = ({ id: o, size: t = "default", className: m, style: k, checked: s, defaultChecked: d = !1, onChange: b = () => {
7
- }, onFocus: x = () => {
8
- }, onKeyDown: u = () => {
9
- }, children: h, inputRef: f, ...g }) => {
10
- const [C, E] = F(d), _ = (c) => {
11
- const e = c.target;
12
- b(c, { value: e == null ? void 0 : e.value, checked: !!(e != null && e.checked) }), E(e == null ? void 0 : e.checked);
13
- }, p = (c) => {
14
- var e, r;
15
- return x(c, { value: (e = c.target) == null ? void 0 : e.value, checked: !!((r = c.target) != null && r.checked) });
16
- }, i = (c) => {
17
- const e = c.target;
18
- u(c, { value: e.value, checked: !!e.checked });
19
- }, y = L("checkbox", m, { "checkbox--large": t === "large" }), N = t === "large" ? a.createElement(n, { name: "checkboxChecked24", className: "checkbox__checked" }) : a.createElement(n, { name: "checkboxChecked18", className: "checkbox__checked" }), v = t === "large" ? a.createElement(n, { name: "checkboxUnchecked24", className: "checkbox__unchecked" }) : a.createElement(n, { name: "checkboxUnchecked18", className: "checkbox__unchecked" }), l = w(h, U);
20
- return a.createElement(
21
- a.Fragment,
22
- null,
23
- a.createElement(
24
- "span",
25
- { className: y, style: { ...k, alignItems: "center" } },
26
- a.createElement("input", { ...g, id: o, className: "checkbox__control", type: "checkbox", checked: D(s) ? s : C, onChange: _, onFocus: p, onKeyDown: i, ref: f }),
27
- a.createElement(
28
- "span",
29
- { className: "checkbox__icon", hidden: !0 },
30
- N,
31
- v
32
- )
33
- ),
34
- l ? B(l, {
35
- ...l.props,
36
- position: "end",
37
- htmlFor: o
38
- }) : h
39
- );
40
- };
41
- export {
42
- q as EbayCheckbox
43
- };
@@ -1,24 +0,0 @@
1
- import o, { useRef as d } from "react";
2
- import g from "classnames";
3
- import { D as p, a as E } from "./dialog-previous-button-gmkm4c8J.mjs";
4
- import "./icon-button-Dy8rjzH7.mjs";
5
- import { E as l } from "./button-B06HeRsZ.mjs";
6
- const i = "confirm-dialog", y = ({ a11yCloseText: m = "Close Dialog", confirmText: c, rejectText: t, onReject: e = () => {
7
- }, onConfirm: s = () => {
8
- }, ...a }) => {
9
- const n = d(null), f = "confirm-dialog-confirm", r = "confirm-dialog-main";
10
- return o.createElement(
11
- p,
12
- { focus: n, ...a, a11yCloseText: m, role: "dialog", mainId: r, classPrefix: i, className: g(a.className, `${i}--mask-fade`), windowClass: `${i}__window ${i}__window--fade`, buttonPosition: "hidden", onCloseBtnClick: e },
13
- a.children,
14
- o.createElement(
15
- E,
16
- null,
17
- o.createElement(l, { onClick: e, className: "confirm-dialog__reject" }, t),
18
- o.createElement(l, { ref: n, priority: "primary", onClick: s, id: f, "aria-describedby": r, className: "confirm-dialog__confirm" }, c)
19
- )
20
- );
21
- };
22
- export {
23
- y as EbayConfirmDialog
24
- };
@@ -1,20 +0,0 @@
1
- import t from "react";
2
- import l from "classnames";
3
- import { w as E, E as b } from "./icon-B_a65KUD.mjs";
4
- import { a as u } from "./button-B06HeRsZ.mjs";
5
- const f = ({ size: a, children: e, fluid: r, truncate: n, forwardedRef: c, className: o, ...m }) => {
6
- const s = l(o, "cta-btn", { "cta-btn--large": a === "large" }, { "cta-btn--fluid": r }, { "cta-btn--truncated": n });
7
- return t.createElement(
8
- "a",
9
- { ...m, className: s, ref: c },
10
- t.createElement(
11
- u,
12
- { type: "cta" },
13
- t.createElement("span", null, e),
14
- t.createElement(b, { name: "arrowRight24" })
15
- )
16
- );
17
- }, B = E(f);
18
- export {
19
- B as EbayCtaButton
20
- };
@@ -1,74 +0,0 @@
1
- import l, { useRef as y, useState as c, useEffect as q } from "react";
2
- import G from "makeup-expander";
3
- import { d as _, E as J, t as K } from "./calendar-Dq0eM9VC.mjs";
4
- import { E as D, c as Q, i as O } from "./textbox-BxYjEAZK.mjs";
5
- import "./icon-B_a65KUD.mjs";
6
- import X from "classnames";
7
- const Z = 600, oe = ({ className: R, inputPlaceholderText: m = "YYYY-MM-DD", a11yOpenPopoverText: w = "open calendar", range: r, value: v, rangeEnd: S, defaultValue: L, defaultRangeEnd: M, collapseOnSelect: P, onChange: p = () => {
8
- }, onInputChange: A = () => {
9
- }, onInputRangeEndChange: C = () => {
10
- }, ...T }) => {
11
- const x = y(), d = y(null), [Y, u] = c(L || ""), [B, i] = c(M || ""), b = O(v) ? v : Y, g = O(S) ? S : B, [o, E] = c(() => _(b)), [s, f] = c(() => _(g)), [z, I] = c(!1), [F, W] = c(1), k = () => {
12
- I(!0);
13
- }, H = () => {
14
- I(!1);
15
- };
16
- q(() => {
17
- if (!d.current)
18
- return;
19
- x.current = new G(d.current, {
20
- hostSelector: ".ebay-date-textbox--main > .icon-btn",
21
- contentSelector: ".date-textbox__popover",
22
- expandOnClick: !0,
23
- autoCollapse: !0
24
- }), d.current.addEventListener("expander-expand", k), d.current.addEventListener("expander-collapse", H);
25
- const e = () => {
26
- W(document.documentElement.clientWidth < Z ? 1 : 2);
27
- };
28
- return e(), window.addEventListener("resize", e), () => {
29
- var t;
30
- (t = x.current) == null || t.destroy(), window.removeEventListener("resize", e);
31
- };
32
- }, []);
33
- const h = (e, t) => {
34
- const a = new Date(e.target.value), n = isNaN(a.getTime()) ? null : K(a);
35
- t === 0 ? (E(n), u(n || "")) : (f(n), i(n || "")), r ? p(e, {
36
- rangeStart: t === 0 ? n : o,
37
- rangeEnd: t === 1 ? n : s
38
- }) : p(e, {
39
- selected: n
40
- });
41
- }, U = (e, { iso: t }) => {
42
- if (E(t), u(t), r) {
43
- const a = o || s, n = {
44
- rangeStart: t,
45
- rangeEnd: a
46
- };
47
- o && s ? (i(""), f(null), n.rangeEnd = null) : a && (a < t ? (E(a), u(a), i(t), f(t), n.rangeStart = a, n.rangeEnd = t) : (E(t), u(t), i(a), f(a), n.rangeStart = t, n.rangeEnd = a)), p(e, n);
48
- } else
49
- p(e, {
50
- selected: t
51
- });
52
- P && (x.current.expanded = !1);
53
- }, N = (e, t) => {
54
- t === 0 ? (u(e.target.value), A(e)) : (i(e.target.value), C(e));
55
- }, [V, j] = Array.isArray(m) ? m : [m, m];
56
- return l.createElement(
57
- "span",
58
- { className: X("date-textbox", R), ref: d },
59
- r && l.createElement(D, { value: b, placeholder: V, onInputChange: (e) => N(e, 0), onBlur: (e) => h(e, 0) }),
60
- l.createElement(
61
- D,
62
- { className: "ebay-date-textbox--main", placeholder: j, value: r ? g : b, onInputChange: (e) => N(e, r ? 1 : 0), onBlur: (e) => h(e, r ? 1 : 0) },
63
- l.createElement(Q, { name: "calendar24", buttonAriaLabel: w })
64
- ),
65
- l.createElement(
66
- "div",
67
- { hidden: !z, className: "date-textbox__popover" },
68
- l.createElement(J, { ...T, range: r, interactive: !0, navigable: !0, numMonths: F, selected: o && s ? [o, s] : o || s || void 0, onSelect: U })
69
- )
70
- );
71
- };
72
- export {
73
- oe as EbayDateTextbox
74
- };
@@ -1,9 +0,0 @@
1
- import { D as s, c as t, b as i, a as e, E as l, d as D } from "./dialog-previous-button-gmkm4c8J.mjs";
2
- export {
3
- s as DialogBaseWithState,
4
- t as EbayDialogActions,
5
- i as EbayDialogCloseButton,
6
- e as EbayDialogFooter,
7
- l as EbayDialogHeader,
8
- D as EbayDialogPreviousButton
9
- };
@@ -1,4 +0,0 @@
1
- import { E as o } from "./drawer-Dcg135Bb.mjs";
2
- export {
3
- o as EbayDrawerDialog
4
- };
package/ebay-eek.mjs DELETED
@@ -1,42 +0,0 @@
1
- import a from "react";
2
- import m from "classnames";
3
- import { E as c } from "./icon-B_a65KUD.mjs";
4
- const d = {
5
- "A+++": ["D", "E", "G"],
6
- "A++": ["E", "G"],
7
- "A+": ["F", "G"],
8
- A: ["G"]
9
- }, E = (n) => {
10
- const { max: t, min: r, rating: i } = n, s = d[t];
11
- if (!(s && s.indexOf(r) > -1))
12
- return null;
13
- let e = t, l = 1;
14
- for (; e !== i; ) {
15
- if (l++, r === e)
16
- return null;
17
- e.length > 1 ? e = e.slice(0, e.length - 1) : e = String.fromCharCode(e.charCodeAt(0) + 1);
18
- }
19
- return l > 7 ? 7 : l;
20
- }, p = ({ min: n = "", max: t = "", rating: r, a11yText: i, className: s }) => {
21
- const e = E({ rating: r, min: n, max: t }), l = m(s, "eek", { [`eek--rating-${e}`]: !!e }), o = `Energy Rating: ${r}. Range: ${t} - ${n}.`;
22
- return a.createElement(
23
- "div",
24
- { className: l, role: "figure", "aria-label": i || o },
25
- a.createElement(
26
- "div",
27
- { className: "eek__container", "aria-hidden": !0 },
28
- a.createElement(
29
- "span",
30
- { className: "eek__rating-range" },
31
- a.createElement("span", { "aria-hidden": "true" }, t),
32
- a.createElement(c, { name: "eekRangeArrow" }),
33
- a.createElement("span", { "aria-hidden": "true" }, n)
34
- ),
35
- a.createElement("span", { className: "eek__rating", "aria-hidden": "true" }, r)
36
- ),
37
- a.createElement(c, { name: "eekArrow" })
38
- );
39
- };
40
- export {
41
- p as EbayEek
42
- };
@@ -1,7 +0,0 @@
1
- import { E as t, a as n, c as u, b as o } from "./menu-button-label-vVnRKJRU.mjs";
2
- export {
3
- t as EbayFakeMenuButton,
4
- n as EbayFakeMenuButtonItem,
5
- u as EbayFakeMenuButtonLabel,
6
- o as EbayFakeMenuButtonSeparator
7
- };
@@ -1,9 +0,0 @@
1
- import { E, a as c } from "./menu-item-jlKZ3uT4.mjs";
2
- import r from "react";
3
- import t from "classnames";
4
- const s = ({ className: a, ...e }) => r.createElement("hr", { ...e, className: t(a, "fake-menu__separator"), role: "separator" });
5
- export {
6
- E as EbayFakeMenu,
7
- c as EbayFakeMenuItem,
8
- s as EbayFakeMenuSeparator
9
- };
@@ -1,27 +0,0 @@
1
- import e, { cloneElement as p } from "react";
2
- import m from "classnames";
3
- import { b as E, e as u } from "./utils-BipBqkOS.mjs";
4
- const l = ({ children: t, href: s, ariaCurrent: r, className: a, ...n }) => e.createElement(
5
- "li",
6
- { ...n, className: m(a, "fake-tabs__item") },
7
- e.createElement("a", { href: s, "aria-current": r }, t)
8
- ), d = ({ selectedIndex: t = 0, tabMatchesCurrentUrl: s, className: r, children: a, ...n }) => {
9
- const o = s === !1 ? "true" : "page", b = E(a, l).map((c, f) => p(c, {
10
- ...c.props,
11
- ariaCurrent: t === f ? o : null
12
- })), i = u(a, l);
13
- return e.createElement(
14
- "div",
15
- { ...n, className: m(r, "fake-tabs") },
16
- e.createElement("ul", { className: "fake-tabs__items" }, b),
17
- e.createElement(
18
- "div",
19
- { className: "fake-tabs__content" },
20
- e.createElement("div", { className: "fake-tabs__cell" }, i)
21
- )
22
- );
23
- };
24
- export {
25
- l as EbayFakeTab,
26
- d as EbayFakeTabs
27
- };
package/ebay-field.mjs DELETED
@@ -1,19 +0,0 @@
1
- import t from "react";
2
- import l from "classnames";
3
- import { L as f } from "./label-DgOo6Mql.mjs";
4
- const m = ({ className: e, layout: a = "inline", children: r }) => {
5
- const s = a === "block" ? "div" : "span";
6
- return t.createElement(s, { className: l("field", e) }, r);
7
- }, d = ({ type: e, position: a = "below", className: r, children: s, ...n }) => {
8
- const i = l(r, "field__description", { [`field__description--${e}`]: e }), o = a === "below" ? "div" : "span";
9
- return t.createElement(
10
- o,
11
- { ...n, className: i },
12
- t.createElement("span", null, s)
13
- );
14
- };
15
- export {
16
- m as EbayField,
17
- d as EbayFieldDescription,
18
- f as EbayLabel
19
- };
@@ -1,9 +0,0 @@
1
- import n from "react";
2
- import s from "classnames";
3
- import { D as r } from "./dialog-previous-button-gmkm4c8J.mjs";
4
- import "./icon-button-Dy8rjzH7.mjs";
5
- const o = "fullscreen-dialog", f = ({ open: t, onClose: e = () => {
6
- }, className: i, animated: a, ...l }) => n.createElement(r, { ...l, classPrefix: o, buttonPosition: "right", onCloseBtnClick: e, transitionElement: "window", animated: a, className: s(i, `${o}--mask-fade-slow`), windowClass: s(`${o}__window`, `${o}__window--slide`), open: t });
7
- export {
8
- f as EbayFullscreenDialog
9
- };
@@ -1,4 +0,0 @@
1
- import { E as a } from "./icon-button-Dy8rjzH7.mjs";
2
- export {
3
- a as EbayIconButton
4
- };
package/ebay-icon.mjs DELETED
@@ -1,4 +0,0 @@
1
- import { E as r } from "./icon-B_a65KUD.mjs";
2
- export {
3
- r as EbayIcon
4
- };
package/ebay-infotip.mjs DELETED
@@ -1,59 +0,0 @@
1
- import t, { useRef as h, createElement as P, cloneElement as $ } from "react";
2
- import w from "classnames";
3
- import { f as E } from "./utils-BipBqkOS.mjs";
4
- import { u as k, T as B, a as M, b as j } from "./use-tooltip-Bibsm2rU.mjs";
5
- import { E as q } from "./drawer-Dcg135Bb.mjs";
6
- import { E as v } from "./dialog-previous-button-gmkm4c8J.mjs";
7
- import "react-remove-scroll";
8
- import "makeup-screenreader-trap";
9
- import "makeup-keyboard-trap";
10
- import { w as z, E as A } from "./icon-B_a65KUD.mjs";
11
- import "./icon-button-Dy8rjzH7.mjs";
12
- import G from "classnames/dedupe";
13
- const J = ({ icon: o, className: e, children: n, forwardedRef: r, variant: l, ...p }) => {
14
- const a = l === "modal" ? "dialog--mini" : "infotip", i = t.createElement(A, { name: o }), c = n instanceof Function ? n({ icon: i }) : n;
15
- return t.createElement("button", { ...p, className: G("icon-btn icon-btn--transparent", e, `${a}__host`), type: "button", ref: r }, c || i);
16
- }, T = z(J), nt = ({ variant: o = "default", pointer: e, overlayStyle: n, disabled: r, onExpand: l, onCollapse: p, children: a, initialExpanded: i, icon: c = "information16", a11yCloseText: b, "aria-label": H, className: N, a11yMaximizeText: R, a11yMinimizeText: _ }) => {
17
- const u = h(), { isExpanded: s, expandTooltip: x, collapseTooltip: m } = k({ onCollapse: p, onExpand: l, initialExpanded: i, hostRef: u }), f = o === "modal", F = h(), d = E(a, K), y = E(a, L), g = E(a, T) || P(T), D = () => {
18
- s ? m() : x();
19
- };
20
- if (!y)
21
- throw new Error("EbayInfotip: Please use a EbayInfotipContent that defines the content of the infotip");
22
- const { children: I, ...C } = y.props;
23
- return t.createElement(
24
- t.Fragment,
25
- null,
26
- t.createElement(
27
- B,
28
- { type: "infotip", isExpanded: s, className: w(N, { "dialog--mini": f }), ref: F },
29
- t.createElement(M, null, $(g, {
30
- ref: u,
31
- onClick: D,
32
- disabled: r,
33
- variant: o,
34
- "aria-label": H,
35
- "aria-expanded": s,
36
- icon: c,
37
- ...g.props
38
- })),
39
- !f && t.createElement(
40
- j,
41
- { ...C, type: "infotip", style: n, pointer: e, showCloseButton: !0, a11yCloseText: b, onClose: m },
42
- d,
43
- I
44
- )
45
- ),
46
- f && t.createElement(
47
- q,
48
- { ...C, open: s, onClose: m, a11yCloseText: b, className: "dialog--mini__overlay", a11yMaximizeText: R, a11yMinimizeText: _ },
49
- t.createElement(v, null, d),
50
- I
51
- )
52
- );
53
- }, K = ({ className: o, ...e }) => t.createElement("span", { ...e, className: w("infotip__heading", o) }), L = ({ children: o }) => t.createElement(t.Fragment, null, o);
54
- export {
55
- nt as EbayInfotip,
56
- L as EbayInfotipContent,
57
- K as EbayInfotipHeading,
58
- T as EbayInfotipHost
59
- };
@@ -1,31 +0,0 @@
1
- import e, { useEffect as s } from "react";
2
- import f from "classnames";
3
- import { E } from "./notice-content-BVZMfcMH.mjs";
4
- import { N as p } from "./notice-content-CdXVjKzD.mjs";
5
- import { f as N } from "./utils-BipBqkOS.mjs";
6
- import { E as y } from "./icon-B_a65KUD.mjs";
7
- const w = ({ className: i, status: n = "general", children: r, hidden: t = !1, "aria-label": l, onNoticeShow: c = () => {
8
- }, ...m }) => {
9
- if (s(() => {
10
- t || c();
11
- }, [t]), t)
12
- return null;
13
- const o = N(r, E);
14
- if (!o)
15
- throw new Error("EbayInlineNotice: Please use a EbayNoticeContent that defines the content of the notice");
16
- const a = n === "general";
17
- return e.createElement(
18
- "div",
19
- { ...m, className: f(i, "inline-notice", { [`inline-notice--${n}`]: !a }) },
20
- a ? null : e.createElement(
21
- "span",
22
- { className: "inline-notice__header" },
23
- e.createElement(y, { name: `${n}Filled16`, a11yText: l, a11yVariant: "label" })
24
- ),
25
- e.createElement(p, { ...o.props, type: "inline" })
26
- );
27
- };
28
- export {
29
- w as EbayInlineNotice,
30
- E as EbayNoticeContent
31
- };
@@ -1,11 +0,0 @@
1
- import n from "react";
2
- import s from "classnames";
3
- import { D as e } from "./dialog-previous-button-gmkm4c8J.mjs";
4
- import "./icon-button-Dy8rjzH7.mjs";
5
- const o = "lightbox-dialog", f = ({ open: l, mode: m, size: i, onClose: a = () => {
6
- }, ...t }) => n.createElement(e, { buttonPosition: "right", ...t, classPrefix: o, onCloseBtnClick: a, onBackgroundClick: a, className: s(t.className, `${o}--mask-fade`, i && `${o}--${i}`), windowClass: s("lightbox-dialog__window--fade", {
7
- [`${o}__window--mini`]: m === "mini"
8
- }), open: l });
9
- export {
10
- f as EbayLightboxDialog
11
- };