@ebay/ui-core-react 5.11.2 → 5.13.0
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/common/component-utils/utils.d.ts +8 -5
- package/common/component-utils/utils.d.ts.map +1 -1
- package/common/component-utils/utils.js +47 -29
- package/common/event-utils/index.d.ts +2 -2
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.js +1 -1
- package/common/tooltip-utils/tooltip-content.js +1 -1
- package/common/tooltip-utils/tooltip.d.ts +1 -1
- package/common/tooltip-utils/tooltip.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip.js +2 -2
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.js +4 -3
- package/ebay-button/button.d.ts +4 -3
- package/ebay-button/button.d.ts.map +1 -1
- package/ebay-carousel/helpers.d.ts.map +1 -1
- package/ebay-carousel/helpers.js +4 -3
- package/ebay-checkbox/checkbox.d.ts.map +1 -1
- package/ebay-checkbox/checkbox.js +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.js +6 -2
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu/menu.js +3 -2
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.js +1 -1
- package/ebay-fake-tabs/fake-tabs.d.ts.map +1 -1
- package/ebay-fake-tabs/fake-tabs.js +1 -1
- package/ebay-icon/icon.d.ts +1 -1
- package/ebay-icon-button/icon-button.d.ts +2 -2
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.js +3 -6
- package/ebay-infotip/ebay-infotip.d.ts +3 -21
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip.js +16 -4
- package/ebay-infotip/index.d.ts +1 -1
- package/ebay-infotip/index.d.ts.map +1 -1
- package/ebay-infotip/types.d.ts +19 -0
- package/ebay-infotip/types.d.ts.map +1 -1
- package/ebay-inline-notice/inline-notice.js +1 -1
- package/ebay-listbox-button/listbox-button-option.d.ts +1 -1
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.js +3 -4
- package/ebay-menu/menu.d.ts +1 -1
- package/ebay-menu-button/menu-button-separator.d.ts +2 -2
- package/ebay-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.js +2 -2
- package/ebay-menu-button/types.d.ts +3 -3
- package/ebay-menu-button/types.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.js +3 -3
- package/ebay-pagination/index.d.ts +3 -3
- package/ebay-pagination/index.d.ts.map +1 -1
- package/ebay-pagination/pagination-item.d.ts +1 -1
- package/ebay-pagination/pagination.d.ts +1 -1
- package/ebay-pagination/pagination.d.ts.map +1 -1
- package/ebay-pagination/pagination.js +9 -11
- package/ebay-select/ebay-select.d.ts.map +1 -1
- package/ebay-select/ebay-select.js +1 -1
- package/ebay-split-button/split-button.js +1 -1
- package/ebay-tabs/tabs.d.ts.map +1 -1
- package/ebay-tabs/tabs.js +3 -3
- package/ebay-textbox/textbox.d.ts +1 -1
- package/ebay-textbox/textbox.js +1 -1
- package/ebay-tooltip/ebay-tooltip.js +2 -2
- package/ebay-tourtip/ebay-tourtip.js +2 -2
- package/ebay-video/video.js +1 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ebay-infotip-host.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip-host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAM,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEvE,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,
|
|
1
|
+
{"version":3,"file":"ebay-infotip-host.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip-host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAM,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEvE,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IACtD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;;KAAA,KAAK,SAAS,CAAC,GAAG,SAAS,CAAA;CACnD,CAAA;;AAyBD,wBAA8C"}
|
|
@@ -28,15 +28,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
var react_1 = __importDefault(require("react"));
|
|
29
29
|
var dedupe_1 = __importDefault(require("classnames/dedupe"));
|
|
30
30
|
var ebay_icon_1 = require("../ebay-icon");
|
|
31
|
-
var
|
|
31
|
+
var component_utils_1 = require("../common/component-utils");
|
|
32
32
|
var EbayInfotipHost = function (_a) {
|
|
33
33
|
var icon = _a.icon, className = _a.className, children = _a.children, forwardedRef = _a.forwardedRef, variant = _a.variant, rest = __rest(_a, ["icon", "className", "children", "forwardedRef", "variant"]);
|
|
34
34
|
var classPrefix = variant === 'modal' ? 'dialog--mini' : 'infotip';
|
|
35
35
|
var buttonIcon = react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon });
|
|
36
|
-
var buttonContent = children;
|
|
37
|
-
if (children instanceof Function) {
|
|
38
|
-
buttonContent = children({ icon: buttonIcon });
|
|
39
|
-
}
|
|
36
|
+
var buttonContent = children instanceof Function ? children({ icon: buttonIcon }) : children;
|
|
40
37
|
return (react_1.default.createElement("button", __assign({}, rest, { className: (0, dedupe_1.default)('icon-btn icon-btn--transparent', className, "".concat(classPrefix, "__host")), type: "button", ref: forwardedRef }), buttonContent || buttonIcon));
|
|
41
38
|
};
|
|
42
|
-
exports.default = (0,
|
|
39
|
+
exports.default = (0, component_utils_1.withForwardRef)(EbayInfotipHost);
|
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Variant } from './types';
|
|
5
|
-
type InfotipProps = {
|
|
6
|
-
variant?: Variant;
|
|
7
|
-
icon?: Icon;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
initialExpanded?: boolean;
|
|
10
|
-
pointer?: PointerDirection;
|
|
11
|
-
overlayStyle?: CSSProperties;
|
|
12
|
-
onExpand?: () => void;
|
|
13
|
-
onCollapse?: () => void;
|
|
14
|
-
a11yCloseText: string;
|
|
15
|
-
'aria-label'?: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
children?: ReactNode;
|
|
18
|
-
a11yMaximizeText?: string;
|
|
19
|
-
a11yMinimizeText?: string;
|
|
20
|
-
};
|
|
21
|
-
declare const EbayInfotip: FC<InfotipProps>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EbayInfotipProps } from './index';
|
|
3
|
+
declare const EbayInfotip: FC<EbayInfotipProps>;
|
|
22
4
|
export default EbayInfotip;
|
|
23
5
|
//# sourceMappingURL=ebay-infotip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ebay-infotip.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,
|
|
1
|
+
{"version":3,"file":"ebay-infotip.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,EAAE,EAA0B,MAAM,OAAO,CAAA;AAOtF,OAAO,EAA0C,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAElF,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsGrC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -64,7 +64,7 @@ var EbayInfotip = function (_a) {
|
|
|
64
64
|
var containerRef = (0, react_1.useRef)();
|
|
65
65
|
var heading = (0, component_utils_1.findComponent)(children, index_1.EbayInfotipHeading);
|
|
66
66
|
var content = (0, component_utils_1.findComponent)(children, index_1.EbayInfotipContent);
|
|
67
|
-
var button = (0, component_utils_1.findComponent)(children, ebay_infotip_host_1.default)
|
|
67
|
+
var button = (0, component_utils_1.findComponent)(children, ebay_infotip_host_1.default);
|
|
68
68
|
var toggleTooltip = function () {
|
|
69
69
|
if (isExpanded) {
|
|
70
70
|
collapseTooltip();
|
|
@@ -76,14 +76,26 @@ var EbayInfotip = function (_a) {
|
|
|
76
76
|
if (!content) {
|
|
77
77
|
throw new Error("EbayInfotip: Please use a EbayInfotipContent that defines the content of the infotip");
|
|
78
78
|
}
|
|
79
|
-
var _e = content
|
|
79
|
+
var _e = (0, component_utils_1.elementProps)(content), contentChildren = _e.children, contentProps = __rest(_e, ["children"]);
|
|
80
|
+
var buttonProps = {
|
|
81
|
+
ref: buttonRef,
|
|
82
|
+
onClick: toggleTooltip,
|
|
83
|
+
disabled: disabled,
|
|
84
|
+
variant: variant,
|
|
85
|
+
'aria-label': ariaLabel,
|
|
86
|
+
'aria-expanded': isExpanded,
|
|
87
|
+
icon: icon
|
|
88
|
+
};
|
|
89
|
+
var hostButton = (0, react_1.isValidElement)(button) ?
|
|
90
|
+
(0, react_1.cloneElement)(button, __assign(__assign({}, buttonProps), button.props)) :
|
|
91
|
+
(0, react_1.createElement)(ebay_infotip_host_1.default, __assign({}, buttonProps));
|
|
80
92
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
81
93
|
react_1.default.createElement(tooltip_utils_1.Tooltip, { type: "infotip", isExpanded: isExpanded, className: (0, classnames_1.default)(className, { 'dialog--mini': isModal }), ref: containerRef },
|
|
82
|
-
react_1.default.createElement(tooltip_utils_1.TooltipHost, null,
|
|
94
|
+
react_1.default.createElement(tooltip_utils_1.TooltipHost, null, hostButton),
|
|
83
95
|
!isModal && (react_1.default.createElement(tooltip_utils_1.TooltipContent, __assign({}, contentProps, { type: "infotip", style: overlayStyle, pointer: pointer, showCloseButton: true, a11yCloseText: a11yCloseText, onClose: collapseTooltip }),
|
|
84
96
|
heading,
|
|
85
97
|
contentChildren))),
|
|
86
|
-
isModal && (react_1.default.createElement(ebay_drawer_dialog_1.EbayDrawerDialog, __assign({}, contentProps, { open: isExpanded, onClose: collapseTooltip,
|
|
98
|
+
isModal && (react_1.default.createElement(ebay_drawer_dialog_1.EbayDrawerDialog, __assign({}, contentProps, { open: isExpanded, onClose: collapseTooltip, a11yCloseText: a11yCloseText, className: "dialog--mini__overlay", a11yMaximizeText: a11yMaximizeText, a11yMinimizeText: a11yMinimizeText }),
|
|
87
99
|
react_1.default.createElement(ebay_dialog_base_1.EbayDialogHeader, null, heading),
|
|
88
100
|
contentChildren))));
|
|
89
101
|
};
|
package/ebay-infotip/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { default as EbayInfotip } from './ebay-infotip';
|
|
|
2
2
|
export { default as EbayInfotipHost } from './ebay-infotip-host';
|
|
3
3
|
export { default as EbayInfotipHeading } from './ebay-infotip-heading';
|
|
4
4
|
export { default as EbayInfotipContent } from './ebay-infotip-content';
|
|
5
|
-
export { Variant } from './types';
|
|
5
|
+
export type { Variant, EbayInfotipProps } from './types';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA"}
|
package/ebay-infotip/types.d.ts
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { PointerDirection } from '../common/tooltip-utils';
|
|
3
|
+
import { Icon } from '../ebay-icon';
|
|
1
4
|
export type Variant = 'default' | 'modal';
|
|
5
|
+
export type EbayInfotipProps = {
|
|
6
|
+
variant?: Variant;
|
|
7
|
+
icon?: Icon;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
initialExpanded?: boolean;
|
|
10
|
+
pointer?: PointerDirection;
|
|
11
|
+
overlayStyle?: CSSProperties;
|
|
12
|
+
onExpand?: () => void;
|
|
13
|
+
onCollapse?: () => void;
|
|
14
|
+
a11yCloseText: string;
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
a11yMaximizeText?: string;
|
|
19
|
+
a11yMinimizeText?: string;
|
|
20
|
+
};
|
|
2
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAEzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAC,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAC,MAAM,CAAC;CAC1B,CAAA"}
|
|
@@ -73,6 +73,6 @@ var EbayInlineNotice = function (_a) {
|
|
|
73
73
|
return (react_1.default.createElement("div", __assign({}, rest, { className: (0, classnames_1.default)(className, 'inline-notice', (_b = {}, _b["inline-notice--".concat(status)] = !isGeneral, _b)) }),
|
|
74
74
|
!isGeneral ? (react_1.default.createElement("span", { className: "inline-notice__header" },
|
|
75
75
|
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "".concat(status, "Filled16"), a11yText: ariaLabel, a11yVariant: "label" }))) : null,
|
|
76
|
-
react_1.default.createElement(notice_content_1.default, __assign({}, content
|
|
76
|
+
react_1.default.createElement(notice_content_1.default, __assign({}, (0, component_utils_1.elementProps)(content), { type: "inline" }))));
|
|
77
77
|
};
|
|
78
78
|
exports.default = EbayInlineNotice;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FC, MouseEvent, RefObject } from 'react';
|
|
2
|
-
type EbayListboxButtonOptionProps = ComponentProps<'input'> & {
|
|
2
|
+
export type EbayListboxButtonOptionProps = ComponentProps<'input'> & {
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
index?: number;
|
|
5
5
|
onClick?: (event: MouseEvent<HTMLDivElement>, value: any, index: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-button-option.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button-option.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxE,
|
|
1
|
+
{"version":3,"file":"listbox-button-option.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button-option.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxE,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,QAAQ,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,4BAA4B,CA0BnD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -64,9 +64,8 @@ var ListboxButton = function (_a) {
|
|
|
64
64
|
throw new Error("EbayListboxButton: Please use a\n EbayListboxButtonOption that defines the options of the listbox");
|
|
65
65
|
}
|
|
66
66
|
var getInitialSelectedOption = function () {
|
|
67
|
-
var selectedIndex = selected !== undefined ? selected : listBoxButtonOptions.findIndex(function (
|
|
68
|
-
|
|
69
|
-
return value !== undefined && props.value === value;
|
|
67
|
+
var selectedIndex = selected !== undefined ? selected : listBoxButtonOptions.findIndex(function (option) {
|
|
68
|
+
return value !== undefined && (0, component_utils_1.elementProps)(option).value === value;
|
|
70
69
|
});
|
|
71
70
|
var index = selectedIndex > -1 || floatingLabel ? selectedIndex : undefined;
|
|
72
71
|
return {
|
|
@@ -228,7 +227,7 @@ var ListboxButton = function (_a) {
|
|
|
228
227
|
// We want to mimic the select box behavior, so we take the onSelect that passed
|
|
229
228
|
// at the parent level and use it for the OnClick on the list box since it is a fake dropdown
|
|
230
229
|
var updateListBoxButtonOptions = listBoxButtonOptions
|
|
231
|
-
.map(function (child, index) { return (0, react_1.cloneElement)(child, {
|
|
230
|
+
.map(function (child, index) { return (0, react_1.isValidElement)(child) && (0, react_1.cloneElement)(child, {
|
|
232
231
|
index: index,
|
|
233
232
|
key: index,
|
|
234
233
|
selected: selectedOption && child.props.value === selectedOption.props.value,
|
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<Pick<EbayMenuProps, "slot" | "style" | "title" | "forwardedRef" | "
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<EbayMenuProps, "slot" | "style" | "title" | "forwardedRef" | "key" | "className" | "placeholder" | "type" | "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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
|
-
type
|
|
3
|
-
declare const EbayMenuButtonSeparator: FC<
|
|
2
|
+
export type EbayMenuButtonSeparatorProps = ComponentProps<'hr'>;
|
|
3
|
+
declare const EbayMenuButtonSeparator: FC<EbayMenuButtonSeparatorProps>;
|
|
4
4
|
export default EbayMenuButtonSeparator;
|
|
5
5
|
//# sourceMappingURL=menu-button-separator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,
|
|
1
|
+
{"version":3,"file":"menu-button-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAE/D,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAS7D,CAAA;AAED,eAAe,uBAAuB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,EAAE,EAA+
|
|
1
|
+
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,EAAE,EAA+C,MAAM,OAAO,CAAA;AAQ5F,OAAO,EAAgF,eAAe,EAAE,MAAM,SAAS,CAAA;AAIvH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CA8IvC,CAAA;AAcD,eAAe,cAAc,CAAA"}
|
|
@@ -65,7 +65,7 @@ var EbayMenuButton = function (_a) {
|
|
|
65
65
|
var buttonRef = (0, react_1.useRef)(null);
|
|
66
66
|
var menuRef = (0, react_1.useRef)();
|
|
67
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.
|
|
68
|
+
var defaultIndexes = menuItems.map(function (item) { return Boolean((0, component_utils_1.elementProps)(item).checked); });
|
|
69
69
|
var _l = (0, react_1.useState)(defaultIndexes), checkedIndexes = _l[0], setCheckedIndexes = _l[1];
|
|
70
70
|
var menuButtonLabel = (0, component_utils_1.findComponent)(children, index_1.EbayMenuButtonLabel);
|
|
71
71
|
var icon = (0, component_utils_1.findComponent)(children, ebay_icon_1.EbayIcon);
|
|
@@ -129,7 +129,7 @@ var EbayMenuButton = function (_a) {
|
|
|
129
129
|
react_1.default.createElement(ebay_button_1.EbayButton, __assign({ variant: variant === 'form' ? 'form' : undefined, bodyState: noToggleIcon ? undefined : 'expand' }, buttonProps), label),
|
|
130
130
|
expanded &&
|
|
131
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] }));
|
|
132
|
+
return (0, react_1.isValidElement)(item) && (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
133
|
}))));
|
|
134
134
|
};
|
|
135
135
|
function labelWithPrefixAndIcon(_a) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EbayMenuChangeEventHandler, EbayMenuSelectEventHandler, EbayMenuType } from '../ebay-menu';
|
|
2
2
|
import { EbayButtonProps } from '../ebay-button';
|
|
3
|
-
import { ComponentProps,
|
|
3
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
4
4
|
export type EbayMenuButtonVariant = 'overflow' | 'form' | 'button';
|
|
5
5
|
export type EbayMenuButtonProps = {
|
|
6
6
|
a11yText?: string;
|
|
@@ -27,8 +27,8 @@ export type LabelProps = {
|
|
|
27
27
|
text?: string;
|
|
28
28
|
prefixId?: string;
|
|
29
29
|
prefixLabel?: string;
|
|
30
|
-
menuButtonLabel?:
|
|
31
|
-
icon?:
|
|
30
|
+
menuButtonLabel?: ReactNode;
|
|
31
|
+
icon?: ReactNode;
|
|
32
32
|
};
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAA;AAElE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,KAAK,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;AACzC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,GACnF,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,GACnD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,GACrC,mBAAmB,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,cAAc,EACd,EAAE,EAEF,oBAAoB,EAEpB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"page-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,cAAc,EACd,EAAE,EAEF,oBAAoB,EAEpB,iBAAiB,EAEpB,MAAM,OAAO,CAAA;AAOd,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAA;AACvF,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;CACxD,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAkD7B,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -51,13 +51,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
51
51
|
var react_1 = __importStar(require("react"));
|
|
52
52
|
var notice_content_1 = __importDefault(require("../common/notice-utils/notice-content"));
|
|
53
53
|
var ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
54
|
+
var component_utils_1 = require("../common/component-utils");
|
|
54
55
|
var ebay_icon_1 = require("../ebay-icon");
|
|
55
56
|
var index_1 = require("./index");
|
|
56
57
|
var EbayPageNotice = function (_a) {
|
|
57
58
|
var id = _a.id, _b = _a.status, status = _b === void 0 ? 'general' : _b, children = _a.children, a11yDismissText = _a.a11yDismissText, ariaLabel = _a["aria-label"], _c = _a.onDismiss, onDismiss = _c === void 0 ? function () { } : _c, rest = __rest(_a, ["id", "status", "children", "a11yDismissText", 'aria-label', "onDismiss"]);
|
|
58
59
|
var _d = (0, react_1.useState)(false), dismissed = _d[0], setDismissed = _d[1];
|
|
59
|
-
var
|
|
60
|
-
var content = childrenArray.find(function (child) { return child.type === ebay_notice_content_1.EbayNoticeContent; });
|
|
60
|
+
var content = (0, component_utils_1.findComponent)(children, ebay_notice_content_1.EbayNoticeContent);
|
|
61
61
|
if (!content) {
|
|
62
62
|
throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");
|
|
63
63
|
}
|
|
@@ -68,7 +68,7 @@ var EbayPageNotice = function (_a) {
|
|
|
68
68
|
return dismissed ? null : (react_1.default.createElement("section", __assign({}, rest, { "aria-labelledby": id || "".concat(status, "-status"), className: "page-notice ".concat(status !== "general" ? "page-notice--".concat(status) : ""), role: "region" }),
|
|
69
69
|
status !== "general" ? (react_1.default.createElement("div", { className: "page-notice__header", id: id || "".concat(status, "-status") },
|
|
70
70
|
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "".concat(status, "Filled16"), a11yText: ariaLabel, a11yVariant: "label" }))) : null,
|
|
71
|
-
react_1.default.createElement(notice_content_1.default, __assign({}, content
|
|
71
|
+
react_1.default.createElement(notice_content_1.default, __assign({}, (0, component_utils_1.elementProps)(content), { type: "page" })),
|
|
72
72
|
children,
|
|
73
73
|
a11yDismissText && (react_1.default.createElement(index_1.EbayPageNoticeFooter, null,
|
|
74
74
|
react_1.default.createElement("button", { "aria-label": a11yDismissText, className: "fake-link page-notice__dismiss", onClick: handleDismissed },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as EbayPagination } from './pagination';
|
|
2
|
-
export { default as EbayPaginationItem } from './pagination-item';
|
|
3
|
-
export { PaginationVariant } from './types';
|
|
1
|
+
export { default as EbayPagination, PaginationProps } from './pagination';
|
|
2
|
+
export { default as EbayPaginationItem, PaginationItemProps, PaginationItemType } from './pagination-item';
|
|
3
|
+
export { PaginationVariant, ItemState } from './types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC1G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -22,6 +22,6 @@ export type PaginationItemProps = HtmlProps & {
|
|
|
22
22
|
forwardedRef?: RefObject<HTMLAnchorElement & HTMLButtonElement>;
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
};
|
|
25
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<PaginationItemProps, "form" | "slot" | "style" | "title" | "forwardedRef" | "
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<PaginationItemProps, "form" | "slot" | "style" | "title" | "forwardedRef" | "key" | "value" | "className" | "disabled" | "placeholder" | "type" | "children" | "name" | "current" | "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" | "autoFocus" | "download" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "hrefLang" | "media" | "rel" | "target" | "ping" | "referrerPolicy" | "a11yPreviousText" | "a11yNextText" | "onNext" | "onPrevious" | "hide" | "pageIndex"> & React.RefAttributes<React.FC<PaginationItemProps>>>;
|
|
26
26
|
export default _default;
|
|
27
27
|
//# sourceMappingURL=pagination-item.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
|
-
import { PaginationVariant } from './types';
|
|
3
2
|
import { EbayEventHandler } from '../common/event-utils/types';
|
|
3
|
+
import { PaginationVariant } from './index';
|
|
4
4
|
export type PaginationProps = Omit<ComponentProps<'nav'>, 'onSelect'> & {
|
|
5
5
|
id?: string;
|
|
6
6
|
a11yPreviousText?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination.tsx"],"names":[],"mappings":"AAAA,OAAc,EACA,cAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination.tsx"],"names":[],"mappings":"AAAA,OAAc,EACA,cAAc,EAAE,EAAE,EAE/B,MAAM,OAAO,CAAA;AAUd,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAsD,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE/F,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAuKvC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -69,10 +69,7 @@ var EbayPagination = function (_a) {
|
|
|
69
69
|
var paginationContainerRef = (0, react_1.useRef)(null);
|
|
70
70
|
var childPageRefs = (0, react_1.useRef)([]);
|
|
71
71
|
childPageRefs.current = react_1.Children.map(children, react_1.createRef);
|
|
72
|
-
var totalPages = (0, component_utils_1.filterBy)(children, function (
|
|
73
|
-
var props = _a.props;
|
|
74
|
-
return props.type === undefined || props.type === 'page';
|
|
75
|
-
}).length;
|
|
72
|
+
var totalPages = (0, component_utils_1.filterBy)(children, function (child) { return [undefined, 'page'].includes((0, component_utils_1.elementProps)(child).type); }).length;
|
|
76
73
|
var itemWidthRef = (0, react_1.useRef)(0);
|
|
77
74
|
var arrowWidthRef = (0, react_1.useRef)(0);
|
|
78
75
|
var getNumOfVisiblePageItems = function () {
|
|
@@ -87,9 +84,10 @@ var EbayPagination = function (_a) {
|
|
|
87
84
|
};
|
|
88
85
|
var _l = (0, react_1.useState)([]), page = _l[0], setPage = _l[1];
|
|
89
86
|
var _m = (0, react_1.useState)(0), selectedIndex = _m[0], setSelectedIndex = _m[1];
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
var currentIndex = function () { return childPageRefs.current.findIndex(function (pageRef) { var _a; return ((_a = pageRef.current) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-current')) === 'page'; }); };
|
|
88
|
+
// selectedIndexFromDotMenu: override pageIndex on pagination with dot menu value
|
|
89
|
+
var updatePages = function (selectedIndexFromDotMenu) {
|
|
90
|
+
var selectedPageIndex = selectedIndexFromDotMenu !== undefined ? selectedIndexFromDotMenu : currentIndex();
|
|
93
91
|
var visiblePageItems = getNumOfVisiblePageItems();
|
|
94
92
|
var pageState = (0, helpers_1.calcPageState)(selectedPageIndex, visiblePageItems, totalPages, variant);
|
|
95
93
|
setSelectedIndex(selectedPageIndex);
|
|
@@ -98,9 +96,9 @@ var EbayPagination = function (_a) {
|
|
|
98
96
|
(0, react_1.useEffect)(function () {
|
|
99
97
|
var debouncedUpdate = (0, debounce_1.debounce)(updatePages, 16);
|
|
100
98
|
updatePages();
|
|
101
|
-
window.addEventListener('resize',
|
|
99
|
+
window.addEventListener('resize', debouncedUpdate);
|
|
102
100
|
return function () {
|
|
103
|
-
window.removeEventListener('resize',
|
|
101
|
+
window.removeEventListener('resize', debouncedUpdate);
|
|
104
102
|
};
|
|
105
103
|
}, [children]);
|
|
106
104
|
var createChildItems = function (itemType) {
|
|
@@ -111,7 +109,7 @@ var EbayPagination = function (_a) {
|
|
|
111
109
|
var firstDot = page.indexOf('dots');
|
|
112
110
|
var lastDot = page.lastIndexOf('dots');
|
|
113
111
|
return react_1.Children.map(children, function (item, index) {
|
|
114
|
-
var _a = item
|
|
112
|
+
var _a = (0, component_utils_1.elementProps)(item), _b = _a.type, type = _b === void 0 ? 'page' : _b, current = _a.current, disabled = _a.disabled, href = _a.href, text = _a.children;
|
|
115
113
|
var isDot = page[index] === 'dots';
|
|
116
114
|
var key = "".concat(id, "-item-").concat(index);
|
|
117
115
|
var hide = page[index] === 'hidden';
|
|
@@ -161,7 +159,7 @@ var EbayPagination = function (_a) {
|
|
|
161
159
|
react_1.default.createElement("span", { className: "pagination__item", role: "separator" },
|
|
162
160
|
react_1.default.createElement(ebay_fake_menu_button_1.EbayFakeMenuButton, { a11yText: "Menu", borderless: true, variant: "overflow", noToggleIcon: true }, childComponent))));
|
|
163
161
|
}
|
|
164
|
-
return itemType === type ? (0, react_1.cloneElement)(item, newProps) : null;
|
|
162
|
+
return itemType === type && (0, react_1.isValidElement)(item) ? (0, react_1.cloneElement)(item, newProps) : null;
|
|
165
163
|
});
|
|
166
164
|
};
|
|
167
165
|
var headingId = "".concat(id, "-pagination-heading");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ebay-select.d.ts","sourceRoot":"","sources":["../../src/ebay-select/ebay-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ebay-select.d.ts","sourceRoot":"","sources":["../../src/ebay-select/ebay-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACiB,cAAc,EAC5C,MAAM,OAAO,CAAA;AAMd,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAIpE,KAAK,WAAW,GAAG,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AACpE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;;AAqFF,wBAA0D"}
|
|
@@ -113,7 +113,7 @@ function options(children) {
|
|
|
113
113
|
var allOptions = [];
|
|
114
114
|
var optGroups = {};
|
|
115
115
|
var withinGroup = false;
|
|
116
|
-
var childrenOpts = (0, component_utils_1.filterByType)(children, ebay_select_option_1.default).map(function (c) { return (0, react_1.cloneElement)(c, {}); });
|
|
116
|
+
var childrenOpts = (0, component_utils_1.filterByType)(children, ebay_select_option_1.default).map(function (c) { return (0, react_1.isValidElement)(c) && (0, react_1.cloneElement)(c, {}); });
|
|
117
117
|
if (childrenOpts) {
|
|
118
118
|
optGroups = optionGroups(childrenOpts);
|
|
119
119
|
var currentGroupName_1;
|
|
@@ -32,7 +32,7 @@ var ebay_menu_button_1 = require("../ebay-menu-button");
|
|
|
32
32
|
var EbaySplitButton = function (_a) {
|
|
33
33
|
var a11yMenuText = _a.a11yMenuText, children = _a.children, type = _a.type, bodyState = _a.bodyState, a11yButtonLoadingText = _a.a11yButtonLoadingText, onCollapse = _a.onCollapse, onExpand = _a.onExpand, _b = _a.onSelect, onSelect = _b === void 0 ? function () { } : _b, _c = _a.onChange, onChange = _c === void 0 ? function () { } : _c, ref = _a.ref, rest = __rest(_a, ["a11yMenuText", "children", "type", "bodyState", "a11yButtonLoadingText", "onCollapse", "onExpand", "onSelect", "onChange", "ref"]);
|
|
34
34
|
var menuItemComponents = [ebay_menu_button_1.EbayMenuButtonItem, ebay_menu_button_1.EbayMenuButtonSeparator];
|
|
35
|
-
var buttonLabel = (0, component_utils_1.
|
|
35
|
+
var buttonLabel = (0, component_utils_1.excludeComponent)(children, menuItemComponents)[0];
|
|
36
36
|
var menuItems = (0, component_utils_1.filterByType)(children, menuItemComponents);
|
|
37
37
|
return (react_1.default.createElement("span", { className: "split-button" },
|
|
38
38
|
react_1.default.createElement(ebay_button_1.EbayButton, __assign({ "aria-label": bodyState === 'loading' ? a11yButtonLoadingText : undefined }, rest, { split: "start", bodyState: bodyState === 'expand' ? undefined : bodyState }), buttonLabel),
|
package/ebay-tabs/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,EAAE,EAAsD,MAAM,OAAO,CAAA;AAOnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA4FvB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
package/ebay-tabs/tabs.js
CHANGED
|
@@ -83,7 +83,7 @@ var Tabs = function (_a) {
|
|
|
83
83
|
}, [index]);
|
|
84
84
|
var isLarge = size === 'large';
|
|
85
85
|
var tabHeadings = (0, component_utils_1.filterByType)(children, tab_1.default).map(function (item, i) {
|
|
86
|
-
return (0, react_1.cloneElement)(item, __assign(__assign({}, item.props), { refCallback: function (ref) { headings[i] = ref; }, index: i, parentId: id, selected: selectedIndex === i, focused: focusedIndex === i, onClick: function () {
|
|
86
|
+
return (0, react_1.isValidElement)(item) && (0, react_1.cloneElement)(item, __assign(__assign({}, item.props), { refCallback: function (ref) { headings[i] = ref; }, index: i, parentId: id, selected: selectedIndex === i, focused: focusedIndex === i, onClick: function () {
|
|
87
87
|
handleSelect(i);
|
|
88
88
|
setFocusedIndex(i);
|
|
89
89
|
}, onKeyDown: function (e) { onKeyDown(e, i); } }));
|
|
@@ -93,9 +93,9 @@ var Tabs = function (_a) {
|
|
|
93
93
|
index: i,
|
|
94
94
|
parentId: id,
|
|
95
95
|
selected: selectedIndex === i,
|
|
96
|
-
children: item.
|
|
96
|
+
children: (0, component_utils_1.elementProps)(item).children
|
|
97
97
|
};
|
|
98
|
-
return (0, react_1.cloneElement)(item, itemProps);
|
|
98
|
+
return (0, react_1.isValidElement)(item) && (0, react_1.cloneElement)(item, itemProps);
|
|
99
99
|
});
|
|
100
100
|
return (react_1.default.createElement("div", { id: id, className: (0, classnames_1.default)(className, 'tabs') },
|
|
101
101
|
react_1.default.createElement("div", { className: (0, classnames_1.default)('tabs__items', { 'tabs__items--large': isLarge }), role: "tablist" }, tabHeadings),
|
|
@@ -25,6 +25,6 @@ export type EbayTextboxProps = {
|
|
|
25
25
|
forwardedRef?: Ref<HTMLTextAreaElement | HTMLInputElement>;
|
|
26
26
|
opaqueLabel?: boolean;
|
|
27
27
|
} & Omit<TextInputProps, 'onFocus' | 'onBlur' | 'onChange' | 'onKeyPress' | 'onKeyUp' | 'onKeyDown' | 'onInvalid'>;
|
|
28
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<EbayTextboxProps, "form" | "slot" | "style" | "title" | "pattern" | "forwardedRef" | "
|
|
28
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<EbayTextboxProps, "form" | "slot" | "style" | "title" | "pattern" | "forwardedRef" | "invalid" | "key" | "value" | "className" | "disabled" | "inputSize" | "placeholder" | "opaqueLabel" | "type" | "children" | "multiple" | "name" | "required" | "size" | "list" | "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" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "cols" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "rows" | "src" | "step" | "width" | "wrap" | "fluid" | "dirName" | "floatingLabel" | "multiline" | "onInputChange" | "onFloatingLabelInit" | "onButtonClick"> & React.RefAttributes<React.FC<EbayTextboxProps>>>;
|
|
29
29
|
export default _default;
|
|
30
30
|
//# sourceMappingURL=textbox.d.ts.map
|
package/ebay-textbox/textbox.js
CHANGED
|
@@ -135,7 +135,7 @@ var EbayTextbox = function (_a) {
|
|
|
135
135
|
react_1.default.createElement(Wrapper, { className: wrapperClassName },
|
|
136
136
|
prefixIcon,
|
|
137
137
|
react_1.default.createElement(Input, __assign({}, rest, { className: inputClassName, type: type, "aria-invalid": invalid, value: isControlled(controlledValue) ? controlledValue : inputValue, onChange: handleInputChange, onBlur: handleBlur, onFocus: handleFocus, onKeyPress: handleKeyPress, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, onInvalid: handleInvalid, autoFocus: autoFocus, ref: ref, placeholder: floatingLabelPlaceholder })),
|
|
138
|
-
postfixIcon && (0, react_1.cloneElement)(postfixIcon, __assign(__assign({}, postfixIcon.props), { onClick: function (e) {
|
|
138
|
+
(0, react_1.isValidElement)(postfixIcon) && (0, react_1.cloneElement)(postfixIcon, __assign(__assign({}, postfixIcon.props), { onClick: function (e) {
|
|
139
139
|
var _a = postfixIcon.props.onClick, iconClick = _a === void 0 ? function () { } : _a;
|
|
140
140
|
iconClick(e);
|
|
141
141
|
handleButtonClick(e);
|