@ebay/ui-core-react 7.0.0 → 7.1.0-alpha.2

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 (366) hide show
  1. package/array.polyfill.flat-5BAolFdk.js +1 -0
  2. package/array.polyfill.flat-Bj5UhY_-.mjs +10 -0
  3. package/badge-BX5HuO-3.mjs +9 -0
  4. package/badge-CoHKfiPt.js +1 -0
  5. package/button-B06HeRsZ.mjs +63 -0
  6. package/button-o4ao46WM.js +1 -0
  7. package/calendar-CPKqwJVQ.js +1 -0
  8. package/calendar-Dq0eM9VC.mjs +216 -0
  9. package/debounce-BQsYxxOL.js +1 -0
  10. package/debounce-u81vJ6wg.mjs +9 -0
  11. package/dialog-previous-button-7ePoYWyj.js +1 -0
  12. package/dialog-previous-button-gmkm4c8J.mjs +146 -0
  13. package/drawer-BxxlJwkZ.js +1 -0
  14. package/drawer-Dcg135Bb.mjs +40 -0
  15. package/ebay-alert-dialog.js +1 -0
  16. package/ebay-alert-dialog.mjs +22 -0
  17. package/ebay-badge.js +1 -0
  18. package/ebay-badge.mjs +4 -0
  19. package/ebay-breadcrumbs.js +1 -0
  20. package/ebay-breadcrumbs.mjs +39 -0
  21. package/ebay-button.js +1 -0
  22. package/ebay-button.mjs +5 -0
  23. package/ebay-calendar.js +1 -0
  24. package/ebay-calendar.mjs +4 -0
  25. package/ebay-carousel.js +1 -0
  26. package/ebay-carousel.mjs +229 -0
  27. package/ebay-checkbox/README.md +12 -0
  28. package/ebay-checkbox.js +1 -0
  29. package/ebay-checkbox.mjs +43 -0
  30. package/ebay-confirm-dialog.js +1 -0
  31. package/ebay-confirm-dialog.mjs +24 -0
  32. package/ebay-cta-button.js +1 -0
  33. package/ebay-cta-button.mjs +20 -0
  34. package/ebay-date-textbox.js +1 -0
  35. package/ebay-date-textbox.mjs +74 -0
  36. package/ebay-dialog-base.js +1 -0
  37. package/ebay-dialog-base.mjs +9 -0
  38. package/ebay-drawer-dialog.js +1 -0
  39. package/ebay-drawer-dialog.mjs +4 -0
  40. package/ebay-eek.js +1 -0
  41. package/ebay-eek.mjs +42 -0
  42. package/ebay-fake-menu-button.js +1 -0
  43. package/ebay-fake-menu-button.mjs +7 -0
  44. package/ebay-fake-menu.js +1 -0
  45. package/ebay-fake-menu.mjs +9 -0
  46. package/ebay-fake-tabs.js +1 -0
  47. package/ebay-fake-tabs.mjs +27 -0
  48. package/ebay-field.js +1 -0
  49. package/ebay-field.mjs +19 -0
  50. package/ebay-fullscreen-dialog.js +1 -0
  51. package/ebay-fullscreen-dialog.mjs +9 -0
  52. package/ebay-icon/icon.d.ts.map +1 -1
  53. package/ebay-icon-button/README.md +2 -0
  54. package/ebay-icon-button.js +1 -0
  55. package/ebay-icon-button.mjs +4 -0
  56. package/ebay-icon.js +1 -0
  57. package/ebay-icon.mjs +4 -0
  58. package/ebay-infotip.js +1 -0
  59. package/ebay-infotip.mjs +59 -0
  60. package/ebay-inline-notice.js +1 -0
  61. package/ebay-inline-notice.mjs +31 -0
  62. package/ebay-lightbox-dialog.js +1 -0
  63. package/ebay-lightbox-dialog.mjs +11 -0
  64. package/ebay-listbox-button.js +2 -0
  65. package/ebay-listbox-button.mjs +170 -0
  66. package/ebay-menu/menu.d.ts +1 -1
  67. package/ebay-menu/menu.d.ts.map +1 -1
  68. package/ebay-menu-button.js +1 -0
  69. package/ebay-menu-button.mjs +82 -0
  70. package/ebay-menu.js +1 -0
  71. package/ebay-menu.mjs +9 -0
  72. package/ebay-notice-base.js +1 -0
  73. package/ebay-notice-base.mjs +7 -0
  74. package/ebay-page-notice.js +1 -0
  75. package/ebay-page-notice.mjs +42 -0
  76. package/ebay-pagination.js +1 -0
  77. package/ebay-pagination.mjs +159 -0
  78. package/ebay-panel-dialog.js +1 -0
  79. package/ebay-panel-dialog.mjs +11 -0
  80. package/ebay-progress-bar.js +1 -0
  81. package/ebay-progress-bar.mjs +6 -0
  82. package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -1
  83. package/ebay-progress-spinner.js +1 -0
  84. package/ebay-progress-spinner.mjs +4 -0
  85. package/ebay-progress-stepper.js +1 -0
  86. package/ebay-progress-stepper.mjs +63 -0
  87. package/ebay-radio.js +1 -0
  88. package/ebay-radio.mjs +42 -0
  89. package/ebay-section-notice.js +1 -0
  90. package/ebay-section-notice.mjs +46 -0
  91. package/ebay-section-title/index.d.ts.map +1 -1
  92. package/ebay-section-title.js +1 -0
  93. package/ebay-section-title.mjs +24 -0
  94. package/ebay-select.js +1 -0
  95. package/ebay-select.mjs +69 -0
  96. package/ebay-signal.js +1 -0
  97. package/ebay-signal.mjs +9 -0
  98. package/ebay-snackbar-dialog.js +1 -0
  99. package/ebay-snackbar-dialog.mjs +46 -0
  100. package/ebay-split-button.js +1 -0
  101. package/ebay-split-button.mjs +20 -0
  102. package/ebay-star-rating-select.js +1 -0
  103. package/ebay-star-rating-select.mjs +36 -0
  104. package/ebay-star-rating.js +1 -0
  105. package/ebay-star-rating.mjs +8 -0
  106. package/ebay-svg.js +1 -0
  107. package/ebay-svg.mjs +4753 -0
  108. package/ebay-switch.js +1 -0
  109. package/ebay-switch.mjs +25 -0
  110. package/ebay-tabs.js +1 -0
  111. package/ebay-tabs.mjs +66 -0
  112. package/ebay-textbox.js +1 -0
  113. package/ebay-textbox.mjs +8 -0
  114. package/ebay-toast-dialog.js +1 -0
  115. package/ebay-toast-dialog.mjs +9 -0
  116. package/ebay-tooltip.js +1 -0
  117. package/ebay-tooltip.mjs +39 -0
  118. package/ebay-tourtip.js +1 -0
  119. package/ebay-tourtip.mjs +43 -0
  120. package/ebay-video.js +1 -0
  121. package/ebay-video.mjs +173 -0
  122. package/hooks-Ctier7Yv.js +1 -0
  123. package/hooks-r29zhPsY.mjs +63 -0
  124. package/icon-B_a65KUD.mjs +42 -0
  125. package/icon-DK6eEQD8.js +1 -0
  126. package/icon-button-BB6GFLm7.js +1 -0
  127. package/icon-button-Dy8rjzH7.mjs +24 -0
  128. package/index-B5oC9Rl1.mjs +22 -0
  129. package/index-DbjwTbDP.js +1 -0
  130. package/label-CnrpYJ-g.js +1 -0
  131. package/label-DgOo6Mql.mjs +19 -0
  132. package/menu-CR1Dxl2m.mjs +154 -0
  133. package/menu-DZU8jEPV.js +1 -0
  134. package/menu-button-label-BcgasGA4.js +1 -0
  135. package/menu-button-label-vVnRKJRU.mjs +68 -0
  136. package/menu-item-DBi1NcrM.js +1 -0
  137. package/menu-item-jlKZ3uT4.mjs +67 -0
  138. package/notice-content-9iF4T8uB.js +1 -0
  139. package/notice-content-BVZMfcMH.mjs +4 -0
  140. package/notice-content-C0ZStfuX.js +1 -0
  141. package/notice-content-CdXVjKzD.mjs +9 -0
  142. package/notice-footer-BFa2IeY9.mjs +10 -0
  143. package/notice-footer-Cw1DMzoB.js +1 -0
  144. package/package.json +19 -8
  145. package/progress-spinner-BugUcF5c.mjs +19 -0
  146. package/progress-spinner-CDgxI8R_.js +1 -0
  147. package/range-DC7seOVT.mjs +4 -0
  148. package/range-DOsPN0h5.js +1 -0
  149. package/textbox-BxYjEAZK.mjs +100 -0
  150. package/textbox-WnB-9F4y.js +1 -0
  151. package/use-tooltip-BavqG36Z.js +1 -0
  152. package/use-tooltip-Bibsm2rU.mjs +158 -0
  153. package/utils-BipBqkOS.mjs +21 -0
  154. package/utils-C9NL3q0j.js +1 -0
  155. package/common/component-utils/array.polyfill.flat.js +0 -32
  156. package/common/component-utils/forwardRef.js +0 -37
  157. package/common/component-utils/index.js +0 -18
  158. package/common/component-utils/usePrevious.js +0 -12
  159. package/common/component-utils/utils.js +0 -26
  160. package/common/debounce.js +0 -11
  161. package/common/event-utils/index.js +0 -123
  162. package/common/event-utils/types.js +0 -14
  163. package/common/event-utils/use-key-press.js +0 -33
  164. package/common/event-utils/use-roving-index.js +0 -35
  165. package/common/floating-label-utils/hooks.js +0 -133
  166. package/common/notice-utils/notice-content.js +0 -12
  167. package/common/notice-utils/notice-cta.js +0 -23
  168. package/common/notice-utils/notice-footer.js +0 -23
  169. package/common/notice-utils/notice-title.js +0 -24
  170. package/common/random-id.js +0 -5
  171. package/common/range.js +0 -5
  172. package/common/tooltip-utils/constants.js +0 -95
  173. package/common/tooltip-utils/index.js +0 -19
  174. package/common/tooltip-utils/tooltip-close-button.js +0 -8
  175. package/common/tooltip-utils/tooltip-content.js +0 -25
  176. package/common/tooltip-utils/tooltip-footer.js +0 -9
  177. package/common/tooltip-utils/tooltip-host.js +0 -24
  178. package/common/tooltip-utils/tooltip.js +0 -60
  179. package/common/tooltip-utils/types.js +0 -2
  180. package/common/tooltip-utils/use-tooltip.js +0 -27
  181. package/ebay-alert-dialog/alert-dialog.js +0 -55
  182. package/ebay-alert-dialog/index.js +0 -8
  183. package/ebay-badge/badge.js +0 -25
  184. package/ebay-badge/index.js +0 -8
  185. package/ebay-breadcrumbs/breadcrumb-item.js +0 -27
  186. package/ebay-breadcrumbs/breadcrumbs.js +0 -64
  187. package/ebay-breadcrumbs/index.js +0 -10
  188. package/ebay-button/button-cell.js +0 -29
  189. package/ebay-button/button-expand.js +0 -13
  190. package/ebay-button/button-loading.js +0 -11
  191. package/ebay-button/button-text.js +0 -9
  192. package/ebay-button/button.js +0 -95
  193. package/ebay-button/index.js +0 -10
  194. package/ebay-button/types.js +0 -2
  195. package/ebay-calendar/calendar.js +0 -306
  196. package/ebay-calendar/date-utils.js +0 -58
  197. package/ebay-calendar/index.js +0 -8
  198. package/ebay-carousel/carousel-control-button.js +0 -24
  199. package/ebay-carousel/carousel-item.js +0 -59
  200. package/ebay-carousel/carousel-list.js +0 -81
  201. package/ebay-carousel/carousel.js +0 -109
  202. package/ebay-carousel/helpers.js +0 -123
  203. package/ebay-carousel/index.js +0 -10
  204. package/ebay-carousel/scroll-to-transition.js +0 -102
  205. package/ebay-carousel/types.js +0 -2
  206. package/ebay-checkbox/checkbox.js +0 -77
  207. package/ebay-checkbox/index.js +0 -8
  208. package/ebay-confirm-dialog/confirm-dialog.js +0 -56
  209. package/ebay-confirm-dialog/index.js +0 -8
  210. package/ebay-cta-button/cta-button.js +0 -30
  211. package/ebay-cta-button/index.js +0 -8
  212. package/ebay-date-textbox/date-textbox.js +0 -179
  213. package/ebay-date-textbox/index.js +0 -8
  214. package/ebay-dialog-base/components/animation.js +0 -96
  215. package/ebay-dialog-base/components/dialog-actions.js +0 -8
  216. package/ebay-dialog-base/components/dialog-close-button.js +0 -8
  217. package/ebay-dialog-base/components/dialog-footer.js +0 -8
  218. package/ebay-dialog-base/components/dialog-header.js +0 -22
  219. package/ebay-dialog-base/components/dialog-previous-button.js +0 -24
  220. package/ebay-dialog-base/components/dialogBase.js +0 -152
  221. package/ebay-dialog-base/dialog-base-with-state.js +0 -63
  222. package/ebay-dialog-base/index.js +0 -18
  223. package/ebay-drawer-dialog/components/drawer.js +0 -104
  224. package/ebay-drawer-dialog/index.js +0 -8
  225. package/ebay-eek/eek-rating.js +0 -23
  226. package/ebay-eek/eek-util.js +0 -34
  227. package/ebay-eek/index.js +0 -8
  228. package/ebay-fake-menu/index.js +0 -12
  229. package/ebay-fake-menu/menu-item-separator.js +0 -23
  230. package/ebay-fake-menu/menu-item.js +0 -72
  231. package/ebay-fake-menu/menu.js +0 -57
  232. package/ebay-fake-menu-button/index.js +0 -14
  233. package/ebay-fake-menu-button/menu-button-item.js +0 -5
  234. package/ebay-fake-menu-button/menu-button-label.js +0 -8
  235. package/ebay-fake-menu-button/menu-button-separator.js +0 -23
  236. package/ebay-fake-menu-button/menu-button.js +0 -105
  237. package/ebay-fake-tabs/fake-tabs.js +0 -54
  238. package/ebay-fake-tabs/index.js +0 -10
  239. package/ebay-fake-tabs/tab.js +0 -24
  240. package/ebay-field/description.js +0 -26
  241. package/ebay-field/field.js +0 -12
  242. package/ebay-field/index.js +0 -12
  243. package/ebay-field/label.js +0 -29
  244. package/ebay-field/types.js +0 -2
  245. package/ebay-fullscreen-dialog/fullscreen-dialog.js +0 -25
  246. package/ebay-fullscreen-dialog/index.js +0 -8
  247. package/ebay-icon/icon.js +0 -89
  248. package/ebay-icon/index.js +0 -8
  249. package/ebay-icon/types.js +0 -3
  250. package/ebay-icon-button/icon-button.js +0 -40
  251. package/ebay-icon-button/index.js +0 -8
  252. package/ebay-infotip/ebay-infotip-content.js +0 -12
  253. package/ebay-infotip/ebay-infotip-heading.js +0 -23
  254. package/ebay-infotip/ebay-infotip-host.js +0 -28
  255. package/ebay-infotip/ebay-infotip.js +0 -79
  256. package/ebay-infotip/index.js +0 -14
  257. package/ebay-infotip/types.js +0 -2
  258. package/ebay-inline-notice/index.js +0 -10
  259. package/ebay-inline-notice/inline-notice.js +0 -66
  260. package/ebay-inline-notice/types.js +0 -2
  261. package/ebay-lightbox-dialog/index.js +0 -8
  262. package/ebay-lightbox-dialog/lightbox-dialog.js +0 -27
  263. package/ebay-listbox-button/index.js +0 -10
  264. package/ebay-listbox-button/listbox-button-option.js +0 -27
  265. package/ebay-listbox-button/listbox-button.js +0 -252
  266. package/ebay-menu/index.js +0 -27
  267. package/ebay-menu/menu-item-separator.js +0 -23
  268. package/ebay-menu/menu-item.js +0 -67
  269. package/ebay-menu/menu.js +0 -149
  270. package/ebay-menu/types.js +0 -2
  271. package/ebay-menu-button/index.js +0 -29
  272. package/ebay-menu-button/menu-button-item.js +0 -5
  273. package/ebay-menu-button/menu-button-label.js +0 -8
  274. package/ebay-menu-button/menu-button-separator.js +0 -23
  275. package/ebay-menu-button/menu-button.js +0 -132
  276. package/ebay-menu-button/types.js +0 -2
  277. package/ebay-notice-base/components/ebay-notice-content/index.js +0 -8
  278. package/ebay-notice-base/components/ebay-notice-content/notice-content.js +0 -4
  279. package/ebay-notice-base/components/ebay-notice-title/index.js +0 -8
  280. package/ebay-notice-base/components/ebay-notice-title/notice-title.js +0 -8
  281. package/ebay-notice-base/index.js +0 -7
  282. package/ebay-page-notice/index.js +0 -16
  283. package/ebay-page-notice/page-notice-cta.js +0 -9
  284. package/ebay-page-notice/page-notice-footer.js +0 -9
  285. package/ebay-page-notice/page-notice-title.js +0 -23
  286. package/ebay-page-notice/page-notice.js +0 -66
  287. package/ebay-pagination/const.js +0 -8
  288. package/ebay-pagination/helpers.js +0 -92
  289. package/ebay-pagination/index.js +0 -10
  290. package/ebay-pagination/pagination-item.js +0 -55
  291. package/ebay-pagination/pagination.js +0 -146
  292. package/ebay-pagination/types.js +0 -2
  293. package/ebay-panel-dialog/index.js +0 -8
  294. package/ebay-panel-dialog/panel-dialog.js +0 -27
  295. package/ebay-progress-bar/index.js +0 -8
  296. package/ebay-progress-bar/progress-bar.js +0 -23
  297. package/ebay-progress-spinner/index.js +0 -8
  298. package/ebay-progress-spinner/progress-spinner.js +0 -30
  299. package/ebay-progress-stepper/ebay-progress-step.js +0 -64
  300. package/ebay-progress-stepper/ebay-progress-stepper.js +0 -70
  301. package/ebay-progress-stepper/ebay-progress-title.js +0 -5
  302. package/ebay-progress-stepper/index.js +0 -12
  303. package/ebay-progress-stepper/types.js +0 -2
  304. package/ebay-radio/index.js +0 -8
  305. package/ebay-radio/radio.js +0 -71
  306. package/ebay-section-notice/index.js +0 -14
  307. package/ebay-section-notice/section-notice-footer.js +0 -9
  308. package/ebay-section-notice/section-notice-title.js +0 -23
  309. package/ebay-section-notice/section-notice.js +0 -82
  310. package/ebay-section-title/cta.js +0 -26
  311. package/ebay-section-title/index.js +0 -16
  312. package/ebay-section-title/info.js +0 -23
  313. package/ebay-section-title/overflow.js +0 -23
  314. package/ebay-section-title/section-title.js +0 -35
  315. package/ebay-section-title/subtitle.js +0 -23
  316. package/ebay-section-title/title.js +0 -23
  317. package/ebay-select/ebay-select-option.js +0 -22
  318. package/ebay-select/ebay-select.js +0 -129
  319. package/ebay-select/index.js +0 -10
  320. package/ebay-signal/index.js +0 -8
  321. package/ebay-signal/signal.js +0 -24
  322. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +0 -24
  323. package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +0 -122
  324. package/ebay-snackbar-dialog/index.js +0 -7
  325. package/ebay-split-button/index.js +0 -23
  326. package/ebay-split-button/split-button.js +0 -30
  327. package/ebay-split-button/types.js +0 -2
  328. package/ebay-star-rating/index.js +0 -23
  329. package/ebay-star-rating/star-rating.js +0 -26
  330. package/ebay-star-rating-select/index.js +0 -23
  331. package/ebay-star-rating-select/star-rating-select.js +0 -82
  332. package/ebay-svg/index.js +0 -8
  333. package/ebay-svg/svg.js +0 -2548
  334. package/ebay-switch/ebay-switch.js +0 -61
  335. package/ebay-switch/index.js +0 -8
  336. package/ebay-tabs/index.js +0 -12
  337. package/ebay-tabs/tab-panel.js +0 -24
  338. package/ebay-tabs/tab.js +0 -24
  339. package/ebay-tabs/tabs.js +0 -90
  340. package/ebay-tabs/types.js +0 -2
  341. package/ebay-textbox/index.js +0 -16
  342. package/ebay-textbox/postfix-icon.js +0 -26
  343. package/ebay-textbox/postfix-text.js +0 -8
  344. package/ebay-textbox/prefix-icon.js +0 -23
  345. package/ebay-textbox/prefix-text.js +0 -8
  346. package/ebay-textbox/textbox.js +0 -147
  347. package/ebay-textbox/types.js +0 -2
  348. package/ebay-toast-dialog/components/toast.js +0 -26
  349. package/ebay-toast-dialog/index.js +0 -8
  350. package/ebay-tooltip/ebay-tooltip-content.js +0 -8
  351. package/ebay-tooltip/ebay-tooltip-host.js +0 -8
  352. package/ebay-tooltip/ebay-tooltip.js +0 -85
  353. package/ebay-tooltip/index.js +0 -14
  354. package/ebay-tourtip/ebay-tourtip-content.js +0 -8
  355. package/ebay-tourtip/ebay-tourtip-footer.js +0 -10
  356. package/ebay-tourtip/ebay-tourtip-heading.js +0 -24
  357. package/ebay-tourtip/ebay-tourtip-host.js +0 -8
  358. package/ebay-tourtip/ebay-tourtip.js +0 -70
  359. package/ebay-tourtip/index.js +0 -18
  360. package/ebay-video/const.js +0 -19
  361. package/ebay-video/controls.js +0 -40
  362. package/ebay-video/index.js +0 -25
  363. package/ebay-video/reportButton.js +0 -12
  364. package/ebay-video/source.js +0 -22
  365. package/ebay-video/types.js +0 -2
  366. package/ebay-video/video.js +0 -210
@@ -0,0 +1,159 @@
1
+ import o, { useRef as G, Children as K, createRef as ne, useState as Q, useEffect as re, cloneElement as oe } from "react";
2
+ import { a as ie, E as ae } from "./menu-button-label-vVnRKJRU.mjs";
3
+ import V from "classnames";
4
+ import { d as se } from "./debounce-u81vJ6wg.mjs";
5
+ import { a as ce } from "./utils-BipBqkOS.mjs";
6
+ import { E as j, w as le } from "./icon-B_a65KUD.mjs";
7
+ import "./array.polyfill.flat-Bj5UhY_-.mjs";
8
+ const ue = 1, R = 9, Y = 4, U = 2, me = R - U;
9
+ function pe(e, t, a = e, s = null) {
10
+ const h = s === "show-last" || s === "overflow" && e > R, u = s === "overflow" && e > R, c = Math.min(a, e), v = Math.max(0, t - Math.ceil((c - 1) / 2)), E = c < Y ? t : Math.max(0, t - Math.floor((c - 1) / 2)), m = (h ? E : v) + c, p = m >= e, A = t <= Y, I = (b, i) => {
11
+ const n = k(e, b, i);
12
+ return c > 2 ? (n[i - 2] = "dots", n[i - 1] = "hidden", n[e - 1] = "visible") : c > 1 && (n[i - 1] = "dots"), n;
13
+ }, g = (b, i) => {
14
+ if (A)
15
+ return I(0, i);
16
+ if (p) {
17
+ const w = k(e, e - me, e);
18
+ return w[0] = "visible", w[1] = "dots", w;
19
+ }
20
+ const n = k(e, t - U, t + U + 1);
21
+ return n[0] = "visible", n[1] = A ? "visible" : "dots", n[e - 2] = "dots", n[e - 1] = "visible", n;
22
+ };
23
+ return p && e <= R ? k(e, e - c) : h ? u ? g(E, m) : I(E, m) : k(e, v, m);
24
+ }
25
+ function de(e, t, a, s = "show-range") {
26
+ if (e === -1)
27
+ return [];
28
+ const h = s === "overflow" ? R : fe(Math.min(a, t), ue, R);
29
+ return pe(a, e - 1, h, s);
30
+ }
31
+ function fe(e, t, a) {
32
+ return e <= t ? t : e >= a ? a : e;
33
+ }
34
+ function k(e, t, a) {
35
+ return Array(e).fill("hidden").fill("visible", t, a);
36
+ }
37
+ function he(e) {
38
+ if (!e)
39
+ return 0;
40
+ e.style.width = "100vw";
41
+ const t = e.offsetWidth;
42
+ return e.style.width = null, t;
43
+ }
44
+ const ye = ({ id: e = "ebay-pagination", className: t, a11yCurrentText: a = "Pagination - Current Page", a11yPreviousText: s = "Previous page", a11yNextText: h = "Next page", variant: u = "show-range", fluid: c = !1, onPrevious: v = () => {
45
+ }, onNext: E = () => {
46
+ }, onSelect: m = () => {
47
+ }, children: p, ...A }) => {
48
+ const I = G(null), g = G([]);
49
+ g.current = K.map(p, ne);
50
+ const b = ce(p, ({ props: r }) => r.type === void 0 || r.type === "page").length, i = G(0), n = G(0), w = () => {
51
+ var x, _, y, f;
52
+ const r = n.current || ((_ = (x = g.current[0]) == null ? void 0 : x.current) == null ? void 0 : _.offsetWidth);
53
+ n.current = r;
54
+ const d = i.current || ((f = (y = g.current[1]) == null ? void 0 : y.current) == null ? void 0 : f.offsetWidth);
55
+ return i.current = d, d ? Math.floor((he(I.current) - r * 2) / d) : 0;
56
+ }, [M, z] = Q([]), [N, L] = Q(0), W = (r) => {
57
+ const d = r || g.current.findIndex((y) => {
58
+ var f;
59
+ return ((f = y.current) == null ? void 0 : f.getAttribute("aria-current")) === "page";
60
+ }), x = w(), _ = de(d, x, b, u);
61
+ L(d), z(["hidden", ..._]);
62
+ };
63
+ re(() => {
64
+ const r = se(W, 16);
65
+ return W(), window.addEventListener("resize", () => r()), () => {
66
+ window.removeEventListener("resize", () => r());
67
+ };
68
+ }, [p]);
69
+ const C = (r) => {
70
+ let d = 0;
71
+ const x = [], _ = [], y = [], f = M.indexOf("dots"), F = M.lastIndexOf("dots");
72
+ return K.map(p, (X, D) => {
73
+ const { type: O = "page", current: Z, disabled: ee, href: H, children: q } = X.props, B = M[D] === "dots", $ = `${e}-item-${D}`, J = M[D] === "hidden", te = {
74
+ current: Z,
75
+ disabled: ee,
76
+ href: H,
77
+ type: B && O === "page" ? "separator" : O,
78
+ children: B ? o.createElement(j, { name: "overflowHorizontal24", focusable: !1 }) : q,
79
+ pageIndex: O === "page" ? d++ : void 0,
80
+ key: $,
81
+ hide: J,
82
+ onPrevious: v,
83
+ onNext: E,
84
+ onSelect: m,
85
+ a11yPreviousText: s,
86
+ a11yNextText: h,
87
+ ref: g.current[D]
88
+ };
89
+ if ((J || B) && O === "page") {
90
+ const T = o.createElement(ie, { key: $, href: H, onClick: (P) => {
91
+ H || P.preventDefault();
92
+ const S = P.currentTarget;
93
+ m(P, { value: (S == null ? void 0 : S.innerText) || "", index: d }), W(Number(S == null ? void 0 : S.innerText));
94
+ } }, q);
95
+ f === F && y.push(T), N - 2 > f && D < N && x.push(T), N + 2 < F && D > N && _.push(T);
96
+ }
97
+ if (r === "page" && B && u === "overflow") {
98
+ let T = y;
99
+ return f !== F && (T = D === 2 ? x : _), o.createElement(
100
+ "li",
101
+ { key: $ },
102
+ o.createElement(
103
+ "span",
104
+ { className: "pagination__item", role: "separator" },
105
+ o.createElement(ae, { a11yText: "Menu", borderless: !0, variant: "overflow", noToggleIcon: !0 }, T)
106
+ )
107
+ );
108
+ }
109
+ return r === O ? oe(X, te) : null;
110
+ });
111
+ }, l = `${e}-pagination-heading`;
112
+ return o.createElement(
113
+ "nav",
114
+ { ...A, role: "navigation", className: V(t, "pagination", { "pagination--fluid": c }), "aria-labelledby": l, ref: I },
115
+ o.createElement(
116
+ "span",
117
+ { "aria-live": "polite", role: "status" },
118
+ o.createElement("h2", { className: "clipped", id: l }, a)
119
+ ),
120
+ C("previous"),
121
+ o.createElement("ol", { className: "pagination__items" }, C("page")),
122
+ C("next")
123
+ );
124
+ }, ge = ({ pageIndex: e = 0, key: t, current: a, disabled: s, type: h = "page", href: u, hide: c, children: v, a11yPreviousText: E = "Previous page", a11yNextText: m = "Next page", onSelect: p, onNext: A, onPrevious: I, className: g, style: b, forwardedRef: i, ...n }) => {
125
+ const w = (l) => {
126
+ var r;
127
+ p(l, { value: ((r = l.currentTarget) == null ? void 0 : r.innerText) || "", index: e });
128
+ }, M = (l) => {
129
+ l.currentTarget.getAttribute("aria-disabled") || A(l);
130
+ }, z = (l) => {
131
+ l.currentTarget.getAttribute("aria-disabled") || I(l);
132
+ }, N = !!u, L = N ? "a" : "button", W = N ? "icon-link" : "icon-btn", C = { ...b, minWidth: "40px" };
133
+ switch (h) {
134
+ case "previous":
135
+ return o.createElement(
136
+ L,
137
+ { ...n, ref: i, "aria-disabled": s ? "true" : void 0, "aria-label": E, href: s ? void 0 : u, className: V(W, "pagination__previous"), style: C, onClick: z },
138
+ o.createElement(j, { name: "arrowLeft16" })
139
+ );
140
+ case "next":
141
+ return o.createElement(
142
+ L,
143
+ { ...n, ref: i, "aria-disabled": s ? "true" : void 0, "aria-label": m, href: s ? void 0 : u, className: V(W, "pagination__next"), style: C, onClick: M },
144
+ o.createElement(j, { name: "arrowRight16" })
145
+ );
146
+ case "separator":
147
+ return o.createElement("span", { key: t, style: b, className: "pagination__item", ref: i, role: "separator" }, v);
148
+ default:
149
+ return o.createElement(
150
+ "li",
151
+ { ...n, hidden: c },
152
+ o.createElement(L, { ref: i, "aria-current": a ? "page" : void 0, href: u, className: "pagination__item", style: b, key: t, onClick: w }, v)
153
+ );
154
+ }
155
+ }, De = le(ge);
156
+ export {
157
+ ye as EbayPagination,
158
+ De as EbayPaginationItem
159
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("classnames"),c=require("./dialog-previous-button-7ePoYWyj.js");require("./icon-button-BB6GFLm7.js");const e="panel-dialog",d=({open:i,animated:a,position:s="start",onClose:o=()=>{},className:l,...n})=>r.createElement(c.DialogBaseWithState,{...n,"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:o,onBackgroundClick:o,animated:a,className:t(l,{[`${e}--mask-fade-slow`]:a}),windowClass:t(`${e}__window--slide`,{[`${e}__window--end`]:s==="end"}),open:i});exports.EbayPanelDialog=d;
@@ -0,0 +1,11 @@
1
+ import r from "react";
2
+ import i from "classnames";
3
+ import { D as c } from "./dialog-previous-button-gmkm4c8J.mjs";
4
+ import "./icon-button-Dy8rjzH7.mjs";
5
+ const o = "panel-dialog", f = ({ open: s, animated: a, position: e = "start", onClose: t = () => {
6
+ }, className: l, ...n }) => r.createElement(c, { ...n, "aria-label": "Infotip", classPrefix: o, buttonPosition: "right", onCloseBtnClick: t, onBackgroundClick: t, animated: a, className: i(l, { [`${o}--mask-fade-slow`]: a }), windowClass: i(`${o}__window--slide`, {
7
+ [`${o}__window--end`]: e === "end"
8
+ }), open: s });
9
+ export {
10
+ f as EbayPanelDialog
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),c=require("classnames"),g=({value:e=0,max:r=100,fluid:s,className:a,...o})=>t.createElement("progress",{...o,className:c("progress-bar",a,{"progress-bar--fluid":s}),value:e,max:r});exports.EbayProgressBar=g;
@@ -0,0 +1,6 @@
1
+ import m from "react";
2
+ import t from "classnames";
3
+ const g = ({ value: r = 0, max: s = 100, fluid: e, className: a, ...o }) => m.createElement("progress", { ...o, className: t("progress-bar", a, { "progress-bar--fluid": e }), value: r, max: s });
4
+ export {
5
+ g as EbayProgressBar
6
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"progress-spinner.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-spinner/progress-spinner.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEvD,KAAK,wBAAwB,GAAG;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAA;AAED,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAQtD,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,SAAS,GAAG,wBAAwB,CAcjE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"progress-spinner.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-spinner/progress-spinner.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEvD,KAAK,wBAAwB,GAAG;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAA;AAED,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AActD,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,SAAS,GAAG,wBAAwB,CAcjE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./progress-spinner-CDgxI8R_.js");exports.EbayProgressSpinner=e.EbayProgressSpinner;
@@ -0,0 +1,4 @@
1
+ import { E as o } from "./progress-spinner-BugUcF5c.mjs";
2
+ export {
3
+ o as EbayProgressSpinner
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("classnames"),E=require("./icon-DK6eEQD8.js"),d=({direction:t="row",defaultState:r="active",children:s,className:o,...i})=>{const a=e.Children.toArray(s),c=f(a,r);return e.createElement("div",{...i,className:g(o,"progress-stepper",{"progress-stepper--vertical":t==="column"})},e.createElement("div",{role:"list",className:"progress-stepper__items"},a.map((p,n)=>e.createElement(e.Fragment,{key:n},n>0&&e.createElement("hr",{className:"progress-stepper__separator",role:"presentation"}),e.cloneElement(p,{state:_(n,c),...p.props,current:c===n})))))};function f(t,r){const s=t.findIndex(o=>o.props.current);if(s===-1)switch(r){case"complete":return t.length-1;case"upcoming":return 0}return s}function _(t,r){if(t<=r)return"complete";if(t>r)return"upcoming"}const b={complete:"stepperConfirmation24",attention:"stepperAttention24",upcoming:"stepperUpcoming24",active:"stepperConfirmation24"},v=({current:t,state:r="complete",children:s,className:o,...i})=>{const a=e.Children.toArray(s),c=a.find(l=>l.type===m),p=a.filter(l=>l.type!==m),n=g(o,"progress-stepper__item",{"progress-stepper__item--attention":r==="attention"}),u=b[r],y=t?"current":r;return e.createElement("div",{...i,className:n,role:"listitem","aria-current":t?"step":void 0},e.createElement("div",{className:"progress-stepper__icon"},u&&e.createElement(E.EbayIcon,{name:u,"aria-label":y})),e.createElement("div",{className:"progress-stepper__text"},c,p))},m=({as:t="h4",children:r})=>e.createElement(t,{},r);exports.EbayProgressStep=v;exports.EbayProgressStepper=d;exports.EbayProgressTitle=m;
@@ -0,0 +1,63 @@
1
+ import r, { Children as g, Fragment as y, cloneElement as _, createElement as d } from "react";
2
+ import f from "classnames";
3
+ import { E as v } from "./icon-B_a65KUD.mjs";
4
+ const S = ({ direction: e = "row", defaultState: t = "active", children: s, className: o, ...i }) => {
5
+ const a = g.toArray(s), p = N(a, t);
6
+ return r.createElement(
7
+ "div",
8
+ { ...i, className: f(o, "progress-stepper", {
9
+ "progress-stepper--vertical": e === "column"
10
+ }) },
11
+ r.createElement("div", { role: "list", className: "progress-stepper__items" }, a.map((c, n) => r.createElement(
12
+ y,
13
+ { key: n },
14
+ n > 0 && r.createElement("hr", { className: "progress-stepper__separator", role: "presentation" }),
15
+ _(c, {
16
+ state: b(n, p),
17
+ ...c.props,
18
+ current: p === n
19
+ })
20
+ )))
21
+ );
22
+ };
23
+ function N(e, t) {
24
+ const s = e.findIndex((o) => o.props.current);
25
+ if (s === -1)
26
+ switch (t) {
27
+ case "complete":
28
+ return e.length - 1;
29
+ case "upcoming":
30
+ return 0;
31
+ }
32
+ return s;
33
+ }
34
+ function b(e, t) {
35
+ if (e <= t)
36
+ return "complete";
37
+ if (e > t)
38
+ return "upcoming";
39
+ }
40
+ const h = {
41
+ complete: "stepperConfirmation24",
42
+ attention: "stepperAttention24",
43
+ upcoming: "stepperUpcoming24",
44
+ active: "stepperConfirmation24"
45
+ }, P = ({ current: e, state: t = "complete", children: s, className: o, ...i }) => {
46
+ const a = g.toArray(s), p = a.find((m) => m.type === u), c = a.filter((m) => m.type !== u), n = f(o, "progress-stepper__item", { "progress-stepper__item--attention": t === "attention" }), l = h[t], E = e ? "current" : t;
47
+ return r.createElement(
48
+ "div",
49
+ { ...i, className: n, role: "listitem", "aria-current": e ? "step" : void 0 },
50
+ r.createElement("div", { className: "progress-stepper__icon" }, l && r.createElement(v, { name: l, "aria-label": E })),
51
+ r.createElement(
52
+ "div",
53
+ { className: "progress-stepper__text" },
54
+ p,
55
+ c
56
+ )
57
+ );
58
+ }, u = ({ as: e = "h4", children: t }) => d(e, {}, t);
59
+ export {
60
+ P as EbayProgressStep,
61
+ S as EbayProgressStepper,
62
+ u as EbayProgressTitle
63
+ };
package/ebay-radio.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),N=require("classnames"),c=require("./icon-DK6eEQD8.js"),v=require("./label-CnrpYJ-g.js"),I=({size:r="default",checked:s,defaultChecked:d,className:i,style:m,id:o,onChange:u=()=>{},onFocus:h=()=>{},onKeyDown:y=()=>{},children:l,...E})=>{const g=a=>{var n;return u(a,{value:(n=a.target)==null?void 0:n.value})},b=a=>{var n;return h(a,{value:(n=a.target)==null?void 0:n.value})},_=a=>{const n=a.target;return y(a,{value:n==null?void 0:n.value})},k=N("radio",i,{"radio--large":r==="large"}),p=r==="large"?e.createElement(c.EbayIcon,{name:"radioChecked24",className:"radio__checked"}):e.createElement(c.EbayIcon,{name:"radioChecked18",className:"radio__checked"}),C=r==="large"?e.createElement(c.EbayIcon,{name:"radioUnchecked24",className:"radio__unchecked"}):e.createElement(c.EbayIcon,{name:"radioUnchecked18",className:"radio__unchecked"}),t=e.Children.toArray(l).find(a=>a.type===v.Label);return e.createElement(e.Fragment,null,e.createElement("span",{className:k,style:{...m,alignItems:"center"}},e.createElement("input",{...E,id:o,className:"radio__control",type:"radio",defaultChecked:d,checked:s,onChange:g,onFocus:b,onKeyDown:_}),e.createElement("span",{className:"radio__icon",hidden:!0},p,C)),t?e.cloneElement(t,{...t.props,position:"end",htmlFor:o}):l)};exports.EbayRadio=I;
package/ebay-radio.mjs ADDED
@@ -0,0 +1,42 @@
1
+ import n, { Children as f, cloneElement as v } from "react";
2
+ import b from "classnames";
3
+ import { E as r } from "./icon-B_a65KUD.mjs";
4
+ import { L as F } from "./label-DgOo6Mql.mjs";
5
+ const I = ({ size: c = "default", checked: s, defaultChecked: d, className: m, style: i, id: o, onChange: h = () => {
6
+ }, onFocus: u = () => {
7
+ }, onKeyDown: p = () => {
8
+ }, children: l, ...E }) => {
9
+ const _ = (e) => {
10
+ var a;
11
+ return h(e, { value: (a = e.target) == null ? void 0 : a.value });
12
+ }, g = (e) => {
13
+ var a;
14
+ return u(e, { value: (a = e.target) == null ? void 0 : a.value });
15
+ }, y = (e) => {
16
+ const a = e.target;
17
+ return p(e, { value: a == null ? void 0 : a.value });
18
+ }, k = b("radio", m, { "radio--large": c === "large" }), C = c === "large" ? n.createElement(r, { name: "radioChecked24", className: "radio__checked" }) : n.createElement(r, { name: "radioChecked18", className: "radio__checked" }), N = c === "large" ? n.createElement(r, { name: "radioUnchecked24", className: "radio__unchecked" }) : n.createElement(r, { name: "radioUnchecked18", className: "radio__unchecked" }), t = f.toArray(l).find((e) => e.type === F);
19
+ return n.createElement(
20
+ n.Fragment,
21
+ null,
22
+ n.createElement(
23
+ "span",
24
+ { className: k, style: { ...i, alignItems: "center" } },
25
+ n.createElement("input", { ...E, id: o, className: "radio__control", type: "radio", defaultChecked: d, checked: s, onChange: _, onFocus: g, onKeyDown: y }),
26
+ n.createElement(
27
+ "span",
28
+ { className: "radio__icon", hidden: !0 },
29
+ C,
30
+ N
31
+ )
32
+ ),
33
+ t ? v(t, {
34
+ ...t.props,
35
+ position: "end",
36
+ htmlFor: o
37
+ }) : l
38
+ );
39
+ };
40
+ export {
41
+ I as EbayRadio
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),F=require("classnames"),y=require("./notice-content-C0ZStfuX.js"),$=require("./notice-content-9iF4T8uB.js"),b=require("./icon-DK6eEQD8.js"),d=require("./notice-footer-Cw1DMzoB.js"),T=({status:e="general",children:n,className:a,"aria-label":o,"aria-roledescription":N="Notice",a11yDismissText:s,educationIcon:u,iconClass:S,prominent:h,onDismiss:f=()=>{},...p})=>{const[C,g]=t.useState(!1),E=t.Children.toArray(n).find(({type:r})=>r===y.EbayNoticeContent),i=e!=="general"&&e!=="none",l=e==="education";let c=null;if(i&&(l?c=u||"lightbulb24":c=`${e}Filled16`),!E)throw new Error("EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice");const q=r=>{g(!0),f(r)};return C?null:t.createElement("section",{...p,className:F(a,"section-notice",{[`section-notice--${e}`]:i,"section-notice--education":l&&h,"section-notice--large-icon":l}),role:"region","aria-label":i?null:o,"aria-labelledby":i?`section-notice-${e}`:null,"aria-roledescription":N},c&&t.createElement("div",{className:"section-notice__header",id:`section-notice-${e}`},t.createElement(b.EbayIcon,{className:S,name:c,a11yText:o,a11yVariant:"label"})),t.createElement($.NoticeContent,{...E.props,type:"section"}),n,s&&t.createElement(m,null,t.createElement("button",{"aria-label":s,className:"fake-link page-notice__dismiss",onClick:q},t.createElement(b.EbayIcon,{name:"close16"}))))},_=({className:e,as:n,children:a,...o})=>t.createElement(d.NoticeTitle,{...o,className:e,as:n,type:"section"},a),m=({className:e,children:n})=>t.createElement(d.NoticeFooter,{className:e,type:"section"},n);exports.EbayNoticeContent=y.EbayNoticeContent;exports.EbaySectionNotice=T;exports.EbaySectionNoticeFooter=m;exports.EbaySectionNoticeTitle=_;
@@ -0,0 +1,46 @@
1
+ import t, { useState as S } from "react";
2
+ import C from "classnames";
3
+ import { E as _ } from "./notice-content-BVZMfcMH.mjs";
4
+ import { N as $ } from "./notice-content-CdXVjKzD.mjs";
5
+ import { E as d } from "./icon-B_a65KUD.mjs";
6
+ import { N as k, a as A } from "./notice-footer-BFa2IeY9.mjs";
7
+ const R = ({ status: e = "general", children: o, className: a, "aria-label": n, "aria-roledescription": E = "Notice", a11yDismissText: s, educationIcon: N, iconClass: b, prominent: p, onDismiss: y = () => {
8
+ }, ...f }) => {
9
+ const [h, u] = S(!1), m = t.Children.toArray(o).find(({ type: r }) => r === _), i = e !== "general" && e !== "none", l = e === "education";
10
+ let c = null;
11
+ if (i && (l ? c = N || "lightbulb24" : c = `${e}Filled16`), !m)
12
+ throw new Error("EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice");
13
+ const g = (r) => {
14
+ u(!0), y(r);
15
+ };
16
+ return h ? null : t.createElement(
17
+ "section",
18
+ { ...f, className: C(a, "section-notice", {
19
+ [`section-notice--${e}`]: i,
20
+ "section-notice--education": l && p,
21
+ "section-notice--large-icon": l
22
+ }), role: "region", "aria-label": i ? null : n, "aria-labelledby": i ? `section-notice-${e}` : null, "aria-roledescription": E },
23
+ c && t.createElement(
24
+ "div",
25
+ { className: "section-notice__header", id: `section-notice-${e}` },
26
+ t.createElement(d, { className: b, name: c, a11yText: n, a11yVariant: "label" })
27
+ ),
28
+ t.createElement($, { ...m.props, type: "section" }),
29
+ o,
30
+ s && t.createElement(
31
+ F,
32
+ null,
33
+ t.createElement(
34
+ "button",
35
+ { "aria-label": s, className: "fake-link page-notice__dismiss", onClick: g },
36
+ t.createElement(d, { name: "close16" })
37
+ )
38
+ )
39
+ );
40
+ }, V = ({ className: e, as: o, children: a, ...n }) => t.createElement(k, { ...n, className: e, as: o, type: "section" }, a), F = ({ className: e, children: o }) => t.createElement(A, { className: e, type: "section" }, o);
41
+ export {
42
+ _ as EbayNoticeContent,
43
+ R as EbaySectionNotice,
44
+ F as EbaySectionNoticeFooter,
45
+ V as EbaySectionNoticeTitle
46
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-section-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-section-title/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("classnames"),s=require("./utils-C9NL3q0j.js"),v=({ctaText:e,href:t,className:n,...o})=>e?i.createElement("a",{...o,className:l("section-title__cta",n),href:t},e):null,T=({href:e,ctaText:t,className:n,children:o,...u})=>{const E=l(n,"section-title"),f=s.findComponent(o,c),b=s.findComponent(o,a),_=s.findComponent(o,r),S=s.findComponent(o,m);return i.createElement("div",{...u,className:E},i.createElement("div",{className:"section-title__title-container"},f||i.createElement(c,null,o),b),e&&i.createElement(v,{href:e,ctaText:t})||_||S)},c=({children:e,className:t,...n})=>i.createElement("h2",{...n,className:l(t,"section-title__title")},e),a=({children:e,className:t,...n})=>i.createElement("span",{...n,className:l(t,"section-title__subtitle")},e),r=({className:e,children:t,...n})=>i.createElement("div",{...n,className:l(e,"section-title__info")},t),m=({children:e,className:t,...n})=>i.createElement("div",{...n,className:l(t,"section-title__overflow")},e);exports.EbaySectionTitle=T;exports.EbaySectionTitleInfo=r;exports.EbaySectionTitleOverflow=m;exports.EbaySectionTitleSubtitle=a;exports.EbaySectionTitleTitle=c;
@@ -0,0 +1,24 @@
1
+ import l from "react";
2
+ import o from "classnames";
3
+ import { f as i } from "./utils-BipBqkOS.mjs";
4
+ const b = ({ ctaText: t, href: e, className: s, ...n }) => t ? l.createElement("a", { ...n, className: o("section-title__cta", s), href: e }, t) : null, y = ({ href: t, ctaText: e, className: s, children: n, ...c }) => {
5
+ const m = o(s, "section-title"), r = i(n, a), E = i(n, u), f = i(n, v), _ = i(n, N);
6
+ return l.createElement(
7
+ "div",
8
+ { ...c, className: m },
9
+ l.createElement(
10
+ "div",
11
+ { className: "section-title__title-container" },
12
+ r || l.createElement(a, null, n),
13
+ E
14
+ ),
15
+ t && l.createElement(b, { href: t, ctaText: e }) || f || _
16
+ );
17
+ }, a = ({ children: t, className: e, ...s }) => l.createElement("h2", { ...s, className: o(e, "section-title__title") }, t), u = ({ children: t, className: e, ...s }) => l.createElement("span", { ...s, className: o(e, "section-title__subtitle") }, t), v = ({ className: t, children: e, ...s }) => l.createElement("div", { ...s, className: o(t, "section-title__info") }, e), N = ({ children: t, className: e, ...s }) => l.createElement("div", { ...s, className: o(e, "section-title__overflow") }, t);
18
+ export {
19
+ y as EbaySectionTitle,
20
+ v as EbaySectionTitleInfo,
21
+ N as EbaySectionTitleOverflow,
22
+ u as EbaySectionTitleSubtitle,
23
+ a as EbaySectionTitleTitle
24
+ };
package/ebay-select.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),x=require("classnames"),F=require("./icon-DK6eEQD8.js"),P=require("./utils-C9NL3q0j.js"),R=require("./hooks-Ctier7Yv.js"),d=({children:e,...t})=>n.createElement("option",{...t},e),v=e=>typeof e<"u",T=({value:e,defaultValue:t,className:s,borderless:o,name:p,disabled:a,onChange:r=()=>{},onBlur:m=()=>{},onFocus:h=()=>{},floatingLabel:f,forwardedRef:y,children:E,inputSize:l,invalid:b,...i})=>{const c=b||i["aria-invalid"]==="true",[C,G]=n.useState(t),{label:S,Container:w,onBlur:N,onFocus:O,ref:q}=R.useFloatingLabel({ref:y,inputId:i.id,className:s,disabled:a,label:f,inputValue:e,inputSize:l,invalid:c}),B=u=>{const{value:g,selectedIndex:j}=u.target;v(e)||G(g),r(u,{index:j,selected:[g]})},k=u=>{m(u),N()},I=u=>{h(u),O()},L=x("select",s,{"select--borderless":o,"select--large":l==="large"});return n.createElement(w,null,S,n.createElement("span",{className:L},n.createElement("select",{...i,name:p,value:v(e)?e:C,disabled:a,onChange:B,onBlur:k,onFocus:I,ref:q},$(E)),n.createElement(F.EbayIcon,{name:"chevronDown12",height:"8",width:"8"})))},D=F.withForwardRef(T);function M(e){const t={};return e.forEach(s=>{const o=s.props;o.optgroup&&(Object.prototype.hasOwnProperty.call(t,o.optgroup)||(t[o.optgroup]=[]),t[o.optgroup].push(o))}),t}function $(e){const t=[],s=[];let o={},p=!1;const a=P.filterByType(e,d).map(r=>n.cloneElement(r,{}));if(a){o=M(a);let r;return a.forEach((m,h)=>{const{value:f,optionClassName:y,children:E,optgroup:l}=m.props;if(p=l&&t.indexOf(l)===-1,p){r=l;const i=o[r].map(c=>n.createElement(d,{key:`opt-${c.value}`,value:c.value,className:c.optionClassName},c.children));s.push(n.createElement("optgroup",{key:h,label:l},i)),t.push(l)}else l||s.push(n.createElement(d,{key:h,value:f,className:y},E))}),s}}exports.EbaySelect=D;exports.EbaySelectOption=d;
@@ -0,0 +1,69 @@
1
+ import l, { useState as R, cloneElement as j } from "react";
2
+ import D from "classnames";
3
+ import { w as P, E as T } from "./icon-B_a65KUD.mjs";
4
+ import { b as $ } from "./utils-BipBqkOS.mjs";
5
+ import { u as q } from "./hooks-r29zhPsY.mjs";
6
+ const b = ({ children: e, ...t }) => l.createElement("option", { ...t }, e), v = (e) => typeof e < "u", A = ({ value: e, defaultValue: t, className: a, borderless: o, name: u, disabled: s, onChange: r = () => {
7
+ }, onBlur: f = () => {
8
+ }, onFocus: m = () => {
9
+ }, floatingLabel: h, forwardedRef: d, children: E, inputSize: n, invalid: y, ...i }) => {
10
+ const c = y || i["aria-invalid"] === "true", [F, w] = R(t), { label: C, Container: G, onBlur: N, onFocus: B, ref: O } = q({
11
+ ref: d,
12
+ inputId: i.id,
13
+ className: a,
14
+ disabled: s,
15
+ label: h,
16
+ inputValue: e,
17
+ inputSize: n,
18
+ invalid: c
19
+ }), S = (p) => {
20
+ const { value: g, selectedIndex: L } = p.target;
21
+ v(e) || w(g), r(p, { index: L, selected: [g] });
22
+ }, I = (p) => {
23
+ f(p), N();
24
+ }, k = (p) => {
25
+ m(p), B();
26
+ }, x = D("select", a, {
27
+ "select--borderless": o,
28
+ "select--large": n === "large"
29
+ });
30
+ return l.createElement(
31
+ G,
32
+ null,
33
+ C,
34
+ l.createElement(
35
+ "span",
36
+ { className: x },
37
+ l.createElement("select", { ...i, name: u, value: v(e) ? e : F, disabled: s, onChange: S, onBlur: I, onFocus: k, ref: O }, J(E)),
38
+ l.createElement(T, { name: "chevronDown12", height: "8", width: "8" })
39
+ )
40
+ );
41
+ }, W = P(A);
42
+ function H(e) {
43
+ const t = {};
44
+ return e.forEach((a) => {
45
+ const o = a.props;
46
+ o.optgroup && (Object.prototype.hasOwnProperty.call(t, o.optgroup) || (t[o.optgroup] = []), t[o.optgroup].push(o));
47
+ }), t;
48
+ }
49
+ function J(e) {
50
+ const t = [], a = [];
51
+ let o = {}, u = !1;
52
+ const s = $(e, b).map((r) => j(r, {}));
53
+ if (s) {
54
+ o = H(s);
55
+ let r;
56
+ return s.forEach((f, m) => {
57
+ const { value: h, optionClassName: d, children: E, optgroup: n } = f.props;
58
+ if (u = n && t.indexOf(n) === -1, u) {
59
+ r = n;
60
+ const i = o[r].map((c) => l.createElement(b, { key: `opt-${c.value}`, value: c.value, className: c.optionClassName }, c.children));
61
+ a.push(l.createElement("optgroup", { key: m, label: n }, i)), t.push(n);
62
+ } else n || a.push(l.createElement(b, { key: m, value: h, className: d }, E));
63
+ }), a;
64
+ }
65
+ }
66
+ export {
67
+ W as EbaySelect,
68
+ b as EbaySelectOption
69
+ };
package/ebay-signal.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),t=require("classnames"),l=({status:a="neutral",...e})=>{const s=t(`signal signal--${a}`,e.className);return n.createElement("span",{...e,className:s})};exports.EbaySignal=l;
@@ -0,0 +1,9 @@
1
+ import n from "react";
2
+ import t from "classnames";
3
+ const r = ({ status: s = "neutral", ...a }) => {
4
+ const e = t(`signal signal--${s}`, a.className);
5
+ return n.createElement("span", { ...a, className: e });
6
+ };
7
+ export {
8
+ r as EbaySignal
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("classnames"),e=require("react"),k=require("./dialog-previous-button-7ePoYWyj.js");require("./icon-button-BB6GFLm7.js");const f=({className:r,children:c,...l})=>e.createElement("button",{className:D(r,"fake-link"),...l},c),L=6e3,N=({className:r,onOpen:c=()=>{},onClose:l=()=>{},layout:S,open:i,children:h,onAction:u,...T})=>{const n=e.useRef(new Set),b=e.useRef(),[C,m]=e.useState(i),g=e.Children.toArray(h),o=g.find(t=>t.type===f),p=g.filter(t=>t.type!==f),s=()=>{clearTimeout(b.current)},d=()=>{m(!1),l()},E=()=>{n.current.size===0&&(s(),b.current=setTimeout(()=>{d()},L))},M=()=>{m(!0),c(),E()},q=()=>{s(),n.current.add("focus")},w=()=>{n.current.delete("focus"),E()},R=()=>{s(),n.current.add("mouseEnter")},v=()=>{n.current.delete("mouseEnter"),E()},B=t=>{var a,y;s(),u==null||u(t),(y=(a=o==null?void 0:o.props)==null?void 0:a.onClick)==null||y.call(a,t),d()};return e.useEffect(()=>()=>{s()},[]),e.useEffect(()=>{i?M():d()},[i]),e.createElement(k.DialogBaseWithState,{...T,open:C,isModal:!1,baseEl:"aside",classPrefix:"snackbar-dialog",transitionElement:"root",a11yCloseText:"",buttonPosition:"hidden",className:D(r,"snackbar-dialog--transition"),windowClass:S==="column"&&"snackbar-dialog__window--column",onFocus:q,onBlur:w,onMouseEnter:R,onMouseLeave:v},p,o?e.createElement(k.EbayDialogActions,null,e.cloneElement(o,{onClick:B})):null)};exports.EbaySnackbarDialog=N;exports.EbaySnackbarDialogAction=f;
@@ -0,0 +1,46 @@
1
+ import D from "classnames";
2
+ import s, { useRef as g, useState as B, useEffect as h } from "react";
3
+ import { D as F, c as O } from "./dialog-previous-button-gmkm4c8J.mjs";
4
+ import "./icon-button-Dy8rjzH7.mjs";
5
+ const k = ({ className: r, children: c, ...l }) => s.createElement("button", { className: D(r, "fake-link"), ...l }, c), q = 6e3, U = ({ className: r, onOpen: c = () => {
6
+ }, onClose: l = () => {
7
+ }, layout: y, open: i, children: C, onAction: u, ...T }) => {
8
+ const t = g(/* @__PURE__ */ new Set()), f = g(), [M, E] = B(i), b = s.Children.toArray(C), n = b.find((e) => e.type === k), S = b.filter((e) => e.type !== k), o = () => {
9
+ clearTimeout(f.current);
10
+ }, d = () => {
11
+ E(!1), l();
12
+ }, m = () => {
13
+ t.current.size === 0 && (o(), f.current = setTimeout(() => {
14
+ d();
15
+ }, q));
16
+ }, w = () => {
17
+ E(!0), c(), m();
18
+ }, L = () => {
19
+ o(), t.current.add("focus");
20
+ }, N = () => {
21
+ t.current.delete("focus"), m();
22
+ }, R = () => {
23
+ o(), t.current.add("mouseEnter");
24
+ }, _ = () => {
25
+ t.current.delete("mouseEnter"), m();
26
+ }, x = (e) => {
27
+ var a, p;
28
+ o(), u == null || u(e), (p = (a = n == null ? void 0 : n.props) == null ? void 0 : a.onClick) == null || p.call(a, e), d();
29
+ };
30
+ return h(() => () => {
31
+ o();
32
+ }, []), h(() => {
33
+ i ? w() : d();
34
+ }, [i]), s.createElement(
35
+ F,
36
+ { ...T, open: M, isModal: !1, baseEl: "aside", classPrefix: "snackbar-dialog", transitionElement: "root", a11yCloseText: "", buttonPosition: "hidden", className: D(r, "snackbar-dialog--transition"), windowClass: y === "column" && "snackbar-dialog__window--column", onFocus: L, onBlur: N, onMouseEnter: R, onMouseLeave: _ },
37
+ S,
38
+ n ? s.createElement(O, null, s.cloneElement(n, {
39
+ onClick: x
40
+ })) : null
41
+ );
42
+ };
43
+ export {
44
+ U as EbaySnackbarDialog,
45
+ k as EbaySnackbarDialogAction
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),i=require("./utils-C9NL3q0j.js"),B=require("./button-o4ao46WM.js"),o=require("./ebay-menu-button.js"),q=require("./menu-DZU8jEPV.js");require("classnames");const M=({a11yMenuText:u,children:r,type:s,bodyState:t,a11yButtonLoadingText:l,onCollapse:c,onExpand:p,onSelect:b=()=>{},onChange:y=()=>{},ref:f,...e})=>{const a=[q.EbayMenuItem,o.EbayMenuButtonSeparator],m=i.filterBy(r,E=>!a.includes(E.type)),d=i.filterByType(r,a);return n.createElement("span",{className:"split-button"},n.createElement(B.EbayButton,{"aria-label":t==="loading"?l:void 0,...e,split:"start",bodyState:t==="expand"?void 0:t},m),n.createElement(o.EbayMenuButton,{priority:e.priority,disabled:e.disabled,transparent:e.transparent,size:e.size,type:s,split:"end",reverse:!0,a11yText:u,onCollapse:c,onExpand:p,onSelect:b,onChange:y},d))};exports.EbaySplitButton=M;
@@ -0,0 +1,20 @@
1
+ import a from "react";
2
+ import { a as E, b as d } from "./utils-BipBqkOS.mjs";
3
+ import { E as f } from "./button-B06HeRsZ.mjs";
4
+ import { EbayMenuButton as B, EbayMenuButtonSeparator as v } from "./ebay-menu-button.mjs";
5
+ import { a as x } from "./menu-CR1Dxl2m.mjs";
6
+ import "classnames";
7
+ const N = ({ a11yMenuText: o, children: r, type: i, bodyState: e, a11yButtonLoadingText: m, onCollapse: p, onExpand: s, onSelect: l = () => {
8
+ }, onChange: u = () => {
9
+ }, ref: I, ...t }) => {
10
+ const n = [x, v], b = E(r, (c) => !n.includes(c.type)), y = d(r, n);
11
+ return a.createElement(
12
+ "span",
13
+ { className: "split-button" },
14
+ a.createElement(f, { "aria-label": e === "loading" ? m : void 0, ...t, split: "start", bodyState: e === "expand" ? void 0 : e }, b),
15
+ a.createElement(B, { priority: t.priority, disabled: t.disabled, transparent: t.transparent, size: t.size, type: i, split: "end", reverse: !0, a11yText: o, onCollapse: p, onExpand: s, onSelect: l, onChange: u }, y)
16
+ );
17
+ };
18
+ export {
19
+ N as EbaySplitButton
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),u=require("classnames"),m=require("./icon-DK6eEQD8.js"),v=require("./range-DOsPN0h5.js"),y=v.range(1,5),c=n=>{let t=parseInt(n,0)||0;return t>5&&(t=0),t},b=({value:n=0,a11yText:t,className:g,a11yStarText:o=[],disabled:s,onChange:d=()=>{},onFocus:_=()=>{},onKeyDown:f=()=>{},name:E=`star-rating-${m.randomId()}`,...p})=>{const[i,l]=a.useState(c(n));a.useEffect(()=>{l(c(n))},[n]);const h=e=>r=>{s||(l(c(e)),f(r,{value:e}))},k=e=>r=>{s||(l(c(e)),d(r,{value:e}))},N=e=>r=>{s||(l(c(e)),_(r,{value:e}))};return a.createElement("div",{role:t&&"radiogroup","aria-label":t,className:u("star-rating-select",g),...p},y.map(e=>a.createElement("span",{className:"star-rating-select__radio",key:e},a.createElement("input",{"aria-label":o==null?void 0:o[e-1],className:u("star-rating-select__control",{"star-rating-select__control--filled":e<=i}),type:"radio",name:E,value:e,disabled:s,defaultChecked:i===e,onClick:k(e),onFocus:N(e),onKeyDown:h(e)}),a.createElement("span",{className:"star-rating-select__radio-icon"},a.createElement(m.EbayIcon,{className:"star-rating__icon",name:"starDynamic"})))))};exports.EbayStarRatingSelect=b;
@@ -0,0 +1,36 @@
1
+ import n, { useState as N, useEffect as v } from "react";
2
+ import i from "classnames";
3
+ import { E as C, r as D } from "./icon-B_a65KUD.mjs";
4
+ import { r as I } from "./range-DC7seOVT.mjs";
5
+ const w = I(1, 5), s = (t) => {
6
+ let a = parseInt(t, 0) || 0;
7
+ return a > 5 && (a = 0), a;
8
+ }, V = ({ value: t = 0, a11yText: a, className: u, a11yStarText: l = [], disabled: c, onChange: f = () => {
9
+ }, onFocus: p = () => {
10
+ }, onKeyDown: g = () => {
11
+ }, name: _ = `star-rating-${D()}`, ...d }) => {
12
+ const [m, o] = N(s(t));
13
+ v(() => {
14
+ o(s(t));
15
+ }, [t]);
16
+ const E = (e) => (r) => {
17
+ c || (o(s(e)), g(r, { value: e }));
18
+ }, h = (e) => (r) => {
19
+ c || (o(s(e)), f(r, { value: e }));
20
+ }, k = (e) => (r) => {
21
+ c || (o(s(e)), p(r, { value: e }));
22
+ };
23
+ return n.createElement("div", { role: a && "radiogroup", "aria-label": a, className: i("star-rating-select", u), ...d }, w.map((e) => n.createElement(
24
+ "span",
25
+ { className: "star-rating-select__radio", key: e },
26
+ n.createElement("input", { "aria-label": l == null ? void 0 : l[e - 1], className: i("star-rating-select__control", { "star-rating-select__control--filled": e <= m }), type: "radio", name: _, value: e, disabled: c, defaultChecked: m === e, onClick: h(e), onFocus: k(e), onKeyDown: E(e) }),
27
+ n.createElement(
28
+ "span",
29
+ { className: "star-rating-select__radio-icon" },
30
+ n.createElement(C, { className: "star-rating__icon", name: "starDynamic" })
31
+ )
32
+ )));
33
+ };
34
+ export {
35
+ V as EbayStarRatingSelect
36
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("classnames"),i=require("./icon-DK6eEQD8.js"),o=require("./range-DOsPN0h5.js"),l=o.range(1,5),m=({value:e,a11yText:t,className:r,...s})=>a.createElement("div",{role:"img","aria-label":t,className:c("star-rating",r),"data-stars":e,...s},l.map(n=>a.createElement(i.EbayIcon,{key:n,className:"star-rating__icon",name:"starDynamic"})));exports.EbayStarRating=m;
@@ -0,0 +1,8 @@
1
+ import a from "react";
2
+ import o from "classnames";
3
+ import { E as i } from "./icon-B_a65KUD.mjs";
4
+ import { r as n } from "./range-DC7seOVT.mjs";
5
+ const c = n(1, 5), f = ({ value: r, a11yText: t, className: e, ...s }) => a.createElement("div", { role: "img", "aria-label": t, className: o("star-rating", e), "data-stars": r, ...s }, c.map((m) => a.createElement(i, { key: m, className: "star-rating__icon", name: "starDynamic" })));
6
+ export {
7
+ f as EbayStarRating
8
+ };