@preply/ds-docs 2.2.0 → 2.2.1

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 (116) hide show
  1. package/dist/assets/{00.LayoutFlex.stories-DG5XDWWv.js → 00.LayoutFlex.stories-CvLRURcS.js} +1 -1
  2. package/dist/assets/{00.applications-BwD1yOm-.js → 00.applications-c0ZYJJn9.js} +1 -1
  3. package/dist/assets/{00.favicons.guide-DYt0ZW7R.js → 00.favicons.guide-D3AV1_bz.js} +1 -1
  4. package/dist/assets/{00.token-explorer-BnS0ahYH.js → 00.token-explorer-CkT6qey8.js} +1 -1
  5. package/dist/assets/{00.using-responsive-props-ccRZ9FAw.js → 00.using-responsive-props-BCqw6dGb.js} +1 -1
  6. package/dist/assets/{01.semantic-tokens-WsdjPcFR.js → 01.semantic-tokens-D1Tew_3C.js} +1 -1
  7. package/dist/assets/{01.using-shorthand-props-CZaSw8Ue.js → 01.using-shorthand-props-nxXyAVD6.js} +1 -1
  8. package/dist/assets/{10.Combinations.stories-Ce5YVZgO.js → 10.Combinations.stories-BJHxtOLR.js} +1 -1
  9. package/dist/assets/{10.fonts.guide-BAJqHFrh.js → 10.fonts.guide-Bgvvb8pw.js} +1 -1
  10. package/dist/assets/{10.ssr-BxsiLtTL.js → 10.ssr-DzFj_Isy.js} +1 -1
  11. package/dist/assets/{11.languageFont.explorer-CjxbP58V.js → 11.languageFont.explorer-C97blYpf.js} +1 -1
  12. package/dist/assets/{11.ssr.app-router-BO-IG2U_.js → 11.ssr.app-router-CKVwpTWN.js} +1 -1
  13. package/dist/assets/{20.libraries-DnvU5oKZ.js → 20.libraries-B0w5t56u.js} +1 -1
  14. package/dist/assets/30.icons.explorer-9sEQx8aM.js +72 -0
  15. package/dist/assets/{30.storybook-CBrD3n6l.js → 30.storybook-Bs2xm9rU.js} +1 -1
  16. package/dist/assets/{40.illustrations.explorer-Cb9JzUVR.js → 40.illustrations.explorer-CR8ar0fc.js} +1 -1
  17. package/dist/assets/{90.advanced-CHfBOcDX.js → 90.advanced-9hdW-yh5.js} +1 -1
  18. package/dist/assets/{AlertDialog.stories-MphIkgeN.js → AlertDialog.stories-BKbQPKy6.js} +1 -1
  19. package/dist/assets/{Badge.stories-5tMdPyQs.js → Badge.stories-zICtnzrJ.js} +2 -2
  20. package/dist/assets/{Box.stories-DXZIdmZy.js → Box.stories-2uNGKDGl.js} +1 -1
  21. package/dist/assets/{Button-nPedvLTz.js → Button-BzRWDefj.js} +1 -1
  22. package/dist/assets/{Button-J48YOeFZ.css → Button-C6MQP0Gg.css} +1 -1
  23. package/dist/assets/Button-C89H73Uu.js +20 -0
  24. package/dist/assets/Button-U6ON1pQl.css +1 -0
  25. package/dist/assets/{Button.stories-C57aDL8Z.js → Button.stories-CB00Q6ks.js} +17 -9
  26. package/dist/assets/ButtonBase-D0ZIVzRq.js +8 -0
  27. package/dist/assets/Checkbox-Bdp0Xs7p.css +1 -0
  28. package/dist/assets/Checkbox-CA4iZrAT.js +10 -0
  29. package/dist/assets/{Checkbox.stories-LFJYKcL1.js → Checkbox.stories-CzSrFSp_.js} +2 -2
  30. package/dist/assets/Checkbox.tests.stories-jyWPjdYZ.js +137 -0
  31. package/dist/assets/{Chips.stories-B1KWZ8O0.js → Chips.stories-DKp9Fwyf.js} +1 -1
  32. package/dist/assets/{Color-YHDXOIA2-rhMWY6Az.js → Color-YHDXOIA2-C27uRBAj.js} +1 -1
  33. package/dist/assets/{Dialog.stories-CmiBli-3.js → Dialog.stories-Crw2R2LP.js} +1 -1
  34. package/dist/assets/{DocsRenderer-CFRXHY34-_p2bZewJ.js → DocsRenderer-CFRXHY34-CsoYCySD.js} +1 -1
  35. package/dist/assets/{FieldLayout-CDdbTwnx.js → FieldLayout-_CFICI44.js} +1 -1
  36. package/dist/assets/{FieldLayout.stories-B4wQoZi8.js → FieldLayout.stories-CeETFAXO.js} +1 -1
  37. package/dist/assets/{FieldLayoutBase-BXt4M7sP.js → FieldLayoutBase-DOSetr9A.js} +1 -1
  38. package/dist/assets/{Heading-B_OcwpW-.js → Heading-BJA2KEAN.js} +1 -1
  39. package/dist/assets/{Heading.stories-DvwLrpCN.js → Heading.stories-DLmu9UzT.js} +1 -1
  40. package/dist/assets/{Icon-RSC-w0Nrg6DG.js → Icon-RSC-Bl-bBsbR.js} +1 -1
  41. package/dist/assets/{Icon-RJMnctrw.js → Icon-TCS4E3Ut.js} +1 -1
  42. package/dist/assets/{Icon.stories-BsTzZknC.js → Icon.stories-BlDFgK_r.js} +1 -1
  43. package/dist/assets/{IconButton-Dlgns1pq.js → IconButton-nN3VsXQJ.js} +1 -1
  44. package/dist/assets/InputText-FNRxz3Ff.js +5 -0
  45. package/dist/assets/{LayoutFlex-b2QXeA0z.js → LayoutFlex-dzXpor-q.js} +1 -1
  46. package/dist/assets/{LayoutFlexItem-CJkCBZ-T.js → LayoutFlexItem-DwJhVVPl.js} +1 -1
  47. package/dist/assets/{LayoutGrid.stories-SyasmoS3.js → LayoutGrid.stories-DOtFrGWL.js} +1 -1
  48. package/dist/assets/{Link.stories-BciEuIul.js → Link.stories-DXPo6cSR.js} +2 -2
  49. package/dist/assets/{NumberField.stories-DPJijQab.js → NumberField.stories-DF0UQeFt.js} +3 -3
  50. package/dist/assets/{ObserveIntersection-DmUYWtw_.js → ObserveIntersection-X9T7s8C_.js} +1 -1
  51. package/dist/assets/{ObserveIntersection.stories-D9iSLGDs.js → ObserveIntersection.stories-CL2a-4JN.js} +1 -1
  52. package/dist/assets/{OnboardingTooltip-CqHYNXIu.js → OnboardingTooltip-DNeTE2Nf.js} +1 -1
  53. package/dist/assets/{OnboardingTooltip.stories-CzdX3Nw_.js → OnboardingTooltip.stories-DmHsCU2X.js} +1 -1
  54. package/dist/assets/{OnboardingTooltip.tests.stories-DQVOHeLl.js → OnboardingTooltip.tests.stories-DQmyU3mJ.js} +1 -1
  55. package/dist/assets/{OnboardingTour-CFO1Ozmu.js → OnboardingTour-BesctxSp.js} +1 -1
  56. package/dist/assets/{OnboardingTour.stories-B45PnXtS.js → OnboardingTour.stories-8o0Dq4f0.js} +1 -1
  57. package/dist/assets/{OnboardingTour.tests.stories-Djzrtw7h.js → OnboardingTour.tests.stories-Ci0Rxq5y.js} +1 -1
  58. package/dist/assets/PasswordField.stories-CMLHLaUX.js +203 -0
  59. package/dist/assets/{ProgressBar.stories-PDV2LPZd.js → ProgressBar.stories-C-i-MYk7.js} +1 -1
  60. package/dist/assets/{ProgressSteps.stories-23NRnaYA.js → ProgressSteps.stories-DDbQ6On7.js} +1 -1
  61. package/dist/assets/SelectField.stories-vkYj9ARE.js +182 -0
  62. package/dist/assets/{ShowOnIntersection.stories-DkmJRWg7.js → ShowOnIntersection.stories-kLcUye2N.js} +1 -1
  63. package/dist/assets/{Steps-CViJWVZa.js → Steps-Bbevuw10.js} +1 -1
  64. package/dist/assets/{Steps.stories-BjhPim5p.js → Steps.stories-CErVd6Rs.js} +1 -1
  65. package/dist/assets/{Text-WJLo2jWe.js → Text-B8k9gfOM.js} +1 -1
  66. package/dist/assets/{Text.stories-BxBe_Syw.js → Text.stories-CoVq2sZs.js} +1 -1
  67. package/dist/assets/{TextField.stories-BhEhwXEF.js → TextField.stories-Dc9U6fJp.js} +1 -1
  68. package/dist/assets/{TextHighlighted.stories-rMMoLtzU.js → TextHighlighted.stories-CQsM4aEX.js} +1 -1
  69. package/dist/assets/{TextInline.stories-CrtAGjeH.js → TextInline.stories-nuefXRFb.js} +1 -1
  70. package/dist/assets/TextareaField.stories-DGmkn96k.js +221 -0
  71. package/dist/assets/{Toast.stories-DUvvjdkV.js → Toast.stories-CUHN7nJ1.js} +1 -1
  72. package/dist/assets/{Tooltip.stories-BDIWPFzK.js → Tooltip.stories-BlrXwmnR.js} +1 -1
  73. package/dist/assets/{Tooltip.tests.stories-XBeLY_cD.js → Tooltip.tests.stories-uM6jvJb0.js} +1 -1
  74. package/dist/assets/{breakpoints-3NoMMOFH.js → breakpoints-D3Osd5ia.js} +1 -1
  75. package/dist/assets/{breakpoints-DCOBa27A.js → breakpoints-rq_8diAS.js} +1 -1
  76. package/dist/assets/{breakpoints-9Ie3Hewk.js → breakpoints-sGqCBEv-.js} +1 -1
  77. package/dist/assets/{changelog-B4rID9Bq.js → changelog-BIJMaAIY.js} +93 -86
  78. package/dist/assets/{entry-preview-BvcUTc0o.js → entry-preview-CsadCHYh.js} +1 -1
  79. package/dist/assets/{getTokenVar-hj8mL9hP.js → getTokenVar-BvNPkk_L.js} +1 -1
  80. package/dist/assets/{hover-CsuooMFi.js → hover-BBCQuwLQ.js} +1 -1
  81. package/dist/assets/{hover-Dibwfqgm.js → hover-D5ih0L6J.js} +1 -1
  82. package/dist/assets/{hover-Dxl9_41k.js → hover-cS9kZjMk.js} +1 -1
  83. package/dist/assets/{iframe-BL4lww1d.js → iframe-DyQ151Cy.js} +2 -2
  84. package/dist/assets/{index-uM6_U85L.js → index-C7SPUG0c.js} +1 -1
  85. package/dist/assets/{index-CObJ2I6U.js → index-CfKvYfkH.js} +3 -3
  86. package/dist/assets/{intro-DkbagauH.js → intro-Blula3c7.js} +1 -1
  87. package/dist/assets/{migrating-from-less-Cc54FV0O.js → migrating-from-less-CPQq6ww0.js} +1 -1
  88. package/dist/assets/playground-BxG9T6DA.css +1 -0
  89. package/dist/assets/{playground.stories-RDLbHK8z.js → playground.stories-DY0v9063.js} +1 -1
  90. package/dist/assets/{preview-BuXHQRzI.js → preview-Bj0gjZ64.js} +1 -1
  91. package/dist/assets/{preview-DCBEprzB.js → preview-BtJWM-Ub.js} +2 -2
  92. package/dist/assets/{preview-CsDoYzSA.js → preview-CQgqy70b.js} +1 -1
  93. package/dist/assets/{tokens-DjUxPhCy.js → tokens-B-lBm9m1.js} +1 -1
  94. package/dist/assets/{tokens-eLBa0fu8.js → tokens-BV-n4-vL.js} +1 -1
  95. package/dist/assets/{tokens-Cer3Mvss.js → tokens-CJZmVKwi.js} +1 -1
  96. package/dist/assets/{usePortalElement-BtGB8NZO.js → usePortalElement-DS4vrgrv.js} +1 -1
  97. package/dist/assets/{welcome-C5k7941o.js → welcome-D-TXgv71.js} +1 -1
  98. package/dist/assets/{zeroheight-BIqyExuv.js → zeroheight-Bob-R-DS.js} +1 -1
  99. package/dist/iframe.html +1 -1
  100. package/dist/index.json +1 -1
  101. package/dist/preview-stats.json +1370 -1358
  102. package/dist/project.json +1 -1
  103. package/package.json +3 -3
  104. package/dist/assets/30.icons.explorer-mTnmuuga.js +0 -72
  105. package/dist/assets/Button-BliYLmDQ.js +0 -20
  106. package/dist/assets/Button-YKyFdyVc.css +0 -1
  107. package/dist/assets/ButtonBase-BPK7KgDE.js +0 -8
  108. package/dist/assets/Checkbox-A4FiIFOZ.js +0 -10
  109. package/dist/assets/Checkbox-vai6Do9U.css +0 -1
  110. package/dist/assets/Checkbox.tests.stories-DCrWk5Cz.js +0 -137
  111. package/dist/assets/InputText-CmkE4Hy1.js +0 -5
  112. package/dist/assets/PasswordField.stories-z8JIrcLL.js +0 -203
  113. package/dist/assets/SelectField.stories-CicE2HU3.js +0 -182
  114. package/dist/assets/TextareaField.stories-BYSJeGAa.js +0 -221
  115. package/dist/assets/TokyoUICheckmark-DzN1BbFq.js +0 -1
  116. package/dist/assets/playground-Cya3NPlx.css +0 -1
@@ -1,4 +1,4 @@
1
- import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as j}from"./index-Cb9e4tly.js";import{g as D,a as q}from"./text-accent-DZDDtpIt.js";import{m as p,s as L,b as V}from"./classNames-BUL1Zq7e.js";import{f as A}from"./filterHTMLAttributes-DYdLqcvH.js";import{w as i}from"./componentNames-Y1T_IIlY.js";import{g as M}from"./index-DdzHuZ-Y.js";import{h as k,j as S}from"./defaults-B1rzzf6M.js";import{T as R}from"./Text-WJLo2jWe.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-centered-CznToR0o.js";const G="TextWeight__tMRbd",H={TextWeight:G,"TextWeight--weight-400":"TextWeight--weight-400__EopTe","TextWeight--weight-500":"TextWeight--weight-500__wlyrw","TextWeight--weight-700":"TextWeight--weight-700__sVSfY","TextWeight--weight-normal":"TextWeight--weight-normal__M5PxM","TextWeight--weight-medium":"TextWeight--weight-medium__8f3CD","TextWeight--weight-bold":"TextWeight--weight-bold__MG-yF"},P="TextWeight",F=e=>p(H,P,[L("weight",e)]),O="TextInline__fMaqi",U={TextInline:O,"TextInline--italic":"TextInline--italic__yG-Qj"},l=j.forwardRef(function({children:g,accent:r,color:h,weight:T=S,italic:f=!1,tag:x=k,dataset:y,..._},w){const b=p(U,i.TextInline,[V("italic",void 0,f)]),s=r?void 0:h,I=D(!s,r),W=q(s),N=F(T),C=[...b,...I,...W,...N],E={...A(_),ref:w,className:C.join(" "),...M(y,{preplyDsComponent:i.TextInline})};return t.jsx(x,{...E,children:g})});try{l.displayName="TextInline",l.__docgenInfo={description:"",displayName:"TextInline",props:{accent:{defaultValue:null,description:"",name:"accent",required:!1,type:{name:"enum",value:[{value:'"accent"'},{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"placeholder"'},{value:'"inverted"'},{value:'"positive"'},{value:'"info"'},{value:'"warning"'},{value:'"critical"'},{value:'"disabled"'},{value:'"branded"'},{value:'"selected"'},{value:'"error"'}]}},color:{defaultValue:null,description:"@deprecated Use accent instead.",name:"color",required:!1,type:{name:"enum",value:[{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'}]}},weight:{defaultValue:{value:"normal"},description:"",name:"weight",required:!1,type:{name:"enum",value:[{value:'"medium"'},{value:'"normal"'},{value:'"bold"'},{value:'"400"'},{value:'"500"'},{value:'"700"'}]}},italic:{defaultValue:{value:"false"},description:"",name:"italic",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"strong"'},{value:'"span"'},{value:'"em"'}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: HTMLSpanElement | null) => void"},{value:"RefObject<HTMLSpanElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const ne={title:"components/TextInline",component:l},a=()=>t.jsxs("p",{children:["Lorem ",t.jsx(l,{children:"ipsum"})]});a.storyName="TextInline";const n={parameters:{chromatic:{disableSnapshot:!0}},render:e=>t.jsxs(R,{children:["Lorem ipsum ",t.jsx(l,{...e})]}),args:{children:"dolor sit amet",accent:"accentDark",tag:"span",dataset:{qaid:"text-inline"}},argTypes:{dataset:{control:"object"},children:{control:"text"},italic:{control:"boolean"},color:{table:{disable:!0}}}};var o,u,c;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`() => <p>
1
+ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as j}from"./index-Cb9e4tly.js";import{g as D,a as q}from"./text-accent-DZDDtpIt.js";import{m as p,s as L,b as V}from"./classNames-BUL1Zq7e.js";import{f as A}from"./filterHTMLAttributes-DYdLqcvH.js";import{w as i}from"./componentNames-Y1T_IIlY.js";import{g as M}from"./index-DdzHuZ-Y.js";import{h as k,j as S}from"./defaults-B1rzzf6M.js";import{T as R}from"./Text-B8k9gfOM.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-centered-CznToR0o.js";const G="TextWeight__tMRbd",H={TextWeight:G,"TextWeight--weight-400":"TextWeight--weight-400__EopTe","TextWeight--weight-500":"TextWeight--weight-500__wlyrw","TextWeight--weight-700":"TextWeight--weight-700__sVSfY","TextWeight--weight-normal":"TextWeight--weight-normal__M5PxM","TextWeight--weight-medium":"TextWeight--weight-medium__8f3CD","TextWeight--weight-bold":"TextWeight--weight-bold__MG-yF"},P="TextWeight",F=e=>p(H,P,[L("weight",e)]),O="TextInline__fMaqi",U={TextInline:O,"TextInline--italic":"TextInline--italic__yG-Qj"},l=j.forwardRef(function({children:g,accent:r,color:h,weight:T=S,italic:f=!1,tag:x=k,dataset:y,..._},w){const b=p(U,i.TextInline,[V("italic",void 0,f)]),s=r?void 0:h,I=D(!s,r),W=q(s),N=F(T),C=[...b,...I,...W,...N],E={...A(_),ref:w,className:C.join(" "),...M(y,{preplyDsComponent:i.TextInline})};return t.jsx(x,{...E,children:g})});try{l.displayName="TextInline",l.__docgenInfo={description:"",displayName:"TextInline",props:{accent:{defaultValue:null,description:"",name:"accent",required:!1,type:{name:"enum",value:[{value:'"disabled"'},{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"critical"'},{value:'"inverted"'},{value:'"selected"'},{value:'"info"'},{value:'"positive"'},{value:'"warning"'},{value:'"accent"'},{value:'"accentDark"'},{value:'"placeholder"'},{value:'"branded"'},{value:'"error"'}]}},color:{defaultValue:null,description:"@deprecated Use accent instead.",name:"color",required:!1,type:{name:"enum",value:[{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'}]}},weight:{defaultValue:{value:"normal"},description:"",name:"weight",required:!1,type:{name:"enum",value:[{value:'"medium"'},{value:'"normal"'},{value:'"bold"'},{value:'"400"'},{value:'"500"'},{value:'"700"'}]}},italic:{defaultValue:{value:"false"},description:"",name:"italic",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"span"'},{value:'"strong"'},{value:'"em"'}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: HTMLSpanElement | null) => void"},{value:"RefObject<HTMLSpanElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const ne={title:"components/TextInline",component:l},a=()=>t.jsxs("p",{children:["Lorem ",t.jsx(l,{children:"ipsum"})]});a.storyName="TextInline";const n={parameters:{chromatic:{disableSnapshot:!0}},render:e=>t.jsxs(R,{children:["Lorem ipsum ",t.jsx(l,{...e})]}),args:{children:"dolor sit amet",accent:"accentDark",tag:"span",dataset:{qaid:"text-inline"}},argTypes:{dataset:{control:"object"},children:{control:"text"},italic:{control:"boolean"},color:{table:{disable:!0}}}};var o,u,c;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`() => <p>
2
2
  Lorem <TextInline>ipsum</TextInline>
3
3
  </p>`,...(c=(u=a.parameters)==null?void 0:u.docs)==null?void 0:c.source}}};var m,d,v;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`{
4
4
  parameters: {
@@ -0,0 +1,221 @@
1
+ import{j as n}from"./jsx-runtime-BTJTZTIL.js";import{r as s}from"./index-Cb9e4tly.js";import{a as r}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{e as i,u as Fe,w as Re}from"./index-BVDq5o4N.js";import{B as j}from"./Button-C89H73Uu.js";import{F as Be}from"./FieldLayout-_CFICI44.js";import{s as ke,u as je,I as _e}from"./FieldLayoutBase-DOSetr9A.js";import{m as ze,s as De}from"./classNames-BUL1Zq7e.js";import{w as p}from"./componentNames-Y1T_IIlY.js";import{u as Le}from"./useForcedRef--iGFM41p.js";import{u as We}from"./useTextareaField-BDpSRnGe.js";import{T as Ke}from"./Text-B8k9gfOM.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-D0ZIVzRq.js";import"./Spinner-B2C3RkCF.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-SFH7Mw4x.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./useHostname-Y3PlXofY.js";import"./index-DdzHuZ-Y.js";import"./index-CC6DAVyL.js";import"./FieldAdditionalText-Du1TBs7a.js";import"./constants-DL6gdbsq.js";import"./index-D1pfvbUR.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./message-B1DLZQ1U.js";import"./constants-BaXVdZRV.js";import"./text-accent-DZDDtpIt.js";import"./text-centered-CznToR0o.js";const z=({onChange:e,onValueChange:a,resize:t="vertical",...l},o)=>{const d=ze(ke,p.Textarea,[De("resize",t)]),u=je(c=>c.target.value,e,a);return n.jsx(_e,{...l,ref:o,type:"textarea",className:d.join(" "),onChange:u,preplyDsComponent:p.Textarea})},B=s.forwardRef(z);try{z.displayName="TextareaLocal",z.__docgenInfo={description:"",displayName:"TextareaLocal",props:{dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<Element>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},"aria-describedby":{defaultValue:null,description:`Identifies the element (or elements) that describes the object.
2
+ @see aria-labelledby`,name:"aria-describedby",required:!1,type:{name:"enum",value:[{value:"string"}]}},hasError:{defaultValue:null,description:"",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"string"}]}},"aria-disabled":{defaultValue:null,description:`Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
3
+ @see aria-hidden
4
+ @see aria-readonly.`,name:"aria-disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},"aria-invalid":{defaultValue:null,description:`Indicates the entered value does not conform to the format expected by the application.
5
+ @see aria-errormessage.`,name:"aria-invalid",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'},{value:'"grammar"'},{value:'"spelling"'}]}},"aria-required":{defaultValue:null,description:"Indicates that user input is required on the element before a form may be submitted.",name:"aria-required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"enum",value:[{value:'"off"'},{value:'"on"'}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"string"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"enum",value:[{value:"number"}]}},resize:{defaultValue:{value:"vertical"},description:"",name:"resize",required:!1,type:{name:"enum",value:[{value:'"none"'},{value:'"vertical"'},{value:'"horizontal"'},{value:'"both"'}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"ValueChangeEventHandler<string>"}]}}}}}catch{}try{B.displayName="Textarea",B.__docgenInfo={description:"",displayName:"Textarea",props:{dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<Element>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},"aria-describedby":{defaultValue:null,description:`Identifies the element (or elements) that describes the object.
6
+ @see aria-labelledby`,name:"aria-describedby",required:!1,type:{name:"enum",value:[{value:"string"}]}},hasError:{defaultValue:null,description:"",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"string"}]}},"aria-disabled":{defaultValue:null,description:`Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
7
+ @see aria-hidden
8
+ @see aria-readonly.`,name:"aria-disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},"aria-invalid":{defaultValue:null,description:`Indicates the entered value does not conform to the format expected by the application.
9
+ @see aria-errormessage.`,name:"aria-invalid",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'},{value:'"grammar"'},{value:'"spelling"'}]}},"aria-required":{defaultValue:null,description:"Indicates that user input is required on the element before a form may be submitted.",name:"aria-required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"enum",value:[{value:'"off"'},{value:'"on"'}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"string"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"enum",value:[{value:"number"}]}},resize:{defaultValue:{value:"vertical"},description:"",name:"resize",required:!1,type:{name:"enum",value:[{value:'"none"'},{value:'"vertical"'},{value:'"horizontal"'},{value:'"both"'}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"ValueChangeEventHandler<string>"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: InputImperativeHandle | null) => void"},{value:"RefObject<InputImperativeHandle>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const Ne="TextareaField__Wpx9P",Me={TextareaField:Ne},Pe=({id:e,...a},t)=>{const l=s.useRef(null),o=Le();s.useImperativeHandle(t,()=>({setFocus:()=>{var m;return(m=l==null?void 0:l.current)==null?void 0:m.setFocus()},scrollIntoView:()=>{var m;return(m=l==null?void 0:l.current)==null?void 0:m.scrollIntoView()}}));const{layoutProps:d,inputProps:u}=We({id:e,...a},p.TextareaField),c=ze(Me,p.TextareaField),f=n.jsx(B,{...u,ref:o});return n.jsx(Be,{...d,className:c.join(" "),input:f,inputHandle:o.current,ref:l,preplyDsComponent:p.TextareaField})},v=s.forwardRef(Pe);try{v.displayName="TextareaField",v.__docgenInfo={description:"",displayName:"TextareaField",props:{id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},label:{defaultValue:null,description:"The field label. This is needed for accessibility purposes, but can be\nhidden using the `hideLabel` prop.",name:"label",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},requiredLabel:{defaultValue:null,description:"",name:"requiredLabel",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},hideLabel:{defaultValue:null,description:"Use this to hide the `label` visually, but keep it in the accessibility\ntree.",name:"hideLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},wrapLabel:{defaultValue:null,description:"",name:"wrapLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},additionalText:{defaultValue:null,description:"",name:"additionalText",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},preserveSpace:{defaultValue:null,description:"",name:"preserveSpace",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},hasError:{defaultValue:null,description:"",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},errorMessage:{defaultValue:null,description:"",name:"errorMessage",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<Element>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"string"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"enum",value:[{value:'"off"'},{value:'"on"'}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"string"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"ValueChangeEventHandler<string>"}]}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"enum",value:[{value:"number"}]}},resize:{defaultValue:null,description:"",name:"resize",required:!1,type:{name:"enum",value:[{value:'"none"'},{value:'"vertical"'},{value:'"horizontal"'},{value:'"both"'}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: InputImperativeHandle | null) => void"},{value:"RefObject<InputImperativeHandle>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const Ea={title:"components/TextareaField",component:v,args:{label:"Textarea",defaultValue:"",placeholder:"Enter text here",inputDataset:{testid:"input"},onChange:r("onChange"),onBlur:r("onBlur"),onFocus:r("onFocus"),onClick:r("onClick"),onCopy:r("onCopy"),onKeyDown:r("onKeyDown"),onKeyUp:r("onKeyUp"),onPaste:r("onPaste"),onValueChange:r("onValueChange")},render:function(a){const t=s.useRef(null);return a.ref=t,n.jsx(v,{...a})}},y={parameters:{docs:{description:{story:"An empty field with a `label` and a `placeholder`."}}}},h={args:{defaultValue:"Hey, you!"},play:async({canvas:e})=>{const a=e.getByTestId("input");return await i(a).toHaveValue("Hey, you!"),await Fe.type(a," How's it going?"),i(a).toHaveValue("Hey, you! How's it going?")}},g={args:{defaultValue:"Hey, you!",resize:"both"},play:({canvas:e})=>{const a=e.getByTestId("input");i(a).toHaveStyle({resize:"both"})}},b={args:{defaultValue:"Hey, you!",resize:"vertical"},play:({canvas:e})=>{const a=e.getByTestId("input");i(a).toHaveStyle({resize:"vertical"})}},V={args:{defaultValue:"Hey, you!",resize:"horizontal"},play:({canvas:e})=>{const a=e.getByTestId("input");i(a).toHaveStyle({resize:"horizontal"})}},x={args:{additionalText:"This is additional text"}},q={args:{required:!0}},E={args:{required:!0,requiredLabel:n.jsx(Ke,{accent:"critical",variant:"m-bold",children:"Needed"})}},w={args:{hideLabel:!0}},H={args:{hasError:!0}},C={args:{hasError:!0,errorMessage:"This is an error message"}},I={args:{disabled:!0}},T={args:{readOnly:!0}},S={decorators:[(e,{args:a})=>n.jsxs("div",{style:{padding:"8px",margin:"8px"},children:[n.jsxs("p",{children:["You can"," ",n.jsx(j,{variant:"secondary",dataset:{testid:"focus-button"},onClick:()=>{var t,l;return(l=(t=a.ref)==null?void 0:t.current)==null?void 0:l.setFocus()},children:"Focus"})," ","the input imperatively."]}),n.jsx(e,{})]})],play:async({args:e,canvas:a})=>{if(!k(e.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");const t=a.getByTestId("input");await Fe.click(a.getByTestId("focus-button")),await Re(()=>i(t).toHaveFocus())}},F={decorators:[(e,{args:a})=>n.jsxs("div",{style:{height:"300px",overflow:"scroll",padding:"8px",margin:"8px"},children:[n.jsxs("p",{children:["You can"," ",n.jsx(j,{variant:"secondary",dataset:{testid:"scroll-button"},onClick:()=>{if(!k(a.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");a.ref.current.scrollIntoView()},children:"Scroll"})," ","the input into view imperatively."]}),n.jsx("div",{style:{height:"1000px",display:"flex",flexDirection:"column",justifyContent:"end",border:"2px dashed lightgray",padding:"16px"},children:n.jsx(e,{})})]})],play:async({args:e,canvas:a})=>{if(!k(e.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");const t=a.getByTestId("input");e.ref.current.scrollIntoView(),await Re(()=>i(t).toBeVisible())}};function k(e){return typeof e=="object"&&e!==null&&"current"in e&&e.current!==null&&typeof e.current=="object"&&"setFocus"in e.current}const R={tags:["!test"],parameters:{docs:{description:{story:'\nThe following code renders a `TextareaField` with the `required` flag, a\n`button`, `placeholder` and some `additionalText`.\n\nWhen you click the "Submit" button, and the input `value` is empty:\n\n- Displays feedback via the `errorMessage` prop;\n- Brings the focus back to the field.\n'}},chromatic:{disableSnapshot:!0}},render:function(){const[a,t]=s.useState(""),[l,o]=s.useState(!1),d=l&&!a&&"Please provide your full name",u=s.useRef(null),c=()=>{var f;o(!0),a||(f=u==null?void 0:u.current)==null||f.setFocus()};return n.jsxs("div",{style:{maxWidth:"500px",display:"flex",flexDirection:"column"},children:[n.jsx(v,{value:a,label:"Full name",required:!0,placeholder:"e.g.: Mary Williams",additionalText:"Will be shown in your profile",onValueChange:t,errorMessage:d,ref:u,resize:"horizontal"}),n.jsx(j,{onClick:c,children:"Submit"})]})}};var _,D,L;y.parameters={...y.parameters,docs:{...(_=y.parameters)==null?void 0:_.docs,source:{originalSource:`{
10
+ parameters: {
11
+ docs: {
12
+ description: {
13
+ story: \`An empty field with a \\\`label\\\` and a \\\`placeholder\\\`.\`
14
+ }
15
+ }
16
+ }
17
+ }`,...(L=(D=y.parameters)==null?void 0:D.docs)==null?void 0:L.source}}};var W,K,N;h.parameters={...h.parameters,docs:{...(W=h.parameters)==null?void 0:W.docs,source:{originalSource:`{
18
+ args: {
19
+ defaultValue: 'Hey, you!'
20
+ },
21
+ play: async ({
22
+ canvas
23
+ }) => {
24
+ const input = canvas.getByTestId('input');
25
+ await expect(input).toHaveValue('Hey, you!');
26
+ await userEvent.type(input, " How's it going?");
27
+ return expect(input).toHaveValue("Hey, you! How's it going?");
28
+ }
29
+ }`,...(N=(K=h.parameters)==null?void 0:K.docs)==null?void 0:N.source}}};var M,P,O;g.parameters={...g.parameters,docs:{...(M=g.parameters)==null?void 0:M.docs,source:{originalSource:`{
30
+ args: {
31
+ defaultValue: 'Hey, you!',
32
+ resize: 'both'
33
+ },
34
+ play: ({
35
+ canvas
36
+ }) => {
37
+ const textarea = canvas.getByTestId('input');
38
+ expect(textarea).toHaveStyle({
39
+ resize: 'both'
40
+ });
41
+ }
42
+ }`,...(O=(P=g.parameters)==null?void 0:P.docs)==null?void 0:O.source}}};var U,A,J;b.parameters={...b.parameters,docs:{...(U=b.parameters)==null?void 0:U.docs,source:{originalSource:`{
43
+ args: {
44
+ defaultValue: 'Hey, you!',
45
+ resize: 'vertical'
46
+ },
47
+ play: ({
48
+ canvas
49
+ }) => {
50
+ const textarea = canvas.getByTestId('input');
51
+ expect(textarea).toHaveStyle({
52
+ resize: 'vertical'
53
+ });
54
+ }
55
+ }`,...(J=(A=b.parameters)==null?void 0:A.docs)==null?void 0:J.source}}};var X,Y,$;V.parameters={...V.parameters,docs:{...(X=V.parameters)==null?void 0:X.docs,source:{originalSource:`{
56
+ args: {
57
+ defaultValue: 'Hey, you!',
58
+ resize: 'horizontal'
59
+ },
60
+ play: ({
61
+ canvas
62
+ }) => {
63
+ const textarea = canvas.getByTestId('input');
64
+ expect(textarea).toHaveStyle({
65
+ resize: 'horizontal'
66
+ });
67
+ }
68
+ }`,...($=(Y=V.parameters)==null?void 0:Y.docs)==null?void 0:$.source}}};var G,Q,Z;x.parameters={...x.parameters,docs:{...(G=x.parameters)==null?void 0:G.docs,source:{originalSource:`{
69
+ args: {
70
+ additionalText: 'This is additional text'
71
+ }
72
+ }`,...(Z=(Q=x.parameters)==null?void 0:Q.docs)==null?void 0:Z.source}}};var ee,ae,ne;q.parameters={...q.parameters,docs:{...(ee=q.parameters)==null?void 0:ee.docs,source:{originalSource:`{
73
+ args: {
74
+ required: true
75
+ }
76
+ }`,...(ne=(ae=q.parameters)==null?void 0:ae.docs)==null?void 0:ne.source}}};var te,le,re;E.parameters={...E.parameters,docs:{...(te=E.parameters)==null?void 0:te.docs,source:{originalSource:`{
77
+ args: {
78
+ required: true,
79
+ requiredLabel: <Text accent="critical" variant="m-bold">
80
+ Needed
81
+ </Text>
82
+ }
83
+ }`,...(re=(le=E.parameters)==null?void 0:le.docs)==null?void 0:re.source}}};var ue,se,ie;w.parameters={...w.parameters,docs:{...(ue=w.parameters)==null?void 0:ue.docs,source:{originalSource:`{
84
+ args: {
85
+ hideLabel: true
86
+ }
87
+ }`,...(ie=(se=w.parameters)==null?void 0:se.docs)==null?void 0:ie.source}}};var oe,de,ce;H.parameters={...H.parameters,docs:{...(oe=H.parameters)==null?void 0:oe.docs,source:{originalSource:`{
88
+ args: {
89
+ hasError: true
90
+ }
91
+ }`,...(ce=(de=H.parameters)==null?void 0:de.docs)==null?void 0:ce.source}}};var me,pe,ve;C.parameters={...C.parameters,docs:{...(me=C.parameters)==null?void 0:me.docs,source:{originalSource:`{
92
+ args: {
93
+ hasError: true,
94
+ errorMessage: 'This is an error message'
95
+ }
96
+ }`,...(ve=(pe=C.parameters)==null?void 0:pe.docs)==null?void 0:ve.source}}};var fe,ye,he;I.parameters={...I.parameters,docs:{...(fe=I.parameters)==null?void 0:fe.docs,source:{originalSource:`{
97
+ args: {
98
+ disabled: true
99
+ }
100
+ }`,...(he=(ye=I.parameters)==null?void 0:ye.docs)==null?void 0:he.source}}};var ge,be,Ve;T.parameters={...T.parameters,docs:{...(ge=T.parameters)==null?void 0:ge.docs,source:{originalSource:`{
101
+ args: {
102
+ readOnly: true
103
+ }
104
+ }`,...(Ve=(be=T.parameters)==null?void 0:be.docs)==null?void 0:Ve.source}}};var xe,qe,Ee;S.parameters={...S.parameters,docs:{...(xe=S.parameters)==null?void 0:xe.docs,source:{originalSource:`{
105
+ decorators: [(Story, {
106
+ args
107
+ }) => <div style={{
108
+ padding: '8px',
109
+ margin: '8px'
110
+ }}>
111
+ <p>
112
+ You can{' '}
113
+ <Button variant="secondary" dataset={{
114
+ testid: 'focus-button'
115
+ }} onClick={() =>
116
+ // @ts-expect-error - This will fail gracefully,
117
+ // and the \`play\` function will assert it properly
118
+ args.ref?.current?.setFocus()}>
119
+ Focus
120
+ </Button>{' '}
121
+ the input imperatively.
122
+ </p>
123
+ <Story />
124
+ </div>],
125
+ play: async ({
126
+ args,
127
+ canvas
128
+ }) => {
129
+ if (!isImperativeHandleRef(args.ref)) {
130
+ throw new Error('Expected ref.current to be an InputImperativeHandle');
131
+ }
132
+ const input = canvas.getByTestId('input');
133
+ await userEvent.click(canvas.getByTestId('focus-button'));
134
+ await waitFor(() => expect(input).toHaveFocus());
135
+ }
136
+ }`,...(Ee=(qe=S.parameters)==null?void 0:qe.docs)==null?void 0:Ee.source}}};var we,He,Ce;F.parameters={...F.parameters,docs:{...(we=F.parameters)==null?void 0:we.docs,source:{originalSource:`{
137
+ decorators: [(Story, {
138
+ args
139
+ }) => <div style={{
140
+ height: '300px',
141
+ overflow: 'scroll',
142
+ padding: '8px',
143
+ margin: '8px'
144
+ }}>
145
+ <p>
146
+ You can{' '}
147
+ <Button variant="secondary" dataset={{
148
+ testid: 'scroll-button'
149
+ }} onClick={() => {
150
+ if (!isImperativeHandleRef(args.ref)) {
151
+ throw new Error('Expected ref.current to be an InputImperativeHandle');
152
+ }
153
+ args.ref.current.scrollIntoView();
154
+ }}>
155
+ Scroll
156
+ </Button>{' '}
157
+ the input into view imperatively.
158
+ </p>
159
+ <div style={{
160
+ height: '1000px',
161
+ display: 'flex',
162
+ flexDirection: 'column',
163
+ justifyContent: 'end',
164
+ border: '2px dashed lightgray',
165
+ padding: '16px'
166
+ }}>
167
+ <Story />
168
+ </div>
169
+ </div>],
170
+ play: async ({
171
+ args,
172
+ canvas
173
+ }) => {
174
+ if (!isImperativeHandleRef(args.ref)) {
175
+ throw new Error('Expected ref.current to be an InputImperativeHandle');
176
+ }
177
+ const input = canvas.getByTestId('input');
178
+ args.ref.current.scrollIntoView();
179
+ await waitFor(() => expect(input).toBeVisible());
180
+ }
181
+ }`,...(Ce=(He=F.parameters)==null?void 0:He.docs)==null?void 0:Ce.source}}};var Ie,Te,Se;R.parameters={...R.parameters,docs:{...(Ie=R.parameters)==null?void 0:Ie.docs,source:{originalSource:`{
182
+ tags: ['!test'],
183
+ parameters: {
184
+ docs: {
185
+ description: {
186
+ story: \`
187
+ The following code renders a \\\`TextareaField\\\` with the \\\`required\\\` flag, a
188
+ \\\`button\\\`, \\\`placeholder\\\` and some \\\`additionalText\\\`.
189
+
190
+ When you click the "Submit" button, and the input \\\`value\\\` is empty:
191
+
192
+ - Displays feedback via the \\\`errorMessage\\\` prop;
193
+ - Brings the focus back to the field.
194
+ \`
195
+ }
196
+ },
197
+ chromatic: {
198
+ disableSnapshot: true
199
+ }
200
+ },
201
+ render: function Story() {
202
+ const [value, setValue] = useState('');
203
+ const [submited, setSubmitted] = useState(false);
204
+ const errorMessage = submited && !value && 'Please provide your full name';
205
+ const fieldRef = useRef<InputImperativeHandle>(null);
206
+ const handleClick = () => {
207
+ setSubmitted(true);
208
+ if (!value) {
209
+ fieldRef?.current?.setFocus();
210
+ }
211
+ };
212
+ return <div style={{
213
+ maxWidth: '500px',
214
+ display: 'flex',
215
+ flexDirection: 'column'
216
+ }}>
217
+ <TextareaField value={value} label="Full name" required placeholder="e.g.: Mary Williams" additionalText="Will be shown in your profile" onValueChange={setValue} errorMessage={errorMessage} ref={fieldRef} resize="horizontal" />
218
+ <Button onClick={handleClick}>Submit</Button>
219
+ </div>;
220
+ }
221
+ }`,...(Se=(Te=R.parameters)==null?void 0:Te.docs)==null?void 0:Se.source}}};const wa=["Basic","WithValue","WithResize","WithVerticalResize","WithHorizontalResize","WithAdditionalText","Required","RequiredWithCustomLabel","WithHiddenLabel","HasError","HasErrorWithMessage","Disabled","ReadOnly","ImperativeSetFocus","ImperativeScrollIntoView","Example"];export{y as Basic,I as Disabled,R as Example,H as HasError,C as HasErrorWithMessage,F as ImperativeScrollIntoView,S as ImperativeSetFocus,T as ReadOnly,q as Required,E as RequiredWithCustomLabel,x as WithAdditionalText,w as WithHiddenLabel,V as WithHorizontalResize,g as WithResize,h as WithValue,b as WithVerticalResize,wa as __namedExportsOrder,Ea as default};
@@ -1,4 +1,4 @@
1
- import{j as w}from"./jsx-runtime-BTJTZTIL.js";import{r as h,e as o}from"./index-Cb9e4tly.js";import{w as St,e as Ct,c as Ft,u as _e}from"./index-BVDq5o4N.js";import{a as Bt}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{F as Xe}from"./TokyoUIInfo-DbkQBubr.js";import{v as Qe}from"./index-BPrLDK9Y.js";import{I as Ht}from"./Icon-RJMnctrw.js";import{u as Ge}from"./index-D1pfvbUR.js";import{g as Je}from"./shared-strings-Biv7UF3M.js";import{g as ta}from"./index-DdzHuZ-Y.js";import{w as ea}from"./componentNames-Y1T_IIlY.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./index-C7hTFOIV.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./render-icon-BT0Aq7PA.js";import"./defaults-B1rzzf6M.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";var aa=e=>{switch(e){case"success":return ra;case"info":return ia;case"warning":return na;case"error":return la;default:return null}},oa=Array(12).fill(0),sa=({visible:e,className:a})=>o.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":e},o.createElement("div",{className:"sonner-spinner"},oa.map((s,r)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ra=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),na=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ia=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),la=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),da=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ca=()=>{let[e,a]=o.useState(document.hidden);return o.useEffect(()=>{let s=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e},Yt=1,ua=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let a=this.subscribers.indexOf(e);this.subscribers.splice(a,1)}),this.publish=e=>{this.subscribers.forEach(a=>a(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var a;let{message:s,...r}=e,m=typeof(e==null?void 0:e.id)=="number"||((a=e.id)==null?void 0:a.length)>0?e.id:Yt++,b=this.toasts.find(x=>x.id===m),k=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(m)&&this.dismissedToasts.delete(m),b?this.toasts=this.toasts.map(x=>x.id===m?(this.publish({...x,...e,id:m,title:s}),{...x,...e,id:m,dismissible:k,title:s}):x):this.addToast({title:s,...r,dismissible:k,id:m}),m},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(a=>{this.subscribers.forEach(s=>s({id:a.id,dismiss:!0}))}),this.subscribers.forEach(a=>a({id:e,dismiss:!0})),e),this.message=(e,a)=>this.create({...a,message:e}),this.error=(e,a)=>this.create({...a,message:e,type:"error"}),this.success=(e,a)=>this.create({...a,type:"success",message:e}),this.info=(e,a)=>this.create({...a,type:"info",message:e}),this.warning=(e,a)=>this.create({...a,type:"warning",message:e}),this.loading=(e,a)=>this.create({...a,type:"loading",message:e}),this.promise=(e,a)=>{if(!a)return;let s;a.loading!==void 0&&(s=this.create({...a,promise:e,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));let r=e instanceof Promise?e:e(),m=s!==void 0,b,k=r.then(async l=>{if(b=["resolve",l],o.isValidElement(l))m=!1,this.create({id:s,type:"default",message:l});else if(fa(l)&&!l.ok){m=!1;let c=typeof a.error=="function"?await a.error(`HTTP error! status: ${l.status}`):a.error,E=typeof a.description=="function"?await a.description(`HTTP error! status: ${l.status}`):a.description;this.create({id:s,type:"error",message:c,description:E})}else if(a.success!==void 0){m=!1;let c=typeof a.success=="function"?await a.success(l):a.success,E=typeof a.description=="function"?await a.description(l):a.description;this.create({id:s,type:"success",message:c,description:E})}}).catch(async l=>{if(b=["reject",l],a.error!==void 0){m=!1;let c=typeof a.error=="function"?await a.error(l):a.error,E=typeof a.description=="function"?await a.description(l):a.description;this.create({id:s,type:"error",message:c,description:E})}}).finally(()=>{var l;m&&(this.dismiss(s),s=void 0),(l=a.finally)==null||l.call(a)}),x=()=>new Promise((l,c)=>k.then(()=>b[0]==="reject"?c(b[1]):l(b[1])).catch(c));return typeof s!="string"&&typeof s!="number"?{unwrap:x}:Object.assign(s,{unwrap:x})},this.custom=(e,a)=>{let s=(a==null?void 0:a.id)||Yt++;return this.create({jsx:e(s),id:s,...a}),s},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},C=new ua,ma=(e,a)=>{let s=(a==null?void 0:a.id)||Yt++;return C.addToast({title:e,...a,id:s}),s},fa=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pa=ma,ha=()=>C.toasts,ga=()=>C.getActiveToasts(),Ot=Object.assign(pa,{success:C.success,info:C.info,warning:C.warning,error:C.error,custom:C.custom,message:C.message,promise:C.promise,dismiss:C.dismiss,loading:C.loading},{getHistory:ha,getToasts:ga});function ya(e,{insertAt:a}={}){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a==="top"&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ya(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
1
+ import{j as w}from"./jsx-runtime-BTJTZTIL.js";import{r as h,e as o}from"./index-Cb9e4tly.js";import{w as St,e as Ct,c as Ft,u as _e}from"./index-BVDq5o4N.js";import{a as Bt}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{F as Xe}from"./TokyoUIInfo-DbkQBubr.js";import{v as Qe}from"./index-BPrLDK9Y.js";import{I as Ht}from"./Icon-TCS4E3Ut.js";import{u as Ge}from"./index-D1pfvbUR.js";import{g as Je}from"./shared-strings-Biv7UF3M.js";import{g as ta}from"./index-DdzHuZ-Y.js";import{w as ea}from"./componentNames-Y1T_IIlY.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./index-C7hTFOIV.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./render-icon-BT0Aq7PA.js";import"./defaults-B1rzzf6M.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";var aa=e=>{switch(e){case"success":return ra;case"info":return ia;case"warning":return na;case"error":return la;default:return null}},oa=Array(12).fill(0),sa=({visible:e,className:a})=>o.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":e},o.createElement("div",{className:"sonner-spinner"},oa.map((s,r)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ra=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),na=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ia=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),la=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),da=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ca=()=>{let[e,a]=o.useState(document.hidden);return o.useEffect(()=>{let s=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e},Yt=1,ua=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let a=this.subscribers.indexOf(e);this.subscribers.splice(a,1)}),this.publish=e=>{this.subscribers.forEach(a=>a(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var a;let{message:s,...r}=e,m=typeof(e==null?void 0:e.id)=="number"||((a=e.id)==null?void 0:a.length)>0?e.id:Yt++,b=this.toasts.find(x=>x.id===m),k=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(m)&&this.dismissedToasts.delete(m),b?this.toasts=this.toasts.map(x=>x.id===m?(this.publish({...x,...e,id:m,title:s}),{...x,...e,id:m,dismissible:k,title:s}):x):this.addToast({title:s,...r,dismissible:k,id:m}),m},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(a=>{this.subscribers.forEach(s=>s({id:a.id,dismiss:!0}))}),this.subscribers.forEach(a=>a({id:e,dismiss:!0})),e),this.message=(e,a)=>this.create({...a,message:e}),this.error=(e,a)=>this.create({...a,message:e,type:"error"}),this.success=(e,a)=>this.create({...a,type:"success",message:e}),this.info=(e,a)=>this.create({...a,type:"info",message:e}),this.warning=(e,a)=>this.create({...a,type:"warning",message:e}),this.loading=(e,a)=>this.create({...a,type:"loading",message:e}),this.promise=(e,a)=>{if(!a)return;let s;a.loading!==void 0&&(s=this.create({...a,promise:e,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));let r=e instanceof Promise?e:e(),m=s!==void 0,b,k=r.then(async l=>{if(b=["resolve",l],o.isValidElement(l))m=!1,this.create({id:s,type:"default",message:l});else if(fa(l)&&!l.ok){m=!1;let c=typeof a.error=="function"?await a.error(`HTTP error! status: ${l.status}`):a.error,E=typeof a.description=="function"?await a.description(`HTTP error! status: ${l.status}`):a.description;this.create({id:s,type:"error",message:c,description:E})}else if(a.success!==void 0){m=!1;let c=typeof a.success=="function"?await a.success(l):a.success,E=typeof a.description=="function"?await a.description(l):a.description;this.create({id:s,type:"success",message:c,description:E})}}).catch(async l=>{if(b=["reject",l],a.error!==void 0){m=!1;let c=typeof a.error=="function"?await a.error(l):a.error,E=typeof a.description=="function"?await a.description(l):a.description;this.create({id:s,type:"error",message:c,description:E})}}).finally(()=>{var l;m&&(this.dismiss(s),s=void 0),(l=a.finally)==null||l.call(a)}),x=()=>new Promise((l,c)=>k.then(()=>b[0]==="reject"?c(b[1]):l(b[1])).catch(c));return typeof s!="string"&&typeof s!="number"?{unwrap:x}:Object.assign(s,{unwrap:x})},this.custom=(e,a)=>{let s=(a==null?void 0:a.id)||Yt++;return this.create({jsx:e(s),id:s,...a}),s},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},C=new ua,ma=(e,a)=>{let s=(a==null?void 0:a.id)||Yt++;return C.addToast({title:e,...a,id:s}),s},fa=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pa=ma,ha=()=>C.toasts,ga=()=>C.getActiveToasts(),Ot=Object.assign(pa,{success:C.success,info:C.info,warning:C.warning,error:C.error,custom:C.custom,message:C.message,promise:C.promise,dismiss:C.dismiss,loading:C.loading},{getHistory:ha,getToasts:ga});function ya(e,{insertAt:a}={}){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a==="top"&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ya(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
2
2
  `);function yt(e){return e.label!==void 0}var va=3,wa="32px",ba="16px",Gt=4e3,xa=356,Ta=14,Ea=20,ka=200;function A(...e){return e.filter(Boolean).join(" ")}function Ia(e){let[a,s]=e.split("-"),r=[];return a&&r.push(a),s&&r.push(s),r}var Sa=e=>{var a,s,r,m,b,k,x,l,c,E,it;let{invert:Nt,toast:t,unstyled:jt,interacting:v,setHeights:L,visibleToasts:lt,heights:W,index:D,toasts:Pt,expanded:et,removeToast:j,defaultRichColors:at,closeButton:dt,style:ct,cancelButtonStyle:Mt,actionButtonStyle:ut,className:_="",descriptionClassName:mt="",duration:U,position:ft,gap:$,loadingIcon:z,expandByDefault:pt,classNames:i,icons:B,closeButtonAriaLabel:Rt="Close toast",pauseWhenPageIsHidden:u}=e,[f,g]=o.useState(null),[S,q]=o.useState(null),[y,At]=o.useState(!1),[ot,ht]=o.useState(!1),[st,Lt]=o.useState(!1),[Vt,ze]=o.useState(!1),[De,Wt]=o.useState(!1),[Oe,_t]=o.useState(0),[He,Ut]=o.useState(0),rt=o.useRef(t.duration||U||Gt),qt=o.useRef(null),F=o.useRef(null),Ye=D===0,$e=D+1<=lt,N=t.type,Z=t.dismissible!==!1,Fe=t.className||"",Ve=t.descriptionClassName||"",gt=o.useMemo(()=>W.findIndex(n=>n.toastId===t.id)||0,[W,t.id]),We=o.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:dt},[t.closeButton,dt]),Zt=o.useMemo(()=>t.duration||U||Gt,[t.duration,U]),zt=o.useRef(0),K=o.useRef(0),Kt=o.useRef(0),X=o.useRef(null),[Ue,qe]=ft.split("-"),Xt=o.useMemo(()=>W.reduce((n,d,p)=>p>=gt?n:n+d.height,0),[W,gt]),Qt=ca(),Ze=t.invert||Nt,Dt=N==="loading";K.current=o.useMemo(()=>gt*$+Xt,[gt,Xt]),o.useEffect(()=>{rt.current=Zt},[Zt]),o.useEffect(()=>{At(!0)},[]),o.useEffect(()=>{let n=F.current;if(n){let d=n.getBoundingClientRect().height;return Ut(d),L(p=>[{toastId:t.id,height:d,position:t.position},...p]),()=>L(p=>p.filter(P=>P.toastId!==t.id))}},[L,t.id]),o.useLayoutEffect(()=>{if(!y)return;let n=F.current,d=n.style.height;n.style.height="auto";let p=n.getBoundingClientRect().height;n.style.height=d,Ut(p),L(P=>P.find(M=>M.toastId===t.id)?P.map(M=>M.toastId===t.id?{...M,height:p}:M):[{toastId:t.id,height:p,position:t.position},...P])},[y,t.title,t.description,L,t.id]);let O=o.useCallback(()=>{ht(!0),_t(K.current),L(n=>n.filter(d=>d.toastId!==t.id)),setTimeout(()=>{j(t)},ka)},[t,j,L,K]);o.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let n;return et||v||u&&Qt?(()=>{if(Kt.current<zt.current){let d=new Date().getTime()-zt.current;rt.current=rt.current-d}Kt.current=new Date().getTime()})():rt.current!==1/0&&(zt.current=new Date().getTime(),n=setTimeout(()=>{var d;(d=t.onAutoClose)==null||d.call(t,t),O()},rt.current)),()=>clearTimeout(n)},[et,v,t,N,u,Qt,O]),o.useEffect(()=>{t.delete&&O()},[O,t.delete]);function Ke(){var n,d,p;return B!=null&&B.loading?o.createElement("div",{className:A(i==null?void 0:i.loader,(n=t==null?void 0:t.classNames)==null?void 0:n.loader,"sonner-loader"),"data-visible":N==="loading"},B.loading):z?o.createElement("div",{className:A(i==null?void 0:i.loader,(d=t==null?void 0:t.classNames)==null?void 0:d.loader,"sonner-loader"),"data-visible":N==="loading"},z):o.createElement(sa,{className:A(i==null?void 0:i.loader,(p=t==null?void 0:t.classNames)==null?void 0:p.loader),visible:N==="loading"})}return o.createElement("li",{tabIndex:0,ref:F,className:A(_,Fe,i==null?void 0:i.toast,(a=t==null?void 0:t.classNames)==null?void 0:a.toast,i==null?void 0:i.default,i==null?void 0:i[N],(s=t==null?void 0:t.classNames)==null?void 0:s[N]),"data-sonner-toast":"","data-rich-colors":(r=t.richColors)!=null?r:at,"data-styled":!(t.jsx||t.unstyled||jt),"data-mounted":y,"data-promise":!!t.promise,"data-swiped":De,"data-removed":ot,"data-visible":$e,"data-y-position":Ue,"data-x-position":qe,"data-index":D,"data-front":Ye,"data-swiping":st,"data-dismissible":Z,"data-type":N,"data-invert":Ze,"data-swipe-out":Vt,"data-swipe-direction":S,"data-expanded":!!(et||pt&&y),style:{"--index":D,"--toasts-before":D,"--z-index":Pt.length-D,"--offset":`${ot?Oe:K.current}px`,"--initial-height":pt?"auto":`${He}px`,...ct,...t.style},onDragEnd:()=>{Lt(!1),g(null),X.current=null},onPointerDown:n=>{Dt||!Z||(qt.current=new Date,_t(K.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(Lt(!0),X.current={x:n.clientX,y:n.clientY}))},onPointerUp:()=>{var n,d,p,P;if(Vt||!Z)return;X.current=null;let M=Number(((n=F.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),H=Number(((d=F.current)==null?void 0:d.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),V=new Date().getTime()-((p=qt.current)==null?void 0:p.getTime()),R=f==="x"?M:H,Y=Math.abs(R)/V;if(Math.abs(R)>=Ea||Y>.11){_t(K.current),(P=t.onDismiss)==null||P.call(t,t),q(f==="x"?M>0?"right":"left":H>0?"down":"up"),O(),ze(!0),Wt(!1);return}Lt(!1),g(null)},onPointerMove:n=>{var d,p,P,M;if(!X.current||!Z||((d=window.getSelection())==null?void 0:d.toString().length)>0)return;let H=n.clientY-X.current.y,V=n.clientX-X.current.x,R=(p=e.swipeDirections)!=null?p:Ia(ft);!f&&(Math.abs(V)>1||Math.abs(H)>1)&&g(Math.abs(V)>Math.abs(H)?"x":"y");let Y={x:0,y:0};f==="y"?(R.includes("top")||R.includes("bottom"))&&(R.includes("top")&&H<0||R.includes("bottom")&&H>0)&&(Y.y=H):f==="x"&&(R.includes("left")||R.includes("right"))&&(R.includes("left")&&V<0||R.includes("right")&&V>0)&&(Y.x=V),(Math.abs(Y.x)>0||Math.abs(Y.y)>0)&&Wt(!0),(P=F.current)==null||P.style.setProperty("--swipe-amount-x",`${Y.x}px`),(M=F.current)==null||M.style.setProperty("--swipe-amount-y",`${Y.y}px`)}},We&&!t.jsx?o.createElement("button",{"aria-label":Rt,"data-disabled":Dt,"data-close-button":!0,onClick:Dt||!Z?()=>{}:()=>{var n;O(),(n=t.onDismiss)==null||n.call(t,t)},className:A(i==null?void 0:i.closeButton,(m=t==null?void 0:t.classNames)==null?void 0:m.closeButton)},(b=B==null?void 0:B.close)!=null?b:da):null,t.jsx||h.isValidElement(t.title)?t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title:o.createElement(o.Fragment,null,N||t.icon||t.promise?o.createElement("div",{"data-icon":"",className:A(i==null?void 0:i.icon,(k=t==null?void 0:t.classNames)==null?void 0:k.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ke():null,t.type!=="loading"?t.icon||(B==null?void 0:B[N])||aa(N):null):null,o.createElement("div",{"data-content":"",className:A(i==null?void 0:i.content,(x=t==null?void 0:t.classNames)==null?void 0:x.content)},o.createElement("div",{"data-title":"",className:A(i==null?void 0:i.title,(l=t==null?void 0:t.classNames)==null?void 0:l.title)},typeof t.title=="function"?t.title():t.title),t.description?o.createElement("div",{"data-description":"",className:A(mt,Ve,i==null?void 0:i.description,(c=t==null?void 0:t.classNames)==null?void 0:c.description)},typeof t.description=="function"?t.description():t.description):null),h.isValidElement(t.cancel)?t.cancel:t.cancel&&yt(t.cancel)?o.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||Mt,onClick:n=>{var d,p;yt(t.cancel)&&Z&&((p=(d=t.cancel).onClick)==null||p.call(d,n),O())},className:A(i==null?void 0:i.cancelButton,(E=t==null?void 0:t.classNames)==null?void 0:E.cancelButton)},t.cancel.label):null,h.isValidElement(t.action)?t.action:t.action&&yt(t.action)?o.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||ut,onClick:n=>{var d,p;yt(t.action)&&((p=(d=t.action).onClick)==null||p.call(d,n),!n.defaultPrevented&&O())},className:A(i==null?void 0:i.actionButton,(it=t==null?void 0:t.classNames)==null?void 0:it.actionButton)},t.action.label):null))};function Jt(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ca(e,a){let s={};return[e,a].forEach((r,m)=>{let b=m===1,k=b?"--mobile-offset":"--offset",x=b?ba:wa;function l(c){["top","right","bottom","left"].forEach(E=>{s[`${k}-${E}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?s[`${k}-${c}`]=x:s[`${k}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(x)}),s}var Ba=h.forwardRef(function(e,a){let{invert:s,position:r="bottom-right",hotkey:m=["altKey","KeyT"],expand:b,closeButton:k,className:x,offset:l,mobileOffset:c,theme:E="light",richColors:it,duration:Nt,style:t,visibleToasts:jt=va,toastOptions:v,dir:L=Jt(),gap:lt=Ta,loadingIcon:W,icons:D,containerAriaLabel:Pt="Notifications",pauseWhenPageIsHidden:et}=e,[j,at]=o.useState([]),dt=o.useMemo(()=>Array.from(new Set([r].concat(j.filter(u=>u.position).map(u=>u.position)))),[j,r]),[ct,Mt]=o.useState([]),[ut,_]=o.useState(!1),[mt,U]=o.useState(!1),[ft,$]=o.useState(E!=="system"?E:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=o.useRef(null),pt=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),i=o.useRef(null),B=o.useRef(!1),Rt=o.useCallback(u=>{at(f=>{var g;return(g=f.find(S=>S.id===u.id))!=null&&g.delete||C.dismiss(u.id),f.filter(({id:S})=>S!==u.id)})},[]);return o.useEffect(()=>C.subscribe(u=>{if(u.dismiss){at(f=>f.map(g=>g.id===u.id?{...g,delete:!0}:g));return}setTimeout(()=>{Qe.flushSync(()=>{at(f=>{let g=f.findIndex(S=>S.id===u.id);return g!==-1?[...f.slice(0,g),{...f[g],...u},...f.slice(g+1)]:[u,...f]})})})}),[]),o.useEffect(()=>{if(E!=="system"){$(E);return}if(E==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let u=window.matchMedia("(prefers-color-scheme: dark)");try{u.addEventListener("change",({matches:f})=>{$(f?"dark":"light")})}catch{u.addListener(({matches:g})=>{try{$(g?"dark":"light")}catch(S){console.error(S)}})}},[E]),o.useEffect(()=>{j.length<=1&&_(!1)},[j]),o.useEffect(()=>{let u=f=>{var g,S;m.every(q=>f[q]||f.code===q)&&(_(!0),(g=z.current)==null||g.focus()),f.code==="Escape"&&(document.activeElement===z.current||(S=z.current)!=null&&S.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[m]),o.useEffect(()=>{if(z.current)return()=>{i.current&&(i.current.focus({preventScroll:!0}),i.current=null,B.current=!1)}},[z.current]),o.createElement("section",{ref:a,"aria-label":`${Pt} ${pt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},dt.map((u,f)=>{var g;let[S,q]=u.split("-");return j.length?o.createElement("ol",{key:u,dir:L==="auto"?Jt():L,tabIndex:-1,ref:z,className:x,"data-sonner-toaster":!0,"data-theme":ft,"data-y-position":S,"data-lifted":ut&&j.length>1&&!b,"data-x-position":q,style:{"--front-toast-height":`${((g=ct[0])==null?void 0:g.height)||0}px`,"--width":`${xa}px`,"--gap":`${lt}px`,...t,...Ca(l,c)},onBlur:y=>{B.current&&!y.currentTarget.contains(y.relatedTarget)&&(B.current=!1,i.current&&(i.current.focus({preventScroll:!0}),i.current=null))},onFocus:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||B.current||(B.current=!0,i.current=y.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{mt||_(!1)},onDragEnd:()=>_(!1),onPointerDown:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},j.filter(y=>!y.position&&f===0||y.position===u).map((y,At)=>{var ot,ht;return o.createElement(Sa,{key:y.id,icons:D,index:At,toast:y,defaultRichColors:it,duration:(ot=v==null?void 0:v.duration)!=null?ot:Nt,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:jt,closeButton:(ht=v==null?void 0:v.closeButton)!=null?ht:k,interacting:mt,position:u,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:Rt,toasts:j.filter(st=>st.position==y.position),heights:ct.filter(st=>st.position==y.position),setHeights:Mt,expandByDefault:b,gap:lt,loadingIcon:W,expanded:ut,pauseWhenPageIsHidden:et,swipeDirections:e.swipeDirections})})):null}))});const Na="toast__rrrPf",ja="title__-TzC1",Pa="critical__hLeFT",Ma="actionButton__AZgQr",Ra="closeButton__vFfaI",Q={toast:Na,title:ja,critical:Pa,actionButton:Ma,closeButton:Ra},Aa=({title:e,titleId:a,...s},r)=>h.createElement("svg",{"data-preply-ds-component":"SvgTokyoUIIcon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:r,"aria-labelledby":a,...s},e?h.createElement("title",{id:a},e):null,h.createElement("path",{fillRule:"evenodd",d:"M7.044 5.63 5.63 7.044l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95 4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95Z",clipRule:"evenodd"})),La=h.forwardRef(Aa),_a=({title:e,titleId:a,...s},r)=>h.createElement("svg",{"data-preply-ds-component":"SvgTokyoUIIcon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:r,"aria-labelledby":a,...s},e?h.createElement("title",{id:a},e):null,h.createElement("path",{fillRule:"evenodd",d:"M15.728 3H8.272L3 8.272v7.456L8.272 21h7.456L21 15.728V8.272L15.728 3ZM10.98 8.04l.144 5.532h1.788l.144-5.532H10.98Zm.264 8.268c.216.216.476.324.78.324.296 0 .552-.108.768-.324a1.09 1.09 0 0 0 0-1.548 1.031 1.031 0 0 0-.768-.336c-.304 0-.564.112-.78.336a1.09 1.09 0 0 0 0 1.548Z",clipRule:"evenodd"})),za=h.forwardRef(_a),I=({duration:e=5e3})=>w.jsx(Ba,{position:"top-right",duration:e,visibleToasts:3}),$t=I.bind(null,{duration:5e3}),Da=({onClick:e})=>{const{formatMessage:a}=Ge();return w.jsx("button",{onClick:e,className:Q.closeButton,"aria-label":a(Je.close),children:w.jsx(Ht,{svg:La})})};function T(e,a){const{variant:s="info",leadingSvgIcon:r,actionLabel:m,actionOnClick:b,actionHref:k,dataset:x}=a??{},l=k?"a":"button";return Ot.custom(c=>w.jsxs("div",{style:{display:"contents"},...ta(x,{preplyDsComponent:ea.Toast}),children:[s==="critical"?w.jsx(Ht,{svg:za}):r&&w.jsx(Ht,{svg:r}),w.jsx("span",{className:Q.title,children:e}),w.jsx(Da,{onClick:()=>Ot.dismiss(c)}),m&&w.jsx(l,{className:Q.actionButton,onClick:()=>{Ot.dismiss(c),b==null||b()},href:k,children:m})]}),{classNames:{toast:s==="critical"?`${Q.toast} ${Q.critical}`:Q.toast}})}try{T.displayName="showToast",T.__docgenInfo={description:"`showToast` creates and appends a toast notification instance to your\napplication's `ToastProvider`.",displayName:"showToast",props:{}}}catch{}try{I.displayName="InternalToastProvider",I.__docgenInfo={description:`An internal primitive used for testing.
3
3
  This should not be exported to consumers.`,displayName:"InternalToastProvider",props:{duration:{defaultValue:{value:"5000"},description:`Time in milliseconds that should elapse before automatically closing
4
4
  the toast.`,name:"duration",required:!1,type:{name:"enum",value:[{value:"number"}]}}}}}catch{}try{$t.displayName="ToastProvider",$t.__docgenInfo={description:"Toasts can be triggered via the `showToast` function, and are rendered\nonto a root `Toaster` component, which is typically placed somewhere high\nup in an application tree.",displayName:"ToastProvider",props:{}}}catch{}const io={title:"Components/Toast",component:$t,parameters:{docs:{story:{inline:!1,iframeHeight:200}},chromatic:{modes:{"narrow-l":{viewport:"narrow-l"},"medium-s":{viewport:"medium-s"}}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},argTypes:{message:{description:"The toast title.",type:"string",table:{category:"showToast()"}},variant:{description:"The toast severity variant. This affects the toast colors.",options:["info","critical"],table:{category:"showToast()",defaultValue:{summary:"info"}}},leadingSvgIcon:{description:"The toast icon.",table:{category:"showToast()",defaultValue:{summary:"undefined | critical.svg",detail:"If the toast variant is `critical`, the `critical` icon is used."}}},actionLabel:{description:"The optional toast action's label.",type:"string",table:{category:"showToast()"}},actionOnClick:{description:"The optional toast action's click handler.",type:"function",table:{category:"showToast()"}},actionHref:{description:"The optional toast action's `href`.\nWhen this is provided, an `<a>` tag is used for the action, otherwise, a `<button>` is used instead.\n",type:"string",table:{category:"showToast()"}}}},vt=()=>(h.useEffect(()=>{T("This is a toast")},[]),w.jsx(I,{duration:1/0})),G=()=>(h.useEffect(()=>{T("This is a toast",{dataset:{testid:"toast"}})},[]),w.jsx(I,{duration:500}));G.tags=["!autodocs"];G.play=async({step:e,canvas:a})=>{await e("wait for toast",()=>St(()=>{const s=a.queryByTestId("toast");return Ct(s).toBeInTheDocument()})),await e("check toast is dismissed automatically",()=>{const s=a.getByTestId("toast");return Ft(s)})};const J=()=>(h.useEffect(()=>{T("This is a toast",{dataset:{testid:"toast"}})},[]),w.jsx(I,{duration:1/0}));J.tags=["!autodocs"];J.play=async({step:e,canvas:a})=>{await e("wait for toast",()=>St(()=>{const s=a.queryByTestId("toast");return Ct(s).toBeInTheDocument()})),await e("check toast is dismissed on close button click",async()=>{const s=a.getByTestId("toast");return a.getByRole("button").click(),Ft(s)})};const wt=()=>(h.useEffect(()=>{T("This is a toast",{actionLabel:"Action",actionOnClick:Bt("actionOnClick")})},[]),w.jsx(I,{duration:1/0})),tt=()=>(h.useEffect(()=>{T("This is a toast",{dataset:{testid:"toast"},actionLabel:"Action",actionOnClick:Bt("actionOnClick")})},[]),w.jsx(I,{duration:1/0}));tt.tags=["!autodocs"];tt.play=async({canvas:e,step:a})=>{await a("wait for toast",()=>St(()=>{const s=e.queryByTestId("toast");return Ct(s).toBeInTheDocument()})),await a("check toast is dismissed on action button click",async()=>{const s=e.getByTestId("toast"),r=e.getByText("Action");return await _e.click(r),Ft(s)})};const bt=()=>(h.useEffect(()=>{T("This is a toast",{actionLabel:"Action",actionOnClick:Bt("actionOnClick"),actionHref:"#"})},[]),w.jsx(I,{duration:1/0})),xt=()=>(h.useEffect(()=>{T("This is a toast",{leadingSvgIcon:Xe})},[]),w.jsx(I,{duration:1/0})),Tt=()=>(h.useEffect(()=>{T("This is a critical toast",{variant:"critical"})},[]),w.jsx(I,{duration:1/0})),Et=()=>(h.useEffect(()=>{T("This is a critical toast",{variant:"critical",actionLabel:"Action",actionOnClick:Bt("actionOnClick")})},[]),w.jsx(I,{duration:1/0})),kt=()=>(h.useEffect(()=>{T("This is toast 1"),T("This is toast 2"),T("This is toast 3")},[]),w.jsx(I,{duration:1/0})),nt=()=>(h.useEffect(()=>{T("This is toast 1"),T("This is toast 2"),T("This is toast 3",{dataset:{testid:"toast3"}})},[]),w.jsx(I,{duration:1/0}));nt.play=async({canvas:e,canvasElement:a,step:s})=>{await s("wait for toast 3",()=>St(()=>{const r=e.queryByTestId("toast3");Ct(r).toBeInTheDocument()})),await s("Use global toast area shortcut",async()=>{a.focus(),await _e.keyboard("{Alt>}T")})};const It=()=>(h.useEffect(()=>{T("What happens if the message is really really really really reeaaaaaaaallyyyyyyy looooooooooong")},[]),w.jsx(I,{duration:1/0}));var te,ee,ae;vt.parameters={...vt.parameters,docs:{...(te=vt.parameters)==null?void 0:te.docs,source:{originalSource:`() => {
@@ -1,4 +1,4 @@
1
- import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{T as o}from"./Tooltip-MFjAgFhf.js";import{r as M}from"./index-Cb9e4tly.js";import{L as $}from"./LayoutFlex-b2QXeA0z.js";import{I as e}from"./IconButton-Dlgns1pq.js";import{F as p}from"./TokyoUIFav-DOVerCtW.js";import{F as N}from"./TokyoUIClose-thK8sk63.js";import{F as P}from"./TokyoUINotebook-kt8pWj_a.js";import{F as _}from"./TokyoUIInfo-DbkQBubr.js";import"./index-ChsGqxH_.js";import"./index-BZcGM-EF.js";import"./PortalElementProvider-BRcRijdp.js";import"./index-BPrLDK9Y.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-C7hTFOIV.js";import"./index-DOA2-rRC.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Y1T_IIlY.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./layout-relative.module-ed9bC4H4.js";import"./classNames-BUL1Zq7e.js";import"./defaults-B1rzzf6M.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-BPK7KgDE.js";import"./Spinner-B2C3RkCF.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";const vt={title:"Components/Tooltip",component:o,parameters:{layout:"centered",a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},decorators:[l=>t.jsx("div",{style:{margin:"100px 0"},children:l()})]},i={render:()=>t.jsx(o,{content:"This is a tooltip",dsInternalSimulation:"open",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Favorite"})}),name:"Tooltip"},a={render:()=>t.jsx(o,{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",dsInternalSimulation:"open",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Favorite"})})},r={parameters:{chromatic:{disableSnapshot:!0}},render:()=>t.jsxs($,{gap:"4",children:[t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Icon button"})}),t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(N,{}),assistiveText:"Icon button"})}),t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(P,{}),assistiveText:"Icon button"})})]})},s={parameters:{chromatic:{disableSnapshot:!0}},render:()=>t.jsx(o,{content:"This is a tooltip",trigger:"hover-and-touch",children:t.jsx(e,{variant:"ghost",svg:t.jsx(_,{}),assistiveText:"Icon button"})})},n={parameters:{chromatic:{disableSnapshot:!0}},render:()=>{const l=M.forwardRef((D,E)=>t.jsx("button",{...D,ref:E}));return t.jsx(o,{content:"This is a tooltip",children:t.jsx(l,{children:"Custom child"})})}},c={parameters:{chromatic:{disableSnapshot:!0}},args:{content:"Tooltip content",children:t.jsx(e,{svg:t.jsx(p,{}),assistiveText:"Icon button"}),trigger:"hover",side:"top"},argTypes:{content:{control:"text"},children:{control:!1},dataset:{control:"object"}}};var d,m,u;i.parameters={...i.parameters,docs:{...(d=i.parameters)==null?void 0:d.docs,source:{originalSource:`{
1
+ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{T as o}from"./Tooltip-MFjAgFhf.js";import{r as M}from"./index-Cb9e4tly.js";import{L as $}from"./LayoutFlex-dzXpor-q.js";import{I as e}from"./IconButton-nN3VsXQJ.js";import{F as p}from"./TokyoUIFav-DOVerCtW.js";import{F as N}from"./TokyoUIClose-thK8sk63.js";import{F as P}from"./TokyoUINotebook-kt8pWj_a.js";import{F as _}from"./TokyoUIInfo-DbkQBubr.js";import"./index-ChsGqxH_.js";import"./index-BZcGM-EF.js";import"./PortalElementProvider-BRcRijdp.js";import"./index-BPrLDK9Y.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-C7hTFOIV.js";import"./index-DOA2-rRC.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Y1T_IIlY.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./layout-relative.module-ed9bC4H4.js";import"./classNames-BUL1Zq7e.js";import"./defaults-B1rzzf6M.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-D0ZIVzRq.js";import"./Spinner-B2C3RkCF.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";const vt={title:"Components/Tooltip",component:o,parameters:{layout:"centered",a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},decorators:[l=>t.jsx("div",{style:{margin:"100px 0"},children:l()})]},i={render:()=>t.jsx(o,{content:"This is a tooltip",dsInternalSimulation:"open",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Favorite"})}),name:"Tooltip"},a={render:()=>t.jsx(o,{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",dsInternalSimulation:"open",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Favorite"})})},r={parameters:{chromatic:{disableSnapshot:!0}},render:()=>t.jsxs($,{gap:"4",children:[t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(p,{}),assistiveText:"Icon button"})}),t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(N,{}),assistiveText:"Icon button"})}),t.jsx(o,{content:"This is a tooltip",children:t.jsx(e,{variant:"ghost",svg:t.jsx(P,{}),assistiveText:"Icon button"})})]})},s={parameters:{chromatic:{disableSnapshot:!0}},render:()=>t.jsx(o,{content:"This is a tooltip",trigger:"hover-and-touch",children:t.jsx(e,{variant:"ghost",svg:t.jsx(_,{}),assistiveText:"Icon button"})})},n={parameters:{chromatic:{disableSnapshot:!0}},render:()=>{const l=M.forwardRef((D,E)=>t.jsx("button",{...D,ref:E}));return t.jsx(o,{content:"This is a tooltip",children:t.jsx(l,{children:"Custom child"})})}},c={parameters:{chromatic:{disableSnapshot:!0}},args:{content:"Tooltip content",children:t.jsx(e,{svg:t.jsx(p,{}),assistiveText:"Icon button"}),trigger:"hover",side:"top"},argTypes:{content:{control:"text"},children:{control:!1},dataset:{control:"object"}}};var d,m,u;i.parameters={...i.parameters,docs:{...(d=i.parameters)==null?void 0:d.docs,source:{originalSource:`{
2
2
  render: () => <Tooltip content="This is a tooltip" dsInternalSimulation="open">
3
3
  <IconButton variant="ghost" svg={<TokyoUIFav />} assistiveText="Favorite" />
4
4
  </Tooltip>,
@@ -1,4 +1,4 @@
1
- import{j as l}from"./jsx-runtime-BTJTZTIL.js";import{T as b}from"./Tooltip-MFjAgFhf.js";import{I as B}from"./IconButton-Dlgns1pq.js";import{F as T}from"./TokyoUIFav-DOVerCtW.js";import{a as g,u as p,w as i,e as s,b as u}from"./index-BVDq5o4N.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-BZcGM-EF.js";import"./PortalElementProvider-BRcRijdp.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-DOA2-rRC.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Y1T_IIlY.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-BPK7KgDE.js";import"./Spinner-B2C3RkCF.js";import"./classNames-BUL1Zq7e.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-SFH7Mw4x.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";const P={title:"Components/Tooltip/Tests",component:b,parameters:{layout:"centered",controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"],decorators:[n=>l.jsx("div",{style:{margin:"100px 0"},children:n()})],args:{content:"Tooltip content",dataset:{testid:"tooltip"},children:l.jsx(B,{svg:l.jsx(T,{}),assistiveText:"Favorite"})}},r={play:async({canvasElement:n,step:t})=>{const e=g(n),a=e.getByRole("button");await t("hover trigger element",async()=>{await p.hover(a)}),await t("tooltip should be shown",async()=>{await i(()=>{const o=e.getByTestId("tooltip");return s(o).toBeVisible()})}),await t("unhover trigger element",async()=>{await p.unhover(a)}),await t("tooltip should be hidden",async()=>{await i(()=>{const o=e.queryByTestId("tooltip");return s(o).toBeNull()})})}},c={args:{trigger:"hover-and-touch"},play:async({canvasElement:n,step:t})=>{const e=g(n),a=e.getByRole("button");await t("press trigger element",async()=>{await u.touchStart(a)}),await t("tooltip should be shown",async()=>{await i(()=>{const o=e.getByTestId("tooltip");s(o).toBeInTheDocument()})}),await t("release trigger element",async()=>{await u.touchEnd(a)}),await t("tooltip should be still visible",async()=>{await i(()=>{const o=e.getByTestId("tooltip");s(o).toBeInTheDocument()})}),await t("click outside of tooltip",async()=>{await p.click(document.body)}),await t("tooltip should be hidden",async()=>{await i(()=>{const o=e.queryByTestId("tooltip");s(o).toBeNull()})})}};var m,d,w;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`{
1
+ import{j as l}from"./jsx-runtime-BTJTZTIL.js";import{T as b}from"./Tooltip-MFjAgFhf.js";import{I as B}from"./IconButton-nN3VsXQJ.js";import{F as T}from"./TokyoUIFav-DOVerCtW.js";import{a as g,u as p,w as i,e as s,b as u}from"./index-BVDq5o4N.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-BZcGM-EF.js";import"./PortalElementProvider-BRcRijdp.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-DOA2-rRC.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Y1T_IIlY.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-D0ZIVzRq.js";import"./Spinner-B2C3RkCF.js";import"./classNames-BUL1Zq7e.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-SFH7Mw4x.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";const P={title:"Components/Tooltip/Tests",component:b,parameters:{layout:"centered",controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"],decorators:[n=>l.jsx("div",{style:{margin:"100px 0"},children:n()})],args:{content:"Tooltip content",dataset:{testid:"tooltip"},children:l.jsx(B,{svg:l.jsx(T,{}),assistiveText:"Favorite"})}},r={play:async({canvasElement:n,step:t})=>{const e=g(n),a=e.getByRole("button");await t("hover trigger element",async()=>{await p.hover(a)}),await t("tooltip should be shown",async()=>{await i(()=>{const o=e.getByTestId("tooltip");return s(o).toBeVisible()})}),await t("unhover trigger element",async()=>{await p.unhover(a)}),await t("tooltip should be hidden",async()=>{await i(()=>{const o=e.queryByTestId("tooltip");return s(o).toBeNull()})})}},c={args:{trigger:"hover-and-touch"},play:async({canvasElement:n,step:t})=>{const e=g(n),a=e.getByRole("button");await t("press trigger element",async()=>{await u.touchStart(a)}),await t("tooltip should be shown",async()=>{await i(()=>{const o=e.getByTestId("tooltip");s(o).toBeInTheDocument()})}),await t("release trigger element",async()=>{await u.touchEnd(a)}),await t("tooltip should be still visible",async()=>{await i(()=>{const o=e.getByTestId("tooltip");s(o).toBeInTheDocument()})}),await t("click outside of tooltip",async()=>{await p.click(document.body)}),await t("tooltip should be hidden",async()=>{await i(()=>{const o=e.queryByTestId("tooltip");s(o).toBeNull()})})}};var m,d,w;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`{
2
2
  play: async ({
3
3
  canvasElement,
4
4
  step
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as s}from"./index-BN6VMYqa.js";import{M as t}from"./index-CObJ2I6U.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-BL4lww1d.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...s(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/SCSS/Breakpoints"}),`
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as s}from"./index-BN6VMYqa.js";import{M as t}from"./index-CfKvYfkH.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-DyQ151Cy.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...s(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/SCSS/Breakpoints"}),`
2
2
  `,e.jsx(n.h1,{id:"scss-breakpoints",children:"SCSS: Breakpoints"}),`
3
3
  `,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note:"})," Storybook renders this page inside of an ",e.jsx(n.code,{children:"iframe"}),"! The width taken into account by the media query is that of the ",e.jsx(n.code,{children:"iframe"})," and not the full viewport window. Hide Storybook's navigation sidebar (or pop out this page) to preview the media query against the full browser width."]}),`
4
4
  `,e.jsx(n.hr,{}),`
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-BN6VMYqa.js";import{M as o}from"./index-CObJ2I6U.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-BL4lww1d.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function r(i){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Guides/Custom Components/Less.js/Breakpoints"}),`
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-BN6VMYqa.js";import{M as o}from"./index-CfKvYfkH.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-DyQ151Cy.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function r(i){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Guides/Custom Components/Less.js/Breakpoints"}),`
2
2
  `,e.jsx(n.h1,{id:"lessjs-breakpoints",children:"Less.js: Breakpoints"}),`
3
3
  `,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note:"})," Storybook renders this page inside of an ",e.jsx(n.code,{children:"iframe"}),"! The width taken into account by the media query is that of the ",e.jsx(n.code,{children:"iframe"})," and not the full viewport window. Hide Storybook's navigation sidebar (or pop out this page) to preview the media query against the full browser width."]}),`
4
4
  `,e.jsx(n.hr,{}),`
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as i}from"./index-BN6VMYqa.js";import{M as r}from"./index-CObJ2I6U.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-BL4lww1d.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function t(o){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Guides/Custom Components/StyledComponents/Breakpoints"}),`
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as i}from"./index-BN6VMYqa.js";import{M as r}from"./index-CfKvYfkH.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-DyQ151Cy.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function t(o){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Guides/Custom Components/StyledComponents/Breakpoints"}),`
2
2
  `,e.jsx(n.h1,{id:"styledcomponents-breakpoints",children:"StyledComponents: Breakpoints"}),`
3
3
  `,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note:"})," Storybook renders this page inside of an ",e.jsx(n.code,{children:"iframe"}),"! The width taken into account by the media query is that of the ",e.jsx(n.code,{children:"iframe"})," and not the full viewport window. Hide Storybook's navigation sidebar (or pop out this page) to preview the media query against the full browser width."]}),`
4
4
  `,e.jsx(n.hr,{}),`