@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
package/ebay-field/field.js
DELETED
|
@@ -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
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
-
const Field = ({ className, layout = 'inline', children }) => {
|
|
9
|
-
const WrapperElement = layout === 'block' ? 'div' : 'span';
|
|
10
|
-
return (react_1.default.createElement(WrapperElement, { className: (0, classnames_1.default)('field', className) }, children));
|
|
11
|
-
};
|
|
12
|
-
exports.default = Field;
|
package/ebay-field/index.js
DELETED
|
@@ -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.EbayFieldDescription = exports.EbayLabel = exports.EbayField = void 0;
|
|
7
|
-
var field_1 = require("./field");
|
|
8
|
-
Object.defineProperty(exports, "EbayField", { enumerable: true, get: function () { return __importDefault(field_1).default; } });
|
|
9
|
-
var label_1 = require("./label");
|
|
10
|
-
Object.defineProperty(exports, "EbayLabel", { enumerable: true, get: function () { return __importDefault(label_1).default; } });
|
|
11
|
-
var description_1 = require("./description");
|
|
12
|
-
Object.defineProperty(exports, "EbayFieldDescription", { enumerable: true, get: function () { return __importDefault(description_1).default; } });
|
package/ebay-field/label.js
DELETED
|
@@ -1,29 +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 Label = (_a) => {
|
|
20
|
-
var { className, children, stacked = false, required = false, position = 'start' } = _a, rest = __rest(_a, ["className", "children", "stacked", "required", "position"]);
|
|
21
|
-
const wrapperClassName = (0, classnames_1.default)(`field__label`, className, { 'field__label--stacked': stacked }, { 'field__label--end': position === 'end' });
|
|
22
|
-
const requiredMark = required ? react_1.default.createElement(react_1.default.Fragment, null,
|
|
23
|
-
" ",
|
|
24
|
-
react_1.default.createElement("sup", null, "*")) : null;
|
|
25
|
-
return react_1.default.createElement("label", Object.assign({ className: wrapperClassName }, rest),
|
|
26
|
-
children,
|
|
27
|
-
requiredMark);
|
|
28
|
-
};
|
|
29
|
-
exports.default = Label;
|
package/ebay-field/types.js
DELETED
|
@@ -1,25 +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 = 'fullscreen-dialog';
|
|
21
|
-
const EbayFullscreenDialog = (_a) => {
|
|
22
|
-
var { open, onClose = () => { }, className, animated } = _a, rest = __rest(_a, ["open", "onClose", "className", "animated"]);
|
|
23
|
-
return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({}, rest, { classPrefix: classPrefix, buttonPosition: "right", onCloseBtnClick: onClose, transitionElement: "window", animated: animated, className: (0, classnames_1.default)(className, `${classPrefix}--mask-fade-slow`), windowClass: (0, classnames_1.default)(`${classPrefix}__window`, `${classPrefix}__window--slide`), open: open })));
|
|
24
|
-
};
|
|
25
|
-
exports.default = EbayFullscreenDialog;
|
|
@@ -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.EbayFullscreenDialog = void 0;
|
|
7
|
-
var fullscreen_dialog_1 = require("./fullscreen-dialog");
|
|
8
|
-
Object.defineProperty(exports, "EbayFullscreenDialog", { enumerable: true, get: function () { return __importDefault(fullscreen_dialog_1).default; } });
|
package/ebay-icon/icon.js
DELETED
|
@@ -1,98 +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 component_utils_1 = require("../common/component-utils");
|
|
43
|
-
const random_id_1 = require("../common/random-id");
|
|
44
|
-
const EbayIcon = (_a) => {
|
|
45
|
-
var { name, className: extraClass, noSkinClasses = false, a11yText, a11yVariant, forwardedRef } = _a, rest = __rest(_a, ["name", "className", "noSkinClasses", "a11yText", "a11yVariant", "forwardedRef"]);
|
|
46
|
-
const [rId, setRandomId] = (0, react_1.useState)('');
|
|
47
|
-
(0, react_1.useEffect)(() => {
|
|
48
|
-
setRandomId((0, random_id_1.randomId)());
|
|
49
|
-
}, []);
|
|
50
|
-
const withAriaLabel = a11yVariant === 'label';
|
|
51
|
-
const a11yTextId = a11yText && `icon-title-${rId}`;
|
|
52
|
-
const a11yProps = a11yText ? {
|
|
53
|
-
'aria-labelledby': withAriaLabel ? undefined : a11yTextId,
|
|
54
|
-
'aria-label': withAriaLabel ? a11yText : undefined,
|
|
55
|
-
role: 'img'
|
|
56
|
-
} : {
|
|
57
|
-
'aria-hidden': true
|
|
58
|
-
};
|
|
59
|
-
const kebabName = kebabCased(name);
|
|
60
|
-
const size = getIconSize(kebabName) || kebabName;
|
|
61
|
-
const skinClassName = [`icon`, `icon--${size}`, getFilledIconName(kebabName)].filter(Boolean).join(' ');
|
|
62
|
-
const className = (0, classnames_1.default)(extraClass, { [skinClassName]: !noSkinClasses });
|
|
63
|
-
return (react_1.default.createElement("svg", Object.assign({}, rest, { className: className, xmlns: "http://www.w3.org/2000/svg", focusable: false, ref: forwardedRef }, a11yProps),
|
|
64
|
-
a11yText && !withAriaLabel && react_1.default.createElement("title", { id: a11yTextId }, a11yText),
|
|
65
|
-
react_1.default.createElement("use", { xlinkHref: `#icon-${kebabName}` })));
|
|
66
|
-
};
|
|
67
|
-
// This function extract the size of the icon name.
|
|
68
|
-
// The icon can have these name structures:
|
|
69
|
-
// - icon-name-24
|
|
70
|
-
// - icon-name-24-colored
|
|
71
|
-
// - icon-name-filled-24
|
|
72
|
-
// - icon-name-filled-24-colored
|
|
73
|
-
// - icon-name
|
|
74
|
-
function getIconSize(iconName) {
|
|
75
|
-
const iconNameArray = iconName.split('-');
|
|
76
|
-
const size = iconNameArray[iconNameArray.length - 1];
|
|
77
|
-
if (size === 'colored') {
|
|
78
|
-
return iconNameArray[iconNameArray.length - 2];
|
|
79
|
-
}
|
|
80
|
-
if (isNaN(Number(size))) {
|
|
81
|
-
return '';
|
|
82
|
-
}
|
|
83
|
-
return size;
|
|
84
|
-
}
|
|
85
|
-
function getFilledIconName(iconName) {
|
|
86
|
-
const iconNameArray = iconName.split('-');
|
|
87
|
-
const filledIndex = iconNameArray.indexOf('filled');
|
|
88
|
-
if (filledIndex === -1) {
|
|
89
|
-
return '';
|
|
90
|
-
}
|
|
91
|
-
return `icon--${iconNameArray.slice(0, filledIndex + 1).join('-')}`;
|
|
92
|
-
}
|
|
93
|
-
function kebabCased(str) {
|
|
94
|
-
return str
|
|
95
|
-
.replace(/([0-9]+)/g, (s, n) => `-${n}`)
|
|
96
|
-
.replace(/([A-Z])/g, (s, c) => `-${c.toLowerCase()}`);
|
|
97
|
-
}
|
|
98
|
-
exports.default = (0, component_utils_1.withForwardRef)(EbayIcon);
|
package/ebay-icon/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.EbayIcon = void 0;
|
|
7
|
-
var icon_1 = require("./icon");
|
|
8
|
-
Object.defineProperty(exports, "EbayIcon", { enumerable: true, get: function () { return __importDefault(icon_1).default; } });
|
package/ebay-icon/types.js
DELETED
|
@@ -1,40 +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 ebay_badge_1 = require("../ebay-badge");
|
|
21
|
-
const component_utils_1 = require("../common/component-utils");
|
|
22
|
-
const EbayIconButton = (_a) => {
|
|
23
|
-
var { href, icon, badgeNumber, badgeAriaLabel, transparent, className: extraClasses, forwardedRef, size, onEscape = () => { }, onKeyDown = () => { } } = _a, rest = __rest(_a, ["href", "icon", "badgeNumber", "badgeAriaLabel", "transparent", "className", "forwardedRef", "size", "onEscape", "onKeyDown"]);
|
|
24
|
-
const classPrefix = href ? 'icon-link' : 'icon-btn';
|
|
25
|
-
const className = (0, classnames_1.default)(extraClasses, classPrefix, size && `${classPrefix}--${size}`, {
|
|
26
|
-
[`${classPrefix}--badged`]: badgeNumber,
|
|
27
|
-
[`${classPrefix}--transparent`]: transparent
|
|
28
|
-
});
|
|
29
|
-
const children = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
30
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon }),
|
|
31
|
-
badgeNumber && react_1.default.createElement(ebay_badge_1.EbayBadge, { type: "icon", number: badgeNumber, "aria-label": badgeAriaLabel })));
|
|
32
|
-
const keyDownHandler = (e) => {
|
|
33
|
-
if (e.key === 'Escape' || e.key === 'Esc') {
|
|
34
|
-
onEscape(e);
|
|
35
|
-
}
|
|
36
|
-
onKeyDown(e);
|
|
37
|
-
};
|
|
38
|
-
return href ? (react_1.default.createElement("a", Object.assign({ ref: forwardedRef, className: className, href: href, onKeyDown: keyDownHandler }, rest), children)) : (react_1.default.createElement("button", Object.assign({ ref: forwardedRef, type: "button", className: className, onKeyDown: keyDownHandler }, rest), children));
|
|
39
|
-
};
|
|
40
|
-
exports.default = (0, component_utils_1.withForwardRef)(EbayIconButton);
|
|
@@ -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.EbayIconButton = void 0;
|
|
7
|
-
var icon_button_1 = require("./icon-button");
|
|
8
|
-
Object.defineProperty(exports, "EbayIconButton", { enumerable: true, get: function () { return __importDefault(icon_button_1).default; } });
|
|
@@ -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
|
-
/**
|
|
7
|
-
* This Component is used only for finding it as a child of EbayInfotip
|
|
8
|
-
* and pass the properties to TooltipContent
|
|
9
|
-
*/
|
|
10
|
-
const react_1 = __importDefault(require("react"));
|
|
11
|
-
const EbayInfotipContent = ({ children }) => react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
12
|
-
exports.default = EbayInfotipContent;
|
|
@@ -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 EbayTooltipHeading = (_a) => {
|
|
20
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
21
|
-
return (react_1.default.createElement("span", Object.assign({}, props, { className: (0, classnames_1.default)('infotip__heading', className) })));
|
|
22
|
-
};
|
|
23
|
-
exports.default = EbayTooltipHeading;
|
|
@@ -1,28 +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 dedupe_1 = __importDefault(require("classnames/dedupe"));
|
|
19
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
20
|
-
const forwardRef_1 = require("../common/component-utils/forwardRef");
|
|
21
|
-
const EbayInfotipHost = (_a) => {
|
|
22
|
-
var { icon, className, children, forwardedRef, variant } = _a, rest = __rest(_a, ["icon", "className", "children", "forwardedRef", "variant"]);
|
|
23
|
-
const classPrefix = variant === 'modal' ? 'dialog--mini' : 'infotip';
|
|
24
|
-
const buttonIcon = react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon });
|
|
25
|
-
const buttonContent = children instanceof Function ? children({ icon: buttonIcon }) : children;
|
|
26
|
-
return (react_1.default.createElement("button", Object.assign({}, rest, { className: (0, dedupe_1.default)('icon-btn icon-btn--transparent', className, `${classPrefix}__host`), type: "button", ref: forwardedRef }), buttonContent || buttonIcon));
|
|
27
|
-
};
|
|
28
|
-
exports.default = (0, forwardRef_1.withForwardRef)(EbayInfotipHost);
|
|
@@ -1,79 +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 component_utils_1 = require("../common/component-utils");
|
|
43
|
-
const tooltip_utils_1 = require("../common/tooltip-utils");
|
|
44
|
-
const ebay_drawer_dialog_1 = require("../ebay-drawer-dialog");
|
|
45
|
-
const ebay_dialog_base_1 = require("../ebay-dialog-base");
|
|
46
|
-
const ebay_infotip_host_1 = __importDefault(require("./ebay-infotip-host"));
|
|
47
|
-
const index_1 = require("./index");
|
|
48
|
-
const EbayInfotip = ({ variant = 'default', pointer, overlayStyle, disabled, onExpand, onCollapse, children, initialExpanded, icon = 'information16', a11yCloseText, 'aria-label': ariaLabel, className, a11yMaximizeText, a11yMinimizeText }) => {
|
|
49
|
-
const buttonRef = (0, react_1.useRef)();
|
|
50
|
-
const { isExpanded, expandTooltip, collapseTooltip } = (0, tooltip_utils_1.useTooltip)({ onCollapse, onExpand, initialExpanded, hostRef: buttonRef });
|
|
51
|
-
const isModal = variant === 'modal';
|
|
52
|
-
const containerRef = (0, react_1.useRef)();
|
|
53
|
-
const heading = (0, component_utils_1.findComponent)(children, index_1.EbayInfotipHeading);
|
|
54
|
-
const content = (0, component_utils_1.findComponent)(children, index_1.EbayInfotipContent);
|
|
55
|
-
const button = (0, component_utils_1.findComponent)(children, ebay_infotip_host_1.default) || (0, react_1.createElement)(ebay_infotip_host_1.default);
|
|
56
|
-
const toggleTooltip = () => {
|
|
57
|
-
if (isExpanded) {
|
|
58
|
-
collapseTooltip();
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
expandTooltip();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
if (!content) {
|
|
65
|
-
throw new Error(`EbayInfotip: Please use a EbayInfotipContent that defines the content of the infotip`);
|
|
66
|
-
}
|
|
67
|
-
const _a = content.props, { children: contentChildren } = _a, contentProps = __rest(_a, ["children"]);
|
|
68
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
69
|
-
react_1.default.createElement(tooltip_utils_1.Tooltip, { type: "infotip", isExpanded: isExpanded, className: (0, classnames_1.default)(className, { 'dialog--mini': isModal }), ref: containerRef },
|
|
70
|
-
react_1.default.createElement(tooltip_utils_1.TooltipHost, null, (0, react_1.cloneElement)(button, Object.assign({ ref: buttonRef, onClick: toggleTooltip, disabled,
|
|
71
|
-
variant, 'aria-label': ariaLabel, 'aria-expanded': isExpanded, icon }, button.props))),
|
|
72
|
-
!isModal && (react_1.default.createElement(tooltip_utils_1.TooltipContent, Object.assign({}, contentProps, { type: "infotip", style: overlayStyle, pointer: pointer, showCloseButton: true, a11yCloseText: a11yCloseText, onClose: collapseTooltip }),
|
|
73
|
-
heading,
|
|
74
|
-
contentChildren))),
|
|
75
|
-
isModal && (react_1.default.createElement(ebay_drawer_dialog_1.EbayDrawerDialog, Object.assign({}, contentProps, { open: isExpanded, onClose: collapseTooltip, a11yCloseText: a11yCloseText, className: "dialog--mini__overlay", a11yMaximizeText: a11yMaximizeText, a11yMinimizeText: a11yMinimizeText }),
|
|
76
|
-
react_1.default.createElement(ebay_dialog_base_1.EbayDialogHeader, null, heading),
|
|
77
|
-
contentChildren))));
|
|
78
|
-
};
|
|
79
|
-
exports.default = EbayInfotip;
|
package/ebay-infotip/index.js
DELETED
|
@@ -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.EbayInfotipContent = exports.EbayInfotipHeading = exports.EbayInfotipHost = exports.EbayInfotip = void 0;
|
|
7
|
-
var ebay_infotip_1 = require("./ebay-infotip");
|
|
8
|
-
Object.defineProperty(exports, "EbayInfotip", { enumerable: true, get: function () { return __importDefault(ebay_infotip_1).default; } });
|
|
9
|
-
var ebay_infotip_host_1 = require("./ebay-infotip-host");
|
|
10
|
-
Object.defineProperty(exports, "EbayInfotipHost", { enumerable: true, get: function () { return __importDefault(ebay_infotip_host_1).default; } });
|
|
11
|
-
var ebay_infotip_heading_1 = require("./ebay-infotip-heading");
|
|
12
|
-
Object.defineProperty(exports, "EbayInfotipHeading", { enumerable: true, get: function () { return __importDefault(ebay_infotip_heading_1).default; } });
|
|
13
|
-
var ebay_infotip_content_1 = require("./ebay-infotip-content");
|
|
14
|
-
Object.defineProperty(exports, "EbayInfotipContent", { enumerable: true, get: function () { return __importDefault(ebay_infotip_content_1).default; } });
|
package/ebay-infotip/types.js
DELETED
|
@@ -1,10 +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.EbayInlineNotice = void 0;
|
|
7
|
-
var inline_notice_1 = require("./inline-notice");
|
|
8
|
-
Object.defineProperty(exports, "EbayInlineNotice", { enumerable: true, get: function () { return __importDefault(inline_notice_1).default; } });
|
|
9
|
-
var ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
10
|
-
Object.defineProperty(exports, "EbayNoticeContent", { enumerable: true, get: function () { return ebay_notice_content_1.EbayNoticeContent; } });
|
|
@@ -1,66 +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 component_utils_1 = require("../common/component-utils");
|
|
45
|
-
const ebay_icon_1 = require("../ebay-icon");
|
|
46
|
-
const EbayInlineNotice = (_a) => {
|
|
47
|
-
var { className, status = 'general', children, hidden = false, 'aria-label': ariaLabel, onNoticeShow = () => { } } = _a, rest = __rest(_a, ["className", "status", "children", "hidden", 'aria-label', "onNoticeShow"]);
|
|
48
|
-
(0, react_1.useEffect)(() => {
|
|
49
|
-
if (!hidden) {
|
|
50
|
-
onNoticeShow();
|
|
51
|
-
}
|
|
52
|
-
}, [hidden]);
|
|
53
|
-
if (hidden) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
const content = (0, component_utils_1.findComponent)(children, ebay_notice_content_1.EbayNoticeContent);
|
|
57
|
-
if (!content) {
|
|
58
|
-
throw new Error(`EbayInlineNotice: Please use a EbayNoticeContent that defines the content of the notice`);
|
|
59
|
-
}
|
|
60
|
-
const isGeneral = status === `general`;
|
|
61
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: (0, classnames_1.default)(className, 'inline-notice', { [`inline-notice--${status}`]: !isGeneral }) }),
|
|
62
|
-
!isGeneral ? (react_1.default.createElement("span", { className: "inline-notice__header" },
|
|
63
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: `${status}Filled16`, a11yText: ariaLabel, a11yVariant: "label" }))) : null,
|
|
64
|
-
react_1.default.createElement(notice_content_1.default, Object.assign({}, content.props, { type: "inline" }))));
|
|
65
|
-
};
|
|
66
|
-
exports.default = EbayInlineNotice;
|
|
@@ -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.EbayLightboxDialog = void 0;
|
|
7
|
-
var lightbox_dialog_1 = require("./lightbox-dialog");
|
|
8
|
-
Object.defineProperty(exports, "EbayLightboxDialog", { enumerable: true, get: function () { return __importDefault(lightbox_dialog_1).default; } });
|
|
@@ -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 = 'lightbox-dialog';
|
|
21
|
-
const EbayLightboxDialog = (_a) => {
|
|
22
|
-
var { open, mode, size, onClose = () => { } } = _a, rest = __rest(_a, ["open", "mode", "size", "onClose"]);
|
|
23
|
-
return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({ buttonPosition: "right" }, rest, { classPrefix: classPrefix, onCloseBtnClick: onClose, onBackgroundClick: onClose, className: (0, classnames_1.default)(rest.className, `${classPrefix}--mask-fade`, size && `${classPrefix}--${size}`), windowClass: (0, classnames_1.default)('lightbox-dialog__window--fade', {
|
|
24
|
-
[`${classPrefix}__window--mini`]: mode === 'mini'
|
|
25
|
-
}), open: open })));
|
|
26
|
-
};
|
|
27
|
-
exports.default = EbayLightboxDialog;
|
|
@@ -1,10 +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.EbayListboxButtonOption = exports.EbayListboxButton = void 0;
|
|
7
|
-
var listbox_button_1 = require("./listbox-button");
|
|
8
|
-
Object.defineProperty(exports, "EbayListboxButton", { enumerable: true, get: function () { return __importDefault(listbox_button_1).default; } });
|
|
9
|
-
var listbox_button_option_1 = require("./listbox-button-option");
|
|
10
|
-
Object.defineProperty(exports, "EbayListboxButtonOption", { enumerable: true, get: function () { return __importDefault(listbox_button_option_1).default; } });
|
|
@@ -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_icon_1 = require("../ebay-icon");
|
|
20
|
-
const ListboxOption = (_a) => {
|
|
21
|
-
var { value, children, selected, onClick, index, innerRef, className, id } = _a, rest = __rest(_a, ["value", "children", "selected", "onClick", "index", "innerRef", "className", "id"]);
|
|
22
|
-
const wrapperClassName = (0, classnames_1.default)(`listbox-button__option`, className, { 'listbox-button__option--active': selected });
|
|
23
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { className: wrapperClassName, role: "option", id: id || `listbox_btn_${value}_${index}`, "aria-selected": selected, ref: innerRef, onClick: (e) => { onClick(e, value, index); } }),
|
|
24
|
-
react_1.default.createElement("span", { className: "listbox-button__value" }, children),
|
|
25
|
-
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "tick16" })));
|
|
26
|
-
};
|
|
27
|
-
exports.default = ListboxOption;
|