@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/menu-CR1Dxl2m.mjs DELETED
@@ -1,154 +0,0 @@
1
- import v, { useState as A, useEffect as C, Children as L, useRef as H, cloneElement as S } from "react";
2
- import V from "classnames";
3
- import { i as T } from "./index-B5oC9Rl1.mjs";
4
- import { E as $, w as j } from "./icon-B_a65KUD.mjs";
5
- import "./array.polyfill.flat-Bj5UhY_-.mjs";
6
- import { E as q } from "./badge-BX5HuO-3.mjs";
7
- const z = () => {
8
- const [u, s] = A(!1), [p, o] = A(!1), d = ({ key: a }) => {
9
- const c = {
10
- ArrowUp: s,
11
- ArrowDown: o
12
- }[a];
13
- c && c(!1);
14
- }, l = ({ key: a }) => {
15
- const c = {
16
- ArrowUp: s,
17
- ArrowDown: o
18
- }[a];
19
- c && c(!0);
20
- };
21
- return C(() => (window.addEventListener("keydown", l), window.addEventListener("keyup", d), () => {
22
- window.removeEventListener("keydown", l), window.removeEventListener("keyup", d);
23
- }), []), [u, p];
24
- }, G = (u, s, p) => {
25
- const [o, d] = A(p), [l, a] = z(), c = L.toArray(u).reduce((t, I, h) => I.type === s ? [...t, h] : t, []), m = c.indexOf(o), E = () => {
26
- if (m === -1)
27
- return o;
28
- const t = c[m - 1];
29
- return t === void 0 ? o : t;
30
- }, f = () => {
31
- if (m === -1)
32
- return o;
33
- const t = c[m + 1];
34
- return t === void 0 ? o : t;
35
- };
36
- return C(() => {
37
- l && d(E()), a && d(f());
38
- }, [l, a]), [o, d];
39
- }, J = ({ className: u, checked: s, type: p, focused: o = !1, tabIndex: d, disabled: l, badgeNumber: a, badgeAriaLabel: c, children: m, ...E }) => {
40
- const f = H(null), t = a !== void 0;
41
- C(() => {
42
- f.current && o && f.current.focus();
43
- }, [f, o]);
44
- const I = ["radio", "checkbox"];
45
- return v.createElement(
46
- "div",
47
- { "aria-label": c, ...E, ref: f, className: V(u, "menu__item", t && "menu__item--badged"), role: Q(p), "aria-checked": I.includes(p) ? s : void 0, "aria-disabled": l, tabIndex: o ? 0 : d },
48
- v.createElement(
49
- "span",
50
- { "aria-hidden": t },
51
- m,
52
- t && v.createElement(q, { type: "menu", number: a })
53
- ),
54
- v.createElement($, { name: "tick16" })
55
- );
56
- };
57
- function Q(u) {
58
- return {
59
- radio: "menuitemradio",
60
- checkbox: "menuitemcheckbox"
61
- }[u] || "menuitem";
62
- }
63
- const W = ({ baseEl: u = "span", type: s, priority: p = "secondary", checked: o, className: d, autofocus: l, onClick: a = () => {
64
- }, onKeyDown: c = () => {
65
- }, onChange: m = () => {
66
- }, onSelect: E = () => {
67
- }, forwardedRef: f, children: t, ...I }) => {
68
- const h = L.toArray(t), [P, D] = G(t, J, l === !0 ? 0 : void 0), [k, F] = A(h.map(() => !1)), B = (n) => h.reduce((e, r, w) => n[w] ? [...e, r.props.value] : e, []), R = (n) => n.reduce((e, r, w) => r ? [...e, w] : e, []), g = (n, e) => ({
69
- index: n,
70
- checked: R(e)
71
- }), _ = (n, e) => ({
72
- ...g(n, e),
73
- indexes: R(e),
74
- checkedValues: B(e)
75
- }), K = (n, e, r = !1) => {
76
- let w = !1;
77
- const y = k.map((b, i) => {
78
- const O = r ? !1 : b;
79
- return n === i ? (b !== e && (w = !0), e) : O;
80
- });
81
- if (w)
82
- return F(y), y;
83
- }, x = (n) => {
84
- switch (s) {
85
- case "radio":
86
- return K(n, !0, !0);
87
- case "checkbox":
88
- return K(n, !k[n], !1);
89
- default:
90
- return k.map((e, r) => r === n);
91
- }
92
- };
93
- C(() => {
94
- if (s === "radio")
95
- if (o === void 0) {
96
- const n = h.findIndex((e) => e.props.checked);
97
- n > -1 && x(n);
98
- } else
99
- x(o);
100
- else s === "checkbox" && F(h.map((n) => !!n.props.checked));
101
- }, []);
102
- const U = (n, e, r) => {
103
- switch (s) {
104
- case "radio":
105
- case "checkbox":
106
- return m(n, _(e, r));
107
- default:
108
- return E(n, g(e, r));
109
- }
110
- }, M = (n, e) => {
111
- let r;
112
- switch (T(n.key) && (r = x(e), r && U(n, e, r)), s) {
113
- case "radio":
114
- case "checkbox":
115
- return c(n, _(e, r || k));
116
- default:
117
- return c(n, g(e, r || k));
118
- }
119
- }, N = (n, e) => {
120
- D(e);
121
- const r = x(e);
122
- r && U(n, e, r);
123
- };
124
- return v.createElement(
125
- u,
126
- { ...I, className: V(d, "menu") },
127
- v.createElement("div", { className: "menu__items", role: "menu", ref: f }, h.map((n, e) => {
128
- const { onClick: r = () => {
129
- }, onFocus: w = () => {
130
- }, onKeyDown: y = () => {
131
- }, ...b } = n.props;
132
- return S(n, {
133
- ...b,
134
- type: s,
135
- focused: e === P,
136
- tabIndex: P === void 0 ? 0 : -1,
137
- checked: k[e],
138
- onFocus: (i) => {
139
- D(e), w(i);
140
- },
141
- onClick: (i) => {
142
- N(i, e), r(i), a(i);
143
- },
144
- onKeyDown: (i) => {
145
- M(i, e), y(i);
146
- }
147
- });
148
- }))
149
- );
150
- }, oe = j(W);
151
- export {
152
- oe as E,
153
- J as a
154
- };
@@ -1,68 +0,0 @@
1
- import t, { useState as E, useRef as S, useEffect as b, cloneElement as T } from "react";
2
- import r from "classnames";
3
- import { f as y, b as D } from "./utils-BipBqkOS.mjs";
4
- import { b as R } from "./index-B5oC9Rl1.mjs";
5
- import { r as z, E as H } from "./icon-B_a65KUD.mjs";
6
- import { E as P } from "./button-B06HeRsZ.mjs";
7
- import { E as j } from "./icon-button-Dy8rjzH7.mjs";
8
- import { E as q, a as A } from "./menu-item-jlKZ3uT4.mjs";
9
- const ee = ({ a11yText: o, noToggleIcon: u, fixWidth: k, reverse: _, variant: l, expanded: I = !1, className: M, onCollapse: v = () => {
10
- }, onExpand: x = () => {
11
- }, onMouseDown: B = () => {
12
- }, onSelect: w = () => {
13
- }, text: f = "", children: m, ...N }) => {
14
- const [a, c] = E(I), [p, F] = E(), s = S(), d = y(m, H), h = y(m, O) || (d ? t.createElement("span", null, f) : f), C = D(m, [G, J]);
15
- b(() => {
16
- const e = (n) => {
17
- s.current && !s.current.contains(n.currentTarget) && c(!1);
18
- };
19
- return a ? (x(), setTimeout(() => {
20
- document.addEventListener("click", e, !1);
21
- })) : a === !1 && v(), () => document.removeEventListener("click", e, !1);
22
- }, [a]), b(() => {
23
- F(z());
24
- }, []);
25
- const g = (e) => {
26
- R(e, () => {
27
- var n;
28
- c(!1), (n = s.current) == null || n.focus();
29
- });
30
- }, K = r("fake-menu-button__menu", {
31
- "menu-button__menu--fix-width": k,
32
- "menu-button__menu--reverse": _
33
- }), i = {
34
- ref: s,
35
- className: "fake-menu-button__button",
36
- "aria-expanded": !!a,
37
- "aria-haspopup": !0,
38
- "aria-label": o,
39
- "aria-controls": p,
40
- onClick: () => c(!a),
41
- ...N
42
- };
43
- return t.createElement(
44
- "span",
45
- { className: r("fake-menu-button", M) },
46
- l === "overflow" ? t.createElement(j, { icon: "overflowHorizontal24", ...i }) : t.createElement(
47
- P,
48
- { variant: l === "form" ? "form" : void 0, bodyState: u ? void 0 : "expand", ...i },
49
- d,
50
- h
51
- ),
52
- a && t.createElement(q, { className: K, id: p, tabIndex: -1, onKeyDown: g, onSelect: w }, C.map((e, n) => T(e, {
53
- ...e.props,
54
- onMouseDown: (L) => {
55
- B(L, { index: n });
56
- },
57
- className: r(e.props.className, "fake-menu-button__item"),
58
- key: n,
59
- autoFocus: n === 0
60
- })))
61
- );
62
- }, G = A, J = ({ className: o, ...u }) => t.createElement("hr", { ...u, className: r(o, "menu-button__separator"), role: "separator" }), O = ({ children: o }) => t.createElement(t.Fragment, null, o);
63
- export {
64
- ee as E,
65
- G as a,
66
- J as b,
67
- O as c
68
- };
@@ -1,67 +0,0 @@
1
- import e, { Children as g, cloneElement as k, useRef as v, useEffect as _ } from "react";
2
- import b from "classnames";
3
- import { E as x } from "./icon-B_a65KUD.mjs";
4
- import { E as C } from "./badge-BX5HuO-3.mjs";
5
- const h = ({ className: l, itemMatchesUrl: p = !0, onKeyDown: n = () => {
6
- }, onSelect: u = () => {
7
- }, children: E, ...r }) => {
8
- const f = g.toArray(E), c = p === !1 ? "true" : "page";
9
- return e.createElement(
10
- "div",
11
- { ...r, className: b(l, "fake-menu") },
12
- e.createElement("ul", { className: "fake-menu__items", tabIndex: -1 }, f.map((s, t) => {
13
- const { current: m, onClick: o = () => {
14
- }, ...i } = s.props;
15
- return e.createElement("li", { key: t }, k(s, {
16
- ...i,
17
- "aria-current": m ? c : void 0,
18
- onClick: (a) => {
19
- u(a, { index: t }), o(a);
20
- },
21
- onKeyDown: (a) => {
22
- n(a, { index: t });
23
- }
24
- }));
25
- }))
26
- );
27
- }, B = ({ className: l, current: p, disabled: n, autoFocus: u, type: E, badgeNumber: r, badgeAriaLabel: f, children: c, ...s }) => {
28
- const t = v(), m = r !== void 0;
29
- _(() => {
30
- var y;
31
- u && ((y = t.current) == null || y.focus());
32
- });
33
- const o = {
34
- ...s,
35
- ref: t,
36
- className: b(l, "fake-menu__item", m && "menu__item--badged"),
37
- "aria-label": f
38
- }, i = e.createElement(x, { name: "tick16" }), a = {
39
- marginLeft: "var(--spacing-100)",
40
- marginRight: "var(--spacing-100)"
41
- }, d = m && e.createElement(C, { type: "menu", number: r, style: a });
42
- return E === "button" ? e.createElement(
43
- "button",
44
- { ...o, type: "button", disabled: n },
45
- e.createElement(
46
- "span",
47
- null,
48
- c,
49
- d
50
- ),
51
- i
52
- ) : e.createElement(
53
- "a",
54
- { ...o, "aria-disabled": n ? "true" : void 0 },
55
- e.createElement(
56
- "span",
57
- null,
58
- c,
59
- d
60
- ),
61
- i
62
- );
63
- };
64
- export {
65
- h as E,
66
- B as a
67
- };
@@ -1,4 +0,0 @@
1
- const t = () => null;
2
- export {
3
- t as E
4
- };
@@ -1,9 +0,0 @@
1
- import a from "react";
2
- import s from "classnames";
3
- const m = ({ className: e, type: t, children: n }) => {
4
- const o = t === "inline" ? "span" : "div";
5
- return a.createElement(o, { className: s(e, `${t}-notice__main`) }, n);
6
- };
7
- export {
8
- m as N
9
- };
@@ -1,10 +0,0 @@
1
- import c from "react";
2
- import s from "classnames";
3
- const l = ({ className: e, type: t, as: o, children: a, ...r }) => {
4
- const i = o || "h2";
5
- return c.createElement(i, { className: s(e, `${t}-notice__title`), ...r }, a);
6
- }, N = ({ className: e, type: t, children: o, ...a }) => c.createElement("div", { className: s(e, `${t}-notice__footer`), ...a }, o);
7
- export {
8
- l as N,
9
- N as a
10
- };
@@ -1,19 +0,0 @@
1
- import s from "react";
2
- import l from "classnames";
3
- import { E as o } from "./icon-B_a65KUD.mjs";
4
- const m = {
5
- default: "",
6
- small: "progress-spinner--small",
7
- large: "progress-spinner--large"
8
- }, p = {
9
- default: "spinner24",
10
- small: "spinner20",
11
- large: "spinner30"
12
- }, g = ({ size: e = "default", "aria-label": a = "Busy", className: r, ...n }) => s.createElement(
13
- "span",
14
- { ...n, className: l("progress-spinner", m[e], r), "aria-label": a, role: "img" },
15
- s.createElement(o, { name: p[e] })
16
- );
17
- export {
18
- g as E
19
- };
@@ -1,4 +0,0 @@
1
- const i = (a, l, r = 1) => Array(Math.ceil((l + 1 - a) / r)).fill(a).map((c, e) => c + e * r);
2
- export {
3
- i as r
4
- };
@@ -1,100 +0,0 @@
1
- import n, { useState as C, useEffect as ca, cloneElement as ra } from "react";
2
- import ia from "classnames";
3
- import { E as B, w as ua } from "./icon-B_a65KUD.mjs";
4
- import { f as m } from "./utils-BipBqkOS.mjs";
5
- import { E as pa } from "./icon-button-Dy8rjzH7.mjs";
6
- import { u as da } from "./hooks-r29zhPsY.mjs";
7
- const ba = ({ name: o, buttonAriaLabel: t, onClick: c = () => {
8
- }, ...r }) => t ? n.createElement(pa, { "aria-label": t, icon: o, transparent: !0, onClick: c, ...r }) : n.createElement(B, { name: o, ...r }), ma = (o) => n.createElement("span", { ...o }), xa = ({ name: o, ...t }) => n.createElement(B, { name: o, ...t }), fa = (o) => n.createElement("span", { ...o }), w = (o) => typeof o < "u", Ea = ({ type: o = "text", invalid: t, fluid: c, multiline: r, onChange: F = () => {
9
- }, onInputChange: N = () => {
10
- }, onFocus: P = () => {
11
- }, onBlur: K = () => {
12
- }, onKeyPress: T = () => {
13
- }, onKeyUp: k = () => {
14
- }, onKeyDown: L = () => {
15
- }, onInvalid: D = () => {
16
- }, onFloatingLabelInit: R = () => {
17
- }, onButtonClick: U = () => {
18
- }, autoFocus: f, defaultValue: x = "", value: i, forwardedRef: _, inputSize: E = "default", floatingLabel: j, children: u, placeholder: M, opaqueLabel: O, ...s }) => {
19
- var h, v;
20
- const [y, V] = C(x), [g, W] = C(x), { label: $, Container: q, onBlur: G, onFocus: H, ref: J, placeholder: Q } = da({
21
- ref: _,
22
- inputId: s.id,
23
- className: s.className,
24
- disabled: s.disabled,
25
- label: j,
26
- inputSize: E,
27
- inputValue: i || g,
28
- placeholder: M,
29
- invalid: t,
30
- type: o,
31
- opaqueLabel: O,
32
- onMount: R
33
- }), I = (a) => {
34
- var e;
35
- P(a, { value: ((e = a == null ? void 0 : a.target) == null ? void 0 : e.value) || x }), H();
36
- }, S = (a) => {
37
- var l;
38
- const e = (l = a.target) == null ? void 0 : l.value;
39
- K(a, { value: e }), e !== y && (F(a, { value: e }), V(e)), G();
40
- }, X = (a) => {
41
- const e = a.target;
42
- T(a, { value: e == null ? void 0 : e.value });
43
- }, Y = (a) => {
44
- const e = a.target;
45
- k(a, { value: e == null ? void 0 : e.value });
46
- }, Z = (a) => {
47
- const e = a.target;
48
- L(a, { value: e == null ? void 0 : e.value });
49
- }, z = (a) => {
50
- const e = a.target;
51
- D(a, { value: e == null ? void 0 : e.value });
52
- }, A = (a) => {
53
- U(a, { value: y });
54
- };
55
- ca(() => {
56
- f && I();
57
- }, []);
58
- const aa = (a) => {
59
- var l;
60
- const e = (l = a.target) == null ? void 0 : l.value;
61
- w(i) || W(e), N(a, { value: e });
62
- }, ea = r ? "textarea" : "input", oa = c ? "div" : "span", ta = m(u, xa), p = m(u, fa), na = (h = p == null ? void 0 : p.props) == null ? void 0 : h.id, d = m(u, ba), b = m(u, ma), sa = (v = b == null ? void 0 : b.props) == null ? void 0 : v.id, la = ia("textbox", s.className, {
63
- "textbox--fluid": c,
64
- "textbox--large": E === "large",
65
- /** start remove after `:has` support */
66
- "textbox--disabled": s.disabled,
67
- "textbox--invalid": t,
68
- "textbox--readonly": s.readOnly
69
- /** end remove after `:has` support */
70
- });
71
- return n.createElement(
72
- q,
73
- null,
74
- $,
75
- n.createElement(
76
- oa,
77
- { className: la },
78
- ta,
79
- p,
80
- n.createElement(ea, { "aria-describedby": [na, sa].filter(Boolean).join(" ") || void 0, ...s, className: "textbox__control", type: o, "aria-invalid": t, value: w(i) ? i : g, onChange: aa, onBlur: S, onFocus: I, onKeyPress: X, onKeyUp: Y, onKeyDown: Z, onInvalid: z, autoFocus: f, ref: J, placeholder: Q }),
81
- b,
82
- d && ra(d, {
83
- ...d.props,
84
- onClick: (a) => {
85
- const { onClick: e = () => {
86
- } } = d.props;
87
- e(a), A(a);
88
- }
89
- })
90
- )
91
- );
92
- }, wa = ua(Ea);
93
- export {
94
- wa as E,
95
- xa as a,
96
- fa as b,
97
- ba as c,
98
- ma as d,
99
- w as i
100
- };
@@ -1,158 +0,0 @@
1
- import l, { Children as E, cloneElement as x, useState as T } from "react";
2
- import f from "classnames";
3
- import { w as g, E as h } from "./icon-B_a65KUD.mjs";
4
- import { f as i, e as d } from "./utils-BipBqkOS.mjs";
5
- const u = ({ children: t, className: o, forwardedRef: s, ...a }) => (E.only(t), x(t, {
6
- ref: s,
7
- ...a,
8
- className: f(o, t.props.className)
9
- })), N = ({ className: t, type: o, isExpanded: s, children: a, forwardedRef: e, ...p }) => {
10
- var m;
11
- const c = i(a, u), n = d(a, u)[0];
12
- if (!c)
13
- throw new Error("Tooltip: Please use a TooltipHost that defines the host of the tooltip");
14
- const r = x(c, {
15
- className: `${o}__host`,
16
- "aria-expanded": s,
17
- "aria-describedby": (m = n == null ? void 0 : n.props) == null ? void 0 : m.id,
18
- ...c.props
19
- });
20
- return l.createElement(
21
- "span",
22
- { ...p, ref: e, className: f(t, o, {
23
- [`${o}--expanded`]: s
24
- }) },
25
- r,
26
- n
27
- );
28
- }, S = g(N), $ = "bottom", C = {
29
- tooltip: "tooltip",
30
- tourtip: "region",
31
- infotip: ""
32
- }, X = {
33
- left: {
34
- transform: "translateX(16px) translateY(-50%) scale3d(1,1,1)",
35
- left: "100%",
36
- right: "auto",
37
- top: "-6px",
38
- bottom: "auto"
39
- },
40
- "left-top": {
41
- transform: "translateX(16px) scale3d(1,1,1)",
42
- left: "100%",
43
- right: "auto",
44
- top: "-100%",
45
- bottom: "auto"
46
- },
47
- "left-bottom": {
48
- transform: "translateX(16px) scale3d(1,1,1)",
49
- left: "100%",
50
- right: "auto",
51
- top: "auto",
52
- bottom: "-10px"
53
- },
54
- right: {
55
- transform: "translateX(-16px) translateY(-50%) scale3d(1,1,1)",
56
- left: "auto",
57
- right: "100%",
58
- top: "-6px",
59
- bottom: "auto"
60
- },
61
- "right-top": {
62
- transform: "translateX(-16px) scale3d(1,1,1)",
63
- left: "auto",
64
- right: "100%",
65
- top: "-100%",
66
- bottom: "auto"
67
- },
68
- "right-bottom": {
69
- transform: "translateX(-16px) scale3d(1,1,1)",
70
- left: "auto",
71
- right: "100%",
72
- top: "auto",
73
- bottom: "-50%"
74
- },
75
- top: {
76
- transform: "translateX(-50%) scale3d(1,1,1)",
77
- left: "50%",
78
- right: "auto",
79
- top: "calc(100% + 2px)",
80
- bottom: "auto"
81
- },
82
- "top-left": {
83
- transform: "scale3d(1,1,1)",
84
- left: "-10px",
85
- right: "auto",
86
- top: "calc(100% + 2px)",
87
- bottom: "auto"
88
- },
89
- "top-right": {
90
- transform: "scale3d(1,1,1)",
91
- left: "auto",
92
- right: "-10px",
93
- top: "calc(100% + 2px)",
94
- bottom: "auto"
95
- },
96
- "bottom-right": {
97
- transform: "scale3d(1,1,1)",
98
- left: "auto",
99
- right: "-10px",
100
- top: "auto",
101
- bottom: "calc(100% + 12px)"
102
- },
103
- "bottom-left": {
104
- transform: "scale3d(1,1,1)",
105
- left: "-10px",
106
- right: "auto",
107
- top: "auto",
108
- bottom: "calc(100% + 12px)"
109
- },
110
- bottom: {
111
- transform: "translateX(-50%) scale3d(1,1,1)",
112
- left: "50%",
113
- right: "auto",
114
- top: "auto",
115
- bottom: "calc(100% + 12px)"
116
- }
117
- }, I = () => null, b = ({ children: t, className: o, type: s = "tourtip" }) => l.createElement("div", { className: f(`${s}__footer`, o) }, t), Y = ({ id: t, style: o, pointer: s = $, children: a, type: e = "tooltip", showCloseButton: p, a11yCloseText: c, onClose: n }) => {
118
- const r = i(a, I), m = i(a, b), _ = d(a, b);
119
- return l.createElement(
120
- "span",
121
- { className: `${e}__overlay`, id: t, role: C[e] || null, style: { ...X[s], ...o } },
122
- l.createElement("span", { className: `${e}__pointer ${e}__pointer--${s}` }),
123
- l.createElement(
124
- "span",
125
- { className: `${e}__mask` },
126
- l.createElement(
127
- "span",
128
- { className: `${e}__cell` },
129
- l.createElement("span", { className: `${e}__content` }, _),
130
- p ? l.createElement(
131
- "button",
132
- { ...r == null ? void 0 : r.props, className: `icon-btn icon-btn--transparent ${e}__close`, type: "button", "aria-label": c, onClick: n },
133
- l.createElement(h, { name: "close16" })
134
- ) : null,
135
- m
136
- )
137
- )
138
- );
139
- }, H = ({ onExpand: t, onCollapse: o, initialExpanded: s = !1, hostRef: a }) => {
140
- const [e, p] = T(s);
141
- return {
142
- isExpanded: e,
143
- expandTooltip: () => {
144
- p(!0), t && t();
145
- },
146
- collapseTooltip: () => {
147
- var r;
148
- p(!1), o && o(), (r = a == null ? void 0 : a.current) == null || r.focus();
149
- }
150
- };
151
- };
152
- export {
153
- S as T,
154
- u as a,
155
- Y as b,
156
- b as c,
157
- H as u
158
- };
@@ -1,21 +0,0 @@
1
- import { Children as o } from "react";
2
- import "./array.polyfill.flat-Bj5UhY_-.mjs";
3
- function f(e = [], t) {
4
- return o.toArray(e).find(({ type: n }) => n === t) || null;
5
- }
6
- function m(e = [], t) {
7
- return o.toArray(e).filter(({ type: n }) => n !== t);
8
- }
9
- function c(e = [], t) {
10
- const r = o.toArray(e), n = [t].flat();
11
- return r.filter(({ type: l }) => n.includes(l));
12
- }
13
- function u(e = [], t) {
14
- return o.toArray(e).filter(t);
15
- }
16
- export {
17
- u as a,
18
- c as b,
19
- m as e,
20
- f
21
- };