@preply/ds-docs 1.4.3 → 1.4.4
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/config/manager-head.html +20 -0
- package/dist/assets/{00.LayoutFlex.stories-CQpwpBFr.js → 00.LayoutFlex.stories-DpwxtJTp.js} +1 -1
- package/dist/assets/{00.applications-Mbm9tl1L.js → 00.applications-wYAscLrp.js} +1 -1
- package/dist/assets/{00.favicons.guide-WYb90WDh.js → 00.favicons.guide-Cmq86y8N.js} +1 -1
- package/dist/assets/{00.token-explorer-CG4uPgKO.js → 00.token-explorer-DKLbQhCq.js} +1 -1
- package/dist/assets/{00.using-responsive-props-BCXlE4FK.js → 00.using-responsive-props-B-o8LrxD.js} +1 -1
- package/dist/assets/{01.semantic-tokens-BSiM6jeE.js → 01.semantic-tokens-DXleOvsE.js} +1 -1
- package/dist/assets/{01.using-shorthand-props-BWE623-K.js → 01.using-shorthand-props--KA-0GLf.js} +1 -1
- package/dist/assets/{10.Combinations.stories-C3N8dqV2.js → 10.Combinations.stories-4Iy0kXta.js} +1 -1
- package/dist/assets/{10.fonts.guide-oxszrKa_.js → 10.fonts.guide-ByO0-0RY.js} +1 -1
- package/dist/assets/{10.ssr-BsdOtfhp.js → 10.ssr-D2aeaXs-.js} +1 -1
- package/dist/assets/{11.languageFont.explorer-0rlDFUYo.js → 11.languageFont.explorer-CmdT8k4K.js} +1 -1
- package/dist/assets/{11.ssr.app-router-Bye4rCeb.js → 11.ssr.app-router-DqdnRV_c.js} +1 -1
- package/dist/assets/{20.libraries-CTwefBj2.js → 20.libraries-B3Cft_nb.js} +1 -1
- package/dist/assets/{30.icons.explorer-n6nE1o81.js → 30.icons.explorer-Bmrqscgu.js} +10 -7
- package/dist/assets/{30.storybook-D9-Twxkn.js → 30.storybook-R9v7sRSV.js} +1 -1
- package/dist/assets/{40.illustrations.explorer-YO04df6b.js → 40.illustrations.explorer-LXtX_ur-.js} +1 -1
- package/dist/assets/{90.advanced-BXQFnjVT.js → 90.advanced-_bZiZFqR.js} +1 -1
- package/dist/assets/AlertDialog-CSnYdPB1.css +1 -0
- package/dist/assets/{AlertDialog.stories-BI6dnBdp.js → AlertDialog.stories-D8vcsOmp.js} +2 -2
- package/dist/assets/Avatar--MVvSybN.css +1 -0
- package/dist/assets/Avatar-BGgXJkzu.js +1 -0
- package/dist/assets/Avatar-DFURPdff.js +6 -0
- package/dist/assets/Avatar-NBWu859l.css +1 -0
- package/dist/assets/{Avatar.stories-Ci8GF7qg.js → Avatar.stories-BV-Xj66P.js} +1 -1
- package/dist/assets/AvatarWithStatus-B8SIoM-R.css +1 -0
- package/dist/assets/{AvatarWithStatus.stories-nwRdeLSv.js → AvatarWithStatus.stories-AvBfHQYz.js} +3 -3
- package/dist/assets/Badge-D59TIh89.css +1 -0
- package/dist/assets/{Badge.stories-DFEIq5GM.js → Badge.stories-C3ulxgrr.js} +2 -2
- package/dist/assets/Box-Ct0n6z_t.css +1 -0
- package/dist/assets/Box.stories-BNsIA3d8.js +44 -0
- package/dist/assets/{Button-COvs-WT9.js → Button--lO4Yh1G.js} +1 -1
- package/dist/assets/Button-CVPaYo8O.css +1 -0
- package/dist/assets/{Button-ClaaA27g.css → Button-CY3D2cek.css} +1 -1
- package/dist/assets/Button-DvCccsc-.js +1 -0
- package/dist/assets/{Button.stories-ompQpE7u.js → Button.stories-DMVT-_Q8.js} +1 -1
- package/dist/assets/{ButtonBase-BiHsr0j0.css → ButtonBase-CsTqBYW3.css} +1 -1
- package/dist/assets/ButtonBase-Dkj04_D4.js +8 -0
- package/dist/assets/Chips-BNBLB399.css +1 -0
- package/dist/assets/{Chips.stories-B3MMLC6G.js → Chips.stories-BU1HCNoh.js} +7 -7
- package/dist/assets/{Color-YHDXOIA2-BrFoM0Yb.js → Color-YHDXOIA2-B5aq5eVp.js} +1 -1
- package/dist/assets/Dialog-tifoKegY.css +1 -0
- package/dist/assets/{Dialog.stories-CKUsFyjr.js → Dialog.stories-XFch9-mS.js} +7 -7
- package/dist/assets/{DocsRenderer-CFRXHY34-BETkuvO-.js → DocsRenderer-CFRXHY34-c_QYP7eP.js} +1 -1
- package/dist/assets/FieldAdditionalText-C4B6VDoD.css +1 -0
- package/dist/assets/FieldAdditionalText-CKHYGNW7.js +1 -0
- package/dist/assets/{FieldAdditionalText.stories-CeEuZK9j.js → FieldAdditionalText.stories-CVusiSCI.js} +1 -1
- package/dist/assets/{FieldButton-DcagrCQ8.js → FieldButton-BHdIAkLC.js} +1 -1
- package/dist/assets/{FieldButton-Ds2WVp20.css → FieldButton-CTAfexFP.css} +1 -1
- package/dist/assets/{FieldButton.stories-B_91sVXO.js → FieldButton.stories-AQCfipBv.js} +1 -1
- package/dist/assets/{FieldLayout-CnOMTl8s.js → FieldLayout-C6jJAsSQ.js} +1 -1
- package/dist/assets/FieldLayout-DifBsHps.css +1 -0
- package/dist/assets/{FieldLayout.stories-D7mYNA3d.js → FieldLayout.stories-BgEtPomu.js} +1 -1
- package/dist/assets/FieldLayoutBase-D9mjZNPE.css +1 -0
- package/dist/assets/{FieldLayoutBase-DaTu5RGY.js → FieldLayoutBase-zAW0g1db.js} +3 -3
- package/dist/assets/{Heading-4oJssLU4.css → Heading-BvSqAYGI.css} +1 -1
- package/dist/assets/Heading-Cg5f4C-X.js +2 -0
- package/dist/assets/{Heading.stories-B6BMelUD.js → Heading.stories-D7SzKy3Y.js} +1 -1
- package/dist/assets/Icon-BlaIobPP.css +1 -0
- package/dist/assets/Icon-BuIMdXyr.js +1 -0
- package/dist/assets/Icon-DtwEs6ju.css +1 -0
- package/dist/assets/Icon-HJaiOMko.js +8 -0
- package/dist/assets/{Icon-RSC-DDUB9nvX.js → Icon-RSC-DOvxTS90.js} +1 -1
- package/dist/assets/{Icon.stories-BGWBmrJE.js → Icon.stories-DHVy5UW-.js} +1 -1
- package/dist/assets/{IconButton-t5L07D8U.js → IconButton-D5CnObTI.js} +1 -1
- package/dist/assets/InputText-EVfxq_T2.js +5 -0
- package/dist/assets/{LayoutFlex-DPsMHj0r.js → LayoutFlex-UU1ucYPu.js} +1 -1
- package/dist/assets/{LayoutFlex-DWJvHMlJ.js → LayoutFlex-lI53uYQd.js} +1 -1
- package/dist/assets/LayoutFlexItem-B1NvlT30.css +1 -0
- package/dist/assets/LayoutFlexItem-CybocGbI.js +1 -0
- package/dist/assets/LayoutGrid-CfIOI-nk.css +1 -0
- package/dist/assets/LayoutGrid-Dc2C_JKc.css +1 -0
- package/dist/assets/LayoutGrid-_f_RSZJp.js +1 -0
- package/dist/assets/{LayoutGrid.stories-BTiFzLOs.js → LayoutGrid.stories-DqxNPd6u.js} +3 -3
- package/dist/assets/LayoutGridItem-7WPKNMJF.js +1 -0
- package/dist/assets/LayoutGridItem-CtiPJzr6.css +1 -0
- package/dist/assets/Link-DigYYGPa.css +1 -0
- package/dist/assets/{Link.stories-BioapyOJ.js → Link.stories-CL1Bi1k1.js} +7 -7
- package/dist/assets/Loader-BWwla6y5.css +1 -0
- package/dist/assets/{Loader.stories-Cmev743o.js → Loader.stories-DpEPj4bg.js} +1 -1
- package/dist/assets/NumberField.stories-Bn0jrvvK.js +203 -0
- package/dist/assets/{ObserveIntersection-D396wl1Z.js → ObserveIntersection-Ccn6ggRl.js} +1 -1
- package/dist/assets/{ObserveIntersection.stories-DIe0cEvy.js → ObserveIntersection.stories-CK5RwCMK.js} +1 -1
- package/dist/assets/{OnboardingTooltip-C6QmQ6M4.js → OnboardingTooltip-BL1bmbYk.js} +1 -1
- package/dist/assets/OnboardingTooltip-CHXBh7ZS.css +1 -0
- package/dist/assets/{OnboardingTooltip.stories-U7tnhack.js → OnboardingTooltip.stories-D2XnE0GT.js} +1 -1
- package/dist/assets/{OnboardingTooltip.tests.stories-DUKQA1hD.js → OnboardingTooltip.tests.stories-8i06Olgs.js} +1 -1
- package/dist/assets/{OnboardingTour-BJsn9jpi.css → OnboardingTour-9p_31-ki.css} +1 -1
- package/dist/assets/{OnboardingTour-Dun5rZkn.js → OnboardingTour-CVkV02eo.js} +1 -1
- package/dist/assets/{OnboardingTour.stories-MuBPrYfD.js → OnboardingTour.stories-DIXYqOny.js} +2 -2
- package/dist/assets/{OnboardingTour.tests.stories-ZHjxkeQ9.js → OnboardingTour.tests.stories-CFNccHSX.js} +1 -1
- package/dist/assets/PasswordField.stories-COzbb2zK.js +203 -0
- package/dist/assets/PreplyLogo-DcMQNif8.css +1 -0
- package/dist/assets/{PreplyLogo.stories-C4QyROH-.js → PreplyLogo.stories-CA3CkUuj.js} +4 -4
- package/dist/assets/{ProgressBar-CBWfVwHl.css → ProgressBar-CEQWA8Sn.css} +1 -1
- package/dist/assets/{ProgressBar.stories-DmISlrXa.js → ProgressBar.stories-CvXFSoQr.js} +1 -1
- package/dist/assets/ProgressSteps-BQBqbETp.css +1 -0
- package/dist/assets/{ProgressSteps-DX68zFl0.js → ProgressSteps-CAnQm_sd.js} +1 -1
- package/dist/assets/{ProgressSteps.stories-CFg-Zw8N.js → ProgressSteps.stories-8aHsICK5.js} +1 -1
- package/dist/assets/RootProvider-Dg3JKPuS.js +1 -0
- package/dist/assets/SelectField-BOrSP080.css +1 -0
- package/dist/assets/SelectField.stories-B5pxzgIZ.js +182 -0
- package/dist/assets/{ShowOnIntersection.stories-BYz5GE4A.js → ShowOnIntersection.stories-D4B8EpSn.js} +1 -1
- package/dist/assets/Spinner-DbhUuj1k.css +1 -0
- package/dist/assets/{Spinner-BmqtByaF.js → Spinner-Dk9e5s4P.js} +1 -1
- package/dist/assets/{Steps-DF-nuV0r.js → Steps-CnGmvaP_.js} +2 -2
- package/dist/assets/Steps-DOnBcrau.css +1 -0
- package/dist/assets/{Steps.stories-Bl3rC3tB.js → Steps.stories-C7qCDBrt.js} +1 -1
- package/dist/assets/Text-BJjb7u-q.js +1 -0
- package/dist/assets/{Text-C57iIFrB.css → Text-D5ToABX_.css} +1 -1
- package/dist/assets/Text-iKSwUrVW.js +1 -0
- package/dist/assets/{Text.stories-CRsvV8RJ.js → Text.stories-DGsFFNI5.js} +1 -1
- package/dist/assets/TextField-Cm0m1ron.js +1 -0
- package/dist/assets/TextField-DZvAqdie.css +1 -0
- package/dist/assets/{TextField.stories-CVj_jcVs.js → TextField.stories-H1HJ1OEv.js} +1 -1
- package/dist/assets/TextHighlighted-BTkNY-jd.css +1 -0
- package/dist/assets/TextHighlighted-Bg5tITDd.js +1 -0
- package/dist/assets/{TextHighlighted.stories-TRvVYByW.js → TextHighlighted.stories-DiOcUHCK.js} +1 -1
- package/dist/assets/TextInline-BHcXVM9p.css +1 -0
- package/dist/assets/{TextInline.stories-Dwp1YyrO.js → TextInline.stories-CNbUmCkc.js} +1 -1
- package/dist/assets/TextareaField.stories-CZwY0iIU.js +221 -0
- package/dist/assets/Toast-DGK4QAz7.css +1 -0
- package/dist/assets/{Toast.stories-Biw6si0p.js → Toast.stories-CB7pUdgI.js} +2 -2
- package/dist/assets/Tooltip-BxXbwB2D.css +1 -0
- package/dist/assets/{Tooltip-C8TiSVfN.js → Tooltip-Cw4QAB6t.js} +1 -1
- package/dist/assets/{Tooltip.stories-2Ql_m8AA.js → Tooltip.stories-ByuW8j2m.js} +1 -1
- package/dist/assets/{Tooltip.tests.stories-Dhvul9uf.js → Tooltip.tests.stories-CRD9wLrM.js} +1 -1
- package/dist/assets/{breakpoints-CUfFCyvn.js → breakpoints-BoXYqY0V.js} +1 -1
- package/dist/assets/{breakpoints-B_UT1zHj.js → breakpoints-CX5v0Wpl.js} +1 -1
- package/dist/assets/{breakpoints-G1prPZ-_.js → breakpoints-CeECfjUn.js} +1 -1
- package/dist/assets/{changelog-wUoWC9JB.js → changelog-DYXixy1l.js} +105 -95
- package/dist/assets/{entry-preview-B6s8fdeP.js → entry-preview-EXwbkmIV.js} +1 -1
- package/dist/assets/{getTokenVar-Cm8Hrfw5.js → getTokenVar-DeIODCru.js} +1 -1
- package/dist/assets/{hover-BZ9GWD6i.js → hover-DVpEKjsl.js} +1 -1
- package/dist/assets/{hover-QoG-Aw1V.js → hover-LL7UF1Iq.js} +1 -1
- package/dist/assets/{hover-CVuE2EdV.js → hover-hsVSNW-E.js} +1 -1
- package/dist/assets/{iframe-Cb21JL3A.js → iframe-C_A2KsDR.js} +2 -2
- package/dist/assets/{index-Dl0kr_VJ.js → index-C8SCPFy3.js} +3 -3
- package/dist/assets/{index-CsopvqxJ.js → index-M70qAFbw.js} +1 -1
- package/dist/assets/{intro-Dst0gh7V.js → intro-BK_zt7Me.js} +1 -1
- package/dist/assets/layout-relative-BtSwpJDo.css +1 -0
- package/dist/assets/layout-relative-Bu9rryEC.css +1 -0
- package/dist/assets/layout-relative-CDPZK-Zz.css +1 -0
- package/dist/assets/layout-relative-Dcwg9O77.js +1 -0
- package/dist/assets/layout-relative.module-BNXaOnm9-CvugzKJw.js +1 -0
- package/dist/assets/layout-relative.module-lqlc9jak.js +1 -0
- package/dist/assets/{migrating-from-less-Bt8JVIac.js → migrating-from-less-CuDxQ-vy.js} +1 -1
- package/dist/assets/playground-CqsK7cT4.css +1 -0
- package/dist/assets/{playground.stories-BA5seiLe.js → playground.stories-4Jbu1wBr.js} +170 -170
- package/dist/assets/{preview-DFPubP5B.js → preview-6UKRD9Gn.js} +1 -1
- package/dist/assets/{preview-B-4B_khw.js → preview-Dp5xV5Gp.js} +2 -2
- package/dist/assets/{preview-hMa3Y1xy.js → preview-oQQvXgEp.js} +1 -1
- package/dist/assets/text-accent-BEadeAJN.js +1 -0
- package/dist/assets/text-accent-CJprBBxH.js +1 -0
- package/dist/assets/text-accent-DKdRxsM7.css +1 -0
- package/dist/assets/text-centered-CDTMNY-2.js +1 -0
- package/dist/assets/text-centered-Cw2_gEBO.css +1 -0
- package/dist/assets/text-centered-DCHvpQYe.css +1 -0
- package/dist/assets/text-centered-xX5SuJ5T.js +1 -0
- package/dist/assets/{tokens-Cc3okQu4.js → tokens-B5AFVl09.js} +1 -1
- package/dist/assets/{tokens-kSXR3wSb.js → tokens-D--P8S_2.js} +1 -1
- package/dist/assets/{tokens-ClkBQdOg.js → tokens-DRE8AnY2.js} +1 -1
- package/dist/assets/{usePortalElement-DIAQKTtU.js → usePortalElement-DMTkFKwz.js} +1 -1
- package/dist/assets/{welcome-CReKbWWS.js → welcome-DfVY--k5.js} +1 -1
- package/dist/assets/{zeroheight-DfgR4LgT.js → zeroheight-Tl1JUkJ3.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.html +20 -0
- package/dist/preview-stats.json +1700 -1700
- package/dist/project.json +1 -1
- package/package.json +3 -3
- package/dist/assets/AlertDialog-C8C2kzLT.css +0 -1
- package/dist/assets/Avatar-BSlj6yko.js +0 -1
- package/dist/assets/Avatar-DJdEnKaL.js +0 -6
- package/dist/assets/Avatar-DZCUEanO.css +0 -1
- package/dist/assets/Avatar-fqNH9-vo.css +0 -1
- package/dist/assets/AvatarWithStatus-CEyIZEXJ.css +0 -1
- package/dist/assets/Badge-DOPey97c.css +0 -1
- package/dist/assets/Box-DMXNufME.css +0 -1
- package/dist/assets/Box.stories-C0ffVUSP.js +0 -44
- package/dist/assets/Button-B5AU8t_B.css +0 -1
- package/dist/assets/Button-aNfyJQT6.js +0 -1
- package/dist/assets/ButtonBase-B-96BnyO.js +0 -8
- package/dist/assets/Chips-B9tN6418.css +0 -1
- package/dist/assets/Dialog-yFesJ-1y.css +0 -1
- package/dist/assets/FieldAdditionalText-BpdxRR9p.css +0 -1
- package/dist/assets/FieldAdditionalText-Cxqy7mdI.js +0 -1
- package/dist/assets/FieldLayout-gu3ZOprL.css +0 -1
- package/dist/assets/FieldLayoutBase-C3vxtn8M.css +0 -1
- package/dist/assets/Heading-x9qmcX15.js +0 -2
- package/dist/assets/Icon-BCL3U29b.js +0 -8
- package/dist/assets/Icon-CbdpJGdV.js +0 -1
- package/dist/assets/Icon-DcBo297y.css +0 -1
- package/dist/assets/Icon-w1-Pci0g.css +0 -1
- package/dist/assets/InputText-B7nkpdcE.js +0 -5
- package/dist/assets/LayoutFlexItem-B5jT-Jb5.js +0 -1
- package/dist/assets/LayoutFlexItem-BHIyHIC0.css +0 -1
- package/dist/assets/LayoutGrid-BE0t6Vjv.css +0 -1
- package/dist/assets/LayoutGrid-BPI2OONd.css +0 -1
- package/dist/assets/LayoutGrid-IsN1xiNR.js +0 -1
- package/dist/assets/LayoutGridItem-BoV0TprN.css +0 -1
- package/dist/assets/LayoutGridItem-DoY9oFwT.js +0 -1
- package/dist/assets/Link-KgMCDoEO.css +0 -1
- package/dist/assets/Loader-Cb3g0jkp.css +0 -1
- package/dist/assets/NumberField.stories-BKSkXxOY.js +0 -203
- package/dist/assets/OnboardingTooltip-m5nsSh3_.css +0 -1
- package/dist/assets/PasswordField.stories-CIfqwh2L.js +0 -203
- package/dist/assets/PreplyLogo-CB8p8DAS.css +0 -1
- package/dist/assets/ProgressSteps-BY2WWAe6.css +0 -1
- package/dist/assets/RootProvider-o_gxYeLh.js +0 -1
- package/dist/assets/SelectField-DG0p9ezC.css +0 -1
- package/dist/assets/SelectField.stories-_XAhNcCG.js +0 -182
- package/dist/assets/Spinner-ZDzW_9X4.css +0 -1
- package/dist/assets/Steps-Cxg4_yWg.css +0 -1
- package/dist/assets/Text-DRPK601D.js +0 -1
- package/dist/assets/Text-WS7Bdore.js +0 -1
- package/dist/assets/TextField-BcWoR3uH.js +0 -1
- package/dist/assets/TextField-CPALlvVS.css +0 -1
- package/dist/assets/TextHighlighted-BYPgGvnl.js +0 -1
- package/dist/assets/TextHighlighted-CEnKKn7p.css +0 -1
- package/dist/assets/TextInline-C2oRwfiB.css +0 -1
- package/dist/assets/TextareaField.stories-D5Hhx-hP.js +0 -221
- package/dist/assets/Toast-ByHRc2jt.css +0 -1
- package/dist/assets/Tooltip-BfH_0PT3.css +0 -1
- package/dist/assets/layout-relative-B1RJCRWS.css +0 -1
- package/dist/assets/layout-relative-BX4afYg4.js +0 -1
- package/dist/assets/layout-relative-C0j_3nlP.css +0 -1
- package/dist/assets/layout-relative-Can2t_0C.css +0 -1
- package/dist/assets/layout-relative.module-CpQbo91e-wKldJApF.js +0 -1
- package/dist/assets/layout-relative.module-IN4igp-_.js +0 -1
- package/dist/assets/playground-DgTGJcE5.css +0 -1
- package/dist/assets/text-accent-BqZbJG9z.js +0 -1
- package/dist/assets/text-accent-DEvzdotz.js +0 -1
- package/dist/assets/text-accent-eC5rHFDr.css +0 -1
- package/dist/assets/text-centered-7-NHbkTa.js +0 -1
- package/dist/assets/text-centered-BLjliCzN.js +0 -1
- package/dist/assets/text-centered-DNfnrRY6.css +0 -1
- package/dist/assets/text-centered-DiwnyevC.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as v}from"./jsx-runtime-BTJTZTIL.js";import{r as w}from"./index-Cb9e4tly.js";import{m as o,b as L,a as g,s as u}from"./classNames-BUL1Zq7e.js";import{B as p}from"./breakpoints-BfMlrtxE.js";import{a as b,b as h,s as A,g as C}from"./layout-relative.module-BNXaOnm9-CvugzKJw.js";import{L as N}from"./constants-DYYVurUY.js";import{k as T,f as U,L as I}from"./defaults-B1rzzf6M.js";import{f as O}from"./filterHTMLAttributes-UOns5Q7s.js";import{g as D}from"./index-DdzHuZ-Y.js";import{w as E}from"./componentNames-Bwls0I02.js";const R="LayoutHide",Y=(t,i=N)=>o(b,R,[L("hide",i,t)]),$="LayoutRelative",P=t=>o(h,$,[L("relative",void 0,t)]),x="_LayoutGrid_ljfvs_4",j={LayoutGrid:x,"LayoutGrid--justify-content-center":"_LayoutGrid--justify-content-center_ljfvs_14","LayoutGrid--justify-content-start":"_LayoutGrid--justify-content-start_ljfvs_17","LayoutGrid--justify-content-end":"_LayoutGrid--justify-content-end_ljfvs_20","LayoutGrid--justify-content-space-between":"_LayoutGrid--justify-content-space-between_ljfvs_23","LayoutGrid--justify-content-space-around":"_LayoutGrid--justify-content-space-around_ljfvs_26","LayoutGrid--justify-content-space-evenly":"_LayoutGrid--justify-content-space-evenly_ljfvs_29","LayoutGrid--narrow-l--justify-content-center":"_LayoutGrid--narrow-l--justify-content-center_ljfvs_33","LayoutGrid--narrow-l--justify-content-start":"_LayoutGrid--narrow-l--justify-content-start_ljfvs_36","LayoutGrid--narrow-l--justify-content-end":"_LayoutGrid--narrow-l--justify-content-end_ljfvs_39","LayoutGrid--narrow-l--justify-content-space-between":"_LayoutGrid--narrow-l--justify-content-space-between_ljfvs_42","LayoutGrid--narrow-l--justify-content-space-around":"_LayoutGrid--narrow-l--justify-content-space-around_ljfvs_45","LayoutGrid--narrow-l--justify-content-space-evenly":"_LayoutGrid--narrow-l--justify-content-space-evenly_ljfvs_48","LayoutGrid--medium-s--justify-content-center":"_LayoutGrid--medium-s--justify-content-center_ljfvs_53","LayoutGrid--medium-s--justify-content-start":"_LayoutGrid--medium-s--justify-content-start_ljfvs_56","LayoutGrid--medium-s--justify-content-end":"_LayoutGrid--medium-s--justify-content-end_ljfvs_59","LayoutGrid--medium-s--justify-content-space-between":"_LayoutGrid--medium-s--justify-content-space-between_ljfvs_62","LayoutGrid--medium-s--justify-content-space-around":"_LayoutGrid--medium-s--justify-content-space-around_ljfvs_65","LayoutGrid--medium-s--justify-content-space-evenly":"_LayoutGrid--medium-s--justify-content-space-evenly_ljfvs_68","LayoutGrid--medium-l--justify-content-center":"_LayoutGrid--medium-l--justify-content-center_ljfvs_73","LayoutGrid--medium-l--justify-content-start":"_LayoutGrid--medium-l--justify-content-start_ljfvs_76","LayoutGrid--medium-l--justify-content-end":"_LayoutGrid--medium-l--justify-content-end_ljfvs_79","LayoutGrid--medium-l--justify-content-space-between":"_LayoutGrid--medium-l--justify-content-space-between_ljfvs_82","LayoutGrid--medium-l--justify-content-space-around":"_LayoutGrid--medium-l--justify-content-space-around_ljfvs_85","LayoutGrid--medium-l--justify-content-space-evenly":"_LayoutGrid--medium-l--justify-content-space-evenly_ljfvs_88","LayoutGrid--wide-s--justify-content-center":"_LayoutGrid--wide-s--justify-content-center_ljfvs_93","LayoutGrid--wide-s--justify-content-start":"_LayoutGrid--wide-s--justify-content-start_ljfvs_96","LayoutGrid--wide-s--justify-content-end":"_LayoutGrid--wide-s--justify-content-end_ljfvs_99","LayoutGrid--wide-s--justify-content-space-between":"_LayoutGrid--wide-s--justify-content-space-between_ljfvs_102","LayoutGrid--wide-s--justify-content-space-around":"_LayoutGrid--wide-s--justify-content-space-around_ljfvs_105","LayoutGrid--wide-s--justify-content-space-evenly":"_LayoutGrid--wide-s--justify-content-space-evenly_ljfvs_108","LayoutGrid--wide-l--justify-content-center":"_LayoutGrid--wide-l--justify-content-center_ljfvs_113","LayoutGrid--wide-l--justify-content-start":"_LayoutGrid--wide-l--justify-content-start_ljfvs_116","LayoutGrid--wide-l--justify-content-end":"_LayoutGrid--wide-l--justify-content-end_ljfvs_119","LayoutGrid--wide-l--justify-content-space-between":"_LayoutGrid--wide-l--justify-content-space-between_ljfvs_122","LayoutGrid--wide-l--justify-content-space-around":"_LayoutGrid--wide-l--justify-content-space-around_ljfvs_125","LayoutGrid--wide-l--justify-content-space-evenly":"_LayoutGrid--wide-l--justify-content-space-evenly_ljfvs_128","LayoutGrid--align-items-center":"_LayoutGrid--align-items-center_ljfvs_132","LayoutGrid--align-items-start":"_LayoutGrid--align-items-start_ljfvs_135","LayoutGrid--align-items-end":"_LayoutGrid--align-items-end_ljfvs_138","LayoutGrid--align-items-stretch":"_LayoutGrid--align-items-stretch_ljfvs_141","LayoutGrid--align-items-baseline":"_LayoutGrid--align-items-baseline_ljfvs_144","LayoutGrid--narrow-l--align-items-center":"_LayoutGrid--narrow-l--align-items-center_ljfvs_148","LayoutGrid--narrow-l--align-items-start":"_LayoutGrid--narrow-l--align-items-start_ljfvs_151","LayoutGrid--narrow-l--align-items-end":"_LayoutGrid--narrow-l--align-items-end_ljfvs_154","LayoutGrid--narrow-l--align-items-stretch":"_LayoutGrid--narrow-l--align-items-stretch_ljfvs_157","LayoutGrid--narrow-l--align-items-baseline":"_LayoutGrid--narrow-l--align-items-baseline_ljfvs_160","LayoutGrid--medium-s--align-items-center":"_LayoutGrid--medium-s--align-items-center_ljfvs_165","LayoutGrid--medium-s--align-items-start":"_LayoutGrid--medium-s--align-items-start_ljfvs_168","LayoutGrid--medium-s--align-items-end":"_LayoutGrid--medium-s--align-items-end_ljfvs_171","LayoutGrid--medium-s--align-items-stretch":"_LayoutGrid--medium-s--align-items-stretch_ljfvs_174","LayoutGrid--medium-s--align-items-baseline":"_LayoutGrid--medium-s--align-items-baseline_ljfvs_177","LayoutGrid--medium-l--align-items-center":"_LayoutGrid--medium-l--align-items-center_ljfvs_182","LayoutGrid--medium-l--align-items-start":"_LayoutGrid--medium-l--align-items-start_ljfvs_185","LayoutGrid--medium-l--align-items-end":"_LayoutGrid--medium-l--align-items-end_ljfvs_188","LayoutGrid--medium-l--align-items-stretch":"_LayoutGrid--medium-l--align-items-stretch_ljfvs_191","LayoutGrid--medium-l--align-items-baseline":"_LayoutGrid--medium-l--align-items-baseline_ljfvs_194","LayoutGrid--wide-s--align-items-center":"_LayoutGrid--wide-s--align-items-center_ljfvs_199","LayoutGrid--wide-s--align-items-start":"_LayoutGrid--wide-s--align-items-start_ljfvs_202","LayoutGrid--wide-s--align-items-end":"_LayoutGrid--wide-s--align-items-end_ljfvs_205","LayoutGrid--wide-s--align-items-stretch":"_LayoutGrid--wide-s--align-items-stretch_ljfvs_208","LayoutGrid--wide-s--align-items-baseline":"_LayoutGrid--wide-s--align-items-baseline_ljfvs_211","LayoutGrid--wide-l--align-items-center":"_LayoutGrid--wide-l--align-items-center_ljfvs_216","LayoutGrid--wide-l--align-items-start":"_LayoutGrid--wide-l--align-items-start_ljfvs_219","LayoutGrid--wide-l--align-items-end":"_LayoutGrid--wide-l--align-items-end_ljfvs_222","LayoutGrid--wide-l--align-items-stretch":"_LayoutGrid--wide-l--align-items-stretch_ljfvs_225","LayoutGrid--wide-l--align-items-baseline":"_LayoutGrid--wide-l--align-items-baseline_ljfvs_228","LayoutGrid--justify-items-stretch":"_LayoutGrid--justify-items-stretch_ljfvs_232","LayoutGrid--justify-items-center":"_LayoutGrid--justify-items-center_ljfvs_235","LayoutGrid--justify-items-start":"_LayoutGrid--justify-items-start_ljfvs_238","LayoutGrid--justify-items-end":"_LayoutGrid--justify-items-end_ljfvs_241","LayoutGrid--narrow-l--justify-items-stretch":"_LayoutGrid--narrow-l--justify-items-stretch_ljfvs_245","LayoutGrid--narrow-l--justify-items-center":"_LayoutGrid--narrow-l--justify-items-center_ljfvs_248","LayoutGrid--narrow-l--justify-items-start":"_LayoutGrid--narrow-l--justify-items-start_ljfvs_251","LayoutGrid--narrow-l--justify-items-end":"_LayoutGrid--narrow-l--justify-items-end_ljfvs_254","LayoutGrid--medium-s--justify-items-stretch":"_LayoutGrid--medium-s--justify-items-stretch_ljfvs_259","LayoutGrid--medium-s--justify-items-center":"_LayoutGrid--medium-s--justify-items-center_ljfvs_262","LayoutGrid--medium-s--justify-items-start":"_LayoutGrid--medium-s--justify-items-start_ljfvs_265","LayoutGrid--medium-s--justify-items-end":"_LayoutGrid--medium-s--justify-items-end_ljfvs_268","LayoutGrid--medium-l--justify-items-stretch":"_LayoutGrid--medium-l--justify-items-stretch_ljfvs_273","LayoutGrid--medium-l--justify-items-center":"_LayoutGrid--medium-l--justify-items-center_ljfvs_276","LayoutGrid--medium-l--justify-items-start":"_LayoutGrid--medium-l--justify-items-start_ljfvs_279","LayoutGrid--medium-l--justify-items-end":"_LayoutGrid--medium-l--justify-items-end_ljfvs_282","LayoutGrid--wide-s--justify-items-stretch":"_LayoutGrid--wide-s--justify-items-stretch_ljfvs_287","LayoutGrid--wide-s--justify-items-center":"_LayoutGrid--wide-s--justify-items-center_ljfvs_290","LayoutGrid--wide-s--justify-items-start":"_LayoutGrid--wide-s--justify-items-start_ljfvs_293","LayoutGrid--wide-s--justify-items-end":"_LayoutGrid--wide-s--justify-items-end_ljfvs_296","LayoutGrid--wide-l--justify-items-stretch":"_LayoutGrid--wide-l--justify-items-stretch_ljfvs_301","LayoutGrid--wide-l--justify-items-center":"_LayoutGrid--wide-l--justify-items-center_ljfvs_304","LayoutGrid--wide-l--justify-items-start":"_LayoutGrid--wide-l--justify-items-start_ljfvs_307","LayoutGrid--wide-l--justify-items-end":"_LayoutGrid--wide-l--justify-items-end_ljfvs_310","LayoutGrid--columns":"_LayoutGrid--columns_ljfvs_314","LayoutGrid--columns-narrow-l":"_LayoutGrid--columns-narrow-l_ljfvs_318","LayoutGrid--columns-medium-s":"_LayoutGrid--columns-medium-s_ljfvs_323","LayoutGrid--columns-medium-l":"_LayoutGrid--columns-medium-l_ljfvs_328","LayoutGrid--columns-wide-s":"_LayoutGrid--columns-wide-s_ljfvs_333","LayoutGrid--columns-wide-l":"_LayoutGrid--columns-wide-l_ljfvs_338"},F="LayoutGrid",H=Object.keys(p),f=t=>typeof t=="number"?`repeat(${t}, 1fr)`:t.join(" "),z=t=>typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[a,e])=>({...i,...e?{[a]:f(e)}:{}}),{_:f(t._)}):{_:f(t)},S=t=>{if(!t)return{classNames:[],style:{}};const i=z(t),a=H.filter(s=>i[s]),e=g(j,F,["columns",...a.map(s=>`columns-${s}`)]),r=a.reduce((s,n)=>({...s,[`--columns-${n}`]:i[n]}),{"--columns":i._});return{classNames:e,style:r}},k="LayoutGap",K=t=>o(A,k,[u("gap",t)]),V="LayoutGrid",B=(t,i)=>{const{gap:a=T,padding:e=U,justifyContent:r,alignItems:s,justifyItems:n,hide:d,relative:y}=i||{},l=o(j,V,[u("justify-content",r),u("align-items",s),u("justify-items",n)]),_=K(a),m=C(e),c=Y(d,"grid"),G=P(y);return[...l,..._,...m,...c,...G]},M=w.forwardRef(function({dataset:i,children:a,...e},r){const{tag:s=I,columns:n}=e,d=B("grid",e),{style:y,classNames:l}=S(n),_=[...d,...l],m={...O(e),ref:r,className:_.join(" "),style:y,...D(i,{preplyDsComponent:E.LayoutGrid})};return v.jsx(s,{...m,children:a})});M.__docgenInfo={description:"",methods:[],displayName:"LayoutGrid"};export{M as L,P as a,Y as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as N}from"./index-Cb9e4tly.js";import{g as E,a as P,b as R}from"./layout-relative-BX4afYg4.js";import{f as A}from"./filterHTMLAttributes-DYdLqcvH.js";import{m as h,a as H,s as f}from"./classNames-BUL1Zq7e.js";import{g as T}from"./index-DdzHuZ-Y.js";import{L as V,k as U,f as $}from"./defaults-B1rzzf6M.js";import{w as j}from"./componentNames-Bwls0I02.js";import{B as W}from"./breakpoints-BfMlrtxE.js";import{s as Y,g as M}from"./layout-relative.module-IN4igp-_.js";import{S as o,a as z}from"./consts-KAYct7Gj.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./constants-DYYVurUY.js";const F="_LayoutGridItem_2tq6r_1",B={LayoutGridItem:F},L=N.forwardRef(function({children:i,alignSelf:s,tag:a,hide:r,relative:n,dataset:u,...l},d){const y=h(B,j.LayoutGridItem,[]),m=E(s),c=P(r),G=R(n),g=[...y,...m,...c,...G],O=a??V,D={...A(l),ref:d,className:g.join(" "),...T(u,{preplyDsComponent:j.LayoutGridItem})};return t.jsx(O,{...D,children:i})});try{L.displayName="LayoutGridItem",L.__docgenInfo={description:"",displayName:"LayoutGridItem",props:{alignSelf:{defaultValue:null,description:"",name:"alignSelf",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:"ResponsiveProp<LayoutAlignSelf>"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"div"'},{value:'"main"'},{value:'"header"'},{value:'"footer"'},{value:'"article"'},{value:'"section"'},{value:'"ul"'},{value:'"ol"'},{value:'"li"'},{value:'"p"'},{value:'"span"'},{value:'"fieldset"'},{value:'"table"'},{value:'"th"'},{value:'"tr"'},{value:'"td"'},{value:'"thead"'},{value:'"tfoot"'},{value:'"tbody"'},{value:'"caption"'},{value:'"figure"'},{value:'"figcaption"'}]}},hide:{defaultValue:null,description:"",name:"hide",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},relative:{defaultValue:null,description:"",name:"relative",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},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 J="_LayoutGrid_9ybe1_4",q={LayoutGrid:J,"LayoutGrid--justify-content-center":"_LayoutGrid--justify-content-center_9ybe1_14","LayoutGrid--justify-content-start":"_LayoutGrid--justify-content-start_9ybe1_17","LayoutGrid--justify-content-end":"_LayoutGrid--justify-content-end_9ybe1_20","LayoutGrid--justify-content-space-between":"_LayoutGrid--justify-content-space-between_9ybe1_23","LayoutGrid--justify-content-space-around":"_LayoutGrid--justify-content-space-around_9ybe1_26","LayoutGrid--justify-content-space-evenly":"_LayoutGrid--justify-content-space-evenly_9ybe1_29","LayoutGrid--narrow-l--justify-content-center":"_LayoutGrid--narrow-l--justify-content-center_9ybe1_33","LayoutGrid--narrow-l--justify-content-start":"_LayoutGrid--narrow-l--justify-content-start_9ybe1_36","LayoutGrid--narrow-l--justify-content-end":"_LayoutGrid--narrow-l--justify-content-end_9ybe1_39","LayoutGrid--narrow-l--justify-content-space-between":"_LayoutGrid--narrow-l--justify-content-space-between_9ybe1_42","LayoutGrid--narrow-l--justify-content-space-around":"_LayoutGrid--narrow-l--justify-content-space-around_9ybe1_45","LayoutGrid--narrow-l--justify-content-space-evenly":"_LayoutGrid--narrow-l--justify-content-space-evenly_9ybe1_48","LayoutGrid--medium-s--justify-content-center":"_LayoutGrid--medium-s--justify-content-center_9ybe1_53","LayoutGrid--medium-s--justify-content-start":"_LayoutGrid--medium-s--justify-content-start_9ybe1_56","LayoutGrid--medium-s--justify-content-end":"_LayoutGrid--medium-s--justify-content-end_9ybe1_59","LayoutGrid--medium-s--justify-content-space-between":"_LayoutGrid--medium-s--justify-content-space-between_9ybe1_62","LayoutGrid--medium-s--justify-content-space-around":"_LayoutGrid--medium-s--justify-content-space-around_9ybe1_65","LayoutGrid--medium-s--justify-content-space-evenly":"_LayoutGrid--medium-s--justify-content-space-evenly_9ybe1_68","LayoutGrid--medium-l--justify-content-center":"_LayoutGrid--medium-l--justify-content-center_9ybe1_73","LayoutGrid--medium-l--justify-content-start":"_LayoutGrid--medium-l--justify-content-start_9ybe1_76","LayoutGrid--medium-l--justify-content-end":"_LayoutGrid--medium-l--justify-content-end_9ybe1_79","LayoutGrid--medium-l--justify-content-space-between":"_LayoutGrid--medium-l--justify-content-space-between_9ybe1_82","LayoutGrid--medium-l--justify-content-space-around":"_LayoutGrid--medium-l--justify-content-space-around_9ybe1_85","LayoutGrid--medium-l--justify-content-space-evenly":"_LayoutGrid--medium-l--justify-content-space-evenly_9ybe1_88","LayoutGrid--wide-s--justify-content-center":"_LayoutGrid--wide-s--justify-content-center_9ybe1_93","LayoutGrid--wide-s--justify-content-start":"_LayoutGrid--wide-s--justify-content-start_9ybe1_96","LayoutGrid--wide-s--justify-content-end":"_LayoutGrid--wide-s--justify-content-end_9ybe1_99","LayoutGrid--wide-s--justify-content-space-between":"_LayoutGrid--wide-s--justify-content-space-between_9ybe1_102","LayoutGrid--wide-s--justify-content-space-around":"_LayoutGrid--wide-s--justify-content-space-around_9ybe1_105","LayoutGrid--wide-s--justify-content-space-evenly":"_LayoutGrid--wide-s--justify-content-space-evenly_9ybe1_108","LayoutGrid--wide-l--justify-content-center":"_LayoutGrid--wide-l--justify-content-center_9ybe1_113","LayoutGrid--wide-l--justify-content-start":"_LayoutGrid--wide-l--justify-content-start_9ybe1_116","LayoutGrid--wide-l--justify-content-end":"_LayoutGrid--wide-l--justify-content-end_9ybe1_119","LayoutGrid--wide-l--justify-content-space-between":"_LayoutGrid--wide-l--justify-content-space-between_9ybe1_122","LayoutGrid--wide-l--justify-content-space-around":"_LayoutGrid--wide-l--justify-content-space-around_9ybe1_125","LayoutGrid--wide-l--justify-content-space-evenly":"_LayoutGrid--wide-l--justify-content-space-evenly_9ybe1_128","LayoutGrid--align-items-center":"_LayoutGrid--align-items-center_9ybe1_132","LayoutGrid--align-items-start":"_LayoutGrid--align-items-start_9ybe1_135","LayoutGrid--align-items-end":"_LayoutGrid--align-items-end_9ybe1_138","LayoutGrid--align-items-stretch":"_LayoutGrid--align-items-stretch_9ybe1_141","LayoutGrid--align-items-baseline":"_LayoutGrid--align-items-baseline_9ybe1_144","LayoutGrid--narrow-l--align-items-center":"_LayoutGrid--narrow-l--align-items-center_9ybe1_148","LayoutGrid--narrow-l--align-items-start":"_LayoutGrid--narrow-l--align-items-start_9ybe1_151","LayoutGrid--narrow-l--align-items-end":"_LayoutGrid--narrow-l--align-items-end_9ybe1_154","LayoutGrid--narrow-l--align-items-stretch":"_LayoutGrid--narrow-l--align-items-stretch_9ybe1_157","LayoutGrid--narrow-l--align-items-baseline":"_LayoutGrid--narrow-l--align-items-baseline_9ybe1_160","LayoutGrid--medium-s--align-items-center":"_LayoutGrid--medium-s--align-items-center_9ybe1_165","LayoutGrid--medium-s--align-items-start":"_LayoutGrid--medium-s--align-items-start_9ybe1_168","LayoutGrid--medium-s--align-items-end":"_LayoutGrid--medium-s--align-items-end_9ybe1_171","LayoutGrid--medium-s--align-items-stretch":"_LayoutGrid--medium-s--align-items-stretch_9ybe1_174","LayoutGrid--medium-s--align-items-baseline":"_LayoutGrid--medium-s--align-items-baseline_9ybe1_177","LayoutGrid--medium-l--align-items-center":"_LayoutGrid--medium-l--align-items-center_9ybe1_182","LayoutGrid--medium-l--align-items-start":"_LayoutGrid--medium-l--align-items-start_9ybe1_185","LayoutGrid--medium-l--align-items-end":"_LayoutGrid--medium-l--align-items-end_9ybe1_188","LayoutGrid--medium-l--align-items-stretch":"_LayoutGrid--medium-l--align-items-stretch_9ybe1_191","LayoutGrid--medium-l--align-items-baseline":"_LayoutGrid--medium-l--align-items-baseline_9ybe1_194","LayoutGrid--wide-s--align-items-center":"_LayoutGrid--wide-s--align-items-center_9ybe1_199","LayoutGrid--wide-s--align-items-start":"_LayoutGrid--wide-s--align-items-start_9ybe1_202","LayoutGrid--wide-s--align-items-end":"_LayoutGrid--wide-s--align-items-end_9ybe1_205","LayoutGrid--wide-s--align-items-stretch":"_LayoutGrid--wide-s--align-items-stretch_9ybe1_208","LayoutGrid--wide-s--align-items-baseline":"_LayoutGrid--wide-s--align-items-baseline_9ybe1_211","LayoutGrid--wide-l--align-items-center":"_LayoutGrid--wide-l--align-items-center_9ybe1_216","LayoutGrid--wide-l--align-items-start":"_LayoutGrid--wide-l--align-items-start_9ybe1_219","LayoutGrid--wide-l--align-items-end":"_LayoutGrid--wide-l--align-items-end_9ybe1_222","LayoutGrid--wide-l--align-items-stretch":"_LayoutGrid--wide-l--align-items-stretch_9ybe1_225","LayoutGrid--wide-l--align-items-baseline":"_LayoutGrid--wide-l--align-items-baseline_9ybe1_228","LayoutGrid--justify-items-stretch":"_LayoutGrid--justify-items-stretch_9ybe1_232","LayoutGrid--justify-items-center":"_LayoutGrid--justify-items-center_9ybe1_235","LayoutGrid--justify-items-start":"_LayoutGrid--justify-items-start_9ybe1_238","LayoutGrid--justify-items-end":"_LayoutGrid--justify-items-end_9ybe1_241","LayoutGrid--narrow-l--justify-items-stretch":"_LayoutGrid--narrow-l--justify-items-stretch_9ybe1_245","LayoutGrid--narrow-l--justify-items-center":"_LayoutGrid--narrow-l--justify-items-center_9ybe1_248","LayoutGrid--narrow-l--justify-items-start":"_LayoutGrid--narrow-l--justify-items-start_9ybe1_251","LayoutGrid--narrow-l--justify-items-end":"_LayoutGrid--narrow-l--justify-items-end_9ybe1_254","LayoutGrid--medium-s--justify-items-stretch":"_LayoutGrid--medium-s--justify-items-stretch_9ybe1_259","LayoutGrid--medium-s--justify-items-center":"_LayoutGrid--medium-s--justify-items-center_9ybe1_262","LayoutGrid--medium-s--justify-items-start":"_LayoutGrid--medium-s--justify-items-start_9ybe1_265","LayoutGrid--medium-s--justify-items-end":"_LayoutGrid--medium-s--justify-items-end_9ybe1_268","LayoutGrid--medium-l--justify-items-stretch":"_LayoutGrid--medium-l--justify-items-stretch_9ybe1_273","LayoutGrid--medium-l--justify-items-center":"_LayoutGrid--medium-l--justify-items-center_9ybe1_276","LayoutGrid--medium-l--justify-items-start":"_LayoutGrid--medium-l--justify-items-start_9ybe1_279","LayoutGrid--medium-l--justify-items-end":"_LayoutGrid--medium-l--justify-items-end_9ybe1_282","LayoutGrid--wide-s--justify-items-stretch":"_LayoutGrid--wide-s--justify-items-stretch_9ybe1_287","LayoutGrid--wide-s--justify-items-center":"_LayoutGrid--wide-s--justify-items-center_9ybe1_290","LayoutGrid--wide-s--justify-items-start":"_LayoutGrid--wide-s--justify-items-start_9ybe1_293","LayoutGrid--wide-s--justify-items-end":"_LayoutGrid--wide-s--justify-items-end_9ybe1_296","LayoutGrid--wide-l--justify-items-stretch":"_LayoutGrid--wide-l--justify-items-stretch_9ybe1_301","LayoutGrid--wide-l--justify-items-center":"_LayoutGrid--wide-l--justify-items-center_9ybe1_304","LayoutGrid--wide-l--justify-items-start":"_LayoutGrid--wide-l--justify-items-start_9ybe1_307","LayoutGrid--wide-l--justify-items-end":"_LayoutGrid--wide-l--justify-items-end_9ybe1_310","LayoutGrid--columns":"_LayoutGrid--columns_9ybe1_314","LayoutGrid--columns-narrow-l":"_LayoutGrid--columns-narrow-l_9ybe1_318","LayoutGrid--columns-medium-s":"_LayoutGrid--columns-medium-s_9ybe1_323","LayoutGrid--columns-medium-l":"_LayoutGrid--columns-medium-l_9ybe1_328","LayoutGrid--columns-wide-s":"_LayoutGrid--columns-wide-s_9ybe1_333","LayoutGrid--columns-wide-l":"_LayoutGrid--columns-wide-l_9ybe1_338"},K="LayoutGrid",Q=Object.keys(W),b=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e.join(" "),X=e=>typeof e=="object"&&!Array.isArray(e)?Object.entries(e).reduce((i,[s,a])=>({...i,...a?{[s]:b(a)}:{}}),{_:b(e._)}):{_:b(e)},Z=e=>{if(!e)return{classNames:[],style:{}};const i=X(e),s=Q.filter(n=>i[n]),a=H(q,K,["columns",...s.map(n=>`columns-${n}`)]),r=s.reduce((n,u)=>({...n,[`--columns-${u}`]:i[u]}),{"--columns":i._});return{classNames:a,style:r}},ee="LayoutGap",te=e=>h(Y,ee,[f("gap",e)]),ae="LayoutGrid",ie=(e,i)=>{const{gap:s=U,padding:a=$,justifyContent:r,alignItems:n,justifyItems:u,hide:l,relative:d}=i||{},y=h(q,ae,[f("justify-content",r),f("align-items",n),f("justify-items",u)]),m=te(s),c=M(a),G=P(l,"grid"),g=R(d);return[...y,...m,...c,...G,...g]},v=N.forwardRef(function({dataset:i,children:s,...a},r){const{tag:n=V,columns:u}=a,l=ie("grid",a),{style:d,classNames:y}=Z(u),m=[...l,...y],c={...A(a),ref:r,className:m.join(" "),style:d,...T(i,{preplyDsComponent:j.LayoutGrid})};return t.jsx(n,{...c,children:s})});try{v.displayName="LayoutGrid",v.__docgenInfo={description:"A CSS `grid` wrapper.",displayName:"LayoutGrid",props:{gap:{defaultValue:null,description:"",name:"gap",required:!1,type:{name:"enum",value:[{value:'"2xs"'},{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:'"none"'},{value:'"3xs"'},{value:"ResponsiveProp<LayoutGap>"},{value:'"0"'},{value:'"1"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:'"20"'},{value:"ResponsiveProp<Spacing>"}]}},padding:{defaultValue:null,description:"",name:"padding",required:!1,type:{name:"enum",value:[{value:'"2xs"'},{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{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:"[LayoutPadding, LayoutPadding]"},{value:"[LayoutPadding, LayoutPadding, LayoutPadding]"},{value:"[LayoutPadding, LayoutPadding, LayoutPadding, LayoutPadding]"},{value:"[Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing, Spacing]"},{value:"ResponsiveProp<ShortHand<LayoutPadding> | ShortHand<Spacing>>"}]}},columns:{defaultValue:null,description:"The `number` of columns, or a `string[]` of `grid-template-columns`.\n@see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns}",name:"columns",required:!1,type:{name:"enum",value:[{value:"number"},{value:"string[]"},{value:"ResponsiveProp<number | string[]>"}]}},justifyContent:{defaultValue:null,description:"",name:"justifyContent",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"space-between"'},{value:'"space-around"'},{value:'"space-evenly"'},{value:"ResponsiveProp<LayoutJustifyContent>"}]}},alignItems:{defaultValue:null,description:"",name:"alignItems",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:'"baseline"'},{value:"ResponsiveProp<LayoutAlignItems>"}]}},justifyItems:{defaultValue:null,description:"",name:"justifyItems",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:"ResponsiveProp<LayoutJustifyItems>"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"div"'},{value:'"main"'},{value:'"header"'},{value:'"footer"'},{value:'"article"'},{value:'"section"'},{value:'"ul"'},{value:'"ol"'},{value:'"li"'},{value:'"p"'},{value:'"span"'},{value:'"fieldset"'},{value:'"table"'},{value:'"th"'},{value:'"tr"'},{value:'"td"'},{value:'"thead"'},{value:'"tfoot"'},{value:'"tbody"'},{value:'"caption"'},{value:'"figure"'},{value:'"figcaption"'}]}},hide:{defaultValue:null,description:"",name:"hide",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},relative:{defaultValue:null,description:"",name:"relative",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},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 ve={title:"components/LayoutGrid",component:v,subcomponents:{LayoutGridItem:L},argTypes:{gap:{description:o},padding:{description:z},columns:{description:o},justifyContent:{description:o},alignItems:{description:o},justifyItems:{description:o},hide:{description:o},relative:{description:o}}},_=()=>t.jsxs(v,{columns:4,alignItems:"start",gap:"xs",children:[t.jsx(L,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})]})}),t.jsx(L,{alignSelf:"end",children:t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})]});_.storyName="LayoutGrid";const p={parameters:{chromatic:{disableSnapshot:!0}},args:{gap:"16",columns:3,alignItems:"start",children:t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{minWidth:"100px",minHeight:50,backgroundColor:"hotpink"},children:" "}),t.jsx("div",{style:{minWidth:"100px",minHeight:75,backgroundColor:"hotpink"},children:" "}),t.jsx("div",{style:{minWidth:"100px",minHeight:100,backgroundColor:"hotpink",textAlign:"center"}})]}),dataset:{qaid:"layout-grid"}},argTypes:{dataset:{control:"object"},columns:{control:"number"},justifyItems:{control:"select"},hide:{control:"boolean"},relative:{control:"boolean"},children:{control:!1}}};var w,C,k;_.parameters={..._.parameters,docs:{...(w=_.parameters)==null?void 0:w.docs,source:{originalSource:`() => <LayoutGrid columns={4} alignItems="start" gap="xs">
|
|
1
|
+
import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as N}from"./index-Cb9e4tly.js";import{g as E,a as P,b as R}from"./layout-relative-Dcwg9O77.js";import{f as A}from"./filterHTMLAttributes-DYdLqcvH.js";import{m as w,a as H,s as L}from"./classNames-BUL1Zq7e.js";import{g as T}from"./index-DdzHuZ-Y.js";import{L as V,k as U,f as $}from"./defaults-B1rzzf6M.js";import{w as h}from"./componentNames-Bwls0I02.js";import{B as W}from"./breakpoints-BfMlrtxE.js";import{s as Y,g as M}from"./layout-relative.module-lqlc9jak.js";import{S as r,a as z}from"./consts-KAYct7Gj.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./constants-DYYVurUY.js";const F="_LayoutGridItem_2tq6r_1",B={LayoutGridItem:F},v=N.forwardRef(function({children:i,alignSelf:n,tag:a,hide:l,relative:s,dataset:u,...o},d){const m=w(B,h.LayoutGridItem,[]),y=E(n),c=P(l),p=R(s),G=[...m,...y,...c,...p],O=a??V,D={...A(o),ref:d,className:G.join(" "),...T(u,{preplyDsComponent:h.LayoutGridItem})};return t.jsx(O,{...D,children:i})});try{v.displayName="LayoutGridItem",v.__docgenInfo={description:"",displayName:"LayoutGridItem",props:{alignSelf:{defaultValue:null,description:"",name:"alignSelf",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:"ResponsiveProp<LayoutAlignSelf>"}]}},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"'}]}},hide:{defaultValue:null,description:"",name:"hide",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},relative:{defaultValue:null,description:"",name:"relative",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},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 J="_LayoutGrid_ljfvs_4",q={LayoutGrid:J,"LayoutGrid--justify-content-center":"_LayoutGrid--justify-content-center_ljfvs_14","LayoutGrid--justify-content-start":"_LayoutGrid--justify-content-start_ljfvs_17","LayoutGrid--justify-content-end":"_LayoutGrid--justify-content-end_ljfvs_20","LayoutGrid--justify-content-space-between":"_LayoutGrid--justify-content-space-between_ljfvs_23","LayoutGrid--justify-content-space-around":"_LayoutGrid--justify-content-space-around_ljfvs_26","LayoutGrid--justify-content-space-evenly":"_LayoutGrid--justify-content-space-evenly_ljfvs_29","LayoutGrid--narrow-l--justify-content-center":"_LayoutGrid--narrow-l--justify-content-center_ljfvs_33","LayoutGrid--narrow-l--justify-content-start":"_LayoutGrid--narrow-l--justify-content-start_ljfvs_36","LayoutGrid--narrow-l--justify-content-end":"_LayoutGrid--narrow-l--justify-content-end_ljfvs_39","LayoutGrid--narrow-l--justify-content-space-between":"_LayoutGrid--narrow-l--justify-content-space-between_ljfvs_42","LayoutGrid--narrow-l--justify-content-space-around":"_LayoutGrid--narrow-l--justify-content-space-around_ljfvs_45","LayoutGrid--narrow-l--justify-content-space-evenly":"_LayoutGrid--narrow-l--justify-content-space-evenly_ljfvs_48","LayoutGrid--medium-s--justify-content-center":"_LayoutGrid--medium-s--justify-content-center_ljfvs_53","LayoutGrid--medium-s--justify-content-start":"_LayoutGrid--medium-s--justify-content-start_ljfvs_56","LayoutGrid--medium-s--justify-content-end":"_LayoutGrid--medium-s--justify-content-end_ljfvs_59","LayoutGrid--medium-s--justify-content-space-between":"_LayoutGrid--medium-s--justify-content-space-between_ljfvs_62","LayoutGrid--medium-s--justify-content-space-around":"_LayoutGrid--medium-s--justify-content-space-around_ljfvs_65","LayoutGrid--medium-s--justify-content-space-evenly":"_LayoutGrid--medium-s--justify-content-space-evenly_ljfvs_68","LayoutGrid--medium-l--justify-content-center":"_LayoutGrid--medium-l--justify-content-center_ljfvs_73","LayoutGrid--medium-l--justify-content-start":"_LayoutGrid--medium-l--justify-content-start_ljfvs_76","LayoutGrid--medium-l--justify-content-end":"_LayoutGrid--medium-l--justify-content-end_ljfvs_79","LayoutGrid--medium-l--justify-content-space-between":"_LayoutGrid--medium-l--justify-content-space-between_ljfvs_82","LayoutGrid--medium-l--justify-content-space-around":"_LayoutGrid--medium-l--justify-content-space-around_ljfvs_85","LayoutGrid--medium-l--justify-content-space-evenly":"_LayoutGrid--medium-l--justify-content-space-evenly_ljfvs_88","LayoutGrid--wide-s--justify-content-center":"_LayoutGrid--wide-s--justify-content-center_ljfvs_93","LayoutGrid--wide-s--justify-content-start":"_LayoutGrid--wide-s--justify-content-start_ljfvs_96","LayoutGrid--wide-s--justify-content-end":"_LayoutGrid--wide-s--justify-content-end_ljfvs_99","LayoutGrid--wide-s--justify-content-space-between":"_LayoutGrid--wide-s--justify-content-space-between_ljfvs_102","LayoutGrid--wide-s--justify-content-space-around":"_LayoutGrid--wide-s--justify-content-space-around_ljfvs_105","LayoutGrid--wide-s--justify-content-space-evenly":"_LayoutGrid--wide-s--justify-content-space-evenly_ljfvs_108","LayoutGrid--wide-l--justify-content-center":"_LayoutGrid--wide-l--justify-content-center_ljfvs_113","LayoutGrid--wide-l--justify-content-start":"_LayoutGrid--wide-l--justify-content-start_ljfvs_116","LayoutGrid--wide-l--justify-content-end":"_LayoutGrid--wide-l--justify-content-end_ljfvs_119","LayoutGrid--wide-l--justify-content-space-between":"_LayoutGrid--wide-l--justify-content-space-between_ljfvs_122","LayoutGrid--wide-l--justify-content-space-around":"_LayoutGrid--wide-l--justify-content-space-around_ljfvs_125","LayoutGrid--wide-l--justify-content-space-evenly":"_LayoutGrid--wide-l--justify-content-space-evenly_ljfvs_128","LayoutGrid--align-items-center":"_LayoutGrid--align-items-center_ljfvs_132","LayoutGrid--align-items-start":"_LayoutGrid--align-items-start_ljfvs_135","LayoutGrid--align-items-end":"_LayoutGrid--align-items-end_ljfvs_138","LayoutGrid--align-items-stretch":"_LayoutGrid--align-items-stretch_ljfvs_141","LayoutGrid--align-items-baseline":"_LayoutGrid--align-items-baseline_ljfvs_144","LayoutGrid--narrow-l--align-items-center":"_LayoutGrid--narrow-l--align-items-center_ljfvs_148","LayoutGrid--narrow-l--align-items-start":"_LayoutGrid--narrow-l--align-items-start_ljfvs_151","LayoutGrid--narrow-l--align-items-end":"_LayoutGrid--narrow-l--align-items-end_ljfvs_154","LayoutGrid--narrow-l--align-items-stretch":"_LayoutGrid--narrow-l--align-items-stretch_ljfvs_157","LayoutGrid--narrow-l--align-items-baseline":"_LayoutGrid--narrow-l--align-items-baseline_ljfvs_160","LayoutGrid--medium-s--align-items-center":"_LayoutGrid--medium-s--align-items-center_ljfvs_165","LayoutGrid--medium-s--align-items-start":"_LayoutGrid--medium-s--align-items-start_ljfvs_168","LayoutGrid--medium-s--align-items-end":"_LayoutGrid--medium-s--align-items-end_ljfvs_171","LayoutGrid--medium-s--align-items-stretch":"_LayoutGrid--medium-s--align-items-stretch_ljfvs_174","LayoutGrid--medium-s--align-items-baseline":"_LayoutGrid--medium-s--align-items-baseline_ljfvs_177","LayoutGrid--medium-l--align-items-center":"_LayoutGrid--medium-l--align-items-center_ljfvs_182","LayoutGrid--medium-l--align-items-start":"_LayoutGrid--medium-l--align-items-start_ljfvs_185","LayoutGrid--medium-l--align-items-end":"_LayoutGrid--medium-l--align-items-end_ljfvs_188","LayoutGrid--medium-l--align-items-stretch":"_LayoutGrid--medium-l--align-items-stretch_ljfvs_191","LayoutGrid--medium-l--align-items-baseline":"_LayoutGrid--medium-l--align-items-baseline_ljfvs_194","LayoutGrid--wide-s--align-items-center":"_LayoutGrid--wide-s--align-items-center_ljfvs_199","LayoutGrid--wide-s--align-items-start":"_LayoutGrid--wide-s--align-items-start_ljfvs_202","LayoutGrid--wide-s--align-items-end":"_LayoutGrid--wide-s--align-items-end_ljfvs_205","LayoutGrid--wide-s--align-items-stretch":"_LayoutGrid--wide-s--align-items-stretch_ljfvs_208","LayoutGrid--wide-s--align-items-baseline":"_LayoutGrid--wide-s--align-items-baseline_ljfvs_211","LayoutGrid--wide-l--align-items-center":"_LayoutGrid--wide-l--align-items-center_ljfvs_216","LayoutGrid--wide-l--align-items-start":"_LayoutGrid--wide-l--align-items-start_ljfvs_219","LayoutGrid--wide-l--align-items-end":"_LayoutGrid--wide-l--align-items-end_ljfvs_222","LayoutGrid--wide-l--align-items-stretch":"_LayoutGrid--wide-l--align-items-stretch_ljfvs_225","LayoutGrid--wide-l--align-items-baseline":"_LayoutGrid--wide-l--align-items-baseline_ljfvs_228","LayoutGrid--justify-items-stretch":"_LayoutGrid--justify-items-stretch_ljfvs_232","LayoutGrid--justify-items-center":"_LayoutGrid--justify-items-center_ljfvs_235","LayoutGrid--justify-items-start":"_LayoutGrid--justify-items-start_ljfvs_238","LayoutGrid--justify-items-end":"_LayoutGrid--justify-items-end_ljfvs_241","LayoutGrid--narrow-l--justify-items-stretch":"_LayoutGrid--narrow-l--justify-items-stretch_ljfvs_245","LayoutGrid--narrow-l--justify-items-center":"_LayoutGrid--narrow-l--justify-items-center_ljfvs_248","LayoutGrid--narrow-l--justify-items-start":"_LayoutGrid--narrow-l--justify-items-start_ljfvs_251","LayoutGrid--narrow-l--justify-items-end":"_LayoutGrid--narrow-l--justify-items-end_ljfvs_254","LayoutGrid--medium-s--justify-items-stretch":"_LayoutGrid--medium-s--justify-items-stretch_ljfvs_259","LayoutGrid--medium-s--justify-items-center":"_LayoutGrid--medium-s--justify-items-center_ljfvs_262","LayoutGrid--medium-s--justify-items-start":"_LayoutGrid--medium-s--justify-items-start_ljfvs_265","LayoutGrid--medium-s--justify-items-end":"_LayoutGrid--medium-s--justify-items-end_ljfvs_268","LayoutGrid--medium-l--justify-items-stretch":"_LayoutGrid--medium-l--justify-items-stretch_ljfvs_273","LayoutGrid--medium-l--justify-items-center":"_LayoutGrid--medium-l--justify-items-center_ljfvs_276","LayoutGrid--medium-l--justify-items-start":"_LayoutGrid--medium-l--justify-items-start_ljfvs_279","LayoutGrid--medium-l--justify-items-end":"_LayoutGrid--medium-l--justify-items-end_ljfvs_282","LayoutGrid--wide-s--justify-items-stretch":"_LayoutGrid--wide-s--justify-items-stretch_ljfvs_287","LayoutGrid--wide-s--justify-items-center":"_LayoutGrid--wide-s--justify-items-center_ljfvs_290","LayoutGrid--wide-s--justify-items-start":"_LayoutGrid--wide-s--justify-items-start_ljfvs_293","LayoutGrid--wide-s--justify-items-end":"_LayoutGrid--wide-s--justify-items-end_ljfvs_296","LayoutGrid--wide-l--justify-items-stretch":"_LayoutGrid--wide-l--justify-items-stretch_ljfvs_301","LayoutGrid--wide-l--justify-items-center":"_LayoutGrid--wide-l--justify-items-center_ljfvs_304","LayoutGrid--wide-l--justify-items-start":"_LayoutGrid--wide-l--justify-items-start_ljfvs_307","LayoutGrid--wide-l--justify-items-end":"_LayoutGrid--wide-l--justify-items-end_ljfvs_310","LayoutGrid--columns":"_LayoutGrid--columns_ljfvs_314","LayoutGrid--columns-narrow-l":"_LayoutGrid--columns-narrow-l_ljfvs_318","LayoutGrid--columns-medium-s":"_LayoutGrid--columns-medium-s_ljfvs_323","LayoutGrid--columns-medium-l":"_LayoutGrid--columns-medium-l_ljfvs_328","LayoutGrid--columns-wide-s":"_LayoutGrid--columns-wide-s_ljfvs_333","LayoutGrid--columns-wide-l":"_LayoutGrid--columns-wide-l_ljfvs_338"},K="LayoutGrid",Q=Object.keys(W),g=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e.join(" "),X=e=>typeof e=="object"&&!Array.isArray(e)?Object.entries(e).reduce((i,[n,a])=>({...i,...a?{[n]:g(a)}:{}}),{_:g(e._)}):{_:g(e)},Z=e=>{if(!e)return{classNames:[],style:{}};const i=X(e),n=Q.filter(s=>i[s]),a=H(q,K,["columns",...n.map(s=>`columns-${s}`)]),l=n.reduce((s,u)=>({...s,[`--columns-${u}`]:i[u]}),{"--columns":i._});return{classNames:a,style:l}},ee="LayoutGap",te=e=>w(Y,ee,[L("gap",e)]),ae="LayoutGrid",ie=(e,i)=>{const{gap:n=U,padding:a=$,justifyContent:l,alignItems:s,justifyItems:u,hide:o,relative:d}=i||{},m=w(q,ae,[L("justify-content",l),L("align-items",s),L("justify-items",u)]),y=te(n),c=M(a),p=P(o,"grid"),G=R(d);return[...m,...y,...c,...p,...G]},j=N.forwardRef(function({dataset:i,children:n,...a},l){const{tag:s=V,columns:u}=a,o=ie("grid",a),{style:d,classNames:m}=Z(u),y=[...o,...m],c={...A(a),ref:l,className:y.join(" "),style:d,...T(i,{preplyDsComponent:h.LayoutGrid})};return t.jsx(s,{...c,children:n})});try{j.displayName="LayoutGrid",j.__docgenInfo={description:"A CSS `grid` wrapper.",displayName:"LayoutGrid",props:{gap:{defaultValue:null,description:"",name:"gap",required:!1,type:{name:"enum",value:[{value:'"2xs"'},{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"24"'},{value:'"32"'},{value:'"48"'},{value:'"64"'},{value:'"96"'},{value:'"160"'},{value:'"none"'},{value:'"3xs"'},{value:"ResponsiveProp<LayoutGap>"},{value:'"0"'},{value:'"1"'},{value:'"2"'},{value:'"4"'},{value:'"8"'},{value:'"12"'},{value:'"16"'},{value:'"20"'},{value:"ResponsiveProp<Spacing>"}]}},padding:{defaultValue:null,description:"",name:"padding",required:!1,type:{name:"enum",value:[{value:'"2xs"'},{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{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:"[LayoutPadding, LayoutPadding]"},{value:"[LayoutPadding, LayoutPadding, LayoutPadding]"},{value:"[LayoutPadding, LayoutPadding, LayoutPadding, LayoutPadding]"},{value:"[Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing]"},{value:"[Spacing, Spacing, Spacing, Spacing]"},{value:"ResponsiveProp<ShortHand<LayoutPadding> | ShortHand<Spacing>>"}]}},columns:{defaultValue:null,description:"The `number` of columns, or a `string[]` of `grid-template-columns`.\n@see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns}",name:"columns",required:!1,type:{name:"enum",value:[{value:"number"},{value:"string[]"},{value:"ResponsiveProp<number | string[]>"}]}},justifyContent:{defaultValue:null,description:"",name:"justifyContent",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"space-between"'},{value:'"space-around"'},{value:'"space-evenly"'},{value:"ResponsiveProp<LayoutJustifyContent>"}]}},alignItems:{defaultValue:null,description:"",name:"alignItems",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:'"baseline"'},{value:"ResponsiveProp<LayoutAlignItems>"}]}},justifyItems:{defaultValue:null,description:"",name:"justifyItems",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'},{value:'"stretch"'},{value:"ResponsiveProp<LayoutJustifyItems>"}]}},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"'}]}},hide:{defaultValue:null,description:"",name:"hide",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},relative:{defaultValue:null,description:"",name:"relative",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},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 je={title:"components/LayoutGrid",component:j,subcomponents:{LayoutGridItem:v},argTypes:{gap:{description:r},padding:{description:z},columns:{description:r},justifyContent:{description:r},alignItems:{description:r},justifyItems:{description:r},hide:{description:r},relative:{description:r}}},f=()=>t.jsxs(j,{columns:4,alignItems:"start",gap:"xs",children:[t.jsx(v,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})]})}),t.jsx(v,{alignSelf:"end",children:t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}}),t.jsx("div",{style:{height:"2ch",backgroundColor:"hotpink"}})]});f.storyName="LayoutGrid";const _={parameters:{chromatic:{disableSnapshot:!0}},args:{gap:"16",columns:3,alignItems:"start",children:t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{minWidth:"100px",minHeight:50,backgroundColor:"hotpink"},children:" "}),t.jsx("div",{style:{minWidth:"100px",minHeight:75,backgroundColor:"hotpink"},children:" "}),t.jsx("div",{style:{minWidth:"100px",minHeight:100,backgroundColor:"hotpink",textAlign:"center"}})]}),dataset:{qaid:"layout-grid"}},argTypes:{dataset:{control:"object"},columns:{control:"number"},justifyItems:{control:"select"},hide:{control:"boolean"},relative:{control:"boolean"},children:{control:!1}}};var b,C,k;f.parameters={...f.parameters,docs:{...(b=f.parameters)==null?void 0:b.docs,source:{originalSource:`() => <LayoutGrid columns={4} alignItems="start" gap="xs">
|
|
2
2
|
<LayoutGridItem>
|
|
3
3
|
<div style={{
|
|
4
4
|
display: 'flex',
|
|
@@ -29,7 +29,7 @@ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as N}from"./index-Cb9e4tl
|
|
|
29
29
|
height: '2ch',
|
|
30
30
|
backgroundColor: 'hotpink'
|
|
31
31
|
}} />
|
|
32
|
-
</LayoutGrid>`,...(k=(C=
|
|
32
|
+
</LayoutGrid>`,...(k=(C=f.parameters)==null?void 0:C.docs)==null?void 0:k.source}}};var S,x,I;_.parameters={..._.parameters,docs:{...(S=_.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
|
33
33
|
parameters: {
|
|
34
34
|
chromatic: {
|
|
35
35
|
disableSnapshot: true
|
|
@@ -85,4 +85,4 @@ import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as N}from"./index-Cb9e4tl
|
|
|
85
85
|
control: false
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}`,...(I=(x=
|
|
88
|
+
}`,...(I=(x=_.parameters)==null?void 0:x.docs)==null?void 0:I.source}}};const pe=["Base","Playground"];export{f as Base,_ as Playground,pe as __namedExportsOrder,je as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as w}from"./jsx-runtime-BTJTZTIL.js";import{r as p}from"./index-Cb9e4tly.js";import{m as n,s as L}from"./classNames-BUL1Zq7e.js";import{g as h,a as y}from"./LayoutGrid-_f_RSZJp.js";import{f as C}from"./filterHTMLAttributes-UOns5Q7s.js";import{w as i}from"./componentNames-Bwls0I02.js";import{g as N}from"./index-DdzHuZ-Y.js";import{L as G}from"./defaults-B1rzzf6M.js";const I="_AlignSelf_18imc_2",x={AlignSelf:I,"AlignSelf--align-self-start":"_AlignSelf--align-self-start_18imc_2","AlignSelf--align-self-center":"_AlignSelf--align-self-center_18imc_5","AlignSelf--align-self-end":"_AlignSelf--align-self-end_18imc_8","AlignSelf--align-self-stretch":"_AlignSelf--align-self-stretch_18imc_11","AlignSelf--narrow-l--align-self-start":"_AlignSelf--narrow-l--align-self-start_18imc_15","AlignSelf--narrow-l--align-self-center":"_AlignSelf--narrow-l--align-self-center_18imc_18","AlignSelf--narrow-l--align-self-end":"_AlignSelf--narrow-l--align-self-end_18imc_21","AlignSelf--narrow-l--align-self-stretch":"_AlignSelf--narrow-l--align-self-stretch_18imc_24","AlignSelf--medium-s--align-self-start":"_AlignSelf--medium-s--align-self-start_18imc_29","AlignSelf--medium-s--align-self-center":"_AlignSelf--medium-s--align-self-center_18imc_32","AlignSelf--medium-s--align-self-end":"_AlignSelf--medium-s--align-self-end_18imc_35","AlignSelf--medium-s--align-self-stretch":"_AlignSelf--medium-s--align-self-stretch_18imc_38","AlignSelf--medium-l--align-self-start":"_AlignSelf--medium-l--align-self-start_18imc_43","AlignSelf--medium-l--align-self-center":"_AlignSelf--medium-l--align-self-center_18imc_46","AlignSelf--medium-l--align-self-end":"_AlignSelf--medium-l--align-self-end_18imc_49","AlignSelf--medium-l--align-self-stretch":"_AlignSelf--medium-l--align-self-stretch_18imc_52","AlignSelf--wide-s--align-self-start":"_AlignSelf--wide-s--align-self-start_18imc_57","AlignSelf--wide-s--align-self-center":"_AlignSelf--wide-s--align-self-center_18imc_60","AlignSelf--wide-s--align-self-end":"_AlignSelf--wide-s--align-self-end_18imc_63","AlignSelf--wide-s--align-self-stretch":"_AlignSelf--wide-s--align-self-stretch_18imc_66","AlignSelf--wide-l--align-self-start":"_AlignSelf--wide-l--align-self-start_18imc_71","AlignSelf--wide-l--align-self-center":"_AlignSelf--wide-l--align-self-center_18imc_74","AlignSelf--wide-l--align-self-end":"_AlignSelf--wide-l--align-self-end_18imc_77","AlignSelf--wide-l--align-self-stretch":"_AlignSelf--wide-l--align-self-stretch_18imc_80"},T="AlignSelf",j=l=>n(x,T,[L("align-self",l)]),E="_LayoutGridItem_2tq6r_1",D={LayoutGridItem:E},R=p.forwardRef(function({children:s,alignSelf:t,tag:e,hide:a,relative:f,dataset:g,...m},r){const _=n(D,i.LayoutGridItem,[]),c=j(t),o=h(a),d=y(f),A=[..._,...c,...o,...d],S=e??G,u={...C(m),ref:r,className:A.join(" "),...N(g,{preplyDsComponent:i.LayoutGridItem})};return w.jsx(S,{...u,children:s})});R.__docgenInfo={description:"",methods:[],displayName:"LayoutGridItem"};export{R as L,j as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._AlignSelf_18imc_2._AlignSelf--align-self-start_18imc_2{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--align-self-center_18imc_5{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--align-self-end_18imc_8{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--align-self-stretch_18imc_11{-ms-flex-item-align:stretch;align-self:stretch}@media (min-width: 400px){._AlignSelf_18imc_2._AlignSelf--narrow-l--align-self-start_18imc_15{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--narrow-l--align-self-center_18imc_18{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--narrow-l--align-self-end_18imc_21{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--narrow-l--align-self-stretch_18imc_24{-ms-flex-item-align:stretch;align-self:stretch}}@media (min-width: 700px){._AlignSelf_18imc_2._AlignSelf--medium-s--align-self-start_18imc_29{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--medium-s--align-self-center_18imc_32{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--medium-s--align-self-end_18imc_35{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--medium-s--align-self-stretch_18imc_38{-ms-flex-item-align:stretch;align-self:stretch}}@media (min-width: 880px){._AlignSelf_18imc_2._AlignSelf--medium-l--align-self-start_18imc_43{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--medium-l--align-self-center_18imc_46{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--medium-l--align-self-end_18imc_49{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--medium-l--align-self-stretch_18imc_52{-ms-flex-item-align:stretch;align-self:stretch}}@media (min-width: 1200px){._AlignSelf_18imc_2._AlignSelf--wide-s--align-self-start_18imc_57{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--wide-s--align-self-center_18imc_60{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--wide-s--align-self-end_18imc_63{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--wide-s--align-self-stretch_18imc_66{-ms-flex-item-align:stretch;align-self:stretch}}@media (min-width: 1900px){._AlignSelf_18imc_2._AlignSelf--wide-l--align-self-start_18imc_71{-ms-flex-item-align:start;align-self:start}._AlignSelf_18imc_2._AlignSelf--wide-l--align-self-center_18imc_74{-ms-flex-item-align:center;align-self:center}._AlignSelf_18imc_2._AlignSelf--wide-l--align-self-end_18imc_77{-ms-flex-item-align:end;align-self:end}._AlignSelf_18imc_2._AlignSelf--wide-l--align-self-stretch_18imc_80{-ms-flex-item-align:stretch;align-self:stretch}}._LayoutGridItem_2tq6r_1{margin:0;list-style:none;font-weight:inherit;border:none;text-align:inherit;border-spacing:0;padding:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Link_1d2xa_4{display:inline-block;border-radius:var(--5eeb28);text-decoration:var(--f13872);cursor:pointer;-webkit-tap-highlight-color:transparent;outline:none;-ms-touch-action:manipulation;touch-action:manipulation}._Link_1d2xa_4:focus-visible{outline-style:solid;outline-color:var(--603ec6);outline-width:var(--99d31f);outline-offset:var(--c0b12c)}._Link--inline_1d2xa_20{display:inline}._Link--noUnderline_1d2xa_23{text-decoration:none}._Link--variant-accentDark_1d2xa_26{color:var(--c6b68f)}._Link--variant-accentDark_1d2xa_26:hover,._Link--variant-accentDark--dsInternalSimulation-hover_1d2xa_30{color:var(--65e1ef)}._Link--variant-accentDark_1d2xa_26:active,._Link--variant-accentDark--dsInternalSimulation-active_1d2xa_34{color:var(--179b80)}._Link--variant-accentDarkInverted_1d2xa_37{color:var(--7cbffc)}._Link--variant-accentDarkInverted_1d2xa_37:hover,._Link--variant-accentDarkInverted--dsInternalSimulation-hover_1d2xa_41{color:var(--47fcde)}._Link--variant-accentDarkInverted_1d2xa_37:active,._Link--variant-accentDarkInverted--dsInternalSimulation-active_1d2xa_45{color:var(--1253e2)}._Link--variant-neutral_1d2xa_48{color:var(--19fdf0)}._Link--variant-neutral_1d2xa_48:hover,._Link--variant-neutral--dsInternalSimulation-hover_1d2xa_52{color:var(--ce5fb9)}._Link--variant-neutral_1d2xa_48:active,._Link--variant-neutral--dsInternalSimulation-active_1d2xa_56{color:var(--1d39ac)}._Link--variant-neutralInverted_1d2xa_59{color:var(--883d0f)}._Link--variant-neutralInverted_1d2xa_59:hover,._Link--variant-neutralInverted--dsInternalSimulation-hover_1d2xa_63{color:var(--065570)}._Link--variant-neutralInverted_1d2xa_59:active,._Link--variant-neutralInverted--dsInternalSimulation-active_1d2xa_67{color:var(--be41c4)}._Link--variant-unsetColors_1d2xa_70{color:var(--e66f2a)}._Link--variant-unsetColors_1d2xa_70:hover,._Link--variant-unsetColors--dsInternalSimulation-hover_1d2xa_74{color:var(--468ceb)}._Link--variant-unsetColors_1d2xa_70:active,._Link--variant-unsetColors--dsInternalSimulation-active_1d2xa_78{color:var(--a5fc76)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{T as n}from"./Text-
|
|
1
|
+
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{T as n}from"./Text-BJjb7u-q.js";import{r as k}from"./index-Cb9e4tly.js";import{f as Y}from"./filterHTMLAttributes-DYdLqcvH.js";import{g as Z}from"./defaults-B1rzzf6M.js";import{u as ee}from"./useHostname-Y3PlXofY.js";import{m as ae,s as x,b as f}from"./classNames-BUL1Zq7e.js";import{w as y}from"./componentNames-Bwls0I02.js";import{a as ne,g as te}from"./index-DdzHuZ-Y.js";import{g as d}from"./getTokenVar-DU_DEzTd.js";import{c as u}from"./tokens-Di5DrZN4.js";import"./index-ChsGqxH_.js";import"./text-accent-CJprBBxH.js";import"./text-centered-CDTMNY-2.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./constants-BgBLeZzp.js";const re="_Link_1d2xa_4",ie={Link:re,"Link--inline":"_Link--inline_1d2xa_20","Link--noUnderline":"_Link--noUnderline_1d2xa_23","Link--variant-accentDark":"_Link--variant-accentDark_1d2xa_26","Link--variant-accentDark--dsInternalSimulation-hover":"_Link--variant-accentDark--dsInternalSimulation-hover_1d2xa_30","Link--variant-accentDark--dsInternalSimulation-active":"_Link--variant-accentDark--dsInternalSimulation-active_1d2xa_34","Link--variant-accentDarkInverted":"_Link--variant-accentDarkInverted_1d2xa_37","Link--variant-accentDarkInverted--dsInternalSimulation-hover":"_Link--variant-accentDarkInverted--dsInternalSimulation-hover_1d2xa_41","Link--variant-accentDarkInverted--dsInternalSimulation-active":"_Link--variant-accentDarkInverted--dsInternalSimulation-active_1d2xa_45","Link--variant-neutral":"_Link--variant-neutral_1d2xa_48","Link--variant-neutral--dsInternalSimulation-hover":"_Link--variant-neutral--dsInternalSimulation-hover_1d2xa_52","Link--variant-neutral--dsInternalSimulation-active":"_Link--variant-neutral--dsInternalSimulation-active_1d2xa_56","Link--variant-neutralInverted":"_Link--variant-neutralInverted_1d2xa_59","Link--variant-neutralInverted--dsInternalSimulation-hover":"_Link--variant-neutralInverted--dsInternalSimulation-hover_1d2xa_63","Link--variant-neutralInverted--dsInternalSimulation-active":"_Link--variant-neutralInverted--dsInternalSimulation-active_1d2xa_67","Link--variant-unsetColors":"_Link--variant-unsetColors_1d2xa_70","Link--variant-unsetColors--dsInternalSimulation-hover":"_Link--variant-unsetColors--dsInternalSimulation-hover_1d2xa_74","Link--variant-unsetColors--dsInternalSimulation-active":"_Link--variant-unsetColors--dsInternalSimulation-active_1d2xa_78"},a=k.forwardRef(function(E,P){const{variant:p=Z,href:A,download:R,opensInNewTab:H,nofollow:M,assistiveText:O,onClick:$,as:v,url:z,dataset:F,children:m,inline:J,dsInternalSimulation:K,noUnderline:W,...X}=E,B=ee(),G=ae(ie,y.Link,[x(`variant-${p}--dsInternalSimulation`,K),x("variant",p),f("inline",void 0,J),f("noUnderline",void 0,W)]),c=A||z,Q=c?ne(B,c,H,M):{},h={...Y(X),ref:P,href:c,download:R,"aria-label":O,onClick:$,className:G.join(" "),...te(F,{preplyDsComponent:y.Link})};return v?k.cloneElement(v,{...h},m):e.jsx("a",{...h,...Q,children:m})});try{a.displayName="Link",a.__docgenInfo={description:`This is an inline element and will inherit font-size, line-height and
|
|
2
2
|
font-weight from the parent context. If you need to customise any of these
|
|
3
3
|
styles, all you have to do is wrap the <Link> in a Text or TextInline
|
|
4
|
-
component.`,displayName:"Link",props:{variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"
|
|
4
|
+
component.`,displayName:"Link",props:{variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"accentDark"'},{value:'"neutral"'},{value:'"accentDarkInverted"'},{value:'"neutralInverted"'},{value:'"unsetColors"'}]}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"enum",value:[{value:"string"}]}},download:{defaultValue:null,description:`When provided, instructs the browser to download the target (the file
|
|
5
5
|
specified in the href attribute) when a user clicks on the hyperlink,
|
|
6
6
|
rather than display it in the browser.`,name:"download",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},opensInNewTab:{defaultValue:null,description:"If `true`, forces internal link to open in a new tab.",name:"opensInNewTab",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},nofollow:{defaultValue:null,description:"",name:"nofollow",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},assistiveText:{defaultValue:null,description:"Provide an `aria-label` to the link.\nThis is useful if the link wraps non-textual elements, eg. an `img`.",name:"assistiveText",required:!1,type:{name:"enum",value:[{value:"string"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:"enum",value:[{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},url:{defaultValue:null,description:"@deprecated Use `href` instead",name:"url",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:`Provide dataset to set data attributes on the DOM element for the purpose
|
|
7
7
|
of e2e tests or integrating with external libraries.`,name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},inline:{defaultValue:null,description:"If `true`, allows the link to wrap within text.",name:"inline",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},noUnderline:{defaultValue:null,description:"",name:"noUnderline",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},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: HTMLAnchorElement | null) => void"},{value:"RefObject<HTMLAnchorElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const Ie={title:"components/Link",component:a},r=()=>{const t=d(u.background.primaryInverted);return e.jsxs("div",{style:{display:"flex",gap:"16px"},children:[e.jsx(a,{href:"https://preply.com",variant:"neutral",children:"neutral"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"neutralInverted",children:"neutralInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"accentDark",children:"accentDark"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"accentDarkInverted",children:"accentDarkInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"unsetColors",children:"unsetColors"})]})},i=()=>{const t=d(u.background.primaryInverted);return e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(n,{variant:"default-regular-italic",children:"(use the `unsetColors` variant)"}),e.jsxs("div",{children:[e.jsx(n,{variant:"large-semibold-italic",children:"primary"}),e.jsx(n,{variant:"default-regular-italic",children:"normal"}),e.jsxs(n,{accent:"primary",children:["Lorem ipsum ",e.jsx(a,{variant:"unsetColors",children:"dolor sit amet"})," amet."]}),e.jsx(n,{variant:"default-regular-italic",children:"active"}),e.jsxs(n,{accent:"primary",children:["Lorem ipsum"," ",e.jsx(a,{variant:"unsetColors",dsInternalSimulation:"active",children:"dolor sit amet"})," ","amet."]})]}),e.jsxs("div",{style:{backgroundColor:t},children:[e.jsx(n,{variant:"large-semibold-italic",accent:"inverted",children:"inverted"}),e.jsx(n,{variant:"default-regular-italic",accent:"inverted",children:"normal"}),e.jsxs(n,{accent:"inverted",children:["Lorem ipsum ",e.jsx(a,{variant:"unsetColors",children:"dolor sit amet"})," amet."]}),e.jsx(n,{variant:"default-regular-italic",accent:"inverted",children:"active"}),e.jsxs(n,{accent:"inverted",children:["Lorem ipsum"," ",e.jsx(a,{variant:"unsetColors",dsInternalSimulation:"active",children:"dolor sit amet"})," ","amet."]})]}),e.jsxs("div",{children:[e.jsx(n,{variant:"large-semibold-italic",children:"positive"}),e.jsx(n,{variant:"default-regular-italic",children:"normal"}),e.jsxs(n,{accent:"positive",children:["Lorem ipsum ",e.jsx(a,{variant:"unsetColors",children:"dolor sit amet"})," amet."]}),e.jsx(n,{variant:"default-regular-italic",children:"active"}),e.jsxs(n,{accent:"positive",children:["Lorem ipsum"," ",e.jsx(a,{variant:"unsetColors",dsInternalSimulation:"active",children:"dolor sit amet"})," ","amet."]})]}),e.jsxs("div",{children:[e.jsx(n,{variant:"large-semibold-italic",children:"critical"}),e.jsx(n,{variant:"default-regular-italic",children:"normal"}),e.jsxs(n,{accent:"critical",children:["Lorem ipsum ",e.jsx(a,{variant:"unsetColors",children:"dolor sit amet"})," amet."]}),e.jsx(n,{variant:"default-regular-italic",children:"active"}),e.jsxs(n,{accent:"critical",children:["Lorem ipsum"," ",e.jsx(a,{variant:"unsetColors",dsInternalSimulation:"active",children:"dolor sit amet"})," ","amet."]})]})]})},l=()=>{const t=d(u.background.primaryInverted);return e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(n,{variant:"default-regular-italic",children:"normal"}),e.jsxs("div",{style:{display:"flex",gap:"16px"},children:[e.jsx(a,{href:"https://preply.com",variant:"neutral",children:"neutral"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"neutralInverted",children:"neutralInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"accentDark",children:"accentDark"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"accentDarkInverted",children:"accentDarkInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"unsetColors",children:"unsetColors"})]}),e.jsx(n,{variant:"default-regular-italic",children:"hover"}),e.jsxs("div",{style:{display:"flex",gap:"16px"},children:[e.jsx(a,{href:"https://preply.com",variant:"neutral",dsInternalSimulation:"hover",children:"neutral"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"neutralInverted",dsInternalSimulation:"hover",children:"neutralInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"accentDark",dsInternalSimulation:"hover",children:"accentDark"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"accentDarkInverted",dsInternalSimulation:"hover",children:"accentDarkInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"unsetColors",dsInternalSimulation:"hover",children:"unsetColors"})]}),e.jsx(n,{variant:"default-regular-italic",children:"active"}),e.jsxs("div",{style:{display:"flex",gap:"16px"},children:[e.jsx(a,{href:"https://preply.com",variant:"neutral",dsInternalSimulation:"active",children:"neutral"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"neutralInverted",dsInternalSimulation:"active",children:"neutralInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"accentDark",dsInternalSimulation:"active",children:"accentDark"}),e.jsx("span",{style:{backgroundColor:t},children:e.jsx(a,{href:"https://preply.com",variant:"accentDarkInverted",dsInternalSimulation:"active",children:"accentDarkInverted"})}),e.jsx(a,{href:"https://preply.com",variant:"unsetColors",dsInternalSimulation:"active",children:"unsetColors"})]})]})},o=()=>e.jsxs("p",{style:{width:"12ch"},children:["Unlock your potential;"," ",e.jsx(a,{href:"https://preply.com",variant:"unsetColors",inline:!0,children:"visit Preply"}),"."]}),s={parameters:{chromatic:{disableSnapshot:!0}},args:{children:"Click me",href:"https://preply.com",variant:"neutral",dataset:{qaid:"link"}},argTypes:{dataset:{control:"object"},inline:{control:"boolean"},noUnderline:{control:"boolean"},opensInNewTab:{control:"boolean"},nofollow:{control:"boolean"},download:{control:"boolean"},assistiveText:{control:"text"},href:{control:"text"},url:{table:{disable:!0}}}};var g,L,I;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`() => {
|
|
@@ -34,7 +34,7 @@ of e2e tests or integrating with external libraries.`,name:"dataset",required:!1
|
|
|
34
34
|
unsetColors
|
|
35
35
|
</Link>
|
|
36
36
|
</div>;
|
|
37
|
-
}`,...(I=(L=r.parameters)==null?void 0:L.docs)==null?void 0:I.source}}};var
|
|
37
|
+
}`,...(I=(L=r.parameters)==null?void 0:L.docs)==null?void 0:I.source}}};var j,T,C;i.parameters={...i.parameters,docs:{...(j=i.parameters)==null?void 0:j.docs,source:{originalSource:`() => {
|
|
38
38
|
const grey = getTokenVar(color.background.primaryInverted);
|
|
39
39
|
return <div style={{
|
|
40
40
|
display: 'flex',
|
|
@@ -119,7 +119,7 @@ of e2e tests or integrating with external libraries.`,name:"dataset",required:!1
|
|
|
119
119
|
</Text>
|
|
120
120
|
</div>
|
|
121
121
|
</div>;
|
|
122
|
-
}`,...(
|
|
122
|
+
}`,...(C=(T=i.parameters)==null?void 0:T.docs)==null?void 0:C.source}}};var b,_,S;l.parameters={...l.parameters,docs:{...(b=l.parameters)==null?void 0:b.docs,source:{originalSource:`() => {
|
|
123
123
|
const grey = getTokenVar(color.background.primaryInverted);
|
|
124
124
|
return <div style={{
|
|
125
125
|
display: 'flex',
|
|
@@ -214,7 +214,7 @@ of e2e tests or integrating with external libraries.`,name:"dataset",required:!1
|
|
|
214
214
|
</Link>
|
|
215
215
|
</div>
|
|
216
216
|
</div>;
|
|
217
|
-
}`,...(S=(_=l.parameters)==null?void 0:_.docs)==null?void 0:S.source}}};var D,w,
|
|
217
|
+
}`,...(S=(_=l.parameters)==null?void 0:_.docs)==null?void 0:S.source}}};var D,w,V;o.parameters={...o.parameters,docs:{...(D=o.parameters)==null?void 0:D.docs,source:{originalSource:`() => <p style={{
|
|
218
218
|
width: '12ch'
|
|
219
219
|
}}>
|
|
220
220
|
Unlock your potential;{' '}
|
|
@@ -222,7 +222,7 @@ of e2e tests or integrating with external libraries.`,name:"dataset",required:!1
|
|
|
222
222
|
visit Preply
|
|
223
223
|
</Link>
|
|
224
224
|
.
|
|
225
|
-
</p>`,...(
|
|
225
|
+
</p>`,...(V=(w=o.parameters)==null?void 0:w.docs)==null?void 0:V.source}}};var q,N,U;s.parameters={...s.parameters,docs:{...(q=s.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
|
226
226
|
parameters: {
|
|
227
227
|
chromatic: {
|
|
228
228
|
disableSnapshot: true
|
|
@@ -268,4 +268,4 @@ of e2e tests or integrating with external libraries.`,name:"dataset",required:!1
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
}`,...(U=(N=s.parameters)==null?void 0:N.docs)==null?void 0:U.source}}};const
|
|
271
|
+
}`,...(U=(N=s.parameters)==null?void 0:N.docs)==null?void 0:U.source}}};const je=["Variants","TextVariants","States","Inline","Playground"];export{o as Inline,s as Playground,l as States,i as TextVariants,r as Variants,je as __namedExportsOrder,Ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Loader_vgxc2_2{display:inline-flex;width:fit-content;height:fit-content}._Loader--normal_vgxc2_7{color:var(--19bcb6)}._Loader--inverted_vgxc2_10{color:var(--38413d)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{r as h}from"./index-Cb9e4tly.js";import{f as j}from"./filterHTMLAttributes-DYdLqcvH.js";import{S as z}from"./Spinner-
|
|
1
|
+
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{r as h}from"./index-Cb9e4tly.js";import{f as j}from"./filterHTMLAttributes-DYdLqcvH.js";import{S as z}from"./Spinner-Dk9e5s4P.js";import{m as k,b as C}from"./classNames-BUL1Zq7e.js";import{w as l}from"./componentNames-Bwls0I02.js";import{g as E}from"./index-DdzHuZ-Y.js";import{S as N}from"./consts-KAYct7Gj.js";import{g as R}from"./getTokenVar-DU_DEzTd.js";import{c as T}from"./tokens-Di5DrZN4.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./defaults-B1rzzf6M.js";import"./constants-BgBLeZzp.js";const V="_Loader_vgxc2_2",q={Loader:V,"Loader--normal":"_Loader--normal_vgxc2_7","Loader--inverted":"_Loader--inverted_vgxc2_10"},r=h.forwardRef(function({size:t,inverted:y=!1,dataset:L,..._},b){const x=k(q,l.Loader,[C("inverted","normal",y)]),S={...j(_),ref:b,className:x.join(" "),...E(L,{preplyDsComponent:l.Loader})};return e.jsx("span",{...S,children:e.jsx(z,{size:t})})});try{r.displayName="Loader",r.__docgenInfo={description:"",displayName:"Loader",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"large"'},{value:'"default"'},{value:"ResponsiveProp<SpinnerSize>"}]}},inverted:{defaultValue:{value:"false"},description:"",name:"inverted",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: HTMLSpanElement | null) => void"},{value:"RefObject<HTMLSpanElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const K={title:"components/Loader",component:r,argTypes:{size:{description:N}}},o=()=>e.jsxs("div",{style:{display:"flex",alignItems:"end",gap:"8px"},children:[e.jsx(r,{size:"default"}),e.jsx(r,{size:"large"})]}),n=()=>e.jsx(r,{inverted:!0});n.decorators=[a=>{const t=R(T.background.primaryInverted);return e.jsx("div",{style:{backgroundColor:t},children:a()})}];const s={parameters:{chromatic:{disableSnapshot:!0}},decorators:[(a,{args:t})=>e.jsx("div",{style:{backgroundColor:t.inverted?"black":void 0},children:a()})],args:{size:"default",inverted:!1,dataset:{qaid:"loader"}},argTypes:{dataset:{control:"object"},size:{control:"select"},inverted:{control:"boolean"}}};var d,i,c;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`() => <div style={{
|
|
2
2
|
display: 'flex',
|
|
3
3
|
alignItems: 'end',
|
|
4
4
|
gap: '8px'
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as s}from"./index-Cb9e4tly.js";import{a as u}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{e as F,u as Ce,w as xe}from"./index-BVDq5o4N.js";import{F as qe}from"./TokyoUIPhone-CvuBM6jb.js";import{B as T}from"./Button--lO4Yh1G.js";import{I as Ee}from"./Icon-HJaiOMko.js";import{F as He}from"./FieldLayout-C6jJAsSQ.js";import{u as Fe,I as Se,s as Ne}from"./FieldLayoutBase-zAW0g1db.js";import{m as we}from"./classNames-BUL1Zq7e.js";import{w as m}from"./componentNames-Bwls0I02.js";import{u as Re}from"./useForcedRef--iGFM41p.js";import{u as Te}from"./useNumberField-AJNQGstL.js";import{T as ke}from"./Text-BJjb7u-q.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./render-icon-BT0Aq7PA.js";import"./ButtonBase-Dkj04_D4.js";import"./Spinner-Dk9e5s4P.js";import"./defaults-B1rzzf6M.js";import"./filterHTMLAttributes-DYdLqcvH.js";import"./useHostname-Y3PlXofY.js";import"./index-DdzHuZ-Y.js";import"./index-CC6DAVyL.js";import"./text-accent-CJprBBxH.js";import"./FieldAdditionalText-CKHYGNW7.js";import"./constants-DL6gdbsq.js";import"./index-D1pfvbUR.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./message-B1DLZQ1U.js";import"./text-centered-CDTMNY-2.js";const je=({onChange:e,onValueChange:a,...n},r)=>{const i=we(Ne,m.InputNumber),d=Fe(o=>o.target.value?Number(o.target.value):void 0,e,a);return t.jsx(Se,{...n,type:"number",ref:r,className:i.join(" "),onChange:d,preplyDsComponent:m.InputNumber})},N=s.forwardRef(je);try{N.displayName="InputNumber",N.__docgenInfo={description:"",displayName:"InputNumber",props:{dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},"aria-describedby":{defaultValue:null,description:`Identifies the element (or elements) that describes the object.
|
|
2
|
+
@see aria-labelledby`,name:"aria-describedby",required:!1,type:{name:"enum",value:[{value:"string"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},"aria-disabled":{defaultValue:null,description:`Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
|
3
|
+
@see aria-hidden
|
|
4
|
+
@see aria-readonly.`,name:"aria-disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},"aria-invalid":{defaultValue:null,description:`Indicates the entered value does not conform to the format expected by the application.
|
|
5
|
+
@see aria-errormessage.`,name:"aria-invalid",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'},{value:'"grammar"'},{value:'"spelling"'}]}},"aria-required":{defaultValue:null,description:"Indicates that user input is required on the element before a form may be submitted.",name:"aria-required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:'"true"'},{value:'"false"'}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<Element>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},hasError:{defaultValue:null,description:"",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"number"}]}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"enum",value:[{value:"number"}]}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"enum",value:[{value:"number"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"number"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"ValueChangeEventHandler<number | undefined>"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: InputImperativeHandle | null) => void"},{value:"RefObject<InputImperativeHandle>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const Be="_NumberField_kx5jx_1",Pe={NumberField:Be},Le=({id:e,...a},n)=>{const r=s.useRef(null),i=Re();s.useImperativeHandle(n,()=>({setFocus:()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.setFocus()},scrollIntoView:()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.scrollIntoView()}}));const d=Te({id:e,...a},m.NumberField),{layoutProps:o,inputProps:S}=d,l=we(Pe,m.NumberField),Ie=t.jsx(N,{...S,ref:i});return t.jsx(He,{...o,className:l.join(" "),input:Ie,inputHandle:i.current,ref:r,preplyDsComponent:m.NumberField})},p=s.forwardRef(Le);try{p.displayName="NumberField",p.__docgenInfo={description:"By default, this field acts as a controlled field and expects the parent\ncomponent to manage the state, by reacting to user input via the `onChange` or\n`onValueChange` props, and providing the latest state via the `value` prop.\n\nAlternatively, you can use it as an uncontrolled field using the\n`defaultValue` prop instead of the `value` prop.",displayName:"NumberField",props:{id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},label:{defaultValue:null,description:"The field label. This is needed for accessibility purposes, but can be\nhidden using the `hideLabel` prop.",name:"label",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},requiredLabel:{defaultValue:null,description:"",name:"requiredLabel",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},hideLabel:{defaultValue:null,description:"Use this to hide the `label` visually, but keep it in the accessibility\ntree.",name:"hideLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},wrapLabel:{defaultValue:null,description:"",name:"wrapLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},additionalText:{defaultValue:null,description:"",name:"additionalText",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},preserveSpace:{defaultValue:null,description:"",name:"preserveSpace",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},hasError:{defaultValue:null,description:"",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},errorMessage:{defaultValue:null,description:"",name:"errorMessage",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},inputDataset:{defaultValue:null,description:"",name:"inputDataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"enum",value:[{value:"string"}]}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"enum",value:[{value:"FocusEventHandler<Element>"}]}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"enum",value:[{value:"number"}]}},onCopy:{defaultValue:null,description:"",name:"onCopy",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onPaste:{defaultValue:null,description:"",name:"onPaste",required:!1,type:{name:"enum",value:[{value:"ClipboardEventHandler<Element>"}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"enum",value:[{value:"ChangeEventHandler<Element>"}]}},onKeyDown:{defaultValue:null,description:"",name:"onKeyDown",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},onKeyUp:{defaultValue:null,description:"",name:"onKeyUp",required:!1,type:{name:"enum",value:[{value:"KeyboardEventHandler<Element>"}]}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!1,type:{name:"enum",value:[{value:"number"}]}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"enum",value:[{value:"string"}]}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"enum",value:[{value:"number"}]}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onValueChange:{defaultValue:null,description:"",name:"onValueChange",required:!1,type:{name:"enum",value:[{value:"ValueChangeEventHandler<number | undefined>"}]}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"enum",value:[{value:"number"}]}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"enum",value:[{value:"number"}]}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:"ReactElement<IconProps, string | JSXElementConstructor<any>>"}]}},ref:{defaultValue:null,description:"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",name:"ref",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"(instance: InputImperativeHandle | null) => void"},{value:"RefObject<InputImperativeHandle>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}const ha={title:"components/NumberField",component:p,args:{label:"Number",placeholder:"Enter a number",inputDataset:{testid:"input"},onChange:u("onChange"),onBlur:u("onBlur"),onFocus:u("onFocus"),onClick:u("onClick"),onCopy:u("onCopy"),onKeyDown:u("onKeyDown"),onKeyUp:u("onKeyUp"),onPaste:u("onPaste"),onValueChange:u("onValueChange")},render:function(a){const n=s.useRef(null);return a.ref=n,t.jsx(p,{...a})}},v={parameters:{docs:{description:{story:"An empty field with a `label` and a `placeholder`."}}}},f={args:{defaultValue:100},play:async({canvas:e,step:a})=>{await a("Validate defaultValue",async()=>{const n=e.getByTestId("input");await F(n).toHaveValue(100)}),await a("Type to value",async()=>{const n=e.getByTestId("input");await Ce.type(n,",500"),await F(n).toHaveValue(100500)})}},y={args:{icon:t.jsx(Ee,{svg:qe})}},h={args:{additionalText:"This is additional text"}},b={args:{required:!0}},g={args:{required:!0,requiredLabel:t.jsx(ke,{accent:"critical",variant:"m-bold",children:"Needed"})}},V={args:{hideLabel:!0}},x={args:{hasError:!0}},q={args:{hasError:!0,errorMessage:"This is an error message"}},E={args:{disabled:!0}},w={args:{readOnly:!0}},I={decorators:[(e,{args:a})=>t.jsxs("div",{style:{padding:"8px",margin:"8px"},children:[t.jsxs("p",{children:["You can"," ",t.jsx(T,{variant:"secondary",dataset:{testid:"focus-button"},onClick:()=>{var n,r;return(r=(n=a.ref)==null?void 0:n.current)==null?void 0:r.setFocus()},children:"Focus"})," ","the input imperatively."]}),t.jsx(e,{})]})],play:async({args:e,canvas:a})=>{if(!R(e.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");const n=a.getByTestId("input");e.ref.current.setFocus(),await xe(()=>F(n).toHaveFocus())}},C={decorators:[(e,{args:a})=>t.jsxs("div",{style:{height:"300px",overflow:"scroll",padding:"8px",margin:"8px"},children:[t.jsxs("p",{children:["You can"," ",t.jsx(T,{variant:"secondary",dataset:{testid:"scroll-button"},onClick:()=>{if(!R(a.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");a.ref.current.scrollIntoView()},children:"Scroll"})," ","the input into view imperatively."]}),t.jsx("div",{style:{height:"1000px",display:"flex",flexDirection:"column",justifyContent:"end",border:"2px dashed lightgray",padding:"16px"},children:t.jsx(e,{})})]})],play:async({args:e,canvas:a})=>{if(!R(e.ref))throw new Error("Expected ref.current to be an InputImperativeHandle");const n=a.getByTestId("input");e.ref.current.scrollIntoView(),await xe(()=>F(n).toBeVisible())}};function R(e){return typeof e=="object"&&e!==null&&"current"in e&&e.current!==null&&typeof e.current=="object"&&"setFocus"in e.current}const H={tags:["!test"],parameters:{docs:{description:{story:'\nThe following code renders a `Numberfield` with the `required` flag, a `min`\nand `max` value, an `icon`, a `placeholder`, and some `additionalText`.\n\nWhen you click the "Submit" button and the input value is empty\n- it displays feedback via the `errorMessage` prop;\n- and uses the `setFocus()` API to bring the focus back to the field.\n\nIt uses the `value` and `onValueChange` props to react to the user input.\n'}},chromatic:{disableSnapshot:!0}},render:function(){const a=s.useRef(null),[n,r]=s.useState(void 0),[i,d]=s.useState(!1),o=l=>{if(l===void 0)return"Please provide a number";if(l!==Math.round(l))return"Please provide a whole number";if(l<10)return"Please book at least 10 lessons";if(l>99)return"Please book less than 100 lessons"},S=()=>{var l;d(!0),n||(l=a==null?void 0:a.current)==null||l.setFocus()};return t.jsxs("div",{style:{maxWidth:"500px",display:"flex",flexDirection:"column"},children:[t.jsx(p,{id:"lessons",name:"lessons",label:"Number of lessons",icon:t.jsx(Ee,{svg:qe}),placeholder:"How about 3?",value:n,additionalText:"These lessons will be scheduled automatically",onValueChange:r,errorMessage:i?o(n):void 0,min:10,max:99,ref:a,required:!0}),t.jsx(T,{onClick:S,children:"Submit"})]})}};var k,j,B;v.parameters={...v.parameters,docs:{...(k=v.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
story: \`An empty field with a \\\`label\\\` and a \\\`placeholder\\\`.\`
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}`,...(B=(j=v.parameters)==null?void 0:j.docs)==null?void 0:B.source}}};var P,L,D;f.parameters={...f.parameters,docs:{...(P=f.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
|
14
|
+
args: {
|
|
15
|
+
defaultValue: 100
|
|
16
|
+
},
|
|
17
|
+
play: async ({
|
|
18
|
+
canvas,
|
|
19
|
+
step
|
|
20
|
+
}) => {
|
|
21
|
+
await step('Validate defaultValue', async () => {
|
|
22
|
+
const input = canvas.getByTestId<HTMLInputElement>('input');
|
|
23
|
+
await expect(input).toHaveValue(100);
|
|
24
|
+
});
|
|
25
|
+
await step('Type to value', async () => {
|
|
26
|
+
const input = canvas.getByTestId<HTMLInputElement>('input');
|
|
27
|
+
await userEvent.type(input, ',500');
|
|
28
|
+
await expect(input).toHaveValue(100_500);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}`,...(D=(L=f.parameters)==null?void 0:L.docs)==null?void 0:D.source}}};var _,M,K;y.parameters={...y.parameters,docs:{...(_=y.parameters)==null?void 0:_.docs,source:{originalSource:`{
|
|
32
|
+
args: {
|
|
33
|
+
icon: <Icon svg={PhoneSvg} />
|
|
34
|
+
}
|
|
35
|
+
}`,...(K=(M=y.parameters)==null?void 0:M.docs)==null?void 0:K.source}}};var W,O,A;h.parameters={...h.parameters,docs:{...(W=h.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
36
|
+
args: {
|
|
37
|
+
additionalText: 'This is additional text'
|
|
38
|
+
}
|
|
39
|
+
}`,...(A=(O=h.parameters)==null?void 0:O.docs)==null?void 0:A.source}}};var U,J,X;b.parameters={...b.parameters,docs:{...(U=b.parameters)==null?void 0:U.docs,source:{originalSource:`{
|
|
40
|
+
args: {
|
|
41
|
+
required: true
|
|
42
|
+
}
|
|
43
|
+
}`,...(X=(J=b.parameters)==null?void 0:J.docs)==null?void 0:X.source}}};var Y,$,z;g.parameters={...g.parameters,docs:{...(Y=g.parameters)==null?void 0:Y.docs,source:{originalSource:`{
|
|
44
|
+
args: {
|
|
45
|
+
required: true,
|
|
46
|
+
requiredLabel: <Text accent="critical" variant="m-bold">
|
|
47
|
+
Needed
|
|
48
|
+
</Text>
|
|
49
|
+
}
|
|
50
|
+
}`,...(z=($=g.parameters)==null?void 0:$.docs)==null?void 0:z.source}}};var G,Q,Z;V.parameters={...V.parameters,docs:{...(G=V.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
51
|
+
args: {
|
|
52
|
+
hideLabel: true
|
|
53
|
+
}
|
|
54
|
+
}`,...(Z=(Q=V.parameters)==null?void 0:Q.docs)==null?void 0:Z.source}}};var ee,ae,ne;x.parameters={...x.parameters,docs:{...(ee=x.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
55
|
+
args: {
|
|
56
|
+
hasError: true
|
|
57
|
+
}
|
|
58
|
+
}`,...(ne=(ae=x.parameters)==null?void 0:ae.docs)==null?void 0:ne.source}}};var te,re,le;q.parameters={...q.parameters,docs:{...(te=q.parameters)==null?void 0:te.docs,source:{originalSource:`{
|
|
59
|
+
args: {
|
|
60
|
+
hasError: true,
|
|
61
|
+
errorMessage: 'This is an error message'
|
|
62
|
+
}
|
|
63
|
+
}`,...(le=(re=q.parameters)==null?void 0:re.docs)==null?void 0:le.source}}};var ue,se,ie;E.parameters={...E.parameters,docs:{...(ue=E.parameters)==null?void 0:ue.docs,source:{originalSource:`{
|
|
64
|
+
args: {
|
|
65
|
+
disabled: true
|
|
66
|
+
}
|
|
67
|
+
}`,...(ie=(se=E.parameters)==null?void 0:se.docs)==null?void 0:ie.source}}};var oe,de,ce;w.parameters={...w.parameters,docs:{...(oe=w.parameters)==null?void 0:oe.docs,source:{originalSource:`{
|
|
68
|
+
args: {
|
|
69
|
+
readOnly: true
|
|
70
|
+
}
|
|
71
|
+
}`,...(ce=(de=w.parameters)==null?void 0:de.docs)==null?void 0:ce.source}}};var me,pe,ve;I.parameters={...I.parameters,docs:{...(me=I.parameters)==null?void 0:me.docs,source:{originalSource:`{
|
|
72
|
+
decorators: [(Story, {
|
|
73
|
+
args
|
|
74
|
+
}) => <div style={{
|
|
75
|
+
padding: '8px',
|
|
76
|
+
margin: '8px'
|
|
77
|
+
}}>
|
|
78
|
+
<p>
|
|
79
|
+
You can{' '}
|
|
80
|
+
<Button variant="secondary" dataset={{
|
|
81
|
+
testid: 'focus-button'
|
|
82
|
+
}} onClick={() =>
|
|
83
|
+
// @ts-expect-error - This will fail gracefully,
|
|
84
|
+
// and the \`play\` function will assert it properly
|
|
85
|
+
args.ref?.current?.setFocus()}>
|
|
86
|
+
Focus
|
|
87
|
+
</Button>{' '}
|
|
88
|
+
the input imperatively.
|
|
89
|
+
</p>
|
|
90
|
+
<Story />
|
|
91
|
+
</div>],
|
|
92
|
+
play: async ({
|
|
93
|
+
args,
|
|
94
|
+
canvas
|
|
95
|
+
}) => {
|
|
96
|
+
if (!isImperativeHandleRef(args.ref)) {
|
|
97
|
+
throw new Error('Expected ref.current to be an InputImperativeHandle');
|
|
98
|
+
}
|
|
99
|
+
const input = canvas.getByTestId('input');
|
|
100
|
+
args.ref.current.setFocus();
|
|
101
|
+
await waitFor(() => expect(input).toHaveFocus());
|
|
102
|
+
}
|
|
103
|
+
}`,...(ve=(pe=I.parameters)==null?void 0:pe.docs)==null?void 0:ve.source}}};var fe,ye,he;C.parameters={...C.parameters,docs:{...(fe=C.parameters)==null?void 0:fe.docs,source:{originalSource:`{
|
|
104
|
+
decorators: [(Story, {
|
|
105
|
+
args
|
|
106
|
+
}) => <div style={{
|
|
107
|
+
height: '300px',
|
|
108
|
+
overflow: 'scroll',
|
|
109
|
+
padding: '8px',
|
|
110
|
+
margin: '8px'
|
|
111
|
+
}}>
|
|
112
|
+
<p>
|
|
113
|
+
You can{' '}
|
|
114
|
+
<Button variant="secondary" dataset={{
|
|
115
|
+
testid: 'scroll-button'
|
|
116
|
+
}} onClick={() => {
|
|
117
|
+
if (!isImperativeHandleRef(args.ref)) {
|
|
118
|
+
throw new Error('Expected ref.current to be an InputImperativeHandle');
|
|
119
|
+
}
|
|
120
|
+
args.ref.current.scrollIntoView();
|
|
121
|
+
}}>
|
|
122
|
+
Scroll
|
|
123
|
+
</Button>{' '}
|
|
124
|
+
the input into view imperatively.
|
|
125
|
+
</p>
|
|
126
|
+
<div style={{
|
|
127
|
+
height: '1000px',
|
|
128
|
+
display: 'flex',
|
|
129
|
+
flexDirection: 'column',
|
|
130
|
+
justifyContent: 'end',
|
|
131
|
+
border: '2px dashed lightgray',
|
|
132
|
+
padding: '16px'
|
|
133
|
+
}}>
|
|
134
|
+
<Story />
|
|
135
|
+
</div>
|
|
136
|
+
</div>],
|
|
137
|
+
play: async ({
|
|
138
|
+
args,
|
|
139
|
+
canvas
|
|
140
|
+
}) => {
|
|
141
|
+
if (!isImperativeHandleRef(args.ref)) {
|
|
142
|
+
throw new Error('Expected ref.current to be an InputImperativeHandle');
|
|
143
|
+
}
|
|
144
|
+
const input = canvas.getByTestId('input');
|
|
145
|
+
args.ref.current.scrollIntoView();
|
|
146
|
+
await waitFor(() => expect(input).toBeVisible());
|
|
147
|
+
}
|
|
148
|
+
}`,...(he=(ye=C.parameters)==null?void 0:ye.docs)==null?void 0:he.source}}};var be,ge,Ve;H.parameters={...H.parameters,docs:{...(be=H.parameters)==null?void 0:be.docs,source:{originalSource:`{
|
|
149
|
+
tags: ['!test'],
|
|
150
|
+
parameters: {
|
|
151
|
+
docs: {
|
|
152
|
+
description: {
|
|
153
|
+
story: \`
|
|
154
|
+
The following code renders a \\\`Numberfield\\\` with the \\\`required\\\` flag, a \\\`min\\\`
|
|
155
|
+
and \\\`max\\\` value, an \\\`icon\\\`, a \\\`placeholder\\\`, and some \\\`additionalText\\\`.
|
|
156
|
+
|
|
157
|
+
When you click the "Submit" button and the input value is empty
|
|
158
|
+
- it displays feedback via the \\\`errorMessage\\\` prop;
|
|
159
|
+
- and uses the \\\`setFocus()\\\` API to bring the focus back to the field.
|
|
160
|
+
|
|
161
|
+
It uses the \\\`value\\\` and \\\`onValueChange\\\` props to react to the user input.
|
|
162
|
+
\`
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
chromatic: {
|
|
166
|
+
disableSnapshot: true
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
render: function Story() {
|
|
170
|
+
const fieldRef = useRef<InputImperativeHandle>(null);
|
|
171
|
+
const [value, setValue] = useState<number | undefined>(undefined);
|
|
172
|
+
const [submited, setSubmitted] = useState(false);
|
|
173
|
+
const getErrorMessage = (attempt?: number) => {
|
|
174
|
+
if (attempt === undefined) {
|
|
175
|
+
return 'Please provide a number';
|
|
176
|
+
}
|
|
177
|
+
if (attempt !== Math.round(attempt)) {
|
|
178
|
+
return 'Please provide a whole number';
|
|
179
|
+
}
|
|
180
|
+
if (attempt < 10) {
|
|
181
|
+
return 'Please book at least 10 lessons';
|
|
182
|
+
}
|
|
183
|
+
if (attempt > 99) {
|
|
184
|
+
return 'Please book less than 100 lessons';
|
|
185
|
+
}
|
|
186
|
+
return undefined;
|
|
187
|
+
};
|
|
188
|
+
const handleClick = () => {
|
|
189
|
+
setSubmitted(true);
|
|
190
|
+
if (!value) {
|
|
191
|
+
fieldRef?.current?.setFocus();
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
return <div style={{
|
|
195
|
+
maxWidth: '500px',
|
|
196
|
+
display: 'flex',
|
|
197
|
+
flexDirection: 'column'
|
|
198
|
+
}}>
|
|
199
|
+
<NumberField id="lessons" name="lessons" label="Number of lessons" icon={<Icon svg={PhoneSvg} />} placeholder="How about 3?" value={value} additionalText="These lessons will be scheduled automatically" onValueChange={setValue} errorMessage={submited ? getErrorMessage(value) : undefined} min={10} max={99} ref={fieldRef} required />
|
|
200
|
+
<Button onClick={handleClick}>Submit</Button>
|
|
201
|
+
</div>;
|
|
202
|
+
}
|
|
203
|
+
}`,...(Ve=(ge=H.parameters)==null?void 0:ge.docs)==null?void 0:Ve.source}}};const ba=["Basic","WithValue","WithIcon","WithAdditionalText","Required","RequiredWithCustomLabel","WithHiddenLabel","HasError","HasErrorWithMessage","Disabled","ReadOnly","ImperativeSetFocus","ImperativeScrollIntoView","Example"];export{v as Basic,E as Disabled,H as Example,x as HasError,q as HasErrorWithMessage,C as ImperativeScrollIntoView,I as ImperativeSetFocus,w as ReadOnly,b as Required,g as RequiredWithCustomLabel,h as WithAdditionalText,V as WithHiddenLabel,y as WithIcon,f as WithValue,ba as __namedExportsOrder,ha as default};
|
|
@@ -5,4 +5,4 @@ Triggers a callback when the wrapped component intersects with the viewport.
|
|
|
5
5
|
This can be useful in several use cases. Examples:
|
|
6
6
|
|
|
7
7
|
- Track an experiment, once a certain component scrolls into view.
|
|
8
|
-
- Trigger an animation, or a feature (e.g.: onboarding instructions).`,displayName:"ObserveIntersection",props:{onIntersect:{defaultValue:null,description:"",name:"onIntersect",required:!0,type:{name:"() => void"}},once:{defaultValue:null,description:"",name:"once",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},threshold:{defaultValue:null,description:"",name:"threshold",required:!1,type:{name:"enum",value:[{value:"number"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"
|
|
8
|
+
- Trigger an animation, or a feature (e.g.: onboarding instructions).`,displayName:"ObserveIntersection",props:{onIntersect:{defaultValue:null,description:"",name:"onIntersect",required:!0,type:{name:"() => void"}},once:{defaultValue:null,description:"",name:"once",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},threshold:{defaultValue:null,description:"",name:"threshold",required:!1,type:{name:"enum",value:[{value:"number"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"p"'},{value:'"div"'},{value:'"span"'},{value:'"main"'},{value:'"header"'},{value:'"footer"'},{value:'"article"'},{value:'"section"'},{value:'"ul"'},{value:'"ol"'},{value:'"li"'},{value:'"fieldset"'},{value:'"table"'},{value:'"th"'},{value:'"tr"'},{value:'"td"'},{value:'"thead"'},{value:'"tfoot"'},{value:'"tbody"'},{value:'"caption"'},{value:'"figure"'},{value:'"figcaption"'}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}}}}}catch{}export{o as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as a}from"./index-Cb9e4tly.js";import{O as i}from"./ObserveIntersection-
|
|
1
|
+
import{j as t}from"./jsx-runtime-BTJTZTIL.js";import{r as a}from"./index-Cb9e4tly.js";import{O as i}from"./ObserveIntersection-Ccn6ggRl.js";import"./index-ChsGqxH_.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./componentNames-Bwls0I02.js";const g={title:"components/ObserveIntersection",component:i,parameters:{tags:["!test"],chromatic:{disableSnapshot:!0}}},e=()=>{const[o,c]=a.useState(!1);return t.jsxs("div",{tabIndex:0,style:{height:"200px",overflowY:"scroll",position:"relative"},children:[t.jsx("div",{style:{position:"sticky",top:"2px"},children:o?"Intersected":"Scroll down to intersect"}),t.jsx("div",{style:{height:"400px",display:"flex",alignItems:"end"},children:t.jsx(i,{onIntersect:()=>c(!0),children:"Observer"})})]})};e.storyName="ObserveIntersection";var s,n,r;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`() => {
|
|
2
2
|
const [isIntersecting, setIsIntersecting] = useState(false);
|
|
3
3
|
return (
|
|
4
4
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- This element is interactive; it's scrollable.
|