@ebay/ui-core-react 8.3.0 → 8.5.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/README.md +5 -2
- package/common/component-utils/forwardRef.d.ts +2 -2
- package/common/component-utils/forwardRef.d.ts.map +1 -1
- package/common/component-utils/utils.d.ts +4 -4
- package/common/component-utils/utils.d.ts.map +1 -1
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/types.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/notice-utils/notice-content.d.ts +1 -1
- package/common/notice-utils/notice-content.d.ts.map +1 -1
- package/common/range.d.ts.map +1 -1
- package/common/tooltip-utils/constants.d.ts +2 -1
- package/common/tooltip-utils/constants.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts +3 -3
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -1
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -1
- package/dropdown-DyNGEyy6.js +22 -0
- package/ebay-accordion/accordion.d.ts.map +1 -1
- package/ebay-accordion/index.js +2 -2
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -1
- package/ebay-alert-dialog/index.js +1 -1
- package/ebay-avatar/avatar-image.d.ts.map +1 -1
- package/ebay-avatar/index.js +1 -1
- package/ebay-badge/index.js +1 -1
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +1 -1
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-breadcrumbs/index.js +1 -1
- package/ebay-button/index.js +1 -1
- package/ebay-calendar/calendar.d.ts.map +1 -1
- package/ebay-calendar/index.js +1 -1
- package/ebay-carousel/carousel-item.d.ts +3 -3
- package/ebay-carousel/carousel-item.d.ts.map +1 -1
- package/ebay-carousel/helpers.d.ts.map +1 -1
- package/ebay-carousel/index.js +1 -1
- package/ebay-ccd/README.md +64 -0
- package/ebay-ccd/ccd.d.ts +14 -0
- package/ebay-ccd/ccd.d.ts.map +1 -0
- package/ebay-ccd/index.d.ts +2 -0
- package/ebay-ccd/index.d.ts.map +1 -0
- package/ebay-ccd/index.js +1 -0
- package/ebay-character-count/README.md +44 -0
- package/ebay-character-count/character-count.d.ts +14 -0
- package/ebay-character-count/character-count.d.ts.map +1 -0
- package/ebay-character-count/index.d.ts +3 -0
- package/ebay-character-count/index.d.ts.map +1 -0
- package/ebay-character-count/index.js +1 -0
- package/ebay-checkbox/index.js +1 -1
- package/ebay-chip/index.js +1 -1
- package/ebay-chips-combobox/index.js +1 -1
- package/ebay-combobox/combobox.d.ts +1 -2
- package/ebay-combobox/combobox.d.ts.map +1 -1
- package/ebay-combobox/index.js +1 -1
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/ebay-confirm-dialog/index.js +1 -1
- package/ebay-cta-button/index.js +1 -1
- package/ebay-date-textbox/index.js +1 -1
- package/ebay-details/index.js +1 -1
- package/ebay-dialog-base/components/dialog-header.d.ts +2 -2
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts +2 -1
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -1
- package/ebay-dialog-base/index.js +41 -1
- package/ebay-drawer-dialog-deprecated/components/drawer.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/index.js +1 -1
- package/ebay-education-notice/education-notice.d.ts +0 -1
- package/ebay-education-notice/education-notice.d.ts.map +1 -1
- package/ebay-education-notice/index.js +1 -1
- package/ebay-eek/eek-util.d.ts.map +1 -1
- package/ebay-eek/index.js +1 -1
- package/ebay-fake-link/index.js +1 -1
- package/ebay-fake-menu/index.js +1 -1
- package/ebay-fake-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item.d.ts +1 -1
- package/ebay-fake-menu/menu-item.d.ts.map +1 -1
- package/ebay-fake-menu/menu.d.ts +2 -2
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu-button/index.js +1 -1
- package/ebay-fake-menu-button/menu-button-separator.d.ts +2 -2
- package/ebay-fake-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-tabs/index.js +1 -1
- package/ebay-field/index.js +1 -1
- package/ebay-field/types.d.ts +1 -1
- package/ebay-field/types.d.ts.map +1 -1
- package/ebay-file-input/README.md +59 -0
- package/ebay-file-input/file-input.d.ts +13 -0
- package/ebay-file-input/file-input.d.ts.map +1 -0
- package/ebay-file-input/index.d.ts +2 -0
- package/ebay-file-input/index.d.ts.map +1 -0
- package/ebay-file-input/index.js +1 -0
- package/ebay-file-input/types.d.ts +6 -0
- package/ebay-file-input/types.d.ts.map +1 -0
- package/ebay-file-preview-card/file-preview-action.d.ts +2 -2
- package/ebay-file-preview-card/file-preview-action.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-card.d.ts +3 -3
- package/ebay-file-preview-card/file-preview-card.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-content.d.ts.map +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-file-preview-card/types.d.ts +1 -2
- package/ebay-file-preview-card/types.d.ts.map +1 -1
- package/ebay-file-preview-card-group/README.md +65 -0
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts +12 -0
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts.map +1 -0
- package/ebay-file-preview-card-group/index.d.ts +2 -0
- package/ebay-file-preview-card-group/index.d.ts.map +1 -0
- package/ebay-file-preview-card-group/index.js +1 -0
- package/ebay-file-preview-card-group/types.d.ts +13 -0
- package/ebay-file-preview-card-group/types.d.ts.map +1 -0
- package/ebay-filter/index.js +1 -1
- package/ebay-filter-menu/index.js +1 -1
- package/ebay-filter-menu-button/filter-menu-button.d.ts.map +1 -1
- package/ebay-filter-menu-button/index.js +1 -1
- package/ebay-fullscreen-dialog-deprecated/fullscreen-dialog.d.ts.map +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
- package/ebay-icon/icon.d.ts +6 -0
- package/ebay-icon/icon.d.ts.map +1 -1
- package/ebay-icon/index.js +1 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/icon-button.d.ts +2 -5
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-icon-button/index.js +1 -1
- package/ebay-image-placeholder/README.md +46 -0
- package/ebay-image-placeholder/image-placeholder.d.ts +6 -0
- package/ebay-image-placeholder/image-placeholder.d.ts.map +1 -0
- package/ebay-image-placeholder/index.d.ts +2 -0
- package/ebay-image-placeholder/index.d.ts.map +1 -0
- package/ebay-image-placeholder/index.js +1 -0
- 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.d.ts +1 -1
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/index.js +5 -1
- package/ebay-inline-notice/index.js +1 -1
- package/ebay-lightbox-dialog/index.js +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-listbox/index.js +1 -1
- package/ebay-listbox/listbox.d.ts.map +1 -1
- package/ebay-listbox-button/index.js +2 -2
- package/ebay-listbox-button/listbox-button-option.d.ts +4 -4
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-menu/index.js +1 -1
- package/ebay-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu/types.d.ts +1 -1
- package/ebay-menu-button/index.js +1 -1
- 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/types.d.ts +1 -1
- package/ebay-menu-button/types.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -1
- package/ebay-notice-base/index.js +1 -1
- package/ebay-page-notice/index.js +1 -1
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-pagination/index.js +1 -1
- package/ebay-pagination/pagination-item.d.ts +1 -1
- package/ebay-pagination/pagination-item.d.ts.map +1 -1
- package/ebay-panel-dialog/index.js +1 -1
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -1
- package/ebay-progress-bar/index.js +1 -1
- package/ebay-progress-bar-expressive/index.js +1 -1
- package/ebay-progress-spinner/index.js +1 -1
- package/ebay-progress-stepper/index.js +1 -1
- package/ebay-radio/index.js +1 -1
- package/ebay-radio/radio.d.ts.map +1 -1
- package/ebay-section-notice/index.js +1 -1
- package/ebay-section-notice/section-notice.d.ts.map +1 -1
- package/ebay-section-title/index.js +1 -1
- package/ebay-segmented-buttons/index.js +1 -1
- package/ebay-select/index.js +1 -1
- package/ebay-signal/index.js +1 -1
- package/ebay-skeleton/ebay-skeleton-avatar.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-button.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-image.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-text.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-textbox.d.ts.map +1 -1
- package/ebay-skeleton/index.js +1 -1
- package/ebay-skeleton/types.d.ts +1 -0
- package/ebay-skeleton/types.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts.map +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/index.js +1 -1
- package/ebay-star-rating/index.js +1 -1
- package/ebay-star-rating-select/index.js +1 -1
- package/ebay-svg/index.js +1 -1
- package/ebay-svg/symbols.d.ts.map +1 -1
- package/ebay-switch/index.js +1 -1
- package/ebay-table/README.md +1 -0
- package/ebay-table/index.js +1 -1
- package/ebay-table/table-header.d.ts.map +1 -1
- package/ebay-table/table-row.d.ts +2 -2
- package/ebay-table/table-row.d.ts.map +1 -1
- package/ebay-table/table.d.ts +1 -0
- package/ebay-table/table.d.ts.map +1 -1
- package/ebay-tabs/index.js +1 -1
- package/ebay-textbox/index.js +1 -1
- package/ebay-textbox/postfix-icon.d.ts.map +1 -1
- package/ebay-textbox/prefix-icon.d.ts.map +1 -1
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-toast-dialog/index.js +1 -1
- package/ebay-toggle-button/index.js +1 -1
- package/ebay-toggle-button-group/index.js +1 -1
- package/ebay-tooltip/index.js +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts.map +1 -1
- package/ebay-tourtip/index.js +1 -1
- package/ebay-tri-state-checkbox/index.js +1 -1
- package/ebay-tri-state-checkbox/tri-state-checkbox.d.ts.map +1 -1
- package/ebay-video/controls.d.ts.map +1 -1
- package/ebay-video/index.js +385 -1
- package/ebay-video/reportButton.d.ts.map +1 -1
- package/ebay-video/types.d.ts +1 -1
- package/ebay-video/types.d.ts.map +1 -1
- package/ebay-video/video.d.ts.map +1 -1
- package/events/index.js +1 -1
- package/forwardRef-BGhnwltg.js +1 -0
- package/hooks-BsnjMXtj.js +1 -0
- package/index-B9dsnEky.js +1 -0
- package/index-BL7hPwtY.js +21 -0
- package/index-Banoekuf.js +29 -0
- package/index-BeJlcxe3.js +1 -0
- package/index-BgDjcBrE.js +1 -0
- package/index-BsU6iXoe.js +1 -0
- package/index-D5FUVa4d.js +1 -0
- package/index-DmNrJCd8.js +5 -0
- package/index-Q8sL9uBq.js +1 -0
- package/index-plT9bPAi.js +1 -0
- package/label-ACiBnv5P.js +1 -0
- package/menu-item-BjtmFgwz.js +1 -0
- package/menu-nih_gX8y.js +1 -0
- package/notice-content-x5HJ49Mm.js +1 -0
- package/notice-cta-CFuZePI4.js +1 -0
- package/notice-footer-DAKaAyB_.js +1 -0
- package/package.json +22 -83
- package/random-id-5bEmzZsS.js +1 -0
- package/reduced-motion-CBVd9_aJ.js +1 -0
- package/tslib.es6-UTo0M824.js +1 -0
- package/use-tooltip-B1NgwD6z.js +1 -0
- package/utils/index.js +1 -1
- package/utils-D1rplbEN.js +1 -0
- package/badge-BWhBKWCu.js +0 -1
- package/button-C3RhAySI.js +0 -1
- package/calendar-D91b1JOr.js +0 -1
- package/checkbox-BziMKlXl.js +0 -1
- package/chip-CFq5Sx2d.js +0 -1
- package/combobox-BcAuEyib.js +0 -1
- package/dialog-previous-button-ns64Jg1v.js +0 -1
- package/dropdown-BLiIyhWy.js +0 -1
- package/ebay-details-Co3xp8NP.js +0 -1
- package/filter-menu-Drtczmts.js +0 -1
- package/forwardRef-DBQKIlPy.js +0 -1
- package/hooks-DqYMvHrS.js +0 -1
- package/icon-button-DPIjQGta.js +0 -1
- package/icon-hO_8pLp7.js +0 -1
- package/label-BRztS0pw.js +0 -1
- package/lightbox-dialog-2MA5lJCC.js +0 -1
- package/menu-Bn7XgUPD.js +0 -1
- package/menu-button-label-DYmCCAX3.js +0 -1
- package/menu-button-label-gQ_TH2Br.js +0 -1
- package/menu-item-Bh7_6CFn.js +0 -1
- package/notice-content-9iF4T8uB.js +0 -1
- package/notice-cta-CKl_qBge.js +0 -1
- package/notice-footer-G6VPjVZu.js +0 -1
- package/progress-spinner-CTs1iaUV.js +0 -1
- package/radio-D1pzF7Mn.js +0 -1
- package/random-id-DlJj_RWH.js +0 -1
- package/reduced-motion-CMIhlQVx.js +0 -1
- package/textbox-XeJt9mMq.js +0 -1
- package/toggle-button-CugK7Hwz.js +0 -1
- package/tri-state-checkbox-f-0yBnVG.js +0 -1
- package/tslib.es6-C4EgNkz1.js +0 -1
- package/use-roving-index-DoAVBgsp.js +0 -1
- package/use-tooltip-BTMlwcb6.js +0 -1
- package/utils-C9NL3q0j.js +0 -1
|
@@ -2,7 +2,7 @@ import React, { ComponentProps, RefObject } from 'react';
|
|
|
2
2
|
import { Icon } from '../ebay-icon';
|
|
3
3
|
import { EbayKeyboardEventHandler } from '../common/event-utils/types';
|
|
4
4
|
import { Size } from '../ebay-button';
|
|
5
|
-
export type EbayIconButtonProps = {
|
|
5
|
+
export type EbayIconButtonProps = ComponentProps<'button'> & ComponentProps<'a'> & {
|
|
6
6
|
href?: string;
|
|
7
7
|
icon: Icon;
|
|
8
8
|
badgeNumber?: number;
|
|
@@ -12,9 +12,6 @@ export type EbayIconButtonProps = {
|
|
|
12
12
|
forwardedRef?: RefObject<HTMLAnchorElement & HTMLButtonElement>;
|
|
13
13
|
onEscape?: EbayKeyboardEventHandler;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
type HTMLAnchorProps = ComponentProps<'a'>;
|
|
17
|
-
type Props = EbayIconButtonProps & HTMLButtonProps & HTMLAnchorProps;
|
|
18
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<React.FC<Props>>>;
|
|
15
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<EbayIconButtonProps, "ref"> & React.RefAttributes<React.FC<EbayIconButtonProps>>>;
|
|
19
16
|
export default _default;
|
|
20
17
|
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ebay-icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3E,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAG7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAErC,MAAM,MAAM,mBAAmB,GAAG;
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ebay-icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3E,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAG7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAErC,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACvC,CAAA;;AA8DD,wBAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),R=require("../index-DmNrJCd8.js"),p=require("../index-plT9bPAi.js"),q=require("../ebay-badge/index.js"),N=require("../forwardRef-BGhnwltg.js");require("../array.polyfill.flat-5BAolFdk.js");const $=c=>{var{href:t,icon:u,badgeNumber:r,badgeAriaLabel:y,transparent:m,className:f,forwardedRef:o,size:s,onEscape:E=()=>{},onKeyDown:g=()=>{}}=c,i=w.__rest(c,["href","icon","badgeNumber","badgeAriaLabel","transparent","className","forwardedRef","size","onEscape","onKeyDown"]);const a=t?"icon-link":"icon-btn",b=R.classNames(f,a,s&&`${a}--${s}`,{[`${a}--badged`]:r,[`${a}--transparent`]:m}),l=e.React.createElement(e.React.Fragment,null,e.React.createElement(p.EbayIcon,{name:u}),r&&e.React.createElement(q.EbayBadge,{type:"icon",number:r,"aria-label":y})),d=n=>{(n.key==="Escape"||n.key==="Esc")&&E(n),g(n)};return t?e.React.createElement("a",Object.assign({ref:o,className:b,href:t,onKeyDown:d},i),l):e.React.createElement("button",Object.assign({ref:o,type:"button",className:b,onKeyDown:d},i),l)},B=N.withForwardRef($);exports.EbayIconButton=B;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# EbayImagePlaceholder
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main?path=/docs/graphics-icons-ebay-image-placeholder--docs)
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
### Import JS
|
|
11
|
+
|
|
12
|
+
```jsx harmony
|
|
13
|
+
import { EbayImagePlaceholder } from "@ebay/ui-core-react/ebay-image-placeholder";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Import following styles from SKIN
|
|
17
|
+
|
|
18
|
+
```jsx harmony
|
|
19
|
+
import "@ebay/skin/image-placeholder";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
23
|
+
|
|
24
|
+
```jsx harmony
|
|
25
|
+
import "@ebay/skin/tokens";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Or import styles using SCSS/CSS
|
|
29
|
+
|
|
30
|
+
```jsx harmony
|
|
31
|
+
import "@ebay/skin/image-placeholder.css";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Import icons
|
|
35
|
+
|
|
36
|
+
Add the below icon to the `EbaySvg` component.
|
|
37
|
+
|
|
38
|
+
Note: Make sure that `EbaySvg` is only rendered on the server so it does not affect the client bundle size.
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
<EbaySvg
|
|
42
|
+
icons={[
|
|
43
|
+
"imagePlaceholder",
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentProps, FC } from "react";
|
|
2
|
+
import { EbayIcon } from "../ebay-icon";
|
|
3
|
+
export type EbayImagePlaceholderProps = Omit<ComponentProps<typeof EbayIcon>, 'name' | 'iconPrefix'>;
|
|
4
|
+
declare const EbayImagePlaceholder: FC<EbayImagePlaceholderProps>;
|
|
5
|
+
export default EbayImagePlaceholder;
|
|
6
|
+
//# sourceMappingURL=image-placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-placeholder.d.ts","sourceRoot":"","sources":["../../src/ebay-image-placeholder/image-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAa,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAA;AAEpG,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAEvD,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-image-placeholder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../index-Banoekuf.js"),t=require("../index-plT9bPAi.js"),c=e=>a.React.createElement(t.EbayIcon,Object.assign({},e,{name:"imagePlaceholder",__type:"none"}));exports.EbayImagePlaceholder=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentProps, RefObject, ReactNode } from 'react';
|
|
2
2
|
import { Icon } from '../ebay-icon';
|
|
3
3
|
import { Variant } from './types';
|
|
4
|
-
type InfotipHostProps = Omit<ComponentProps<'button'>, 'children'> & {
|
|
4
|
+
export type InfotipHostProps = Omit<ComponentProps<'button'>, 'children'> & {
|
|
5
5
|
icon?: Icon;
|
|
6
6
|
forwardedRef?: RefObject<HTMLAnchorElement & HTMLButtonElement>;
|
|
7
7
|
variant?: Variant;
|
|
@@ -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,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,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"}
|
|
@@ -2,7 +2,7 @@ import { CSSProperties, FC, ReactNode } from 'react';
|
|
|
2
2
|
import { PointerDirection } from '../common/tooltip-utils';
|
|
3
3
|
import { Icon } from '../ebay-icon';
|
|
4
4
|
import { Variant } from './types';
|
|
5
|
-
type InfotipProps = {
|
|
5
|
+
export type InfotipProps = {
|
|
6
6
|
variant?: Variant;
|
|
7
7
|
icon?: Icon;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ebay-infotip.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,aAAa,EAAE,EAAE,EAAU,SAAS,EAAE,MAAM,OAAO,CAAA;AAGhG,OAAO,EAAwC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ebay-infotip.d.ts","sourceRoot":"","sources":["../../src/ebay-infotip/ebay-infotip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,aAAa,EAAE,EAAE,EAAU,SAAS,EAAE,MAAM,OAAO,CAAA;AAGhG,OAAO,EAAwC,gBAAgB,EAA4B,MAAM,yBAAyB,CAAA;AAG1H,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAIjC,MAAM,MAAM,YAAY,GAAG;IACvB,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;CACxB,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,YAAY,CA0FjC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
package/ebay-infotip/index.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../tslib.es6-UTo0M824.js"),o=require("../index-Banoekuf.js"),T=require("../index-DmNrJCd8.js"),v=require("../utils-D1rplbEN.js"),E=require("../use-tooltip-B1NgwD6z.js"),P=require("../ebay-dialog-base/index.js"),A=require("../index-plT9bPAi.js");require("../ebay-icon-button/index.js");const F=require("../forwardRef-BGhnwltg.js"),$=require("../ebay-lightbox-dialog/index.js");var h={exports:{}};/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/var O;function B(){return O||(O=1,function(a){(function(){var s=function(){function c(){}c.prototype=Object.create(null);function l(n,e){for(var t=e.length,r=0;r<t;++r)u(n,e[r])}var m={}.hasOwnProperty;function b(n,e){n[e]=!0}function p(n,e){if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){n[e.toString()]=!0;return}for(var t in e)m.call(e,t)&&(n[t]=!!e[t])}var g=/\s+/;function f(n,e){for(var t=e.split(g),r=t.length,i=0;i<r;++i)n[t[i]]=!0}function u(n,e){if(e){var t=typeof e;t==="string"?f(n,e):Array.isArray(e)?l(n,e):t==="object"?p(n,e):t==="number"&&b(n,e)}}function y(){for(var n=arguments.length,e=Array(n),t=0;t<n;t++)e[t]=arguments[t];var r=new c;l(r,e);var i=[];for(var d in r)r[d]&&i.push(d);return i.join(" ")}return y}();a.exports?(s.default=s,a.exports=s):window.classNames=s})()}(h)),h.exports}var L=B();const M=o.getDefaultExportFromCjs(L),z=a=>{var{icon:s,className:c,children:l,forwardedRef:m,variant:b}=a,p=x.__rest(a,["icon","className","children","forwardedRef","variant"]);const g=b==="modal"?"dialog--mini":"infotip",f=o.React.createElement(A.EbayIcon,{name:s}),u=l instanceof Function?l({icon:f}):l;return o.React.createElement("button",Object.assign({},p,{className:M("icon-btn icon-btn--transparent",c,`${g}__host`),type:"button",ref:m}),u||f)},R=F.withForwardRef(z),G=({variant:a="default",pointer:s,overlayStyle:c,disabled:l,onExpand:m,onCollapse:b,children:p,initialExpanded:g,icon:f="information16",a11yCloseText:u,"aria-label":y,className:n})=>{const e=o.reactExports.useRef(null),{isExpanded:t,expandTooltip:r,collapseTooltip:i}=E.useTooltip({onCollapse:b,onExpand:m,initialExpanded:g,hostRef:e}),d=a==="modal",H=o.reactExports.useRef(null),_=v.findComponent(p,j),N=v.findComponent(p,D),C=v.findComponent(p,R)||o.reactExports.createElement(R),S=()=>{t?i():r()};if(!N)throw new Error("EbayInfotip: Please use a EbayInfotipContent that defines the content of the infotip");const w=N.props,{children:I}=w,q=x.__rest(w,["children"]);return o.React.createElement(o.React.Fragment,null,o.React.createElement(E.Tooltip,{type:"infotip",isExpanded:t,className:T.classNames(n,{"dialog--mini":d}),ref:H},o.React.createElement(E.TooltipHost,null,o.reactExports.cloneElement(C,Object.assign({ref:e,onClick:S,disabled:l,variant:a,"aria-label":y,"aria-expanded":t,icon:f},C.props))),!d&&o.React.createElement(E.TooltipContent,Object.assign({},q,{type:"infotip",style:c,pointer:s,showCloseButton:!0,a11yCloseText:u,onClose:i}),_,I)),d&&o.React.createElement($.EbayLightboxDialog,Object.assign({},q,{open:t,onClose:i,a11yCloseText:u,className:"dialog--mini__overlay"}),o.React.createElement(P.EbayDialogHeader,null,_),I))},j=a=>{var{className:s}=a,c=x.__rest(a,["className"]);return o.React.createElement("span",Object.assign({},c,{className:T.classNames("infotip__heading",s)}))},D=({children:a})=>o.React.createElement(o.React.Fragment,null,a);exports.EbayInfotip=G;exports.EbayInfotipContent=D;exports.EbayInfotipHeading=j;exports.EbayInfotipHost=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),E=require("../index-DmNrJCd8.js"),c=require("../notice-content-C0ZStfuX.js"),N=require("../notice-content-x5HJ49Mm.js"),y=require("../utils-D1rplbEN.js"),m=require("../index-plT9bPAi.js"),h=i=>{var{className:r,status:t="general",children:s,hidden:n=!1,"aria-label":l,onNoticeShow:u=()=>{}}=i,b=d.__rest(i,["className","status","children","hidden","aria-label","onNoticeShow"]);if(e.reactExports.useEffect(()=>{n||u()},[n]),n)return null;const a=y.findComponent(s,c.EbayNoticeContent);if(!a)throw new Error("EbayInlineNotice: Please use a EbayNoticeContent that defines the content of the notice");const o=t==="general";return e.React.createElement("div",Object.assign({},b,{className:E.classNames(r,"inline-notice",{[`inline-notice--${t}`]:!o})}),o?null:e.React.createElement("span",{className:"inline-notice__header"},e.React.createElement(m.EbayIcon,{name:`${t}Filled16`,a11yText:l,a11yVariant:"label"})),e.React.createElement(N.NoticeContent,Object.assign({},a.props,{type:"inline"})))};exports.EbayNoticeContent=c.EbayNoticeContent;exports.EbayInlineNotice=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../tslib.es6-UTo0M824.js"),s=require("../index-Banoekuf.js"),n=require("../index-DmNrJCd8.js"),d=require("../ebay-dialog-base/index.js");require("../ebay-icon-button/index.js");const m=o=>{var{open:l,mode:r,size:a,bannerImgSrc:e,bannerImgPosition:g,onClose:t=()=>{}}=o,i=b.__rest(o,["open","mode","size","bannerImgSrc","bannerImgPosition","onClose"]);const c=e?s.React.createElement("div",{className:"lightbox-dialog__image",style:{backgroundImage:`url(${e})`,backgroundPosition:g}}):i.top;return s.React.createElement(d.DialogBaseWithState,Object.assign({buttonPosition:"right"},i,{classPrefix:"lightbox-dialog",onCloseBtnClick:t,onBackgroundClick:t,className:n.classNames(i.className,"lightbox-dialog--mask-fade",{[`lightbox-dialog--${a}`]:a,"lightbox-dialog--expressive":e}),windowClass:n.classNames("lightbox-dialog__window--animate",{"lightbox-dialog__window--mini":r==="mini"}),top:c,open:l}))};exports.EbayLightboxDialog=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightbox-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-lightbox-dialog/lightbox-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,aAAa,EACb,EAAE,EACL,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAGnE,KAAK,IAAI,GAAG,SAAS,GAAG,MAAM,CAAA;AAC9B,KAAK,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"lightbox-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-lightbox-dialog/lightbox-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,aAAa,EACb,EAAE,EACL,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAGnE,KAAK,IAAI,GAAG,SAAS,GAAG,MAAM,CAAA;AAC9B,KAAK,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAA;AAGtD,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACxD,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,CAAA;AAED,QAAA,MAAM,kBAAkB,EAAE,EAAE,CAAC,KAAK,CAwCjC,CAAA;AACD,eAAe,kBAAkB,CAAA"}
|
package/ebay-listbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),A=require("../index-BsU6iXoe.js"),g=require("../index-DmNrJCd8.js"),O=require("../utils-D1rplbEN.js"),B=require("../scroll-OgAngNzq.js"),F=require("../index-plT9bPAi.js");function E(){let o,a="";return{getIndex:function(l,m,d){a=a.concat(m);let u;if(l==null)return-1;const x=a.toLocaleLowerCase();return u=[...l].findIndex(r=>r.textContent.toLocaleLowerCase().startsWith(x)),u===-1&&(u=[...l].findIndex(r=>r.textContent.toLocaleLowerCase().includes(x))),setTimeout(()=>{clearTimeout(o),a=""},d),u},destroy:function(){}}}const w=o=>{var{children:a,className:l}=o,m=N.__rest(o,["children","className"]);return e.React.createElement("div",Object.assign({className:g.classNames("listbox__description",l)},m),a)},D=o=>{var{className:a,icon:l,text:m,children:d,disabled:u,tabIndex:x,selected:r}=o,_=N.__rest(o,["className","icon","text","children","disabled","tabIndex","selected"]);const s=O.filterByType(d,w),v=m||(s!=null&&s.length?"":d);return e.React.createElement("div",Object.assign({},_,{tabIndex:u?-1:x,className:g.classNames("listbox__option",a),"aria-disabled":u,"aria-selected":r,role:"option"}),l?e.React.createElement("span",{className:"listbox__value"},l,v?e.React.createElement("span",null,v):null,s!=null&&s.length?s:null):e.React.createElement(e.React.Fragment,null,e.React.createElement("span",{className:"listbox__value"},v),s!=null&&s.length?s:null),e.React.createElement(F.EbayIcon,{name:"tick16"}))};var T;const{default:K=E}=(T=E==null?void 0:E.default)!=null&&T.__esModule?E.default:E,P=1300,G=o=>{var a,{name:l,className:m,disabled:d,children:u,tabIndex:x=0,listSelection:r,maxHeight:_,typeaheadTimeoutLength:s,selectClassName:v,onChange:k=()=>{},onEscape:q=()=>{}}=o,S=N.__rest(o,["name","className","disabled","children","tabIndex","listSelection","maxHeight","typeaheadTimeoutLength","selectClassName","onChange","onEscape"]);const p=O.filterByType(u,D),R=p.findIndex(t=>t.props.selected),[b,I]=e.reactExports.useState(p.findIndex(t=>t.props.selected));e.reactExports.useEffect(()=>{R!==b&&I(R)},[R]);const c=e.reactExports.useRef(null),f=e.reactExports.useRef(null),h=e.reactExports.useRef(null),y=e.reactExports.useRef(!1);function C(t,n,i){n===b||p[n].props.disabled||(I(n),k(t,{index:n,selected:[p[n].props.value],wasClicked:i}))}function j(t){switch(t.code){case"Esc":case"Escape":q();break;case"Space":case"Enter":C(t,f.current.index,!1);break}const n=h.current.getIndex(c.current.children,t.key,s||P);if(n!==-1){f.current.index=n;const i=c.current.querySelectorAll("[role=option]")[n];c.current.scrollTop=i.offsetTop-c.current.offsetHeight/2}}function H(){y.current=!0}return e.reactExports.useEffect(()=>{const t=n=>{const i=parseInt(n.detail.toIndex,10),L=c.current?c.current.querySelectorAll("[role=option]")[b]:null,M=y.current;B.scroll(L),y.current&&(y.current=!1),C(n,i,M)};if(p.length&&!d){const n=c.current,i=c.current;f.current=A.createLinear(n,i,i,".listbox__option[role=option]",{activeDescendantClassName:"listbox__option--active",autoInit:b,autoReset:null,autoScroll:r!=="auto"}),h.current=K()}return r==="auto"&&c.current.addEventListener("activeDescendantChange",t),()=>{f.current&&(f.current.reset(),f.current.destroy(),f.current=void 0),h.current&&(h.current.destroy(),h.current=void 0),c.current&&c.current.removeEventListener("activeDescendantChange",t)}},[b,d,r]),e.React.createElement(e.React.Fragment,null,e.React.createElement("div",Object.assign({},S,{tabIndex:x,ref:c,role:"listbox",onKeyDown:r!=="auto"?j:void 0,className:g.classNames("listbox__options",m),style:{maxHeight:_}}),p.map((t,n)=>e.reactExports.cloneElement(t,Object.assign(Object.assign({key:t.props.value||n},t.props),{onMouseDown:r==="auto"?H:void 0,onClick:i=>{r!=="auto"&&C(i,n,!0)},selected:n===b})))),e.React.createElement("select",{hidden:!0,className:g.classNames("listbox__native",v),name:l,disabled:d,value:(a=p[b])===null||a===void 0?void 0:a.props.value,onChange:()=>{}},p.map((t,n)=>e.React.createElement("option",{key:t.props.value||n,value:t.props.value,disabled:t.props.disabled}))))};exports.EbayListbox=G;exports.EbayListboxOption=D;exports.EbayListboxOptionDescription=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox/listbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"listbox.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox/listbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA6B,EAAE,EAAwC,MAAM,OAAO,CAAA;AAIlG,OAAO,EAAE,cAAc,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAA;AAGnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAIlD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,sBAAsB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2L5C,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
EbayListboxButtonOption that defines the options of the listbox`);const Q=()=>{const e=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("../tslib.es6-UTo0M824.js"),o=require("../index-Banoekuf.js"),w=require("../index-DmNrJCd8.js"),U=require("../index-plT9bPAi.js"),me=require("../utils-D1rplbEN.js"),ve=require("../dropdown-DyNGEyy6.js"),V=p=>{var{value:u,children:m,selected:v,onClick:d,index:E,innerRef:g,className:h}=p,O=M.__rest(p,["value","children","selected","onClick","index","innerRef","className"]);const R=w.classNames("listbox-button__option",h,{"listbox-button__option--active":v});return o.React.createElement("div",Object.assign({},O,{className:R,role:"option","aria-selected":v,ref:g,onClick:b=>{d(b,u,E)}}),o.React.createElement("span",{className:"listbox-button__value"},m),o.React.createElement(U.EbayIcon,{name:"tick16"}))},Ee=p=>{var u,{children:m,name:v,value:d,selected:E,borderless:g,fluid:h,className:O,maxHeight:R,prefixId:b,prefixLabel:B,floatingLabel:_,unselectedText:W="-",onChange:S=()=>{},onCollapse:z=()=>{},onExpand:G=()=>{}}=p,J=M.__rest(p,["children","name","value","selected","borderless","fluid","className","maxHeight","prefixId","prefixLabel","floatingLabel","unselectedText","onChange","onCollapse","onExpand"]);const r=o.reactExports.useRef(null),k=o.reactExports.useRef(new Map),c=me.filterByType(m,V);if(!c.length)throw new Error(`EbayListboxButton: Please use a
|
|
2
|
+
EbayListboxButtonOption that defines the options of the listbox`);const Q=()=>{const e=E!==void 0?E:c.findIndex(({props:s})=>d!==void 0&&s.value===d),t=e>-1||_?e:void 0;return{option:c[t],index:t}},{option:L,index:T}=Q(),[a,f]=o.reactExports.useState(L),[n,I]=o.reactExports.useState(T),[x,D]=o.reactExports.useState(),[X,Y]=o.reactExports.useState(!1),[H,A]=o.reactExports.useState(),{overlayStyles:Z,refs:y}=ve.useFloatingDropdown({open:x}),C=y.host,ee=y.overlay;o.reactExports.useEffect(()=>{f(L)},[d]);const l=o.reactExports.Children.toArray(m),q=e=>l[e].props.value,te=o.reactExports.useCallback(e=>l.findIndex(({props:t})=>t.value===e),[l]),oe=e=>k.current.get(e),i=()=>{D(!1),z()},ne=()=>{D(!0),G()},se=()=>{x?i():ne()},$=(e,t)=>{f(l[t]),I(t),i(),C.current.focus(),S(e,{index:t,selected:[String(q(t))],wasClicked:H}),A(!1)},ae=()=>{i(),f(l[T])},ce=e=>{const t=r.current.children[e];t.setAttribute("aria-selected","true"),t.classList.add("listbox-button__option--active")},le=e=>{const t=r.current.children[e];t.setAttribute("aria-selected","false"),t.classList.remove("listbox-button__option--active")},re=e=>{const t=ee.current,s=oe(e);if(t.scrollHeight>t.clientHeight){const xe=t.clientHeight+t.scrollTop,K=s.offsetTop+s.offsetHeight;K>xe?t.scrollTop=K-t.clientHeight:s.offsetTop<t.scrollTop&&(t.scrollTop=s.offsetTop)}},j=e=>{ce(n===void 0||e===-1?0:e),le(n===void 0||n===-1?0:n),re(e),I(e),f(l[e])},P=e=>setTimeout(()=>{var t;return(t=r==null?void 0:r.current)===null||t===void 0?void 0:t.focus(e)},0),ie=()=>{se(),P({preventScroll:!0})},pe=e=>{switch(e.key){case"Escape":i();break;case"Enter":P();break}},ue=e=>{switch(e.key){case" ":case"PageUp":case"PageDown":case"Home":case"End":e.preventDefault();break;case"Down":case"ArrowDown":e.preventDefault(),n!==c.length-1&&j(n<c.length-1?n+1:0);break;case"Up":case"ArrowUp":e.preventDefault(),n!==0&&j(n>0?n-1:c.length-1);break;case"Enter":i(),setTimeout(()=>f(l[n])),setTimeout(()=>C.current.focus(),0),S(e,{index:n,selected:[String(q(n))],wasClicked:H});break;case"Esc":case"Escape":ae();break}},N=c.map((e,t)=>o.reactExports.cloneElement(e,{index:t,key:t,selected:a&&e.props.value===a.props.value,id:e.props.id||`listbox_btn_${e.props.value}_${t}`,onClick:s=>$(s,t),innerRef:s=>{s?k.current.set(t,s):k.current.delete(t)}})),de=w.classNames("listbox-button",O,{"listbox-button--fluid":h}),be=w.classNames("btn",{"btn--form":!g,"btn--borderless":g,"btn--floating-label":_&&a}),F=b&&"expand-btn-text",fe=o.React.createElement(o.React.Fragment,null,_&&o.React.createElement("span",{className:"btn__floating-label"},_),B&&o.React.createElement("span",{className:"btn__label"},B),o.React.createElement("span",{className:"btn__text",id:F},(a==null?void 0:a.props.children)||W));return o.React.createElement("span",{className:de},o.React.createElement("button",Object.assign({},J,{onFocus:()=>Y(!0),type:"button",className:be,"aria-expanded":!!x,"aria-haspopup":"listbox","aria-labelledby":b&&`${b} ${F}`,onClick:ie,onMouseDown:e=>e.preventDefault(),onKeyUp:pe,ref:y.setHost}),o.React.createElement("span",{className:"btn__cell"},fe,o.React.createElement(U.EbayIcon,{name:"chevronDown12"}))),(x||X)&&o.React.createElement("div",{className:"listbox-button__listbox",ref:y.setOverlay,style:Object.assign(Object.assign({},Z),{maxHeight:R})},o.React.createElement("div",{className:"listbox-button__options",role:"listbox",tabIndex:x?0:-1,ref:r,"aria-activedescendant":(u=N[n])===null||u===void 0?void 0:u.props.id,onKeyDown:e=>ue(e),onMouseDown:e=>{e.preventDefault(),A(!0)},onBlur:()=>{i(),setTimeout(()=>C.current.focus(),0)}},N)),o.React.createElement("select",{hidden:!0,className:"listbox-button__native",name:v,onChange:e=>$(e,te(e.target.value)),value:a?a==null?void 0:a.props.value:""},N.map((e,t)=>o.React.createElement("option",{value:e.props.value,key:t}))))};exports.EbayListboxButton=Ee;exports.EbayListboxButtonOption=V;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ComponentProps, FC, MouseEvent, RefObject } from 'react';
|
|
2
|
-
type EbayListboxButtonOptionProps = ComponentProps<'input'> & {
|
|
1
|
+
import { ComponentProps, FC, MouseEvent, RefCallback, RefObject } from 'react';
|
|
2
|
+
export type EbayListboxButtonOptionProps = ComponentProps<'input'> & {
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
index?: number;
|
|
5
|
-
onClick?: (event: MouseEvent<HTMLDivElement>, value:
|
|
6
|
-
innerRef?: RefObject<HTMLDivElement>;
|
|
5
|
+
onClick?: (event: MouseEvent<HTMLDivElement>, value: ComponentProps<'input'>['value'], index: number) => void;
|
|
6
|
+
innerRef?: RefObject<HTMLDivElement> | RefCallback<HTMLDivElement>;
|
|
7
7
|
};
|
|
8
8
|
declare const ListboxOption: FC<EbayListboxButtonOptionProps>;
|
|
9
9
|
export default ListboxOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-button-option.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button-option.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listbox-button-option.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button-option.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrF,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,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9G,QAAQ,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;CACtE,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,4BAA4B,CAwBnD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-button.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEV,cAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"listbox-button.d.ts","sourceRoot":"","sources":["../../src/ebay-listbox-button/listbox-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEV,cAAc,EAAE,EAAE,EAErB,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,sBAAsB,EAAO,MAAM,6BAA6B,CAAA;AAKzE,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACvB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACvE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,sBAAsB,CAoS7C,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/ebay-menu/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../menu-nih_gX8y.js"),s=require("../tslib.es6-UTo0M824.js"),n=require("../index-Banoekuf.js"),u=require("../index-DmNrJCd8.js"),c=e=>{var{className:r}=e,t=s.__rest(e,["className"]);return n.React.createElement("hr",Object.assign({},t,{className:u.classNames(r,"menu__separator")}))};exports.EbayMenu=a.EbayMenu;exports.EbayMenuItem=a.EbayMenuItem;exports.EbayMenuSeparator=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/menu-item-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"menu-item-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/menu-item-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAQpC,CAAA;AAED,eAAe,qBAAqB,CAAA"}
|
package/ebay-menu/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAA;AAOd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;;
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAA;AAOd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;;AA6J5C,wBAAuC"}
|
package/ebay-menu/types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type EbayMenuProps = ContainerDivProps & ContainerSpanProps & {
|
|
|
24
24
|
onKeyDown?: EbayMenuKeyDownEventHandler;
|
|
25
25
|
onChange?: EbayMenuChangeEventHandler;
|
|
26
26
|
onSelect?: EbayMenuSelectEventHandler;
|
|
27
|
-
forwardedRef?: Ref<HTMLDivElement
|
|
27
|
+
forwardedRef?: Ref<HTMLDivElement & HTMLSpanElement>;
|
|
28
28
|
menuRef?: Ref<HTMLDivElement>;
|
|
29
29
|
};
|
|
30
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),d=require("../index-DmNrJCd8.js"),h=require("../utils-D1rplbEN.js"),I=require("../menu-nih_gX8y.js"),ne=require("../ebay-button/index.js"),te=require("../ebay-icon-button/index.js"),N=require("../index-plT9bPAi.js"),ae=require("../random-id-5bEmzZsS.js"),oe=require("../index-Bsb1LHpi.js"),se=require("../dropdown-DyNGEyy6.js"),ce=a=>{var{type:o,variant:s="button",className:m,text:p="",fixWidth:b,reverse:r,expanded:g,noToggleIcon:l,checked:E,collapseOnSelect:S,a11yText:q,prefixId:v,prefixLabel:w,onClick:j=()=>{},onExpand:L=()=>{},onCollapse:T=()=>{},onChange:A=()=>{},onSelect:D=()=>{},children:f}=a,F=R.__rest(a,["type","variant","className","text","fixWidth","reverse","expanded","noToggleIcon","checked","collapseOnSelect","a11yText","prefixId","prefixLabel","onClick","onExpand","onCollapse","onChange","onSelect","children"]);const[c,x]=e.reactExports.useState(g),[k,K]=e.reactExports.useState(),{overlayStyles:W,refs:u}=se.useFloatingDropdown({open:c,options:{reverse:r}}),P=u.host,$=u.overlay,B=h.filterByType(f,[I.EbayMenuItem,M]),H=B.map(n=>!!n.props.checked),[y,V]=e.reactExports.useState(H),z=h.findComponent(f,O),G=h.findComponent(f,N.EbayIcon),J=re({text:p,prefixId:v,prefixLabel:w,menuButtonLabel:z,icon:G}),Q=d.classNames("menu-button",m),U=d.classNames("menu-button__menu",{"menu-button__menu--fix-width":b,"menu-button__menu--reverse":r});e.reactExports.useEffect(()=>{const n=t=>{const i=$.current,_=i&&i.contains(t.target);(S||!_)&&x(!1)};return c?(L(),setTimeout(()=>{document.addEventListener("click",n,!1)})):c===!1&&T(),()=>document.removeEventListener("click",n,!1)},[c]),e.reactExports.useEffect(()=>{K(ae.randomId())},[]);const X=n=>{oe.handleEscapeKeydown(n,()=>{var t;x(!1),(t=P.current)===null||t===void 0||t.focus()})},C=Object.assign({ref:u.setHost,className:"menu-button__button","aria-expanded":!!c,"aria-haspopup":!0,"aria-label":q,"aria-controls":k,"aria-labelledby":v,onClick:n=>{x(!c),j(n)}},F),Y=(n,t)=>{if(o==="radio"||o==="checkbox"){const i=y.map((_,ee)=>t.indexes.includes(ee));V(i)}A(n,t)},Z=()=>{const n=y.findIndex(Boolean);return n>-1?n:E};return e.React.createElement("span",{className:Q},s==="overflow"?e.React.createElement(te.EbayIconButton,Object.assign({icon:"overflowVertical16"},C)):e.React.createElement(ne.EbayButton,Object.assign({variant:s==="form"?"form":void 0},C),J,l?null:e.React.createElement(N.EbayIcon,{name:"chevronDown12"})),c&&e.React.createElement(I.EbayMenu,{baseEl:"div",ref:u.setOverlay,type:o,className:U,tabIndex:-1,id:k,autofocus:!0,checked:Z(),onKeyDown:X,onChange:Y,onSelect:D,style:W},B.map((n,t)=>e.reactExports.cloneElement(n,Object.assign(Object.assign({},n.props),{className:d.classNames(n.props.className,"menu-button__item"),key:t,checked:y[t]})))))};function re({text:a,prefixId:o,prefixLabel:s,menuButtonLabel:m,icon:p}){const b=a.length?e.React.createElement("span",null,a):null,r=!o&&s&&e.React.createElement(e.React.Fragment,null,e.React.createElement("span",{className:"menu-button-prefix-label",key:"prefix-label"},s)," ");return[p,r,m||b].filter(Boolean).map((l,E)=>e.reactExports.cloneElement(l,Object.assign(Object.assign({},l.props),{key:E})))}const M=a=>{var{className:o}=a,s=R.__rest(a,["className"]);return e.React.createElement("hr",Object.assign({},s,{className:d.classNames(o,"menu-button__separator")}))},O=({children:a})=>e.React.createElement(e.React.Fragment,null,a);exports.EbayMenuButtonItem=I.EbayMenuItem;exports.EbayMenuButton=ce;exports.EbayMenuButtonLabel=O;exports.EbayMenuButtonSeparator=M;
|
|
@@ -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,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,KAAK,
|
|
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,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,KAAK,CAQtC,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,EAAgC,EAAE,
|
|
1
|
+
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgC,EAAE,EAAyC,MAAM,OAAO,CAAA;AAQtG,OAAO,EAAgF,eAAe,EAAE,MAAM,SAAS,CAAA;AASvH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAqJvC,CAAA;AAUD,eAAe,cAAc,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EbayMenuChangeEventHandler, EbayMenuSelectEventHandler, EbayMenuType } from '../ebay-menu';
|
|
2
2
|
import { EbayButtonProps } from '../ebay-button';
|
|
3
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
3
|
+
import { ComponentProps, ReactElement, JSX } from 'react';
|
|
4
4
|
export type EbayMenuButtonVariant = 'overflow' | 'form' | 'button';
|
|
5
5
|
export type EbayMenuButtonProps = {
|
|
6
6
|
a11yText?: string;
|
|
@@ -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,YAAY,EAAE,MAAM,OAAO,CAAA;
|
|
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,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEzD,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,YAAY,CAAC;IAC/B,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACpB,CAAA"}
|
|
@@ -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,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,KAAK,oBAAoB,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,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,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,KAAK,oBAAoB,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,eAAe,GAAI,cAAc,oBAAoB,KAAG,SAI7D,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-Banoekuf.js"),n=require("../notice-content-C0ZStfuX.js"),o=({children:e})=>t.React.createElement("span",{className:"page-notice__title"},e);exports.EbayNoticeContent=n.EbayNoticeContent;exports.EbayNoticeTitle=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),C=require("../notice-content-x5HJ49Mm.js"),l=require("../notice-content-C0ZStfuX.js"),o=require("../index-plT9bPAi.js"),P=require("../utils-D1rplbEN.js");require("../index-DmNrJCd8.js");const b=require("../notice-footer-DAKaAyB_.js"),h=require("../notice-cta-CFuZePI4.js"),R=t=>{var{id:a,status:n="general",children:c,a11yDismissText:i,"aria-label":y,onDismiss:E=()=>{}}=t,u=r.__rest(t,["id","status","children","a11yDismissText","aria-label","onDismiss"]);const[g,d]=e.reactExports.useState(!1),s=P.findComponent(c,l.EbayNoticeContent);if(!s)throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");const N=p=>{d(!0),E(p)};return g?null:e.React.createElement("section",Object.assign({},u,{"aria-labelledby":a||`${n}-status`,className:`page-notice ${n!=="general"?`page-notice--${n}`:""}`}),n!=="general"?e.React.createElement("div",{className:"page-notice__header",id:a||`${n}-status`},e.React.createElement(o.EbayIcon,{name:`${n}Filled16`,a11yText:y,a11yVariant:"label"})):null,e.React.createElement(C.NoticeContent,Object.assign({},s.props,{type:"page"})),c,i&&e.React.createElement(m,null,e.React.createElement("button",{"aria-label":i,className:"fake-link page-notice__dismiss",onClick:N},e.React.createElement(o.EbayIcon,{name:"close16"}))))},T=t=>{var{className:a,as:n,children:c}=t,i=r.__rest(t,["className","as","children"]);return e.React.createElement(b.NoticeTitle,Object.assign({},i,{className:a,as:n,type:"page"}),c)},m=({className:t,children:a})=>e.React.createElement(b.NoticeFooter,{className:t,type:"page"},a),q=({className:t,children:a})=>e.React.createElement(h.NoticeCTA,{className:t,type:"page"},a);exports.EbayNoticeContent=l.EbayNoticeContent;exports.EbayPageNotice=R;exports.EbayPageNoticeCTA=q;exports.EbayPageNoticeFooter=m;exports.EbayPageNoticeTitle=T;
|
|
@@ -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,
|
|
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,EACF,oBAAoB,EACpB,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,CAiD7B,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/ebay-pagination/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-UTo0M824.js"),t=require("../index-Banoekuf.js"),Q=require("../ebay-fake-menu-button/index.js"),q=require("../index-DmNrJCd8.js"),ne=require("../debounce-BQsYxxOL.js"),re=require("../utils-D1rplbEN.js"),V=require("../index-plT9bPAi.js"),ae=require("../forwardRef-BGhnwltg.js");require("../array.polyfill.flat-5BAolFdk.js");const ie=1,A=9,Y=4,U=2,se=A-U;function oe(e,n,s=e,f=null){const l=f==="show-last"||f==="overflow"&&e>A,W=f==="overflow"&&e>A,i=Math.min(s,e),R=Math.max(0,n-Math.ceil((i-1)/2)),h=i<Y?n:Math.max(0,n-Math.floor((i-1)/2)),g=(l?h:R)+i,E=g>=e,m=n<=Y,_=(o,c)=>{const r=k(e,o,c);return i>2?(r[c-2]="dots",r[c-1]="hidden",r[e-1]="visible"):i>1&&(r[c-1]="dots"),r},w=(o,c)=>{if(m)return _(0,c);if(E){const p=k(e,e-se,e);return p[0]="visible",p[1]="dots",p}const r=k(e,n-U,n+U+1);return r[0]="visible",r[1]=m?"visible":"dots",r[e-2]="dots",r[e-1]="visible",r};return E&&e<=A?k(e,e-i):l?W?w(h,g):_(h,g):k(e,R,g)}function ce(e,n,s,f="show-range"){if(e===-1)return[];const l=f==="overflow"?A:le(Math.min(s,n),ie,A);return oe(s,e-1,l,f)}function le(e,n,s){return e<=n?n:e>=s?s:e}function k(e,n,s){return Array(e).fill("hidden").fill("visible",n,s)}function ue(e){if(!e)return 0;e.style.width="100vw";const n=e.offsetWidth;return e.style.width=null,n}const de=e=>{var{id:n="ebay-pagination",className:s,a11yCurrentText:f="Pagination - Current Page",a11yPreviousText:l="Previous page",a11yNextText:W="Next page",variant:i="show-range",fluid:R=!1,onPrevious:h=()=>{},onNext:g=()=>{},onSelect:E=()=>{},children:m}=e,_=Z.__rest(e,["id","className","a11yCurrentText","a11yPreviousText","a11yNextText","variant","fluid","onPrevious","onNext","onSelect","children"]);const w=t.reactExports.useRef(null),o=t.reactExports.useRef([]);o.current=t.reactExports.Children.map(m,t.reactExports.createRef);const c=re.filterBy(m,({props:a})=>a.type===void 0||a.type==="page").length,r=t.reactExports.useRef(0),p=t.reactExports.useRef(0),L=()=>{var a,v,b,x;const I=p.current||((v=(a=o.current[0])===null||a===void 0?void 0:a.current)===null||v===void 0?void 0:v.offsetWidth);p.current=I;const d=r.current||((x=(b=o.current[1])===null||b===void 0?void 0:b.current)===null||x===void 0?void 0:x.offsetWidth);return r.current=d,d?Math.floor((ue(w.current)-I*2)/d):0},[T,B]=t.reactExports.useState([]),[y,O]=t.reactExports.useState(0),S=a=>{const v=a||o.current.findIndex(I=>{var d;return((d=I.current)===null||d===void 0?void 0:d.getAttribute("aria-current"))==="page"}),b=L(),x=ce(v,b,c,i);O(v),B(["hidden",...x])};t.reactExports.useEffect(()=>{const a=ne.debounce(S,16);return S(),window.addEventListener("resize",()=>a()),()=>{window.removeEventListener("resize",()=>a())}},[m]);const M=a=>{let v=0;const b=[],x=[],I=[],d=T.indexOf("dots"),F=T.lastIndexOf("dots");return t.reactExports.Children.map(m,(X,N)=>{const{type:P="page",current:$,disabled:ee,href:G,children:J}=X.props,j=T[N]==="dots",z=`${n}-item-${N}`,K=T[N]==="hidden",te={current:$,disabled:ee,href:G,type:j&&P==="page"?"separator":P,children:j?t.React.createElement(V.EbayIcon,{name:"overflowHorizontal24",focusable:!1}):J,pageIndex:P==="page"?v++:void 0,key:z,hide:K,onPrevious:h,onNext:g,onSelect:E,a11yPreviousText:l,a11yNextText:W,ref:o.current[N]};if((K||j)&&P==="page"){const C=t.React.createElement(Q.EbayFakeMenuButtonItem,{key:z,href:G,onClick:H=>{G||H.preventDefault();const D=H.currentTarget;E(H,{value:(D==null?void 0:D.innerText)||"",index:v}),S(Number(D==null?void 0:D.innerText))}},J);d===F&&I.push(C),y-2>d&&N<y&&b.push(C),y+2<F&&N>y&&x.push(C)}if(a==="page"&&j&&i==="overflow"){let C=I;return d!==F&&(C=N===2?b:x),t.React.createElement("li",{key:z},t.React.createElement("span",{className:"pagination__item",role:"separator"},t.React.createElement(Q.EbayFakeMenuButton,{a11yText:"Menu",borderless:!0,variant:"overflow",noToggleIcon:!0},C)))}return a===P?t.reactExports.cloneElement(X,te):null})},u=`${n}-pagination-heading`;return t.React.createElement("nav",Object.assign({},_,{role:"navigation",className:q.classNames(s,"pagination",{"pagination--fluid":R}),"aria-labelledby":u,ref:w}),t.React.createElement("span",{"aria-live":"polite",role:"status"},t.React.createElement("h2",{className:"clipped",id:u},f)),M("previous"),t.React.createElement("ol",{className:"pagination__items"},M("page")),M("next"))},fe=e=>{var{pageIndex:n=0,key:s,current:f,disabled:l,type:W="page",href:i,hide:R,children:h,a11yPreviousText:g="Previous page",a11yNextText:E="Next page",onSelect:m,onNext:_,onPrevious:w,className:o,style:c,forwardedRef:r}=e,p=Z.__rest(e,["pageIndex","key","current","disabled","type","href","hide","children","a11yPreviousText","a11yNextText","onSelect","onNext","onPrevious","className","style","forwardedRef"]);const L=u=>{var a;m(u,{value:((a=u.currentTarget)===null||a===void 0?void 0:a.innerText)||"",index:n})},T=u=>{u.currentTarget.getAttribute("aria-disabled")||_(u)},B=u=>{u.currentTarget.getAttribute("aria-disabled")||w(u)},y=!!i,O=y?"a":"button",S=y?"icon-link":"icon-btn",M=Object.assign(Object.assign({},c),{minWidth:"40px"});switch(W){case"previous":return t.React.createElement(O,Object.assign({},p,{ref:r,"aria-disabled":l?"true":void 0,"aria-label":g,href:l?void 0:i,className:q.classNames(o,S,"pagination__previous"),style:M,onClick:B}),t.React.createElement(V.EbayIcon,{name:"arrowLeft16"}));case"next":return t.React.createElement(O,Object.assign({},p,{ref:r,"aria-disabled":l?"true":void 0,"aria-label":E,href:l?void 0:i,className:q.classNames(o,S,"pagination__next"),style:M,onClick:T}),t.React.createElement(V.EbayIcon,{name:"arrowRight16"}));case"separator":return t.React.createElement("span",{key:s,style:c,className:q.classNames(o,"pagination__item"),ref:r,role:"separator"},h);default:return t.React.createElement("li",Object.assign({},p,{hidden:R}),t.React.createElement(O,{ref:r,"aria-current":f?"page":void 0,href:i,className:q.classNames(o,"pagination__item"),style:c,key:s,onClick:L},h))}},pe=ae.withForwardRef(fe);exports.EbayPagination=de;exports.EbayPaginationItem=pe;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Key, ReactNode, RefObject, StyleHTMLAttributes, ComponentProps } from 'react';
|
|
2
2
|
import { EbayEventHandler } from '../common/event-utils/types';
|
|
3
3
|
export type PaginationItemType = 'previous' | 'next' | 'page' | 'separator';
|
|
4
|
-
type HtmlProps = Omit<ComponentProps<'button'>, 'type'> & ComponentProps<'a'> & ComponentProps<'li'>;
|
|
4
|
+
type HtmlProps = Omit<ComponentProps<'button'>, 'type' | 'onSelect'> & Omit<ComponentProps<'a'>, 'onSelect'> & Omit<ComponentProps<'li'>, 'onSelect'>;
|
|
5
5
|
export type PaginationItemProps = HtmlProps & {
|
|
6
6
|
pageIndex?: number;
|
|
7
7
|
key?: Key;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-item.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAIjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAE9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAA;AAC3E,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"pagination-item.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAIjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAE9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAA;AAC3E,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAA;AACrJ,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,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,KAAK,CAAC,EAAE,mBAAmB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACnE,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;;AAqGF,wBAAiD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-UTo0M824.js"),d=require("../index-Banoekuf.js"),i=require("../index-DmNrJCd8.js"),u=require("../ebay-dialog-base/index.js");require("../ebay-icon-button/index.js");const e="panel-dialog",g=a=>{var{open:n,animated:s,position:t="start",onClose:o=()=>{},className:l}=a,r=c.__rest(a,["open","animated","position","onClose","className"]);return d.React.createElement(u.DialogBaseWithState,Object.assign({},r,{"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:o,onBackgroundClick:o,animated:s,className:i.classNames(l,{[`${e}--mask-fade-slow`]:s}),windowClass:i.classNames(`${e}__window--slide`,{[`${e}__window--end`]:t==="end"}),open:n}))};exports.EbayPanelDialog=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-panel-dialog/panel-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAInE,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"panel-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-panel-dialog/panel-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAInE,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAG/B,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAsB9B,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-UTo0M824.js"),i=require("../index-Banoekuf.js"),o=require("../index-DmNrJCd8.js"),u=e=>{var{value:s=0,max:r=100,fluid:a,className:t}=e,l=c.__rest(e,["value","max","fluid","className"]);return i.React.createElement("progress",Object.assign({},l,{className:o.classNames("progress-bar",t,{"progress-bar--fluid":a}),value:s,max:r}))};exports.EbayProgressBar=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),q=require("../random-id-5bEmzZsS.js"),P=require("../utils-D1rplbEN.js"),U=require("../reduced-motion-CBVd9_aJ.js"),_=require("../index-DmNrJCd8.js"),l=s=>{var{isFadingIn:u,isFadingOut:g,isInitial:d}=s,i=O.__rest(s,["isFadingIn","isFadingOut","isInitial"]);return e.React.createElement("div",Object.assign({},i,{className:_.classNames("progress-bar-expressive__message",{"progress-bar-expressive__message--out":g,"progress-bar-expressive__message--in":u,"progress-bar-expressive__message--initial":d})}))},j=1500,B=1.5,R=833,L=s=>{var{className:u,"aria-label":g,children:d,size:i}=s,f=O.__rest(s,["className","aria-label","children","size"]);const v=q.useRandomId(),[n,I]=e.reactExports.useState(-1),[b,x]=e.reactExports.useState(!1),[F,y]=e.reactExports.useState(!0),m=P.filterByType(d,l),a=m.length,S=i!=="medium",A=e.reactExports.useMemo(()=>new Array(12).fill(0),[]),p=m[n]||null,o=n===a-1?0:n+1,r=m[o]||null,E=U.useReducedMotion();return e.reactExports.useEffect(()=>{var c,t;let M,T,N;if(a>0){const D=((t=(c=r==null?void 0:r.props)===null||c===void 0?void 0:c.duration)!==null&&t!==void 0?t:j)*(E?B:1);(!S||E)&&!p?I(o):M=setTimeout(()=>{x(!0),T=setTimeout(()=>{I(o),x(!1)},D)},R),N=setTimeout(()=>{y(!1)},R)}return()=>{clearTimeout(M),clearTimeout(T),clearTimeout(N)}},[a,n,o]),e.React.createElement("div",Object.assign({},f,{className:_.classNames("progress-bar-expressive",u)}),a>0?e.React.createElement("div",{className:_.classNames("progress-bar-expressive__messages",{"progress-bar-expressive__messages--medium":i==="medium"})},!E&&r?e.React.createElement(l,Object.assign({},r.props,{"aria-hidden":"true",isFadingIn:b})):null,p?e.React.createElement(l,Object.assign({},p.props,{id:v,role:"status",isFadingIn:a===1,isFadingOut:b,isInitial:F})):null):null,e.React.createElement("div",{role:"progressbar","aria-label":g,"aria-describedby":v,className:"progress-bar-expressive__progress"},e.React.createElement("div",{className:"progress-bar-expressive__lines"},A.map((c,t)=>e.React.createElement("div",{key:t,className:"progress-bar-expressive__line"})))))};exports.EbayProgressBarExpressive=L;exports.EbayProgressBarExpressiveMessage=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../tslib.es6-UTo0M824.js"),r=require("../index-Banoekuf.js"),t=require("../index-DmNrJCd8.js"),c=require("../index-plT9bPAi.js"),o={default:"",small:"progress-spinner--small",large:"progress-spinner--large"},m={default:"spinner24",small:"spinner20",large:"spinner30"},p=e=>{var{size:s="default","aria-label":a="Busy",className:n}=e,l=i.__rest(e,["size","aria-label","className"]);return r.React.createElement("span",Object.assign({},l,{className:t.classNames("progress-spinner",o[s],n),"aria-label":a,role:"img"}),r.React.createElement(c.EbayIcon,{name:m[s]}))};exports.EbayProgressSpinner=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../tslib.es6-UTo0M824.js"),t=require("../index-Banoekuf.js"),E=require("../index-DmNrJCd8.js"),b=require("../index-plT9bPAi.js"),f=e=>{var{direction:r="row",defaultState:s="active",children:c,className:p}=e,l=d.__rest(e,["direction","defaultState","children","className"]);const n=t.reactExports.Children.toArray(c),o=_(n,s);return t.React.createElement("div",Object.assign({},l,{className:E.classNames(p,"progress-stepper",{"progress-stepper--vertical":r==="column"})}),t.React.createElement("div",{role:"list",className:"progress-stepper__items"},n.map((i,a)=>t.React.createElement(t.reactExports.Fragment,{key:a},a>0&&t.React.createElement("hr",{className:"progress-stepper__separator",role:"presentation"}),t.reactExports.cloneElement(i,Object.assign(Object.assign({state:N(a,o)},i.props),{current:o===a}))))))};function _(e,r){const s=e.findIndex(c=>c.props.current);if(s===-1)switch(r){case"complete":return e.length-1;case"upcoming":return 0}return s}function N(e,r){if(e<=r)return"complete";if(e>r)return"upcoming"}const v={complete:"stepperConfirmation24",attention:"stepperAttention24",upcoming:"stepperUpcoming24",active:"stepperConfirmation24"},h=e=>{var{current:r,state:s="complete",children:c,className:p}=e,l=d.__rest(e,["current","state","children","className"]);const n=t.reactExports.Children.toArray(c),o=n.find(m=>m.type===u),i=n.filter(m=>m.type!==u),a=E.classNames(p,"progress-stepper__item",{"progress-stepper__item--attention":s==="attention"}),g=v[s],y=r?"current":s;return t.React.createElement("div",Object.assign({},l,{className:a,role:"listitem","aria-current":r?"step":void 0}),t.React.createElement("div",{className:"progress-stepper__icon"},g&&t.React.createElement(b.EbayIcon,{name:g,"aria-label":y})),t.React.createElement("div",{className:"progress-stepper__text"},o,i))},u=({as:e="h4",children:r})=>t.reactExports.createElement(e,{},r);exports.EbayProgressStep=h;exports.EbayProgressStepper=f;exports.EbayProgressTitle=u;
|
package/ebay-radio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../tslib.es6-UTo0M824.js"),a=require("../index-Banoekuf.js"),N=require("../index-DmNrJCd8.js"),c=require("../index-plT9bPAi.js"),j=require("../label-ACiBnv5P.js"),q=require("../utils-D1rplbEN.js"),F=s=>{var{size:t="default",checked:i,defaultChecked:d,className:u,style:m,id:r,onChange:h=()=>{},onFocus:g=()=>{},onKeyDown:b=()=>{},children:l}=s,y=p.__rest(s,["size","checked","defaultChecked","className","style","id","onChange","onFocus","onKeyDown","children"]);const E=n=>{var e;return h(n,{value:(e=n.target)===null||e===void 0?void 0:e.value})},_=n=>{var e;return g(n,{value:(e=n.target)===null||e===void 0?void 0:e.value})},v=n=>{const e=n.target;return b(n,{value:e==null?void 0:e.value})},k=N.classNames("radio",u,{"radio--large":t==="large"}),C=t==="large"?a.React.createElement(c.EbayIcon,{name:"radioChecked24",className:"radio__checked"}):a.React.createElement(c.EbayIcon,{name:"radioChecked18",className:"radio__checked"}),R=t==="large"?a.React.createElement(c.EbayIcon,{name:"radioUnchecked24",className:"radio__unchecked"}):a.React.createElement(c.EbayIcon,{name:"radioUnchecked18",className:"radio__unchecked"}),o=q.findComponent(l,j.Label);return a.React.createElement(a.React.Fragment,null,a.React.createElement("span",{className:k,style:Object.assign(Object.assign({},m),{alignItems:"center"})},a.React.createElement("input",Object.assign({},y,{id:r,className:"radio__control",type:"radio",defaultChecked:d,checked:i,onChange:E,onFocus:_,onKeyDown:v})),a.React.createElement("span",{className:"radio__icon",hidden:!0},C,R)),o?a.reactExports.cloneElement(o,Object.assign(Object.assign({},o.props),{position:"end",htmlFor:r})):l)};exports.EbayRadio=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/ebay-radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGV,cAAc,EAAE,EAAE,EACrB,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/ebay-radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGV,cAAc,EAAE,EAAE,EACrB,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAGrH,KAAK,IAAI,GAAG,SAAS,GAAG,OAAO,CAAA;AAE/B,KAAK,cAAc,GAAG;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IAChF,OAAO,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9E,SAAS,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;CACtF,CAAA;AACD,KAAK,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC,CAAA;AAE9F,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,UAAU,GAAG,cAAc,CA6D9C,CAAA;AAED,eAAe,SAAS,CAAA"}
|