@ebay/ui-core-react 6.2.2-rc.1 → 6.2.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.
Potentially problematic release.
This version of @ebay/ui-core-react might be problematic. Click here for more details.
- package/common/component-utils/array.polyfill.flat.js +13 -11
- package/common/component-utils/forwardRef.js +17 -4
- package/common/component-utils/usePrevious.js +3 -3
- package/common/component-utils/utils.js +26 -13
- package/common/debounce.js +7 -3
- package/common/event-utils/index.js +11 -8
- package/common/event-utils/use-key-press.js +12 -10
- package/common/event-utils/use-roving-index.js +24 -13
- package/common/floating-label-utils/hooks.js +53 -43
- package/common/notice-utils/notice-content.js +6 -5
- package/common/notice-utils/notice-cta.js +16 -5
- package/common/notice-utils/notice-footer.js +16 -5
- package/common/notice-utils/notice-title.js +17 -6
- package/common/random-id.js +1 -1
- package/common/range.js +4 -1
- package/common/tooltip-utils/tooltip-close-button.js +1 -1
- package/common/tooltip-utils/tooltip-content.js +28 -16
- package/common/tooltip-utils/tooltip-footer.js +6 -3
- package/common/tooltip-utils/tooltip-host.js +16 -5
- package/common/tooltip-utils/tooltip.d.ts +1 -1
- package/common/tooltip-utils/tooltip.js +26 -14
- package/common/tooltip-utils/use-tooltip.js +9 -8
- package/ebay-alert-dialog/alert-dialog.js +22 -11
- package/ebay-badge/badge.js +17 -6
- package/ebay-breadcrumbs/breadcrumb-item.js +18 -7
- package/ebay-breadcrumbs/breadcrumbs.js +30 -19
- package/ebay-button/button-cell.js +16 -5
- package/ebay-button/button-expand.d.ts +2 -4
- package/ebay-button/button-expand.d.ts.map +1 -1
- package/ebay-button/button-expand.js +10 -7
- package/ebay-button/button-loading.js +5 -5
- package/ebay-button/button-text.js +6 -3
- package/ebay-button/button.d.ts +1 -1
- package/ebay-button/button.js +43 -31
- package/ebay-calendar/calendar.js +111 -94
- package/ebay-calendar/date-utils.js +18 -9
- package/ebay-carousel/carousel-control-button.js +10 -9
- package/ebay-carousel/carousel-item.d.ts +1 -1
- package/ebay-carousel/carousel-item.js +25 -14
- package/ebay-carousel/carousel-list.js +22 -21
- package/ebay-carousel/carousel.js +44 -32
- package/ebay-carousel/helpers.js +47 -35
- package/ebay-carousel/scroll-to-transition.js +15 -15
- package/ebay-checkbox/checkbox.js +32 -21
- package/ebay-confirm-dialog/confirm-dialog.js +22 -11
- package/ebay-cta-button/cta-button.d.ts +1 -1
- package/ebay-cta-button/cta-button.js +20 -9
- package/ebay-date-textbox/date-textbox.js +53 -37
- package/ebay-dialog-base/components/animation.d.ts +1 -0
- package/ebay-dialog-base/components/animation.d.ts.map +1 -1
- package/ebay-dialog-base/components/animation.js +28 -25
- package/ebay-dialog-base/components/dialog-actions.js +5 -2
- package/ebay-dialog-base/components/dialog-close-button.d.ts +2 -5
- package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-close-button.js +5 -2
- package/ebay-dialog-base/components/dialog-footer.js +5 -2
- package/ebay-dialog-base/components/dialog-header.js +15 -4
- package/ebay-dialog-base/components/dialog-previous-button.js +17 -6
- package/ebay-dialog-base/components/dialogBase.js +51 -40
- package/ebay-dialog-base/dialog-base-with-state.js +35 -22
- package/ebay-drawer-dialog/components/drawer.js +50 -27
- package/ebay-eek/eek-rating.js +10 -8
- package/ebay-eek/eek-util.d.ts +1 -1
- package/ebay-eek/eek-util.d.ts.map +1 -1
- package/ebay-eek/eek-util.js +6 -7
- package/ebay-fake-menu/menu-item-separator.js +16 -5
- package/ebay-fake-menu/menu-item.js +26 -15
- package/ebay-fake-menu/menu.js +22 -11
- package/ebay-fake-menu-button/menu-button-item.js +2 -2
- package/ebay-fake-menu-button/menu-button-label.d.ts +2 -4
- package/ebay-fake-menu-button/menu-button-label.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button-label.js +5 -2
- package/ebay-fake-menu-button/menu-button-separator.js +16 -5
- package/ebay-fake-menu-button/menu-button.js +45 -32
- package/ebay-fake-tabs/fake-tabs.js +23 -10
- package/ebay-fake-tabs/tab.js +16 -5
- package/ebay-field/description.js +19 -7
- package/ebay-field/field.js +5 -4
- package/ebay-field/label.js +18 -7
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +18 -7
- package/ebay-icon/icon.d.ts +1 -1
- package/ebay-icon/icon.js +29 -17
- package/ebay-icon-button/icon-button.d.ts +1 -1
- package/ebay-icon-button/icon-button.js +27 -15
- package/ebay-infotip/ebay-infotip-content.js +5 -2
- package/ebay-infotip/ebay-infotip-heading.js +16 -5
- package/ebay-infotip/ebay-infotip-host.d.ts +2 -2
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.js +24 -10
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip.js +34 -23
- package/ebay-inline-notice/inline-notice.js +27 -15
- package/ebay-lightbox-dialog/lightbox-dialog.js +21 -9
- package/ebay-listbox-button/listbox-button-option.js +18 -7
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.js +100 -79
- package/ebay-menu/menu-item-separator.js +16 -5
- package/ebay-menu/menu-item.js +23 -12
- package/ebay-menu/menu.d.ts +1 -1
- package/ebay-menu/menu.js +64 -37
- package/ebay-menu-button/README.md +1 -1
- package/ebay-menu-button/menu-button-item.js +1 -1
- package/ebay-menu-button/menu-button-label.d.ts +2 -4
- package/ebay-menu-button/menu-button-label.d.ts.map +1 -1
- package/ebay-menu-button/menu-button-label.js +5 -2
- package/ebay-menu-button/menu-button-separator.js +16 -5
- package/ebay-menu-button/menu-button.js +60 -46
- package/ebay-notice-base/components/ebay-notice-content/notice-content.js +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts +2 -5
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.js +5 -2
- package/ebay-page-notice/page-notice-cta.js +6 -3
- package/ebay-page-notice/page-notice-footer.js +6 -3
- package/ebay-page-notice/page-notice-title.js +16 -5
- package/ebay-page-notice/page-notice.js +27 -16
- package/ebay-pagination/helpers.js +24 -21
- package/ebay-pagination/pagination-item.d.ts +1 -1
- package/ebay-pagination/pagination-item.js +27 -16
- package/ebay-pagination/pagination.js +81 -52
- package/ebay-panel-dialog/panel-dialog.js +21 -9
- package/ebay-progress-bar/progress-bar.js +16 -5
- package/ebay-progress-spinner/progress-spinner.js +18 -7
- package/ebay-progress-stepper/ebay-progress-step.js +25 -14
- package/ebay-progress-stepper/ebay-progress-stepper.js +21 -10
- package/ebay-progress-stepper/ebay-progress-title.js +5 -2
- package/ebay-radio/radio.js +29 -18
- package/ebay-section-notice/section-notice-footer.js +6 -3
- package/ebay-section-notice/section-notice-title.js +16 -5
- package/ebay-section-notice/section-notice.js +39 -24
- package/ebay-section-title/cta.js +16 -5
- package/ebay-section-title/info.js +16 -5
- package/ebay-section-title/overflow.js +16 -5
- package/ebay-section-title/section-title.js +24 -13
- package/ebay-section-title/subtitle.js +16 -5
- package/ebay-section-title/title.js +16 -5
- package/ebay-select/ebay-select-option.js +15 -4
- package/ebay-select/ebay-select.d.ts +1 -1
- package/ebay-select/ebay-select.js +45 -34
- package/ebay-signal/signal.js +17 -6
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +16 -5
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +38 -27
- package/ebay-split-button/split-button.js +21 -10
- package/ebay-star-rating/star-rating.js +19 -8
- package/ebay-star-rating-select/star-rating-select.js +31 -20
- package/ebay-svg/svg.js +3 -3
- package/ebay-switch/ebay-switch.js +21 -10
- package/ebay-tabs/tab-panel.js +16 -5
- package/ebay-tabs/tab.js +16 -5
- package/ebay-tabs/tabs.js +40 -26
- package/ebay-textbox/postfix-icon.js +18 -7
- package/ebay-textbox/prefix-icon.js +16 -5
- package/ebay-textbox/textbox.d.ts +1 -1
- package/ebay-textbox/textbox.js +53 -42
- package/ebay-toast-dialog/components/toast.js +17 -6
- package/ebay-tooltip/ebay-tooltip-content.js +1 -1
- package/ebay-tooltip/ebay-tooltip-host.js +1 -1
- package/ebay-tooltip/ebay-tooltip.js +32 -21
- package/ebay-tourtip/ebay-tourtip-content.js +1 -1
- package/ebay-tourtip/ebay-tourtip-footer.js +7 -4
- package/ebay-tourtip/ebay-tourtip-heading.js +17 -6
- package/ebay-tourtip/ebay-tourtip-host.js +1 -1
- package/ebay-tourtip/ebay-tourtip.js +33 -22
- package/ebay-video/controls.d.ts.map +1 -1
- package/ebay-video/controls.js +46 -23
- package/ebay-video/reportButton.d.ts +2 -7
- package/ebay-video/reportButton.d.ts.map +1 -1
- package/ebay-video/reportButton.js +8 -5
- package/ebay-video/source.js +14 -3
- package/ebay-video/video.d.ts.map +1 -1
- package/ebay-video/video.js +80 -54
- package/package.json +19 -23
package/ebay-menu/menu-item.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -37,28 +48,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
49
|
};
|
|
39
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
(0, react_1.useEffect)(()
|
|
51
|
+
var react_1 = __importStar(require("react"));
|
|
52
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
53
|
+
var ebay_badge_1 = require("../ebay-badge");
|
|
54
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
55
|
+
var EbayMenuItem = function (_a) {
|
|
56
|
+
var className = _a.className, checked = _a.checked, type = _a.type, _b = _a.focused, focused = _b === void 0 ? false : _b, tabIndex = _a.tabIndex, disabled = _a.disabled, badgeNumber = _a.badgeNumber, badgeAriaLabel = _a.badgeAriaLabel, children = _a.children, rest = __rest(_a, ["className", "checked", "type", "focused", "tabIndex", "disabled", "badgeNumber", "badgeAriaLabel", "children"]);
|
|
57
|
+
var ref = (0, react_1.useRef)(null);
|
|
58
|
+
var hasBadge = badgeNumber !== undefined;
|
|
59
|
+
(0, react_1.useEffect)(function () {
|
|
49
60
|
if (ref.current && focused) {
|
|
50
61
|
ref.current.focus();
|
|
51
62
|
}
|
|
52
63
|
}, [ref, focused]);
|
|
53
|
-
|
|
54
|
-
return (react_1.default.createElement("div",
|
|
64
|
+
var checkable = ['radio', 'checkbox'];
|
|
65
|
+
return (react_1.default.createElement("div", __assign({ "aria-label": badgeAriaLabel }, rest, { ref: ref, className: (0, classnames_1.default)(className, 'menu__item', hasBadge && 'menu__item--badged'), role: roleFromType(type), "aria-checked": checkable.includes(type) ? checked : undefined, "aria-disabled": disabled, tabIndex: focused ? 0 : tabIndex }),
|
|
55
66
|
react_1.default.createElement("span", { "aria-hidden": hasBadge },
|
|
56
67
|
children,
|
|
57
68
|
hasBadge && react_1.default.createElement(ebay_badge_1.EbayBadge, { type: "menu", number: badgeNumber })),
|
|
58
69
|
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "tick16" })));
|
|
59
70
|
};
|
|
60
71
|
function roleFromType(type) {
|
|
61
|
-
|
|
72
|
+
var roles = {
|
|
62
73
|
radio: 'menuitemradio',
|
|
63
74
|
checkbox: 'menuitemcheckbox'
|
|
64
75
|
};
|
package/ebay-menu/menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EbayMenuProps } from './index';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<EbayMenuProps, "slot" | "style" | "title" | "forwardedRef" | "type" | "key" | "className" | "placeholder" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "checked" | "baseEl" | "priority" | "autofocus"> & React.RefAttributes<React.FC<EbayMenuProps>>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=menu.d.ts.map
|
package/ebay-menu/menu.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -33,32 +44,48 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
33
44
|
}
|
|
34
45
|
return t;
|
|
35
46
|
};
|
|
47
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
48
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
49
|
+
if (ar || !(i in from)) {
|
|
50
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
51
|
+
ar[i] = from[i];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
55
|
+
};
|
|
36
56
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
58
|
};
|
|
39
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
var react_1 = __importStar(require("react"));
|
|
61
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
62
|
+
var use_roving_index_1 = __importDefault(require("../common/event-utils/use-roving-index"));
|
|
63
|
+
var event_utils_1 = require("../common/event-utils");
|
|
64
|
+
var component_utils_1 = require("../common/component-utils");
|
|
65
|
+
var index_1 = require("./index");
|
|
66
|
+
var EbayMenu = function (_a) {
|
|
67
|
+
var _b = _a.baseEl, Container = _b === void 0 ? 'span' : _b, type = _a.type, _c = _a.priority, priority = _c === void 0 ? 'secondary' : _c, checked = _a.checked, className = _a.className, autofocus = _a.autofocus, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.onKeyDown, onKeyDown = _e === void 0 ? function () { } : _e, _f = _a.onChange, onChange = _f === void 0 ? function () { } : _f, _g = _a.onSelect, onSelect = _g === void 0 ? function () { } : _g, forwardedRef = _a.forwardedRef, children = _a.children, rest = __rest(_a, ["baseEl", "type", "priority", "checked", "className", "autofocus", "onClick", "onKeyDown", "onChange", "onSelect", "forwardedRef", "children"]);
|
|
68
|
+
var childrenArray = react_1.Children.toArray(children);
|
|
69
|
+
var _h = (0, use_roving_index_1.default)(children, index_1.EbayMenuItem, autofocus === true ? 0 : undefined), focusedIndex = _h[0], setFocusedIndex = _h[1];
|
|
70
|
+
var _j = (0, react_1.useState)(childrenArray.map(function () { return false; })), checkedIndexes = _j[0], setCheckedIndexes = _j[1];
|
|
71
|
+
var valuesFromChecked = function (indexes) {
|
|
72
|
+
return childrenArray.reduce(function (values, item, i) {
|
|
73
|
+
return indexes[i] ? __spreadArray(__spreadArray([], values, true), [item.props.value], false) : values;
|
|
74
|
+
}, []);
|
|
75
|
+
};
|
|
76
|
+
var indexesFromChecked = function (indexes) {
|
|
77
|
+
return indexes.reduce(function (all, value, i) { return value ? __spreadArray(__spreadArray([], all, true), [i], false) : all; }, []);
|
|
78
|
+
};
|
|
79
|
+
var eventProps = function (index, indexes) { return ({
|
|
80
|
+
index: index,
|
|
55
81
|
checked: indexesFromChecked(indexes)
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
82
|
+
}); };
|
|
83
|
+
var checkboxEventProps = function (index, indexes) { return (__assign(__assign({}, eventProps(index, indexes)), { indexes: indexesFromChecked(indexes), checkedValues: valuesFromChecked(indexes) })); };
|
|
84
|
+
var updateIndex = function (index, value, resetOthers) {
|
|
85
|
+
if (resetOthers === void 0) { resetOthers = false; }
|
|
86
|
+
var anyChanges = false;
|
|
87
|
+
var newValues = checkedIndexes.map(function (indexChecked, i) {
|
|
88
|
+
var defaultValue = resetOthers ? false : indexChecked;
|
|
62
89
|
if (index === i) {
|
|
63
90
|
if (indexChecked !== value) {
|
|
64
91
|
anyChanges = true;
|
|
@@ -72,20 +99,20 @@ const EbayMenu = (_a) => {
|
|
|
72
99
|
return newValues;
|
|
73
100
|
}
|
|
74
101
|
};
|
|
75
|
-
|
|
102
|
+
var selectIndex = function (index) {
|
|
76
103
|
switch (type) {
|
|
77
104
|
case 'radio':
|
|
78
105
|
return updateIndex(index, true, true);
|
|
79
106
|
case 'checkbox':
|
|
80
107
|
return updateIndex(index, !checkedIndexes[index], false);
|
|
81
108
|
default:
|
|
82
|
-
return checkedIndexes.map((_, i)
|
|
109
|
+
return checkedIndexes.map(function (_, i) { return i === index; });
|
|
83
110
|
}
|
|
84
111
|
};
|
|
85
|
-
(0, react_1.useEffect)(()
|
|
112
|
+
(0, react_1.useEffect)(function () {
|
|
86
113
|
if (type === 'radio') {
|
|
87
114
|
if (checked === undefined) {
|
|
88
|
-
|
|
115
|
+
var checkedIndex = childrenArray.findIndex(function (child) { return child.props.checked; });
|
|
89
116
|
if (checkedIndex > -1) {
|
|
90
117
|
selectIndex(checkedIndex);
|
|
91
118
|
}
|
|
@@ -95,10 +122,10 @@ const EbayMenu = (_a) => {
|
|
|
95
122
|
}
|
|
96
123
|
}
|
|
97
124
|
else if (type === 'checkbox') {
|
|
98
|
-
setCheckedIndexes(childrenArray.map(child
|
|
125
|
+
setCheckedIndexes(childrenArray.map(function (child) { return Boolean(child.props.checked); }));
|
|
99
126
|
}
|
|
100
127
|
}, []);
|
|
101
|
-
|
|
128
|
+
var handleChange = function (e, index, newValues) {
|
|
102
129
|
switch (type) {
|
|
103
130
|
case 'radio':
|
|
104
131
|
case 'checkbox':
|
|
@@ -107,8 +134,8 @@ const EbayMenu = (_a) => {
|
|
|
107
134
|
return onSelect(e, eventProps(index, newValues));
|
|
108
135
|
}
|
|
109
136
|
};
|
|
110
|
-
|
|
111
|
-
|
|
137
|
+
var handleKeyDown = function (e, index) {
|
|
138
|
+
var newValues;
|
|
112
139
|
if ((0, event_utils_1.isActionKey)(e.key)) {
|
|
113
140
|
newValues = selectIndex(index);
|
|
114
141
|
if (newValues) {
|
|
@@ -123,24 +150,24 @@ const EbayMenu = (_a) => {
|
|
|
123
150
|
return onKeyDown(e, eventProps(index, newValues || checkedIndexes));
|
|
124
151
|
}
|
|
125
152
|
};
|
|
126
|
-
|
|
153
|
+
var handleClick = function (e, index) {
|
|
127
154
|
setFocusedIndex(index);
|
|
128
|
-
|
|
155
|
+
var newValues = selectIndex(index);
|
|
129
156
|
if (newValues) {
|
|
130
157
|
handleChange(e, index, newValues);
|
|
131
158
|
}
|
|
132
159
|
};
|
|
133
|
-
return (react_1.default.createElement(Container,
|
|
134
|
-
react_1.default.createElement("div", { className: "menu__items", role: "menu", ref: forwardedRef }, childrenArray.map((child, i)
|
|
135
|
-
|
|
136
|
-
return (0, react_1.cloneElement)(child,
|
|
160
|
+
return (react_1.default.createElement(Container, __assign({}, rest, { className: (0, classnames_1.default)(className, 'menu') }),
|
|
161
|
+
react_1.default.createElement("div", { className: "menu__items", role: "menu", ref: forwardedRef }, childrenArray.map(function (child, i) {
|
|
162
|
+
var _a = child.props, _b = _a.onClick, onItemClick = _b === void 0 ? function () { } : _b, _c = _a.onFocus, onItemFocus = _c === void 0 ? function () { } : _c, _d = _a.onKeyDown, onItemKeyDown = _d === void 0 ? function () { } : _d, itemRest = __rest(_a, ["onClick", "onFocus", "onKeyDown"]);
|
|
163
|
+
return (0, react_1.cloneElement)(child, __assign(__assign({}, itemRest), { type: type, focused: i === focusedIndex, tabIndex: focusedIndex === undefined ? 0 : -1, checked: checkedIndexes[i], onFocus: function (e) {
|
|
137
164
|
setFocusedIndex(i);
|
|
138
165
|
onItemFocus(e);
|
|
139
|
-
}, onClick: e
|
|
166
|
+
}, onClick: function (e) {
|
|
140
167
|
handleClick(e, i);
|
|
141
168
|
onItemClick(e);
|
|
142
169
|
onClick(e);
|
|
143
|
-
}, onKeyDown: e
|
|
170
|
+
}, onKeyDown: function (e) {
|
|
144
171
|
handleKeyDown(e, i);
|
|
145
172
|
onItemKeyDown(e);
|
|
146
173
|
} }));
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
declare const EbayMenuButtonLabel: FC
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
}>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
declare const EbayMenuButtonLabel: FC;
|
|
5
3
|
export default EbayMenuButtonLabel;
|
|
6
4
|
//# sourceMappingURL=menu-button-label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button-label.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button-label.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"menu-button-label.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button-label.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,QAAA,MAAM,mBAAmB,EAAE,EAAsC,CAAA;AAEjE,eAAe,mBAAmB,CAAA"}
|
|
@@ -3,6 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var EbayMenuButtonLabel = function (_a) {
|
|
8
|
+
var children = _a.children;
|
|
9
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
10
|
+
};
|
|
8
11
|
exports.default = EbayMenuButtonLabel;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
14
|
var t = {};
|
|
4
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -14,10 +25,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
26
|
};
|
|
16
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
return (react_1.default.createElement("hr",
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var EbayMenuButtonSeparator = function (_a) {
|
|
31
|
+
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
32
|
+
return (react_1.default.createElement("hr", __assign({}, rest, { className: (0, classnames_1.default)(className, 'menu-button__separator'), role: "separator" })));
|
|
22
33
|
};
|
|
23
34
|
exports.default = EbayMenuButtonSeparator;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -37,37 +48,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
49
|
};
|
|
39
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
var react_1 = __importStar(require("react"));
|
|
52
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
53
|
+
var component_utils_1 = require("../common/component-utils");
|
|
54
|
+
var ebay_menu_1 = require("../ebay-menu");
|
|
55
|
+
var ebay_button_1 = require("../ebay-button");
|
|
56
|
+
var ebay_icon_button_1 = require("../ebay-icon-button");
|
|
57
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
58
|
+
var index_1 = require("./index");
|
|
59
|
+
var random_id_1 = require("../common/random-id");
|
|
60
|
+
var event_utils_1 = require("../common/event-utils");
|
|
61
|
+
var EbayMenuButton = function (_a) {
|
|
62
|
+
var type = _a.type, _b = _a.variant, variant = _b === void 0 ? 'button' : _b, className = _a.className, _c = _a.text, text = _c === void 0 ? '' : _c, fixWidth = _a.fixWidth, reverse = _a.reverse, defaultExpanded = _a.expanded, noToggleIcon = _a.noToggleIcon, checked = _a.checked, collapseOnSelect = _a.collapseOnSelect, a11yText = _a.a11yText, prefixId = _a.prefixId, prefixLabel = _a.prefixLabel, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.onExpand, onExpand = _e === void 0 ? function () { } : _e, _f = _a.onCollapse, onCollapse = _f === void 0 ? function () { } : _f, _g = _a.onChange, onChange = _g === void 0 ? function () { } : _g, _h = _a.onSelect, onSelect = _h === void 0 ? function () { } : _h, children = _a.children, rest = __rest(_a, ["type", "variant", "className", "text", "fixWidth", "reverse", "expanded", "noToggleIcon", "checked", "collapseOnSelect", "a11yText", "prefixId", "prefixLabel", "onClick", "onExpand", "onCollapse", "onChange", "onSelect", "children"]);
|
|
63
|
+
var _j = (0, react_1.useState)(defaultExpanded), expanded = _j[0], setExpanded = _j[1];
|
|
64
|
+
var _k = (0, react_1.useState)(), menuId = _k[0], setMenuId = _k[1];
|
|
65
|
+
var buttonRef = (0, react_1.useRef)(null);
|
|
66
|
+
var menuRef = (0, react_1.useRef)();
|
|
67
|
+
var menuItems = (0, component_utils_1.filterByType)(children, [index_1.EbayMenuButtonItem, index_1.EbayMenuButtonSeparator]);
|
|
68
|
+
var defaultIndexes = menuItems.map(function (item) { return Boolean(item.props.checked); });
|
|
69
|
+
var _l = (0, react_1.useState)(defaultIndexes), checkedIndexes = _l[0], setCheckedIndexes = _l[1];
|
|
70
|
+
var menuButtonLabel = (0, component_utils_1.findComponent)(children, index_1.EbayMenuButtonLabel);
|
|
71
|
+
var icon = (0, component_utils_1.findComponent)(children, ebay_icon_1.EbayIcon);
|
|
72
|
+
var label = labelWithPrefixAndIcon({ text: text, prefixId: prefixId, prefixLabel: prefixLabel, menuButtonLabel: menuButtonLabel, icon: icon });
|
|
73
|
+
var wrapperClasses = (0, classnames_1.default)('menu-button', className);
|
|
74
|
+
var menuClasses = (0, classnames_1.default)('menu-button__menu', {
|
|
64
75
|
'menu-button__menu--fix-width': fixWidth,
|
|
65
76
|
'menu-button__menu--reverse': reverse
|
|
66
77
|
});
|
|
67
|
-
(0, react_1.useEffect)(()
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
(0, react_1.useEffect)(function () {
|
|
79
|
+
var handleBackgroundClick = function (e) {
|
|
80
|
+
var menuEl = menuRef.current;
|
|
81
|
+
var menuClicked = menuEl && menuEl.contains(e.target);
|
|
71
82
|
if (collapseOnSelect || !menuClicked) {
|
|
72
83
|
setExpanded(false);
|
|
73
84
|
}
|
|
@@ -78,55 +89,58 @@ const EbayMenuButton = (_a) => {
|
|
|
78
89
|
// causing the event listener to be attached to the document at the same time that the dialog
|
|
79
90
|
// opens. Adding a timeout so the event is attached after the click event that opened the modal
|
|
80
91
|
// is finished.
|
|
81
|
-
setTimeout(()
|
|
92
|
+
setTimeout(function () {
|
|
82
93
|
document.addEventListener('click', handleBackgroundClick, false);
|
|
83
94
|
});
|
|
84
95
|
}
|
|
85
96
|
else if (expanded === false) {
|
|
86
97
|
onCollapse();
|
|
87
98
|
}
|
|
88
|
-
return ()
|
|
99
|
+
return function () { return document.removeEventListener('click', handleBackgroundClick, false); };
|
|
89
100
|
}, [expanded]);
|
|
90
|
-
(0, react_1.useEffect)(()
|
|
101
|
+
(0, react_1.useEffect)(function () {
|
|
91
102
|
setMenuId((0, random_id_1.randomId)());
|
|
92
103
|
}, []);
|
|
93
|
-
|
|
94
|
-
(0, event_utils_1.handleEscapeKeydown)(e, ()
|
|
104
|
+
var handleMenuKeydown = function (e) {
|
|
105
|
+
(0, event_utils_1.handleEscapeKeydown)(e, function () {
|
|
95
106
|
var _a;
|
|
96
107
|
setExpanded(false);
|
|
97
108
|
(_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
98
109
|
});
|
|
99
110
|
};
|
|
100
|
-
|
|
111
|
+
var buttonProps = __assign({ ref: buttonRef, className: 'menu-button__button', 'aria-expanded': !!expanded, 'aria-haspopup': true, 'aria-label': a11yText, 'aria-controls': menuId, 'aria-labelledby': prefixId, onClick: function (e) {
|
|
101
112
|
setExpanded(!expanded);
|
|
102
113
|
onClick(e);
|
|
103
114
|
} }, rest);
|
|
104
|
-
|
|
115
|
+
var handleOnChange = function (e, eventProps) {
|
|
105
116
|
if (type === 'radio' || type === 'checkbox') {
|
|
106
|
-
|
|
117
|
+
var newCheckedIndexes = checkedIndexes.map(function (_, i) { return eventProps.indexes.includes(i); });
|
|
107
118
|
setCheckedIndexes(newCheckedIndexes);
|
|
108
119
|
}
|
|
109
120
|
onChange(e, eventProps);
|
|
110
121
|
};
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
var checkedIndex = function () {
|
|
123
|
+
var index = checkedIndexes.findIndex(Boolean);
|
|
113
124
|
return index > -1 ? index : checked;
|
|
114
125
|
};
|
|
115
126
|
return (react_1.default.createElement("span", { className: wrapperClasses },
|
|
116
127
|
variant === 'overflow' ?
|
|
117
|
-
react_1.default.createElement(ebay_icon_button_1.EbayIconButton,
|
|
118
|
-
react_1.default.createElement(ebay_button_1.EbayButton,
|
|
128
|
+
react_1.default.createElement(ebay_icon_button_1.EbayIconButton, __assign({ icon: "overflowVertical16" }, buttonProps)) :
|
|
129
|
+
react_1.default.createElement(ebay_button_1.EbayButton, __assign({ variant: variant === 'form' ? 'form' : undefined, bodyState: noToggleIcon ? undefined : 'expand' }, buttonProps), label),
|
|
119
130
|
expanded &&
|
|
120
|
-
react_1.default.createElement(ebay_menu_1.EbayMenu, { baseEl: "div", ref: menuRef, type: type, className: menuClasses, tabIndex: -1, id: menuId, autofocus: true, checked: checkedIndex(), onKeyDown: handleMenuKeydown, onChange: handleOnChange, onSelect: onSelect }, menuItems.map((item, i)
|
|
131
|
+
react_1.default.createElement(ebay_menu_1.EbayMenu, { baseEl: "div", ref: menuRef, type: type, className: menuClasses, tabIndex: -1, id: menuId, autofocus: true, checked: checkedIndex(), onKeyDown: handleMenuKeydown, onChange: handleOnChange, onSelect: onSelect }, menuItems.map(function (item, i) {
|
|
132
|
+
return (0, react_1.cloneElement)(item, __assign(__assign({}, item.props), { className: (0, classnames_1.default)(item.props.className, 'menu-button__item'), key: i, checked: checkedIndexes[i] }));
|
|
133
|
+
}))));
|
|
121
134
|
};
|
|
122
|
-
function labelWithPrefixAndIcon(
|
|
123
|
-
|
|
124
|
-
|
|
135
|
+
function labelWithPrefixAndIcon(_a) {
|
|
136
|
+
var text = _a.text, prefixId = _a.prefixId, prefixLabel = _a.prefixLabel, menuButtonLabel = _a.menuButtonLabel, icon = _a.icon;
|
|
137
|
+
var textLabelElement = text.length ? react_1.default.createElement("span", null, text) : null;
|
|
138
|
+
var prefixLabelElement = !prefixId && prefixLabel && [
|
|
125
139
|
react_1.default.createElement("span", { className: "menu-button-prefix-label" }, prefixLabel),
|
|
126
140
|
react_1.default.createElement(react_1.default.Fragment, null, "\u00A0")
|
|
127
141
|
];
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
var labelWithPrefix = [prefixLabelElement, menuButtonLabel || textLabelElement];
|
|
143
|
+
var labelArray = [icon, labelWithPrefix].flat().filter(Boolean);
|
|
130
144
|
return labelArray.length ? labelArray : null;
|
|
131
145
|
}
|
|
132
146
|
exports.default = EbayMenuButton;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
};
|
|
5
|
-
declare const EbayNoticeTitle: ({ children }: EbayNoticeTitleProps) => ReactNode;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
declare const EbayNoticeTitle: FC;
|
|
6
3
|
export default EbayNoticeTitle;
|
|
7
4
|
//# sourceMappingURL=notice-title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-title.d.ts","sourceRoot":"","sources":["../../../../src/ebay-notice-base/components/ebay-notice-title/notice-title.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"notice-title.d.ts","sourceRoot":"","sources":["../../../../src/ebay-notice-base/components/ebay-notice-title/notice-title.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAa,MAAM,OAAO,CAAA;AAM5C,QAAA,MAAM,eAAe,EAAE,EAItB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -3,6 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var EbayNoticeTitle = function (_a) {
|
|
8
|
+
var children = _a.children;
|
|
9
|
+
return (react_1.default.createElement("span", { className: "page-notice__title" }, children));
|
|
10
|
+
};
|
|
8
11
|
exports.default = EbayNoticeTitle;
|
|
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var notice_cta_1 = __importDefault(require("../common/notice-utils/notice-cta"));
|
|
8
|
+
var EbayPageNoticeCTA = function (_a) {
|
|
9
|
+
var className = _a.className, children = _a.children;
|
|
10
|
+
return (react_1.default.createElement(notice_cta_1.default, { className: className, type: "page" }, children));
|
|
11
|
+
};
|
|
9
12
|
exports.default = EbayPageNoticeCTA;
|
|
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var notice_footer_1 = __importDefault(require("../common/notice-utils/notice-footer"));
|
|
8
|
+
var EbayPageNoticeFooter = function (_a) {
|
|
9
|
+
var className = _a.className, children = _a.children;
|
|
10
|
+
return (react_1.default.createElement(notice_footer_1.default, { className: className, type: "page" }, children));
|
|
11
|
+
};
|
|
9
12
|
exports.default = EbayPageNoticeFooter;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
14
|
var t = {};
|
|
4
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -14,10 +25,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
26
|
};
|
|
16
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
return (react_1.default.createElement(notice_title_1.default,
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var notice_title_1 = __importDefault(require("../common/notice-utils/notice-title"));
|
|
30
|
+
var EbayPageNoticeTitle = function (_a) {
|
|
31
|
+
var className = _a.className, as = _a.as, children = _a.children, rest = __rest(_a, ["className", "as", "children"]);
|
|
32
|
+
return (react_1.default.createElement(notice_title_1.default, __assign({}, rest, { className: className, as: as, type: "page" }), children));
|
|
22
33
|
};
|
|
23
34
|
exports.default = EbayPageNoticeTitle;
|