@preply/ds-docs 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/dist/assets/00.LayoutFlex.stories-CeV_wdIC.js +85 -0
  2. package/dist/assets/{00.applications-CtD17Uvc.js → 00.applications-CAvTZLs_.js} +2 -2
  3. package/dist/assets/{00.favicons.guide-rDY-MoXZ.js → 00.favicons.guide-BhlxRh9a.js} +2 -2
  4. package/dist/assets/{00.token-explorer-CedppzBQ.js → 00.token-explorer-20FX7CcY.js} +2 -2
  5. package/dist/assets/00.using-responsive-props-BnlhCBRt.js +18 -0
  6. package/dist/assets/01.semantic-tokens-DcnkWzh7.js +2 -0
  7. package/dist/assets/{01.using-shorthand-props-eZLJFDHj.js → 01.using-shorthand-props-Of1iGh33.js} +2 -2
  8. package/dist/assets/10.Combinations.stories-uNix06Cx.js +144 -0
  9. package/dist/assets/{10.fonts.guide-DW9ufzTF.js → 10.fonts.guide-DrwXu-qM.js} +2 -2
  10. package/dist/assets/{10.ssr-DwlffmrT.js → 10.ssr-BLRvX7tP.js} +2 -2
  11. package/dist/assets/{11.languageFont.explorer.stories-Crh2l5Jm.js → 11.languageFont.explorer.stories-8bRkypgA.js} +3 -3
  12. package/dist/assets/{11.ssr.app-router-BZ07Enlf.js → 11.ssr.app-router-Bdj_5bEM.js} +2 -2
  13. package/dist/assets/{20.libraries-lbSLR9_7.js → 20.libraries-BAk4bn7T.js} +2 -2
  14. package/dist/assets/30.icons.explorer-Cw48haes.js +73 -0
  15. package/dist/assets/{30.storybook-C4NNn5Fv.js → 30.storybook-Cl1dKshZ.js} +2 -2
  16. package/dist/assets/40.illustrations.explorer-QST9S1uM.js +21 -0
  17. package/dist/assets/{90.advanced-bdiRxPCx.js → 90.advanced-D0gL86iZ.js} +2 -2
  18. package/dist/assets/{Accordion-BMkC4Xny.js → Accordion-DQdO67t-.js} +1 -1
  19. package/dist/assets/{Accordion.stories-SU6sgvYh.js → Accordion.stories-CIkFS1aB.js} +2 -2
  20. package/dist/assets/{Accordion.tests.stories-CxVZnGoY.js → Accordion.tests.stories-B-CsSb4t.js} +3 -3
  21. package/dist/assets/{AlertDialog.stories-Z5ooiuoO.js → AlertDialog.stories-Cl8Xpqxw.js} +3 -3
  22. package/dist/assets/{Avatar-B2H0W8KL.js → Avatar-BPQkrrdS.js} +1 -1
  23. package/dist/assets/{Avatar-BoLH36O5.js → Avatar-DU9LOGxE.js} +1 -1
  24. package/dist/assets/Avatar.stories-CqMa-0IY.js +42 -0
  25. package/dist/assets/AvatarWithStatus.stories-Bhftrj9g.js +41 -0
  26. package/dist/assets/{Badge-j_a0acGK.css → Badge-DXnHyVME.css} +1 -1
  27. package/dist/assets/{Badge.stories-B2OoKd78.js → Badge.stories-ub7MEo4B.js} +3 -3
  28. package/dist/assets/Box.stories-B-s13PQh.js +44 -0
  29. package/dist/assets/BubbleCounter.stories-CpaMP6xY.js +242 -0
  30. package/dist/assets/{Button-BSyqsKC5.js → Button-C5gzVt4K.js} +1 -1
  31. package/dist/assets/{Button-Bo0EuTg4.js → Button-vy3cIlv9.js} +1 -1
  32. package/dist/assets/{Button.stories-Dc9V2OdS.js → Button.stories-Df_g55it.js} +2 -2
  33. package/dist/assets/{ButtonBase-Bdtn25V2.js → ButtonBase-D5O3MkG2.js} +1 -1
  34. package/dist/assets/{Checkbox-Bq_sNuXJ.js → Checkbox-Bknyi3M6.js} +2 -2
  35. package/dist/assets/{Checkbox.stories-BI-3q1SR.js → Checkbox.stories-DF4d48B_.js} +2 -2
  36. package/dist/assets/Checkbox.tests.stories-CPrt0IT-.js +64 -0
  37. package/dist/assets/Chips-C-y9rHQ4.css +1 -0
  38. package/dist/assets/Chips.stories-DkNJ_zVw.js +146 -0
  39. package/dist/assets/Color-YHDXOIA2-pga7xyrn.js +1 -0
  40. package/dist/assets/{Combination-CCYtWL8C.js → Combination-Cz1uIyPJ.js} +1 -1
  41. package/dist/assets/{CountryFlag-ClC7kEHn.js → CountryFlag-DNvfZC7z.js} +7 -7
  42. package/dist/assets/CountryFlag.stories-xg8q2tp6.js +331 -0
  43. package/dist/assets/CountryFlag.test.stories-CkUCxnsL.js +27 -0
  44. package/dist/assets/{Dialog.stories-ColOPVoz.js → Dialog.stories-C9-6y9u3.js} +3 -3
  45. package/dist/assets/DismissibleChips-D0spWwKB.js +1 -0
  46. package/dist/assets/DismissibleChips-Jfhj9R2Y.css +1 -0
  47. package/dist/assets/DismissibleChips.stories-DAd1oRPH.js +635 -0
  48. package/dist/assets/Divider-DECo0bYW.css +1 -0
  49. package/dist/assets/Divider.stories-Dt8b4I0I.js +9 -0
  50. package/dist/assets/DocsRenderer-CFRXHY34-bxqIrlIk.js +2 -0
  51. package/dist/assets/{FieldButton-Bsa9_rJB.js → FieldButton-DkkntNzT.js} +1 -1
  52. package/dist/assets/FieldButton.stories-CXR_cH-r.js +1 -0
  53. package/dist/assets/{FormControl-CeIJk4_Z.js → FormControl-BBd1k1n3.js} +1 -1
  54. package/dist/assets/{FormControl-BxxTFPCS.css → FormControl-BBqp99uJ.css} +1 -1
  55. package/dist/assets/{FormControl.stories-DekxQG9a.js → FormControl.stories-DukIAZCw.js} +2 -2
  56. package/dist/assets/{Heading-ese4_5Hg.js → Heading-BLxyLk9f.js} +2 -2
  57. package/dist/assets/Heading.stories-DcyjKmJn.js +82 -0
  58. package/dist/assets/{Icon-ZIxauYsE.js → Icon-CsnSNslb.js} +2 -2
  59. package/dist/assets/{Icon-Dlm-jGvW.js → Icon-CytpCOfq.js} +1 -1
  60. package/dist/assets/Icon-RSC-jWx530Uy.js +6 -0
  61. package/dist/assets/{Icon.stories-Cv6aq9BI.js → Icon.stories-CdJp2Kjy.js} +2 -2
  62. package/dist/assets/IconButton-DnBk_U_S.css +1 -0
  63. package/dist/assets/IconButton-NYwQQfnV.js +8 -0
  64. package/dist/assets/{Input-C1hZX5_o.js → Input-MEZGWQfc.js} +5 -5
  65. package/dist/assets/{InputContainer-Bk0tgFnW.js → InputContainer-BZsD6GIE.js} +1 -1
  66. package/dist/assets/IntegrationWithReactHookForm.stories-DbXGbM6L.js +439 -0
  67. package/dist/assets/LayoutFlex-C3k4b85b.js +1 -0
  68. package/dist/assets/{LayoutFlex-Bhu4q65J.js → LayoutFlex-C6z0wWVE.js} +1 -1
  69. package/dist/assets/{LayoutFlexItem-C2t_4vHD.js → LayoutFlexItem-Cwg58STc.js} +1 -1
  70. package/dist/assets/{LayoutGrid-DwWkjrQU.js → LayoutGrid-WPajd7ZP.js} +1 -1
  71. package/dist/assets/LayoutGrid.stories-B-DYu7we.js +88 -0
  72. package/dist/assets/{LayoutGridItem-CZ6SKl8g.js → LayoutGridItem-CPteN7Xi.js} +1 -1
  73. package/dist/assets/{LayoutGridItem-CmZxAA0w.js → LayoutGridItem-sDswLjZs.js} +1 -1
  74. package/dist/assets/{LibraryExplore-C8GqDRwc.js → LibraryExplore-oBYfEgnm.js} +1 -1
  75. package/dist/assets/Link-ppzJSCTf.js +7 -0
  76. package/dist/assets/Link.stories-ClHFTcTp.js +265 -0
  77. package/dist/assets/Loader.stories-ltpe_Net.js +37 -0
  78. package/dist/assets/Messages-VCFIwUal.js +1 -0
  79. package/dist/assets/MultiSelectChips-CwiPSabU.js +2 -0
  80. package/dist/assets/MultiSelectChips.stories-DmtbSk6N.js +618 -0
  81. package/dist/assets/{NumberField-D6cbX2hK.js → NumberField-RsSQ3jKy.js} +5 -5
  82. package/dist/assets/{NumberField.stories-BHt2ErAX.js → NumberField.stories-D7ZfStPF.js} +2 -2
  83. package/dist/assets/{ObserveIntersection-DsqqXq5n.js → ObserveIntersection-B-K9BpyT.js} +2 -2
  84. package/dist/assets/ObserveIntersection.stories-CsECVFcG.js +27 -0
  85. package/dist/assets/{OnboardingTooltip-DVNAQjDc.js → OnboardingTooltip-S86JAVp1.js} +1 -1
  86. package/dist/assets/OnboardingTooltip.stories-yysftpQx.js +66 -0
  87. package/dist/assets/OnboardingTooltip.tests.stories-BGYD6ZgF.js +79 -0
  88. package/dist/assets/{OnboardingTour-DdV7TN6M.js → OnboardingTour-DdoL-ALr.js} +1 -1
  89. package/dist/assets/{OnboardingTour.stories-D0ScuFD6.js → OnboardingTour.stories-CFHFqnUP.js} +3 -3
  90. package/dist/assets/{OnboardingTour.tests.stories-DAxdPYEp.js → OnboardingTour.tests.stories-Zth6eLU9.js} +3 -3
  91. package/dist/assets/{PasswordField-C_KRyf9k.js → PasswordField-Dxf_bax6.js} +5 -5
  92. package/dist/assets/{PasswordField.stories-3X4JtcLm.js → PasswordField.stories-cbjkS8Y4.js} +5 -5
  93. package/dist/assets/{PortalElementProvider-D4ltrA8j.js → PortalElementProvider-CgL8vj5o.js} +1 -1
  94. package/dist/assets/PreplyLogo.stories-uls4oHdg.js +97 -0
  95. package/dist/assets/{ProgressBar.stories-Dpro8fzG.js → ProgressBar.stories-CDcfCVq4.js} +3 -3
  96. package/dist/assets/{ProgressSteps-BBrWCYks.js → ProgressSteps--PLRO2gB.js} +1 -1
  97. package/dist/assets/ProgressSteps.stories-Ds4cZ7wu.js +31 -0
  98. package/dist/assets/{RangeSlider-dSZs_gtw.js → RangeSlider-BYDrLADZ.js} +1 -1
  99. package/dist/assets/{RangeSlider.stories-DVb8mcs1.js → RangeSlider.stories-Cyr-Pro6.js} +2 -2
  100. package/dist/assets/RootProvider-jpy520VQ.js +1 -0
  101. package/dist/assets/{SelectField-CuzFFPz0.js → SelectField-JmD-rzDd.js} +7 -7
  102. package/dist/assets/{SelectField.stories-wb_cAtCV.js → SelectField.stories-BaUnnRxC.js} +2 -2
  103. package/dist/assets/ShowOnIntersection.stories-1-PEYzrA.js +17 -0
  104. package/dist/assets/SingleSelectChips-DLCTUr2z.js +2 -0
  105. package/dist/assets/SingleSelectChips.stories-Dqmrydst.js +637 -0
  106. package/dist/assets/{Slider-6E9fmd7P.js → Slider-CIF6srIP.js} +1 -1
  107. package/dist/assets/{Slider.stories-B5LCqqgS.js → Slider.stories-DPwe4ZY9.js} +2 -2
  108. package/dist/assets/{Spinner-BCTJunNM.js → Spinner-T-vTyHiv.js} +1 -1
  109. package/dist/assets/{Steps-CCm9vCgl.js → Steps-ffbOMhEJ.js} +1 -1
  110. package/dist/assets/{Steps.stories-BLFM3WRM.js → Steps.stories-CPOi2Oi8.js} +2 -2
  111. package/dist/assets/{StorybookGlobalStyle-B1zhYl96.js → StorybookGlobalStyle-CQSpwvw3.js} +1 -1
  112. package/dist/assets/Switch-Dw6ODsdd.js +12 -0
  113. package/dist/assets/Switch-DxL-NADD.css +1 -0
  114. package/dist/assets/Switch.stories-C1Mk3jSk.js +138 -0
  115. package/dist/assets/{Text-BmdJVr9v.js → Text-CykvSLVe.js} +1 -1
  116. package/dist/assets/Text.stories-BM7oD1Ya.js +69 -0
  117. package/dist/assets/{TextField-D2GlsmWF.css → TextField-C5AoK3Cj.css} +1 -1
  118. package/dist/assets/{TextField-Co0wSa5c.js → TextField-DakE_vDk.js} +1 -1
  119. package/dist/assets/{TextField-CMgzC3bX.js → TextField-lnCw6vFm.js} +5 -5
  120. package/dist/assets/{TextField.stories-CAcPkm_s.js → TextField.stories-C8nNbyIm.js} +5 -5
  121. package/dist/assets/{TextHighlighted-B6rrwk3x.js → TextHighlighted-B2n23sPW.js} +1 -1
  122. package/dist/assets/TextHighlighted.stories-Dunl9OsM.js +32 -0
  123. package/dist/assets/TextInline.stories-Cz98O8bG.js +37 -0
  124. package/dist/assets/{TextareaField-CCM1C6lK.js → TextareaField-BDRAFgn6.js} +9 -9
  125. package/dist/assets/{TextareaField.stories-DKNFN3f4.js → TextareaField.stories-CC3YstiD.js} +6 -6
  126. package/dist/assets/{Toast.stories-BzEpckjh.js → Toast.stories-CUVZTvJT.js} +3 -3
  127. package/dist/assets/{TokyoUIAttach-BvBvQVx_.js → TokyoUIAttach-BWl7Jkq1.js} +1 -1
  128. package/dist/assets/{TokyoUIClose-DFIfVIfy.js → TokyoUIClose-thK8sk63.js} +1 -1
  129. package/dist/assets/TokyoUIEmojiFrowning-DTIcabpJ.js +1 -0
  130. package/dist/assets/{TokyoUIExpand-DThzqohx.js → TokyoUIExpand-oMdXmNcg.js} +1 -1
  131. package/dist/assets/{TokyoUIEye-BsOt8ZdC.js → TokyoUIEye-CteyS9_g.js} +1 -1
  132. package/dist/assets/{TokyoUIFav-DGbkVriC.js → TokyoUIFav-DOVerCtW.js} +1 -1
  133. package/dist/assets/{TokyoUIInfo-nHX2jpp7.js → TokyoUIInfo-DbkQBubr.js} +1 -1
  134. package/dist/assets/{TokyoUILanguage-BNq9ng3F.js → TokyoUILanguage-CLpo5Vdq.js} +1 -1
  135. package/dist/assets/{TokyoUILock-C_glX9Ec.js → TokyoUILock-CENLMUf4.js} +1 -1
  136. package/dist/assets/{TokyoUIMinus-B9ja89W6.js → TokyoUIMinus-RacYe9uc.js} +1 -1
  137. package/dist/assets/{TokyoUINotebook-DNjno-oI.js → TokyoUINotebook-kt8pWj_a.js} +1 -1
  138. package/dist/assets/{TokyoUINotesWithPad-Bqcca_-M.js → TokyoUINotesWithPad-B-o4vu0Y.js} +1 -1
  139. package/dist/assets/{TokyoUIPhone-BHLDT6dz.js → TokyoUIPhone-CvuBM6jb.js} +1 -1
  140. package/dist/assets/{TokyoUITag-CulX0-gf.js → TokyoUITag-CS4uarg6.js} +1 -1
  141. package/dist/assets/{TokyoUIUpload-Bi3CuQzX.js → TokyoUIUpload-Bf0gWv4M.js} +1 -1
  142. package/dist/assets/{TokyoUIUser-DG6LLnJu.js → TokyoUIUser-Cvenl_VS.js} +1 -1
  143. package/dist/assets/{Tooltip-IxKOQjjo.js → Tooltip-UjXQy5k6.js} +1 -1
  144. package/dist/assets/{Tooltip.stories-DHYG0ggY.js → Tooltip.stories-DUECVMBB.js} +2 -2
  145. package/dist/assets/Tooltip.tests.stories-DV5HEaze.js +65 -0
  146. package/dist/assets/{align-self-BM6l9H5Z.js → align-self-r3vx00J0.js} +1 -1
  147. package/dist/assets/{breakpoints-DxEeOfvq.js → breakpoints-5Upxf6Y1.js} +2 -2
  148. package/dist/assets/{breakpoints-3Mi8ztBx.js → breakpoints-839jWvyb.js} +2 -2
  149. package/dist/assets/{breakpoints-BPZAI3l-.js → breakpoints-CUqKVgVc.js} +2 -2
  150. package/dist/assets/{changelog-BvX8uMXW.js → changelog-D_f5Tbwt.js} +234 -216
  151. package/dist/assets/{chunk-XP5HYGXS-D5tuasO7.js → chunk-XP5HYGXS-BpfKkqn7.js} +1 -1
  152. package/dist/assets/{client-DXF5tT0h.js → client-C1fTPCwG.js} +1 -1
  153. package/dist/assets/componentNames-NXEPEzbR.js +1 -0
  154. package/dist/assets/createRequiredContext-BW3-EdwI.js +241 -0
  155. package/dist/assets/createRequiredContext-Bv1cwElm.css +1 -0
  156. package/dist/assets/{defaults-B1rzzf6M.js → defaults-Clr6nbGc.js} +1 -1
  157. package/dist/assets/entry-preview-BvEBPG6v.js +2 -0
  158. package/dist/assets/{entry-preview-docs-FEPuDDnY.js → entry-preview-docs-Cyz3fU9E.js} +2 -2
  159. package/dist/assets/getCountryFlagUrl-CP-PpZV_.js +1 -0
  160. package/dist/assets/{getTokenVar-CXvtPVqa.js → getTokenVar-CV6_zRnp.js} +2 -2
  161. package/dist/assets/{hover-sR2377QI.js → hover-Bs7YcuQH.js} +2 -2
  162. package/dist/assets/hover-DniV5Ub7.js +13 -0
  163. package/dist/assets/hover-uZhMPRXi.js +14 -0
  164. package/dist/assets/{iframe-BE13K_u-.js → iframe-DI6VGJCr.js} +2 -2
  165. package/dist/assets/{index-BYp7dUfi.js → index-7S8Dj0J-.js} +1 -1
  166. package/dist/assets/{index-DUJ9kiQB.js → index-BArSnScv.js} +2 -2
  167. package/dist/assets/index-BN6VMYqa.js +1 -0
  168. package/dist/assets/{index-jEDObK_5.js → index-BPrLDK9Y.js} +1 -1
  169. package/dist/assets/{index-v0utLE_k.js → index-BrBqb5Q4.js} +1 -1
  170. package/dist/assets/{index--DZ0VX4g.js → index-Bt5ip-xO.js} +1 -1
  171. package/dist/assets/{index-DRKYGVyc.js → index-C6wF8VM1.js} +1 -1
  172. package/dist/assets/{index-C66nt8TK.js → index-C7hTFOIV.js} +1 -1
  173. package/dist/assets/{index-wFyje0se.js → index-C9SxdfPC.js} +1 -1
  174. package/dist/assets/index-Cb9e4tly.js +1 -0
  175. package/dist/assets/index-ChsGqxH_.js +9 -0
  176. package/dist/assets/{index-DDyIDR-R.js → index-Ctq3gFTp.js} +1 -1
  177. package/dist/assets/{index-CjMmneJr.js → index-CxzwkAAS.js} +3 -3
  178. package/dist/assets/{index-jPlWeKki.js → index-DHRyQyAr.js} +1 -1
  179. package/dist/assets/{index-BfBdt3zW.js → index-DSVnVYmz.js} +1 -1
  180. package/dist/assets/{index-DbgDZDus.js → index-QwIMrChO.js} +1 -1
  181. package/dist/assets/{intro-BQxazeZ4.js → intro-D15hwrBp.js} +2 -2
  182. package/dist/assets/{jsx-runtime-BYouaCF_.js → jsx-runtime-BTJTZTIL.js} +2 -2
  183. package/dist/assets/layout-relative-BNsRKWaJ.css +1 -0
  184. package/dist/assets/layout-relative-iaxAShjd.css +1 -0
  185. package/dist/assets/layout-relative.module-1z75aSwo-BeT2Gxbq.js +1 -0
  186. package/dist/assets/layout-relative.module-ChaXrVQQ.js +1 -0
  187. package/dist/assets/{message-BraTJ16C.js → message-BqoANQez.js} +1 -1
  188. package/dist/assets/{migrating-from-less-_WbBpNno.js → migrating-from-less-ChwDKr-0.js} +2 -2
  189. package/dist/assets/{options-Dn0Ts6qK.js → options-DiZKU5qS.js} +1 -1
  190. package/dist/assets/playground-6Qa0tALi.css +1 -0
  191. package/dist/assets/{playground.stories-DNP6DMoh.js → playground.stories-DBacBF4k.js} +212 -212
  192. package/dist/assets/preview-B7ZgNHfI.js +22 -0
  193. package/dist/assets/{preview-ChKXYagv.js → preview-BTjEYo28.js} +1 -1
  194. package/dist/assets/preview-BtcSDksg.js +2 -0
  195. package/dist/assets/{preview-DqZVArh_.js → preview-Dr3Vhf1y.js} +1 -1
  196. package/dist/assets/react-18-DfUnyR7e.js +1 -0
  197. package/dist/assets/react.esm-BJ_b8t-Z.js +65 -0
  198. package/dist/assets/{render-icon-CVTdrNe-.js → render-icon-BT0Aq7PA.js} +1 -1
  199. package/dist/assets/{render-icon-CwRdpin3.js → render-icon-Du0nasoi.js} +1 -1
  200. package/dist/assets/{shared-strings-CcWGHelY.js → shared-strings-BzaHC9x5.js} +1 -1
  201. package/dist/assets/{styled-components.browser.esm-CwsnEFnS.js → styled-components.browser.esm-BgpGX317.js} +1 -1
  202. package/dist/assets/test-utils-DCJN9LZk.js +9 -0
  203. package/dist/assets/{tokens-Do5DDIVZ.js → tokens-0xptGJP0.js} +2 -2
  204. package/dist/assets/{tokens-rA5iljxB.js → tokens-CGqhbkO_.js} +2 -2
  205. package/dist/assets/tokens-CJh_FSIl.js +1 -0
  206. package/dist/assets/{tokens-BpVbkeg9.js → tokens-pXBi-h95.js} +2 -2
  207. package/dist/assets/useHostname-Y3PlXofY.js +1 -0
  208. package/dist/assets/{useMergeRefs-BKVZOB6R.js → useMergeRefs-D_RfOOSs.js} +1 -1
  209. package/dist/assets/{useMergeRefs-CeyIhNgY.js → useMergeRefs-SFH7Mw4x.js} +1 -1
  210. package/dist/assets/{usePortalElement-D-MBkGYE.js → usePortalElement-M09Zq-L8.js} +2 -2
  211. package/dist/assets/{useTheme-DiEoTTOi.js → useTheme-DFSR9KPZ.js} +1 -1
  212. package/dist/assets/{useToken-BEsvy84L.js → useToken-DI8WZBSr.js} +1 -1
  213. package/dist/assets/{welcome-CjdlfIE9.js → welcome-DyZwhj5C.js} +2 -2
  214. package/dist/assets/{zeroheight-COTIl-YQ.js → zeroheight-B9itFpkD.js} +2 -2
  215. package/dist/iframe.html +1 -1
  216. package/dist/index.json +1 -1
  217. package/dist/preview-stats.json +2217 -1449
  218. package/dist/project.json +1 -1
  219. package/package.json +3 -3
  220. package/dist/assets/00.LayoutFlex.stories-DsoQ41ru.js +0 -85
  221. package/dist/assets/00.using-responsive-props-CXXBchqR.js +0 -18
  222. package/dist/assets/01.semantic-tokens-DA4N50sn.js +0 -2
  223. package/dist/assets/10.Combinations.stories-D5C6zeLo.js +0 -144
  224. package/dist/assets/30.icons.explorer-gDqz6aGC.js +0 -73
  225. package/dist/assets/40.illustrations.explorer-Cw6qUJFV.js +0 -21
  226. package/dist/assets/Avatar.stories-QILX30d4.js +0 -42
  227. package/dist/assets/AvatarWithStatus.stories-CiIZ7860.js +0 -41
  228. package/dist/assets/Box.stories-Bj6O093l.js +0 -44
  229. package/dist/assets/Checkbox.tests.stories-Bn3p5No-.js +0 -64
  230. package/dist/assets/Chips-DAK2so_G.css +0 -1
  231. package/dist/assets/Chips.stories-FqjAsoAI.js +0 -150
  232. package/dist/assets/Color-YHDXOIA2-Brn_ueLX.js +0 -1
  233. package/dist/assets/DocsRenderer-CFRXHY34-Drp94F88.js +0 -2
  234. package/dist/assets/FieldButton.stories-DN08cc4N.js +0 -1
  235. package/dist/assets/Flag.stories-hPDFXFLs.js +0 -114
  236. package/dist/assets/Flag.test.stories-Dn7xe9kp.js +0 -27
  237. package/dist/assets/Heading.stories-Pcuq78-p.js +0 -82
  238. package/dist/assets/Icon-RSC-DHJisRIw.js +0 -6
  239. package/dist/assets/IconButton-BqwVuKH2.js +0 -8
  240. package/dist/assets/IntegrationWithReactHookForm.stories-DjhZzsb9.js +0 -274
  241. package/dist/assets/LayoutFlex-BBGvSVMb.js +0 -1
  242. package/dist/assets/LayoutGrid.stories-CNvZbuzu.js +0 -88
  243. package/dist/assets/Link.stories-DQx9wq8H.js +0 -271
  244. package/dist/assets/Loader.stories-DWRd5a4n.js +0 -37
  245. package/dist/assets/ObserveIntersection.stories-BabE9srq.js +0 -27
  246. package/dist/assets/OnboardingTooltip.stories-BGQM-hLj.js +0 -66
  247. package/dist/assets/OnboardingTooltip.tests.stories-4LRVGnuI.js +0 -79
  248. package/dist/assets/PreplyLogo.stories-CrTgCgF0.js +0 -97
  249. package/dist/assets/ProgressSteps.stories-DDhuAaz0.js +0 -31
  250. package/dist/assets/RootProvider-DLsVkcFn.js +0 -1
  251. package/dist/assets/ShowOnIntersection.stories-ipu84fct.js +0 -17
  252. package/dist/assets/Text.stories-CkC6dvyE.js +0 -69
  253. package/dist/assets/TextHighlighted.stories-BJsM40kL.js +0 -32
  254. package/dist/assets/TextInline.stories-CL1L2t2-.js +0 -37
  255. package/dist/assets/Tooltip.tests.stories-DWwqRNUM.js +0 -65
  256. package/dist/assets/componentNames-CpCJzpB9.js +0 -1
  257. package/dist/assets/entry-preview-Cgr68VmN.js +0 -10
  258. package/dist/assets/hover-BJ9rZrzg.js +0 -13
  259. package/dist/assets/hover-CeDdAnNA.js +0 -14
  260. package/dist/assets/index-B3evPFBL.js +0 -9
  261. package/dist/assets/index-uOP2uDdf.js +0 -1
  262. package/dist/assets/layout-relative-BGyAoF2N.css +0 -1
  263. package/dist/assets/layout-relative-DuJENdo5.css +0 -1
  264. package/dist/assets/layout-relative.module-1z75aSwo-DNAR_Nv2.js +0 -1
  265. package/dist/assets/layout-relative.module-ed9bC4H4.js +0 -1
  266. package/dist/assets/playground-DJaUjyzx.css +0 -1
  267. package/dist/assets/preview-DFIaQ6pR.js +0 -2
  268. package/dist/assets/preview-Dlcr0l4_.js +0 -22
  269. package/dist/assets/react-18-CYoSI7Qu.js +0 -1
  270. package/dist/assets/tokens-ZvFzTwDp.js +0 -1
  271. package/dist/assets/useHostname-CH18gHFj.js +0 -1
@@ -1,6 +1,6 @@
1
- import{j as u}from"./jsx-runtime-BYouaCF_.js";import{r as V}from"./index-B3evPFBL.js";import{F as g}from"./FormControl-CeIJk4_Z.js";import{w as H}from"./componentNames-CpCJzpB9.js";import{I as L}from"./Input-C1hZX5_o.js";const t=V.forwardRef(function({id:i,label:d,description:s,error:o,required:m,inputDataset:p,dataset:v,hideLabel:f,onClick:c,onValueChange:e,onChange:a,hasError:y,useLegacyRequiredLabel:b,className:I,style:R,...h},q){const E=l=>{a==null||a(l);const n=l.target.value;e==null||e(n?Number(n):void 0)};return u.jsx(g,{id:i,label:d,description:s,error:o,hasError:y,required:m,dataset:v,hideLabel:f,onClick:c,useLegacyRequiredLabel:b,preplyDsComponent:H.NumberField,children:u.jsx(L,{...h,type:"number",ref:q,dataset:p,onChange:E})})});try{t.displayName="NumberField",t.__docgenInfo={description:"",displayName:"NumberField",props:{id:{defaultValue:null,description:`The id to be passed to the input element.
2
- If not provided, will be generated for accessibility purposes.`,name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<HTMLDivElement> & MouseEventHandler<HTMLInputElement>"}]}},error:{defaultValue:null,description:"Error message to display when the field has an invalid value.",name:"error",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"}]}},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"}]}},description:{defaultValue:null,description:`Additional descriptive text that appears below the input field
3
- to provide more context or instructions to the user.`,name:"description",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"}]}},hasError:{defaultValue:null,description:"Whether the field has an error.\n@deprecated Use `error` prop to exlicitly describe the error to users",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},required:{defaultValue:null,description:`Indicates if the field is required. When false, adds a "Optional"
4
- indicator next to the label.`,name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},useLegacyRequiredLabel:{defaultValue:null,description:`When true, adds a "Required" indicator next to the label for the required fields.
1
+ import{j as u}from"./jsx-runtime-BTJTZTIL.js";import{r as V}from"./index-Cb9e4tly.js";import{F as g}from"./FormControl-BBd1k1n3.js";import{w as H}from"./componentNames-NXEPEzbR.js";import{I as L}from"./Input-MEZGWQfc.js";const t=V.forwardRef(function({id:i,label:d,description:s,error:o,required:m,inputDataset:p,dataset:v,hideLabel:f,onClick:c,onValueChange:e,onChange:a,hasError:y,useLegacyRequiredLabel:b,className:I,style:R,...h},q){const E=l=>{a==null||a(l);const n=l.target.value;e==null||e(n?Number(n):void 0)};return u.jsx(g,{id:i,label:d,description:s,error:o,hasError:y,required:m,dataset:v,hideLabel:f,onClick:c,useLegacyRequiredLabel:b,preplyDsComponent:H.NumberField,children:u.jsx(L,{...h,type:"number",ref:q,dataset:p,onChange:E})})});try{t.displayName="NumberField",t.__docgenInfo={description:"",displayName:"NumberField",props:{id:{defaultValue:null,description:`The id to be passed to the input element.
2
+ If not provided, will be generated for accessibility purposes.`,name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<HTMLDivElement> & MouseEventHandler<HTMLInputElement>"}]}},error:{defaultValue:null,description:"Error message to display when the field has an invalid value.",name:"error",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"}]}},description:{defaultValue:null,description:`Additional descriptive text that appears below the input field
3
+ to provide more context or instructions to the user.`,name:"description",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"}]}},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"}]}},required:{defaultValue:null,description:`Indicates if the field is required. When false, adds a "Optional"
4
+ indicator next to the label.`,name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},hasError:{defaultValue:null,description:"Whether the field has an error.\n@deprecated Use `error` prop to exlicitly describe the error to users",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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"}]}},useLegacyRequiredLabel:{defaultValue:null,description:`When true, adds a "Required" indicator next to the label for the required fields.
5
5
  When false, adds a "Optional" indicator next to the label for the optional fields instead.
6
- @deprecated This is a temporary solution for gradual migration to the "Optional" label.`,name:"useLegacyRequiredLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},button:{defaultValue:null,description:"",name:"button",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onCut:{defaultValue:null,description:"",name:"onCut",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<HTMLInputElement>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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:"number"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"number"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"(value: number | undefined) => void"}]}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"enum",value:[{value:"number"}]}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"enum",value:[{value:"number"}]}},step:{defaultValue:null,description:"",name:"step",required:!1,type:{name:"enum",value:[{value:"number"}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",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: HTMLInputElement | null) => void"},{value:"RefObject<HTMLInputElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{t as N};
6
+ @deprecated This is a temporary solution for gradual migration to the "Optional" label.`,name:"useLegacyRequiredLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onCut:{defaultValue:null,description:"",name:"onCut",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<HTMLInputElement>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},button:{defaultValue:null,description:"",name:"button",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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:"number"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"number"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"(value: number | undefined) => void"}]}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"enum",value:[{value:"number"}]}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"enum",value:[{value:"number"}]}},step:{defaultValue:null,description:"",name:"step",required:!1,type:{name:"enum",value:[{value:"number"}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",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: HTMLInputElement | null) => void"},{value:"RefObject<HTMLInputElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{t as N};
@@ -1,4 +1,4 @@
1
- import{j as g}from"./jsx-runtime-BYouaCF_.js";import{r as re}from"./index-B3evPFBL.js";import{a as se}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{f as r,w as x,e as n,u as w}from"./index-DDyIDR-R.js";import{F as te}from"./TokyoUIPhone-BHLDT6dz.js";import{F as ie}from"./TokyoUIAttach-BvBvQVx_.js";import{I as ne}from"./Icon-ZIxauYsE.js";import{N as ae}from"./NumberField-D6cbX2hK.js";import{F as ce}from"./FieldButton-Bsa9_rJB.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-CpCJzpB9.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./FormControl-CeIJk4_Z.js";import"./index-DRKYGVyc.js";import"./index-BfBdt3zW.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./message-BraTJ16C.js";import"./Input-C1hZX5_o.js";import"./InputContainer-Bk0tgFnW.js";const je={title:"components/NumberField",component:ae,args:{name:"number",label:"Number",defaultValue:void 0,placeholder:"Enter a number",dataset:{testid:"field",foo:"bar"},inputDataset:{testid:"input",foo:"bar"},onChange:r(),onValueChange:r(),onBlur:r(),onFocus:r(),onClick:r(),onCopy:r(),onKeyDown:r(),onKeyUp:r(),onPaste:r()}},c={play:async({canvasElement:a,step:e,args:t})=>{const o=x(a),i=o.getByTestId("field"),s=o.getByTestId("input");await e("it should render correct label",async()=>{const oe=x(i).getByTestId("label");n(oe).toHaveTextContent("Number • Optional"),n(s).toHaveAccessibleName("Number")}),await e("it should call onFocus when the input is focused",async()=>{s.focus(),n(t.onFocus).toHaveBeenCalled()}),await e("it should call callback when the value changes",async()=>{await w.type(s,"42"),n(t.onValueChange).toHaveBeenCalledWith(42),n(t.onChange).toHaveBeenCalled()}),await e("it should call onBlur when the input is blurred",async()=>{await w.keyboard("{tab}"),n(t.onBlur).toHaveBeenCalled()}),await e("it should render the dataset props",async()=>{n(i).toHaveAttribute("data-testid","field"),n(i).toHaveAttribute("data-foo","bar"),n(s).toHaveAttribute("data-testid","input"),n(s).toHaveAttribute("data-foo","bar")})}},l={render:function(e){const[t,o]=re.useState(e.value);return g.jsx(ae,{...e,value:t,onChange:i=>{var s;o(Number(i.target.value)),(s=e.onChange)==null||s.call(e,i)}})},args:{label:"Controlled NumberField",placeholder:"Enter a number...",value:42},play:async({canvas:a,step:e})=>{await e("it should render the correct initial value",async()=>{const t=a.getByTestId("input");await n(t).toHaveValue(42)}),await e("it should update the value when the user types",async()=>{const t=a.getByTestId("input");await w.clear(t),await w.type(t,"100"),n(t).toHaveValue(100)})}},u={args:{icon:g.jsx(ne,{svg:te,dataset:{testid:"icon"}})},play:async({canvas:a,step:e})=>{await e("it should render the icon",async()=>{const t=a.getByTestId("icon");n(t).toBeInTheDocument()})}},d={args:{description:"Enter a valid number"},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("description");await e("it should render the description",async()=>{n(t).toHaveAccessibleDescription("Enter a valid number"),n(o).toHaveTextContent("Enter a valid number")})}},p={args:{required:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("label");await e("it should render correct label",async()=>{n(t).toHaveAccessibleName("Number"),n(o).toHaveTextContent("Number")}),await e("it should render required attribute",async()=>{n(t).toHaveAttribute("required")})}},m={args:{hideLabel:!0},play:async({canvas:a,step:e})=>{await e("it should render correct a11y label",async()=>{const t=a.getByTestId("input");n(t).toHaveAccessibleName("Number")})}},b={args:{error:"This is an error message"},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("error");await e("it should render the error message",async()=>{n(t).toHaveAccessibleErrorMessage("This is an error message"),n(o).toHaveTextContent("This is an error message")})}},h={args:{disabled:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input");await e("it should render the disabled input",async()=>{n(t).toHaveAttribute("disabled")})}},y={args:{readOnly:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input");await e("it should render the read only input",async()=>{n(t).toHaveAttribute("readonly")})}},v={parameters:{chromatic:{disableSnapshot:!0}},args:{label:"Number of lessons",placeholder:"How about 3?",description:"These lessons will be scheduled automatically"},argTypes:{label:{control:"text"},placeholder:{control:"text"},description:{control:"text"},error:{control:"text"},value:{control:"number"},defaultValue:{control:"number"},inputDataset:{control:"object"},dataset:{control:"object"},id:{control:"text"},required:{control:"boolean"},hideLabel:{control:"boolean"},name:{control:"text"},disabled:{control:"boolean"},readOnly:{control:"boolean"},min:{control:"number"},max:{control:"number"},step:{control:"number"},icon:{options:["None","With Icon"],mapping:{None:void 0,"With Icon":g.jsx(ne,{svg:te})},control:"select"},button:{options:["None","With Button"],mapping:{None:void 0,"With Button":g.jsx(ce,{svg:ie,assistiveText:"Do the thing",onClick:se("field button clicked")})},control:"select"},maxLength:{control:"number"},hasError:{table:{disable:!0}}}};var B,T,H,f,I;c.parameters={...c.parameters,docs:{...(B=c.parameters)==null?void 0:B.docs,source:{originalSource:`{
1
+ import{j as g}from"./jsx-runtime-BTJTZTIL.js";import{r as re}from"./index-Cb9e4tly.js";import{a as se}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{f as r,w as x,e as n,u as w}from"./index-Ctq3gFTp.js";import{F as te}from"./TokyoUIPhone-CvuBM6jb.js";import{F as ie}from"./TokyoUIAttach-BWl7Jkq1.js";import{I as ne}from"./Icon-CsnSNslb.js";import{N as ae}from"./NumberField-RsSQ3jKy.js";import{F as ce}from"./FieldButton-DkkntNzT.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-BT0Aq7PA.js";import"./componentNames-NXEPEzbR.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./FormControl-BBd1k1n3.js";import"./index-C6wF8VM1.js";import"./index-DSVnVYmz.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./message-BqoANQez.js";import"./Input-MEZGWQfc.js";import"./InputContainer-BZsD6GIE.js";const qe={title:"components/NumberField",component:ae,args:{name:"number",label:"Number",defaultValue:void 0,placeholder:"Enter a number",dataset:{testid:"field",foo:"bar"},inputDataset:{testid:"input",foo:"bar"},onChange:r(),onValueChange:r(),onBlur:r(),onFocus:r(),onClick:r(),onCopy:r(),onKeyDown:r(),onKeyUp:r(),onPaste:r()}},c={play:async({canvasElement:a,step:e,args:t})=>{const o=x(a),i=o.getByTestId("field"),s=o.getByTestId("input");await e("it should render correct label",async()=>{const oe=x(i).getByTestId("label");n(oe).toHaveTextContent("Number • Optional"),n(s).toHaveAccessibleName("Number")}),await e("it should call onFocus when the input is focused",async()=>{s.focus(),n(t.onFocus).toHaveBeenCalled()}),await e("it should call callback when the value changes",async()=>{await w.type(s,"42"),n(t.onValueChange).toHaveBeenCalledWith(42),n(t.onChange).toHaveBeenCalled()}),await e("it should call onBlur when the input is blurred",async()=>{await w.keyboard("{tab}"),n(t.onBlur).toHaveBeenCalled()}),await e("it should render the dataset props",async()=>{n(i).toHaveAttribute("data-testid","field"),n(i).toHaveAttribute("data-foo","bar"),n(s).toHaveAttribute("data-testid","input"),n(s).toHaveAttribute("data-foo","bar")})}},l={render:function(e){const[t,o]=re.useState(e.value);return g.jsx(ae,{...e,value:t,onChange:i=>{var s;o(Number(i.target.value)),(s=e.onChange)==null||s.call(e,i)}})},args:{label:"Controlled NumberField",placeholder:"Enter a number...",value:42},play:async({canvas:a,step:e})=>{await e("it should render the correct initial value",async()=>{const t=a.getByTestId("input");await n(t).toHaveValue(42)}),await e("it should update the value when the user types",async()=>{const t=a.getByTestId("input");await w.clear(t),await w.type(t,"100"),n(t).toHaveValue(100)})}},u={args:{icon:g.jsx(ne,{svg:te,dataset:{testid:"icon"}})},play:async({canvas:a,step:e})=>{await e("it should render the icon",async()=>{const t=a.getByTestId("icon");n(t).toBeInTheDocument()})}},d={args:{description:"Enter a valid number"},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("description");await e("it should render the description",async()=>{n(t).toHaveAccessibleDescription("Enter a valid number"),n(o).toHaveTextContent("Enter a valid number")})}},p={args:{required:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("label");await e("it should render correct label",async()=>{n(t).toHaveAccessibleName("Number"),n(o).toHaveTextContent("Number")}),await e("it should render required attribute",async()=>{n(t).toHaveAttribute("required")})}},m={args:{hideLabel:!0},play:async({canvas:a,step:e})=>{await e("it should render correct a11y label",async()=>{const t=a.getByTestId("input");n(t).toHaveAccessibleName("Number")})}},b={args:{error:"This is an error message"},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input"),o=a.getByTestId("error");await e("it should render the error message",async()=>{n(t).toHaveAccessibleErrorMessage("This is an error message"),n(o).toHaveTextContent("This is an error message")})}},h={args:{disabled:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input");await e("it should render the disabled input",async()=>{n(t).toHaveAttribute("disabled")})}},y={args:{readOnly:!0},play:async({canvas:a,step:e})=>{const t=a.getByTestId("input");await e("it should render the read only input",async()=>{n(t).toHaveAttribute("readonly")})}},v={parameters:{chromatic:{disableSnapshot:!0}},args:{label:"Number of lessons",placeholder:"How about 3?",description:"These lessons will be scheduled automatically"},argTypes:{label:{control:"text"},placeholder:{control:"text"},description:{control:"text"},error:{control:"text"},value:{control:"number"},defaultValue:{control:"number"},inputDataset:{control:"object"},dataset:{control:"object"},id:{control:"text"},required:{control:"boolean"},hideLabel:{control:"boolean"},name:{control:"text"},disabled:{control:"boolean"},readOnly:{control:"boolean"},min:{control:"number"},max:{control:"number"},step:{control:"number"},icon:{options:["None","With Icon"],mapping:{None:void 0,"With Icon":g.jsx(ne,{svg:te})},control:"select"},button:{options:["None","With Button"],mapping:{None:void 0,"With Button":g.jsx(ce,{svg:ie,assistiveText:"Do the thing",onClick:se("field button clicked")})},control:"select"},maxLength:{control:"number"},hasError:{table:{disable:!0}}}};var B,T,H,f,I;c.parameters={...c.parameters,docs:{...(B=c.parameters)==null?void 0:B.docs,source:{originalSource:`{
2
2
  play: async ({
3
3
  canvasElement,
4
4
  step,
@@ -251,4 +251,4 @@ import{j as g}from"./jsx-runtime-BYouaCF_.js";import{r as re}from"./index-B3evPF
251
251
  }
252
252
  }
253
253
  }
254
- }`,...(ee=(Z=v.parameters)==null?void 0:Z.docs)==null?void 0:ee.source}}};const qe=["Basic","Controlled","WithIcon","WithDescription","Required","WithHiddenLabel","HasError","Disabled","ReadOnly","Playground"];export{c as Basic,l as Controlled,h as Disabled,b as HasError,v as Playground,y as ReadOnly,p as Required,d as WithDescription,m as WithHiddenLabel,u as WithIcon,qe as __namedExportsOrder,je as default};
254
+ }`,...(ee=(Z=v.parameters)==null?void 0:Z.docs)==null?void 0:ee.source}}};const ke=["Basic","Controlled","WithIcon","WithDescription","Required","WithHiddenLabel","HasError","Disabled","ReadOnly","Playground"];export{c as Basic,l as Controlled,h as Disabled,b as HasError,v as Playground,y as ReadOnly,p as Required,d as WithDescription,m as WithHiddenLabel,u as WithIcon,ke as __namedExportsOrder,qe as default};
@@ -1,8 +1,8 @@
1
- import{j as b}from"./jsx-runtime-BYouaCF_.js";import{r as s}from"./index-B3evPFBL.js";import{g}from"./index-DdzHuZ-Y.js";import{L as h}from"./defaults-B1rzzf6M.js";import{w as y}from"./componentNames-CpCJzpB9.js";const o=({onIntersect:t,once:a,threshold:r,tag:l,dataset:u,children:i})=>{const e=s.useRef(null);s.useEffect(()=>{const v=([d],f)=>{d.isIntersecting&&(t(),a&&e.current&&f.unobserve(e.current))},m={threshold:r},n=new IntersectionObserver(v,m);return e.current&&n.observe(e.current),()=>n.disconnect()},[t,a,r]);const c=l??h,p={ref:e,...g(u,{preplyDsComponent:y.ObserverIntersection})};return b.jsx(c,{...p,children:i})};try{o.displayName="ObserveIntersection",o.__docgenInfo={description:`An [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) wrapper.
1
+ import{j as b}from"./jsx-runtime-BTJTZTIL.js";import{r as s}from"./index-Cb9e4tly.js";import{g}from"./index-DdzHuZ-Y.js";import{L as h}from"./defaults-Clr6nbGc.js";import{w as y}from"./componentNames-NXEPEzbR.js";const o=({onIntersect:t,once:a,threshold:r,tag:l,dataset:u,children:i})=>{const e=s.useRef(null);s.useEffect(()=>{const v=([d],f)=>{d.isIntersecting&&(t(),a&&e.current&&f.unobserve(e.current))},m={threshold:r},n=new IntersectionObserver(v,m);return e.current&&n.observe(e.current),()=>n.disconnect()},[t,a,r]);const c=l??h,p={ref:e,...g(u,{preplyDsComponent:y.ObserverIntersection})};return b.jsx(c,{...p,children:i})};try{o.displayName="ObserveIntersection",o.__docgenInfo={description:`An [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) wrapper.
2
2
 
3
3
  Triggers a callback when the wrapped component intersects with the viewport.
4
4
 
5
5
  This can be useful in several use cases. Examples:
6
6
 
7
7
  - Track an experiment, once a certain component scrolls into view.
8
- - Trigger an animation, or a feature (e.g.: onboarding instructions).`,displayName:"ObserveIntersection",props:{onIntersect:{defaultValue:null,description:"",name:"onIntersect",required:!0,type:{name:"() => void"}},once:{defaultValue:null,description:"",name:"once",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},threshold:{defaultValue:null,description:"",name:"threshold",required:!1,type:{name:"enum",value:[{value:"number"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"p"'},{value:'"div"'},{value:'"span"'},{value:'"article"'},{value:'"caption"'},{value:'"fieldset"'},{value:'"figcaption"'},{value:'"figure"'},{value:'"footer"'},{value:'"header"'},{value:'"li"'},{value:'"main"'},{value:'"ol"'},{value:'"section"'},{value:'"table"'},{value:'"tbody"'},{value:'"td"'},{value:'"tfoot"'},{value:'"th"'},{value:'"thead"'},{value:'"tr"'},{value:'"ul"'}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}}}}}catch{}export{o as O};
8
+ - Trigger an animation, or a feature (e.g.: onboarding instructions).`,displayName:"ObserveIntersection",props:{onIntersect:{defaultValue:null,description:"",name:"onIntersect",required:!0,type:{name:"() => void"}},once:{defaultValue:null,description:"",name:"once",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},threshold:{defaultValue:null,description:"",name:"threshold",required:!1,type:{name:"enum",value:[{value:"number"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"p"'},{value:'"div"'},{value:'"span"'},{value:'"main"'},{value:'"header"'},{value:'"footer"'},{value:'"article"'},{value:'"section"'},{value:'"ul"'},{value:'"ol"'},{value:'"li"'},{value:'"fieldset"'},{value:'"table"'},{value:'"th"'},{value:'"tr"'},{value:'"td"'},{value:'"thead"'},{value:'"tfoot"'},{value:'"tbody"'},{value:'"caption"'},{value:'"figure"'},{value:'"figcaption"'}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}}}}}catch{}export{o as O};
@@ -0,0 +1,27 @@
1
+ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as a}from"./index-Cb9e4tly.js";import{O as i}from"./ObserveIntersection-B-K9BpyT.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./componentNames-NXEPEzbR.js";const g={title:"components/ObserveIntersection",component:i,parameters:{tags:["!test"],chromatic:{disableSnapshot:!0}}},e=()=>{const[o,c]=a.useState(!1);return t.jsxs("div",{tabIndex:0,style:{height:"200px",overflowY:"scroll",position:"relative"},children:[t.jsx("div",{style:{position:"sticky",top:"2px"},children:o?"Intersected":"Scroll down to intersect"}),t.jsx("div",{style:{height:"400px",display:"flex",alignItems:"end"},children:t.jsx(i,{onIntersect:()=>c(!0),children:"Observer"})})]})};e.storyName="ObserveIntersection";var s,n,r;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`() => {
2
+ const [isIntersecting, setIsIntersecting] = useState(false);
3
+ return (
4
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- This element is interactive; it's scrollable.
5
+ <div tabIndex={0} style={{
6
+ height: '200px',
7
+ overflowY: 'scroll',
8
+ position: 'relative'
9
+ }}>
10
+ <div style={{
11
+ position: 'sticky',
12
+ top: '2px'
13
+ }}>
14
+ {isIntersecting ? 'Intersected' : 'Scroll down to intersect'}
15
+ </div>
16
+ <div style={{
17
+ height: '400px',
18
+ display: 'flex',
19
+ alignItems: 'end'
20
+ }}>
21
+ <ObserveIntersection onIntersect={() => setIsIntersecting(true)}>
22
+ Observer
23
+ </ObserveIntersection>
24
+ </div>
25
+ </div>
26
+ );
27
+ }`,...(r=(n=e.parameters)==null?void 0:n.docs)==null?void 0:r.source}}};const b=["Base"];export{e as Base,b as __namedExportsOrder,g as default};
@@ -1,4 +1,4 @@
1
- import{j as t}from"./jsx-runtime-BYouaCF_.js";import{r as n}from"./index-B3evPFBL.js";import{R as _,A as q,P as x,C as O,a as N,b as E}from"./index-jPlWeKki.js";import{F as k}from"./TokyoUIClose-DFIfVIfy.js";import{I as P}from"./Icon-ZIxauYsE.js";import{T as j}from"./Text-BmdJVr9v.js";import{B as D}from"./Button-BSyqsKC5.js";import{H as T}from"./Heading-ese4_5Hg.js";import{u as S}from"./index-BfBdt3zW.js";import{g as L}from"./shared-strings-CcWGHelY.js";import{g as M}from"./PortalElementProvider-D4ltrA8j.js";import{g as H}from"./index-DdzHuZ-Y.js";import{w as X}from"./componentNames-CpCJzpB9.js";import{M as J}from"./message-BraTJ16C.js";const B="content__KHgp9",F="header__CaLti",U="close__3s-VD",A="footer__X5qXF",G="arrow__0pg-s",o={content:B,header:F,close:U,footer:A,arrow:G},z=e=>{e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},m=({open:e,onOpenChange:i,disabled:r,title:u,text:s,children:a,side:l,dataset:h,actionLabel:g=t.jsx(J,{id:"preply-ds.onboardingTooltip.actionLabel",defaultMessage:"Got it",description:"Default onboarding tooltip action label. Used to acknowledge and close the tooltip."}),actionOnClick:b,actionHref:y,counter:C,autoScroll:v=!0})=>{const{formatMessage:I}=S(),w=M(),f=n.useId(),V=n.useId(),d=n.useId(),c=n.useRef(null);return n.useEffect(()=>{e&&c.current&&v&&z(c.current)},[v,e]),r?a:t.jsxs(_,{open:e,onOpenChange:i,children:[t.jsx(q,{ref:c,id:d,asChild:!0,children:a}),t.jsx(x,{container:w,children:t.jsxs(O,{onInteractOutside:R=>{R.preventDefault()},side:l,className:o.content,"aria-labelledby":f,"aria-describedby":`${d} ${V}`,...H(h,{preplyDsComponent:X.OnboardingTooltip}),children:[t.jsxs("div",{className:o.header,children:[t.jsx(N,{className:o.close,"aria-label":I(L.close),"data-testid":"close",children:t.jsx(P,{accent:"inverted",svg:k})}),t.jsx(T,{tag:"h1",variant:"small",accent:"inverted",id:f,"aria-describedby":d,children:u})]}),t.jsx(j,{variant:"default-regular",accent:"inverted",children:s}),t.jsxs("div",{className:o.footer,children:[C,t.jsx(D,{variant:"inverted",size:"small",onClick:b,href:y,dataset:{testid:"action"},wrap:!0,children:g})]}),t.jsx(E,{"aria-hidden":!0,className:o.arrow,width:18,height:11})]})})]})},p=e=>{const[i,r]=n.useState(!0),u=a=>{var l;a||(l=e.onClose)==null||l.call(e),r(a)},s=()=>{var a,l;(a=e.actionOnClick)==null||a.call(e),r(!1),(l=e.onClose)==null||l.call(e)};return t.jsx(m,{...e,open:i,onOpenChange:u,actionOnClick:s})};try{m.displayName="InternalOnboardingTooltip",m.__docgenInfo={description:"",displayName:"InternalOnboardingTooltip",props:{title:{defaultValue:null,description:"",name:"title",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"}]}},text:{defaultValue:null,description:"",name:"text",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"}]}},disabled:{defaultValue:null,description:"Disables tooltip completely",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClose:{defaultValue:null,description:"Called when the tooltip is closed",name:"onClose",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},actionLabel:{defaultValue:{value:`(
1
+ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as n}from"./index-Cb9e4tly.js";import{R as _,A as q,P as x,C as O,a as N,b as E}from"./index-DHRyQyAr.js";import{F as k}from"./TokyoUIClose-thK8sk63.js";import{I as P}from"./Icon-CsnSNslb.js";import{T as j}from"./Text-CykvSLVe.js";import{B as D}from"./Button-C5gzVt4K.js";import{H as T}from"./Heading-BLxyLk9f.js";import{u as S}from"./index-DSVnVYmz.js";import{g as L}from"./shared-strings-BzaHC9x5.js";import{g as M}from"./PortalElementProvider-CgL8vj5o.js";import{g as H}from"./index-DdzHuZ-Y.js";import{w as X}from"./componentNames-NXEPEzbR.js";import{M as J}from"./message-BqoANQez.js";const B="content__KHgp9",F="header__CaLti",U="close__3s-VD",A="footer__X5qXF",G="arrow__0pg-s",o={content:B,header:F,close:U,footer:A,arrow:G},z=e=>{e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},m=({open:e,onOpenChange:i,disabled:r,title:u,text:s,children:a,side:l,dataset:h,actionLabel:g=t.jsx(J,{id:"preply-ds.onboardingTooltip.actionLabel",defaultMessage:"Got it",description:"Default onboarding tooltip action label. Used to acknowledge and close the tooltip."}),actionOnClick:b,actionHref:y,counter:C,autoScroll:v=!0})=>{const{formatMessage:I}=S(),w=M(),f=n.useId(),V=n.useId(),d=n.useId(),c=n.useRef(null);return n.useEffect(()=>{e&&c.current&&v&&z(c.current)},[v,e]),r?a:t.jsxs(_,{open:e,onOpenChange:i,children:[t.jsx(q,{ref:c,id:d,asChild:!0,children:a}),t.jsx(x,{container:w,children:t.jsxs(O,{onInteractOutside:R=>{R.preventDefault()},side:l,className:o.content,"aria-labelledby":f,"aria-describedby":`${d} ${V}`,...H(h,{preplyDsComponent:X.OnboardingTooltip}),children:[t.jsxs("div",{className:o.header,children:[t.jsx(N,{className:o.close,"aria-label":I(L.close),"data-testid":"close",children:t.jsx(P,{accent:"inverted",svg:k})}),t.jsx(T,{tag:"h1",variant:"small",accent:"inverted",id:f,"aria-describedby":d,children:u})]}),t.jsx(j,{variant:"default-regular",accent:"inverted",children:s}),t.jsxs("div",{className:o.footer,children:[C,t.jsx(D,{variant:"inverted",size:"small",onClick:b,href:y,dataset:{testid:"action"},wrap:!0,children:g})]}),t.jsx(E,{"aria-hidden":!0,className:o.arrow,width:18,height:11})]})})]})},p=e=>{const[i,r]=n.useState(!0),u=a=>{var l;a||(l=e.onClose)==null||l.call(e),r(a)},s=()=>{var a,l;(a=e.actionOnClick)==null||a.call(e),r(!1),(l=e.onClose)==null||l.call(e)};return t.jsx(m,{...e,open:i,onOpenChange:u,actionOnClick:s})};try{m.displayName="InternalOnboardingTooltip",m.__docgenInfo={description:"",displayName:"InternalOnboardingTooltip",props:{title:{defaultValue:null,description:"",name:"title",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"}]}},text:{defaultValue:null,description:"",name:"text",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"}]}},disabled:{defaultValue:null,description:"Disables tooltip completely",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClose:{defaultValue:null,description:"Called when the tooltip is closed",name:"onClose",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},actionLabel:{defaultValue:{value:`(
2
2
  <FormattedMessage
3
3
  id="preply-ds.onboardingTooltip.actionLabel"
4
4
  defaultMessage="Got it"
@@ -0,0 +1,66 @@
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{O as u}from"./OnboardingTooltip-S86JAVp1.js";import{I as g}from"./IconButton-NYwQQfnV.js";import{F as x}from"./TokyoUIFav-DOVerCtW.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DHRyQyAr.js";import"./PortalElementProvider-CgL8vj5o.js";import"./index-C6wF8VM1.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./Combination-Cz1uIyPJ.js";import"./tslib.es6-BntfKcQG.js";import"./index-QwIMrChO.js";import"./TokyoUIClose-thK8sk63.js";import"./Icon-CsnSNslb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-BT0Aq7PA.js";import"./componentNames-NXEPEzbR.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./Text-CykvSLVe.js";import"./text-centered-CznToR0o.js";import"./Button-C5gzVt4K.js";import"./ButtonBase-D5O3MkG2.js";import"./Spinner-T-vTyHiv.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";import"./Heading-BLxyLk9f.js";import"./index-DSVnVYmz.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-BzaHC9x5.js";import"./message-BqoANQez.js";const oe={title:"Components/OnboardingTooltip",component:u,parameters:{docs:{story:{inline:!1,height:250},description:{component:"Are you looking for a step-by-step tour? Check out [OnboardingTour](/docs/components-onboardingtour--docs)"}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},decorators:[t=>e.jsx("div",{style:{margin:"auto",width:"max-content"},children:t()})]},f=t=>[!1,!1],h=t=>a=>{},o=()=>{const[t,a]=f(),v=h();return e.jsx(u,{title:"New Feature Available!",text:"We've added an exciting new feature to enhance your experience.",disabled:a||t,onClose:()=>v(!0),children:e.jsx(g,{variant:"ghost",svg:e.jsx(x,{}),assistiveText:"Favorite"})})};o.storyName="OnboardingTooltip";const r={tags:["!autodocs"],args:{title:"New Feature Available!",text:"We've added an exciting new feature to enhance your experience.",disabled:!1,onClose:()=>{},children:e.jsx(g,{variant:"ghost",svg:e.jsx(x,{}),assistiveText:"Favorite"})},argTypes:{title:{control:"text"},text:{control:"text"},actionLabel:{control:"text"},actionOnClick:{control:!1},actionHref:{control:"text"},disabled:{control:"boolean"},dataset:{control:"object"},onClose:{control:!1},children:{control:!1}},parameters:{docs:{story:{height:450}},chromatic:{disableSnapshot:!0}},decorators:[t=>e.jsx("div",{style:{minHeight:"100vh",display:"flex"},children:e.jsx("div",{style:{margin:"auto",width:"max-content"},children:t()})})]};var i,n,s,l,c;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`() => {
2
+ const [wasTooltipSeen, loading] = useIsFeatureActive('new-feature');
3
+ const setTooltipSeen = useToggleFeature('new-feature');
4
+ return <OnboardingTooltip title="New Feature Available!" text="We've added an exciting new feature to enhance your experience." disabled={loading || wasTooltipSeen} onClose={() => setTooltipSeen(true)}>
5
+ <IconButton variant="ghost" svg={<TokyoUIFav />} assistiveText="Favorite" />
6
+ </OnboardingTooltip>;
7
+ }`,...(s=(n=o.parameters)==null?void 0:n.docs)==null?void 0:s.source},description:{story:"Basic usage of the onboarding tooltip.\n\nUse `disabled` and `onClose` (or `actionOnClick`) props to control tooltip's visibility (We recommend using FeatureToggles for this)",...(c=(l=o.parameters)==null?void 0:l.docs)==null?void 0:c.description}}};var d,p,m;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{
8
+ tags: ['!autodocs'],
9
+ args: {
10
+ title: 'New Feature Available!',
11
+ text: "We've added an exciting new feature to enhance your experience.",
12
+ disabled: false,
13
+ onClose: () => {},
14
+ children: <IconButton variant="ghost" svg={<TokyoUIFav />} assistiveText="Favorite" />
15
+ },
16
+ argTypes: {
17
+ title: {
18
+ control: 'text'
19
+ },
20
+ text: {
21
+ control: 'text'
22
+ },
23
+ actionLabel: {
24
+ control: 'text'
25
+ },
26
+ actionOnClick: {
27
+ control: false
28
+ },
29
+ actionHref: {
30
+ control: 'text'
31
+ },
32
+ disabled: {
33
+ control: 'boolean'
34
+ },
35
+ dataset: {
36
+ control: 'object'
37
+ },
38
+ onClose: {
39
+ control: false
40
+ },
41
+ children: {
42
+ control: false
43
+ }
44
+ },
45
+ parameters: {
46
+ docs: {
47
+ story: {
48
+ height: 450
49
+ }
50
+ },
51
+ chromatic: {
52
+ disableSnapshot: true
53
+ }
54
+ },
55
+ decorators: [story => <div style={{
56
+ minHeight: '100vh',
57
+ display: 'flex'
58
+ }}>
59
+ <div style={{
60
+ margin: 'auto',
61
+ width: 'max-content'
62
+ }}>
63
+ {story()}
64
+ </div>
65
+ </div>]
66
+ }`,...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};const re=["Default","Playground"];export{o as Default,r as Playground,re as __namedExportsOrder,oe as default};
@@ -0,0 +1,79 @@
1
+ import{j as a}from"./jsx-runtime-BTJTZTIL.js";import{O as x}from"./OnboardingTooltip-S86JAVp1.js";import{I}from"./IconButton-NYwQQfnV.js";import{F as f}from"./TokyoUIFav-DOVerCtW.js";import{w as s,a as r,e as n,u as m}from"./index-Ctq3gFTp.js";import{B as k}from"./Button-C5gzVt4K.js";import{L as F}from"./LayoutFlex-C3k4b85b.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DHRyQyAr.js";import"./PortalElementProvider-CgL8vj5o.js";import"./index-C6wF8VM1.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./Combination-Cz1uIyPJ.js";import"./tslib.es6-BntfKcQG.js";import"./index-QwIMrChO.js";import"./TokyoUIClose-thK8sk63.js";import"./Icon-CsnSNslb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-BT0Aq7PA.js";import"./componentNames-NXEPEzbR.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./Text-CykvSLVe.js";import"./text-centered-CznToR0o.js";import"./Heading-BLxyLk9f.js";import"./index-DSVnVYmz.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-BzaHC9x5.js";import"./message-BqoANQez.js";import"./ButtonBase-D5O3MkG2.js";import"./Spinner-T-vTyHiv.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";import"./layout-relative.module-ChaXrVQQ.js";const yt={title:"Components/OnboardingTooltip/Tests",component:x,parameters:{layout:"centered",controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"],decorators:[e=>a.jsx("div",{style:{margin:"100px 0"},children:e()})],args:{title:"Title",text:"Body text",actionLabel:"Action label",disabled:!1,onClose:()=>{},dataset:{testid:"tooltip"},children:a.jsx(I,{svg:a.jsx(f,{}),assistiveText:"Favorite"})}},c={play:async({canvasElement:e,step:o})=>{const i=s(e);await o("wait for tooltip to be visible",async()=>{await r(()=>{const t=i.getByTestId("tooltip");return n(t).toBeVisible()})}),await o("close the tooltip",()=>{const u=s(i.getByTestId("tooltip")).getByTestId("close");return m.click(u)}),await o("wait for tooltip to be hidden",async()=>{await r(()=>{const t=i.queryByTestId("tooltip");return n(t).toBeNull()})})}},l={play:async({canvasElement:e,step:o})=>{const i=s(e);await o("wait for tooltip to be visible",async()=>{await r(()=>{const t=i.getByTestId("tooltip");return n(t).toBeVisible()})}),await o("close the tooltip",()=>{const u=s(i.getByTestId("tooltip")).getByTestId("action");return m.click(u)}),await o("wait for tooltip to be hidden",async()=>{await r(()=>{const t=i.queryByTestId("tooltip");return n(t).toBeNull()})})}};function E(e){return new Promise(o=>setTimeout(o,e))}const p={render:e=>a.jsxs(F,{gap:"24",direction:"column",children:[a.jsx(k,{children:"Click outside the tooltip"}),a.jsx(x,{...e,children:a.jsx(I,{svg:a.jsx(f,{}),assistiveText:"Favorite"})})]}),play:async({canvasElement:e,step:o})=>{const i=s(e);await o("wait for tooltip to be visible",async()=>{await r(()=>{const t=i.getByTestId("tooltip");return n(t).toBeVisible()})}),await o("click outside the tooltip",()=>{const t=i.getByText("Click outside the tooltip");return m.click(t)}),await o("check the tooltip remain open",async()=>{await E(1e3);const t=i.getByTestId("tooltip");return n(t).toBeVisible()})}};var d,y,w;c.parameters={...c.parameters,docs:{...(d=c.parameters)==null?void 0:d.docs,source:{originalSource:`{
2
+ play: async ({
3
+ canvasElement,
4
+ step
5
+ }) => {
6
+ const canvas = within(canvasElement);
7
+ await step('wait for tooltip to be visible', async () => {
8
+ await waitFor(() => {
9
+ const tooltip = canvas.getByTestId('tooltip');
10
+ return expect(tooltip).toBeVisible();
11
+ });
12
+ });
13
+ await step('close the tooltip', () => {
14
+ const tooltip = within(canvas.getByTestId('tooltip'));
15
+ const closeButton = tooltip.getByTestId('close');
16
+ return userEvent.click(closeButton);
17
+ });
18
+ await step('wait for tooltip to be hidden', async () => {
19
+ await waitFor(() => {
20
+ const tooltip = canvas.queryByTestId('tooltip');
21
+ return expect(tooltip).toBeNull();
22
+ });
23
+ });
24
+ }
25
+ }`,...(w=(y=c.parameters)==null?void 0:y.docs)==null?void 0:w.source}}};var B,v,g;l.parameters={...l.parameters,docs:{...(B=l.parameters)==null?void 0:B.docs,source:{originalSource:`{
26
+ play: async ({
27
+ canvasElement,
28
+ step
29
+ }) => {
30
+ const canvas = within(canvasElement);
31
+ await step('wait for tooltip to be visible', async () => {
32
+ await waitFor(() => {
33
+ const tooltip = canvas.getByTestId('tooltip');
34
+ return expect(tooltip).toBeVisible();
35
+ });
36
+ });
37
+ await step('close the tooltip', () => {
38
+ const tooltip = within(canvas.getByTestId('tooltip'));
39
+ const actionButton = tooltip.getByTestId('action');
40
+ return userEvent.click(actionButton);
41
+ });
42
+ await step('wait for tooltip to be hidden', async () => {
43
+ await waitFor(() => {
44
+ const tooltip = canvas.queryByTestId('tooltip');
45
+ return expect(tooltip).toBeNull();
46
+ });
47
+ });
48
+ }
49
+ }`,...(g=(v=l.parameters)==null?void 0:v.docs)==null?void 0:g.source}}};var b,h,T;p.parameters={...p.parameters,docs:{...(b=p.parameters)==null?void 0:b.docs,source:{originalSource:`{
50
+ render: args => {
51
+ return <LayoutFlex gap="24" direction="column">
52
+ <Button>Click outside the tooltip</Button>
53
+ <OnboardingTooltip {...args}>
54
+ <IconButton svg={<TokyoUIFav />} assistiveText="Favorite" />
55
+ </OnboardingTooltip>
56
+ </LayoutFlex>;
57
+ },
58
+ play: async ({
59
+ canvasElement,
60
+ step
61
+ }) => {
62
+ const canvas = within(canvasElement);
63
+ await step('wait for tooltip to be visible', async () => {
64
+ await waitFor(() => {
65
+ const tooltip = canvas.getByTestId('tooltip');
66
+ return expect(tooltip).toBeVisible();
67
+ });
68
+ });
69
+ await step('click outside the tooltip', () => {
70
+ const outsideButton = canvas.getByText('Click outside the tooltip');
71
+ return userEvent.click(outsideButton);
72
+ });
73
+ await step('check the tooltip remain open', async () => {
74
+ await delay(1000);
75
+ const tooltip = canvas.getByTestId('tooltip');
76
+ return expect(tooltip).toBeVisible();
77
+ });
78
+ }
79
+ }`,...(T=(h=p.parameters)==null?void 0:h.docs)==null?void 0:T.source}}};const wt=["Default","CloseWithActionButton","DoNotCloseOnInteractionOutside"];export{l as CloseWithActionButton,c as Default,p as DoNotCloseOnInteractionOutside,wt as __namedExportsOrder,yt as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-BYouaCF_.js";import{r as l}from"./index-B3evPFBL.js";import{I as A}from"./OnboardingTooltip-DVNAQjDc.js";import"./index-BfBdt3zW.js";import{M as f}from"./message-BraTJ16C.js";const T="counter__ArBS-",j={counter:T},v=({totalSteps:n,nextActionLabel:e=o.jsx(f,{id:"preply-ds.onboardingTour.nextActionLabel",defaultMessage:"Next",description:"Onboarding tour next action label"}),completeActionLabel:a=o.jsx(f,{id:"preply-ds.onboardingTour.completeActionLabel",defaultMessage:"Got it",description:"Onboarding tour complete action label"}),onClose:t,onComplete:r,onStepChange:i,disabled:s,children:p,ctx:x})=>{const[b,u]=l.useState(!0),[d,g]=l.useState(0),c={totalSteps:n,nextActionLabel:e,completeActionLabel:a,onClose:()=>{u(!1),t==null||t()},active:!s&&b,currentStep:d,onActionClick:()=>{if(d===n-1)r==null||r(),u(!1);else{const h=d+1;g(h),i==null||i(h)}}};return o.jsx(x.Provider,{value:c,children:p})},_=({ctx:n,...e})=>{const a=l.useContext(n);if(!a)throw new Error("OnboardingTourContext not found");const{currentStep:t,totalSteps:r,onActionClick:i,onClose:s,active:p,nextActionLabel:x,completeActionLabel:b}=a,u=e.step===r-1,d=e.step===t,g=u?b:x,m=()=>{var c;(c=e.actionOnClick)==null||c.call(e),i()},O=c=>{c||s==null||s()};return o.jsx(A,{...e,counter:o.jsx("p",{className:j.counter,children:o.jsx(f,{id:"preply-ds.onboardingTour.counter",defaultMessage:"{currentStep} of {totalSteps}",description:"Onboarding tour step counter, e.g. '1 of 3'",values:{currentStep:t+1,totalSteps:r}})}),open:p&&d,onOpenChange:O,actionLabel:g,actionOnClick:m})},S=()=>{const n=l.createContext(null);return{Provider:t=>o.jsx(v,{...t,ctx:n}),Step:t=>o.jsx(_,{...t,ctx:n})}};try{S.displayName="createOnboardingTour",S.__docgenInfo={description:`Creates a new onboarding tour.
1
+ import{j as o}from"./jsx-runtime-BTJTZTIL.js";import{r as l}from"./index-Cb9e4tly.js";import{I as A}from"./OnboardingTooltip-S86JAVp1.js";import"./index-DSVnVYmz.js";import{M as f}from"./message-BqoANQez.js";const T="counter__ArBS-",j={counter:T},v=({totalSteps:n,nextActionLabel:e=o.jsx(f,{id:"preply-ds.onboardingTour.nextActionLabel",defaultMessage:"Next",description:"Onboarding tour next action label"}),completeActionLabel:a=o.jsx(f,{id:"preply-ds.onboardingTour.completeActionLabel",defaultMessage:"Got it",description:"Onboarding tour complete action label"}),onClose:t,onComplete:r,onStepChange:i,disabled:s,children:p,ctx:x})=>{const[b,u]=l.useState(!0),[d,g]=l.useState(0),c={totalSteps:n,nextActionLabel:e,completeActionLabel:a,onClose:()=>{u(!1),t==null||t()},active:!s&&b,currentStep:d,onActionClick:()=>{if(d===n-1)r==null||r(),u(!1);else{const h=d+1;g(h),i==null||i(h)}}};return o.jsx(x.Provider,{value:c,children:p})},_=({ctx:n,...e})=>{const a=l.useContext(n);if(!a)throw new Error("OnboardingTourContext not found");const{currentStep:t,totalSteps:r,onActionClick:i,onClose:s,active:p,nextActionLabel:x,completeActionLabel:b}=a,u=e.step===r-1,d=e.step===t,g=u?b:x,m=()=>{var c;(c=e.actionOnClick)==null||c.call(e),i()},O=c=>{c||s==null||s()};return o.jsx(A,{...e,counter:o.jsx("p",{className:j.counter,children:o.jsx(f,{id:"preply-ds.onboardingTour.counter",defaultMessage:"{currentStep} of {totalSteps}",description:"Onboarding tour step counter, e.g. '1 of 3'",values:{currentStep:t+1,totalSteps:r}})}),open:p&&d,onOpenChange:O,actionLabel:g,actionOnClick:m})},S=()=>{const n=l.createContext(null);return{Provider:t=>o.jsx(v,{...t,ctx:n}),Step:t=>o.jsx(_,{...t,ctx:n})}};try{S.displayName="createOnboardingTour",S.__docgenInfo={description:`Creates a new onboarding tour.
2
2
 
3
3
  This factory pattern allows multiple independent tours to be nested within each other
4
4
  without context conflicts, as each tour maintains its own separate context and state.`,displayName:"createOnboardingTour",props:{}}}catch{}export{S as c};
@@ -1,8 +1,8 @@
1
- import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as b}from"./index-B3evPFBL.js";import{c as x}from"./OnboardingTour-DdV7TN6M.js";import{T as n}from"./Text-BmdJVr9v.js";import{L as y}from"./LayoutFlex-BBGvSVMb.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./OnboardingTooltip-DVNAQjDc.js";import"./index-jPlWeKki.js";import"./PortalElementProvider-D4ltrA8j.js";import"./index-DRKYGVyc.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./Combination-CCYtWL8C.js";import"./tslib.es6-BntfKcQG.js";import"./index-DbgDZDus.js";import"./TokyoUIClose-DFIfVIfy.js";import"./Icon-ZIxauYsE.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-CpCJzpB9.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./Button-BSyqsKC5.js";import"./ButtonBase-Bdtn25V2.js";import"./Spinner-BCTJunNM.js";import"./useMergeRefs-CeyIhNgY.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";import"./Heading-ese4_5Hg.js";import"./text-centered-CznToR0o.js";import"./index-BfBdt3zW.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-CcWGHelY.js";import"./message-BraTJ16C.js";import"./layout-relative.module-ed9bC4H4.js";const l=t=>null,s=t=>null;try{l.displayName="OnboardingTourProvider",l.__docgenInfo={description:`For some reason, storybook fails to render arg tables for the components
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{r as b}from"./index-Cb9e4tly.js";import{c as x}from"./OnboardingTour-DdoL-ALr.js";import{T as n}from"./Text-CykvSLVe.js";import{L as y}from"./LayoutFlex-C3k4b85b.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./OnboardingTooltip-S86JAVp1.js";import"./index-DHRyQyAr.js";import"./PortalElementProvider-CgL8vj5o.js";import"./index-C6wF8VM1.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./Combination-Cz1uIyPJ.js";import"./tslib.es6-BntfKcQG.js";import"./index-QwIMrChO.js";import"./TokyoUIClose-thK8sk63.js";import"./Icon-CsnSNslb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-BT0Aq7PA.js";import"./componentNames-NXEPEzbR.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./Button-C5gzVt4K.js";import"./ButtonBase-D5O3MkG2.js";import"./Spinner-T-vTyHiv.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";import"./Heading-BLxyLk9f.js";import"./text-centered-CznToR0o.js";import"./index-DSVnVYmz.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-BzaHC9x5.js";import"./message-BqoANQez.js";import"./layout-relative.module-ChaXrVQQ.js";const l=t=>null,s=t=>null;try{l.displayName="OnboardingTourProvider",l.__docgenInfo={description:`For some reason, storybook fails to render arg tables for the components
2
2
  when they're created with the \`createOnboardingTour\` function.
3
3
 
4
4
  As a workaround, we're manually defining fake components with the same
5
- props as originals just for props parsing ¯\\_(ツ)_/¯`,displayName:"OnboardingTourProvider",props:{totalSteps:{defaultValue:null,description:"Total number of steps in the tour",name:"totalSteps",required:!0,type:{name:"number"}},nextActionLabel:{defaultValue:{value:'"Next"'},description:'Label for the "Next" action button',name:"nextActionLabel",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"}]}},completeActionLabel:{defaultValue:{value:'"Got it"'},description:'Label for the "Complete" action button',name:"completeActionLabel",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"}]}},disabled:{defaultValue:null,description:"Whether the tour is disabled",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClose:{defaultValue:null,description:"Called when the tour is closed",name:"onClose",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},onComplete:{defaultValue:null,description:"Called when the tour is completed",name:"onComplete",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},onStepChange:{defaultValue:null,description:"Called when the current step index changes",name:"onStepChange",required:!1,type:{name:"enum",value:[{value:"(step: number) => void"}]}}}}}catch{}try{s.displayName="OnboardingTourStep",s.__docgenInfo={description:"",displayName:"OnboardingTourStep",props:{dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},title:{defaultValue:null,description:"",name:"title",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"}]}},text:{defaultValue:null,description:"",name:"text",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"}]}},side:{defaultValue:null,description:"Preferred side of the tooltip to appear from. Use if default side might block important content.",name:"side",required:!1,type:{name:"enum",value:[{value:'"top"'},{value:'"right"'},{value:'"bottom"'},{value:'"left"'}]}},actionOnClick:{defaultValue:null,description:"By default, the action button closes the tooltip.\n\nProvide `actionOnClick` to also perform other action.",name:"actionOnClick",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},autoScroll:{defaultValue:{value:"true"},description:"If true, the tooltip will automatically scroll into view when it is opened.",name:"autoScroll",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},step:{defaultValue:null,description:"Zero-based step index",name:"step",required:!0,type:{name:"number"}}}}}catch{}const o=x(),se={title:"Components/OnboardingTour",component:l,subcomponents:{OnboardingTourStep:s},parameters:{docs:{story:{inline:!1,height:250},description:{component:"Are you looking for a tooltip to highlight single element? Check out [OnboardingTooltip](/docs/components-onboardingtooltip--docs)"}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},decorators:[t=>e.jsx("div",{style:{margin:"auto",width:"max-content"},children:t()})]},C=t=>[!1,!1],j=t=>i=>{},r=()=>{const[t,i]=C(),T=j();return e.jsxs(o.Provider,{totalSteps:3,disabled:i||t,onComplete:()=>T(!0),children:[e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:0,title:"Step 1",text:"This is the first step of the onboarding tour.",children:e.jsx(n,{children:"Step 1"})})}),e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:1,title:"Step 2",text:"This is the second step of the onboarding tour.",children:e.jsx(n,{children:"Step 2"})})}),e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:2,title:"Step 3",text:"This is the final step of the onboarding tour.",children:e.jsx(n,{children:"Step 3"})})})]})};r.storyName="OnboardingTour";const a=()=>{const[t,i]=b.useState(!0);return e.jsx(o.Provider,{totalSteps:3,children:e.jsxs(y,{gap:"12",children:[e.jsx(o.Step,{step:0,title:"First step",text:"This is the first step of the onboarding tour.",children:e.jsx(n,{children:"Step 1"})}),e.jsx(o.Step,{step:1,title:"Second step",text:"This is the second step of the onboarding tour.",actionOnClick:()=>i(!1),children:e.jsx(n,{children:"Step 2"})}),!t&&e.jsx(o.Step,{step:2,title:"Final step",text:"This is the final step of the onboarding tour.",children:e.jsx(n,{children:"Step 3 (I was hidden)"})})]})})};var u,p,d,c,m;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`() => {
5
+ props as originals just for props parsing ¯\\_(ツ)_/¯`,displayName:"OnboardingTourProvider",props:{totalSteps:{defaultValue:null,description:"Total number of steps in the tour",name:"totalSteps",required:!0,type:{name:"number"}},nextActionLabel:{defaultValue:{value:'"Next"'},description:'Label for the "Next" action button',name:"nextActionLabel",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"}]}},completeActionLabel:{defaultValue:{value:'"Got it"'},description:'Label for the "Complete" action button',name:"completeActionLabel",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"}]}},disabled:{defaultValue:null,description:"Whether the tour is disabled",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClose:{defaultValue:null,description:"Called when the tour is closed",name:"onClose",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},onComplete:{defaultValue:null,description:"Called when the tour is completed",name:"onComplete",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},onStepChange:{defaultValue:null,description:"Called when the current step index changes",name:"onStepChange",required:!1,type:{name:"enum",value:[{value:"(step: number) => void"}]}}}}}catch{}try{s.displayName="OnboardingTourStep",s.__docgenInfo={description:"",displayName:"OnboardingTourStep",props:{dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},title:{defaultValue:null,description:"",name:"title",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"}]}},side:{defaultValue:null,description:"Preferred side of the tooltip to appear from. Use if default side might block important content.",name:"side",required:!1,type:{name:"enum",value:[{value:'"top"'},{value:'"right"'},{value:'"bottom"'},{value:'"left"'}]}},text:{defaultValue:null,description:"",name:"text",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"}]}},actionOnClick:{defaultValue:null,description:"By default, the action button closes the tooltip.\n\nProvide `actionOnClick` to also perform other action.",name:"actionOnClick",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},autoScroll:{defaultValue:{value:"true"},description:"If true, the tooltip will automatically scroll into view when it is opened.",name:"autoScroll",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},step:{defaultValue:null,description:"Zero-based step index",name:"step",required:!0,type:{name:"number"}}}}}catch{}const o=x(),ue={title:"Components/OnboardingTour",component:l,subcomponents:{OnboardingTourStep:s},parameters:{docs:{story:{inline:!1,height:250},description:{component:"Are you looking for a tooltip to highlight single element? Check out [OnboardingTooltip](/docs/components-onboardingtooltip--docs)"}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},decorators:[t=>e.jsx("div",{style:{margin:"auto",width:"max-content"},children:t()})]},C=t=>[!1,!1],j=t=>i=>{},r=()=>{const[t,i]=C(),T=j();return e.jsxs(o.Provider,{totalSteps:3,disabled:i||t,onComplete:()=>T(!0),children:[e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:0,title:"Step 1",text:"This is the first step of the onboarding tour.",children:e.jsx(n,{children:"Step 1"})})}),e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:1,title:"Step 2",text:"This is the second step of the onboarding tour.",children:e.jsx(n,{children:"Step 2"})})}),e.jsx("div",{style:{height:250},children:e.jsx(o.Step,{step:2,title:"Step 3",text:"This is the final step of the onboarding tour.",children:e.jsx(n,{children:"Step 3"})})})]})};r.storyName="OnboardingTour";const a=()=>{const[t,i]=b.useState(!0);return e.jsx(o.Provider,{totalSteps:3,children:e.jsxs(y,{gap:"12",children:[e.jsx(o.Step,{step:0,title:"First step",text:"This is the first step of the onboarding tour.",children:e.jsx(n,{children:"Step 1"})}),e.jsx(o.Step,{step:1,title:"Second step",text:"This is the second step of the onboarding tour.",actionOnClick:()=>i(!1),children:e.jsx(n,{children:"Step 2"})}),!t&&e.jsx(o.Step,{step:2,title:"Final step",text:"This is the final step of the onboarding tour.",children:e.jsx(n,{children:"Step 3 (I was hidden)"})})]})})};var u,p,d,c,m;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`() => {
6
6
  const [wasTourCompleted, loading] = useIsFeatureActive('my-tour');
7
7
  const setTourCompleted = useToggleFeature('my-tour');
8
8
  return <Tour.Provider totalSteps={3} disabled={loading || wasTourCompleted} onComplete={() => setTourCompleted(true)}>
@@ -43,4 +43,4 @@ props as originals just for props parsing ¯\\_(ツ)_/¯`,displayName:"Onboardin
43
43
  </Tour.Step>}
44
44
  </LayoutFlex>
45
45
  </Tour.Provider>;
46
- }`,...(v=(f=a.parameters)==null?void 0:f.docs)==null?void 0:v.source},description:{story:"Sometimes you need to perform an intermediate action before the tour can continue (e.g. show a modal, switch a tab, etc.)\n\nYou can do this by using `actionOnClick` prop on the Tour.Step component.",...(S=(g=a.parameters)==null?void 0:g.docs)==null?void 0:S.description}}};const ue=["Default","WithIntermediateAction"];export{r as Default,a as WithIntermediateAction,ue as __namedExportsOrder,se as default};
46
+ }`,...(v=(f=a.parameters)==null?void 0:f.docs)==null?void 0:v.source},description:{story:"Sometimes you need to perform an intermediate action before the tour can continue (e.g. show a modal, switch a tab, etc.)\n\nYou can do this by using `actionOnClick` prop on the Tour.Step component.",...(S=(g=a.parameters)==null?void 0:g.docs)==null?void 0:S.description}}};const pe=["Default","WithIntermediateAction"];export{r as Default,a as WithIntermediateAction,pe as __namedExportsOrder,ue as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as h}from"./index-B3evPFBL.js";import{c as I}from"./OnboardingTour-DdV7TN6M.js";import{T as u}from"./Text-BmdJVr9v.js";import{B as m}from"./Button-BSyqsKC5.js";import{f as v,w as p,a as c,e as n,u as l}from"./index-DDyIDR-R.js";import{L as C}from"./LayoutFlex-BBGvSVMb.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./OnboardingTooltip-DVNAQjDc.js";import"./index-jPlWeKki.js";import"./PortalElementProvider-D4ltrA8j.js";import"./index-DRKYGVyc.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./Combination-CCYtWL8C.js";import"./tslib.es6-BntfKcQG.js";import"./index-DbgDZDus.js";import"./TokyoUIClose-DFIfVIfy.js";import"./Icon-ZIxauYsE.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-CpCJzpB9.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./Heading-ese4_5Hg.js";import"./text-centered-CznToR0o.js";import"./index-BfBdt3zW.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-CcWGHelY.js";import"./message-BraTJ16C.js";import"./ButtonBase-Bdtn25V2.js";import"./Spinner-BCTJunNM.js";import"./useMergeRefs-CeyIhNgY.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";import"./layout-relative.module-ed9bC4H4.js";const d=I(),kt={title:"Components/OnboardingTour/Tests",parameters:{layout:"centered",controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"],decorators:[i=>e.jsx("div",{style:{margin:"100px 0"},children:i()})],args:{onComplete:v(),onClose:v(),onStepChange:v()}},y={render:({onComplete:i,onStepChange:s})=>e.jsx(d.Provider,{totalSteps:3,nextActionLabel:"Next",completeActionLabel:"Got it",onComplete:i,onStepChange:s,children:e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(d.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})}),e.jsx(d.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"step-2"},children:e.jsx(u,{children:"Step 2 Content"})}),e.jsx(d.Step,{step:2,title:"Title",text:"Text",dataset:{testid:"step-3"},children:e.jsx(u,{children:"Step 3 Content"})})]})}),play:async({canvasElement:i,step:s,args:t})=>{const a=p(i);await s("First step should be visible initially",async()=>{await c(()=>{const o=a.getByTestId("step-1");n(o).toBeVisible()})}),await s("Click Next to advance to second step",async()=>{const r=p(a.getByTestId("step-1")).getByTestId("action");await l.click(r),await c(()=>{const T=a.getByTestId("step-2");n(T).toBeVisible(),n(t.onStepChange).toHaveBeenCalledWith(1)})}),await s("Click Next to advance to final step",async()=>{const r=p(a.getByTestId("step-2")).getByTestId("action");await l.click(r),await c(()=>{const T=a.getByTestId("step-3");n(T).toBeVisible(),n(t.onStepChange).toHaveBeenCalledWith(2)})}),await s("Complete tour",async()=>{const r=p(a.getByTestId("step-3")).getByTestId("action");await l.click(r),await c(()=>{const T=a.queryByTestId("step",{exact:!1});n(T).toBeNull(),n(t.onComplete).toHaveBeenCalled()})})}},x={render:({onClose:i})=>e.jsx(d.Provider,{totalSteps:2,nextActionLabel:"Next",completeActionLabel:"Got it",onClose:i,children:e.jsx(d.Step,{step:0,title:"First step",text:"Try closing this step",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})}),play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Step should be initially visible",async()=>{await c(()=>{const a=t.getByTestId("step-1");n(a).toBeVisible()})}),await s("Click close button to close tour",async({args:a})=>{const r=p(t.getByTestId("step-1")).getByTestId("close");await l.click(r),await c(()=>{const T=t.queryByTestId("step",{exact:!1});n(T).toBeNull(),n(a.onClose).toHaveBeenCalled()})})}},B={render:function(){const[s,t]=h.useState(!0);return e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(m,{onClick:()=>t(!s),dataset:{testid:"toggle-button"},children:s?"Enable Tour":"Disable Tour"}),e.jsx(d.Provider,{totalSteps:2,nextActionLabel:"Next",completeActionLabel:"Got it",disabled:s,children:e.jsx(d.Step,{step:0,title:"First step",text:"This step should be hidden when disabled",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})})]})},play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Tour should be initially disabled",async()=>{const a=t.queryByTestId("step-1");n(a).toBeNull()}),await s("Click enable button to show tour",async()=>{const a=t.getByTestId("toggle-button");await l.click(a),await c(()=>{const o=t.getByTestId("step-1");n(o).toBeVisible()})})}},g=I(),S=I(),w={render:function(){const[s,t]=h.useState(!1),[a,o]=h.useState(!1);return e.jsxs(g.Provider,{totalSteps:2,disabled:!s,nextActionLabel:"Next",completeActionLabel:"Got it",children:[e.jsx(g.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"outer-step-1"},children:e.jsx(m,{onClick:()=>t(!0),dataset:{testid:"start-outer-tour"},children:"Start outer tour"})}),e.jsxs(S.Provider,{totalSteps:2,disabled:!a,nextActionLabel:"Next",completeActionLabel:"Done",children:[e.jsx(g.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"outer-step-2"},children:e.jsx(u,{children:"Outer Tour Step"})}),e.jsx(S.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"inner-step-1"},children:e.jsx(m,{onClick:()=>o(!0),dataset:{testid:"start-inner-tour"},children:"Start inner tour"})}),e.jsx(S.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"inner-step-2"},children:e.jsx(u,{children:"Inner Tour Step"})})]})]})},play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Start inner tour, step 1 should be visible",async()=>{const a=t.getByTestId("start-inner-tour");await l.click(a),await c(async()=>{const o=t.queryByTestId("inner-step-1");n(o).toBeVisible()})}),await s("Advance inner tour, step 2 should be visible",async()=>{const o=p(t.getByTestId("inner-step-1")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("inner-step-2");n(r).toBeVisible()})}),await s("Complete inner tour",async()=>{const o=p(t.getByTestId("inner-step-2")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("inner-step-1",{exact:!1});n(r).toBeNull()})}),await s("Start outer tour, step 1 should be visible",async()=>{const a=t.getByTestId("start-outer-tour");await l.click(a),await c(async()=>{const o=t.queryByTestId("outer-step-1");n(o).toBeVisible()})}),await s("Advance outer tour, step 2 should be visible",async()=>{const o=p(t.getByTestId("outer-step-1")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("outer-step-2");n(r).toBeVisible()})}),await s("Complete outer tour",async()=>{const o=p(t.getByTestId("outer-step-2")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("-step-",{exact:!1});n(r).toBeNull()})})}};function W(i){return new Promise(s=>setTimeout(s,i))}const b={render:()=>e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(m,{children:"Click outside the tooltip"}),e.jsx(d.Provider,{totalSteps:1,nextActionLabel:"Next",completeActionLabel:"Got it",children:e.jsx(d.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})})]}),play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Step should be initially visible",async()=>{await c(()=>{const a=t.getByTestId("step-1");n(a).toBeVisible()})}),await s("Click outside the tooltip",()=>{const a=t.getByText("Click outside the tooltip");return l.click(a)}),await s("Wait for tooltip to be hidden",async()=>{await W(1e3);const a=t.getByTestId("step-1");n(a).toBeVisible()})}};var k,j,L;y.parameters={...y.parameters,docs:{...(k=y.parameters)==null?void 0:k.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{r as h}from"./index-Cb9e4tly.js";import{c as I}from"./OnboardingTour-DdoL-ALr.js";import{T as u}from"./Text-CykvSLVe.js";import{B as b}from"./Button-C5gzVt4K.js";import{f as v,w as p,a as c,e as n,u as l}from"./index-Ctq3gFTp.js";import{L as C}from"./LayoutFlex-C3k4b85b.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./OnboardingTooltip-S86JAVp1.js";import"./index-DHRyQyAr.js";import"./PortalElementProvider-CgL8vj5o.js";import"./index-C6wF8VM1.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./Combination-Cz1uIyPJ.js";import"./tslib.es6-BntfKcQG.js";import"./index-QwIMrChO.js";import"./TokyoUIClose-thK8sk63.js";import"./Icon-CsnSNslb.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-BT0Aq7PA.js";import"./componentNames-NXEPEzbR.js";import"./index-DdzHuZ-Y.js";import"./defaults-Clr6nbGc.js";import"./Heading-BLxyLk9f.js";import"./text-centered-CznToR0o.js";import"./index-DSVnVYmz.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-BzaHC9x5.js";import"./message-BqoANQez.js";import"./ButtonBase-D5O3MkG2.js";import"./Spinner-T-vTyHiv.js";import"./useMergeRefs-SFH7Mw4x.js";import"./useHostname-Y3PlXofY.js";import"./index-CC6DAVyL.js";import"./layout-relative.module-ChaXrVQQ.js";const d=I(),jt={title:"Components/OnboardingTour/Tests",parameters:{layout:"centered",controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"],decorators:[i=>e.jsx("div",{style:{margin:"100px 0"},children:i()})],args:{onComplete:v(),onClose:v(),onStepChange:v()}},y={render:({onComplete:i,onStepChange:s})=>e.jsx(d.Provider,{totalSteps:3,nextActionLabel:"Next",completeActionLabel:"Got it",onComplete:i,onStepChange:s,children:e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(d.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})}),e.jsx(d.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"step-2"},children:e.jsx(u,{children:"Step 2 Content"})}),e.jsx(d.Step,{step:2,title:"Title",text:"Text",dataset:{testid:"step-3"},children:e.jsx(u,{children:"Step 3 Content"})})]})}),play:async({canvasElement:i,step:s,args:t})=>{const a=p(i);await s("First step should be visible initially",async()=>{await c(()=>{const o=a.getByTestId("step-1");n(o).toBeVisible()})}),await s("Click Next to advance to second step",async()=>{const r=p(a.getByTestId("step-1")).getByTestId("action");await l.click(r),await c(()=>{const T=a.getByTestId("step-2");n(T).toBeVisible(),n(t.onStepChange).toHaveBeenCalledWith(1)})}),await s("Click Next to advance to final step",async()=>{const r=p(a.getByTestId("step-2")).getByTestId("action");await l.click(r),await c(()=>{const T=a.getByTestId("step-3");n(T).toBeVisible(),n(t.onStepChange).toHaveBeenCalledWith(2)})}),await s("Complete tour",async()=>{const r=p(a.getByTestId("step-3")).getByTestId("action");await l.click(r),await c(()=>{const T=a.queryByTestId("step",{exact:!1});n(T).toBeNull(),n(t.onComplete).toHaveBeenCalled()})})}},x={render:({onClose:i})=>e.jsx(d.Provider,{totalSteps:2,nextActionLabel:"Next",completeActionLabel:"Got it",onClose:i,children:e.jsx(d.Step,{step:0,title:"First step",text:"Try closing this step",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})}),play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Step should be initially visible",async()=>{await c(()=>{const a=t.getByTestId("step-1");n(a).toBeVisible()})}),await s("Click close button to close tour",async({args:a})=>{const r=p(t.getByTestId("step-1")).getByTestId("close");await l.click(r),await c(()=>{const T=t.queryByTestId("step",{exact:!1});n(T).toBeNull(),n(a.onClose).toHaveBeenCalled()})})}},B={render:function(){const[s,t]=h.useState(!0);return e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(b,{onClick:()=>t(!s),dataset:{testid:"toggle-button"},children:s?"Enable Tour":"Disable Tour"}),e.jsx(d.Provider,{totalSteps:2,nextActionLabel:"Next",completeActionLabel:"Got it",disabled:s,children:e.jsx(d.Step,{step:0,title:"First step",text:"This step should be hidden when disabled",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})})]})},play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Tour should be initially disabled",async()=>{const a=t.queryByTestId("step-1");n(a).toBeNull()}),await s("Click enable button to show tour",async()=>{const a=t.getByTestId("toggle-button");await l.click(a),await c(()=>{const o=t.getByTestId("step-1");n(o).toBeVisible()})})}},g=I(),S=I(),w={render:function(){const[s,t]=h.useState(!1),[a,o]=h.useState(!1);return e.jsxs(g.Provider,{totalSteps:2,disabled:!s,nextActionLabel:"Next",completeActionLabel:"Got it",children:[e.jsx(g.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"outer-step-1"},children:e.jsx(b,{onClick:()=>t(!0),dataset:{testid:"start-outer-tour"},children:"Start outer tour"})}),e.jsxs(S.Provider,{totalSteps:2,disabled:!a,nextActionLabel:"Next",completeActionLabel:"Done",children:[e.jsx(g.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"outer-step-2"},children:e.jsx(u,{children:"Outer Tour Step"})}),e.jsx(S.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"inner-step-1"},children:e.jsx(b,{onClick:()=>o(!0),dataset:{testid:"start-inner-tour"},children:"Start inner tour"})}),e.jsx(S.Step,{step:1,title:"Title",text:"Text",dataset:{testid:"inner-step-2"},children:e.jsx(u,{children:"Inner Tour Step"})})]})]})},play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Start inner tour, step 1 should be visible",async()=>{const a=t.getByTestId("start-inner-tour");await l.click(a),await c(async()=>{const o=t.queryByTestId("inner-step-1");n(o).toBeVisible()})}),await s("Advance inner tour, step 2 should be visible",async()=>{const o=p(t.getByTestId("inner-step-1")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("inner-step-2");n(r).toBeVisible()})}),await s("Complete inner tour",async()=>{const o=p(t.getByTestId("inner-step-2")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("inner-step-1",{exact:!1});n(r).toBeNull()})}),await s("Start outer tour, step 1 should be visible",async()=>{const a=t.getByTestId("start-outer-tour");await l.click(a),await c(async()=>{const o=t.queryByTestId("outer-step-1");n(o).toBeVisible()})}),await s("Advance outer tour, step 2 should be visible",async()=>{const o=p(t.getByTestId("outer-step-1")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("outer-step-2");n(r).toBeVisible()})}),await s("Complete outer tour",async()=>{const o=p(t.getByTestId("outer-step-2")).getByTestId("action");await l.click(o),await c(async()=>{const r=t.queryByTestId("-step-",{exact:!1});n(r).toBeNull()})})}};function W(i){return new Promise(s=>setTimeout(s,i))}const m={render:()=>e.jsxs(C,{gap:"24",direction:"column",children:[e.jsx(b,{children:"Click outside the tooltip"}),e.jsx(d.Provider,{totalSteps:1,nextActionLabel:"Next",completeActionLabel:"Got it",children:e.jsx(d.Step,{step:0,title:"Title",text:"Text",dataset:{testid:"step-1"},children:e.jsx(u,{children:"Step 1 Content"})})})]}),play:async({canvasElement:i,step:s})=>{const t=p(i);await s("Step should be initially visible",async()=>{await c(()=>{const a=t.getByTestId("step-1");n(a).toBeVisible()})}),await s("Click outside the tooltip",()=>{const a=t.getByText("Click outside the tooltip");return l.click(a)}),await s("Wait for tooltip to be hidden",async()=>{await W(1e3);const a=t.getByTestId("step-1");n(a).toBeVisible()})}};var k,j,L;y.parameters={...y.parameters,docs:{...(k=y.parameters)==null?void 0:k.docs,source:{originalSource:`{
2
2
  render: ({
3
3
  onComplete,
4
4
  onStepChange
@@ -243,7 +243,7 @@ import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as h}from"./index-B3evPFB
243
243
  });
244
244
  });
245
245
  }
246
- }`,...(q=(P=w.parameters)==null?void 0:P.docs)==null?void 0:q.source}}};var D,G,H;b.parameters={...b.parameters,docs:{...(D=b.parameters)==null?void 0:D.docs,source:{originalSource:`{
246
+ }`,...(q=(P=w.parameters)==null?void 0:P.docs)==null?void 0:q.source}}};var D,G,H;m.parameters={...m.parameters,docs:{...(D=m.parameters)==null?void 0:D.docs,source:{originalSource:`{
247
247
  render: () => {
248
248
  return <LayoutFlex gap="24" direction="column">
249
249
  <Button>Click outside the tooltip</Button>
@@ -277,4 +277,4 @@ import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as h}from"./index-B3evPFB
277
277
  expect(step1).toBeVisible();
278
278
  });
279
279
  }
280
- }`,...(H=(G=b.parameters)==null?void 0:G.docs)==null?void 0:H.source}}};const jt=["StepNavigation","Closing","Disabling","NestedTours","DoNotCloseOnInteractionOutside"];export{x as Closing,B as Disabling,b as DoNotCloseOnInteractionOutside,w as NestedTours,y as StepNavigation,jt as __namedExportsOrder,kt as default};
280
+ }`,...(H=(G=m.parameters)==null?void 0:G.docs)==null?void 0:H.source}}};const Lt=["StepNavigation","Closing","Disabling","NestedTours","DoNotCloseOnInteractionOutside"];export{x as Closing,B as Disabling,m as DoNotCloseOnInteractionOutside,w as NestedTours,y as StepNavigation,Lt as __namedExportsOrder,jt as default};
@@ -1,6 +1,6 @@
1
- import{j as a}from"./jsx-runtime-BYouaCF_.js";import{r as l}from"./index-B3evPFBL.js";import{F as H}from"./FormControl-CeIJk4_Z.js";import{F as L,a as I}from"./TokyoUIEye-BsOt8ZdC.js";import{F as M}from"./FieldButton-Bsa9_rJB.js";import{u as x,d as T}from"./index-BfBdt3zW.js";import{u as F}from"./useMergeRefs-BKVZOB6R.js";import{w as P}from"./componentNames-CpCJzpB9.js";import{I as k}from"./Input-C1hZX5_o.js";const r=T({reveal:{id:"preply-ds.password-field.reveal.button",defaultMessage:"Reveal password",description:'A11y label for the "reveal password" button. Will be announced by screen reader.'},conceal:{id:"preply-ds.password-field.conceal.button",defaultMessage:"Conceal password",description:'A11y label for the "conceal password" button. Will be announced by screen reader.'}}),s=l.forwardRef(function({id:o,label:d,description:m,error:p,required:c,inputDataset:f,dataset:v,hideLabel:y,onClick:h,hasError:b,useLegacyRequiredLabel:g,className:D,style:_,...q},E){const{formatMessage:n}=x(),[e,V]=l.useState(!1),t=l.useRef(null),w=F(t,E),C=e?"text":"password",R=()=>{var u;V(!e),(u=t.current)==null||u.focus()};return a.jsx(H,{id:o,label:d,description:m,error:p,hasError:b,required:c,dataset:v,hideLabel:y,onClick:h,useLegacyRequiredLabel:g,preplyDsComponent:P.PasswordField,children:a.jsx(k,{...q,type:C,ref:w,dataset:f,button:a.jsx(M,{onClick:R,svg:e?L:I,assistiveText:n(e?r.conceal:r.reveal),dataset:{testid:"toggle-password-button"}})})})});try{s.displayName="PasswordField",s.__docgenInfo={description:"",displayName:"PasswordField",props:{id:{defaultValue:null,description:`The id to be passed to the input element.
2
- If not provided, will be generated for accessibility purposes.`,name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<HTMLDivElement> & MouseEventHandler<HTMLInputElement>"}]}},error:{defaultValue:null,description:"Error message to display when the field has an invalid value.",name:"error",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"}]}},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"}]}},description:{defaultValue:null,description:`Additional descriptive text that appears below the input field
3
- to provide more context or instructions to the user.`,name:"description",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"}]}},hasError:{defaultValue:null,description:"Whether the field has an error.\n@deprecated Use `error` prop to exlicitly describe the error to users",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},required:{defaultValue:null,description:`Indicates if the field is required. When false, adds a "Optional"
4
- indicator next to the label.`,name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},useLegacyRequiredLabel:{defaultValue:null,description:`When true, adds a "Required" indicator next to the label for the required fields.
1
+ import{j as a}from"./jsx-runtime-BTJTZTIL.js";import{r as l}from"./index-Cb9e4tly.js";import{F as H}from"./FormControl-BBd1k1n3.js";import{F as L,a as I}from"./TokyoUIEye-CteyS9_g.js";import{F as M}from"./FieldButton-DkkntNzT.js";import{u as x,d as T}from"./index-DSVnVYmz.js";import{u as F}from"./useMergeRefs-D_RfOOSs.js";import{w as P}from"./componentNames-NXEPEzbR.js";import{I as k}from"./Input-MEZGWQfc.js";const r=T({reveal:{id:"preply-ds.password-field.reveal.button",defaultMessage:"Reveal password",description:'A11y label for the "reveal password" button. Will be announced by screen reader.'},conceal:{id:"preply-ds.password-field.conceal.button",defaultMessage:"Conceal password",description:'A11y label for the "conceal password" button. Will be announced by screen reader.'}}),s=l.forwardRef(function({id:o,label:d,description:m,error:p,required:c,inputDataset:f,dataset:v,hideLabel:y,onClick:h,hasError:b,useLegacyRequiredLabel:g,className:D,style:_,...q},E){const{formatMessage:n}=x(),[e,V]=l.useState(!1),t=l.useRef(null),w=F(t,E),C=e?"text":"password",R=()=>{var u;V(!e),(u=t.current)==null||u.focus()};return a.jsx(H,{id:o,label:d,description:m,error:p,hasError:b,required:c,dataset:v,hideLabel:y,onClick:h,useLegacyRequiredLabel:g,preplyDsComponent:P.PasswordField,children:a.jsx(k,{...q,type:C,ref:w,dataset:f,button:a.jsx(M,{onClick:R,svg:e?L:I,assistiveText:n(e?r.conceal:r.reveal),dataset:{testid:"toggle-password-button"}})})})});try{s.displayName="PasswordField",s.__docgenInfo={description:"",displayName:"PasswordField",props:{id:{defaultValue:null,description:`The id to be passed to the input element.
2
+ If not provided, will be generated for accessibility purposes.`,name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<HTMLDivElement> & MouseEventHandler<HTMLInputElement>"}]}},error:{defaultValue:null,description:"Error message to display when the field has an invalid value.",name:"error",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"}]}},description:{defaultValue:null,description:`Additional descriptive text that appears below the input field
3
+ to provide more context or instructions to the user.`,name:"description",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"}]}},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"}]}},required:{defaultValue:null,description:`Indicates if the field is required. When false, adds a "Optional"
4
+ indicator next to the label.`,name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},hasError:{defaultValue:null,description:"Whether the field has an error.\n@deprecated Use `error` prop to exlicitly describe the error to users",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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"}]}},useLegacyRequiredLabel:{defaultValue:null,description:`When true, adds a "Required" indicator next to the label for the required fields.
5
5
  When false, adds a "Optional" indicator next to the label for the optional fields instead.
6
- @deprecated This is a temporary solution for gradual migration to the "Optional" label.`,name:"useLegacyRequiredLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onCut:{defaultValue:null,description:"",name:"onCut",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<HTMLInputElement>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"(value: string) => void"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"string"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"string"}]}},autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"enum",value:[{value:'"off"'},{value:'"new-password"'},{value:'"current-password"'}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",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: HTMLInputElement | null) => void"},{value:"RefObject<HTMLInputElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{s as P};
6
+ @deprecated This is a temporary solution for gradual migration to the "Optional" label.`,name:"useLegacyRequiredLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onCut:{defaultValue:null,description:"",name:"onCut",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<HTMLInputElement>"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<HTMLInputElement>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<HTMLInputElement>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<HTMLInputElement>"}]}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"(value: string) => void"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"string"}]}},autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"enum",value:[{value:'"off"'},{value:'"new-password"'},{value:'"current-password"'}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",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: HTMLInputElement | null) => void"},{value:"RefObject<HTMLInputElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{s as P};