@ebay/ui-core-react 7.0.1 → 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.
- package/array.polyfill.flat-5BAolFdk.js +1 -0
- package/array.polyfill.flat-Bj5UhY_-.mjs +10 -0
- package/badge-BX5HuO-3.mjs +9 -0
- package/badge-CoHKfiPt.js +1 -0
- package/button-B06HeRsZ.mjs +63 -0
- package/button-o4ao46WM.js +1 -0
- package/calendar-CPKqwJVQ.js +1 -0
- package/calendar-Dq0eM9VC.mjs +216 -0
- package/debounce-BQsYxxOL.js +1 -0
- package/debounce-u81vJ6wg.mjs +9 -0
- package/dialog-previous-button-7ePoYWyj.js +1 -0
- package/dialog-previous-button-gmkm4c8J.mjs +146 -0
- package/drawer-BxxlJwkZ.js +1 -0
- package/drawer-Dcg135Bb.mjs +40 -0
- package/ebay-alert-dialog.js +1 -0
- package/ebay-alert-dialog.mjs +22 -0
- package/ebay-badge.js +1 -0
- package/ebay-badge.mjs +4 -0
- package/ebay-breadcrumbs.js +1 -0
- package/ebay-breadcrumbs.mjs +39 -0
- package/ebay-button.js +1 -0
- package/ebay-button.mjs +5 -0
- package/ebay-calendar.js +1 -0
- package/ebay-calendar.mjs +4 -0
- package/ebay-carousel.js +1 -0
- package/ebay-carousel.mjs +229 -0
- package/ebay-checkbox/README.md +12 -0
- package/ebay-checkbox.js +1 -0
- package/ebay-checkbox.mjs +43 -0
- package/ebay-confirm-dialog.js +1 -0
- package/ebay-confirm-dialog.mjs +24 -0
- package/ebay-cta-button.js +1 -0
- package/ebay-cta-button.mjs +20 -0
- package/ebay-date-textbox.js +1 -0
- package/ebay-date-textbox.mjs +74 -0
- package/ebay-dialog-base.js +1 -0
- package/ebay-dialog-base.mjs +9 -0
- package/ebay-drawer-dialog.js +1 -0
- package/ebay-drawer-dialog.mjs +4 -0
- package/ebay-eek.js +1 -0
- package/ebay-eek.mjs +42 -0
- package/ebay-fake-menu-button.js +1 -0
- package/ebay-fake-menu-button.mjs +7 -0
- package/ebay-fake-menu.js +1 -0
- package/ebay-fake-menu.mjs +9 -0
- package/ebay-fake-tabs.js +1 -0
- package/ebay-fake-tabs.mjs +27 -0
- package/ebay-field.js +1 -0
- package/ebay-field.mjs +19 -0
- package/ebay-fullscreen-dialog.js +1 -0
- package/ebay-fullscreen-dialog.mjs +9 -0
- package/ebay-icon-button/README.md +2 -0
- package/ebay-icon-button.js +1 -0
- package/ebay-icon-button.mjs +4 -0
- package/ebay-icon.js +1 -0
- package/ebay-icon.mjs +4 -0
- package/ebay-infotip.js +1 -0
- package/ebay-infotip.mjs +59 -0
- package/ebay-inline-notice.js +1 -0
- package/ebay-inline-notice.mjs +31 -0
- package/ebay-lightbox-dialog.js +1 -0
- package/ebay-lightbox-dialog.mjs +11 -0
- package/ebay-listbox-button.js +2 -0
- package/ebay-listbox-button.mjs +170 -0
- package/ebay-menu/menu.d.ts +1 -1
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu-button.js +1 -0
- package/ebay-menu-button.mjs +82 -0
- package/ebay-menu.js +1 -0
- package/ebay-menu.mjs +9 -0
- package/ebay-notice-base.js +1 -0
- package/ebay-notice-base.mjs +7 -0
- package/ebay-page-notice.js +1 -0
- package/ebay-page-notice.mjs +42 -0
- package/ebay-pagination.js +1 -0
- package/ebay-pagination.mjs +159 -0
- package/ebay-panel-dialog.js +1 -0
- package/ebay-panel-dialog.mjs +11 -0
- package/ebay-progress-bar.js +1 -0
- package/ebay-progress-bar.mjs +6 -0
- package/ebay-progress-spinner.js +1 -0
- package/ebay-progress-spinner.mjs +4 -0
- package/ebay-progress-stepper.js +1 -0
- package/ebay-progress-stepper.mjs +63 -0
- package/ebay-radio.js +1 -0
- package/ebay-radio.mjs +42 -0
- package/ebay-section-notice.js +1 -0
- package/ebay-section-notice.mjs +46 -0
- package/ebay-section-title/index.d.ts.map +1 -1
- package/ebay-section-title.js +1 -0
- package/ebay-section-title.mjs +24 -0
- package/ebay-select.js +1 -0
- package/ebay-select.mjs +69 -0
- package/ebay-signal.js +1 -0
- package/ebay-signal.mjs +9 -0
- package/ebay-snackbar-dialog.js +1 -0
- package/ebay-snackbar-dialog.mjs +46 -0
- package/ebay-split-button.js +1 -0
- package/ebay-split-button.mjs +20 -0
- package/ebay-star-rating-select.js +1 -0
- package/ebay-star-rating-select.mjs +36 -0
- package/ebay-star-rating.js +1 -0
- package/ebay-star-rating.mjs +8 -0
- package/ebay-svg.js +1 -0
- package/ebay-svg.mjs +4753 -0
- package/ebay-switch.js +1 -0
- package/ebay-switch.mjs +25 -0
- package/ebay-tabs.js +1 -0
- package/ebay-tabs.mjs +66 -0
- package/ebay-textbox.js +1 -0
- package/ebay-textbox.mjs +8 -0
- package/ebay-toast-dialog.js +1 -0
- package/ebay-toast-dialog.mjs +9 -0
- package/ebay-tooltip.js +1 -0
- package/ebay-tooltip.mjs +39 -0
- package/ebay-tourtip.js +1 -0
- package/ebay-tourtip.mjs +43 -0
- package/ebay-video.js +1 -0
- package/ebay-video.mjs +173 -0
- package/hooks-Ctier7Yv.js +1 -0
- package/hooks-r29zhPsY.mjs +63 -0
- package/icon-B_a65KUD.mjs +42 -0
- package/icon-DK6eEQD8.js +1 -0
- package/icon-button-BB6GFLm7.js +1 -0
- package/icon-button-Dy8rjzH7.mjs +24 -0
- package/index-B5oC9Rl1.mjs +22 -0
- package/index-DbjwTbDP.js +1 -0
- package/label-CnrpYJ-g.js +1 -0
- package/label-DgOo6Mql.mjs +19 -0
- package/menu-CR1Dxl2m.mjs +154 -0
- package/menu-DZU8jEPV.js +1 -0
- package/menu-button-label-BcgasGA4.js +1 -0
- package/menu-button-label-vVnRKJRU.mjs +68 -0
- package/menu-item-DBi1NcrM.js +1 -0
- package/menu-item-jlKZ3uT4.mjs +67 -0
- package/notice-content-9iF4T8uB.js +1 -0
- package/notice-content-BVZMfcMH.mjs +4 -0
- package/notice-content-C0ZStfuX.js +1 -0
- package/notice-content-CdXVjKzD.mjs +9 -0
- package/notice-footer-BFa2IeY9.mjs +10 -0
- package/notice-footer-Cw1DMzoB.js +1 -0
- package/package.json +19 -7
- package/progress-spinner-BugUcF5c.mjs +19 -0
- package/progress-spinner-CDgxI8R_.js +1 -0
- package/range-DC7seOVT.mjs +4 -0
- package/range-DOsPN0h5.js +1 -0
- package/textbox-BxYjEAZK.mjs +100 -0
- package/textbox-WnB-9F4y.js +1 -0
- package/use-tooltip-BavqG36Z.js +1 -0
- package/use-tooltip-Bibsm2rU.mjs +158 -0
- package/utils-BipBqkOS.mjs +21 -0
- package/utils-C9NL3q0j.js +1 -0
- package/common/component-utils/array.polyfill.flat.js +0 -32
- package/common/component-utils/forwardRef.js +0 -37
- package/common/component-utils/index.js +0 -18
- package/common/component-utils/usePrevious.js +0 -12
- package/common/component-utils/utils.js +0 -26
- package/common/debounce.js +0 -11
- package/common/event-utils/index.js +0 -123
- package/common/event-utils/types.js +0 -14
- package/common/event-utils/use-key-press.js +0 -33
- package/common/event-utils/use-roving-index.js +0 -35
- package/common/floating-label-utils/hooks.js +0 -133
- package/common/notice-utils/notice-content.js +0 -12
- package/common/notice-utils/notice-cta.js +0 -23
- package/common/notice-utils/notice-footer.js +0 -23
- package/common/notice-utils/notice-title.js +0 -24
- package/common/random-id.js +0 -5
- package/common/range.js +0 -5
- package/common/tooltip-utils/constants.js +0 -95
- package/common/tooltip-utils/index.js +0 -19
- package/common/tooltip-utils/tooltip-close-button.js +0 -8
- package/common/tooltip-utils/tooltip-content.js +0 -25
- package/common/tooltip-utils/tooltip-footer.js +0 -9
- package/common/tooltip-utils/tooltip-host.js +0 -24
- package/common/tooltip-utils/tooltip.js +0 -60
- package/common/tooltip-utils/types.js +0 -2
- package/common/tooltip-utils/use-tooltip.js +0 -27
- package/ebay-alert-dialog/alert-dialog.js +0 -55
- package/ebay-alert-dialog/index.js +0 -8
- package/ebay-badge/badge.js +0 -25
- package/ebay-badge/index.js +0 -8
- package/ebay-breadcrumbs/breadcrumb-item.js +0 -27
- package/ebay-breadcrumbs/breadcrumbs.js +0 -64
- package/ebay-breadcrumbs/index.js +0 -10
- package/ebay-button/button-cell.js +0 -29
- package/ebay-button/button-expand.js +0 -13
- package/ebay-button/button-loading.js +0 -11
- package/ebay-button/button-text.js +0 -9
- package/ebay-button/button.js +0 -95
- package/ebay-button/index.js +0 -10
- package/ebay-button/types.js +0 -2
- package/ebay-calendar/calendar.js +0 -306
- package/ebay-calendar/date-utils.js +0 -58
- package/ebay-calendar/index.js +0 -8
- package/ebay-carousel/carousel-control-button.js +0 -24
- package/ebay-carousel/carousel-item.js +0 -59
- package/ebay-carousel/carousel-list.js +0 -81
- package/ebay-carousel/carousel.js +0 -109
- package/ebay-carousel/helpers.js +0 -123
- package/ebay-carousel/index.js +0 -10
- package/ebay-carousel/scroll-to-transition.js +0 -102
- package/ebay-carousel/types.js +0 -2
- package/ebay-checkbox/checkbox.js +0 -77
- package/ebay-checkbox/index.js +0 -8
- package/ebay-confirm-dialog/confirm-dialog.js +0 -56
- package/ebay-confirm-dialog/index.js +0 -8
- package/ebay-cta-button/cta-button.js +0 -30
- package/ebay-cta-button/index.js +0 -8
- package/ebay-date-textbox/date-textbox.js +0 -179
- package/ebay-date-textbox/index.js +0 -8
- package/ebay-dialog-base/components/animation.js +0 -96
- package/ebay-dialog-base/components/dialog-actions.js +0 -8
- package/ebay-dialog-base/components/dialog-close-button.js +0 -8
- package/ebay-dialog-base/components/dialog-footer.js +0 -8
- package/ebay-dialog-base/components/dialog-header.js +0 -22
- package/ebay-dialog-base/components/dialog-previous-button.js +0 -24
- package/ebay-dialog-base/components/dialogBase.js +0 -152
- package/ebay-dialog-base/dialog-base-with-state.js +0 -63
- package/ebay-dialog-base/index.js +0 -18
- package/ebay-drawer-dialog/components/drawer.js +0 -104
- package/ebay-drawer-dialog/index.js +0 -8
- package/ebay-eek/eek-rating.js +0 -23
- package/ebay-eek/eek-util.js +0 -34
- package/ebay-eek/index.js +0 -8
- package/ebay-fake-menu/index.js +0 -12
- package/ebay-fake-menu/menu-item-separator.js +0 -23
- package/ebay-fake-menu/menu-item.js +0 -72
- package/ebay-fake-menu/menu.js +0 -57
- package/ebay-fake-menu-button/index.js +0 -14
- package/ebay-fake-menu-button/menu-button-item.js +0 -5
- package/ebay-fake-menu-button/menu-button-label.js +0 -8
- package/ebay-fake-menu-button/menu-button-separator.js +0 -23
- package/ebay-fake-menu-button/menu-button.js +0 -105
- package/ebay-fake-tabs/fake-tabs.js +0 -54
- package/ebay-fake-tabs/index.js +0 -10
- package/ebay-fake-tabs/tab.js +0 -24
- package/ebay-field/description.js +0 -26
- package/ebay-field/field.js +0 -12
- package/ebay-field/index.js +0 -12
- package/ebay-field/label.js +0 -29
- package/ebay-field/types.js +0 -2
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +0 -25
- package/ebay-fullscreen-dialog/index.js +0 -8
- package/ebay-icon/icon.js +0 -98
- package/ebay-icon/index.js +0 -8
- package/ebay-icon/types.js +0 -3
- package/ebay-icon-button/icon-button.js +0 -40
- package/ebay-icon-button/index.js +0 -8
- package/ebay-infotip/ebay-infotip-content.js +0 -12
- package/ebay-infotip/ebay-infotip-heading.js +0 -23
- package/ebay-infotip/ebay-infotip-host.js +0 -28
- package/ebay-infotip/ebay-infotip.js +0 -79
- package/ebay-infotip/index.js +0 -14
- package/ebay-infotip/types.js +0 -2
- package/ebay-inline-notice/index.js +0 -10
- package/ebay-inline-notice/inline-notice.js +0 -66
- package/ebay-inline-notice/types.js +0 -2
- package/ebay-lightbox-dialog/index.js +0 -8
- package/ebay-lightbox-dialog/lightbox-dialog.js +0 -27
- package/ebay-listbox-button/index.js +0 -10
- package/ebay-listbox-button/listbox-button-option.js +0 -27
- package/ebay-listbox-button/listbox-button.js +0 -252
- package/ebay-menu/index.js +0 -27
- package/ebay-menu/menu-item-separator.js +0 -23
- package/ebay-menu/menu-item.js +0 -67
- package/ebay-menu/menu.js +0 -149
- package/ebay-menu/types.js +0 -2
- package/ebay-menu-button/index.js +0 -29
- package/ebay-menu-button/menu-button-item.js +0 -5
- package/ebay-menu-button/menu-button-label.js +0 -8
- package/ebay-menu-button/menu-button-separator.js +0 -23
- package/ebay-menu-button/menu-button.js +0 -132
- package/ebay-menu-button/types.js +0 -2
- package/ebay-notice-base/components/ebay-notice-content/index.js +0 -8
- package/ebay-notice-base/components/ebay-notice-content/notice-content.js +0 -4
- package/ebay-notice-base/components/ebay-notice-title/index.js +0 -8
- package/ebay-notice-base/components/ebay-notice-title/notice-title.js +0 -8
- package/ebay-notice-base/index.js +0 -7
- package/ebay-page-notice/index.js +0 -16
- package/ebay-page-notice/page-notice-cta.js +0 -9
- package/ebay-page-notice/page-notice-footer.js +0 -9
- package/ebay-page-notice/page-notice-title.js +0 -23
- package/ebay-page-notice/page-notice.js +0 -66
- package/ebay-pagination/const.js +0 -8
- package/ebay-pagination/helpers.js +0 -92
- package/ebay-pagination/index.js +0 -10
- package/ebay-pagination/pagination-item.js +0 -55
- package/ebay-pagination/pagination.js +0 -146
- package/ebay-pagination/types.js +0 -2
- package/ebay-panel-dialog/index.js +0 -8
- package/ebay-panel-dialog/panel-dialog.js +0 -27
- package/ebay-progress-bar/index.js +0 -8
- package/ebay-progress-bar/progress-bar.js +0 -23
- package/ebay-progress-spinner/index.js +0 -8
- package/ebay-progress-spinner/progress-spinner.js +0 -35
- package/ebay-progress-stepper/ebay-progress-step.js +0 -64
- package/ebay-progress-stepper/ebay-progress-stepper.js +0 -70
- package/ebay-progress-stepper/ebay-progress-title.js +0 -5
- package/ebay-progress-stepper/index.js +0 -12
- package/ebay-progress-stepper/types.js +0 -2
- package/ebay-radio/index.js +0 -8
- package/ebay-radio/radio.js +0 -71
- package/ebay-section-notice/index.js +0 -14
- package/ebay-section-notice/section-notice-footer.js +0 -9
- package/ebay-section-notice/section-notice-title.js +0 -23
- package/ebay-section-notice/section-notice.js +0 -82
- package/ebay-section-title/cta.js +0 -26
- package/ebay-section-title/index.js +0 -16
- package/ebay-section-title/info.js +0 -23
- package/ebay-section-title/overflow.js +0 -23
- package/ebay-section-title/section-title.js +0 -35
- package/ebay-section-title/subtitle.js +0 -23
- package/ebay-section-title/title.js +0 -23
- package/ebay-select/ebay-select-option.js +0 -22
- package/ebay-select/ebay-select.js +0 -129
- package/ebay-select/index.js +0 -10
- package/ebay-signal/index.js +0 -8
- package/ebay-signal/signal.js +0 -24
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +0 -24
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +0 -122
- package/ebay-snackbar-dialog/index.js +0 -7
- package/ebay-split-button/index.js +0 -23
- package/ebay-split-button/split-button.js +0 -30
- package/ebay-split-button/types.js +0 -2
- package/ebay-star-rating/index.js +0 -23
- package/ebay-star-rating/star-rating.js +0 -26
- package/ebay-star-rating-select/index.js +0 -23
- package/ebay-star-rating-select/star-rating-select.js +0 -82
- package/ebay-svg/index.js +0 -8
- package/ebay-svg/svg.js +0 -2548
- package/ebay-switch/ebay-switch.js +0 -61
- package/ebay-switch/index.js +0 -8
- package/ebay-tabs/index.js +0 -12
- package/ebay-tabs/tab-panel.js +0 -24
- package/ebay-tabs/tab.js +0 -24
- package/ebay-tabs/tabs.js +0 -90
- package/ebay-tabs/types.js +0 -2
- package/ebay-textbox/index.js +0 -16
- package/ebay-textbox/postfix-icon.js +0 -26
- package/ebay-textbox/postfix-text.js +0 -8
- package/ebay-textbox/prefix-icon.js +0 -23
- package/ebay-textbox/prefix-text.js +0 -8
- package/ebay-textbox/textbox.js +0 -147
- package/ebay-textbox/types.js +0 -2
- package/ebay-toast-dialog/components/toast.js +0 -26
- package/ebay-toast-dialog/index.js +0 -8
- package/ebay-tooltip/ebay-tooltip-content.js +0 -8
- package/ebay-tooltip/ebay-tooltip-host.js +0 -8
- package/ebay-tooltip/ebay-tooltip.js +0 -85
- package/ebay-tooltip/index.js +0 -14
- package/ebay-tourtip/ebay-tourtip-content.js +0 -8
- package/ebay-tourtip/ebay-tourtip-footer.js +0 -10
- package/ebay-tourtip/ebay-tourtip-heading.js +0 -24
- package/ebay-tourtip/ebay-tourtip-host.js +0 -8
- package/ebay-tourtip/ebay-tourtip.js +0 -70
- package/ebay-tourtip/index.js +0 -18
- package/ebay-video/const.js +0 -19
- package/ebay-video/controls.js +0 -40
- package/ebay-video/index.js +0 -25
- package/ebay-video/reportButton.js +0 -12
- package/ebay-video/source.js +0 -22
- package/ebay-video/types.js +0 -2
- package/ebay-video/video.js +0 -210
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,writable:!0,value:function(e){const a=typeof e>"u"?1:Number(e)||0,r=[],c=r.forEach,o=(n,f)=>c.call(n,t=>{f>0&&Array.isArray(t)?o(t,f-1):r.push(t)});return o(this,a),r}});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Array.prototype.flat || Object.defineProperty(Array.prototype, "flat", {
|
|
2
|
+
configurable: !0,
|
|
3
|
+
writable: !0,
|
|
4
|
+
value: function(t) {
|
|
5
|
+
const a = typeof t > "u" ? 1 : Number(t) || 0, r = [], n = r.forEach, o = (c, f) => n.call(c, (e) => {
|
|
6
|
+
f > 0 && Array.isArray(e) ? o(e, f - 1) : r.push(e);
|
|
7
|
+
});
|
|
8
|
+
return o(this, a), r;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import i from "classnames";
|
|
3
|
+
const d = ({ number: r, type: e = "img", className: m, ...s }) => {
|
|
4
|
+
const a = Math.round(parseInt(String(r), 10));
|
|
5
|
+
return a <= 0 ? null : t.createElement("span", { ...s, className: i("badge", m), role: e === "img" ? "img" : void 0, "aria-hidden": e !== "img" }, a > 99 ? "99+" : a);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
d as E
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react"),i=require("classnames"),c=({number:r,type:a="img",className:s,...n})=>{const e=Math.round(parseInt(String(r),10));return e<=0?null:t.createElement("span",{...n,className:i("badge",s),role:a==="img"?"img":void 0,"aria-hidden":a!=="img"},e>99?"99+":e)};exports.EbayBadge=c;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import t, { Children as O } from "react";
|
|
2
|
+
import B from "classnames";
|
|
3
|
+
import { E as m, w as R } from "./icon-B_a65KUD.mjs";
|
|
4
|
+
import "./array.polyfill.flat-Bj5UhY_-.mjs";
|
|
5
|
+
import { E as T } from "./progress-spinner-BugUcF5c.mjs";
|
|
6
|
+
const j = {
|
|
7
|
+
cta: "cta-",
|
|
8
|
+
fake: "fake-",
|
|
9
|
+
expand: "expand-",
|
|
10
|
+
default: ""
|
|
11
|
+
}, k = ({ type: n = "default", children: a, ...r }) => t.createElement(
|
|
12
|
+
"span",
|
|
13
|
+
{ className: `${j[n]}btn__cell`, ...r },
|
|
14
|
+
t.createElement(t.Fragment, null, a)
|
|
15
|
+
), q = () => t.createElement(
|
|
16
|
+
k,
|
|
17
|
+
null,
|
|
18
|
+
t.createElement(T, null)
|
|
19
|
+
), G = ({ className: n, children: a }) => t.createElement("span", { className: B(n, "btn__text") }, a), H = ({ children: n }) => n ? t.createElement(
|
|
20
|
+
k,
|
|
21
|
+
null,
|
|
22
|
+
t.createElement(G, null, n),
|
|
23
|
+
t.createElement(m, { name: "chevronDown12" })
|
|
24
|
+
) : t.createElement(m, { name: "chevronDown12" }), J = ({ priority: n = "secondary", variant: a = "standard", size: r = "regular", bodyState: u, split: D, transparent: N = !1, fluid: C = !1, disabled: y, partiallyDisabled: S, children: o, onKeyDown: _ = () => {
|
|
25
|
+
}, onEscape: h = () => {
|
|
26
|
+
}, truncate: F = !1, href: l, className: L, forwardedRef: E, borderless: p, fixedHeight: d, ...f }) => {
|
|
27
|
+
const e = l ? "fake-btn" : "btn", A = {
|
|
28
|
+
primary: `${e}--primary`,
|
|
29
|
+
secondary: `${e}--secondary`,
|
|
30
|
+
tertiary: `${e}--tertiary`,
|
|
31
|
+
none: ""
|
|
32
|
+
}, c = {
|
|
33
|
+
large: `${e}--large`,
|
|
34
|
+
small: `${e}--small`,
|
|
35
|
+
regular: "",
|
|
36
|
+
default: ""
|
|
37
|
+
}, I = {
|
|
38
|
+
start: `${e}--split-start`,
|
|
39
|
+
end: `${e}--split-end`
|
|
40
|
+
}, K = a === "destructive", i = a === "form", $ = u === "loading", b = u === "expand", P = i && (Q(o) || b && !o), g = B(e, L, A[i || p ? "none" : n], c[r], I[D], K && `${e}--destructive`, i && `${e}--form`, P && `${e}--slim`, N && `${e}--transparent`, C && `${e}--fluid`, F && `${e}--truncated`, p && `${e}--borderless`, d && (c[r] ? `${c[r]}-${d}` : `${e}--fixed-height`)), x = (s) => {
|
|
41
|
+
_(s), (s.key === "Escape" || s.key === "Esc") && h(s);
|
|
42
|
+
}, v = M(o, { isLoading: $, isExpand: b }), w = $ ? "polite" : null;
|
|
43
|
+
return l ? t.createElement("a", { className: g, href: y ? void 0 : l, ref: E, onKeyDown: x, "aria-live": w, ...f }, v) : t.createElement("button", { disabled: y, "aria-disabled": S, "aria-live": w, className: g, ref: E, onKeyDown: x, ...f }, v);
|
|
44
|
+
};
|
|
45
|
+
function M(n, { isLoading: a, isExpand: r }) {
|
|
46
|
+
switch (!0) {
|
|
47
|
+
case a:
|
|
48
|
+
return t.createElement(q, null);
|
|
49
|
+
case r:
|
|
50
|
+
return t.createElement(H, null, n);
|
|
51
|
+
default:
|
|
52
|
+
return n;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function Q(n) {
|
|
56
|
+
const a = O.toArray(n);
|
|
57
|
+
return a.length === 1 && a[0].type === m;
|
|
58
|
+
}
|
|
59
|
+
const Z = R(J);
|
|
60
|
+
export {
|
|
61
|
+
Z as E,
|
|
62
|
+
k as a
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react"),k=require("classnames"),l=require("./icon-DK6eEQD8.js");require("./array.polyfill.flat-5BAolFdk.js");const P=require("./progress-spinner-CDgxI8R_.js"),O={cta:"cta-",fake:"fake-",expand:"expand-",default:""},y=({type:n="default",children:a,...r})=>t.createElement("span",{className:`${O[n]}btn__cell`,...r},t.createElement(t.Fragment,null,a)),R=()=>t.createElement(y,null,t.createElement(P.EbayProgressSpinner,null)),T=({className:n,children:a})=>t.createElement("span",{className:k(n,"btn__text")},a),j=({children:n})=>n?t.createElement(y,null,t.createElement(T,null,n),t.createElement(l.EbayIcon,{name:"chevronDown12"})):t.createElement(l.EbayIcon,{name:"chevronDown12"}),G=({priority:n="secondary",variant:a="standard",size:r="regular",bodyState:m,split:D,transparent:N=!1,fluid:q=!1,disabled:E,partiallyDisabled:C,children:o,onKeyDown:S=()=>{},onEscape:I=()=>{},truncate:_=!1,href:c,className:h,forwardedRef:d,borderless:p,fixedHeight:$,...b})=>{const e=c?"fake-btn":"btn",F={primary:`${e}--primary`,secondary:`${e}--secondary`,tertiary:`${e}--tertiary`,none:""},i={large:`${e}--large`,small:`${e}--small`,regular:"",default:""},L={start:`${e}--split-start`,end:`${e}--split-end`},A=a==="destructive",u=a==="form",f=m==="loading",g=m==="expand",K=u&&(J(o)||g&&!o),B=k(e,h,F[u||p?"none":n],i[r],L[D],A&&`${e}--destructive`,u&&`${e}--form`,K&&`${e}--slim`,N&&`${e}--transparent`,q&&`${e}--fluid`,_&&`${e}--truncated`,p&&`${e}--borderless`,$&&(i[r]?`${i[r]}-${$}`:`${e}--fixed-height`)),v=s=>{S(s),(s.key==="Escape"||s.key==="Esc")&&I(s)},x=H(o,{isLoading:f,isExpand:g}),w=f?"polite":null;return c?t.createElement("a",{className:B,href:E?void 0:c,ref:d,onKeyDown:v,"aria-live":w,...b},x):t.createElement("button",{disabled:E,"aria-disabled":C,"aria-live":w,className:B,ref:d,onKeyDown:v,...b},x)};function H(n,{isLoading:a,isExpand:r}){switch(!0){case a:return t.createElement(R,null);case r:return t.createElement(j,null,n);default:return n}}function J(n){const a=t.Children.toArray(n);return a.length===1&&a[0].type===l.EbayIcon}const M=l.withForwardRef(G);exports.EbayButton=M;exports.EbayButtonCell=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("react"),ue=require("./icon-button-BB6GFLm7.js"),de=require("classnames");function Ue(n){const o=new Intl.Locale(n);return o.weekInfo?o.weekInfo.firstDay:0}function ve(n){const o=Ue(n),i=new Intl.DateTimeFormat(n,{weekday:"short"}),d=new Date(2022,9,2+o),A=[...Array(7)].map(()=>{const k=i.format(d);return d.setDate(d.getDate()+1),k});return{firstDayOfWeek:o,weekdayLabels:A}}function Ae(n){if(n)return/^\d\d\d\d-\d\d-\d\d$/g.test(n)?n:u(new Date(n))}function u(n){if(!isNaN(n.getTime()))return n.toISOString().slice(0,10)}function v(n){return new Date(n)}function H(n,o){const i=v(n);return i.setUTCDate(i.getUTCDate()+o),u(i)}function fe(n){return n||navigator.language}const Fe={ArrowRight:1,ArrowLeft:-1,ArrowDown:7,ArrowUp:-7},Re=({selected:n,numMonths:o=1,navigable:i,interactive:d,range:A,locale:k,disableBefore:g,disableAfter:I,disableWeekdays:B,disableList:G,a11ySelectedText:me="selected",a11yRangeStartText:ye="start of range",a11yInRangeText:ge="in range",a11yRangeEndText:Ie="end of range",a11ySeparator:J="-",a11yTodayText:De="today",a11yDisabledText:Se="inactive",getA11yShowMonthText:Q=T=>`Show ${T}`,linkBuilder:X,onMonthChange:Z=()=>{},onFocus:we=()=>{},onSelect:Ee=()=>{}})=>{const T=u(new Date),{firstDayOfWeek:Oe,weekdayLabels:Te}=ve(fe(k)),ee=a.useRef(null),[m,F]=a.useState(0),[te,ne]=a.useState(null),[D,h]=a.useState(T),R=a.useRef(T),S=e=>{const t=v(R.current);return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+e))},w=()=>u(S(m)),E=()=>{const e=v(R.current);return u(new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+m+(o||1),0)))};a.useEffect(()=>{if(n){const e=Array.isArray(n)?n:[n],t=w(),r=E();e.find(f=>f>=t&&f<=r)===void 0&&(R.current=e[0],F(0))}},[n]);const be=()=>{if(n&&A){let e,t;if(Array.isArray(n)?[e,t]=n:te&&(e=n,t=te),e&&t){const[r,s]=[e,t].sort();return{rangeStart:r,rangeEnd:s}}}return{rangeStart:null,rangeEnd:null}},p=e=>new Intl.DateTimeFormat(fe(k),{month:"long",year:"numeric"}).format(new Date(e.getUTCFullYear(),e.getUTCMonth())),_=e=>g&&e<g||I&&e>I||B&&B.includes(v(e).getUTCDay())||G&&G.includes(e),ae=()=>{let e=w();const t=E();for(;e<=t&&_(e);)e=H(e,1);return e>t?null:e},re=()=>{let e=E();const t=w();for(;e>=t&&_(e);)e=H(e,-1);return e<t?null:e},b=e=>{h(e),setTimeout(()=>{var r;const t=(r=ee.current)==null?void 0:r.querySelector(`[data-iso="${e}"]`);t==null||t.focus()})},N=e=>{if(g&&w()<=g)return!1;F(s=>s-1);let t=D;const r=re();return r&&r<D&&(t=r,h(r)),e&&b(t),Z({iso:u(S(m))}),!0},L=e=>{if(I&&E()>=I)return!1;F(s=>s+1);let t=D;const r=ae();r&&r>D&&(t=r,h(r)),e&&b(t),Z({iso:u(S(m+(o||1)))})},ke=e=>{const t=Fe[e.key];if(t){e.preventDefault();let r=7,s=D;do s=H(s,t);while(r-- >0&&_(s));if(r>0){const f=w(),O=E();s<f?i?N():s=f:s>O&&(i?L():s=O),b(s)}}else switch(e.key){case"PageUp":N(!0);break;case"PageDown":L(!0);break;case"Home":b(ae());break;case"End":b(re());break}},he=(e,t)=>{Ee(e,{iso:t})},se=(e,t)=>{ne(t),h(t),we(e,{iso:t})},ce=()=>{ne(null)},{rangeStart:V,rangeEnd:x}=be(),pe=e=>!(!V||!x||e<V||e>x),oe=[...Array(o)].map((e,t)=>S(m+t));return a.createElement("div",{className:"calendar",ref:ee},i&&a.createElement("div",{className:"calendar__header"},a.createElement("div",{className:"calendar__header--inner"},a.createElement(ue.EbayIconButton,{transparent:!0,size:"small",icon:"chevronLeft24",disabled:g&&w()<=g,"aria-label":Q(p(S(m-1))),onClick:()=>N()}),oe.map((e,t)=>a.createElement("h3",{key:t},p(e))),a.createElement(ue.EbayIconButton,{transparent:!0,size:"small",icon:"chevronRight24",disabled:I&&E()>=I,"aria-label":Q(p(S(m+o))),onClick:()=>L()}))),a.createElement("div",{className:"calendar__body"},oe.map((e,t)=>{const r=(e.getUTCDay()-Oe+7)%7,s=e.getUTCFullYear(),f=e.getUTCMonth(),O=new Date(s,f+1,0).getDate(),_e=[...Array(Math.ceil((r+O)/7))];return a.createElement("div",{key:t,className:"calendar__month"},a.createElement("table",{onKeyDown:ke},a.createElement("caption",null,p(e)),a.createElement("thead",null,a.createElement("tr",null,Te.map(M=>a.createElement("th",{key:M,scope:"col"},M)))),a.createElement("tbody",null,_e.map((M,Y)=>{let $=Y*7-r+1,q=$+6;const P=[];Y===0&&r!==0?($=1,P.push(a.createElement("td",{key:"pre-column",colSpan:r}))):q>O&&(q=O);for(let y=$;y<=q;y++){const c=u(new Date(Date.UTC(s,f,y))),W=c===T,j=Array.isArray(n)?n.some(l=>l===c):n===c,z=c===V,le=pe(c),K=c===x,C=_(c),U=["",j&&me,z&&ye,!z&&!K&&le&&ge,K&&Ie,!d&&W&&De,!d&&C&&Se].filter(l=>typeof l!="boolean"||l!==!1),ie=!d&&!C&&X&&X(c),Ce=ie?"a":"span";P.push(a.createElement("td",{key:y,className:de({"calendar__cell--selected":j,"calendar__range--start":z,calendar__range:le,"calendar__range--end":K})},d?a.createElement("button",{disabled:C,"aria-label":U.length>1?`${y}${U.join(J)}`:void 0,tabIndex:D!==c?-1:void 0,"aria-current":W?"date":void 0,"aria-pressed":j?"true":void 0,onClick:l=>he(l,c),onFocus:l=>se(l,c),onMouseOver:l=>se(l,c),onMouseOut:l=>ce(),onBlur:()=>ce(),"data-iso":c},y):a.createElement(Ce,{className:de({"calendar__cell--disabled":C,"calendar__cell--current":W}),href:ie},y,U.length>1&&a.createElement("span",{className:"clipped"},U.join(J)))))}return a.createElement("tr",{key:Y},P)}))))})))};exports.EbayCalendar=Re;exports.dateArgToISO=Ae;exports.toISO=u;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import r, { useRef as fe, useState as H, useEffect as Ae } from "react";
|
|
2
|
+
import { E as de } from "./icon-button-Dy8rjzH7.mjs";
|
|
3
|
+
import me from "classnames";
|
|
4
|
+
function Fe(n) {
|
|
5
|
+
const c = new Intl.Locale(n);
|
|
6
|
+
return c.weekInfo ? c.weekInfo.firstDay : 0;
|
|
7
|
+
}
|
|
8
|
+
function Re(n) {
|
|
9
|
+
const c = Fe(n), i = new Intl.DateTimeFormat(n, {
|
|
10
|
+
weekday: "short"
|
|
11
|
+
}), u = new Date(2022, 9, 2 + c), A = [...Array(7)].map(() => {
|
|
12
|
+
const k = i.format(u);
|
|
13
|
+
return u.setDate(u.getDate() + 1), k;
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
firstDayOfWeek: c,
|
|
17
|
+
weekdayLabels: A
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function Me(n) {
|
|
21
|
+
if (n)
|
|
22
|
+
return /^\d\d\d\d-\d\d-\d\d$/g.test(n) ? n : d(new Date(n));
|
|
23
|
+
}
|
|
24
|
+
function d(n) {
|
|
25
|
+
if (!isNaN(n.getTime()))
|
|
26
|
+
return n.toISOString().slice(0, 10);
|
|
27
|
+
}
|
|
28
|
+
function v(n) {
|
|
29
|
+
return new Date(n);
|
|
30
|
+
}
|
|
31
|
+
function G(n, c) {
|
|
32
|
+
const i = v(n);
|
|
33
|
+
return i.setUTCDate(i.getUTCDate() + c), d(i);
|
|
34
|
+
}
|
|
35
|
+
function ye(n) {
|
|
36
|
+
return n || navigator.language;
|
|
37
|
+
}
|
|
38
|
+
const Ne = {
|
|
39
|
+
ArrowRight: 1,
|
|
40
|
+
ArrowLeft: -1,
|
|
41
|
+
ArrowDown: 7,
|
|
42
|
+
ArrowUp: -7
|
|
43
|
+
}, Ye = ({ selected: n, numMonths: c = 1, navigable: i, interactive: u, range: A, locale: k, disableBefore: g, disableAfter: D, disableWeekdays: J, disableList: Q, a11ySelectedText: ge = "selected", a11yRangeStartText: De = "start of range", a11yInRangeText: Ie = "in range", a11yRangeEndText: we = "end of range", a11ySeparator: X = "-", a11yTodayText: Ee = "today", a11yDisabledText: Se = "inactive", getA11yShowMonthText: Z = (T) => `Show ${T}`, linkBuilder: B, onMonthChange: ee = () => {
|
|
44
|
+
}, onFocus: Oe = () => {
|
|
45
|
+
}, onSelect: Te = () => {
|
|
46
|
+
} }) => {
|
|
47
|
+
const T = d(/* @__PURE__ */ new Date()), { firstDayOfWeek: pe, weekdayLabels: ke } = Re(ye(k)), te = fe(null), [m, F] = H(0), [ne, ae] = H(null), [I, b] = H(T), R = fe(T), w = (e) => {
|
|
48
|
+
const t = v(R.current);
|
|
49
|
+
return new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth() + e));
|
|
50
|
+
}, E = () => d(w(m)), S = () => {
|
|
51
|
+
const e = v(R.current);
|
|
52
|
+
return d(new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + m + (c || 1), 0)));
|
|
53
|
+
};
|
|
54
|
+
Ae(() => {
|
|
55
|
+
if (n) {
|
|
56
|
+
const e = Array.isArray(n) ? n : [n], t = E(), a = S();
|
|
57
|
+
e.find((f) => f >= t && f <= a) === void 0 && (R.current = e[0], F(0));
|
|
58
|
+
}
|
|
59
|
+
}, [n]);
|
|
60
|
+
const be = () => {
|
|
61
|
+
if (n && A) {
|
|
62
|
+
let e, t;
|
|
63
|
+
if (Array.isArray(n) ? [e, t] = n : ne && (e = n, t = ne), e && t) {
|
|
64
|
+
const [a, s] = [e, t].sort();
|
|
65
|
+
return {
|
|
66
|
+
rangeStart: a,
|
|
67
|
+
rangeEnd: s
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
rangeStart: null,
|
|
73
|
+
rangeEnd: null
|
|
74
|
+
};
|
|
75
|
+
}, h = (e) => new Intl.DateTimeFormat(ye(k), {
|
|
76
|
+
month: "long",
|
|
77
|
+
year: "numeric"
|
|
78
|
+
}).format(new Date(e.getUTCFullYear(), e.getUTCMonth())), _ = (e) => g && e < g || D && e > D || J && J.includes(v(e).getUTCDay()) || Q && Q.includes(e), re = () => {
|
|
79
|
+
let e = E();
|
|
80
|
+
const t = S();
|
|
81
|
+
for (; e <= t && _(e); )
|
|
82
|
+
e = G(e, 1);
|
|
83
|
+
return e > t ? null : e;
|
|
84
|
+
}, se = () => {
|
|
85
|
+
let e = S();
|
|
86
|
+
const t = E();
|
|
87
|
+
for (; e >= t && _(e); )
|
|
88
|
+
e = G(e, -1);
|
|
89
|
+
return e < t ? null : e;
|
|
90
|
+
}, p = (e) => {
|
|
91
|
+
b(e), setTimeout(() => {
|
|
92
|
+
var a;
|
|
93
|
+
const t = (a = te.current) == null ? void 0 : a.querySelector(`[data-iso="${e}"]`);
|
|
94
|
+
t == null || t.focus();
|
|
95
|
+
});
|
|
96
|
+
}, N = (e) => {
|
|
97
|
+
if (g && E() <= g)
|
|
98
|
+
return !1;
|
|
99
|
+
F((s) => s - 1);
|
|
100
|
+
let t = I;
|
|
101
|
+
const a = se();
|
|
102
|
+
return a && a < I && (t = a, b(a)), e && p(t), ee({
|
|
103
|
+
iso: d(w(m))
|
|
104
|
+
}), !0;
|
|
105
|
+
}, L = (e) => {
|
|
106
|
+
if (D && S() >= D)
|
|
107
|
+
return !1;
|
|
108
|
+
F((s) => s + 1);
|
|
109
|
+
let t = I;
|
|
110
|
+
const a = re();
|
|
111
|
+
a && a > I && (t = a, b(a)), e && p(t), ee({
|
|
112
|
+
iso: d(w(m + (c || 1)))
|
|
113
|
+
});
|
|
114
|
+
}, he = (e) => {
|
|
115
|
+
const t = Ne[e.key];
|
|
116
|
+
if (t) {
|
|
117
|
+
e.preventDefault();
|
|
118
|
+
let a = 7, s = I;
|
|
119
|
+
do
|
|
120
|
+
s = G(s, t);
|
|
121
|
+
while (a-- > 0 && _(s));
|
|
122
|
+
if (a > 0) {
|
|
123
|
+
const f = E(), O = S();
|
|
124
|
+
s < f ? i ? N() : s = f : s > O && (i ? L() : s = O), p(s);
|
|
125
|
+
}
|
|
126
|
+
} else
|
|
127
|
+
switch (e.key) {
|
|
128
|
+
case "PageUp":
|
|
129
|
+
N(!0);
|
|
130
|
+
break;
|
|
131
|
+
case "PageDown":
|
|
132
|
+
L(!0);
|
|
133
|
+
break;
|
|
134
|
+
case "Home":
|
|
135
|
+
p(re());
|
|
136
|
+
break;
|
|
137
|
+
case "End":
|
|
138
|
+
p(se());
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}, _e = (e, t) => {
|
|
142
|
+
Te(e, { iso: t });
|
|
143
|
+
}, oe = (e, t) => {
|
|
144
|
+
ae(t), b(t), Oe(e, { iso: t });
|
|
145
|
+
}, ce = () => {
|
|
146
|
+
ae(null);
|
|
147
|
+
}, { rangeStart: x, rangeEnd: V } = be(), Ce = (e) => !(!x || !V || e < x || e > V), le = [...Array(c)].map((e, t) => w(m + t));
|
|
148
|
+
return r.createElement(
|
|
149
|
+
"div",
|
|
150
|
+
{ className: "calendar", ref: te },
|
|
151
|
+
i && r.createElement(
|
|
152
|
+
"div",
|
|
153
|
+
{ className: "calendar__header" },
|
|
154
|
+
r.createElement(
|
|
155
|
+
"div",
|
|
156
|
+
{ className: "calendar__header--inner" },
|
|
157
|
+
r.createElement(de, { transparent: !0, size: "small", icon: "chevronLeft24", disabled: g && E() <= g, "aria-label": Z(h(w(m - 1))), onClick: () => N() }),
|
|
158
|
+
le.map((e, t) => r.createElement("h3", { key: t }, h(e))),
|
|
159
|
+
r.createElement(de, { transparent: !0, size: "small", icon: "chevronRight24", disabled: D && S() >= D, "aria-label": Z(h(w(m + c))), onClick: () => L() })
|
|
160
|
+
)
|
|
161
|
+
),
|
|
162
|
+
r.createElement("div", { className: "calendar__body" }, le.map((e, t) => {
|
|
163
|
+
const a = (e.getUTCDay() - pe + 7) % 7, s = e.getUTCFullYear(), f = e.getUTCMonth(), O = new Date(s, f + 1, 0).getDate(), Ue = [...Array(Math.ceil((a + O) / 7))];
|
|
164
|
+
return r.createElement(
|
|
165
|
+
"div",
|
|
166
|
+
{ key: t, className: "calendar__month" },
|
|
167
|
+
r.createElement(
|
|
168
|
+
"table",
|
|
169
|
+
{ onKeyDown: he },
|
|
170
|
+
r.createElement("caption", null, h(e)),
|
|
171
|
+
r.createElement(
|
|
172
|
+
"thead",
|
|
173
|
+
null,
|
|
174
|
+
r.createElement("tr", null, ke.map((M) => r.createElement("th", { key: M, scope: "col" }, M)))
|
|
175
|
+
),
|
|
176
|
+
r.createElement("tbody", null, Ue.map((M, Y) => {
|
|
177
|
+
let $ = Y * 7 - a + 1, P = $ + 6;
|
|
178
|
+
const W = [];
|
|
179
|
+
Y === 0 && a !== 0 ? ($ = 1, W.push(r.createElement("td", { key: "pre-column", colSpan: a }))) : P > O && (P = O);
|
|
180
|
+
for (let y = $; y <= P; y++) {
|
|
181
|
+
const o = d(new Date(Date.UTC(s, f, y))), j = o === T, z = Array.isArray(n) ? n.some((l) => l === o) : n === o, K = o === x, ie = Ce(o), q = o === V, C = _(o), U = [
|
|
182
|
+
"",
|
|
183
|
+
z && ge,
|
|
184
|
+
K && De,
|
|
185
|
+
!K && !q && ie && Ie,
|
|
186
|
+
q && we,
|
|
187
|
+
!u && j && Ee,
|
|
188
|
+
!u && C && Se
|
|
189
|
+
].filter((l) => typeof l != "boolean" || l !== !1), ue = !u && !C && B && B(o), ve = ue ? "a" : "span";
|
|
190
|
+
W.push(r.createElement("td", { key: y, className: me({
|
|
191
|
+
"calendar__cell--selected": z,
|
|
192
|
+
"calendar__range--start": K,
|
|
193
|
+
calendar__range: ie,
|
|
194
|
+
"calendar__range--end": q
|
|
195
|
+
}) }, u ? r.createElement("button", { disabled: C, "aria-label": U.length > 1 ? `${y}${U.join(X)}` : void 0, tabIndex: I !== o ? -1 : void 0, "aria-current": j ? "date" : void 0, "aria-pressed": z ? "true" : void 0, onClick: (l) => _e(l, o), onFocus: (l) => oe(l, o), onMouseOver: (l) => oe(l, o), onMouseOut: (l) => ce(), onBlur: () => ce(), "data-iso": o }, y) : r.createElement(
|
|
196
|
+
ve,
|
|
197
|
+
{ className: me({
|
|
198
|
+
"calendar__cell--disabled": C,
|
|
199
|
+
"calendar__cell--current": j
|
|
200
|
+
}), href: ue },
|
|
201
|
+
y,
|
|
202
|
+
U.length > 1 && r.createElement("span", { className: "clipped" }, U.join(X))
|
|
203
|
+
)));
|
|
204
|
+
}
|
|
205
|
+
return r.createElement("tr", { key: Y }, W);
|
|
206
|
+
}))
|
|
207
|
+
)
|
|
208
|
+
);
|
|
209
|
+
}))
|
|
210
|
+
);
|
|
211
|
+
};
|
|
212
|
+
export {
|
|
213
|
+
Ye as E,
|
|
214
|
+
Me as d,
|
|
215
|
+
d as t
|
|
216
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(t,u){let e;return(...c)=>{clearTimeout(e),e=setTimeout(()=>t(...c),u)}}exports.debounce=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react"),ne=require("react-remove-scroll"),_=require("classnames"),re=require("makeup-screenreader-trap"),ae=require("makeup-keyboard-trap"),G=require("./icon-DK6eEQD8.js"),oe=require("./icon-button-BB6GFLm7.js");function J(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const L=J(re),A=J(ae),F=({children:t,...e})=>n.createElement("h2",{...e},t),$=({children:t})=>n.createElement(n.Fragment,null,t),q=({children:t})=>n.createElement(n.Fragment,null,t);function ie({open:t,classPrefix:e,transitionElement:r,dialogRef:o,dialogWindowRef:d,enabled:u,onTransitionEnd:i}){const c=n.useRef(!0);n.useLayoutEffect(()=>{if(!u)return;let s=[d,o];r==="window"?s=[d]:r==="root"&&(s=[o]);let l;return t?l=ce({dialog:o,waitFor:s,classPrefix:e,onTransitionEnd:i}):c.current||(l=se({dialog:o,waitFor:s,classPrefix:e,onTransitionEnd:i})),c.current=!1,()=>{l&&l()}},[t,u])}function ce({dialog:t,waitFor:e,classPrefix:r,onTransitionEnd:o}){return M(t,e,`${r}--show`,o)}function se({dialog:t,waitFor:e,classPrefix:r,onTransitionEnd:o}){return M(t,e,`${r}--hide`,o)}function M(t,e,r,o){if(!t.current||!r)return;let d=0;const u=e?e.length:0,i=`${r}-init`;return t.current.classList.add(i),le(()=>{t.current&&(t.current.classList.add(r),t.current.classList.remove(i),e.forEach(c=>{const s=()=>{var l,f;++d===u&&((l=t.current)==null||l.classList.remove(r),o(),(f=c.current)==null||f.removeEventListener("transitionend",s))};c.current.addEventListener("transitionend",s,{once:!0})}))})}function le(t){let e,r;return window.requestAnimationFrame?(e=window.requestAnimationFrame(()=>{e=window.requestAnimationFrame(t)}),r=window.cancelAnimationFrame):(e=window.setTimeout(t,26),r=window.clearTimeout),()=>{e&&(r(e),e=void 0)}}const ue=({baseEl:t="div",classPrefix:e="drawer-dialog",windowClass:r,windowType:o,mainId:d,top:u,header:i,buttonPosition:c="right",children:s,ariaLabelledby:l,a11yCloseText:f,onCloseBtnClick:w=()=>{},footer:b,actions:g,onScroll:T,open:a=!1,onOpen:h=()=>{},onBackgroundClick:k=()=>{},ignoreEscape:Q,closeButton:U,previousButton:V,isModal:p,role:X="dialog",focus:O,transitionElement:Y,animated:S,closeButtonClass:Z,...C})=>{var K;const I=n.useRef(null),E=n.useRef(null),j=n.useRef(null),[x,P]=n.useState("");n.useEffect(()=>{P(G.randomId())},[]),n.useEffect(()=>{let m;const y=v=>{E.current&&!E.current.contains(v.target)&&k(v)};return a&&c!=="hidden"&&(m=window.setTimeout(()=>{document.addEventListener("click",y,!1)})),()=>{clearTimeout(m),document.removeEventListener("click",y,!1)}},[k,a]),n.useEffect(()=>(a&&p?(L.trap(E.current),A.trap(E.current)):(L.untrap(),A.untrap()),()=>{L.untrap(),A.untrap()}),[a,p]),ie({open:a,classPrefix:e,transitionElement:Y,dialogRef:I,dialogWindowRef:E,enabled:S,onTransitionEnd:()=>H(a)});const D=m=>{!Q&&m.key==="Escape"&&(m.stopPropagation(),w(m))};n.useEffect(()=>{S||H(a),a&&h()},[a]);function H(m){var y,v;if(m)return O?(y=O.current)==null||y.focus():p&&((v=j.current)==null||v.focus()),document.addEventListener("keydown",D,!1),()=>document.removeEventListener("keydown",D,!1)}const W=c!=="hidden"&&n.createElement("button",{ref:j,className:_("icon-btn",Z,`${e}__close`,{"icon-btn--transparent":e==="toast-dialog"}),type:"button","aria-label":f,onClick:w},U||n.createElement(G.EbayIcon,{name:"close16"})),ee=o?`${e}__${o}-window`:`${e}__window`,z=((K=i==null?void 0:i.props)==null?void 0:K.id)||`dialog-title-${x}`,te=l||z,B=i?n.cloneElement(i,{...i.props,id:z}):null;return n.createElement(t,{...C,"aria-labelledby":te,"aria-modal":"true",role:X,hidden:!a,className:_(e,C.className),"aria-live":p?void 0:"polite",ref:I,onKeyDown:D},n.createElement("div",{className:_(ee,r),ref:E},u,B&&n.createElement("div",{className:`${e}__header`},V,c==="right"&&B,c!=="bottom"&&W,(c==="left"||c==="hidden")&&B),n.createElement("div",{id:d,className:`${e}__main`,onScroll:T},s),g?n.createElement("div",{className:`${e}__actions`},g):null,b||c==="bottom"?n.createElement("div",{className:`${e}__footer`},b,c==="bottom"&&W):null))},de=({isModal:t,open:e,children:r,animated:o=!0,...d})=>{const u=t!==!1,i=n.Children.toArray(r),c=i.find(a=>a.type===F),s=i.find(a=>a.type===$),l=i.find(a=>a.type===N),f=i.find(a=>a.type===q),w=i.find(a=>a.type===R),b=i.filter(a=>![F,$,q,N,R].some(h=>h===a.type)),g=n.createElement(ue,{...d,open:e,isModal:u,header:c,footer:s,actions:l,closeButton:f,previousButton:w,animated:o},b);return o||e?u?n.createElement(ne.RemoveScroll,{enabled:e},g):g:null},N=({children:t})=>n.createElement(n.Fragment,null,t),R=({className:t,icon:e,...r})=>n.createElement(oe.EbayIconButton,{...r,icon:e||"chevronLeft16",className:_(t,"lightbox-dialog__prev")});exports.DialogBaseWithState=de;exports.EbayDialogActions=N;exports.EbayDialogCloseButton=q;exports.EbayDialogFooter=$;exports.EbayDialogHeader=F;exports.EbayDialogPreviousButton=R;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import o, { useRef as b, useLayoutEffect as ne, useState as re, useEffect as _, cloneElement as ae, Children as oe } from "react";
|
|
2
|
+
import { RemoveScroll as ie } from "react-remove-scroll";
|
|
3
|
+
import L from "classnames";
|
|
4
|
+
import * as F from "makeup-screenreader-trap";
|
|
5
|
+
import * as D from "makeup-keyboard-trap";
|
|
6
|
+
import { r as ce, E as se } from "./icon-B_a65KUD.mjs";
|
|
7
|
+
import { E as le } from "./icon-button-Dy8rjzH7.mjs";
|
|
8
|
+
const W = ({ children: t, ...e }) => o.createElement("h2", { ...e }, t), j = ({ children: t }) => o.createElement(o.Fragment, null, t), z = ({ children: t }) => o.createElement(o.Fragment, null, t);
|
|
9
|
+
function de({ open: t, classPrefix: e, transitionElement: r, dialogRef: i, dialogWindowRef: u, enabled: d, onTransitionEnd: a }) {
|
|
10
|
+
const c = b(!0);
|
|
11
|
+
ne(() => {
|
|
12
|
+
if (!d)
|
|
13
|
+
return;
|
|
14
|
+
let s = [u, i];
|
|
15
|
+
r === "window" ? s = [u] : r === "root" && (s = [i]);
|
|
16
|
+
let l;
|
|
17
|
+
return t ? l = ue({
|
|
18
|
+
dialog: i,
|
|
19
|
+
waitFor: s,
|
|
20
|
+
classPrefix: e,
|
|
21
|
+
onTransitionEnd: a
|
|
22
|
+
}) : c.current || (l = me({
|
|
23
|
+
dialog: i,
|
|
24
|
+
waitFor: s,
|
|
25
|
+
classPrefix: e,
|
|
26
|
+
onTransitionEnd: a
|
|
27
|
+
})), c.current = !1, () => {
|
|
28
|
+
l && l();
|
|
29
|
+
};
|
|
30
|
+
}, [t, d]);
|
|
31
|
+
}
|
|
32
|
+
function ue({ dialog: t, waitFor: e, classPrefix: r, onTransitionEnd: i }) {
|
|
33
|
+
return Q(t, e, `${r}--show`, i);
|
|
34
|
+
}
|
|
35
|
+
function me({ dialog: t, waitFor: e, classPrefix: r, onTransitionEnd: i }) {
|
|
36
|
+
return Q(t, e, `${r}--hide`, i);
|
|
37
|
+
}
|
|
38
|
+
function Q(t, e, r, i) {
|
|
39
|
+
if (!t.current || !r)
|
|
40
|
+
return;
|
|
41
|
+
let u = 0;
|
|
42
|
+
const d = e ? e.length : 0, a = `${r}-init`;
|
|
43
|
+
return t.current.classList.add(a), fe(() => {
|
|
44
|
+
t.current && (t.current.classList.add(r), t.current.classList.remove(a), e.forEach((c) => {
|
|
45
|
+
const s = () => {
|
|
46
|
+
var l, f;
|
|
47
|
+
++u === d && ((l = t.current) == null || l.classList.remove(r), i(), (f = c.current) == null || f.removeEventListener("transitionend", s));
|
|
48
|
+
};
|
|
49
|
+
c.current.addEventListener("transitionend", s, { once: !0 });
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function fe(t) {
|
|
54
|
+
let e, r;
|
|
55
|
+
return window.requestAnimationFrame ? (e = window.requestAnimationFrame(() => {
|
|
56
|
+
e = window.requestAnimationFrame(t);
|
|
57
|
+
}), r = window.cancelAnimationFrame) : (e = window.setTimeout(t, 26), r = window.clearTimeout), () => {
|
|
58
|
+
e && (r(e), e = void 0);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const Ee = ({ baseEl: t = "div", classPrefix: e = "drawer-dialog", windowClass: r, windowType: i, mainId: u, top: d, header: a, buttonPosition: c = "right", children: s, ariaLabelledby: l, a11yCloseText: f, onCloseBtnClick: y = () => {
|
|
62
|
+
}, footer: p, actions: g, onScroll: N, open: n = !1, onOpen: $ = () => {
|
|
63
|
+
}, onBackgroundClick: I = () => {
|
|
64
|
+
}, ignoreEscape: U, closeButton: V, previousButton: X, isModal: h, role: Y = "dialog", focus: T, transitionElement: Z, animated: k, closeButtonClass: M, ...C }) => {
|
|
65
|
+
var K;
|
|
66
|
+
const R = b(null), E = b(null), q = b(null), [x, P] = re("");
|
|
67
|
+
_(() => {
|
|
68
|
+
P(ce());
|
|
69
|
+
}, []), _(() => {
|
|
70
|
+
let m;
|
|
71
|
+
const w = (v) => {
|
|
72
|
+
E.current && !E.current.contains(v.target) && I(v);
|
|
73
|
+
};
|
|
74
|
+
return n && c !== "hidden" && (m = window.setTimeout(() => {
|
|
75
|
+
document.addEventListener("click", w, !1);
|
|
76
|
+
})), () => {
|
|
77
|
+
clearTimeout(m), document.removeEventListener("click", w, !1);
|
|
78
|
+
};
|
|
79
|
+
}, [I, n]), _(() => (n && h ? (F.trap(E.current), D.trap(E.current)) : (F.untrap(), D.untrap()), () => {
|
|
80
|
+
F.untrap(), D.untrap();
|
|
81
|
+
}), [n, h]), de({
|
|
82
|
+
open: n,
|
|
83
|
+
classPrefix: e,
|
|
84
|
+
transitionElement: Z,
|
|
85
|
+
dialogRef: R,
|
|
86
|
+
dialogWindowRef: E,
|
|
87
|
+
enabled: k,
|
|
88
|
+
onTransitionEnd: () => S(n)
|
|
89
|
+
});
|
|
90
|
+
const A = (m) => {
|
|
91
|
+
!U && m.key === "Escape" && (m.stopPropagation(), y(m));
|
|
92
|
+
};
|
|
93
|
+
_(() => {
|
|
94
|
+
k || S(n), n && $();
|
|
95
|
+
}, [n]);
|
|
96
|
+
function S(m) {
|
|
97
|
+
var w, v;
|
|
98
|
+
if (m)
|
|
99
|
+
return T ? (w = T.current) == null || w.focus() : h && ((v = q.current) == null || v.focus()), document.addEventListener("keydown", A, !1), () => document.removeEventListener("keydown", A, !1);
|
|
100
|
+
}
|
|
101
|
+
const H = c !== "hidden" && o.createElement("button", { ref: q, className: L("icon-btn", M, `${e}__close`, {
|
|
102
|
+
"icon-btn--transparent": e === "toast-dialog"
|
|
103
|
+
}), type: "button", "aria-label": f, onClick: y }, V || o.createElement(se, { name: "close16" })), ee = i ? `${e}__${i}-window` : `${e}__window`, O = ((K = a == null ? void 0 : a.props) == null ? void 0 : K.id) || `dialog-title-${x}`, te = l || O, B = a ? ae(a, { ...a.props, id: O }) : null;
|
|
104
|
+
return o.createElement(
|
|
105
|
+
t,
|
|
106
|
+
{ ...C, "aria-labelledby": te, "aria-modal": "true", role: Y, hidden: !n, className: L(e, C.className), "aria-live": h ? void 0 : "polite", ref: R, onKeyDown: A },
|
|
107
|
+
o.createElement(
|
|
108
|
+
"div",
|
|
109
|
+
{ className: L(ee, r), ref: E },
|
|
110
|
+
d,
|
|
111
|
+
B && o.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{ className: `${e}__header` },
|
|
114
|
+
X,
|
|
115
|
+
c === "right" && B,
|
|
116
|
+
c !== "bottom" && H,
|
|
117
|
+
(c === "left" || c === "hidden") && B
|
|
118
|
+
),
|
|
119
|
+
o.createElement("div", { id: u, className: `${e}__main`, onScroll: N }, s),
|
|
120
|
+
g ? o.createElement("div", { className: `${e}__actions` }, g) : null,
|
|
121
|
+
p || c === "bottom" ? o.createElement(
|
|
122
|
+
"div",
|
|
123
|
+
{ className: `${e}__footer` },
|
|
124
|
+
p,
|
|
125
|
+
c === "bottom" && H
|
|
126
|
+
) : null
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
}, he = ({ isModal: t, open: e, children: r, animated: i = !0, ...u }) => {
|
|
130
|
+
const d = t !== !1, a = oe.toArray(r), c = a.find((n) => n.type === W), s = a.find((n) => n.type === j), l = a.find((n) => n.type === G), f = a.find((n) => n.type === z), y = a.find((n) => n.type === J), p = a.filter((n) => ![
|
|
131
|
+
W,
|
|
132
|
+
j,
|
|
133
|
+
z,
|
|
134
|
+
G,
|
|
135
|
+
J
|
|
136
|
+
].some(($) => $ === n.type)), g = o.createElement(Ee, { ...u, open: e, isModal: d, header: c, footer: s, actions: l, closeButton: f, previousButton: y, animated: i }, p);
|
|
137
|
+
return i || e ? d ? o.createElement(ie, { enabled: e }, g) : g : null;
|
|
138
|
+
}, G = ({ children: t }) => o.createElement(o.Fragment, null, t), J = ({ className: t, icon: e, ...r }) => o.createElement(le, { ...r, icon: e || "chevronLeft16", className: L(t, "lightbox-dialog__prev") });
|
|
139
|
+
export {
|
|
140
|
+
he as D,
|
|
141
|
+
W as E,
|
|
142
|
+
j as a,
|
|
143
|
+
z as b,
|
|
144
|
+
G as c,
|
|
145
|
+
J as d
|
|
146
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react"),m=require("classnames"),i=require("./dialog-previous-button-7ePoYWyj.js");require("./icon-button-BB6GFLm7.js");const y=30,t="drawer-dialog",q=({expanded:l=!1,noHandle:T,onClose:d=()=>{},onCollapsed:D=()=>{},onExpanded:_=()=>{},a11yMaximizeText:b,a11yMinimizeText:p,children:H,...u})=>{let a=[];const[s,w]=o.useState(l);o.useEffect(()=>{w(l)},[l]);const c=e=>{w(e),e?_():D()},S=e=>{a=Array.from(e.changedTouches).map(({identifier:r,pageY:n})=>({identifier:r,pageY:n}))},h=e=>{Array.from(e.changedTouches).forEach(({identifier:r})=>{const n=a.findIndex(f=>f.identifier===r);n>-1&&a.splice(n,1)})},x=e=>{a.length&&Array.from(e.changedTouches).forEach(({identifier:r,pageY:n})=>{const f=a.findIndex($=>$.identifier===r),E=n-a[f].pageY;E>y?(s?c(!1):d(),h(e)):E<-y&&(c(!0),h(e))})},C=T?null:o.createElement("button",{"aria-label":s?p:b,className:`${t}__handle`,onClick:()=>c(!s),onScroll:()=>c(!0),onTouchStart:S,onTouchMove:x,onTouchEnd:h,type:"button"}),g=o.Children.toArray(H),k=g.find(({type:e})=>e===i.EbayDialogHeader),A=g.filter(({type:e})=>e!==i.EbayDialogHeader);return o.createElement(i.DialogBaseWithState,{...u,classPrefix:t,onCloseBtnClick:d,className:m(u.className,`${t}--mask-fade-slow`),windowClass:m(u.windowClass,`${t}__window`,`${t}__window--slide`,{[`${t}__window--expanded`]:s}),onBackgroundClick:d,top:C},k||o.createElement(i.EbayDialogHeader,null),A)};exports.EbayDrawerDialog=q;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import h, { useState as N, useEffect as B, Children as v } from "react";
|
|
2
|
+
import E from "classnames";
|
|
3
|
+
import { E as u, D as I } from "./dialog-previous-button-gmkm4c8J.mjs";
|
|
4
|
+
import "./icon-button-Dy8rjzH7.mjs";
|
|
5
|
+
const T = 30, t = "drawer-dialog", P = ({ expanded: r = !1, noHandle: g, onClose: i = () => {
|
|
6
|
+
}, onCollapsed: _ = () => {
|
|
7
|
+
}, onExpanded: y = () => {
|
|
8
|
+
}, a11yMaximizeText: x, a11yMinimizeText: S, children: C, ...l }) => {
|
|
9
|
+
let a = [];
|
|
10
|
+
const [s, m] = N(r);
|
|
11
|
+
B(() => {
|
|
12
|
+
m(r);
|
|
13
|
+
}, [r]);
|
|
14
|
+
const c = (e) => {
|
|
15
|
+
m(e), e ? y() : _();
|
|
16
|
+
}, D = (e) => {
|
|
17
|
+
a = Array.from(e.changedTouches).map(({ identifier: n, pageY: o }) => ({ identifier: n, pageY: o }));
|
|
18
|
+
}, d = (e) => {
|
|
19
|
+
Array.from(e.changedTouches).forEach(({ identifier: n }) => {
|
|
20
|
+
const o = a.findIndex((f) => f.identifier === n);
|
|
21
|
+
o > -1 && a.splice(o, 1);
|
|
22
|
+
});
|
|
23
|
+
}, b = (e) => {
|
|
24
|
+
a.length && Array.from(e.changedTouches).forEach(({ identifier: n, pageY: o }) => {
|
|
25
|
+
const f = a.findIndex(($) => $.identifier === n), p = o - a[f].pageY;
|
|
26
|
+
p > T ? (s ? c(!1) : i(), d(e)) : p < -T && (c(!0), d(e));
|
|
27
|
+
});
|
|
28
|
+
}, k = g ? null : h.createElement("button", { "aria-label": s ? S : x, className: `${t}__handle`, onClick: () => c(!s), onScroll: () => c(!0), onTouchStart: D, onTouchMove: b, onTouchEnd: d, type: "button" }), w = v.toArray(C), A = w.find(({ type: e }) => e === u), H = w.filter(({ type: e }) => e !== u);
|
|
29
|
+
return h.createElement(
|
|
30
|
+
I,
|
|
31
|
+
{ ...l, classPrefix: t, onCloseBtnClick: i, className: E(l.className, `${t}--mask-fade-slow`), windowClass: E(l.windowClass, `${t}__window`, `${t}__window--slide`, {
|
|
32
|
+
[`${t}__window--expanded`]: s
|
|
33
|
+
}), onBackgroundClick: i, top: k },
|
|
34
|
+
A || h.createElement(u, null),
|
|
35
|
+
H
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
P as E
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),d=require("classnames"),r=require("./dialog-previous-button-7ePoYWyj.js");require("./icon-button-BB6GFLm7.js");const u=require("./button-o4ao46WM.js"),a="alert-dialog",g=({a11yCloseText:l="Close Dialog",confirmText:n,onConfirm:s=()=>{},...o})=>{const t=e.useRef(null),c="alert-dialog-confirm",i="alert-dialog-main";return e.createElement(r.DialogBaseWithState,{focus:t,...o,a11yCloseText:l,role:"alertdialog",classPrefix:a,ignoreEscape:!0,mainId:i,buttonPosition:"hidden",className:d(o.className,`${a}--mask-fade`),windowClass:`${a}__window ${a}__window--fade`},o.children,e.createElement(r.EbayDialogFooter,null,e.createElement(u.EbayButton,{priority:"primary","aria-describedby":i,onClick:s,ref:t,id:c,className:"alert-dialog__acknowledge"},n)))};exports.EbayAlertDialog=g;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o, { useRef as c } from "react";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { D as d, a as f } from "./dialog-previous-button-gmkm4c8J.mjs";
|
|
4
|
+
import "./icon-button-Dy8rjzH7.mjs";
|
|
5
|
+
import { E as g } from "./button-B06HeRsZ.mjs";
|
|
6
|
+
const a = "alert-dialog", y = ({ a11yCloseText: t = "Close Dialog", confirmText: l, onConfirm: n = () => {
|
|
7
|
+
}, ...e }) => {
|
|
8
|
+
const i = c(null), s = "alert-dialog-confirm", r = "alert-dialog-main";
|
|
9
|
+
return o.createElement(
|
|
10
|
+
d,
|
|
11
|
+
{ focus: i, ...e, a11yCloseText: t, role: "alertdialog", classPrefix: a, ignoreEscape: !0, mainId: r, buttonPosition: "hidden", className: m(e.className, `${a}--mask-fade`), windowClass: `${a}__window ${a}__window--fade` },
|
|
12
|
+
e.children,
|
|
13
|
+
o.createElement(
|
|
14
|
+
f,
|
|
15
|
+
null,
|
|
16
|
+
o.createElement(g, { priority: "primary", "aria-describedby": r, onClick: n, ref: i, id: s, className: "alert-dialog__acknowledge" }, l)
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
y as EbayAlertDialog
|
|
22
|
+
};
|
package/ebay-badge.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./badge-CoHKfiPt.js");exports.EbayBadge=e.EbayBadge;
|
package/ebay-badge.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),v=require("classnames"),f=require("./icon-DK6eEQD8.js"),k=({a11yHeadingText:t="Page navigation",a11yHeadingTag:r="h2",id:i="ebay-breadcrumb",children:n=[],className:l,onSelect:s=()=>{},...a})=>{const c=`${i}-breadcrumbs-heading`,d=e.Children.count(n)-1,u=r,m=e.Children.toArray(n).some(o=>o.props.href)?"a":"button";return e.createElement("nav",{...a,"aria-labelledby":c,className:v("breadcrumbs",l),role:"navigation"},e.createElement(u,{id:c,className:"clipped"},t),e.createElement("ul",null,e.Children.map(n,(o,b)=>{const h=b===d,{href:g,children:y}=o.props,E={tag:m,isLastItem:h,href:g,children:y,onClick:p=>s(p)};return e.cloneElement(o,E)})))},C=({tag:t="button",isLastItem:r=!1,href:i,children:n,onClick:l,...s})=>{const a=t==="a",c={...s,...r?{"aria-current":"location"}:{},href:a?i:void 0,onClick:a?void 0:l};return e.createElement("li",null,e.createElement(t,{...c},n),!r&&e.createElement(f.EbayIcon,{name:"chevronRight12"}))};exports.EbayBreadcrumbItem=C;exports.EbayBreadcrumbs=k;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import e, { Children as m, cloneElement as f } from "react";
|
|
2
|
+
import v from "classnames";
|
|
3
|
+
import { E as k } from "./icon-B_a65KUD.mjs";
|
|
4
|
+
const N = ({ a11yHeadingText: n = "Page navigation", a11yHeadingTag: t = "h2", id: s = "ebay-breadcrumb", children: a = [], className: i, onSelect: l = () => {
|
|
5
|
+
}, ...r }) => {
|
|
6
|
+
const o = `${s}-breadcrumbs-heading`, d = m.count(a) - 1, u = t, b = m.toArray(a).some((c) => c.props.href) ? "a" : "button";
|
|
7
|
+
return e.createElement(
|
|
8
|
+
"nav",
|
|
9
|
+
{ ...r, "aria-labelledby": o, className: v("breadcrumbs", i), role: "navigation" },
|
|
10
|
+
e.createElement(u, { id: o, className: "clipped" }, n),
|
|
11
|
+
e.createElement("ul", null, m.map(a, (c, p) => {
|
|
12
|
+
const h = p === d, { href: E, children: g } = c.props;
|
|
13
|
+
return f(c, {
|
|
14
|
+
tag: b,
|
|
15
|
+
isLastItem: h,
|
|
16
|
+
href: E,
|
|
17
|
+
children: g,
|
|
18
|
+
onClick: (y) => l(y)
|
|
19
|
+
});
|
|
20
|
+
}))
|
|
21
|
+
);
|
|
22
|
+
}, P = ({ tag: n = "button", isLastItem: t = !1, href: s, children: a, onClick: i, ...l }) => {
|
|
23
|
+
const r = n === "a", o = {
|
|
24
|
+
...l,
|
|
25
|
+
...t ? { "aria-current": "location" } : {},
|
|
26
|
+
href: r ? s : void 0,
|
|
27
|
+
onClick: r ? void 0 : i
|
|
28
|
+
};
|
|
29
|
+
return e.createElement(
|
|
30
|
+
"li",
|
|
31
|
+
null,
|
|
32
|
+
e.createElement(n, { ...o }, a),
|
|
33
|
+
!t && e.createElement(k, { name: "chevronRight12" })
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
P as EbayBreadcrumbItem,
|
|
38
|
+
N as EbayBreadcrumbs
|
|
39
|
+
};
|
package/ebay-button.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./button-o4ao46WM.js");exports.EbayButton=t.EbayButton;exports.EbayButtonCell=t.EbayButtonCell;
|
package/ebay-button.mjs
ADDED
package/ebay-calendar.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./calendar-CPKqwJVQ.js");exports.EbayCalendar=e.EbayCalendar;
|