@ebay/ui-core-react 7.0.2 → 7.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/array.polyfill.flat-5BAolFdk.js +1 -0
- package/badge-CoHKfiPt.js +1 -0
- package/button-o4ao46WM.js +1 -0
- package/calendar-CPKqwJVQ.js +1 -0
- package/debounce-BQsYxxOL.js +1 -0
- package/dialog-previous-button-7ePoYWyj.js +1 -0
- package/drawer-BxxlJwkZ.js +1 -0
- package/ebay-alert-dialog.js +1 -0
- package/ebay-badge.js +1 -0
- package/ebay-breadcrumbs.js +1 -0
- package/ebay-button.js +1 -0
- package/ebay-calendar.js +1 -0
- package/ebay-carousel.js +1 -0
- package/ebay-checkbox.js +1 -0
- package/ebay-confirm-dialog.js +1 -0
- package/ebay-cta-button.js +1 -0
- package/ebay-date-textbox.js +1 -0
- package/ebay-dialog-base.js +1 -0
- package/ebay-drawer-dialog.js +1 -0
- package/ebay-eek.js +1 -0
- package/ebay-fake-menu-button.js +1 -0
- package/ebay-fake-menu.js +1 -0
- package/ebay-fake-tabs.js +1 -0
- package/ebay-field.js +1 -0
- package/ebay-fullscreen-dialog.js +1 -0
- package/ebay-icon-button.js +1 -0
- package/ebay-icon.js +1 -0
- package/ebay-infotip.js +1 -0
- package/ebay-inline-notice.js +1 -0
- package/ebay-lightbox-dialog.js +1 -0
- package/ebay-listbox-button.js +2 -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.js +1 -0
- package/ebay-notice-base.js +1 -0
- package/ebay-page-notice.js +1 -0
- package/ebay-pagination.js +1 -0
- package/ebay-panel-dialog.js +1 -0
- package/ebay-progress-bar.js +1 -0
- package/ebay-progress-spinner.js +1 -0
- package/ebay-progress-stepper.js +1 -0
- package/ebay-radio.js +1 -0
- package/ebay-section-notice.js +1 -0
- package/ebay-section-title/index.d.ts.map +1 -1
- package/ebay-section-title.js +1 -0
- package/ebay-select.js +1 -0
- package/ebay-signal.js +1 -0
- package/ebay-snackbar-dialog.js +1 -0
- package/ebay-split-button.js +1 -0
- package/ebay-star-rating-select.js +1 -0
- package/ebay-star-rating.js +1 -0
- package/ebay-svg.js +1 -0
- package/ebay-switch.js +1 -0
- package/ebay-tabs.js +1 -0
- package/ebay-textbox.js +1 -0
- package/ebay-toast-dialog.js +1 -0
- package/ebay-tooltip.js +1 -0
- package/ebay-tourtip.js +1 -0
- package/ebay-video.js +1 -0
- package/hooks-Ctier7Yv.js +1 -0
- package/icon-DK6eEQD8.js +1 -0
- package/icon-button-BB6GFLm7.js +1 -0
- package/index-DbjwTbDP.js +1 -0
- package/label-CnrpYJ-g.js +1 -0
- package/menu-DZU8jEPV.js +1 -0
- package/menu-button-label-BcgasGA4.js +1 -0
- package/menu-item-DBi1NcrM.js +1 -0
- package/notice-content-9iF4T8uB.js +1 -0
- package/notice-content-C0ZStfuX.js +1 -0
- package/notice-footer-Cw1DMzoB.js +1 -0
- package/package.json +19 -8
- package/progress-spinner-CDgxI8R_.js +1 -0
- package/range-DOsPN0h5.js +1 -0
- package/textbox-WnB-9F4y.js +1 -0
- package/use-tooltip-BavqG36Z.js +1 -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
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const ebay_dialog_base_1 = require("../ebay-dialog-base");
|
|
20
|
-
const classPrefix = 'panel-dialog';
|
|
21
|
-
const EbayPanelDialog = (_a) => {
|
|
22
|
-
var { open, animated, position = 'start', onClose = () => { }, className } = _a, rest = __rest(_a, ["open", "animated", "position", "onClose", "className"]);
|
|
23
|
-
return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({}, rest, { "aria-label": "Infotip", classPrefix: classPrefix, buttonPosition: "right", onCloseBtnClick: onClose, onBackgroundClick: onClose, animated: animated, className: (0, classnames_1.default)(className, { [`${classPrefix}--mask-fade-slow`]: animated }), windowClass: (0, classnames_1.default)(`${classPrefix}__window--slide`, {
|
|
24
|
-
[`${classPrefix}__window--end`]: position === 'end'
|
|
25
|
-
}), open: open })));
|
|
26
|
-
};
|
|
27
|
-
exports.default = EbayPanelDialog;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayProgressBar = void 0;
|
|
7
|
-
var progress_bar_1 = require("./progress-bar");
|
|
8
|
-
Object.defineProperty(exports, "EbayProgressBar", { enumerable: true, get: function () { return __importDefault(progress_bar_1).default; } });
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const EbayProgressBar = (_a) => {
|
|
20
|
-
var { value = 0, max = 100, fluid, className } = _a, rest = __rest(_a, ["value", "max", "fluid", "className"]);
|
|
21
|
-
return (react_1.default.createElement("progress", Object.assign({}, rest, { className: (0, classnames_1.default)('progress-bar', className, { 'progress-bar--fluid': fluid }), value: value, max: max })));
|
|
22
|
-
};
|
|
23
|
-
exports.default = EbayProgressBar;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayProgressSpinner = void 0;
|
|
7
|
-
var progress_spinner_1 = require("./progress-spinner");
|
|
8
|
-
Object.defineProperty(exports, "EbayProgressSpinner", { enumerable: true, get: function () { return __importDefault(progress_spinner_1).default; } });
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
20
|
-
const sizeClass = {
|
|
21
|
-
'default': '',
|
|
22
|
-
'small': 'progress-spinner--small',
|
|
23
|
-
'large': 'progress-spinner--large'
|
|
24
|
-
};
|
|
25
|
-
const iconName = {
|
|
26
|
-
'default': 'spinner24',
|
|
27
|
-
'small': 'spinner20',
|
|
28
|
-
'large': 'spinner30'
|
|
29
|
-
};
|
|
30
|
-
const EbayProgressSpinner = (_a) => {
|
|
31
|
-
var { size = 'default', 'aria-label': ariaLabel = 'Busy', className } = _a, rest = __rest(_a, ["size", 'aria-label', "className"]);
|
|
32
|
-
return (react_1.default.createElement("span", Object.assign({}, rest, { className: (0, classnames_1.default)('progress-spinner', sizeClass[size], className), "aria-label": ariaLabel, role: "img" }),
|
|
33
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: iconName[size] })));
|
|
34
|
-
};
|
|
35
|
-
exports.default = EbayProgressSpinner;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
43
|
-
const index_1 = require("./index");
|
|
44
|
-
const typeIcons = {
|
|
45
|
-
complete: 'stepperConfirmation24',
|
|
46
|
-
attention: 'stepperAttention24',
|
|
47
|
-
upcoming: 'stepperUpcoming24',
|
|
48
|
-
active: 'stepperConfirmation24'
|
|
49
|
-
};
|
|
50
|
-
const EbayProgressStep = (_a) => {
|
|
51
|
-
var { current, state = 'complete', children, className } = _a, rest = __rest(_a, ["current", "state", "children", "className"]);
|
|
52
|
-
const childrenArray = react_1.Children.toArray(children);
|
|
53
|
-
const title = childrenArray.find(child => child.type === index_1.EbayProgressTitle);
|
|
54
|
-
const text = childrenArray.filter(child => child.type !== index_1.EbayProgressTitle);
|
|
55
|
-
const stepClassNames = (0, classnames_1.default)(className, 'progress-stepper__item', { 'progress-stepper__item--attention': state === 'attention' });
|
|
56
|
-
const icon = typeIcons[state];
|
|
57
|
-
const ariaLabel = current ? 'current' : state;
|
|
58
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: stepClassNames, role: "listitem", "aria-current": current ? 'step' : undefined }),
|
|
59
|
-
react_1.default.createElement("div", { className: "progress-stepper__icon" }, icon && react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon, "aria-label": ariaLabel })),
|
|
60
|
-
react_1.default.createElement("div", { className: "progress-stepper__text" },
|
|
61
|
-
title,
|
|
62
|
-
text)));
|
|
63
|
-
};
|
|
64
|
-
exports.default = EbayProgressStep;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
-
const EbayProgressStepper = (_a) => {
|
|
43
|
-
var { direction = 'row', defaultState = 'active', children, className } = _a, rest = __rest(_a, ["direction", "defaultState", "children", "className"]);
|
|
44
|
-
const childrenArray = react_1.Children.toArray(children);
|
|
45
|
-
const currentIndex = currentIndexByDefaultState(childrenArray, defaultState);
|
|
46
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: (0, classnames_1.default)(className, 'progress-stepper', {
|
|
47
|
-
'progress-stepper--vertical': direction === 'column'
|
|
48
|
-
}) }),
|
|
49
|
-
react_1.default.createElement("div", { role: "list", className: "progress-stepper__items" }, childrenArray.map((child, index) => (react_1.default.createElement(react_1.Fragment, { key: index },
|
|
50
|
-
index > 0 && react_1.default.createElement("hr", { className: "progress-stepper__separator", role: "presentation" }),
|
|
51
|
-
(0, react_1.cloneElement)(child, Object.assign(Object.assign({ state: stepState(index, currentIndex) }, child.props), { current: currentIndex === index }))))))));
|
|
52
|
-
};
|
|
53
|
-
function currentIndexByDefaultState(steps, defaultState) {
|
|
54
|
-
const foundCurrentIndex = steps.findIndex(child => child.props.current);
|
|
55
|
-
if (foundCurrentIndex === -1) {
|
|
56
|
-
// eslint-disable-next-line default-case
|
|
57
|
-
switch (defaultState) {
|
|
58
|
-
case 'complete': return steps.length - 1;
|
|
59
|
-
case 'upcoming': return 0;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return foundCurrentIndex;
|
|
63
|
-
}
|
|
64
|
-
function stepState(stepIndex, currentIndex) {
|
|
65
|
-
if (stepIndex <= currentIndex)
|
|
66
|
-
return 'complete';
|
|
67
|
-
if (stepIndex > currentIndex)
|
|
68
|
-
return 'upcoming';
|
|
69
|
-
}
|
|
70
|
-
exports.default = EbayProgressStepper;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const EbayProgressTitle = ({ as: TitleComponent = 'h4', children }) => (0, react_1.createElement)(TitleComponent, {}, children);
|
|
5
|
-
exports.default = EbayProgressTitle;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayProgressTitle = exports.EbayProgressStep = exports.EbayProgressStepper = void 0;
|
|
7
|
-
var ebay_progress_stepper_1 = require("./ebay-progress-stepper");
|
|
8
|
-
Object.defineProperty(exports, "EbayProgressStepper", { enumerable: true, get: function () { return __importDefault(ebay_progress_stepper_1).default; } });
|
|
9
|
-
var ebay_progress_step_1 = require("./ebay-progress-step");
|
|
10
|
-
Object.defineProperty(exports, "EbayProgressStep", { enumerable: true, get: function () { return __importDefault(ebay_progress_step_1).default; } });
|
|
11
|
-
var ebay_progress_title_1 = require("./ebay-progress-title");
|
|
12
|
-
Object.defineProperty(exports, "EbayProgressTitle", { enumerable: true, get: function () { return __importDefault(ebay_progress_title_1).default; } });
|
package/ebay-radio/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayRadio = void 0;
|
|
7
|
-
var radio_1 = require("./radio");
|
|
8
|
-
Object.defineProperty(exports, "EbayRadio", { enumerable: true, get: function () { return __importDefault(radio_1).default; } });
|
package/ebay-radio/radio.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
43
|
-
const ebay_field_1 = require("../ebay-field");
|
|
44
|
-
const EbayRadio = (_a) => {
|
|
45
|
-
var { size = 'default', checked, defaultChecked, className, style, id, onChange = () => { }, onFocus = () => { }, onKeyDown = () => { }, children } = _a, rest = __rest(_a, ["size", "checked", "defaultChecked", "className", "style", "id", "onChange", "onFocus", "onKeyDown", "children"]);
|
|
46
|
-
const handleChange = (e) => { var _a; return onChange(e, { value: (_a = e.target) === null || _a === void 0 ? void 0 : _a.value }); };
|
|
47
|
-
const handleFocus = (e) => { var _a; return onFocus(e, { value: (_a = e.target) === null || _a === void 0 ? void 0 : _a.value }); };
|
|
48
|
-
const handleKeyDown = (e) => {
|
|
49
|
-
const radioButton = e.target;
|
|
50
|
-
return onKeyDown(e, { value: radioButton === null || radioButton === void 0 ? void 0 : radioButton.value });
|
|
51
|
-
};
|
|
52
|
-
const containerClass = (0, classnames_1.default)('radio', className, { 'radio--large': size === 'large' });
|
|
53
|
-
const iconChecked = size === 'large' ?
|
|
54
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioChecked24", className: "radio__checked" }) :
|
|
55
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioChecked18", className: "radio__checked" });
|
|
56
|
-
const iconUnChecked = size === 'large' ?
|
|
57
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioUnchecked24", className: "radio__unchecked" }) :
|
|
58
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioUnchecked18", className: "radio__unchecked" });
|
|
59
|
-
const childrenArray = react_1.Children.toArray(children);
|
|
60
|
-
const ebayLabel = childrenArray.find(child => child.type === ebay_field_1.EbayLabel);
|
|
61
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
62
|
-
react_1.default.createElement("span", { className: containerClass, style: Object.assign(Object.assign({}, style), { alignItems: 'center' }) },
|
|
63
|
-
react_1.default.createElement("input", Object.assign({}, rest, { id: id, className: "radio__control", type: "radio", defaultChecked: defaultChecked, checked: checked, onChange: handleChange, onFocus: handleFocus, onKeyDown: handleKeyDown })),
|
|
64
|
-
react_1.default.createElement("span", { className: "radio__icon", hidden: true },
|
|
65
|
-
iconChecked,
|
|
66
|
-
iconUnChecked)),
|
|
67
|
-
ebayLabel ?
|
|
68
|
-
(0, react_1.cloneElement)(ebayLabel, Object.assign(Object.assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
|
|
69
|
-
children));
|
|
70
|
-
};
|
|
71
|
-
exports.default = EbayRadio;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayNoticeContent = exports.EbaySectionNoticeFooter = exports.EbaySectionNoticeTitle = exports.EbaySectionNotice = void 0;
|
|
7
|
-
var section_notice_1 = require("./section-notice");
|
|
8
|
-
Object.defineProperty(exports, "EbaySectionNotice", { enumerable: true, get: function () { return __importDefault(section_notice_1).default; } });
|
|
9
|
-
var section_notice_title_1 = require("./section-notice-title");
|
|
10
|
-
Object.defineProperty(exports, "EbaySectionNoticeTitle", { enumerable: true, get: function () { return __importDefault(section_notice_title_1).default; } });
|
|
11
|
-
var section_notice_footer_1 = require("./section-notice-footer");
|
|
12
|
-
Object.defineProperty(exports, "EbaySectionNoticeFooter", { enumerable: true, get: function () { return __importDefault(section_notice_footer_1).default; } });
|
|
13
|
-
var ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
14
|
-
Object.defineProperty(exports, "EbayNoticeContent", { enumerable: true, get: function () { return ebay_notice_content_1.EbayNoticeContent; } });
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const notice_footer_1 = __importDefault(require("../common/notice-utils/notice-footer"));
|
|
8
|
-
const EbaySectionNoticeFooter = ({ className, children }) => (react_1.default.createElement(notice_footer_1.default, { className: className, type: "section" }, children));
|
|
9
|
-
exports.default = EbaySectionNoticeFooter;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const notice_title_1 = __importDefault(require("../common/notice-utils/notice-title"));
|
|
19
|
-
const EbaySectionNoticeTitle = (_a) => {
|
|
20
|
-
var { className, as, children } = _a, rest = __rest(_a, ["className", "as", "children"]);
|
|
21
|
-
return (react_1.default.createElement(notice_title_1.default, Object.assign({}, rest, { className: className, as: as, type: "section" }), children));
|
|
22
|
-
};
|
|
23
|
-
exports.default = EbaySectionNoticeTitle;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
-
const ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
43
|
-
const notice_content_1 = __importDefault(require("../common/notice-utils/notice-content"));
|
|
44
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
45
|
-
const index_1 = require("./index");
|
|
46
|
-
const EbaySectionNotice = (_a) => {
|
|
47
|
-
var { status = 'general', children, className, 'aria-label': ariaLabel, 'aria-roledescription': ariaRoleDescription = 'Notice', a11yDismissText, educationIcon, iconClass, prominent, onDismiss = () => { } } = _a, rest = __rest(_a, ["status", "children", "className", 'aria-label', 'aria-roledescription', "a11yDismissText", "educationIcon", "iconClass", "prominent", "onDismiss"]);
|
|
48
|
-
const [dismissed, setDismissed] = (0, react_1.useState)(false);
|
|
49
|
-
const childrenArray = react_1.default.Children.toArray(children);
|
|
50
|
-
const content = childrenArray.find(({ type }) => type === ebay_notice_content_1.EbayNoticeContent);
|
|
51
|
-
const hasStatus = status !== 'general' && status !== 'none';
|
|
52
|
-
const isEducational = status === 'education';
|
|
53
|
-
let iconName = null;
|
|
54
|
-
if (hasStatus) {
|
|
55
|
-
if (isEducational) {
|
|
56
|
-
iconName = educationIcon || 'lightbulb24';
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
iconName = `${status}Filled16`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if (!content) {
|
|
63
|
-
throw new Error(`EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice`);
|
|
64
|
-
}
|
|
65
|
-
const handleDismissed = (event) => {
|
|
66
|
-
setDismissed(true);
|
|
67
|
-
onDismiss(event);
|
|
68
|
-
};
|
|
69
|
-
return dismissed ? null : (react_1.default.createElement("section", Object.assign({}, rest, { className: (0, classnames_1.default)(className, `section-notice`, {
|
|
70
|
-
[`section-notice--${status}`]: hasStatus,
|
|
71
|
-
'section-notice--education': isEducational && prominent,
|
|
72
|
-
'section-notice--large-icon': isEducational
|
|
73
|
-
}), role: "region", "aria-label": !hasStatus ? ariaLabel : null, "aria-labelledby": hasStatus ? `section-notice-${status}` : null, "aria-roledescription": ariaRoleDescription }),
|
|
74
|
-
iconName && (react_1.default.createElement("div", { className: "section-notice__header", id: `section-notice-${status}` },
|
|
75
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { className: iconClass, name: iconName, a11yText: ariaLabel, a11yVariant: "label" }))),
|
|
76
|
-
react_1.default.createElement(notice_content_1.default, Object.assign({}, content.props, { type: "section" })),
|
|
77
|
-
children,
|
|
78
|
-
a11yDismissText && (react_1.default.createElement(index_1.EbaySectionNoticeFooter, null,
|
|
79
|
-
react_1.default.createElement("button", { "aria-label": a11yDismissText, className: "fake-link page-notice__dismiss", onClick: handleDismissed },
|
|
80
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "close16" }))))));
|
|
81
|
-
};
|
|
82
|
-
exports.default = EbaySectionNotice;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const Cta = (_a) => {
|
|
20
|
-
var { ctaText, href, className } = _a, rest = __rest(_a, ["ctaText", "href", "className"]);
|
|
21
|
-
if (!ctaText) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
return (react_1.default.createElement("a", Object.assign({}, rest, { className: (0, classnames_1.default)('section-title__cta', className), href: href }), ctaText));
|
|
25
|
-
};
|
|
26
|
-
exports.default = Cta;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbaySectionTitleOverflow = exports.EbaySectionTitleInfo = exports.EbaySectionTitleSubtitle = exports.EbaySectionTitleTitle = exports.EbaySectionTitle = void 0;
|
|
7
|
-
var section_title_1 = require("./section-title");
|
|
8
|
-
Object.defineProperty(exports, "EbaySectionTitle", { enumerable: true, get: function () { return __importDefault(section_title_1).default; } });
|
|
9
|
-
var title_1 = require("./title");
|
|
10
|
-
Object.defineProperty(exports, "EbaySectionTitleTitle", { enumerable: true, get: function () { return __importDefault(title_1).default; } });
|
|
11
|
-
var subtitle_1 = require("./subtitle");
|
|
12
|
-
Object.defineProperty(exports, "EbaySectionTitleSubtitle", { enumerable: true, get: function () { return __importDefault(subtitle_1).default; } });
|
|
13
|
-
var info_1 = require("./info");
|
|
14
|
-
Object.defineProperty(exports, "EbaySectionTitleInfo", { enumerable: true, get: function () { return __importDefault(info_1).default; } });
|
|
15
|
-
var overflow_1 = require("./overflow");
|
|
16
|
-
Object.defineProperty(exports, "EbaySectionTitleOverflow", { enumerable: true, get: function () { return __importDefault(overflow_1).default; } });
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const Info = (_a) => {
|
|
20
|
-
var { className, children } = _a, rest = __rest(_a, ["className", "children"]);
|
|
21
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: (0, classnames_1.default)(className, 'section-title__info') }), children));
|
|
22
|
-
};
|
|
23
|
-
exports.default = Info;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const Overflow = (_a) => {
|
|
20
|
-
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
21
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: (0, classnames_1.default)(className, 'section-title__overflow') }), children));
|
|
22
|
-
};
|
|
23
|
-
exports.default = Overflow;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const component_utils_1 = require("../common/component-utils");
|
|
20
|
-
const index_1 = require("./index");
|
|
21
|
-
const cta_1 = __importDefault(require("./cta"));
|
|
22
|
-
const EbaySectionTitle = (_a) => {
|
|
23
|
-
var { href, ctaText, className, children } = _a, rest = __rest(_a, ["href", "ctaText", "className", "children"]);
|
|
24
|
-
const sectionTitleClass = (0, classnames_1.default)(className, 'section-title');
|
|
25
|
-
const title = (0, component_utils_1.findComponent)(children, index_1.EbaySectionTitleTitle);
|
|
26
|
-
const subtitle = (0, component_utils_1.findComponent)(children, index_1.EbaySectionTitleSubtitle);
|
|
27
|
-
const info = (0, component_utils_1.findComponent)(children, index_1.EbaySectionTitleInfo);
|
|
28
|
-
const overflow = (0, component_utils_1.findComponent)(children, index_1.EbaySectionTitleOverflow);
|
|
29
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: sectionTitleClass }),
|
|
30
|
-
react_1.default.createElement("div", { className: "section-title__title-container" },
|
|
31
|
-
title || react_1.default.createElement(index_1.EbaySectionTitleTitle, null, children),
|
|
32
|
-
subtitle),
|
|
33
|
-
href && react_1.default.createElement(cta_1.default, { href: href, ctaText: ctaText }) || info || overflow));
|
|
34
|
-
};
|
|
35
|
-
exports.default = EbaySectionTitle;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
19
|
-
const Subtitle = (_a) => {
|
|
20
|
-
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
21
|
-
return (react_1.default.createElement("span", Object.assign({}, rest, { className: (0, classnames_1.default)(className, 'section-title__subtitle') }), children));
|
|
22
|
-
};
|
|
23
|
-
exports.default = Subtitle;
|