@ebay/ui-core-react 8.7.0 → 8.9.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.
Files changed (64) hide show
  1. package/README.md +2 -0
  2. package/{dialog-previous-button-B1dTCOv2.js → dialog-previous-button-C3ZdijBt.js} +1 -1
  3. package/ebay-alert-dialog/index.js +1 -1
  4. package/ebay-confirm-dialog/index.js +1 -1
  5. package/ebay-date-textbox/index.js +1 -1
  6. package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
  7. package/ebay-dialog-base/index.js +1 -1
  8. package/ebay-drawer-dialog-deprecated/index.js +1 -1
  9. package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
  10. package/ebay-icon/types.d.ts +1 -1
  11. package/ebay-icon/types.d.ts.map +1 -1
  12. package/ebay-infotip/index.js +1 -1
  13. package/ebay-item-tile/README.md +79 -0
  14. package/ebay-item-tile/index.d.ts +8 -0
  15. package/ebay-item-tile/index.d.ts.map +1 -0
  16. package/ebay-item-tile/index.js +1 -0
  17. package/ebay-item-tile/item-tile-action.d.ts +6 -0
  18. package/ebay-item-tile/item-tile-action.d.ts.map +1 -0
  19. package/ebay-item-tile/item-tile-description.d.ts +7 -0
  20. package/ebay-item-tile/item-tile-description.d.ts.map +1 -0
  21. package/ebay-item-tile/item-tile-sections.d.ts +9 -0
  22. package/ebay-item-tile/item-tile-sections.d.ts.map +1 -0
  23. package/ebay-item-tile/item-tile-sub-title.d.ts +4 -0
  24. package/ebay-item-tile/item-tile-sub-title.d.ts.map +1 -0
  25. package/ebay-item-tile/item-tile-super-title.d.ts +4 -0
  26. package/ebay-item-tile/item-tile-super-title.d.ts.map +1 -0
  27. package/ebay-item-tile/item-tile-title.d.ts +4 -0
  28. package/ebay-item-tile/item-tile-title.d.ts.map +1 -0
  29. package/ebay-item-tile/item-tile.d.ts +13 -0
  30. package/ebay-item-tile/item-tile.d.ts.map +1 -0
  31. package/ebay-item-tile/types.d.ts +2 -0
  32. package/ebay-item-tile/types.d.ts.map +1 -0
  33. package/ebay-item-tile-group/README.md +80 -0
  34. package/ebay-item-tile-group/index.d.ts +3 -0
  35. package/ebay-item-tile-group/index.d.ts.map +1 -0
  36. package/ebay-item-tile-group/index.js +1 -0
  37. package/ebay-item-tile-group/item-tile-group.d.ts +10 -0
  38. package/ebay-item-tile-group/item-tile-group.d.ts.map +1 -0
  39. package/ebay-item-tile-group/types.d.ts +7 -0
  40. package/ebay-item-tile-group/types.d.ts.map +1 -0
  41. package/ebay-lightbox-dialog/index.js +1 -1
  42. package/ebay-number-input/README.md +69 -0
  43. package/ebay-number-input/index.d.ts +3 -0
  44. package/ebay-number-input/index.d.ts.map +1 -0
  45. package/ebay-number-input/index.js +1 -0
  46. package/ebay-number-input/number-input.d.ts +5 -0
  47. package/ebay-number-input/number-input.d.ts.map +1 -0
  48. package/ebay-number-input/types.d.ts +26 -0
  49. package/ebay-number-input/types.d.ts.map +1 -0
  50. package/ebay-panel-dialog/index.js +1 -1
  51. package/ebay-snackbar-dialog/index.js +1 -1
  52. package/ebay-svg/index.js +1 -1
  53. package/ebay-svg/symbols.d.ts.map +1 -1
  54. package/ebay-textbox/index.js +1 -1
  55. package/ebay-textbox/postfix-icon.d.ts.map +1 -1
  56. package/ebay-textbox/prefix-icon.d.ts.map +1 -1
  57. package/ebay-textbox/types.d.ts +1 -1
  58. package/ebay-textbox/types.d.ts.map +1 -1
  59. package/ebay-toast-dialog/index.js +1 -1
  60. package/item-tile-lBRIeVHa.js +1 -0
  61. package/{lightbox-dialog-DqcQsTSy.js → lightbox-dialog-U775uoDp.js} +1 -1
  62. package/package.json +4 -4
  63. package/textbox-voEWwh3v.js +1 -0
  64. package/textbox-BYNinHFi.js +0 -1
@@ -0,0 +1,10 @@
1
+ import { FC, ComponentProps } from "react";
2
+ import { ItemTileLayout } from "../ebay-item-tile";
3
+ import { FilePreviewCardActionHandler } from "./types";
4
+ export type EbayItemTileGroupProps = ComponentProps<"div"> & {
5
+ layout?: ItemTileLayout;
6
+ onAction?: FilePreviewCardActionHandler;
7
+ };
8
+ declare const EbayItemTileGroup: FC<EbayItemTileGroupProps>;
9
+ export default EbayItemTileGroup;
10
+ //# sourceMappingURL=item-tile-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-tile-group.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile-group/item-tile-group.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAgB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,4BAA4B,CAAC;CAC3C,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAsBjD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { EbayEventHandler } from "../common/event-utils/types";
2
+ type EventData = {
3
+ index: number;
4
+ };
5
+ export type FilePreviewCardActionHandler = EbayEventHandler<HTMLElement, EventData>;
6
+ export {};
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,KAAK,SAAS,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../lightbox-dialog-DqcQsTSy.js");exports.EbayLightboxDialog=o.EbayLightboxDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../lightbox-dialog-U775uoDp.js");exports.EbayLightboxDialog=o.EbayLightboxDialog;
@@ -0,0 +1,69 @@
1
+ # ebay-number-input
2
+
3
+ The `EbayNumberInput` component provides a numeric input field with increment and decrement buttons. It allows users to easily adjust numeric values within defined boundaries.
4
+
5
+ ## Usage
6
+
7
+ ```jsx
8
+ import { EbayNumberInput } from '@ebay/ebayui-core-react';
9
+
10
+ // Basic usage
11
+ <EbayNumberInput />
12
+
13
+ // With custom min/max values
14
+ <EbayNumberInput min={1} max={10} value={5} />
15
+
16
+ // With a label
17
+ <EbayNumberInput label="Quantity" />
18
+
19
+ // With delete functionality
20
+ <EbayNumberInput a11yDeleteText="Delete item" />
21
+
22
+ // With event handlers
23
+ <EbayNumberInput
24
+ onChange={(e, { value }) => console.log('Value changed:', value)}
25
+ onIncrement={(e, { value }) => console.log('Incremented to:', value)}
26
+ onDecrement={(e, { value }) => console.log('Decremented to:', value)}
27
+ />
28
+ ```
29
+
30
+ ## Props
31
+
32
+ The `EbayNumberInput` component extends most of the props from `EbayTextbox` with some modifications and additions:
33
+
34
+ | Name | Type | Required | Default | Description |
35
+ | ---------------- | ---------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
36
+ | `value` | `number` | No | `1` | The current value of the input |
37
+ | `min` | `number` | No | `1` | The minimum allowed value |
38
+ | `max` | `number` | No | `Infinity` | The maximum allowed value |
39
+ | `label` | `string` | No | `''` | Label text to display with the input |
40
+ | `a11yDeleteText` | `string` | No | `''` | Accessibility text for the delete button. When provided, the decrement button will be replaced with a delete button when the value reaches the minimum |
41
+ | `onChange` | `Function` | No | `() => {}` | Called when the value changes (either through direct input or button clicks) |
42
+ | `onInputChange` | `Function` | No | `() => {}` | Called when the input value changes directly |
43
+ | `onFocus` | `Function` | No | `() => {}` | Called when the input receives focus |
44
+ | `onBlur` | `Function` | No | `() => {}` | Called when the input loses focus |
45
+ | `onKeyDown` | `Function` | No | `() => {}` | Called on keydown event |
46
+ | `onKeyPress` | `Function` | No | `() => {}` | Called on keypress event |
47
+ | `onKeyUp` | `Function` | No | `() => {}` | Called on keyup event |
48
+ | `onDeleteClick` | `Function` | No | `() => {}` | Called when the delete button is clicked (only visible when `a11yDeleteText` is provided and value is at minimum) |
49
+ | `onIncrement` | `Function` | No | `() => {}` | Called when the increment button is clicked |
50
+ | `onDecrement` | `Function` | No | `() => {}` | Called when the decrement button is clicked |
51
+
52
+ Additionally, this component inherits all other props from the `EbayTextbox` component except those explicitly overridden above.
53
+
54
+ ## Event Handlers
55
+
56
+ All event handlers receive two arguments:
57
+
58
+ 1. The original event object
59
+ 2. An object with a `value` property containing the current numeric value
60
+
61
+ Example:
62
+
63
+ ```jsx
64
+ <EbayNumberInput
65
+ onChange={(event, { value }) => {
66
+ console.log("New value:", value);
67
+ }}
68
+ />
69
+ ```
@@ -0,0 +1,3 @@
1
+ export { default as EbayNumberInput } from "./number-input";
2
+ export type { EbayNumberInputProps, NumberInputEventProps } from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-number-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../tslib.es6-C4EgNkz1.js"),t=require("react"),S=require("classnames"),b=require("../textbox-voEWwh3v.js"),v=require("../icon-button-CHW6Lezn.js"),j=p=>{const{className:E="",value:s=1,min:u=1,max:r=1/0,label:y="",a11yDeleteText:o="",onChange:h=()=>{},onInputChange:N=()=>{},onFocus:f=()=>{},onBlur:C=()=>{},onKeyDown:D=()=>{},onKeyPress:K=()=>{},onKeyUp:g=()=>{},onDeleteClick:w=()=>{},onIncrement:B=()=>{},onDecrement:_=()=>{}}=p,c=R.__rest(p,["className","value","min","max","label","a11yDeleteText","onChange","onInputChange","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","onDeleteClick","onIncrement","onDecrement"]),k=o?1:0,[a,i]=t.useState(s??k),m=t.useRef(null),d=(n,e=0)=>{const M=o?1:0;let l=parseInt(n,10)+e;return isNaN(l)?l=M:l>r?l=r:l<u&&(l=u),l},I=n=>{if(!m.current)return;const e=m.current;e.classList.remove("number-input--increment"),e.classList.remove("number-input--decrement"),e.classList.remove("number-input--increment-disabled"),e.classList.remove("number-input--decrement-disabled"),e.offsetWidth,e.classList.add(`number-input--${n}`)},P=n=>{const e=d(a,1);I(e>=r?"increment-disabled":"increment"),i(e),B(n,{value:e}),h(n,{value:e})},T=n=>{const e=d(a,-1);I(e<=u?"decrement-disabled":"decrement"),i(e),_(n,{value:e}),h(n,{value:e})},x=n=>{const e=d(n.target.value,0);i(e),N(n,{value:e})},V=(n,e)=>{f(n,{value:Number(e.value)})},q=(n,e)=>{C(n,{value:Number(e.value)})},F=(n,e)=>{D(n,{value:Number(e.value)})},L=(n,e)=>{K(n,{value:Number(e.value)})},U=(n,e)=>{g(n,{value:Number(e.value)})},z=n=>{w(n,{value:a})};return t.createElement("span",{ref:m,className:S("number-input",o&&a===1&&"number-input--show-delete",E)},t.createElement(b.EbayTextbox,{max:r,min:u,onBlur:q,onChange:x,onFocus:V,onInputChange:x,onKeyDown:F,onKeyPress:L,onKeyUp:U,type:"number",value:a},t.createElement(b.EbayTextboxPrefixIcon,null,y&&t.createElement("label",{htmlFor:(c==null?void 0:c.id)||"number-input"},y),t.createElement(v.EbayIconButton,{"aria-hidden":!0,className:"number-input__decrement",disabled:a<=u,icon:"remove24",onClick:T,size:"small",tabIndex:-1,transparent:!0})),t.createElement(b.EbayTextboxPostfixIcon,null,o&&t.createElement(v.EbayIconButton,{"aria-label":o,className:"number-input__delete",icon:"delete24",onClick:z,size:"small",transparent:!0}),t.createElement(v.EbayIconButton,{"aria-hidden":!0,className:"number-input__increment",disabled:a>=r,icon:"add24",onClick:P,size:"small",tabIndex:-1,transparent:!0}))))};exports.EbayNumberInput=j;
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ import type { EbayNumberInputProps } from "./types";
3
+ declare const EbayNumberInput: FC<EbayNumberInputProps>;
4
+ export default EbayNumberInput;
5
+ //# sourceMappingURL=number-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../src/ebay-number-input/number-input.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAGpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAmK7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { EbayTextboxProps as TextboxInput } from "../ebay-textbox";
2
+ import { EbayChangeEventHandler, EbayFocusEventHandler, EbayKeyboardEventHandler, EbayMouseEventHandler } from "../common/event-utils/types";
3
+ export interface NumberInputEventProps {
4
+ value: number;
5
+ }
6
+ export type NumberInputChangeHandler = EbayChangeEventHandler<HTMLInputElement, NumberInputEventProps>;
7
+ export type NumberInputFocusHandler = EbayFocusEventHandler<HTMLInputElement, NumberInputEventProps>;
8
+ export type NumberInputKeyDownHandler = EbayKeyboardEventHandler<HTMLInputElement, NumberInputEventProps>;
9
+ export type EbayNumberInputProps = Omit<TextboxInput, "onChange" | "onInputChange" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "forwardedRef"> & {
10
+ label?: string;
11
+ a11yDeleteText?: string;
12
+ min?: number;
13
+ max?: number;
14
+ value?: number;
15
+ onKeyDown?: EbayKeyboardEventHandler<HTMLInputElement, NumberInputEventProps>;
16
+ onKeyPress?: EbayKeyboardEventHandler<HTMLInputElement, NumberInputEventProps>;
17
+ onKeyUp?: EbayKeyboardEventHandler<HTMLInputElement, NumberInputEventProps>;
18
+ onChange?: NumberInputChangeHandler;
19
+ onInputChange?: NumberInputChangeHandler;
20
+ onFocus?: EbayFocusEventHandler<HTMLInputElement, NumberInputEventProps>;
21
+ onBlur?: EbayFocusEventHandler<HTMLInputElement, NumberInputEventProps>;
22
+ onDeleteClick?: EbayMouseEventHandler<HTMLInputElement, NumberInputEventProps>;
23
+ onIncrement?: EbayMouseEventHandler<HTMLInputElement, NumberInputEventProps>;
24
+ onDecrement?: EbayMouseEventHandler<HTMLInputElement, NumberInputEventProps>;
25
+ };
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-number-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACxB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;AACvG,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;AACrG,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;AAE1G,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACnC,YAAY,EACZ,UAAU,GAAG,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,cAAc,CAChH,GAAG;IACA,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC9E,UAAU,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC/E,OAAO,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC5E,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,OAAO,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IACzE,MAAM,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IACxE,aAAa,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC/E,WAAW,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;CAChF,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-C4EgNkz1.js"),d=require("react"),t=require("classnames"),u=require("../dialog-previous-button-B1dTCOv2.js");require("../icon-button-CHW6Lezn.js");const e="panel-dialog",g=o=>{var{open:i,animated:s,position:n="start",onClose:a=()=>{},className:l}=o,r=c.__rest(o,["open","animated","position","onClose","className"]);return d.createElement(u.DialogBaseWithState,Object.assign({},r,{"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:a,onBackgroundClick:a,animated:s,className:t(l,{[`${e}--mask-fade-slow`]:s}),windowClass:t(`${e}__window--slide`,{[`${e}__window--end`]:n==="end"}),open:i}))};exports.EbayPanelDialog=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-C4EgNkz1.js"),d=require("react"),t=require("classnames"),u=require("../dialog-previous-button-C3ZdijBt.js");require("../icon-button-CHW6Lezn.js");const e="panel-dialog",g=o=>{var{open:i,animated:s,position:n="start",onClose:a=()=>{},className:l}=o,r=c.__rest(o,["open","animated","position","onClose","className"]);return d.createElement(u.DialogBaseWithState,Object.assign({},r,{"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:a,onBackgroundClick:a,animated:s,className:t(l,{[`${e}--mask-fade-slow`]:s}),windowClass:t(`${e}__window--slide`,{[`${e}__window--end`]:n==="end"}),open:i}))};exports.EbayPanelDialog=g;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../tslib.es6-C4EgNkz1.js"),y=require("classnames"),e=require("react"),h=require("../dialog-previous-button-B1dTCOv2.js");require("../icon-button-CHW6Lezn.js");const k=require("../utils-C9NL3q0j.js"),E=n=>{var{className:l,children:c}=n,r=C.__rest(n,["className","children"]);return e.createElement("button",Object.assign({className:y(l,"fake-link")},r),c)},R=6e3,B=n=>{var{className:l,onOpen:c=()=>{},onClose:r=()=>{},layout:D,open:i,children:f,onAction:u}=n,S=C.__rest(n,["className","onOpen","onClose","layout","open","children","onAction"]);const o=e.useRef(new Set),g=e.useRef(null),[T,v]=e.useState(i),t=k.findComponent(f,E),_=k.excludeComponent(f,E),s=()=>{clearTimeout(g.current)},d=()=>{v(!1),r()},m=()=>{o.current.size===0&&(s(),g.current=setTimeout(()=>{d()},R))},q=()=>{v(!0),c(),m()},N=()=>{s(),o.current.add("focus")},O=()=>{o.current.delete("focus"),m()},A=()=>{s(),o.current.add("mouseEnter")},M=()=>{o.current.delete("mouseEnter"),m()},w=p=>{var a,b;s(),u==null||u(p),(b=(a=t==null?void 0:t.props)===null||a===void 0?void 0:a.onClick)===null||b===void 0||b.call(a,p),d()};return e.useEffect(()=>()=>{s()},[]),e.useEffect(()=>{i?q():d()},[i]),e.createElement(h.DialogBaseWithState,Object.assign({},S,{open:T,isModal:!1,baseEl:"aside",classPrefix:"snackbar-dialog",transitionElement:"root",a11yCloseText:"",buttonPosition:"hidden",className:y(l,"snackbar-dialog--transition"),windowClass:D==="column"&&"snackbar-dialog__window--column",onFocus:N,onBlur:O,onMouseEnter:A,onMouseLeave:M}),_,t?e.createElement(h.EbayDialogActions,null,e.cloneElement(t,{onClick:w})):null)};exports.EbaySnackbarDialog=B;exports.EbaySnackbarDialogAction=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../tslib.es6-C4EgNkz1.js"),y=require("classnames"),e=require("react"),h=require("../dialog-previous-button-C3ZdijBt.js");require("../icon-button-CHW6Lezn.js");const k=require("../utils-C9NL3q0j.js"),E=n=>{var{className:l,children:c}=n,r=C.__rest(n,["className","children"]);return e.createElement("button",Object.assign({className:y(l,"fake-link")},r),c)},R=6e3,B=n=>{var{className:l,onOpen:c=()=>{},onClose:r=()=>{},layout:D,open:i,children:f,onAction:u}=n,S=C.__rest(n,["className","onOpen","onClose","layout","open","children","onAction"]);const o=e.useRef(new Set),g=e.useRef(null),[T,v]=e.useState(i),t=k.findComponent(f,E),_=k.excludeComponent(f,E),s=()=>{clearTimeout(g.current)},d=()=>{v(!1),r()},m=()=>{o.current.size===0&&(s(),g.current=setTimeout(()=>{d()},R))},q=()=>{v(!0),c(),m()},N=()=>{s(),o.current.add("focus")},O=()=>{o.current.delete("focus"),m()},A=()=>{s(),o.current.add("mouseEnter")},M=()=>{o.current.delete("mouseEnter"),m()},w=p=>{var a,b;s(),u==null||u(p),(b=(a=t==null?void 0:t.props)===null||a===void 0?void 0:a.onClick)===null||b===void 0||b.call(a,p),d()};return e.useEffect(()=>()=>{s()},[]),e.useEffect(()=>{i?q():d()},[i]),e.createElement(h.DialogBaseWithState,Object.assign({},S,{open:T,isModal:!1,baseEl:"aside",classPrefix:"snackbar-dialog",transitionElement:"root",a11yCloseText:"",buttonPosition:"hidden",className:y(l,"snackbar-dialog--transition"),windowClass:D==="column"&&"snackbar-dialog__window--column",onFocus:N,onBlur:O,onMouseEnter:A,onMouseLeave:M}),_,t?e.createElement(h.EbayDialogActions,null,e.cloneElement(t,{onClick:w})):null)};exports.EbaySnackbarDialog=B;exports.EbaySnackbarDialogAction=E;