@preply/ds-docs 3.1.1-beta.6979b7215f74b2e5e56e968fa2f5aaabbd31e8a8.0 → 3.2.1-beta.e1ca8d950c2259f7fe86a7ffe9395453da82683d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{00.LayoutFlex.stories-Dx9Eo2na.js → 00.LayoutFlex.stories-Ct1A2OcS.js} +1 -1
- package/dist/assets/{00.applications-Ba4YPntv.js → 00.applications-DF2RWZUl.js} +1 -1
- package/dist/assets/{00.favicons.guide-CEbQqvPB.js → 00.favicons.guide-BYnh5GxE.js} +1 -1
- package/dist/assets/{00.token-explorer-MnmDHjjY.js → 00.token-explorer-wDtGkqes.js} +1 -1
- package/dist/assets/{00.using-responsive-props-DJ3dvefE.js → 00.using-responsive-props-CfJ_Hu29.js} +1 -1
- package/dist/assets/{01.semantic-tokens-DBqrJ-jx.js → 01.semantic-tokens-0q2PXQqY.js} +1 -1
- package/dist/assets/{01.using-shorthand-props-LQEggQSe.js → 01.using-shorthand-props-DlndLe5-.js} +1 -1
- package/dist/assets/10.Combinations.stories-CqZ-KAYR.js +144 -0
- package/dist/assets/{10.fonts.guide-C_gCE5op.js → 10.fonts.guide-DXxfQIdg.js} +1 -1
- package/dist/assets/{10.ssr-CsZenelp.js → 10.ssr-DcMxkdk_.js} +1 -1
- package/dist/assets/{11.languageFont.explorer-BCpfiOBe.js → 11.languageFont.explorer-BSpNjqbf.js} +29 -1
- package/dist/assets/{11.ssr.app-router-BJWwAZ26.js → 11.ssr.app-router-D5K1XX0o.js} +1 -1
- package/dist/assets/{20.libraries-B6VT80Rs.js → 20.libraries-ujiQiI9M.js} +1 -1
- package/dist/assets/30.icons.explorer-DsCNeZwo.js +73 -0
- package/dist/assets/{30.storybook-CHIRMUOu.js → 30.storybook-Co2X-28u.js} +1 -1
- package/dist/assets/{40.illustrations.explorer-BMJJAXhw.js → 40.illustrations.explorer-BSIzsuPL.js} +1 -1
- package/dist/assets/{90.advanced-BZBdNDoO.js → 90.advanced-BQOS_cDF.js} +1 -1
- package/dist/assets/{Accordion-DjdAaIAN.js → Accordion-DHA8vt9l.js} +3 -3
- package/dist/assets/{Accordion.stories-C-BlgFFJ.js → Accordion.stories-B8klL-Sx.js} +1 -1
- package/dist/assets/{Accordion.tests.stories-CwZAy27Z.js → Accordion.tests.stories-D_T4VFKy.js} +1 -1
- package/dist/assets/{AlertDialog.stories-D6ZXfVf9.js → AlertDialog.stories-DWU1YiOX.js} +1 -1
- package/dist/assets/{Avatar-D6BKQVaH.js → Avatar--Me1wFbM.js} +1 -1
- package/dist/assets/{Avatar-BkCAqOuF.js → Avatar-D_mKYr5W.js} +1 -1
- package/dist/assets/{Avatar.stories-DnjfAeSV.js → Avatar.stories-CGQDYNGY.js} +1 -1
- package/dist/assets/{AvatarWithStatus.stories-CocgTI5A.js → AvatarWithStatus.stories-5qjPY64Z.js} +1 -1
- package/dist/assets/{Badge.stories-DIY0Ixcn.js → Badge.stories-BwWKe78y.js} +1 -1
- package/dist/assets/{Box.stories-Tpzf5Ucy.js → Box.stories-D6l5F6RN.js} +1 -1
- package/dist/assets/{Button-klA2GCDX.js → Button-DWeSlYg5.js} +1 -1
- package/dist/assets/{Button-DUfN3a98.js → Button-iZiyzI_K.js} +1 -1
- package/dist/assets/{Button.stories-CN_LlUXT.js → Button.stories-DmUhFUlZ.js} +1 -1
- package/dist/assets/ButtonBase-CFf1N6e3.js +8 -0
- package/dist/assets/{Checkbox-4S94zrQG.js → Checkbox-DFXsEeAm.js} +3 -3
- package/dist/assets/{Checkbox.stories-LWdh97RT.js → Checkbox.stories-CSlo0rHA.js} +1 -1
- package/dist/assets/{Checkbox.tests.stories-B22nLUA0.js → Checkbox.tests.stories-D1GZnqns.js} +1 -1
- package/dist/assets/{Chips.stories-BF_eoQzy.js → Chips.stories-h1jc3y-m.js} +1 -1
- package/dist/assets/{Color-YHDXOIA2-DBEzfWUT.js → Color-YHDXOIA2-BQ6N6WB4.js} +1 -1
- package/dist/assets/{Dialog.stories-BDi5ubQi.js → Dialog.stories-Lc5K6cDs.js} +2 -2
- package/dist/assets/{DocsRenderer-CFRXHY34-DbNtKpKR.js → DocsRenderer-CFRXHY34-CJlAtJpz.js} +1 -1
- package/dist/assets/{FieldButton-xxvyfVcj.js → FieldButton-Dprr9FF4.js} +1 -1
- package/dist/assets/{FieldButton.stories-1kY40W8X.js → FieldButton.stories-BuA4NyAH.js} +1 -1
- package/dist/assets/FormControl-V3kzTeDQ.js +7 -0
- package/dist/assets/FormControl.stories-Ct6Ne2lK.js +67 -0
- package/dist/assets/{Heading-sy1TMpjs.js → Heading-BSlUFvxo.js} +1 -1
- package/dist/assets/{Heading.stories-mFaQtYkx.js → Heading.stories-CsCslhOn.js} +1 -1
- package/dist/assets/{Icon-zcBK8bUG.js → Icon-Clsj4XP8.js} +1 -1
- package/dist/assets/{Icon-C3PbN7-O.js → Icon-D-t6qc3n.js} +2 -2
- package/dist/assets/{Icon-RSC-C0ncJTUs.js → Icon-RSC-x5AbeL1b.js} +1 -1
- package/dist/assets/{Icon.stories-Dalhjiqr.js → Icon.stories-8mWdZCRL.js} +1 -1
- package/dist/assets/IconButton-Day2Q_gx.js +8 -0
- package/dist/assets/{Input-0F-H1v0g.js → Input-BZxJ9sXr.js} +8 -8
- package/dist/assets/InputContainer-Dq1Ks471.css +1 -0
- package/dist/assets/{IntegrationWithReactHookForm.stories-Xgh1APwf.js → IntegrationWithReactHookForm.stories-D1FHuitu.js} +1 -1
- package/dist/assets/{LayoutFlex-oRwI31fW.js → LayoutFlex-BxFOrEzC.js} +1 -1
- package/dist/assets/{LayoutFlex-DsiZkqdg.js → LayoutFlex-Dp29ojjO.js} +1 -1
- package/dist/assets/LayoutFlexItem-D4lQfjMe.js +1 -0
- package/dist/assets/{LayoutGrid-6cTmb1jX.js → LayoutGrid-D9R6yTYX.js} +1 -1
- package/dist/assets/LayoutGrid-mQT2ikS8.css +1 -0
- package/dist/assets/LayoutGrid.stories-Oj3NyUU9.js +88 -0
- package/dist/assets/{LayoutGridItem-CVWVBh65.js → LayoutGridItem-B1eMKElL.js} +1 -1
- package/dist/assets/{Link.stories-BUbS8oOg.js → Link.stories-SPeEvWm0.js} +2 -2
- package/dist/assets/{Loader.stories-CFBO-7A0.js → Loader.stories-C_wKZjOn.js} +1 -1
- package/dist/assets/NumberField-CsvE81sD.js +6 -0
- package/dist/assets/{NumberField.stories-DfMrC_B4.js → NumberField.stories-1xw8yRUE.js} +7 -7
- package/dist/assets/{ObserveIntersection-CvDmrhxS.js → ObserveIntersection-XIPHNpKf.js} +1 -1
- package/dist/assets/{ObserveIntersection.stories-CJbpJ7AX.js → ObserveIntersection.stories-B_5fq2at.js} +1 -1
- package/dist/assets/{OnboardingTooltip-Ga3yLAKq.js → OnboardingTooltip-DdKsKvSX.js} +1 -1
- package/dist/assets/{OnboardingTooltip.stories-CIGhxyVv.js → OnboardingTooltip.stories-DjNADlBZ.js} +1 -1
- package/dist/assets/{OnboardingTooltip.tests.stories-BvPnsOf9.js → OnboardingTooltip.tests.stories-BW_3X6lO.js} +1 -1
- package/dist/assets/{OnboardingTour-DQKAMwDc.js → OnboardingTour-DXebeIDU.js} +1 -1
- package/dist/assets/{OnboardingTour.stories-xCALGjaf.js → OnboardingTour.stories-B1qBQCoT.js} +2 -2
- package/dist/assets/{OnboardingTour.tests.stories-DWSurYty.js → OnboardingTour.tests.stories-D5sFfBoy.js} +1 -1
- package/dist/assets/PasswordField-BFqsWIfL.js +6 -0
- package/dist/assets/{PasswordField.stories-D9dJYf60.js → PasswordField.stories-Ym38la75.js} +7 -7
- package/dist/assets/{PreplyLogo.stories-fvYp72RZ.js → PreplyLogo.stories-WWHnC28y.js} +1 -1
- package/dist/assets/{ProgressBar.stories-BI9rP3Zp.js → ProgressBar.stories-DwuKojS2.js} +1 -1
- package/dist/assets/{ProgressSteps-CuGX9_Fy.js → ProgressSteps-ByDec2fC.js} +1 -1
- package/dist/assets/{ProgressSteps.stories-BU_NU70-.js → ProgressSteps.stories-C81QmlM3.js} +1 -1
- package/dist/assets/{SelectField-DO_tN6au.js → SelectField-eFXu65mo.js} +13 -11
- package/dist/assets/{SelectField.stories-C3t6Yxl3.js → SelectField.stories-D8G4fd5i.js} +8 -8
- package/dist/assets/{ShowOnIntersection.stories-B24bNVFn.js → ShowOnIntersection.stories-CewFYwQu.js} +1 -1
- package/dist/assets/{Steps-fLuKPowT.js → Steps-MniLzlHq.js} +1 -1
- package/dist/assets/{Steps.stories-DBs_xRfi.js → Steps.stories-DGO2z-va.js} +1 -1
- package/dist/assets/{Text-B2ZjNCft.js → Text-DrH34jFe.js} +1 -1
- package/dist/assets/{Text.stories-B-ZOJyPu.js → Text.stories-V04H05kK.js} +1 -1
- package/dist/assets/TextField-D2GlsmWF.css +1 -0
- package/dist/assets/TextField-sLGry01P.js +1 -0
- package/dist/assets/TextField-sd_-L-71.js +6 -0
- package/dist/assets/{TextField.stories-Ip_bkDJi.js → TextField.stories-t8AfTqkD.js} +8 -8
- package/dist/assets/{TextHighlighted-B7-aMGmA.js → TextHighlighted-CfvNH8PY.js} +1 -1
- package/dist/assets/{TextHighlighted.stories-B89Gaz6o.js → TextHighlighted.stories-BFdf3kg4.js} +1 -1
- package/dist/assets/{TextInline.stories-DIjSSfRF.js → TextInline.stories-ONslfKVR.js} +1 -1
- package/dist/assets/{TextareaField-DHX6IRnj.js → TextareaField-DZiXvoRu.js} +13 -11
- package/dist/assets/{TextareaField.stories-Ege4vMd6.js → TextareaField.stories-BU6VqRhF.js} +8 -8
- package/dist/assets/{Toast.stories-QJP8u4iK.js → Toast.stories-jpkXw21u.js} +1 -1
- package/dist/assets/TokyoUIUpload-Bi3CuQzX.js +1 -0
- package/dist/assets/{Tooltip-hS-9HVfR.js → Tooltip-DYI-etfB.js} +1 -1
- package/dist/assets/{Tooltip.stories-Cm3Jk-_z.js → Tooltip.stories-DJP6VJlB.js} +1 -1
- package/dist/assets/{Tooltip.tests.stories-B2Yi0UsK.js → Tooltip.tests.stories-B2QuXqrc.js} +1 -1
- package/dist/assets/{breakpoints-0LwK_FN1.js → breakpoints-85lK2y-I.js} +1 -1
- package/dist/assets/{breakpoints-DRwiRnv6.js → breakpoints-BEqIB9xc.js} +1 -1
- package/dist/assets/{breakpoints-C4n_KMrT.js → breakpoints-DwS8cENA.js} +1 -1
- package/dist/assets/{changelog-1NQYbIFt.js → changelog-CrXzEvv7.js} +217 -205
- package/dist/assets/componentNames-Ba2ybP0W.js +1 -0
- package/dist/assets/{entry-preview-DgGa73bN.js → entry-preview-Dzuqoehc.js} +1 -1
- package/dist/assets/{getTokenVar-D3MUAgiO.js → getTokenVar-DfKyS0UW.js} +1 -1
- package/dist/assets/{hover-BkT97PXl.js → hover-DB9eaNzq.js} +1 -1
- package/dist/assets/{hover-Dq9rs4PT.js → hover-DO3lln9i.js} +1 -1
- package/dist/assets/{hover-Bv8Xc9G4.js → hover-rB8_XalK.js} +1 -1
- package/dist/assets/{iframe-x6BLg8Ji.js → iframe-CH-2Z4nW.js} +2 -2
- package/dist/assets/{index-DcOf5IFN.js → index-B_TkxWnH.js} +3 -3
- package/dist/assets/{index-CkEIPWib.js → index-HAtd9oNV.js} +1 -1
- package/dist/assets/{intro-CmrRtjLH.js → intro-CciujqaN.js} +1 -1
- package/dist/assets/layout-relative-BpJIh3YK.js +1 -0
- package/dist/assets/{migrating-from-less-CT230F26.js → migrating-from-less-CGun5jvS.js} +1 -1
- package/dist/assets/{playground-DBdZFxjC.css → playground-CCc6VR51.css} +1 -1
- package/dist/assets/{playground.stories-BhNG8Jgk.js → playground.stories-BMZQjPeS.js} +165 -165
- package/dist/assets/{preview-B1OsNris.js → preview-BA-z4dIb.js} +1 -1
- package/dist/assets/{preview-BEN5riSB.js → preview-CHRa9X89.js} +2 -2
- package/dist/assets/{preview-bLfHbFFi.js → preview-LLpb0wxd.js} +1 -1
- package/dist/assets/{tokens-i5BvqP2o.js → tokens-BAMxrvDv.js} +1 -1
- package/dist/assets/{tokens-I3xjhSDE.js → tokens-DoHds4Ot.js} +1 -1
- package/dist/assets/{tokens-DXy5hgn5.js → tokens-ZvFzTwDp.js} +1 -1
- package/dist/assets/{tokens-DjbFHayV.js → tokens-fQ3N2FTe.js} +1 -1
- package/dist/assets/{usePortalElement-tDzOwrOb.js → usePortalElement-Da1mB7Zi.js} +1 -1
- package/dist/assets/{welcome-BWP0gVfw.js → welcome-ChAggYgg.js} +1 -1
- package/dist/assets/{zeroheight-s8Fk0iPU.js → zeroheight-BDcQqTlz.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +987 -1083
- package/dist/project.json +1 -1
- package/package.json +3 -3
- package/dist/assets/10.Combinations.stories-Wf-NooK0.js +0 -144
- package/dist/assets/30.icons.explorer-DZ1EsBtj.js +0 -73
- package/dist/assets/ButtonBase-CiON5Gq9.js +0 -8
- package/dist/assets/CountryFlag-BEP02NMP.js +0 -48
- package/dist/assets/CountryFlag-p-8M_k5M.css +0 -1
- package/dist/assets/Flag.stories-BZC_j8i9.js +0 -110
- package/dist/assets/Flag.test.stories-Dqy18PgD.js +0 -27
- package/dist/assets/FormControl-DD3JEwg1.js +0 -5
- package/dist/assets/FormControl.stories-DoVURnEB.js +0 -46
- package/dist/assets/IconButton-D0fGiRmb.js +0 -8
- package/dist/assets/InputContainer-DNEgpOcG.css +0 -1
- package/dist/assets/LayoutFlexItem-RxfNp994.js +0 -1
- package/dist/assets/LayoutGrid.stories-CAvHZzVw.js +0 -88
- package/dist/assets/LayoutGridItem-AvP_ZkC5.js +0 -1
- package/dist/assets/LayoutGridItem-Dy4Q8woN.css +0 -1
- package/dist/assets/NumberField-_XVLeKUg.js +0 -4
- package/dist/assets/PasswordField-KGypENg3.js +0 -4
- package/dist/assets/TextField-872WjatY.js +0 -1
- package/dist/assets/TextField-DdvdZqgn.css +0 -1
- package/dist/assets/TextField-DnZQU85b.js +0 -4
- package/dist/assets/align-self-BM6l9H5Z.js +0 -1
- package/dist/assets/componentNames-CVVyamkx.js +0 -1
- /package/dist/assets/{InputContainer-C1TOTxt4.js → InputContainer-Bk0tgFnW.js} +0 -0
- /package/dist/assets/{align-self-C4ATemga.css → layout-relative-C4ATemga.css} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as n}from"./index-uOP2uDdf.js";import{M as s}from"./index-
|
1
|
+
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as n}from"./index-uOP2uDdf.js";import{M as s}from"./index-B_TkxWnH.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CH-2Z4nW.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function t(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...n(),...r.components};return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Guides/Installation/Storybook"}),`
|
2
2
|
`,o.jsx(e.h1,{id:"installation-storybook",children:"Installation: Storybook"}),`
|
3
3
|
`,o.jsxs(e.p,{children:["This guide applies to Storybook setups that document Preply components libraries, and assumes you have read and followed the steps outlined in the ",o.jsx(e.a,{href:"/story/guides-installation-libraries--page",children:"Installation: Libaries"})," guide."]}),`
|
4
4
|
`,o.jsx(e.h2,{id:"packages",children:"Packages"}),`
|
package/dist/assets/{40.illustrations.explorer-BMJJAXhw.js → 40.illustrations.explorer-BSIzsuPL.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as t}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as l}from"./index-uOP2uDdf.js";import{M as a}from"./index-
|
1
|
+
import{j as t}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as l}from"./index-uOP2uDdf.js";import{M as a}from"./index-B_TkxWnH.js";import{L as e}from"./LayoutGrid-D9R6yTYX.js";import{d as c}from"./styled-components.browser.esm-CwsnEFnS.js";import{g as i}from"./getTokenVar-DU_DEzTd.js";import{s as u,c as p}from"./tokens-ZvFzTwDp.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CH-2Z4nW.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";import"./classNames-BUL1Zq7e.js";import"./breakpoints-BfMlrtxE.js";import"./layout-relative.module-1z75aSwo-DNAR_Nv2.js";import"./constants-DYYVurUY.js";import"./defaults-B1rzzf6M.js";import"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Ba2ybP0W.js";import"./constants-BgBLeZzp.js";const n=["https://static.preply.com/ds/illustrations/tokyo-ui/airplain.svg","https://static.preply.com/ds/illustrations/tokyo-ui/arrows-multiple.svg","https://static.preply.com/ds/illustrations/tokyo-ui/artist.svg","https://static.preply.com/ds/illustrations/tokyo-ui/awesome.svg","https://static.preply.com/ds/illustrations/tokyo-ui/back-to-school.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bar-graph.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bell.svg","https://static.preply.com/ds/illustrations/tokyo-ui/booking-a-lesson.svg","https://static.preply.com/ds/illustrations/tokyo-ui/books-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/books.svg","https://static.preply.com/ds/illustrations/tokyo-ui/brain.svg","https://static.preply.com/ds/illustrations/tokyo-ui/browser-permissions-chromium.svg","https://static.preply.com/ds/illustrations/tokyo-ui/browser-permissions-safari.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bubbles.svg","https://static.preply.com/ds/illustrations/tokyo-ui/calendar.svg","https://static.preply.com/ds/illustrations/tokyo-ui/calendar-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/checkmark.svg","https://static.preply.com/ds/illustrations/tokyo-ui/clock.svg","https://static.preply.com/ds/illustrations/tokyo-ui/clocks.svg","https://static.preply.com/ds/illustrations/tokyo-ui/coins.svg","https://static.preply.com/ds/illustrations/tokyo-ui/committed.svg","https://static.preply.com/ds/illustrations/tokyo-ui/confetti.svg","https://static.preply.com/ds/illustrations/tokyo-ui/cosmopolite.svg","https://static.preply.com/ds/illustrations/tokyo-ui/desk.svg","https://static.preply.com/ds/illustrations/tokyo-ui/desk-supplies.svg","https://static.preply.com/ds/illustrations/tokyo-ui/discount-badge.svg","https://static.preply.com/ds/illustrations/tokyo-ui/disco-ball.svg","https://static.preply.com/ds/illustrations/tokyo-ui/dog.svg","https://static.preply.com/ds/illustrations/tokyo-ui/first-steps.svg","https://static.preply.com/ds/illustrations/tokyo-ui/game-on.svg","https://static.preply.com/ds/illustrations/tokyo-ui/getting-started-down.svg","https://static.preply.com/ds/illustrations/tokyo-ui/getting-started.svg","https://static.preply.com/ds/illustrations/tokyo-ui/globe-spot.svg","https://static.preply.com/ds/illustrations/tokyo-ui/great-homework.svg","https://static.preply.com/ds/illustrations/tokyo-ui/growth.svg","https://static.preply.com/ds/illustrations/tokyo-ui/guitar.svg","https://static.preply.com/ds/illustrations/tokyo-ui/hard-work-1.svg","https://static.preply.com/ds/illustrations/tokyo-ui/hard-work-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/heart.svg","https://static.preply.com/ds/illustrations/tokyo-ui/it-guru.svg","https://static.preply.com/ds/illustrations/tokyo-ui/lamp-and-books.svg","https://static.preply.com/ds/illustrations/tokyo-ui/language-flash-cards.svg","https://static.preply.com/ds/illustrations/tokyo-ui/laptop.svg","https://static.preply.com/ds/illustrations/tokyo-ui/laptop-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/making-progress.svg","https://static.preply.com/ds/illustrations/tokyo-ui/map.svg","https://static.preply.com/ds/illustrations/tokyo-ui/meeting-with-tutor-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/meeting-with-tutor.svg","https://static.preply.com/ds/illustrations/tokyo-ui/messages.svg","https://static.preply.com/ds/illustrations/tokyo-ui/messaging.svg","https://static.preply.com/ds/illustrations/tokyo-ui/mobile-app.svg","https://static.preply.com/ds/illustrations/tokyo-ui/notes.svg","https://static.preply.com/ds/illustrations/tokyo-ui/open-book.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pause-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pencil-and-pen-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pencil-and-pen.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pig.svg","https://static.preply.com/ds/illustrations/tokyo-ui/play-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot-pink.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot.svg","https://static.preply.com/ds/illustrations/tokyo-ui/present.svg","https://static.preply.com/ds/illustrations/tokyo-ui/professional.svg","https://static.preply.com/ds/illustrations/tokyo-ui/progress-steps.svg","https://static.preply.com/ds/illustrations/tokyo-ui/rising-arrows.svg","https://static.preply.com/ds/illustrations/tokyo-ui/rock-on.svg","https://static.preply.com/ds/illustrations/tokyo-ui/routine-master.svg","https://static.preply.com/ds/illustrations/tokyo-ui/serious-learner.svg","https://static.preply.com/ds/illustrations/tokyo-ui/sheet.svg","https://static.preply.com/ds/illustrations/tokyo-ui/smiley.svg","https://static.preply.com/ds/illustrations/tokyo-ui/speech-bubble.svg","https://static.preply.com/ds/illustrations/tokyo-ui/star_coin.svg","https://static.preply.com/ds/illustrations/tokyo-ui/stop-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/stopwatch.svg","https://static.preply.com/ds/illustrations/tokyo-ui/system-permissions.svg","https://static.preply.com/ds/illustrations/tokyo-ui/testing-the-water.svg","https://static.preply.com/ds/illustrations/tokyo-ui/three-arrows.svg","https://static.preply.com/ds/illustrations/tokyo-ui/thumbs-up.svg","https://static.preply.com/ds/illustrations/tokyo-ui/you-did-great-today.svg","https://static.preply.com/ds/illustrations/tokyo-ui/warning.svg"],y=c.div`
|
2
2
|
padding: ${i(u[12])};
|
3
3
|
-webkit-background-size: 50px 50px;
|
4
4
|
-moz-background-size: 50px 50px;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as t}from"./index-uOP2uDdf.js";import{M as i}from"./index-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as t}from"./index-uOP2uDdf.js";import{M as i}from"./index-B_TkxWnH.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CH-2Z4nW.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function r(n){const o={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",...t(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Guides/Installation/Advanced"}),`
|
2
2
|
`,e.jsx(o.h1,{id:"installation-advanced",children:"Installation: Advanced"}),`
|
3
3
|
`,e.jsxs(o.p,{children:["This page is about rolling out your own alternative to ",e.jsx(o.code,{children:"<RootProvider/>"})," (advanced usage)."]}),`
|
4
4
|
`,e.jsxs(o.p,{children:["If you are looking for how to install, refer to the ",e.jsx(o.a,{href:"/story/guides-installation-applications--page",children:"installation guides"})," instead."]}),`
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import{j as r}from"./jsx-runtime-BYouaCF_.js";import{r as o}from"./index-B3evPFBL.js";import{F as y}from"./TokyoUIExpand-DThzqohx.js";import{I as A}from"./Icon-
|
2
|
-
@example <Accordion dataset={{ 'qa-id': 'benefits' }} /> // will add data-qa-id="benefits" to the HTML element.`,name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},"aria-label":{defaultValue:null,description:`Defines a string value that labels the current element.
|
3
|
-
@see aria-labelledby.`,name:"aria-label",required:!1,type:{name:"enum",value:[{value:"string"}]}}
|
1
|
+
import{j as r}from"./jsx-runtime-BYouaCF_.js";import{r as o}from"./index-B3evPFBL.js";import{F as y}from"./TokyoUIExpand-DThzqohx.js";import{I as A}from"./Icon-D-t6qc3n.js";import{T as f}from"./Text-DrH34jFe.js";import{u as g}from"./useMergeRefs-CeyIhNgY.js";import{g as s}from"./index-DdzHuZ-Y.js";import{w as _}from"./componentNames-Ba2ybP0W.js";const w="accordion__OKb-C",p={accordion:w,"--dsInternalSimulation-focus":"_--dsInternalSimulation-focus__7V0NR","--dsInternalSimulation-noAnimation":"_--dsInternalSimulation-noAnimation__nuNUW"};function I({ref:n,onOpenChange:e}){const t=o.useRef(null),l=g(t,n);return o.useEffect(()=>{if(!t.current)return;const a=t.current,i=()=>{e==null||e(a.open)};return a&&a.addEventListener("toggle",i),()=>{a&&a.removeEventListener("toggle",i)}},[e]),{mergedRef:e||n?l:null}}const c=({dataset:n,children:e,"aria-label":t})=>r.jsx("div",{className:p.accordion,"aria-label":t,"data-preply-ds-component":_.Accordion,...s(n),children:e}),u=o.forwardRef(function({open:e,name:t,dataset:l,children:a,onOpenChange:i,dsInternalSimulation:v},b){const{mergedRef:h}=I({ref:b,onOpenChange:i});return r.jsx("details",{ref:h,name:t,open:e,...s(l),className:p[`--dsInternalSimulation-${v}`],children:a})}),d=o.forwardRef(function({dataset:e,children:t,onClick:l},a){return r.jsxs("summary",{ref:a,...s(e),onClick:l,children:[r.jsx(f,{variant:"default-semibold",children:t}),r.jsx(A,{svg:y})]})}),m=o.forwardRef(function({dataset:e,children:t},l){return r.jsx(f,{tag:"div",variant:"small-regular",ref:l,...s(e),children:t})});try{c.displayName="Accordion",c.__docgenInfo={description:"An Accordion container.\n\nAdd `AccordionItem` children to render a list of disclosable contents.",displayName:"Accordion",props:{dataset:{defaultValue:null,description:`Sets data attributes on the DOM element.
|
2
|
+
@example <Accordion dataset={{ 'qa-id': 'benefits' }} /> // will add data-qa-id="benefits" to the HTML element.`,name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},"aria-label":{defaultValue:null,description:`Defines a string value that labels the current element.
|
3
|
+
@see aria-labelledby.`,name:"aria-label",required:!1,type:{name:"enum",value:[{value:"string"}]}}}}}catch{}try{u.displayName="AccordionItem",u.__docgenInfo={description:"A single `Accordion` item, the wrapper of AccordionHeader and AccordionContent.",displayName:"AccordionItem",props:{"aria-label":{defaultValue:null,description:`Defines a string value that labels the current element.
|
4
4
|
@see aria-labelledby.`,name:"aria-label",required:!1,type:{name:"enum",value:[{value:"string"}]}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},"aria-labelledby":{defaultValue:null,description:`Identifies the element (or elements) that labels the current element.
|
5
5
|
@see aria-describedby.`,name:"aria-labelledby",required:!1,type:{name:"enum",value:[{value:"string"}]}},"aria-describedby":{defaultValue:null,description:`Identifies the element (or elements) that describes the object.
|
6
6
|
@see aria-labelledby`,name:"aria-describedby",required:!1,type:{name:"enum",value:[{value:"string"}]}},onOpenChange:{defaultValue:null,description:"Called whenever the users open/close the Accordion item (mapped to the internal HTML Details's\n`toggle` event).",name:"onOpenChange",required:!1,type:{name:"enum",value:[{value:"(open: boolean) => void"}]}},name:{defaultValue:null,description:`Allows to create exclusive Accordions. Just pass the same \`name\` to all the AccordionItem
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{A as r,a as n,b as t,c as o}from"./Accordion-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{A as r,a as n,b as t,c as o}from"./Accordion-DHA8vt9l.js";import{T as u}from"./Text-DrH34jFe.js";import{H as T}from"./Heading-BSlUFvxo.js";import{B as W}from"./Button-iZiyzI_K.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./TokyoUIExpand-DThzqohx.js";import"./Icon-D-t6qc3n.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-CeyIhNgY.js";import"./text-centered-CznToR0o.js";import"./ButtonBase-CFf1N6e3.js";import"./Spinner-BCTJunNM.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";const ne={title:"components/Accordion",component:r,args:{}},s={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsx(o,{children:"Of course it is!"})]}),e.jsxs(n,{children:[e.jsx(t,{children:"Why?"}),e.jsx(o,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})}},a={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsx(o,{children:"Of course it is!"})]}),e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Why?"}),e.jsx(o,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})}},c={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(t,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."}),e.jsx(o,{children:"Lorem ipsum"})]}),e.jsxs(n,{children:[e.jsx(t,{children:"Lorem ipsum"}),e.jsx(o,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})]}),e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."}),e.jsx(o,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})]})]})}},d={render:function(){return e.jsx(r,{children:e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsxs(o,{children:[e.jsx(T,{variant:"large",tag:"div",children:"Yes!"}),e.jsx(u,{variant:"large-regular-italic",children:"What are you waiting for?"}),e.jsx(W,{children:"Book a lesson now!"})]})]})})}},l={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{name:"choose-subscription-duration",children:[e.jsx(t,{children:"Two-week subscription"}),e.jsx(o,{children:"We will charge you every two weeks."})]}),e.jsxs(n,{name:"choose-subscription-duration",children:[e.jsx(t,{children:"Four-week subscription"}),e.jsx(o,{children:"We will charge you every four weeks."})]})]})}},p={render:function(){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(u,{variant:"default-regular-italic",children:"closed"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]}),e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(u,{variant:"default-regular-italic",children:"open"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]}),e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(u,{variant:"default-regular-italic",children:"focus"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{dsInternalSimulation:"focus",children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]})]})}};var m,h,y;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
2
2
|
render: function Story() {
|
3
3
|
return <Accordion>
|
4
4
|
<AccordionItem>
|
package/dist/assets/{Accordion.tests.stories-CwZAy27Z.js → Accordion.tests.stories-D_T4VFKy.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{f as J,w as K,e as o,u as i,a as f}from"./index-DDyIDR-R.js";import{A as d,a as s,b as c,c as l}from"./Accordion-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{f as J,w as K,e as o,u as i,a as f}from"./index-DDyIDR-R.js";import{A as d,a as s,b as c,c as l}from"./Accordion-DHA8vt9l.js";import{c as M}from"./OnboardingTour-DXebeIDU.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./TokyoUIExpand-DThzqohx.js";import"./Icon-D-t6qc3n.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./Text-DrH34jFe.js";import"./text-centered-CznToR0o.js";import"./useMergeRefs-CeyIhNgY.js";import"./OnboardingTooltip-DdKsKvSX.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"./Button-iZiyzI_K.js";import"./ButtonBase-CFf1N6e3.js";import"./Spinner-BCTJunNM.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";import"./Heading-BSlUFvxo.js";import"./index-BfBdt3zW.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./shared-strings-CcWGHelY.js";import"./message-BraTJ16C.js";const Pe={title:"Components/Accordion/Tests",component:d,parameters:{controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"]},m={render:function(){return e.jsx(d,{"aria-label":"accordionLabel",children:e.jsxs(s,{children:[e.jsx(c,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvasElement:n})=>{const r=K(n).getByLabelText("accordionLabel");o(r).toBeVisible()}},y={args:{},render:function(){return e.jsxs(d,{children:[e.jsxs(s,{children:[e.jsx(c,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]}),e.jsxs(s,{children:[e.jsx(c,{children:"Why?"}),e.jsx(l,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})},play:async({canvas:n,step:t})=>{const r=n.getByText("Is Preply the best platform for learning a language?"),a=n.getByText("Of course it is!"),u=n.getByText("Why?"),p=n.getByText("If you are wondering, it means you have not tried it out yet!");await t("Contents are hidden",async()=>{o(a).not.toBeVisible(),o(p).not.toBeVisible()}),await t("Content 1 is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content 2 is revelable",async()=>{await i.click(u),o(p).toBeVisible()}),await t("Both contents are visible (non-exclusivity check)",async()=>{o(a).toBeVisible(),o(p).toBeVisible()}),await t("Item 1 is hidable",async()=>{await i.click(r),o(a).not.toBeVisible()}),await t("Item 2 is hidable",async()=>{await i.click(u),o(p).not.toBeVisible()})}},g={args:{},render:function(){return e.jsx(d,{children:e.jsxs(s,{dsInternalSimulation:"noAnimation",children:[e.jsx(c,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,step:t})=>{const r=n.getByText("Is Preply the best platform for learning a language?"),a=n.getByText("Of course it is!");await t("Contents are hidden",async()=>{o(a).not.toBeVisible()}),await t("Content is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content is hidable",async()=>{await i.click(r),o(a).not.toBeVisible()})}},h={args:{},render:function(){return e.jsxs(d,{children:[e.jsxs(s,{name:"choose-subscription-duration",children:[e.jsx(c,{children:"Two-week subscription"}),e.jsx(l,{children:"We will charge you every two weeks."})]}),e.jsxs(s,{name:"choose-subscription-duration",children:[e.jsx(c,{children:"Four-week subscription"}),e.jsx(l,{children:"We will charge you every four weeks."})]})]})},play:async({canvas:n,step:t})=>{const r=n.getByText("Two-week subscription"),a=n.getByText("We will charge you every two weeks."),u=n.getByText("Four-week subscription"),p=n.getByText("We will charge you every four weeks.");await t("Contents are hidden",async()=>{o(a).not.toBeVisible(),o(p).not.toBeVisible()}),await t("Content 1 is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content 2 is revelable",async()=>{await i.click(u),o(p).toBeVisible()}),await t("Item 1 is hidden",async()=>{o(a).not.toBeVisible()})}},b={args:{onOpenChange:J()},render:function(t){return e.jsx(d,{children:e.jsxs(s,{onOpenChange:t.onOpenChange,children:[e.jsx(c,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,args:t,step:r})=>{const a=n.getByText("Is Preply the best platform for learning a language?");await r("onOpenChange is not called",async()=>{o(t.onOpenChange).not.toBeCalled()}),await r("onOpenChange is called with true",async()=>{await i.click(a),o(t.onOpenChange).toBeCalledWith(!0)}),await r("onOpenChange is called with false",async()=>{await i.click(a),o(t.onOpenChange).toBeCalledWith(!1)})}},w={args:{onClick:J()},render:function(t){return e.jsx(d,{children:e.jsxs(s,{children:[e.jsx(c,{onClick:t.onClick,children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,args:t,step:r})=>{const a=n.getByText("Is Preply the best platform for learning a language?");await r("onClick is not called",async()=>{o(t.onClick).not.toBeCalled()}),await r("onClick is called",async()=>{await i.click(a),o(t.onClick).toBeCalled()})}},x={render:function(){return e.jsx(d,{"aria-label":"accordion",dataset:{foo:1},children:e.jsxs(s,{dataset:{"qa-id":"firstItem"},children:[e.jsx(c,{dataset:{"qa-id":"firstItemHeader"},children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{dataset:{"qa-id":"firstItemContent"},children:"Yes!"})]})})},play:async({canvas:n})=>{const t=n.getByLabelText("accordion");o(t).toHaveAttribute("data-foo","1")}},C={parameters:{a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},render:function(){const t=M();return e.jsx(t.Provider,{totalSteps:2,children:e.jsxs(d,{children:[e.jsx(t.Step,{step:0,title:"Step 1",text:"Ensure you can answer this question",children:e.jsxs(s,{children:[e.jsx(c,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})}),e.jsx(t.Step,{step:1,title:"Step 2",text:"Push them to try Preply out!",children:e.jsxs(s,{children:[e.jsx(c,{children:"Why?"}),e.jsx(l,{children:"If you are wondering, it means you have not tried it out yet!"})]})})]})})},play:async({canvasElement:n,step:t})=>{const r=K(n);await t("Step 1 should be visible",async()=>{await f(()=>{const a=r.getByText("Ensure you can answer this question");o(a).toBeVisible()})}),await t("Click Next",async()=>{const a=r.getByRole("button",{name:"Next"});await i.click(a)}),await t("Step 2 should be visible",async()=>{await f(()=>{const a=r.getByText("Ensure you can answer this question");o(a).toBeVisible()})})}};var A,B,v;m.parameters={...m.parameters,docs:{...(A=m.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
2
2
|
render: function Story() {
|
3
3
|
return <Accordion aria-label="accordionLabel">
|
4
4
|
<AccordionItem>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as i}from"./index-B3evPFBL.js";import{u as _,a as N,e as y}from"./index-DDyIDR-R.js";import{a as s}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{R as V,P as q,O as W,C as L,T as X,D as J,a as G,A as H,b as Y}from"./index-BYp7dUfi.js";import{H as Z}from"./Heading-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as i}from"./index-B3evPFBL.js";import{u as _,a as N,e as y}from"./index-DDyIDR-R.js";import{a as s}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{R as V,P as q,O as W,C as L,T as X,D as J,a as G,A as H,b as Y}from"./index-BYp7dUfi.js";import{H as Z}from"./Heading-BSlUFvxo.js";import{B as l}from"./Button-iZiyzI_K.js";import{g as K}from"./PortalElementProvider-D4ltrA8j.js";import{g as M}from"./index-DdzHuZ-Y.js";import{w as Q}from"./componentNames-Ba2ybP0W.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./index-DRKYGVyc.js";import"./index-wFyje0se.js";import"./Combination-CCYtWL8C.js";import"./tslib.es6-BntfKcQG.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./text-centered-CznToR0o.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./ButtonBase-CFf1N6e3.js";import"./Spinner-BCTJunNM.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-CeyIhNgY.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";const $="overlay__vG-Gu",ee="content__Nk-Ib",te="description__1dRpy",ne="actions__FsX-e",d={overlay:$,content:ee,description:te,actions:ne},F=({children:o})=>e.jsx(Y,{asChild:!0,children:i.Children.only(o)}),oe=i.forwardRef(function(t,n){return e.jsx(H,{asChild:!0,children:e.jsx(l,{...t,ref:n})})}),re=i.forwardRef(function(t,n){return e.jsx(G,{asChild:!0,children:e.jsx(l,{...t,ref:n})})}),ae=({open:o,title:t,description:n,dataset:a,children:f})=>{const v=K(),U=M(a,{preplyDsComponent:Q.AlertDialog});let C;const A=[];return i.Children.forEach(f,c=>{i.isValidElement(c)&&(c.type===F?C=c:A.push(c))}),e.jsxs(V,{open:o,children:[C,e.jsxs(q,{container:v,children:[e.jsx(W,{className:d.overlay}),e.jsxs(L,{...U,className:d.content,children:[e.jsx(X,{asChild:!0,children:e.jsx(Z,{tag:"h3",variant:"medium",children:t})}),e.jsx(J,{asChild:!0,children:e.jsx("p",{className:d.description,children:n})}),e.jsx("div",{className:d.actions,children:A})]})]})]})},r=Object.assign(ae,{Trigger:F,Action:oe,Cancel:re});try{r.displayName="AlertDialog",r.__docgenInfo={description:"A modal alertdialog that interrupts the user with important content and expects a response.\n\nUnlike a `Dialog`, it cannot be dismissed by clicking outside or pressing escape.",displayName:"AlertDialog",props:{title:{defaultValue:null,description:"The alert's title, describing what the user needs to confirm",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"}]}},description:{defaultValue:null,description:"Details about the action and its consequences",name:"description",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"}]}},children:{defaultValue:null,description:"The AlertDialog actions.\n@see `AlertDialog.Actions` for a common actions convenience wrapper.",name:"children",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"}]}},open:{defaultValue:null,description:`Controls the visibility of the alert.
|
2
2
|
|
3
3
|
Alternatively, you can use the \`AlertDialog.Trigger\` subcomponent for
|
4
4
|
an uncontrolled instance.`,name:"open",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}}}}}catch{}const Re={title:"Components/AlertDialog",component:r,parameters:{docs:{description:{component:"A modal alert dialog for confirming destructive or important actions."},story:{inline:!1,height:300}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},play:async({canvas:o,step:t})=>{await t("Open alert",async()=>(await _.click(o.getByTestId("alert-trigger")),N(()=>{const n=o.getByTestId("alert-dialog");y(n).toBeVisible()})))}},u={parameters:{docs:{description:{story:"Uncontrolled alert using the `Trigger`, `Cancel`, and `Action` subcomponents."}}},args:{title:"Confirm",description:"This action cannot be undone.",dataset:{testid:"alert-dialog"}},render:function(t){return e.jsxs(r,{...t,children:[e.jsx(r.Trigger,{children:e.jsx(l,{dataset:{testid:"alert-trigger"},children:"Action"})}),e.jsx(r.Cancel,{variant:"secondary",onClick:s("cancel"),children:"Cancel"}),e.jsx(r.Action,{onClick:s("confirm"),children:"Confirm"})]})}},p={parameters:{docs:{description:{story:"Uncontrolled alert using the `Trigger`, and two `Action` subcomponents.\n\nThe two actions are styled differently to suggest a preferred action to the one the user has requested.\n\nFor example, in this case, the user is prompted to reschedule instead of canceling."}}},args:{title:"Cancel Lesson",description:"Your balance will not be refunded. Would you like to reschedule instead?",dataset:{testid:"alert-dialog"}},render:function(t){return e.jsxs(r,{...t,children:[e.jsx(r.Trigger,{children:e.jsx(l,{variant:"critical",dataset:{testid:"alert-trigger"},children:"Cancel Lesson"})}),e.jsx(r.Action,{variant:"ghost",onClick:s("cancel"),children:"Cancel lesson"}),e.jsx(r.Action,{variant:"secondary",onClick:s("reschedule"),children:"Reschedule"})]})}},g={parameters:{docs:{description:{story:"Fully controlled using custom `Buttons`."}}},args:{title:"Delete Account",description:"This action cannot be undone.",dataset:{testid:"alert-dialog"}},render:function(t){const[n,a]=i.useState(!1),f=()=>{a(!1),s("account deleted")()},v=()=>{a(!1),s("deletion canceled")()};return e.jsxs(e.Fragment,{children:[e.jsx(l,{onClick:()=>a(!0),dataset:{testid:"alert-trigger"},children:"Action"}),e.jsxs(r,{...t,open:n,children:[e.jsx(r.Cancel,{variant:"secondary",onClick:v,children:"Cancel"}),e.jsx(r.Action,{variant:"critical",onClick:f,children:"Delete"})]})]})}},m={parameters:{docs:{description:{story:"Fully controlled using a single custom `Button`."}}},args:{title:"Payment failed",description:"The page will refresh. Please try again.",dataset:{testid:"alert-dialog"}},render:function(t){const[n,a]=i.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(l,{onClick:()=>a(!0),dataset:{testid:"alert-trigger"},children:"Action"}),e.jsx(r,{...t,open:n,children:e.jsx(r.Action,{onClick:()=>{a(!1),s("page refreshed")()},children:"Refresh"})})]})}},h={parameters:{docs:{description:{story:`
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{f as o}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{m as u,s as n,b as x}from"./classNames-BUL1Zq7e.js";import{w as s}from"./componentNames-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{f as o}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{m as u,s as n,b as x}from"./classNames-BUL1Zq7e.js";import{w as s}from"./componentNames-Ba2ybP0W.js";import{g as p}from"./index-DdzHuZ-Y.js";import{A as f}from"./constants--ewUoBsO.js";import{A as c}from"./defaults-B1rzzf6M.js";const N="Avatar__ENaap",R={Avatar:N,"Avatar--size-2xs":"Avatar--size-2xs__d2pNq","Avatar--size-xs":"Avatar--size-xs__hlQlf","Avatar--size-s":"Avatar--size-s__OXNzr","Avatar--size-m":"Avatar--size-m__4n3bp","Avatar--size-l":"Avatar--size-l__VHR4R","Avatar--size-xl":"Avatar--size-xl__AQlZ0","Avatar--size-24":"Avatar--size-24__ObR4y","Avatar--size-32":"Avatar--size-32__dN-5k","Avatar--size-48":"Avatar--size-48__ddqP8","Avatar--size-64":"Avatar--size-64__-Ju7I","Avatar--size-96":"Avatar--size-96__KgHP3","Avatar--size-160":"Avatar--size-160__KZ0Fc","Avatar--narrow-l--size-2xs":"Avatar--narrow-l--size-2xs__-PmgC","Avatar--narrow-l--size-xs":"Avatar--narrow-l--size-xs__RdTWx","Avatar--narrow-l--size-s":"Avatar--narrow-l--size-s__zwV93","Avatar--narrow-l--size-m":"Avatar--narrow-l--size-m__pW4--","Avatar--narrow-l--size-l":"Avatar--narrow-l--size-l__1pv2G","Avatar--narrow-l--size-xl":"Avatar--narrow-l--size-xl__vH5iG","Avatar--narrow-l--size-24":"Avatar--narrow-l--size-24__qXCWM","Avatar--narrow-l--size-32":"Avatar--narrow-l--size-32__qq9TP","Avatar--narrow-l--size-48":"Avatar--narrow-l--size-48__h51Bn","Avatar--narrow-l--size-64":"Avatar--narrow-l--size-64__LnrZ9","Avatar--narrow-l--size-96":"Avatar--narrow-l--size-96__n3HEe","Avatar--narrow-l--size-160":"Avatar--narrow-l--size-160__1zjWL","Avatar--medium-s--size-2xs":"Avatar--medium-s--size-2xs__qWyz5","Avatar--medium-s--size-xs":"Avatar--medium-s--size-xs__2e4Qo","Avatar--medium-s--size-s":"Avatar--medium-s--size-s__d0fm8","Avatar--medium-s--size-m":"Avatar--medium-s--size-m__ZHi66","Avatar--medium-s--size-l":"Avatar--medium-s--size-l__xxroc","Avatar--medium-s--size-xl":"Avatar--medium-s--size-xl__2QWlo","Avatar--medium-s--size-24":"Avatar--medium-s--size-24__7-PF9","Avatar--medium-s--size-32":"Avatar--medium-s--size-32__kS7dJ","Avatar--medium-s--size-48":"Avatar--medium-s--size-48__7rHLm","Avatar--medium-s--size-64":"Avatar--medium-s--size-64__eSycG","Avatar--medium-s--size-96":"Avatar--medium-s--size-96__gMO59","Avatar--medium-s--size-160":"Avatar--medium-s--size-160__VHYbX","Avatar--medium-l--size-2xs":"Avatar--medium-l--size-2xs__Kt93i","Avatar--medium-l--size-xs":"Avatar--medium-l--size-xs__BwpLG","Avatar--medium-l--size-s":"Avatar--medium-l--size-s__JjLGR","Avatar--medium-l--size-m":"Avatar--medium-l--size-m__L-KEk","Avatar--medium-l--size-l":"Avatar--medium-l--size-l__a53QC","Avatar--medium-l--size-xl":"Avatar--medium-l--size-xl__kUFUb","Avatar--medium-l--size-24":"Avatar--medium-l--size-24__wkAJa","Avatar--medium-l--size-32":"Avatar--medium-l--size-32__ZX2QH","Avatar--medium-l--size-48":"Avatar--medium-l--size-48__17P3w","Avatar--medium-l--size-64":"Avatar--medium-l--size-64__FpM1G","Avatar--medium-l--size-96":"Avatar--medium-l--size-96__5-hlk","Avatar--medium-l--size-160":"Avatar--medium-l--size-160__fa-Bb","Avatar--wide-s--size-2xs":"Avatar--wide-s--size-2xs__1jiA7","Avatar--wide-s--size-xs":"Avatar--wide-s--size-xs__CwbZa","Avatar--wide-s--size-s":"Avatar--wide-s--size-s__DxpiN","Avatar--wide-s--size-m":"Avatar--wide-s--size-m__qn5xe","Avatar--wide-s--size-l":"Avatar--wide-s--size-l__4TPfZ","Avatar--wide-s--size-xl":"Avatar--wide-s--size-xl__NtVch","Avatar--wide-s--size-24":"Avatar--wide-s--size-24__ggmeN","Avatar--wide-s--size-32":"Avatar--wide-s--size-32__J7HvU","Avatar--wide-s--size-48":"Avatar--wide-s--size-48__FDJLh","Avatar--wide-s--size-64":"Avatar--wide-s--size-64__qE9HQ","Avatar--wide-s--size-96":"Avatar--wide-s--size-96__yjySN","Avatar--wide-s--size-160":"Avatar--wide-s--size-160__sQ83p","Avatar--wide-l--size-2xs":"Avatar--wide-l--size-2xs__BuADe","Avatar--wide-l--size-xs":"Avatar--wide-l--size-xs__g8Tfi","Avatar--wide-l--size-s":"Avatar--wide-l--size-s__qYwnP","Avatar--wide-l--size-m":"Avatar--wide-l--size-m__tMD4S","Avatar--wide-l--size-l":"Avatar--wide-l--size-l__M3npP","Avatar--wide-l--size-xl":"Avatar--wide-l--size-xl__-vkhW","Avatar--wide-l--size-24":"Avatar--wide-l--size-24__lammM","Avatar--wide-l--size-32":"Avatar--wide-l--size-32__hM5mX","Avatar--wide-l--size-48":"Avatar--wide-l--size-48__mLV4a","Avatar--wide-l--size-64":"Avatar--wide-l--size-64__uQV-R","Avatar--wide-l--size-96":"Avatar--wide-l--size-96__nbICp","Avatar--wide-l--size-160":"Avatar--wide-l--size-160__gRCi9","Avatar--round":"Avatar--round__Ndyn3"},C=w.forwardRef(function({size:i=c,round:a,src:r,alt:t="",dataset:A,crossOrigin:v,..._},m){const z=a??!0,l=u(R,s.Avatar,[n("size",i),x("round",void 0,z)]),d={...o(_),ref:m,className:l.join(" "),...p(A,{preplyDsComponent:s.Avatar})};return e.jsx("picture",{...d,children:e.jsx("img",{src:r||f,alt:t,crossOrigin:v})})});C.__docgenInfo={description:"",methods:[],displayName:"Avatar",props:{size:{defaultValue:{value:"'xs'",computed:!1},required:!1},alt:{defaultValue:{value:'""',computed:!1},required:!1}}};export{C as A};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{r as n}from"./index-B3evPFBL.js";import{f as w}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as p,s as x,b as c}from"./classNames-BUL1Zq7e.js";import{w as e}from"./componentNames-
|
1
|
+
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{r as n}from"./index-B3evPFBL.js";import{f as w}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as p,s as x,b as c}from"./classNames-BUL1Zq7e.js";import{w as e}from"./componentNames-Ba2ybP0W.js";import{g as f}from"./index-DdzHuZ-Y.js";import{A as y}from"./constants--ewUoBsO.js";import{A as g}from"./defaults-B1rzzf6M.js";const h="Avatar__K41Tw",q={Avatar:h,"Avatar--size-2xs":"Avatar--size-2xs__DWVtx","Avatar--size-xs":"Avatar--size-xs__xsB9y","Avatar--size-s":"Avatar--size-s__lPG7y","Avatar--size-m":"Avatar--size-m__QjPnd","Avatar--size-l":"Avatar--size-l__cuADz","Avatar--size-xl":"Avatar--size-xl__22V2l","Avatar--size-24":"Avatar--size-24__hDb5G","Avatar--size-32":"Avatar--size-32__0goVI","Avatar--size-48":"Avatar--size-48__uGMSJ","Avatar--size-64":"Avatar--size-64__WD77O","Avatar--size-96":"Avatar--size-96__OxIe2","Avatar--size-160":"Avatar--size-160__8tEPo","Avatar--narrow-l--size-2xs":"Avatar--narrow-l--size-2xs__jljjM","Avatar--narrow-l--size-xs":"Avatar--narrow-l--size-xs__7B-jh","Avatar--narrow-l--size-s":"Avatar--narrow-l--size-s__RYetq","Avatar--narrow-l--size-m":"Avatar--narrow-l--size-m__zam12","Avatar--narrow-l--size-l":"Avatar--narrow-l--size-l__qOhX6","Avatar--narrow-l--size-xl":"Avatar--narrow-l--size-xl__DVXKH","Avatar--narrow-l--size-24":"Avatar--narrow-l--size-24__L-54O","Avatar--narrow-l--size-32":"Avatar--narrow-l--size-32__Mdeh3","Avatar--narrow-l--size-48":"Avatar--narrow-l--size-48__1xNsg","Avatar--narrow-l--size-64":"Avatar--narrow-l--size-64__ZQ5C-","Avatar--narrow-l--size-96":"Avatar--narrow-l--size-96__DuZVB","Avatar--narrow-l--size-160":"Avatar--narrow-l--size-160__PN1pX","Avatar--medium-s--size-2xs":"Avatar--medium-s--size-2xs__qTU6Z","Avatar--medium-s--size-xs":"Avatar--medium-s--size-xs__BSbO-","Avatar--medium-s--size-s":"Avatar--medium-s--size-s__B4jP8","Avatar--medium-s--size-m":"Avatar--medium-s--size-m__zLOqH","Avatar--medium-s--size-l":"Avatar--medium-s--size-l__5l0Bn","Avatar--medium-s--size-xl":"Avatar--medium-s--size-xl__bKrql","Avatar--medium-s--size-24":"Avatar--medium-s--size-24__6--6m","Avatar--medium-s--size-32":"Avatar--medium-s--size-32__7rlpv","Avatar--medium-s--size-48":"Avatar--medium-s--size-48__R893D","Avatar--medium-s--size-64":"Avatar--medium-s--size-64__x4N0d","Avatar--medium-s--size-96":"Avatar--medium-s--size-96__1qdaO","Avatar--medium-s--size-160":"Avatar--medium-s--size-160__z7IAl","Avatar--medium-l--size-2xs":"Avatar--medium-l--size-2xs__yBvjS","Avatar--medium-l--size-xs":"Avatar--medium-l--size-xs__MwYGW","Avatar--medium-l--size-s":"Avatar--medium-l--size-s__nmMyG","Avatar--medium-l--size-m":"Avatar--medium-l--size-m__gGguL","Avatar--medium-l--size-l":"Avatar--medium-l--size-l__aITY0","Avatar--medium-l--size-xl":"Avatar--medium-l--size-xl__mFm28","Avatar--medium-l--size-24":"Avatar--medium-l--size-24__Ndkzw","Avatar--medium-l--size-32":"Avatar--medium-l--size-32__3miIB","Avatar--medium-l--size-48":"Avatar--medium-l--size-48__arPBB","Avatar--medium-l--size-64":"Avatar--medium-l--size-64__aFQa7","Avatar--medium-l--size-96":"Avatar--medium-l--size-96__eg03F","Avatar--medium-l--size-160":"Avatar--medium-l--size-160__fGJ7K","Avatar--wide-s--size-2xs":"Avatar--wide-s--size-2xs__NFYZ2","Avatar--wide-s--size-xs":"Avatar--wide-s--size-xs__HtdLJ","Avatar--wide-s--size-s":"Avatar--wide-s--size-s__EsekK","Avatar--wide-s--size-m":"Avatar--wide-s--size-m__BLcmN","Avatar--wide-s--size-l":"Avatar--wide-s--size-l__-BII-","Avatar--wide-s--size-xl":"Avatar--wide-s--size-xl__JEpuf","Avatar--wide-s--size-24":"Avatar--wide-s--size-24__Ue7o0","Avatar--wide-s--size-32":"Avatar--wide-s--size-32__hYoGY","Avatar--wide-s--size-48":"Avatar--wide-s--size-48__Q9kzJ","Avatar--wide-s--size-64":"Avatar--wide-s--size-64__vvQME","Avatar--wide-s--size-96":"Avatar--wide-s--size-96__tVnz3","Avatar--wide-s--size-160":"Avatar--wide-s--size-160__brJ59","Avatar--wide-l--size-2xs":"Avatar--wide-l--size-2xs__494a-","Avatar--wide-l--size-xs":"Avatar--wide-l--size-xs__x-qZ6","Avatar--wide-l--size-s":"Avatar--wide-l--size-s__gvL9N","Avatar--wide-l--size-m":"Avatar--wide-l--size-m__fLHkS","Avatar--wide-l--size-l":"Avatar--wide-l--size-l__HOWbG","Avatar--wide-l--size-xl":"Avatar--wide-l--size-xl__By2Ym","Avatar--wide-l--size-24":"Avatar--wide-l--size-24__EMfbp","Avatar--wide-l--size-32":"Avatar--wide-l--size-32__7bYZs","Avatar--wide-l--size-48":"Avatar--wide-l--size-48__548Bt","Avatar--wide-l--size-64":"Avatar--wide-l--size-64__5Ce08","Avatar--wide-l--size-96":"Avatar--wide-l--size-96__-6w7Y","Avatar--wide-l--size-160":"Avatar--wide-l--size-160__5ft-T","Avatar--round":"Avatar--round__ZDtGc"},s=n.forwardRef(function({size:r=g,round:t,src:v,alt:l="",dataset:m,crossOrigin:A,...d},_){const z=t??!0,u=p(q,e.Avatar,[x("size",r),c("round",void 0,z)]),o={...w(d),ref:_,className:u.join(" "),...f(m,{preplyDsComponent:e.Avatar})};return a.jsx("picture",{...o,children:a.jsx("img",{src:v||y,alt:l,crossOrigin:A})})});try{s.displayName="Avatar",s.__docgenInfo={description:"",displayName:"Avatar",props:{size:{defaultValue:{value:"xs"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"2xs"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:"ResponsiveProp<AvatarSize>"}]}},round:{defaultValue:null,description:"@deprecated this prop is deprecated and has no effect",name:"round",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},src:{defaultValue:null,description:`The avatar image URL.
|
2
2
|
If not provided, the default placeholder image is used instead.`,name:"src",required:!1,type:{name:"enum",value:[{value:"string"}]}},alt:{defaultValue:{value:""},description:`A description of the image.
|
3
3
|
This is recommended for accessibility purposes, specifically for users
|
4
4
|
of screen readers.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{S as d}from"./consts-KAYct7Gj.js";import{A as t}from"./Avatar-
|
1
|
+
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{S as d}from"./consts-KAYct7Gj.js";import{A as t}from"./Avatar-D_mKYr5W.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./classNames-BUL1Zq7e.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";import"./constants--ewUoBsO.js";import"./defaults-B1rzzf6M.js";const j={title:"components/Avatar",component:t,argTypes:{size:{description:d}}},s=()=>a.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"end"},children:[a.jsx(t,{size:"160"}),a.jsx(t,{src:"./web-lib/src/components/Avatar/docs/static/avatar-1.png",size:"96"}),a.jsx(t,{src:"./web-lib/src/components/Avatar/docs/static/avatar-2.png",size:"64"}),a.jsx(t,{src:"./web-lib/src/components/Avatar/docs/static/avatar-3.png",size:"48"}),a.jsx(t,{src:"./web-lib/src/components/Avatar/docs/static/avatar-4.png",size:"32"}),a.jsx(t,{src:"./web-lib/src/components/Avatar/docs/static/avatar-5.png",size:"24"})]}),r={parameters:{chromatic:{disableSnapshot:!0}},args:{size:"32",src:"./web-lib/src/components/Avatar/docs/static/avatar-1.png",dataset:{qaid:"avatar"}},argTypes:{src:{control:"text"},dataset:{control:"object"},alt:{control:"text"},round:{table:{disable:!0}}}};var e,o,n;s.parameters={...s.parameters,docs:{...(e=s.parameters)==null?void 0:e.docs,source:{originalSource:`() => <div style={{
|
2
2
|
display: 'flex',
|
3
3
|
gap: '8px',
|
4
4
|
alignItems: 'end'
|
package/dist/assets/{AvatarWithStatus.stories-CocgTI5A.js → AvatarWithStatus.stories-5qjPY64Z.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{r as j}from"./index-B3evPFBL.js";import{f as q}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{A as C}from"./Avatar-
|
1
|
+
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{r as j}from"./index-B3evPFBL.js";import{f as q}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{A as C}from"./Avatar-D_mKYr5W.js";import{m as N,b as w,s as V,a as R}from"./classNames-BUL1Zq7e.js";import{w as r}from"./componentNames-Ba2ybP0W.js";import{g as T}from"./index-DdzHuZ-Y.js";import{A as D}from"./defaults-B1rzzf6M.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./constants--ewUoBsO.js";const E="AvatarWithStatus__z8Zik",n={AvatarWithStatus:E,"AvatarWithStatus--indicator":"AvatarWithStatus--indicator__dsdXa","AvatarWithStatus--online":"AvatarWithStatus--online__pGAFw","AvatarWithStatus--size-2xs":"AvatarWithStatus--size-2xs__fkqaK","AvatarWithStatus--size-xs":"AvatarWithStatus--size-xs__VzJXv","AvatarWithStatus--size-m":"AvatarWithStatus--size-m__VkIzy","AvatarWithStatus--size-xl":"AvatarWithStatus--size-xl__h-Pv7","AvatarWithStatus--size-64":"AvatarWithStatus--size-64__vG-kB","AvatarWithStatus--size-96":"AvatarWithStatus--size-96__Dgqc1","AvatarWithStatus--size-160":"AvatarWithStatus--size-160__7gCR7"},e=j.forwardRef(function({online:f=!1,size:i=D,dataset:A,alt:S,crossOrigin:x,src:_,...W},g){const y=N(n,r.AvatarWithStatus,[w("online",void 0,f),V("size",i)]),z=[...R(n,r.AvatarWithStatus,["indicator"])],b={...q(W),ref:g,className:y.join(" "),...T(A,{preplyDsComponent:r.AvatarWithStatus})};return a.jsxs("div",{...b,children:[a.jsx("span",{className:z.join(" ")}),a.jsx("div",{children:a.jsx(C,{alt:S,crossOrigin:x,src:_,size:i})})]})});try{e.displayName="AvatarWithStatus",e.__docgenInfo={description:"",displayName:"AvatarWithStatus",props:{dataset:{defaultValue:null,description:`Sets data attributes on the DOM element.
|
2
2
|
@example <Avatar dataset={{ 'qa-id': 'user-avatar' }} /> // will add data-qa-id="user-avatar" to the HTML element`,name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},src:{defaultValue:null,description:`The avatar image URL.
|
3
3
|
If not provided, the default placeholder image is used instead.`,name:"src",required:!1,type:{name:"enum",value:[{value:"string"}]}},alt:{defaultValue:null,description:`A description of the image.
|
4
4
|
This is recommended for accessibility purposes, specifically for users
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{F as l}from"./TokyoUITag-CulX0-gf.js";import{L as S}from"./LayoutFlex-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{F as l}from"./TokyoUITag-CulX0-gf.js";import{L as S}from"./LayoutFlex-BxFOrEzC.js";import{r as N}from"./index-B3evPFBL.js";import{f as U}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{I as q}from"./Icon-D-t6qc3n.js";import{g as C}from"./index-DdzHuZ-Y.js";import{w as k}from"./componentNames-Ba2ybP0W.js";import"./layout-relative.module-ed9bC4H4.js";import"./classNames-BUL1Zq7e.js";import"./defaults-B1rzzf6M.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-accent-DZDDtpIt.js";import"./render-icon-CVTdrNe-.js";const F="badge__ioy0w",L={badge:F},E=n=>{switch(n){case"xs":return"small";case"s":return"medium";case"m":return"large";default:return n}},a=N.forwardRef(function({type:o="neutral",size:d="medium",leadingSvgIcon:c,dataset:T,children:j,accent:u,inverted:m,...z},V){const p=E(d),t={...T,size:p};u===void 0&&m===void 0?t.type=o:(t.accent=u||"unset",t.inverted=!!m);const _={...U(z),ref:V,className:L.badge,...C(t,{preplyDsComponent:k.Badge})},w=o==="neutral"?"primary":o;return e.jsxs("span",{..._,children:[!!c&&p!=="small"&&e.jsx(q,{accent:w,size:d==="large"?"24":"16",svg:c}),j]})});try{a.displayName="Badge",a.__docgenInfo={description:"",displayName:"Badge",props:{type:{defaultValue:{value:"neutral"},description:"The type of the badge.",name:"type",required:!1,type:{name:"enum",value:[{value:'"positive"'},{value:'"info"'},{value:'"warning"'},{value:'"critical"'},{value:'"neutral"'}]}},size:{defaultValue:{value:"medium"},description:"The size of the badge.",name:"size",required:!1,type:{name:"enum",value:[{value:'"large"'},{value:'"medium"'},{value:'"small"'},{value:'"xs"'},{value:'"s"'},{value:'"m"'}]}},leadingSvgIcon:{defaultValue:null,description:`The leading SVG icon. Only displayed in \`medium\` and \`large\` sizes.
|
2
2
|
@example import TokyoUITag from '@preply/ds-media-icons/dist/24/TokyoUITag.svg';
|
3
3
|
|
4
4
|
<Badge leadingSvgIcon={TokyoUITag}>Badge</Badge>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{H as b}from"./Heading-sy1TMpjs.js";import{L as B}from"./LayoutFlex-oRwI31fW.js";import{T as _}from"./Text-B2ZjNCft.js";import{r as D}from"./index-B3evPFBL.js";import{f as N}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{g as O}from"./layout-relative.module-ed9bC4H4.js";import{m as A,s as u}from"./classNames-BUL1Zq7e.js";import{w as d}from"./componentNames-CVVyamkx.js";import{g as H}from"./index-DdzHuZ-Y.js";import{L as I,c as R,d as q}from"./defaults-B1rzzf6M.js";import{a as C,S as U}from"./consts-KAYct7Gj.js";import"./text-accent-DZDDtpIt.js";import"./text-centered-CznToR0o.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E="Box__T6Fyt",j={Box:E,"Box--box-radius-none":"Box--box-radius-none__pVdTk","Box--box-radius-m":"Box--box-radius-m__alXKt","Box--box-radius-l":"Box--box-radius-l__ZQypL","Box--box-radius-2":"Box--box-radius-2__IXJHQ","Box--box-radius-4":"Box--box-radius-4__aoSlX","Box--box-radius-8":"Box--box-radius-8__-BuzF","Box--box-radius-0":"Box--box-radius-0__FWPBJ","Box--box-radius-12":"Box--box-radius-12__6r0bn","Box--box-radius-16":"Box--box-radius-16__n3666","Box--box-radius-24":"Box--box-radius-24__pxV3O","Box--box-radius-32":"Box--box-radius-32__2zn-K","Box--box-radius-48":"Box--box-radius-48__t8Iiq","Box--box-radius-64":"Box--box-radius-64__-zOC7","Box--box-radius-96":"Box--box-radius-96__ayuP-","Box--box-radius-160":"Box--box-radius-160__39X1p","Box--narrow-l--box-radius-none":"Box--narrow-l--box-radius-none__U1KRd","Box--narrow-l--box-radius-m":"Box--narrow-l--box-radius-m__EAz9A","Box--narrow-l--box-radius-l":"Box--narrow-l--box-radius-l__GEnkZ","Box--narrow-l--box-radius-2":"Box--narrow-l--box-radius-2__Cn0nB","Box--narrow-l--box-radius-4":"Box--narrow-l--box-radius-4__dXX4d","Box--narrow-l--box-radius-8":"Box--narrow-l--box-radius-8__c2qTs","Box--narrow-l--box-radius-0":"Box--narrow-l--box-radius-0__rbA8v","Box--narrow-l--box-radius-12":"Box--narrow-l--box-radius-12__-FrWF","Box--narrow-l--box-radius-16":"Box--narrow-l--box-radius-16__7yiZ2","Box--narrow-l--box-radius-24":"Box--narrow-l--box-radius-24__pgg5J","Box--narrow-l--box-radius-32":"Box--narrow-l--box-radius-32__ME019","Box--narrow-l--box-radius-48":"Box--narrow-l--box-radius-48__oIpGl","Box--narrow-l--box-radius-64":"Box--narrow-l--box-radius-64__i4ASw","Box--narrow-l--box-radius-96":"Box--narrow-l--box-radius-96__-5TfN","Box--narrow-l--box-radius-160":"Box--narrow-l--box-radius-160__JVHdy","Box--medium-s--box-radius-none":"Box--medium-s--box-radius-none__NI3b5","Box--medium-s--box-radius-m":"Box--medium-s--box-radius-m__98FY-","Box--medium-s--box-radius-l":"Box--medium-s--box-radius-l__RsLEh","Box--medium-s--box-radius-2":"Box--medium-s--box-radius-2__h-yhf","Box--medium-s--box-radius-4":"Box--medium-s--box-radius-4__YmbvG","Box--medium-s--box-radius-8":"Box--medium-s--box-radius-8__NOIeK","Box--medium-s--box-radius-0":"Box--medium-s--box-radius-0__6dX4D","Box--medium-s--box-radius-12":"Box--medium-s--box-radius-12__Gp9Nl","Box--medium-s--box-radius-16":"Box--medium-s--box-radius-16__Q-4Io","Box--medium-s--box-radius-24":"Box--medium-s--box-radius-24__FASgo","Box--medium-s--box-radius-32":"Box--medium-s--box-radius-32__WCrhN","Box--medium-s--box-radius-48":"Box--medium-s--box-radius-48__Cniaw","Box--medium-s--box-radius-64":"Box--medium-s--box-radius-64__PnAQM","Box--medium-s--box-radius-96":"Box--medium-s--box-radius-96__sGJpJ","Box--medium-s--box-radius-160":"Box--medium-s--box-radius-160__MURfX","Box--medium-l--box-radius-none":"Box--medium-l--box-radius-none__9i2B6","Box--medium-l--box-radius-m":"Box--medium-l--box-radius-m__-N-kx","Box--medium-l--box-radius-l":"Box--medium-l--box-radius-l__mNNXv","Box--medium-l--box-radius-2":"Box--medium-l--box-radius-2__cWx-n","Box--medium-l--box-radius-4":"Box--medium-l--box-radius-4__ibcr4","Box--medium-l--box-radius-8":"Box--medium-l--box-radius-8__zm-dC","Box--medium-l--box-radius-0":"Box--medium-l--box-radius-0__-HCNC","Box--medium-l--box-radius-12":"Box--medium-l--box-radius-12__DdmSM","Box--medium-l--box-radius-16":"Box--medium-l--box-radius-16__o3E1Q","Box--medium-l--box-radius-24":"Box--medium-l--box-radius-24__u-rLd","Box--medium-l--box-radius-32":"Box--medium-l--box-radius-32__wMKBz","Box--medium-l--box-radius-48":"Box--medium-l--box-radius-48__mMLoI","Box--medium-l--box-radius-64":"Box--medium-l--box-radius-64__OuZ5D","Box--medium-l--box-radius-96":"Box--medium-l--box-radius-96__6lzaZ","Box--medium-l--box-radius-160":"Box--medium-l--box-radius-160__bTscq","Box--wide-s--box-radius-none":"Box--wide-s--box-radius-none__eNUX-","Box--wide-s--box-radius-m":"Box--wide-s--box-radius-m__T0UnR","Box--wide-s--box-radius-l":"Box--wide-s--box-radius-l__kE31q","Box--wide-s--box-radius-2":"Box--wide-s--box-radius-2__FnsdM","Box--wide-s--box-radius-4":"Box--wide-s--box-radius-4__G4jL0","Box--wide-s--box-radius-8":"Box--wide-s--box-radius-8__7Mz6S","Box--wide-s--box-radius-0":"Box--wide-s--box-radius-0__H9zOa","Box--wide-s--box-radius-12":"Box--wide-s--box-radius-12__G2Ain","Box--wide-s--box-radius-16":"Box--wide-s--box-radius-16__or-lk","Box--wide-s--box-radius-24":"Box--wide-s--box-radius-24__xyysq","Box--wide-s--box-radius-32":"Box--wide-s--box-radius-32__a8VMC","Box--wide-s--box-radius-48":"Box--wide-s--box-radius-48__lD512","Box--wide-s--box-radius-64":"Box--wide-s--box-radius-64__SPNmy","Box--wide-s--box-radius-96":"Box--wide-s--box-radius-96__7Awl2","Box--wide-s--box-radius-160":"Box--wide-s--box-radius-160__sBOke","Box--wide-l--box-radius-none":"Box--wide-l--box-radius-none__YpNNw","Box--wide-l--box-radius-m":"Box--wide-l--box-radius-m__i6UjO","Box--wide-l--box-radius-l":"Box--wide-l--box-radius-l__NkLU0","Box--wide-l--box-radius-2":"Box--wide-l--box-radius-2__GYO54","Box--wide-l--box-radius-4":"Box--wide-l--box-radius-4__267az","Box--wide-l--box-radius-8":"Box--wide-l--box-radius-8__1hPOR","Box--wide-l--box-radius-0":"Box--wide-l--box-radius-0__HQ2Tn","Box--wide-l--box-radius-12":"Box--wide-l--box-radius-12__yXlB2","Box--wide-l--box-radius-16":"Box--wide-l--box-radius-16__gp8Ov","Box--wide-l--box-radius-24":"Box--wide-l--box-radius-24__n4VQK","Box--wide-l--box-radius-32":"Box--wide-l--box-radius-32__E-AbQ","Box--wide-l--box-radius-48":"Box--wide-l--box-radius-48__hUdT6","Box--wide-l--box-radius-64":"Box--wide-l--box-radius-64__mLXRM","Box--wide-l--box-radius-96":"Box--wide-l--box-radius-96__gMyZj","Box--wide-l--box-radius-160":"Box--wide-l--box-radius-160__dfjUF","Box--background-white":"Box--background-white__8bLtb","Box--background-gray-100":"Box--background-gray-100__caCCW","Box--background-gray-200":"Box--background-gray-200__lxnJm","Box--background-gray-300":"Box--background-gray-300__qfANs","Box--background-gray-400":"Box--background-gray-400__Ol1x4","Box--background-gray-500":"Box--background-gray-500__x0PFz","Box--background-gray-600":"Box--background-gray-600__uB-Hh","Box--background-teal-100":"Box--background-teal-100__8CUoI","Box--background-teal-200":"Box--background-teal-200__7picz","Box--background-teal-300":"Box--background-teal-300__T3rQI","Box--background-teal-400":"Box--background-teal-400__0B0--","Box--background-teal-500":"Box--background-teal-500__MdenY","Box--background-green-100":"Box--background-green-100__HeHgn","Box--background-green-200":"Box--background-green-200__1N2wh","Box--background-green-300":"Box--background-green-300__z8ERR","Box--background-green-400":"Box--background-green-400__-5sHz","Box--background-green-500":"Box--background-green-500__CtoHU","Box--background-yellow-100":"Box--background-yellow-100__nuCTl","Box--background-yellow-200":"Box--background-yellow-200__Gp-pF","Box--background-yellow-300":"Box--background-yellow-300__yjWLN","Box--background-yellow-400":"Box--background-yellow-400__1GTS5","Box--background-yellow-500":"Box--background-yellow-500__ihqqf","Box--background-red-100":"Box--background-red-100__mwv7-","Box--background-red-200":"Box--background-red-200__RIRGM","Box--background-red-300":"Box--background-red-300__HbjJU","Box--background-red-400":"Box--background-red-400__ptrch","Box--background-red-500":"Box--background-red-500__YwJPK","Box--background-blue-100":"Box--background-blue-100__vxcI9","Box--background-blue-200":"Box--background-blue-200__In8OS","Box--background-blue-300":"Box--background-blue-300__2mLHS","Box--background-blue-400":"Box--background-blue-400__g45Ks","Box--background-blue-500":"Box--background-blue-500__KXigt","Box--background-magenta-100":"Box--background-magenta-100__mgiT2","Box--background-magenta-200":"Box--background-magenta-200__NzaeL","Box--background-magenta-300":"Box--background-magenta-300__lCSib","Box--background-magenta-400":"Box--background-magenta-400__b9jnn","Box--background-magenta-500":"Box--background-magenta-500__8-Hxx","Box--background-primary":"Box--background-primary__00zVu","Box--background-secondary":"Box--background-secondary__hY7w0","Box--background-tertiary":"Box--background-tertiary__cIPge","Box--background-overlay":"Box--background-overlay__vbs8V","Box--background-disabled":"Box--background-disabled__81WYT","Box--background-brand":"Box--background-brand__2W0VB","Box--background-brandB2b":"Box--background-brandB2b__KQrLm","Box--background-accentLight":"Box--background-accentLight__x6RrQ","Box--background-accentDark":"Box--background-accentDark__agpDd","Box--background-positiveLight":"Box--background-positiveLight__67dRq","Box--background-positiveDark":"Box--background-positiveDark__lYghV","Box--background-infoLight":"Box--background-infoLight__u-TX4","Box--background-infoDark":"Box--background-infoDark__ud4qs","Box--background-warningLight":"Box--background-warningLight__JtSuS","Box--background-warningDark":"Box--background-warningDark__SIgOQ","Box--background-criticalLight":"Box--background-criticalLight__uPTDs","Box--background-criticalDark":"Box--background-criticalDark__12Zft","Box--background-statusOnline":"Box--background-statusOnline__5PZcQ","Box--background-statusOffline":"Box--background-statusOffline__Vh0CO","Box--background-primaryInverted":"Box--background-primaryInverted__TePy2","Box--background-secondaryInverted":"Box--background-secondaryInverted__tMytW","Box--background-tertiaryInverted":"Box--background-tertiaryInverted__K2wU5"},r=D.forwardRef(function({children:m,background:g,radius:v=R,padding:p=q,tag:k,dataset:w,...y},f){const h=A(j,d.Box,[u("box-radius",v),u("background",g)]),L=O(p),S=k??I,T=[...h,...L],P={...N(y),ref:f,className:T.join(" "),...H(w,{preplyDsComponent:d.Box})};return o.jsx(S,{...P,children:m})});try{r.displayName="Box",r.__docgenInfo={description:"A styleable container.\n\nUse this with `Layout*` components to create complex content containers.",displayName:"Box",props:{background:{defaultValue:null,description:"",name:"background",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"disabled"'},{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'},{value:'"overlay"'},{value:'"brand"'},{value:'"brandB2b"'},{value:'"accentLight"'},{value:'"positiveLight"'},{value:'"positiveDark"'},{value:'"infoLight"'},{value:'"infoDark"'},{value:'"warningLight"'},{value:'"warningDark"'},{value:'"criticalLight"'},{value:'"criticalDark"'},{value:'"statusOnline"'},{value:'"statusOffline"'},{value:'"primaryInverted"'},{value:'"secondaryInverted"'},{value:'"tertiaryInverted"'}]}},radius:{defaultValue:{value:"m"},description:"",name:"radius",required:!1,type:{name:"enum",value:[{value:'"m"'},{value:'"l"'},{value:'"none"'},{value:'"0"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:"ResponsiveProp<BoxRadius>"}]}},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"'}]}},padding:{defaultValue:{value:"s"},description:"",name:"padding",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"2xs"'},{value:'"none"'},{value:'"3xs"'},{value:'"0"'},{value:'"1"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:'"20"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:"[Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing, Spacing]"},{value:"[BoxPadding, BoxPadding]"},{value:"[BoxPadding, BoxPadding, BoxPadding]"},{value:"[BoxPadding, BoxPadding, BoxPadding, BoxPadding]"},{value:"ResponsiveProp<ShortHand<Spacing> | ShortHand<BoxPadding>>"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: HTMLElement | null) => void"},{value:"RefObject<HTMLElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const eo={title:"components/Box",component:r,argTypes:{radius:{description:U},padding:{description:C}}},a=()=>o.jsx(r,{background:"positiveLight",children:o.jsxs(B,{gap:"xs",direction:"column",children:[o.jsx(b,{level:"h3",accent:"positive",children:"Heading"}),o.jsx(_,{accent:"positive",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed metus nisi, ornare sit amet elit ut, porttitor commodo ipsum. Aliquam vel est quis erat sagittis posuere et vitae eros"})]})});a.storyName="Box";const e={parameters:{chromatic:{disableSnapshot:!0}},args:{background:void 0,radius:void 0,padding:void 0,children:o.jsxs(B,{gap:"16",direction:"column",children:[o.jsx(b,{variant:"large",tag:"h3",children:"Heading"}),o.jsx(_,{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed metus nisi, ornare sit amet elit ut, porttitor commodo ipsum. Aliquam vel est quis erat sagittis posuere et vitae eros"})]}),dataset:{qaid:"box"}},argTypes:{children:{control:!1},dataset:{control:"object"}}};var i,x,s;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`() => <Box background="positiveLight">
|
1
|
+
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{H as b}from"./Heading-BSlUFvxo.js";import{L as B}from"./LayoutFlex-BxFOrEzC.js";import{T as _}from"./Text-DrH34jFe.js";import{r as D}from"./index-B3evPFBL.js";import{f as N}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{g as O}from"./layout-relative.module-ed9bC4H4.js";import{m as A,s as u}from"./classNames-BUL1Zq7e.js";import{w as d}from"./componentNames-Ba2ybP0W.js";import{g as H}from"./index-DdzHuZ-Y.js";import{L as I,c as R,d as q}from"./defaults-B1rzzf6M.js";import{a as C,S as U}from"./consts-KAYct7Gj.js";import"./text-accent-DZDDtpIt.js";import"./text-centered-CznToR0o.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E="Box__T6Fyt",j={Box:E,"Box--box-radius-none":"Box--box-radius-none__pVdTk","Box--box-radius-m":"Box--box-radius-m__alXKt","Box--box-radius-l":"Box--box-radius-l__ZQypL","Box--box-radius-2":"Box--box-radius-2__IXJHQ","Box--box-radius-4":"Box--box-radius-4__aoSlX","Box--box-radius-8":"Box--box-radius-8__-BuzF","Box--box-radius-0":"Box--box-radius-0__FWPBJ","Box--box-radius-12":"Box--box-radius-12__6r0bn","Box--box-radius-16":"Box--box-radius-16__n3666","Box--box-radius-24":"Box--box-radius-24__pxV3O","Box--box-radius-32":"Box--box-radius-32__2zn-K","Box--box-radius-48":"Box--box-radius-48__t8Iiq","Box--box-radius-64":"Box--box-radius-64__-zOC7","Box--box-radius-96":"Box--box-radius-96__ayuP-","Box--box-radius-160":"Box--box-radius-160__39X1p","Box--narrow-l--box-radius-none":"Box--narrow-l--box-radius-none__U1KRd","Box--narrow-l--box-radius-m":"Box--narrow-l--box-radius-m__EAz9A","Box--narrow-l--box-radius-l":"Box--narrow-l--box-radius-l__GEnkZ","Box--narrow-l--box-radius-2":"Box--narrow-l--box-radius-2__Cn0nB","Box--narrow-l--box-radius-4":"Box--narrow-l--box-radius-4__dXX4d","Box--narrow-l--box-radius-8":"Box--narrow-l--box-radius-8__c2qTs","Box--narrow-l--box-radius-0":"Box--narrow-l--box-radius-0__rbA8v","Box--narrow-l--box-radius-12":"Box--narrow-l--box-radius-12__-FrWF","Box--narrow-l--box-radius-16":"Box--narrow-l--box-radius-16__7yiZ2","Box--narrow-l--box-radius-24":"Box--narrow-l--box-radius-24__pgg5J","Box--narrow-l--box-radius-32":"Box--narrow-l--box-radius-32__ME019","Box--narrow-l--box-radius-48":"Box--narrow-l--box-radius-48__oIpGl","Box--narrow-l--box-radius-64":"Box--narrow-l--box-radius-64__i4ASw","Box--narrow-l--box-radius-96":"Box--narrow-l--box-radius-96__-5TfN","Box--narrow-l--box-radius-160":"Box--narrow-l--box-radius-160__JVHdy","Box--medium-s--box-radius-none":"Box--medium-s--box-radius-none__NI3b5","Box--medium-s--box-radius-m":"Box--medium-s--box-radius-m__98FY-","Box--medium-s--box-radius-l":"Box--medium-s--box-radius-l__RsLEh","Box--medium-s--box-radius-2":"Box--medium-s--box-radius-2__h-yhf","Box--medium-s--box-radius-4":"Box--medium-s--box-radius-4__YmbvG","Box--medium-s--box-radius-8":"Box--medium-s--box-radius-8__NOIeK","Box--medium-s--box-radius-0":"Box--medium-s--box-radius-0__6dX4D","Box--medium-s--box-radius-12":"Box--medium-s--box-radius-12__Gp9Nl","Box--medium-s--box-radius-16":"Box--medium-s--box-radius-16__Q-4Io","Box--medium-s--box-radius-24":"Box--medium-s--box-radius-24__FASgo","Box--medium-s--box-radius-32":"Box--medium-s--box-radius-32__WCrhN","Box--medium-s--box-radius-48":"Box--medium-s--box-radius-48__Cniaw","Box--medium-s--box-radius-64":"Box--medium-s--box-radius-64__PnAQM","Box--medium-s--box-radius-96":"Box--medium-s--box-radius-96__sGJpJ","Box--medium-s--box-radius-160":"Box--medium-s--box-radius-160__MURfX","Box--medium-l--box-radius-none":"Box--medium-l--box-radius-none__9i2B6","Box--medium-l--box-radius-m":"Box--medium-l--box-radius-m__-N-kx","Box--medium-l--box-radius-l":"Box--medium-l--box-radius-l__mNNXv","Box--medium-l--box-radius-2":"Box--medium-l--box-radius-2__cWx-n","Box--medium-l--box-radius-4":"Box--medium-l--box-radius-4__ibcr4","Box--medium-l--box-radius-8":"Box--medium-l--box-radius-8__zm-dC","Box--medium-l--box-radius-0":"Box--medium-l--box-radius-0__-HCNC","Box--medium-l--box-radius-12":"Box--medium-l--box-radius-12__DdmSM","Box--medium-l--box-radius-16":"Box--medium-l--box-radius-16__o3E1Q","Box--medium-l--box-radius-24":"Box--medium-l--box-radius-24__u-rLd","Box--medium-l--box-radius-32":"Box--medium-l--box-radius-32__wMKBz","Box--medium-l--box-radius-48":"Box--medium-l--box-radius-48__mMLoI","Box--medium-l--box-radius-64":"Box--medium-l--box-radius-64__OuZ5D","Box--medium-l--box-radius-96":"Box--medium-l--box-radius-96__6lzaZ","Box--medium-l--box-radius-160":"Box--medium-l--box-radius-160__bTscq","Box--wide-s--box-radius-none":"Box--wide-s--box-radius-none__eNUX-","Box--wide-s--box-radius-m":"Box--wide-s--box-radius-m__T0UnR","Box--wide-s--box-radius-l":"Box--wide-s--box-radius-l__kE31q","Box--wide-s--box-radius-2":"Box--wide-s--box-radius-2__FnsdM","Box--wide-s--box-radius-4":"Box--wide-s--box-radius-4__G4jL0","Box--wide-s--box-radius-8":"Box--wide-s--box-radius-8__7Mz6S","Box--wide-s--box-radius-0":"Box--wide-s--box-radius-0__H9zOa","Box--wide-s--box-radius-12":"Box--wide-s--box-radius-12__G2Ain","Box--wide-s--box-radius-16":"Box--wide-s--box-radius-16__or-lk","Box--wide-s--box-radius-24":"Box--wide-s--box-radius-24__xyysq","Box--wide-s--box-radius-32":"Box--wide-s--box-radius-32__a8VMC","Box--wide-s--box-radius-48":"Box--wide-s--box-radius-48__lD512","Box--wide-s--box-radius-64":"Box--wide-s--box-radius-64__SPNmy","Box--wide-s--box-radius-96":"Box--wide-s--box-radius-96__7Awl2","Box--wide-s--box-radius-160":"Box--wide-s--box-radius-160__sBOke","Box--wide-l--box-radius-none":"Box--wide-l--box-radius-none__YpNNw","Box--wide-l--box-radius-m":"Box--wide-l--box-radius-m__i6UjO","Box--wide-l--box-radius-l":"Box--wide-l--box-radius-l__NkLU0","Box--wide-l--box-radius-2":"Box--wide-l--box-radius-2__GYO54","Box--wide-l--box-radius-4":"Box--wide-l--box-radius-4__267az","Box--wide-l--box-radius-8":"Box--wide-l--box-radius-8__1hPOR","Box--wide-l--box-radius-0":"Box--wide-l--box-radius-0__HQ2Tn","Box--wide-l--box-radius-12":"Box--wide-l--box-radius-12__yXlB2","Box--wide-l--box-radius-16":"Box--wide-l--box-radius-16__gp8Ov","Box--wide-l--box-radius-24":"Box--wide-l--box-radius-24__n4VQK","Box--wide-l--box-radius-32":"Box--wide-l--box-radius-32__E-AbQ","Box--wide-l--box-radius-48":"Box--wide-l--box-radius-48__hUdT6","Box--wide-l--box-radius-64":"Box--wide-l--box-radius-64__mLXRM","Box--wide-l--box-radius-96":"Box--wide-l--box-radius-96__gMyZj","Box--wide-l--box-radius-160":"Box--wide-l--box-radius-160__dfjUF","Box--background-white":"Box--background-white__8bLtb","Box--background-gray-100":"Box--background-gray-100__caCCW","Box--background-gray-200":"Box--background-gray-200__lxnJm","Box--background-gray-300":"Box--background-gray-300__qfANs","Box--background-gray-400":"Box--background-gray-400__Ol1x4","Box--background-gray-500":"Box--background-gray-500__x0PFz","Box--background-gray-600":"Box--background-gray-600__uB-Hh","Box--background-teal-100":"Box--background-teal-100__8CUoI","Box--background-teal-200":"Box--background-teal-200__7picz","Box--background-teal-300":"Box--background-teal-300__T3rQI","Box--background-teal-400":"Box--background-teal-400__0B0--","Box--background-teal-500":"Box--background-teal-500__MdenY","Box--background-green-100":"Box--background-green-100__HeHgn","Box--background-green-200":"Box--background-green-200__1N2wh","Box--background-green-300":"Box--background-green-300__z8ERR","Box--background-green-400":"Box--background-green-400__-5sHz","Box--background-green-500":"Box--background-green-500__CtoHU","Box--background-yellow-100":"Box--background-yellow-100__nuCTl","Box--background-yellow-200":"Box--background-yellow-200__Gp-pF","Box--background-yellow-300":"Box--background-yellow-300__yjWLN","Box--background-yellow-400":"Box--background-yellow-400__1GTS5","Box--background-yellow-500":"Box--background-yellow-500__ihqqf","Box--background-red-100":"Box--background-red-100__mwv7-","Box--background-red-200":"Box--background-red-200__RIRGM","Box--background-red-300":"Box--background-red-300__HbjJU","Box--background-red-400":"Box--background-red-400__ptrch","Box--background-red-500":"Box--background-red-500__YwJPK","Box--background-blue-100":"Box--background-blue-100__vxcI9","Box--background-blue-200":"Box--background-blue-200__In8OS","Box--background-blue-300":"Box--background-blue-300__2mLHS","Box--background-blue-400":"Box--background-blue-400__g45Ks","Box--background-blue-500":"Box--background-blue-500__KXigt","Box--background-magenta-100":"Box--background-magenta-100__mgiT2","Box--background-magenta-200":"Box--background-magenta-200__NzaeL","Box--background-magenta-300":"Box--background-magenta-300__lCSib","Box--background-magenta-400":"Box--background-magenta-400__b9jnn","Box--background-magenta-500":"Box--background-magenta-500__8-Hxx","Box--background-primary":"Box--background-primary__00zVu","Box--background-secondary":"Box--background-secondary__hY7w0","Box--background-tertiary":"Box--background-tertiary__cIPge","Box--background-overlay":"Box--background-overlay__vbs8V","Box--background-disabled":"Box--background-disabled__81WYT","Box--background-brand":"Box--background-brand__2W0VB","Box--background-brandB2b":"Box--background-brandB2b__KQrLm","Box--background-accentLight":"Box--background-accentLight__x6RrQ","Box--background-accentDark":"Box--background-accentDark__agpDd","Box--background-positiveLight":"Box--background-positiveLight__67dRq","Box--background-positiveDark":"Box--background-positiveDark__lYghV","Box--background-infoLight":"Box--background-infoLight__u-TX4","Box--background-infoDark":"Box--background-infoDark__ud4qs","Box--background-warningLight":"Box--background-warningLight__JtSuS","Box--background-warningDark":"Box--background-warningDark__SIgOQ","Box--background-criticalLight":"Box--background-criticalLight__uPTDs","Box--background-criticalDark":"Box--background-criticalDark__12Zft","Box--background-statusOnline":"Box--background-statusOnline__5PZcQ","Box--background-statusOffline":"Box--background-statusOffline__Vh0CO","Box--background-primaryInverted":"Box--background-primaryInverted__TePy2","Box--background-secondaryInverted":"Box--background-secondaryInverted__tMytW","Box--background-tertiaryInverted":"Box--background-tertiaryInverted__K2wU5"},r=D.forwardRef(function({children:m,background:g,radius:v=R,padding:p=q,tag:k,dataset:w,...y},f){const h=A(j,d.Box,[u("box-radius",v),u("background",g)]),L=O(p),S=k??I,T=[...h,...L],P={...N(y),ref:f,className:T.join(" "),...H(w,{preplyDsComponent:d.Box})};return o.jsx(S,{...P,children:m})});try{r.displayName="Box",r.__docgenInfo={description:"A styleable container.\n\nUse this with `Layout*` components to create complex content containers.",displayName:"Box",props:{background:{defaultValue:null,description:"",name:"background",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"disabled"'},{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'},{value:'"overlay"'},{value:'"brand"'},{value:'"brandB2b"'},{value:'"accentLight"'},{value:'"positiveLight"'},{value:'"positiveDark"'},{value:'"infoLight"'},{value:'"infoDark"'},{value:'"warningLight"'},{value:'"warningDark"'},{value:'"criticalLight"'},{value:'"criticalDark"'},{value:'"statusOnline"'},{value:'"statusOffline"'},{value:'"primaryInverted"'},{value:'"secondaryInverted"'},{value:'"tertiaryInverted"'}]}},radius:{defaultValue:{value:"m"},description:"",name:"radius",required:!1,type:{name:"enum",value:[{value:'"m"'},{value:'"l"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:'"none"'},{value:'"0"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:"ResponsiveProp<BoxRadius>"}]}},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"'}]}},padding:{defaultValue:{value:"s"},description:"",name:"padding",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"2xs"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:'"none"'},{value:'"3xs"'},{value:'"0"'},{value:'"1"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:'"20"'},{value:"[Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing, Spacing]"},{value:"[BoxPadding, BoxPadding]"},{value:"[BoxPadding, BoxPadding, BoxPadding]"},{value:"[BoxPadding, BoxPadding, BoxPadding, BoxPadding]"},{value:"ResponsiveProp<ShortHand<Spacing> | ShortHand<BoxPadding>>"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: HTMLElement | null) => void"},{value:"RefObject<HTMLElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const eo={title:"components/Box",component:r,argTypes:{radius:{description:U},padding:{description:C}}},a=()=>o.jsx(r,{background:"positiveLight",children:o.jsxs(B,{gap:"xs",direction:"column",children:[o.jsx(b,{level:"h3",accent:"positive",children:"Heading"}),o.jsx(_,{accent:"positive",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed metus nisi, ornare sit amet elit ut, porttitor commodo ipsum. Aliquam vel est quis erat sagittis posuere et vitae eros"})]})});a.storyName="Box";const e={parameters:{chromatic:{disableSnapshot:!0}},args:{background:void 0,radius:void 0,padding:void 0,children:o.jsxs(B,{gap:"16",direction:"column",children:[o.jsx(b,{variant:"large",tag:"h3",children:"Heading"}),o.jsx(_,{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed metus nisi, ornare sit amet elit ut, porttitor commodo ipsum. Aliquam vel est quis erat sagittis posuere et vitae eros"})]}),dataset:{qaid:"box"}},argTypes:{children:{control:!1},dataset:{control:"object"}}};var i,x,s;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`() => <Box background="positiveLight">
|
2
2
|
<LayoutFlex gap="xs" direction="column">
|
3
3
|
<Heading level="h3" accent="positive">
|
4
4
|
Heading
|