@preply/ds-docs 3.1.1-beta.b0da64e44680627847663be4d78ebeebea8c6944.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{00.LayoutFlex.stories-DkJ1Fct8.js → 00.LayoutFlex.stories-BkR5ji0l.js} +1 -1
- package/dist/assets/{00.applications-DafzJmd1.js → 00.applications-CsSmOme7.js} +1 -1
- package/dist/assets/{00.favicons.guide-brvegHPR.js → 00.favicons.guide-CdMYZlBh.js} +1 -1
- package/dist/assets/{00.token-explorer-NZgPJYgK.js → 00.token-explorer-CjKex2U0.js} +1 -1
- package/dist/assets/{00.using-responsive-props-BtIgzDL1.js → 00.using-responsive-props-CcMEjhk_.js} +1 -1
- package/dist/assets/{01.semantic-tokens-Cxg5O7jx.js → 01.semantic-tokens-D0SHoPNF.js} +1 -1
- package/dist/assets/{01.using-shorthand-props-C6ZNaf9k.js → 01.using-shorthand-props-DajODbNP.js} +1 -1
- package/dist/assets/10.Combinations.stories-Lbp_HuL_.js +144 -0
- package/dist/assets/{10.fonts.guide-BhCFCZBy.js → 10.fonts.guide-Ci1lcaYe.js} +1 -1
- package/dist/assets/{10.ssr-CETLnXz1.js → 10.ssr-DRWPPBeA.js} +1 -1
- package/dist/assets/{11.languageFont.explorer-Bc-g6XOq.js → 11.languageFont.explorer-D69j1geT.js} +29 -1
- package/dist/assets/{11.ssr.app-router-m2a2--0f.js → 11.ssr.app-router-DbPFodKU.js} +1 -1
- package/dist/assets/{20.libraries-CNNM7ENy.js → 20.libraries-KJ42tJQ9.js} +1 -1
- package/dist/assets/30.icons.explorer-Bk9N8wz6.js +73 -0
- package/dist/assets/{30.storybook-BVWKWFVN.js → 30.storybook-BNO20NWw.js} +1 -1
- package/dist/assets/{40.illustrations.explorer-qWSryWlk.js → 40.illustrations.explorer-Br4DiOY6.js} +1 -1
- package/dist/assets/{90.advanced-DvRy2sIG.js → 90.advanced-DaM2nGQV.js} +1 -1
- package/dist/assets/{Accordion-_oiPELIS.js → Accordion-CVZIOGNR.js} +1 -1
- package/dist/assets/{Accordion.stories-DW84iZId.js → Accordion.stories-CDnrzRXF.js} +1 -1
- package/dist/assets/{Accordion.tests.stories-HLUGZQBK.js → Accordion.tests.stories-czfo_KnK.js} +1 -1
- package/dist/assets/{AlertDialog.stories-CEKRc6cm.js → AlertDialog.stories-DUXRauPW.js} +1 -1
- package/dist/assets/{Avatar-D6BKQVaH.js → Avatar--Me1wFbM.js} +1 -1
- package/dist/assets/{Avatar-BkCAqOuF.js → Avatar-CECssVR9.js} +1 -1
- package/dist/assets/{Avatar.stories-DnjfAeSV.js → Avatar.stories-BsZPilds.js} +1 -1
- package/dist/assets/{AvatarWithStatus.stories-CocgTI5A.js → AvatarWithStatus.stories-Dh-_hU9Y.js} +1 -1
- package/dist/assets/{Badge.stories-Cx4CCSPq.js → Badge.stories-CFsXbV77.js} +1 -1
- package/dist/assets/{Box.stories-DsaKJbMG.js → Box.stories-IALze5eG.js} +1 -1
- package/dist/assets/{Button-CcY3QSgD.js → Button-ChyBn4PU.js} +2 -2
- package/dist/assets/{Button-klA2GCDX.js → Button-DWeSlYg5.js} +1 -1
- package/dist/assets/{Button.stories-CdendaHV.js → Button.stories-DJehWudj.js} +1 -1
- package/dist/assets/ButtonBase-CoNMqmsd.js +8 -0
- package/dist/assets/{Checkbox-DH5o6aup.js → Checkbox-CwZfp4fM.js} +2 -2
- package/dist/assets/{Checkbox.stories-sHbc4DyM.js → Checkbox.stories-BrO5VXvh.js} +1 -1
- package/dist/assets/{Checkbox.tests.stories-DX5vQTZm.js → Checkbox.tests.stories-CdUfdIiC.js} +1 -1
- package/dist/assets/{Chips.stories-BencIUny.js → Chips.stories-C3XJafXG.js} +1 -1
- package/dist/assets/{Color-YHDXOIA2-XZioejW2.js → Color-YHDXOIA2-dwipIw3c.js} +1 -1
- package/dist/assets/{Dialog.stories-Cf4RM2h2.js → Dialog.stories-D-J1dU3y.js} +2 -2
- package/dist/assets/{DocsRenderer-CFRXHY34-CerFBhAM.js → DocsRenderer-CFRXHY34-jqHePYZK.js} +1 -1
- package/dist/assets/{FieldButton-xxvyfVcj.js → FieldButton-Dprr9FF4.js} +1 -1
- package/dist/assets/{FieldButton.stories-1kY40W8X.js → FieldButton.stories-BuA4NyAH.js} +1 -1
- package/dist/assets/FormControl-V3kzTeDQ.js +7 -0
- package/dist/assets/FormControl.stories-BPAavujL.js +67 -0
- package/dist/assets/{Heading-sy1TMpjs.js → Heading-CCe1-9kC.js} +2 -2
- package/dist/assets/{Heading.stories-mFaQtYkx.js → Heading.stories-CyJWtiYM.js} +1 -1
- package/dist/assets/{Icon-zcBK8bUG.js → Icon-Clsj4XP8.js} +1 -1
- package/dist/assets/{Icon-DLiSwEfT.js → Icon-Cx1Om39U.js} +2 -2
- package/dist/assets/{Icon-RSC-DR17Q0N5.js → Icon-RSC-BrBOjBRF.js} +1 -1
- package/dist/assets/{Icon.stories-C98JIL87.js → Icon.stories-Batx6hcA.js} +1 -1
- package/dist/assets/IconButton-BlfJEn0q.js +8 -0
- package/dist/assets/{Input-Br6FM_ov.js → Input-DCIPe0x3.js} +7 -7
- package/dist/assets/InputContainer-Dq1Ks471.css +1 -0
- package/dist/assets/{IntegrationWithReactHookForm.stories-CjkAXxSi.js → IntegrationWithReactHookForm.stories-CehSEL8O.js} +1 -1
- package/dist/assets/{LayoutFlex-CDxj6nng.js → LayoutFlex-B8VATmiE.js} +1 -1
- package/dist/assets/{LayoutFlex-DsiZkqdg.js → LayoutFlex-Dp29ojjO.js} +1 -1
- package/dist/assets/LayoutFlexItem-D4lQfjMe.js +1 -0
- package/dist/assets/{LayoutGrid-6cTmb1jX.js → LayoutGrid-D9R6yTYX.js} +1 -1
- package/dist/assets/LayoutGrid-mQT2ikS8.css +1 -0
- package/dist/assets/LayoutGrid.stories-sBnmfXCQ.js +88 -0
- package/dist/assets/{LayoutGridItem-CVWVBh65.js → LayoutGridItem-B1eMKElL.js} +1 -1
- package/dist/assets/{Link.stories-DQM626ga.js → Link.stories-B08wLvpb.js} +1 -1
- package/dist/assets/{Loader.stories-CFBO-7A0.js → Loader.stories-C_wKZjOn.js} +1 -1
- package/dist/assets/NumberField-BS6zPFP5.js +6 -0
- package/dist/assets/{NumberField.stories-BvnypoI2.js → NumberField.stories-UOD1p45h.js} +7 -7
- package/dist/assets/{ObserveIntersection-QIlV9twe.js → ObserveIntersection-XIPHNpKf.js} +2 -2
- package/dist/assets/{ObserveIntersection.stories-BnaX-I6k.js → ObserveIntersection.stories-B_5fq2at.js} +1 -1
- package/dist/assets/{OnboardingTooltip-Drdxs-mL.js → OnboardingTooltip-CRciFvQd.js} +1 -1
- package/dist/assets/{OnboardingTooltip.stories-BalK-N-K.js → OnboardingTooltip.stories-B5dnjHfH.js} +1 -1
- package/dist/assets/{OnboardingTooltip.tests.stories-tVOg5MTR.js → OnboardingTooltip.tests.stories-CYdt5iT_.js} +1 -1
- package/dist/assets/{OnboardingTour-CHuPsA7n.js → OnboardingTour-C5J-Ko8C.js} +1 -1
- package/dist/assets/{OnboardingTour.stories-DU1CbGJb.js → OnboardingTour.stories-BiD_KX4W.js} +1 -1
- package/dist/assets/{OnboardingTour.tests.stories-C7a8Rmsv.js → OnboardingTour.tests.stories-mkgl6osQ.js} +1 -1
- package/dist/assets/PasswordField-EYDyw279.js +6 -0
- package/dist/assets/{PasswordField.stories-DePlhGin.js → PasswordField.stories-5PvQB5F3.js} +7 -7
- package/dist/assets/{PreplyLogo.stories-CxkodPun.js → PreplyLogo.stories-WWHnC28y.js} +2 -2
- package/dist/assets/{ProgressBar.stories-CvN4M4Mq.js → ProgressBar.stories-C4EKriYQ.js} +1 -1
- package/dist/assets/{ProgressSteps-CuGX9_Fy.js → ProgressSteps-ByDec2fC.js} +1 -1
- package/dist/assets/{ProgressSteps.stories-CPDR8zsn.js → ProgressSteps.stories-Mm9AyIKU.js} +1 -1
- package/dist/assets/{SelectField-DjLknbw4.js → SelectField-C0H4vwVQ.js} +12 -10
- package/dist/assets/{SelectField.stories-CWLAqY36.js → SelectField.stories-C4cQhsE9.js} +8 -8
- package/dist/assets/{ShowOnIntersection.stories-BeGWC-Z4.js → ShowOnIntersection.stories-CewFYwQu.js} +1 -1
- package/dist/assets/{Steps-LOo3xjBg.js → Steps-CX5urpe2.js} +1 -1
- package/dist/assets/{Steps.stories-DHdbOtvE.js → Steps.stories-agJ1P7Uc.js} +1 -1
- package/dist/assets/{Text-CH4wZQv6.js → Text-DmTAIIVj.js} +1 -1
- package/dist/assets/{Text.stories-DcJ53GNv.js → Text.stories-BG1P5AxU.js} +1 -1
- package/dist/assets/TextField-BAC0NZKU.js +6 -0
- package/dist/assets/TextField-D2GlsmWF.css +1 -0
- package/dist/assets/TextField-sLGry01P.js +1 -0
- package/dist/assets/{TextField.stories-DqDKfEbc.js → TextField.stories-DTmdRXTS.js} +8 -8
- package/dist/assets/{TextHighlighted-B7-aMGmA.js → TextHighlighted-CfvNH8PY.js} +1 -1
- package/dist/assets/{TextHighlighted.stories-DOQ3Cny3.js → TextHighlighted.stories-PV3yANaI.js} +1 -1
- package/dist/assets/{TextInline.stories-Db7MLcaa.js → TextInline.stories-DOhaF8wL.js} +1 -1
- package/dist/assets/{TextareaField-CXN-lN3Y.js → TextareaField-DdG6sVbG.js} +12 -10
- package/dist/assets/{TextareaField.stories-BPG4HgXb.js → TextareaField.stories-BGuKT2xQ.js} +8 -8
- package/dist/assets/{Toast.stories-Cb8tqWaO.js → Toast.stories-BeSJa7YF.js} +1 -1
- package/dist/assets/TokyoUIUpload-Bi3CuQzX.js +1 -0
- package/dist/assets/{Tooltip-hS-9HVfR.js → Tooltip-DYI-etfB.js} +1 -1
- package/dist/assets/{Tooltip.stories-DwcA4Tb6.js → Tooltip.stories-CxCj-ob2.js} +1 -1
- package/dist/assets/{Tooltip.tests.stories-DRBWtsl0.js → Tooltip.tests.stories-DjfeI8dX.js} +1 -1
- package/dist/assets/{breakpoints-_MTj6Tgh.js → breakpoints-B8uQp7_c.js} +1 -1
- package/dist/assets/{breakpoints-17pQbwrA.js → breakpoints-BbJx-zj1.js} +1 -1
- package/dist/assets/{breakpoints-ZcizX0pH.js → breakpoints-g7x119Q2.js} +1 -1
- package/dist/assets/{changelog-C38tZgD3.js → changelog-hhVEuRrF.js} +217 -205
- package/dist/assets/componentNames-Ba2ybP0W.js +1 -0
- package/dist/assets/{entry-preview-pq7Z7DEg.js → entry-preview-CQO5ZPIS.js} +1 -1
- package/dist/assets/{getTokenVar-CStyxwr3.js → getTokenVar-Ca9O7hDT.js} +1 -1
- package/dist/assets/{hover-BqprrboH.js → hover-BIh3LiSt.js} +1 -1
- package/dist/assets/{hover-C_XsDK4s.js → hover-GlkvVhX_.js} +1 -1
- package/dist/assets/{hover-CrxTgoLG.js → hover-NEm4I90j.js} +1 -1
- package/dist/assets/{iframe-BMnDNOZI.js → iframe-BoWsIu37.js} +2 -2
- package/dist/assets/{index-D2GTvH-Y.js → index-BWgFdnbj.js} +1 -1
- package/dist/assets/{index-yZrUxwWw.js → index-D6soH6D2.js} +3 -3
- package/dist/assets/{intro-CgRaz0NU.js → intro-DXHLrAaZ.js} +1 -1
- package/dist/assets/layout-relative-BpJIh3YK.js +1 -0
- package/dist/assets/{migrating-from-less-DSoSpfnJ.js → migrating-from-less-BmDjZBkA.js} +1 -1
- package/dist/assets/{playground-DBdZFxjC.css → playground-CCc6VR51.css} +1 -1
- package/dist/assets/{playground.stories-C-Sl-AMj.js → playground.stories-BMZQjPeS.js} +166 -166
- package/dist/assets/{preview-3wk0ugl8.js → preview-BP4TQFMI.js} +2 -2
- package/dist/assets/{preview-B_L7GhCJ.js → preview-CvZJdcB8.js} +1 -1
- package/dist/assets/{preview-DkQEncOB.js → preview-WXHEkGbd.js} +1 -1
- package/dist/assets/{tokens-uKFcWV14.js → tokens-CORgYdv_.js} +1 -1
- package/dist/assets/{tokens-DgTNh4rN.js → tokens-Dnw7r4iA.js} +1 -1
- package/dist/assets/{tokens-DXy5hgn5.js → tokens-ZvFzTwDp.js} +1 -1
- package/dist/assets/{tokens-Cy39NJA5.js → tokens-iVbEaxzw.js} +1 -1
- package/dist/assets/{usePortalElement-VI40uldV.js → usePortalElement-U5qKyOsX.js} +1 -1
- package/dist/assets/{welcome-DPhQTv2R.js → welcome-CChXvwAY.js} +1 -1
- package/dist/assets/{zeroheight-DbqVK-Vl.js → zeroheight-C-BxWtDD.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +1167 -1263
- package/dist/project.json +1 -1
- package/package.json +3 -3
- package/dist/assets/10.Combinations.stories-DptYuvtA.js +0 -144
- package/dist/assets/30.icons.explorer-DxZiwHrt.js +0 -73
- package/dist/assets/ButtonBase-CiON5Gq9.js +0 -8
- package/dist/assets/CountryFlag-p-8M_k5M.css +0 -1
- package/dist/assets/CountryFlag-ps90L8eN.js +0 -49
- package/dist/assets/Flag.stories-DEKGHg3O.js +0 -90
- package/dist/assets/Flag.test.stories-k_dwOPsD.js +0 -27
- package/dist/assets/FormControl-DD3JEwg1.js +0 -5
- package/dist/assets/FormControl.stories-DoVURnEB.js +0 -46
- package/dist/assets/IconButton-BnLs_P5O.js +0 -8
- package/dist/assets/InputContainer-DNEgpOcG.css +0 -1
- package/dist/assets/LayoutFlexItem-DcbU1Wtg.js +0 -1
- package/dist/assets/LayoutGrid.stories-Dvap6nXA.js +0 -88
- package/dist/assets/LayoutGridItem-DczUihq7.js +0 -1
- package/dist/assets/LayoutGridItem-Dy4Q8woN.css +0 -1
- package/dist/assets/NumberField-DtZiz9gx.js +0 -4
- package/dist/assets/PasswordField-DmJwowu1.js +0 -4
- package/dist/assets/TextField-872WjatY.js +0 -1
- package/dist/assets/TextField-CErKn01e.js +0 -4
- package/dist/assets/TextField-DdvdZqgn.css +0 -1
- package/dist/assets/align-self-BM6l9H5Z.js +0 -1
- package/dist/assets/componentNames-CVVyamkx.js +0 -1
- /package/dist/assets/{InputContainer-C1TOTxt4.js → InputContainer-Bk0tgFnW.js} +0 -0
- /package/dist/assets/{align-self-C4ATemga.css → layout-relative-C4ATemga.css} +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as a}from"./index-B3evPFBL.js";import{a as I}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{f as ke,u as y,a as h,e as p}from"./index-DDyIDR-R.js";import{R as Be,P as Te,O as Ie,C as Pe,T as He,D as Ee,a as Fe}from"./index-wFyje0se.js";import{B as l}from"./Button-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{r as a}from"./index-B3evPFBL.js";import{a as I}from"./chunk-D5ZWXAHU-BhFjjRSl.js";import{f as ke,u as y,a as h,e as p}from"./index-DDyIDR-R.js";import{R as Be,P as Te,O as Ie,C as Pe,T as He,D as Ee,a as Fe}from"./index-wFyje0se.js";import{B as l}from"./Button-ChyBn4PU.js";import{I as Ae}from"./IconButton-BlfJEn0q.js";import{H as Re}from"./Heading-CCe1-9kC.js";import{g as Ve}from"./shared-strings-CcWGHelY.js";import{u as Ne}from"./index-BfBdt3zW.js";import{g as We}from"./PortalElementProvider-D4ltrA8j.js";import{g as Le}from"./index-DdzHuZ-Y.js";import{w as P}from"./componentNames-Ba2ybP0W.js";import{m as qe,s as Me}from"./classNames-BUL1Zq7e.js";import{S as u}from"./Steps-CX5urpe2.js";import{I as Ue}from"./Icon-Cx1Om39U.js";import{A as Je}from"./Avatar-CECssVR9.js";import{F as Ze}from"./TokyoUIInfo-nHX2jpp7.js";import{L as Ke}from"./LayoutFlex-B8VATmiE.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./v4-CtRu48qb.js";import"./index-DRKYGVyc.js";import"./Combination-CCYtWL8C.js";import"./tslib.es6-BntfKcQG.js";import"./render-icon-CVTdrNe-.js";import"./ButtonBase-CoNMqmsd.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./Spinner-BCTJunNM.js";import"./defaults-B1rzzf6M.js";import"./useMergeRefs-CeyIhNgY.js";import"./useHostname-CH18gHFj.js";import"./index-CC6DAVyL.js";import"./text-accent-DZDDtpIt.js";import"./text-centered-CznToR0o.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./ProgressSteps-ByDec2fC.js";import"./message-BraTJ16C.js";import"./constants--ewUoBsO.js";import"./layout-relative.module-ed9bC4H4.js";const Ye=({title:s,titleId:o,...t},n)=>a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:n,"aria-labelledby":o,...t},s?a.createElement("title",{id:o},s):null,a.createElement("path",{fillRule:"evenodd",d:"M7.207 5.793a1 1 0 0 0-1.414 1.414L10.586 12l-4.793 4.793a1 1 0 1 0 1.414 1.414L12 13.414l4.793 4.793a1 1 0 0 0 1.414-1.414L13.414 12l4.793-4.793a1 1 0 0 0-1.414-1.414L12 10.586 7.207 5.793Z",clipRule:"evenodd"})),Xe=a.forwardRef(Ye),Ge="overlay__NM-kk",Qe="overlayShow__SQuh9",$e="overlayHide__UA0Uh",et="Dialog__GqDxV",tt="mobileContentShow__1akQp",ot="mobileContentHide__GXooF",st="contentShow__RpFHp",nt="contentHide__Y-gr5",at="header__2EPvy",it="description__0f9xh",rt="actions__hIL-J",m={overlay:Ge,overlayShow:Qe,overlayHide:$e,Dialog:et,mobileContentShow:tt,mobileContentHide:ot,"Dialog--size-xs":"Dialog--size-xs__W0yGm","Dialog--narrow-l--size-xs":"Dialog--narrow-l--size-xs__ljCvr","Dialog--medium-s--size-xs":"Dialog--medium-s--size-xs__t-4Ow","Dialog--medium-l--size-xs":"Dialog--medium-l--size-xs__yc1ae","Dialog--wide-s--size-xs":"Dialog--wide-s--size-xs__Id0f5","Dialog--wide-l--size-xs":"Dialog--wide-l--size-xs__Pnlyp","Dialog--size-sm":"Dialog--size-sm__rE3Y-","Dialog--narrow-l--size-sm":"Dialog--narrow-l--size-sm__M8-BH","Dialog--medium-s--size-sm":"Dialog--medium-s--size-sm__UPlli","Dialog--medium-l--size-sm":"Dialog--medium-l--size-sm__nAW8A","Dialog--wide-s--size-sm":"Dialog--wide-s--size-sm__i0pbj","Dialog--wide-l--size-sm":"Dialog--wide-l--size-sm__PghJ-","Dialog--size-md":"Dialog--size-md__HWxI4","Dialog--narrow-l--size-md":"Dialog--narrow-l--size-md__8jZY3","Dialog--medium-s--size-md":"Dialog--medium-s--size-md__dQ1TZ","Dialog--medium-l--size-md":"Dialog--medium-l--size-md__kcNF8","Dialog--wide-s--size-md":"Dialog--wide-s--size-md__KDVax","Dialog--wide-l--size-md":"Dialog--wide-l--size-md__mV57k","Dialog--size-lg":"Dialog--size-lg__Lis4-","Dialog--narrow-l--size-lg":"Dialog--narrow-l--size-lg__h5Tdx","Dialog--medium-s--size-lg":"Dialog--medium-s--size-lg__qci5k","Dialog--medium-l--size-lg":"Dialog--medium-l--size-lg__JCkaM","Dialog--wide-s--size-lg":"Dialog--wide-s--size-lg__eJlxf","Dialog--wide-l--size-lg":"Dialog--wide-l--size-lg__mo796",contentShow:st,contentHide:nt,header:at,description:it,actions:rt},lt=({open:s,title:o,description:t,children:n,size:d="md",hideHeader:g,onClose:f,dataset:Se})=>{const{formatMessage:we}=Ne(),ze=We(),be=Le(Se,{preplyDsComponent:P.Dialog}),Oe=qe(m,P.Dialog,[Me("size",d)]).join(" "),je=a.useCallback(_e=>{_e||f==null||f()},[f]);return e.jsx(Be,{open:s,onOpenChange:je,children:e.jsxs(Te,{container:ze,children:[e.jsx(Ie,{className:m.overlay,"data-testid":"dialog-overlay"}),e.jsxs(Pe,{...be,className:Oe,children:[e.jsxs("header",{className:m.header,children:[e.jsxs("hgroup",{hidden:g,children:[e.jsx(He,{asChild:!0,children:e.jsx(Re,{tag:"h3",variant:"medium",children:o})}),t&&e.jsx(Ee,{asChild:!0,children:e.jsx("p",{className:m.description,children:t})})]}),e.jsx(Fe,{asChild:!0,children:e.jsx(Ae,{variant:"ghost",dataset:{testid:"dialog-close"},assistiveText:we(Ve.close),svg:Xe})})]}),n]})]})})},dt=({primaryLabel:s,secondaryLabel:o,onPrimaryClick:t,onSecondaryClick:n})=>e.jsxs("div",{className:m.actions,children:[e.jsx(l,{variant:"secondary",onClick:n,children:o}),e.jsx(l,{variant:"primary",onClick:t,children:s})]}),i=Object.assign(lt,{Actions:dt});try{i.displayName="Dialog",i.__docgenInfo={description:`A modal dialog component that can be used to show content in an overlay.
|
2
2
|
|
3
3
|
Composed of:
|
4
4
|
- Dialog: The main component
|
5
|
-
- Dialog.Actions: Footer actions with primary and secondary buttons`,displayName:"Dialog",props:{open:{defaultValue:null,description:"Controls the visibility of the dialog",name:"open",required:!0,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},title:{defaultValue:null,description:"Title displayed in the dialog header",name:"title",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},description:{defaultValue:null,description:"Optional description displayed below the title",name:"description",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},children:{defaultValue:null,description:"Content to be rendered inside the dialog",name:"children",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},size:{defaultValue:{value:"md"},description:"Controls the width of the dialog on desktop and height on mobile",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"
|
5
|
+
- Dialog.Actions: Footer actions with primary and secondary buttons`,displayName:"Dialog",props:{open:{defaultValue:null,description:"Controls the visibility of the dialog",name:"open",required:!0,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},title:{defaultValue:null,description:"Title displayed in the dialog header",name:"title",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},description:{defaultValue:null,description:"Optional description displayed below the title",name:"description",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},children:{defaultValue:null,description:"Content to be rendered inside the dialog",name:"children",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},size:{defaultValue:{value:"md"},description:"Controls the width of the dialog on desktop and height on mobile",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'ResponsiveProp<"xs" | "sm" | "md" | "lg">'}]}},hideHeader:{defaultValue:{value:"false"},description:`When true, visually hides the header (title and description) while
|
6
6
|
keeping it accessible to screen readers`,name:"hideHeader",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},onClose:{defaultValue:null,description:`Callback fired when the user tries to close the dialog (via escape
|
7
7
|
key, overlay click, or close button).`,name:"onClose",required:!1,type:{name:"enum",value:[{value:"() => void"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}}}}}catch{}const Gt={title:"Components/Dialog",component:i,parameters:{docs:{story:{inline:!1,height:600}},a11y:{config:{rules:[{id:"color-contrast",enabled:!1}]}}},args:{onClose:ke()}},r=e.jsx("div",{style:{width:"100%",height:"200px",backgroundColor:"#e0e0e0"}}),c=async({canvas:s,step:o})=>{let t;return await o("Open dialog",async()=>{const n=s.getByTestId("trigger");return await y.click(n),h(()=>(t=s.getByTestId("dialog"),p(t).toBeVisible()))}),t},v={render:function(){const[o,t]=a.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(l,{dataset:{testid:"trigger"},onClick:()=>t(!0),children:"Open"}),e.jsx(i,{open:o,onClose:()=>t(!1),size:"xs",title:"Extra Small Dialog",dataset:{testid:"dialog"},children:r})]})},play:c},x={render:function(){const[o,t]=a.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(l,{dataset:{testid:"trigger"},onClick:()=>t(!0),children:"Open"}),e.jsx(i,{open:o,onClose:()=>t(!1),size:"sm",title:"Small Dialog",dataset:{testid:"dialog"},children:r})]})},play:c},C={render:function(){const[o,t]=a.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(l,{dataset:{testid:"trigger"},onClick:()=>t(!0),children:"Open"}),e.jsx(i,{open:o,onClose:()=>t(!1),size:"md",title:"Medium Dialog",dataset:{testid:"dialog"},children:r})]})},play:c},D={render:function(){const[o,t]=a.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(l,{dataset:{testid:"trigger"},onClick:()=>t(!0),children:"Open"}),e.jsx(i,{open:o,onClose:()=>t(!1),size:"lg",title:"Large Dialog",dataset:{testid:"dialog"},children:r})]})},play:c},S={parameters:{docs:{description:{story:`
|
8
8
|
The Dialog component adapts to different screen sizes through responsive size props.
|
@@ -1,2 +1,2 @@
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-uOP2uDdf.js","./index-B3evPFBL.js","./_commonjsHelpers-Cpj98o6Y.js"])))=>i.map(i=>d[i]);
|
2
|
-
import{_ as l}from"./iframe-
|
2
|
+
import{_ as l}from"./iframe-BoWsIu37.js";import{r as s,e as n}from"./index-B3evPFBL.js";import{H as p,A as h,C as E,c as d}from"./index-D6soH6D2.js";import{c as v}from"./client-DXF5tT0h.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./jsx-runtime-BYouaCF_.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";var i=new Map;function R(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var f=({callback:e,children:t})=>{let r=s.useRef();return s.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}});var w=async(e,t,r)=>{let o=await x(t,r);if(R()){o.render(e);return}let{promise:a,resolve:m}=Promise.withResolvers();return o.render(s.createElement(f,{callback:m},e)),a},_=(e,t)=>{let r=i.get(e);r&&(r.unmount(),i.delete(e))},x=async(e,t)=>{let r=i.get(e);return r||(r=v.createRoot(e,t),i.set(e,r)),r},g={code:E,a:h,...p},y=class extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:n.createElement(n.Fragment,null,t)}},H=class{constructor(){this.render=async(e,t,r)=>{let o={...g,...t==null?void 0:t.components},a=d;return new Promise((m,c)=>{l(async()=>{const{MDXProvider:u}=await import("./index-uOP2uDdf.js");return{MDXProvider:u}},__vite__mapDeps([0,1,2]),import.meta.url).then(({MDXProvider:u})=>w(n.createElement(y,{showException:c,key:Math.random()},n.createElement(u,{components:o},n.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>m())})},this.unmount=e=>{_(e)}}};export{H as DocsRenderer,g as defaultComponents};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as n}from"./jsx-runtime-BYouaCF_.js";import{r as f}from"./index-B3evPFBL.js";import{f as v}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as y}from"./classNames-BUL1Zq7e.js";import{g}from"./index-DdzHuZ-Y.js";import{w as a}from"./componentNames-
|
1
|
+
import{j as n}from"./jsx-runtime-BYouaCF_.js";import{r as f}from"./index-B3evPFBL.js";import{f as v}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as y}from"./classNames-BUL1Zq7e.js";import{g}from"./index-DdzHuZ-Y.js";import{w as a}from"./componentNames-Ba2ybP0W.js";const B="FieldButton__ZIYKf",b={FieldButton:B},l=f.forwardRef(function({svg:o,assistiveText:r,onClick:e,dataset:u,...i},m){const d=y(b,a.FieldButton),p=t=>{t.stopPropagation(),e==null||e(t)},c={...v(i),...g(u,{preplyDsComponent:a.FieldButton}),className:d.join(" "),title:r,onClick:p,ref:m};return n.jsx("button",{...c,type:"button",children:n.jsx(o,{"aria-hidden":"true",focusable:"false"})})});try{l.displayName="FieldButton",l.__docgenInfo={description:"",displayName:"FieldButton",props:{svg:{defaultValue:null,description:"",name:"svg",required:!0,type:{name:"enum",value:[{value:"ComponentClass<SVGAttributes<SVGElement>, any>"},{value:"FunctionComponent<SVGAttributes<SVGElement>>"}]}},assistiveText:{defaultValue:null,description:"",name:"assistiveText",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"MouseEventHandler<Element>"}},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: HTMLButtonElement | null) => void"},{value:"RefObject<HTMLButtonElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{l as F};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as i}from"./jsx-runtime-BYouaCF_.js";import{F as m}from"./LibraryExplore-C8GqDRwc.js";import{F as s}from"./FieldButton-
|
1
|
+
import{j as i}from"./jsx-runtime-BYouaCF_.js";import{F as m}from"./LibraryExplore-C8GqDRwc.js";import{F as s}from"./FieldButton-Dprr9FF4.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./classNames-BUL1Zq7e.js";import"./index-DdzHuZ-Y.js";import"./componentNames-Ba2ybP0W.js";const f={title:"components/FieldButton",component:s},o=()=>i.jsx(s,{svg:m,assistiveText:"Lorem Ipsum",onClick:()=>{}});o.storyName="FieldButton";var t,e,r;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:'() => <FieldButton svg={LibSvg} assistiveText="Lorem Ipsum" onClick={() => undefined} />',...(r=(e=o.parameters)==null?void 0:e.docs)==null?void 0:r.source}}};const v=["Base"];export{o as Base,v as __namedExportsOrder,f as default};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{S as q}from"./index-DRKYGVyc.js";import{r as x}from"./index-B3evPFBL.js";import"./index-BfBdt3zW.js";import{g as C}from"./index-DdzHuZ-Y.js";import{M as u}from"./message-BraTJ16C.js";import{w as _}from"./componentNames-Ba2ybP0W.js";const w="container__g46MP",E="label__dGrlk",F="required__w9EwB",N="description__AST5n",R="error__uRqiU",r={container:w,label:E,required:F,description:N,error:R};function j({id:t,error:n,description:o,hasError:l}){const e={};return l&&(e["aria-invalid"]=!0),n&&(e["aria-invalid"]=!0,e["aria-errormessage"]=`${t}-error`),o&&(e["aria-describedby"]=`${t}-description`),e}const p=({id:t,label:n,hideLabel:o,description:l,error:e,hasError:c,children:m,required:s,dataset:f,onClick:v,preplyDsComponent:h=_.FormControl,useLegacyRequiredLabel:d=!1})=>{const b=x.useId(),i=t||b,y=j({id:i,error:e,description:l,hasError:c}),g=C(f,{preplyDsComponent:h});return a.jsxs("div",{className:r.container,...g,onClick:v,children:[a.jsxs("label",{htmlFor:i,className:r.label,"data-hidden":o||!n,"data-testid":"label",children:[n,!!d&&s&&a.jsxs("span",{"aria-hidden":!0,className:r.required,children:[" • ",a.jsx(u,{id:"preply-ds.fieldLabel.required",defaultMessage:"Required",description:"Form field required label"})]}),!d&&!s&&a.jsxs("span",{"aria-hidden":!0,className:r.required,children:[" • ",a.jsx(u,{id:"preply-ds.fieldLabel.optional",defaultMessage:"Optional",description:"Form field optional label"})]})]}),a.jsx(q,{id:i,required:s,...y,children:m}),e?a.jsx("p",{className:r.error,role:"alert",id:`${i}-error`,"data-testid":"error",children:e}):l?a.jsx("p",{className:r.description,id:`${i}-description`,"data-testid":"description",children:l}):null]})};try{p.displayName="FormControl",p.__docgenInfo={description:"FormControl component provides a consistent layout and accessibility\nfor the form fields. You can use it to create custom fields not supported\nby the DS yet.\n\nNote that FormControl will implicitly provide some props to the child component:\n\n- `id` forwarded from FormControl props or will be generated automatically for accessibility purposes;\n- `aria-invalid` and `aria-errormessage` when `error` is provided;\n- `aria-describedby` when `description` is provided;\n- `required` when FormControl's `required` is true;",displayName:"FormControl",props:{id:{defaultValue:null,description:`The id to be passed to the input element.
|
2
|
+
If not provided, will be generated for accessibility purposes.`,name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},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"}]}},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"}]}},description:{defaultValue:null,description:`Additional descriptive text that appears below the input field
|
3
|
+
to provide more context or instructions to the user.`,name:"description",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},error:{defaultValue:null,description:"Error message to display when the field has an invalid value.",name:"error",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"false"},{value:"true"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"},{value:"Iterable<ReactNode>"},{value:"ReactPortal"}]}},hasError:{defaultValue:null,description:"Whether the field has an error.\n@deprecated Use `error` prop to exlicitly describe the error to users",name:"hasError",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},required:{defaultValue:null,description:`Indicates if the field is required. When false, adds a "Optional"
|
4
|
+
indicator next to the label.`,name:"required",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<HTMLDivElement>"}]}},preplyDsComponent:{defaultValue:{value:"webComponentNames.FormControl"},description:`@deprecated The attribute is meant for internal usage only
|
5
|
+
@ignore`,name:"preplyDsComponent",required:!1,type:{name:"enum",value:[{value:"string"}]}},useLegacyRequiredLabel:{defaultValue:{value:"false"},description:`When true, adds a "Required" indicator next to the label for the required fields.
|
6
|
+
When false, adds a "Optional" indicator next to the label for the optional fields instead.
|
7
|
+
@deprecated This is a temporary solution for gradual migration to the "Optional" label.`,name:"useLegacyRequiredLabel",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}}}}}catch{}export{p as F};
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import{j as t}from"./jsx-runtime-BYouaCF_.js";import{F as x}from"./FormControl-V3kzTeDQ.js";import{d as r}from"./styled-components.browser.esm-CwsnEFnS.js";import{r as j}from"./index-B3evPFBL.js";import{I as k}from"./Icon-Cx1Om39U.js";import{F as $}from"./TokyoUIUpload-Bi3CuQzX.js";import{T as L}from"./Text-DmTAIIVj.js";import{g as e}from"./getTokenVar-DU_DEzTd.js";import{c as d,s as p,r as S}from"./tokens-ZvFzTwDp.js";import"./index-DRKYGVyc.js";import"./index-BfBdt3zW.js";import"./tslib.es6-BntfKcQG.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";import"./index-DdzHuZ-Y.js";import"./message-BraTJ16C.js";import"./componentNames-Ba2ybP0W.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./defaults-B1rzzf6M.js";import"./text-centered-CznToR0o.js";import"./constants-BgBLeZzp.js";const tt={title:"Components/FormControl",component:x,parameters:{layout:"padded"}},o=()=>{const b=r.input.attrs({type:"file"})`
|
2
|
+
visibility: hidden;
|
3
|
+
position: absolute;
|
4
|
+
width: 0;
|
5
|
+
height: 0;
|
6
|
+
opacity: 0;
|
7
|
+
`,y=r.label`
|
8
|
+
background: ${e(d.background.secondary)};
|
9
|
+
padding: ${e(p[24])} ${e(p[16])};
|
10
|
+
border-radius: ${e(S[8])};
|
11
|
+
cursor: pointer;
|
12
|
+
|
13
|
+
&:has(input[aria-invalid='true']) {
|
14
|
+
background: ${e(d.background.criticalLight)};
|
15
|
+
}
|
16
|
+
`,C=r.div`
|
17
|
+
display: flex;
|
18
|
+
flex-direction: column;
|
19
|
+
align-items: center;
|
20
|
+
justify-content: center;
|
21
|
+
`,I=n=>{const[F,v]=j.useState("Select file to upload"),i=n["aria-invalid"]?"critical":"secondary",T=a=>{var s,l,c;v(((l=(s=a.target.files)==null?void 0:s[0])==null?void 0:l.name)||"Select file to upload"),(c=n.onChange)==null||c.call(n,a)};return t.jsxs(y,{children:[t.jsx(b,{...n,onChange:T}),t.jsxs(C,{children:[t.jsx(k,{size:"32",svg:$,accent:i}),t.jsx(L,{variant:"default-regular",accent:i,children:F})]})]})};return t.jsx(x,{label:"Upload photo",description:"Your photo will be displayed in your profile",children:t.jsx(I,{})})};var m,u,g,h,f;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`() => {
|
22
|
+
const Input = styled.input.attrs({
|
23
|
+
type: 'file'
|
24
|
+
})\`
|
25
|
+
visibility: hidden;
|
26
|
+
position: absolute;
|
27
|
+
width: 0;
|
28
|
+
height: 0;
|
29
|
+
opacity: 0;
|
30
|
+
\`;
|
31
|
+
const Label = styled.label\`
|
32
|
+
background: \${t(color.background.secondary)};
|
33
|
+
padding: \${t(spacing[24])} \${t(spacing[16])};
|
34
|
+
border-radius: \${t(radius[8])};
|
35
|
+
cursor: pointer;
|
36
|
+
|
37
|
+
&:has(input[aria-invalid='true']) {
|
38
|
+
background: \${t(color.background.criticalLight)};
|
39
|
+
}
|
40
|
+
\`;
|
41
|
+
const Inner = styled.div\`
|
42
|
+
display: flex;
|
43
|
+
flex-direction: column;
|
44
|
+
align-items: center;
|
45
|
+
justify-content: center;
|
46
|
+
\`;
|
47
|
+
const FileInput = (props: HTMLAttributes<HTMLInputElement>) => {
|
48
|
+
const [text, setText] = useState('Select file to upload');
|
49
|
+
const accent = props['aria-invalid'] ? 'critical' : 'secondary';
|
50
|
+
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
51
|
+
setText(e.target.files?.[0]?.name || 'Select file to upload');
|
52
|
+
props.onChange?.(e);
|
53
|
+
};
|
54
|
+
return <Label>
|
55
|
+
<Input {...props} onChange={handleChange} />
|
56
|
+
<Inner>
|
57
|
+
<Icon size="32" svg={TokyoUIUpload} accent={accent} />
|
58
|
+
<Text variant="default-regular" accent={accent}>
|
59
|
+
{text}
|
60
|
+
</Text>
|
61
|
+
</Inner>
|
62
|
+
</Label>;
|
63
|
+
};
|
64
|
+
return <FormControl label="Upload photo" description="Your photo will be displayed in your profile">
|
65
|
+
<FileInput />
|
66
|
+
</FormControl>;
|
67
|
+
}`,...(g=(u=o.parameters)==null?void 0:u.docs)==null?void 0:g.source},description:{story:"This example demonstrates how to use the FormControl to create a custom input field.",...(f=(h=o.parameters)==null?void 0:h.docs)==null?void 0:f.description}}};const nt=["CustomFormField"];export{o as CustomFormField,nt as __namedExportsOrder,tt as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{j as x}from"./jsx-runtime-BYouaCF_.js";import{r as N}from"./index-B3evPFBL.js";import{g as b,a as C}from"./text-accent-DZDDtpIt.js";import{g as L}from"./text-centered-CznToR0o.js";import{f as T}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as k,s as q,b as E}from"./classNames-BUL1Zq7e.js";import{w as i}from"./componentNames-CVVyamkx.js";import{g as U}from"./index-DdzHuZ-Y.js";const V="Heading__Erkb1",I={Heading:V,"Heading--level-h1-normal":"Heading--level-h1-normal__t2Kqc","Heading--level-h1-large":"Heading--level-h1-large__2-ENi","Heading--level-h2-normal":"Heading--level-h2-normal__VzetR","Heading--level-h2-large":"Heading--level-h2-large__NxpiQ","Heading--level-h3-normal":"Heading--level-h3-normal__vCnMS","Heading--level-h3-large":"Heading--level-h3-large__Vs-gN","Heading--level-h4-normal":"Heading--level-h4-normal__O6PPx","Heading--level-h4-large":"Heading--level-h4-large__fNZXP","Heading--level-h5-normal":"Heading--level-h5-normal__IMKhU","Heading--level-h5-large":"Heading--level-h5-large__G40j-","Heading--narrow-l--level-h1-normal":"Heading--narrow-l--level-h1-normal__1qZxP","Heading--narrow-l--level-h1-large":"Heading--narrow-l--level-h1-large__vhit5","Heading--narrow-l--level-h2-normal":"Heading--narrow-l--level-h2-normal__a2FJF","Heading--narrow-l--level-h2-large":"Heading--narrow-l--level-h2-large__qFLdx","Heading--narrow-l--level-h3-normal":"Heading--narrow-l--level-h3-normal__D2GNa","Heading--narrow-l--level-h3-large":"Heading--narrow-l--level-h3-large__xeciI","Heading--narrow-l--level-h4-normal":"Heading--narrow-l--level-h4-normal__G7nUl","Heading--narrow-l--level-h4-large":"Heading--narrow-l--level-h4-large__cL6he","Heading--narrow-l--level-h5-normal":"Heading--narrow-l--level-h5-normal__UNw3s","Heading--narrow-l--level-h5-large":"Heading--narrow-l--level-h5-large__o76Fo","Heading--medium-s--level-h1-normal":"Heading--medium-s--level-h1-normal__IGwXF","Heading--medium-s--level-h1-large":"Heading--medium-s--level-h1-large__y2QjY","Heading--medium-s--level-h2-normal":"Heading--medium-s--level-h2-normal__T5nXA","Heading--medium-s--level-h2-large":"Heading--medium-s--level-h2-large__FbGid","Heading--medium-s--level-h3-normal":"Heading--medium-s--level-h3-normal__dcenB","Heading--medium-s--level-h3-large":"Heading--medium-s--level-h3-large__AR-Fa","Heading--medium-s--level-h4-normal":"Heading--medium-s--level-h4-normal__-NI8n","Heading--medium-s--level-h4-large":"Heading--medium-s--level-h4-large__AE93N","Heading--medium-s--level-h5-normal":"Heading--medium-s--level-h5-normal__ZJEJ-","Heading--medium-s--level-h5-large":"Heading--medium-s--level-h5-large__GJ8sd","Heading--medium-l--level-h1-normal":"Heading--medium-l--level-h1-normal__UG7oa","Heading--medium-l--level-h1-large":"Heading--medium-l--level-h1-large__hJgJ9","Heading--medium-l--level-h2-normal":"Heading--medium-l--level-h2-normal__sf7Py","Heading--medium-l--level-h2-large":"Heading--medium-l--level-h2-large__iYIZ9","Heading--medium-l--level-h3-normal":"Heading--medium-l--level-h3-normal__32eny","Heading--medium-l--level-h3-large":"Heading--medium-l--level-h3-large__kuCwB","Heading--medium-l--level-h4-normal":"Heading--medium-l--level-h4-normal__TE1Eh","Heading--medium-l--level-h4-large":"Heading--medium-l--level-h4-large__zZfdz","Heading--medium-l--level-h5-normal":"Heading--medium-l--level-h5-normal__7HYFE","Heading--medium-l--level-h5-large":"Heading--medium-l--level-h5-large__NkY03","Heading--wide-s--level-h1-normal":"Heading--wide-s--level-h1-normal__kqRcj","Heading--wide-s--level-h1-large":"Heading--wide-s--level-h1-large__yzHzL","Heading--wide-s--level-h2-normal":"Heading--wide-s--level-h2-normal__b9MXd","Heading--wide-s--level-h2-large":"Heading--wide-s--level-h2-large__q0kXc","Heading--wide-s--level-h3-normal":"Heading--wide-s--level-h3-normal__Ziuj8","Heading--wide-s--level-h3-large":"Heading--wide-s--level-h3-large__Q4111","Heading--wide-s--level-h4-normal":"Heading--wide-s--level-h4-normal__TxCtT","Heading--wide-s--level-h4-large":"Heading--wide-s--level-h4-large__cQQZf","Heading--wide-s--level-h5-normal":"Heading--wide-s--level-h5-normal__ZSrD7","Heading--wide-s--level-h5-large":"Heading--wide-s--level-h5-large__ZuCIn","Heading--wide-l--level-h1-normal":"Heading--wide-l--level-h1-normal__MavHI","Heading--wide-l--level-h1-large":"Heading--wide-l--level-h1-large__rE1tu","Heading--wide-l--level-h2-normal":"Heading--wide-l--level-h2-normal__YUYcX","Heading--wide-l--level-h2-large":"Heading--wide-l--level-h2-large__v5ssH","Heading--wide-l--level-h3-normal":"Heading--wide-l--level-h3-normal__kQBs2","Heading--wide-l--level-h3-large":"Heading--wide-l--level-h3-large__pU-wX","Heading--wide-l--level-h4-normal":"Heading--wide-l--level-h4-normal__WvWGX","Heading--wide-l--level-h4-large":"Heading--wide-l--level-h4-large__TeFQp","Heading--wide-l--level-h5-normal":"Heading--wide-l--level-h5-normal__1yKda","Heading--wide-l--level-h5-large":"Heading--wide-l--level-h5-large__Uadr4","Heading--variant-massive":"Heading--variant-massive__JFGji","Heading--variant-huge":"Heading--variant-huge__47FQz","Heading--variant-extraLarge":"Heading--variant-extraLarge__xRrqx","Heading--variant-large":"Heading--variant-large__wNK6S","Heading--variant-medium":"Heading--variant-medium__bCNZ-","Heading--variant-small":"Heading--variant-small__308Nb","Heading--narrow-l--variant-massive":"Heading--narrow-l--variant-massive__yg4AJ","Heading--narrow-l--variant-huge":"Heading--narrow-l--variant-huge__y9b4N","Heading--narrow-l--variant-extraLarge":"Heading--narrow-l--variant-extraLarge__XgyJu","Heading--narrow-l--variant-large":"Heading--narrow-l--variant-large__tzTo6","Heading--narrow-l--variant-medium":"Heading--narrow-l--variant-medium__iP3sG","Heading--narrow-l--variant-small":"Heading--narrow-l--variant-small__KeKjn","Heading--medium-s--variant-massive":"Heading--medium-s--variant-massive__L-b4J","Heading--medium-s--variant-huge":"Heading--medium-s--variant-huge__2o5EA","Heading--medium-s--variant-extraLarge":"Heading--medium-s--variant-extraLarge__eHmYu","Heading--medium-s--variant-large":"Heading--medium-s--variant-large__AI3KL","Heading--medium-s--variant-medium":"Heading--medium-s--variant-medium__t5dUK","Heading--medium-s--variant-small":"Heading--medium-s--variant-small__fCdNa","Heading--medium-l--variant-massive":"Heading--medium-l--variant-massive__jI3FW","Heading--medium-l--variant-huge":"Heading--medium-l--variant-huge__k0UpW","Heading--medium-l--variant-extraLarge":"Heading--medium-l--variant-extraLarge__yfai7","Heading--medium-l--variant-large":"Heading--medium-l--variant-large__65QTG","Heading--medium-l--variant-medium":"Heading--medium-l--variant-medium__UvxHB","Heading--medium-l--variant-small":"Heading--medium-l--variant-small__QI2p2","Heading--wide-s--variant-massive":"Heading--wide-s--variant-massive__B1S84","Heading--wide-s--variant-huge":"Heading--wide-s--variant-huge__KvYrn","Heading--wide-s--variant-extraLarge":"Heading--wide-s--variant-extraLarge__TJs8l","Heading--wide-s--variant-large":"Heading--wide-s--variant-large__Wcc0E","Heading--wide-s--variant-medium":"Heading--wide-s--variant-medium__mONpk","Heading--wide-s--variant-small":"Heading--wide-s--variant-small__oRKSN","Heading--wide-l--variant-massive":"Heading--wide-l--variant-massive__twgw-","Heading--wide-l--variant-huge":"Heading--wide-l--variant-huge__DBuNF","Heading--wide-l--variant-extraLarge":"Heading--wide-l--variant-extraLarge__H9nEI","Heading--wide-l--variant-large":"Heading--wide-l--variant-large__kJarT","Heading--wide-l--variant-medium":"Heading--wide-l--variant-medium__VN27E","Heading--wide-l--variant-small":"Heading--wide-l--variant-small__Skmxk"},r=N.forwardRef(function({children:g,variant:a,accent:l,level:e,large:v=!1,tag:m,color:n,centered:u,dataset:t,id:s,...o},H){const _=m||e||"h1",h=k(I,i.Heading,a?q("variant",a):E(`level-${e}-large`,`level-${e}-normal`,v)),w=L(u),c=b(!(l?void 0:n),l),p=C(n),f=["preply-ds-heading",...h,...w,...c,...p],y={...T(o),className:f.join(" "),...U(t,{preplyDsComponent:i.Heading}),id:s,ref:H};return x.jsx(_,{...y,children:g})});try{r.displayName="Heading",r.__docgenInfo={description:"",displayName:"Heading",props:{strong:{defaultValue:null,description:"@deprecated The appropriate `font-weight` is automatically set",name:"strong",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},accent:{defaultValue:null,description:"",name:"accent",required:!1,type:{name:"enum",value:[{value:'"accent"'},{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"placeholder"'},{value:'"inverted"'},{value:'"positive"'},{value:'"info"'},{value:'"warning"'},{value:'"critical"'},{value:'"disabled"'},{value:'"branded"'},{value:'"selected"'},{value:'"error"'}]}},color:{defaultValue:null,description:"@deprecated Use `accent` instead.",name:"color",required:!1,type:{name:"enum",value:[{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'}]}},centered:{defaultValue:null,description:"",name:"centered",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"}]}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},level:{defaultValue:null,description:"@deprecated Use `variant` instead\n@deprecated Use `variant` instead",name:"level",required:!1,type:{name:"enum",value:[{value:'"h1"'},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},large:{defaultValue:{value:"false"},description:`@deprecated There is no large version in Tokyo UI.
|
2
|
-
@deprecated There is no large version in Tokyo UI.`,name:"large",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"
|
1
|
+
import{j as x}from"./jsx-runtime-BYouaCF_.js";import{r as N}from"./index-B3evPFBL.js";import{g as b,a as C}from"./text-accent-DZDDtpIt.js";import{g as L}from"./text-centered-CznToR0o.js";import{f as T}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{m as k,s as q,b as E}from"./classNames-BUL1Zq7e.js";import{w as i}from"./componentNames-Ba2ybP0W.js";import{g as U}from"./index-DdzHuZ-Y.js";const V="Heading__Erkb1",I={Heading:V,"Heading--level-h1-normal":"Heading--level-h1-normal__t2Kqc","Heading--level-h1-large":"Heading--level-h1-large__2-ENi","Heading--level-h2-normal":"Heading--level-h2-normal__VzetR","Heading--level-h2-large":"Heading--level-h2-large__NxpiQ","Heading--level-h3-normal":"Heading--level-h3-normal__vCnMS","Heading--level-h3-large":"Heading--level-h3-large__Vs-gN","Heading--level-h4-normal":"Heading--level-h4-normal__O6PPx","Heading--level-h4-large":"Heading--level-h4-large__fNZXP","Heading--level-h5-normal":"Heading--level-h5-normal__IMKhU","Heading--level-h5-large":"Heading--level-h5-large__G40j-","Heading--narrow-l--level-h1-normal":"Heading--narrow-l--level-h1-normal__1qZxP","Heading--narrow-l--level-h1-large":"Heading--narrow-l--level-h1-large__vhit5","Heading--narrow-l--level-h2-normal":"Heading--narrow-l--level-h2-normal__a2FJF","Heading--narrow-l--level-h2-large":"Heading--narrow-l--level-h2-large__qFLdx","Heading--narrow-l--level-h3-normal":"Heading--narrow-l--level-h3-normal__D2GNa","Heading--narrow-l--level-h3-large":"Heading--narrow-l--level-h3-large__xeciI","Heading--narrow-l--level-h4-normal":"Heading--narrow-l--level-h4-normal__G7nUl","Heading--narrow-l--level-h4-large":"Heading--narrow-l--level-h4-large__cL6he","Heading--narrow-l--level-h5-normal":"Heading--narrow-l--level-h5-normal__UNw3s","Heading--narrow-l--level-h5-large":"Heading--narrow-l--level-h5-large__o76Fo","Heading--medium-s--level-h1-normal":"Heading--medium-s--level-h1-normal__IGwXF","Heading--medium-s--level-h1-large":"Heading--medium-s--level-h1-large__y2QjY","Heading--medium-s--level-h2-normal":"Heading--medium-s--level-h2-normal__T5nXA","Heading--medium-s--level-h2-large":"Heading--medium-s--level-h2-large__FbGid","Heading--medium-s--level-h3-normal":"Heading--medium-s--level-h3-normal__dcenB","Heading--medium-s--level-h3-large":"Heading--medium-s--level-h3-large__AR-Fa","Heading--medium-s--level-h4-normal":"Heading--medium-s--level-h4-normal__-NI8n","Heading--medium-s--level-h4-large":"Heading--medium-s--level-h4-large__AE93N","Heading--medium-s--level-h5-normal":"Heading--medium-s--level-h5-normal__ZJEJ-","Heading--medium-s--level-h5-large":"Heading--medium-s--level-h5-large__GJ8sd","Heading--medium-l--level-h1-normal":"Heading--medium-l--level-h1-normal__UG7oa","Heading--medium-l--level-h1-large":"Heading--medium-l--level-h1-large__hJgJ9","Heading--medium-l--level-h2-normal":"Heading--medium-l--level-h2-normal__sf7Py","Heading--medium-l--level-h2-large":"Heading--medium-l--level-h2-large__iYIZ9","Heading--medium-l--level-h3-normal":"Heading--medium-l--level-h3-normal__32eny","Heading--medium-l--level-h3-large":"Heading--medium-l--level-h3-large__kuCwB","Heading--medium-l--level-h4-normal":"Heading--medium-l--level-h4-normal__TE1Eh","Heading--medium-l--level-h4-large":"Heading--medium-l--level-h4-large__zZfdz","Heading--medium-l--level-h5-normal":"Heading--medium-l--level-h5-normal__7HYFE","Heading--medium-l--level-h5-large":"Heading--medium-l--level-h5-large__NkY03","Heading--wide-s--level-h1-normal":"Heading--wide-s--level-h1-normal__kqRcj","Heading--wide-s--level-h1-large":"Heading--wide-s--level-h1-large__yzHzL","Heading--wide-s--level-h2-normal":"Heading--wide-s--level-h2-normal__b9MXd","Heading--wide-s--level-h2-large":"Heading--wide-s--level-h2-large__q0kXc","Heading--wide-s--level-h3-normal":"Heading--wide-s--level-h3-normal__Ziuj8","Heading--wide-s--level-h3-large":"Heading--wide-s--level-h3-large__Q4111","Heading--wide-s--level-h4-normal":"Heading--wide-s--level-h4-normal__TxCtT","Heading--wide-s--level-h4-large":"Heading--wide-s--level-h4-large__cQQZf","Heading--wide-s--level-h5-normal":"Heading--wide-s--level-h5-normal__ZSrD7","Heading--wide-s--level-h5-large":"Heading--wide-s--level-h5-large__ZuCIn","Heading--wide-l--level-h1-normal":"Heading--wide-l--level-h1-normal__MavHI","Heading--wide-l--level-h1-large":"Heading--wide-l--level-h1-large__rE1tu","Heading--wide-l--level-h2-normal":"Heading--wide-l--level-h2-normal__YUYcX","Heading--wide-l--level-h2-large":"Heading--wide-l--level-h2-large__v5ssH","Heading--wide-l--level-h3-normal":"Heading--wide-l--level-h3-normal__kQBs2","Heading--wide-l--level-h3-large":"Heading--wide-l--level-h3-large__pU-wX","Heading--wide-l--level-h4-normal":"Heading--wide-l--level-h4-normal__WvWGX","Heading--wide-l--level-h4-large":"Heading--wide-l--level-h4-large__TeFQp","Heading--wide-l--level-h5-normal":"Heading--wide-l--level-h5-normal__1yKda","Heading--wide-l--level-h5-large":"Heading--wide-l--level-h5-large__Uadr4","Heading--variant-massive":"Heading--variant-massive__JFGji","Heading--variant-huge":"Heading--variant-huge__47FQz","Heading--variant-extraLarge":"Heading--variant-extraLarge__xRrqx","Heading--variant-large":"Heading--variant-large__wNK6S","Heading--variant-medium":"Heading--variant-medium__bCNZ-","Heading--variant-small":"Heading--variant-small__308Nb","Heading--narrow-l--variant-massive":"Heading--narrow-l--variant-massive__yg4AJ","Heading--narrow-l--variant-huge":"Heading--narrow-l--variant-huge__y9b4N","Heading--narrow-l--variant-extraLarge":"Heading--narrow-l--variant-extraLarge__XgyJu","Heading--narrow-l--variant-large":"Heading--narrow-l--variant-large__tzTo6","Heading--narrow-l--variant-medium":"Heading--narrow-l--variant-medium__iP3sG","Heading--narrow-l--variant-small":"Heading--narrow-l--variant-small__KeKjn","Heading--medium-s--variant-massive":"Heading--medium-s--variant-massive__L-b4J","Heading--medium-s--variant-huge":"Heading--medium-s--variant-huge__2o5EA","Heading--medium-s--variant-extraLarge":"Heading--medium-s--variant-extraLarge__eHmYu","Heading--medium-s--variant-large":"Heading--medium-s--variant-large__AI3KL","Heading--medium-s--variant-medium":"Heading--medium-s--variant-medium__t5dUK","Heading--medium-s--variant-small":"Heading--medium-s--variant-small__fCdNa","Heading--medium-l--variant-massive":"Heading--medium-l--variant-massive__jI3FW","Heading--medium-l--variant-huge":"Heading--medium-l--variant-huge__k0UpW","Heading--medium-l--variant-extraLarge":"Heading--medium-l--variant-extraLarge__yfai7","Heading--medium-l--variant-large":"Heading--medium-l--variant-large__65QTG","Heading--medium-l--variant-medium":"Heading--medium-l--variant-medium__UvxHB","Heading--medium-l--variant-small":"Heading--medium-l--variant-small__QI2p2","Heading--wide-s--variant-massive":"Heading--wide-s--variant-massive__B1S84","Heading--wide-s--variant-huge":"Heading--wide-s--variant-huge__KvYrn","Heading--wide-s--variant-extraLarge":"Heading--wide-s--variant-extraLarge__TJs8l","Heading--wide-s--variant-large":"Heading--wide-s--variant-large__Wcc0E","Heading--wide-s--variant-medium":"Heading--wide-s--variant-medium__mONpk","Heading--wide-s--variant-small":"Heading--wide-s--variant-small__oRKSN","Heading--wide-l--variant-massive":"Heading--wide-l--variant-massive__twgw-","Heading--wide-l--variant-huge":"Heading--wide-l--variant-huge__DBuNF","Heading--wide-l--variant-extraLarge":"Heading--wide-l--variant-extraLarge__H9nEI","Heading--wide-l--variant-large":"Heading--wide-l--variant-large__kJarT","Heading--wide-l--variant-medium":"Heading--wide-l--variant-medium__VN27E","Heading--wide-l--variant-small":"Heading--wide-l--variant-small__Skmxk"},r=N.forwardRef(function({children:g,variant:a,accent:l,level:e,large:v=!1,tag:m,color:n,centered:u,dataset:t,id:s,...o},H){const _=m||e||"h1",h=k(I,i.Heading,a?q("variant",a):E(`level-${e}-large`,`level-${e}-normal`,v)),w=L(u),c=b(!(l?void 0:n),l),p=C(n),f=["preply-ds-heading",...h,...w,...c,...p],y={...T(o),className:f.join(" "),...U(t,{preplyDsComponent:i.Heading}),id:s,ref:H};return x.jsx(_,{...y,children:g})});try{r.displayName="Heading",r.__docgenInfo={description:"",displayName:"Heading",props:{strong:{defaultValue:null,description:"@deprecated The appropriate `font-weight` is automatically set",name:"strong",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},accent:{defaultValue:null,description:"",name:"accent",required:!1,type:{name:"enum",value:[{value:'"accent"'},{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"placeholder"'},{value:'"inverted"'},{value:'"positive"'},{value:'"info"'},{value:'"warning"'},{value:'"critical"'},{value:'"disabled"'},{value:'"branded"'},{value:'"selected"'},{value:'"error"'}]}},color:{defaultValue:null,description:"@deprecated Use `accent` instead.",name:"color",required:!1,type:{name:"enum",value:[{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'}]}},centered:{defaultValue:null,description:"",name:"centered",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"}]}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},level:{defaultValue:null,description:"@deprecated Use `variant` instead\n@deprecated Use `variant` instead",name:"level",required:!1,type:{name:"enum",value:[{value:'"h1"'},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},large:{defaultValue:{value:"false"},description:`@deprecated There is no large version in Tokyo UI.
|
2
|
+
@deprecated There is no large version in Tokyo UI.`,name:"large",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"},{value:"ResponsiveProp<boolean>"}]}},tag:{defaultValue:null,description:"",name:"tag",required:!1,type:{name:"enum",value:[{value:'"p"'},{value:'"div"'},{value:'"span"'},{value:'"h1"'},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"large"'},{value:'"massive"'},{value:'"huge"'},{value:'"extraLarge"'},{value:'"medium"'},{value:'"small"'},{value:"ResponsiveProp<HeadingVariant>"}]}},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: HTMLHeadingElement | null) => void"},{value:"RefObject<HTMLHeadingElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}}}}}catch{}export{r as H};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{H as e}from"./Heading-
|
1
|
+
import{j as a}from"./jsx-runtime-BYouaCF_.js";import{H as e}from"./Heading-CCe1-9kC.js";import{S as s}from"./consts-KAYct7Gj.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./text-centered-CznToR0o.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";const T={title:"components/Heading",component:e,argTypes:{centered:{description:s},variant:{description:s}}},r=()=>a.jsxs("div",{style:{padding:"16px",display:"grid",gridTemplateColumns:"auto 3fr",alignItems:"center",gap:"16px"},children:[a.jsx("span",{children:"h1 / massive"}),a.jsx(e,{tag:"h1",variant:"massive",children:"Lorem ipsum"}),a.jsx("span",{children:"h2 / huge"}),a.jsx(e,{tag:"h2",variant:"huge",children:"Lorem ipsum"}),a.jsx("span",{children:"h3 / extraLarge"}),a.jsx(e,{tag:"h3",variant:"extraLarge",children:"Lorem ipsum"}),a.jsx("span",{children:"h4 / large"}),a.jsx(e,{tag:"h4",variant:"large",children:"Lorem ipsum"}),a.jsx("span",{children:"h5 / medium"}),a.jsx(e,{tag:"h5",variant:"medium",children:"Lorem ipsum"}),a.jsx("span",{children:"p / small"}),a.jsx(e,{tag:"p",variant:"small",children:"Lorem ipsum"})]}),n={parameters:{chromatic:{disableSnapshot:!0}},decorators:[(m,{args:g})=>a.jsx("div",{style:{backgroundColor:g.accent==="inverted"?"black":void 0},children:m()})],args:{tag:"h1",variant:"massive",children:"Lorem ipsum",dataset:{qaid:"heading"}},argTypes:{centered:{control:"boolean"},dataset:{control:"object"},strong:{table:{disable:!0}},level:{table:{disable:!0}},color:{table:{disable:!0}},large:{table:{disable:!0}}}};var t,i,o;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`() => <div style={{
|
2
2
|
padding: '16px',
|
3
3
|
display: 'grid',
|
4
4
|
gridTemplateColumns: 'auto 3fr',
|
@@ -1 +1 @@
|
|
1
|
-
import{j as b}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{g as f,a as N}from"./text-centered-C0V1O_Sd.js";import{f as k}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{r as z}from"./render-icon-CwRdpin3.js";import{m as _,s as h,b as P}from"./classNames-BUL1Zq7e.js";import{I as U}from"./defaults-B1rzzf6M.js";import{w as c}from"./componentNames-
|
1
|
+
import{j as b}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{g as f,a as N}from"./text-centered-C0V1O_Sd.js";import{f as k}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{r as z}from"./render-icon-CwRdpin3.js";import{m as _,s as h,b as P}from"./classNames-BUL1Zq7e.js";import{I as U}from"./defaults-B1rzzf6M.js";import{w as c}from"./componentNames-Ba2ybP0W.js";import{g as D}from"./index-DdzHuZ-Y.js";const K="ExpColor__S0PGo",S={ExpColor:K,"ExpColor--exp-color-grey-0":"ExpColor--exp-color-grey-0__DKudt","ExpColor--exp-color-grey-50":"ExpColor--exp-color-grey-50__lo7OH","ExpColor--exp-color-grey-100":"ExpColor--exp-color-grey-100__EtBtx","ExpColor--exp-color-grey-200":"ExpColor--exp-color-grey-200__KHF8X","ExpColor--exp-color-grey-300":"ExpColor--exp-color-grey-300__0u63D","ExpColor--exp-color-grey-400":"ExpColor--exp-color-grey-400__WaJzi","ExpColor--exp-color-grey-500":"ExpColor--exp-color-grey-500__1RSHd","ExpColor--exp-color-grey-600":"ExpColor--exp-color-grey-600__95yQU","ExpColor--exp-color-grey-700":"ExpColor--exp-color-grey-700__SSayo","ExpColor--exp-color-grey-800":"ExpColor--exp-color-grey-800__15Bou","ExpColor--exp-color-grey-900":"ExpColor--exp-color-grey-900__BKw9C","ExpColor--exp-color-pink-50":"ExpColor--exp-color-pink-50__SZLGx","ExpColor--exp-color-pink-100":"ExpColor--exp-color-pink-100__J0yFM","ExpColor--exp-color-pink-200":"ExpColor--exp-color-pink-200__dQ0mZ","ExpColor--exp-color-pink-300":"ExpColor--exp-color-pink-300__WYBWX","ExpColor--exp-color-pink-400":"ExpColor--exp-color-pink-400__7Jazs","ExpColor--exp-color-pink-500":"ExpColor--exp-color-pink-500__4X2bs","ExpColor--exp-color-pink-600":"ExpColor--exp-color-pink-600__Ph3VO","ExpColor--exp-color-pink-700":"ExpColor--exp-color-pink-700__nLJd1","ExpColor--exp-color-pink-800":"ExpColor--exp-color-pink-800__-fD0l","ExpColor--exp-color-yellow-50":"ExpColor--exp-color-yellow-50__EYcxx","ExpColor--exp-color-yellow-100":"ExpColor--exp-color-yellow-100__8n-ZP","ExpColor--exp-color-yellow-200":"ExpColor--exp-color-yellow-200__eOMK3","ExpColor--exp-color-yellow-300":"ExpColor--exp-color-yellow-300__JbUZg","ExpColor--exp-color-yellow-400":"ExpColor--exp-color-yellow-400__7NrMJ","ExpColor--exp-color-yellow-500":"ExpColor--exp-color-yellow-500__a3k-Q","ExpColor--exp-color-yellow-600":"ExpColor--exp-color-yellow-600__xBk-i","ExpColor--exp-color-yellow-700":"ExpColor--exp-color-yellow-700__xw4Kd","ExpColor--exp-color-yellow-800":"ExpColor--exp-color-yellow-800__vZmXG","ExpColor--exp-color-blue-50":"ExpColor--exp-color-blue-50__s2FXt","ExpColor--exp-color-blue-100":"ExpColor--exp-color-blue-100__TzrMW","ExpColor--exp-color-blue-200":"ExpColor--exp-color-blue-200__sVncU","ExpColor--exp-color-blue-300":"ExpColor--exp-color-blue-300__ooY38","ExpColor--exp-color-blue-400":"ExpColor--exp-color-blue-400__GGuoL","ExpColor--exp-color-blue-500":"ExpColor--exp-color-blue-500__N2NW9","ExpColor--exp-color-blue-600":"ExpColor--exp-color-blue-600__q-8xU","ExpColor--exp-color-blue-700":"ExpColor--exp-color-blue-700__5k-Gw","ExpColor--exp-color-blue-800":"ExpColor--exp-color-blue-800__MCpJf","ExpColor--exp-color-teal-50":"ExpColor--exp-color-teal-50__P9v3-","ExpColor--exp-color-teal-100":"ExpColor--exp-color-teal-100__Y8xbj","ExpColor--exp-color-teal-200":"ExpColor--exp-color-teal-200__yzxAu","ExpColor--exp-color-teal-300":"ExpColor--exp-color-teal-300__CC-oK","ExpColor--exp-color-teal-400":"ExpColor--exp-color-teal-400__fBHUW","ExpColor--exp-color-teal-500":"ExpColor--exp-color-teal-500__qt3Ny","ExpColor--exp-color-teal-600":"ExpColor--exp-color-teal-600__5EF-y","ExpColor--exp-color-teal-700":"ExpColor--exp-color-teal-700__o0qGK","ExpColor--exp-color-teal-800":"ExpColor--exp-color-teal-800__dntGK","ExpColor--exp-color-red-50":"ExpColor--exp-color-red-50__QFm4H","ExpColor--exp-color-red-100":"ExpColor--exp-color-red-100__gQ36l","ExpColor--exp-color-red-200":"ExpColor--exp-color-red-200__N7c7P","ExpColor--exp-color-red-300":"ExpColor--exp-color-red-300__uhkUo","ExpColor--exp-color-red-400":"ExpColor--exp-color-red-400__cNgdd","ExpColor--exp-color-red-500":"ExpColor--exp-color-red-500__VMSdk","ExpColor--exp-color-red-600":"ExpColor--exp-color-red-600__In2gH","ExpColor--exp-color-red-700":"ExpColor--exp-color-red-700__DPnKE","ExpColor--exp-color-red-800":"ExpColor--exp-color-red-800__MkRFA"},F="ExpColor",G=r=>_(S,F,[h("exp-color",r)]),M="Icon__jDdMD",v={Icon:M,"Icon--size-2xs":"Icon--size-2xs__3r954","Icon--size-xs":"Icon--size-xs__Fcq73","Icon--size-s":"Icon--size-s__bQoUv","Icon--size-m":"Icon--size-m__7Z05l","Icon--size-l":"Icon--size-l__2o-6h","Icon--size-16":"Icon--size-16__P1SXI","Icon--size-24":"Icon--size-24__vnVQ0","Icon--size-32":"Icon--size-32__gHIna","Icon--size-48":"Icon--size-48__0PUAE"},A=w.forwardRef(function({svg:e,size:o=U,accent:l,expColor:C,color:E,label:p,dataset:s,...n},a){const x=!Number.isNaN(Number(o)),t=x?{width:`${o}px`,height:`${o}px`}:{},i=_(v,c.Icon,[P(`size-${o}`,void 0,!x)]),y=l?void 0:E,m=f(!1,l),d=N(y),u=l?[]:G(C),g=[...i,...m,...d,...u],I={...k(n),className:g.join(" "),...D(s,{preplyDsComponent:c.Icon}),ref:a};if(!e)throw new Error("Icon prop svg is mandatory");return b.jsx("span",{...I,role:"img",style:t,"aria-hidden":!p,"aria-label":p,children:z(e,{"aria-hidden":"true",focusable:"false"})})});A.__docgenInfo={description:"",methods:[],displayName:"Icon",props:{size:{defaultValue:{value:"'s'",computed:!1},required:!1}}};export{A as I};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import{j as b}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{g as I,a as k}from"./text-accent-DZDDtpIt.js";import{f as h}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{r as N}from"./render-icon-CVTdrNe-.js";import{m as n,s as z,b as V}from"./classNames-BUL1Zq7e.js";import{w as u}from"./componentNames-
|
1
|
+
import{j as b}from"./jsx-runtime-BYouaCF_.js";import{r as w}from"./index-B3evPFBL.js";import{g as I,a as k}from"./text-accent-DZDDtpIt.js";import{f as h}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{r as N}from"./render-icon-CVTdrNe-.js";import{m as n,s as z,b as V}from"./classNames-BUL1Zq7e.js";import{w as u}from"./componentNames-Ba2ybP0W.js";import{g as T}from"./index-DdzHuZ-Y.js";import{I as P}from"./defaults-B1rzzf6M.js";const R="Icon__EP3Vh",S={Icon:R,"Icon--size-2xs":"Icon--size-2xs__yN10Y","Icon--size-xs":"Icon--size-xs__6SXZ7","Icon--size-s":"Icon--size-s__NLRBu","Icon--size-m":"Icon--size-m__F6CqX","Icon--size-l":"Icon--size-l__aSKIx","Icon--size-16":"Icon--size-16__P716Z","Icon--size-24":"Icon--size-24__uOdtd","Icon--size-32":"Icon--size-32__zP8We","Icon--size-48":"Icon--size-48__-KHYK"},U="ExpColor__fSHBe",q={ExpColor:U,"ExpColor--exp-color-grey-0":"ExpColor--exp-color-grey-0__IQ8rz","ExpColor--exp-color-grey-50":"ExpColor--exp-color-grey-50__4wU8k","ExpColor--exp-color-grey-100":"ExpColor--exp-color-grey-100__idyQR","ExpColor--exp-color-grey-200":"ExpColor--exp-color-grey-200__bSfXM","ExpColor--exp-color-grey-300":"ExpColor--exp-color-grey-300__TAgB4","ExpColor--exp-color-grey-400":"ExpColor--exp-color-grey-400__8AFVk","ExpColor--exp-color-grey-500":"ExpColor--exp-color-grey-500__fFByn","ExpColor--exp-color-grey-600":"ExpColor--exp-color-grey-600__gRj6N","ExpColor--exp-color-grey-700":"ExpColor--exp-color-grey-700__3iGwa","ExpColor--exp-color-grey-800":"ExpColor--exp-color-grey-800__on7RX","ExpColor--exp-color-grey-900":"ExpColor--exp-color-grey-900__9T1OC","ExpColor--exp-color-pink-50":"ExpColor--exp-color-pink-50__3o0cC","ExpColor--exp-color-pink-100":"ExpColor--exp-color-pink-100__yBJxi","ExpColor--exp-color-pink-200":"ExpColor--exp-color-pink-200__Zff-J","ExpColor--exp-color-pink-300":"ExpColor--exp-color-pink-300__wWr90","ExpColor--exp-color-pink-400":"ExpColor--exp-color-pink-400__-C3Dw","ExpColor--exp-color-pink-500":"ExpColor--exp-color-pink-500__Kpw6U","ExpColor--exp-color-pink-600":"ExpColor--exp-color-pink-600__g4tqI","ExpColor--exp-color-pink-700":"ExpColor--exp-color-pink-700__5lL8W","ExpColor--exp-color-pink-800":"ExpColor--exp-color-pink-800__JdCoO","ExpColor--exp-color-yellow-50":"ExpColor--exp-color-yellow-50__x4D1V","ExpColor--exp-color-yellow-100":"ExpColor--exp-color-yellow-100__Mp3-h","ExpColor--exp-color-yellow-200":"ExpColor--exp-color-yellow-200__dr309","ExpColor--exp-color-yellow-300":"ExpColor--exp-color-yellow-300__4eqgg","ExpColor--exp-color-yellow-400":"ExpColor--exp-color-yellow-400__7KEax","ExpColor--exp-color-yellow-500":"ExpColor--exp-color-yellow-500__YFTaH","ExpColor--exp-color-yellow-600":"ExpColor--exp-color-yellow-600__uioue","ExpColor--exp-color-yellow-700":"ExpColor--exp-color-yellow-700__APgN0","ExpColor--exp-color-yellow-800":"ExpColor--exp-color-yellow-800__iqZ5l","ExpColor--exp-color-blue-50":"ExpColor--exp-color-blue-50__9YSjB","ExpColor--exp-color-blue-100":"ExpColor--exp-color-blue-100__msV5Z","ExpColor--exp-color-blue-200":"ExpColor--exp-color-blue-200__0-B47","ExpColor--exp-color-blue-300":"ExpColor--exp-color-blue-300__kBuCR","ExpColor--exp-color-blue-400":"ExpColor--exp-color-blue-400__rug3Y","ExpColor--exp-color-blue-500":"ExpColor--exp-color-blue-500__1zhad","ExpColor--exp-color-blue-600":"ExpColor--exp-color-blue-600__INDau","ExpColor--exp-color-blue-700":"ExpColor--exp-color-blue-700__nKtQ-","ExpColor--exp-color-blue-800":"ExpColor--exp-color-blue-800__AWAr2","ExpColor--exp-color-teal-50":"ExpColor--exp-color-teal-50__7QmhW","ExpColor--exp-color-teal-100":"ExpColor--exp-color-teal-100__YLRdY","ExpColor--exp-color-teal-200":"ExpColor--exp-color-teal-200__aUMwT","ExpColor--exp-color-teal-300":"ExpColor--exp-color-teal-300__wI000","ExpColor--exp-color-teal-400":"ExpColor--exp-color-teal-400__uVmEI","ExpColor--exp-color-teal-500":"ExpColor--exp-color-teal-500__HM2LK","ExpColor--exp-color-teal-600":"ExpColor--exp-color-teal-600__0PlFD","ExpColor--exp-color-teal-700":"ExpColor--exp-color-teal-700__FVY4B","ExpColor--exp-color-teal-800":"ExpColor--exp-color-teal-800__2dQ3c","ExpColor--exp-color-red-50":"ExpColor--exp-color-red-50__k0fHb","ExpColor--exp-color-red-100":"ExpColor--exp-color-red-100__PuJbY","ExpColor--exp-color-red-200":"ExpColor--exp-color-red-200__cumh2","ExpColor--exp-color-red-300":"ExpColor--exp-color-red-300__dUiEM","ExpColor--exp-color-red-400":"ExpColor--exp-color-red-400__DBCU8","ExpColor--exp-color-red-500":"ExpColor--exp-color-red-500__lIF6t","ExpColor--exp-color-red-600":"ExpColor--exp-color-red-600__NNabI","ExpColor--exp-color-red-700":"ExpColor--exp-color-red-700__9Tz3v","ExpColor--exp-color-red-800":"ExpColor--exp-color-red-800__HCek3"},A="ExpColor",B=o=>n(q,A,[z("exp-color",o)]),x=w.forwardRef(function({svg:r,size:e=P,accent:l,expColor:c,color:t,label:a,dataset:s,...i},v){const p=!Number.isNaN(Number(e)),C=p?{width:`${e}px`,height:`${e}px`}:{},_=n(S,u.Icon,[V(`size-${e}`,void 0,!p)]),E=l?void 0:t,d=I(!1,l),y=k(E),m=l?[]:B(c),g=[..._,...d,...y,...m],f={...h(i),className:g.join(" "),...T(s,{preplyDsComponent:u.Icon}),ref:v};if(!r)throw new Error("Icon prop svg is mandatory");return b.jsx("span",{...f,role:"img",style:C,"aria-hidden":!a,"aria-label":a,children:N(r,{"aria-hidden":"true",focusable:"false"})})});try{x.displayName="Icon",x.__docgenInfo={description:"",displayName:"Icon",props:{svg:{defaultValue:null,description:`The SVG icon to render.
|
2
2
|
@example import TokyoUINotesWithPad from '@preply/ds-media-icons/dist/24/TokyoUINotesWithPad.svg';
|
3
3
|
|
4
4
|
<Icon svg={TokyoUINotesWithPad} />
|
5
5
|
@example <caption>Using as react server component</caption>
|
6
6
|
import TokyoUINotesWithPad from '@preply/ds-media-icons/dist/24/TokyoUINotesWithPad.svg';
|
7
7
|
|
8
|
-
<Icon svg={<TokyoUINotesWithPad />} />`,name:"svg",required:!0,type:{name:"enum",value:[{value:"ComponentClass<SVGAttributes<SVGElement>, any>"},{value:"FunctionComponent<SVGAttributes<SVGElement>>"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},size:{defaultValue:{value:"s"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"2xs"'},{value:'"
|
8
|
+
<Icon svg={<TokyoUINotesWithPad />} />`,name:"svg",required:!0,type:{name:"enum",value:[{value:"ComponentClass<SVGAttributes<SVGElement>, any>"},{value:"FunctionComponent<SVGAttributes<SVGElement>>"},{value:"ReactElement<any, string | JSXElementConstructor<any>>"}]}},size:{defaultValue:{value:"s"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"2xs"'},{value:'"16"'},{value:'"24"'},{value:'"32"'},{value:'"48"'}]}},accent:{defaultValue:null,description:"",name:"accent",required:!1,type:{name:"enum",value:[{value:'"accent"'},{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"accentDark"'},{value:'"placeholder"'},{value:'"inverted"'},{value:'"positive"'},{value:'"info"'},{value:'"warning"'},{value:'"critical"'},{value:'"disabled"'},{value:'"branded"'},{value:'"selected"'},{value:'"error"'}]}},expColor:{defaultValue:null,description:"If passed along with `accent`, `accent` takes precedence.",name:"expColor",required:!1,type:{name:"enum",value:[{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"grey-0"'},{value:'"grey-50"'},{value:'"grey-100"'},{value:'"grey-200"'},{value:'"grey-300"'},{value:'"grey-400"'},{value:'"grey-500"'},{value:'"grey-600"'},{value:'"grey-700"'},{value:'"grey-800"'},{value:'"grey-900"'},{value:'"pink-50"'},{value:'"pink-100"'},{value:'"pink-200"'},{value:'"pink-300"'},{value:'"pink-400"'},{value:'"pink-500"'},{value:'"pink-600"'},{value:'"pink-700"'},{value:'"pink-800"'},{value:'"yellow-50"'},{value:'"yellow-600"'},{value:'"yellow-700"'},{value:'"yellow-800"'},{value:'"blue-50"'},{value:'"blue-600"'},{value:'"blue-700"'},{value:'"blue-800"'},{value:'"teal-50"'},{value:'"teal-600"'},{value:'"teal-700"'},{value:'"teal-800"'},{value:'"red-50"'},{value:'"red-600"'},{value:'"red-700"'},{value:'"red-800"'}]}},color:{defaultValue:null,description:"@deprecated Use accent instead.",name:"color",required:!1,type:{name:"enum",value:[{value:'"white"'},{value:'"gray-100"'},{value:'"gray-200"'},{value:'"gray-300"'},{value:'"gray-400"'},{value:'"gray-500"'},{value:'"gray-600"'},{value:'"teal-100"'},{value:'"teal-200"'},{value:'"teal-300"'},{value:'"teal-400"'},{value:'"teal-500"'},{value:'"green-100"'},{value:'"green-200"'},{value:'"green-300"'},{value:'"green-400"'},{value:'"green-500"'},{value:'"yellow-100"'},{value:'"yellow-200"'},{value:'"yellow-300"'},{value:'"yellow-400"'},{value:'"yellow-500"'},{value:'"red-100"'},{value:'"red-200"'},{value:'"red-300"'},{value:'"red-400"'},{value:'"red-500"'},{value:'"blue-100"'},{value:'"blue-200"'},{value:'"blue-300"'},{value:'"blue-400"'},{value:'"blue-500"'},{value:'"magenta-100"'},{value:'"magenta-200"'},{value:'"magenta-300"'},{value:'"magenta-400"'},{value:'"magenta-500"'}]}},label:{defaultValue:null,description:"If using the icon without any adjacent descriptive text, use this prop to\nprovide an `aria-label` for assistive technologies.",name:"label",required:!1,type:{name:"enum",value:[{value:"string"}]}},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{}export{x as I};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as n}from"./index-uOP2uDdf.js";import{M as m,S as s}from"./index-
|
1
|
+
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{useMDXComponents as n}from"./index-uOP2uDdf.js";import{M as m,S as s}from"./index-D6soH6D2.js";import{ServerComponent as i}from"./Icon.stories-Batx6hcA.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-BoWsIu37.js";import"./index-jEDObK_5.js";import"./index-C66nt8TK.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";import"./TokyoUINotesWithPad-Bqcca_-M.js";import"./Icon-Cx1Om39U.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";import"./options-Dn0Ts6qK.js";function r(t){const e={code:"code",h1:"h1",p:"p",pre:"pre",...n(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(m,{title:"components/Icon/Server Component"}),`
|
2
2
|
`,o.jsx(e.h1,{id:"use-icon-as-react-server-component",children:"Use Icon as react server component"}),`
|
3
3
|
`,o.jsxs(e.p,{children:["To use Icon as react server component, provide ",o.jsx(e.code,{children:"svg"})," as element:"]}),`
|
4
4
|
`,o.jsx(s,{of:i}),`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{F as o}from"./TokyoUINotesWithPad-Bqcca_-M.js";import{I as s}from"./Icon-
|
1
|
+
import{j as e}from"./jsx-runtime-BYouaCF_.js";import{F as o}from"./TokyoUINotesWithPad-Bqcca_-M.js";import{I as s}from"./Icon-Cx1Om39U.js";import{E as h}from"./options-Dn0Ts6qK.js";import"./index-B3evPFBL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./text-accent-DZDDtpIt.js";import"./classNames-BUL1Zq7e.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-CVTdrNe-.js";import"./componentNames-Ba2ybP0W.js";import"./index-DdzHuZ-Y.js";import"./defaults-B1rzzf6M.js";const W={title:"components/Icon",component:s,parameters:{docs:{description:{component:"To browse all available icons, visit the [Icon Explorer](/story/guides-assets-icon-explorer--page)."}}}},t=()=>e.jsxs("div",{style:{display:"flex",alignItems:"end",gap:"4px"},children:[e.jsx(s,{svg:o,size:"16"}),e.jsx(s,{svg:o,size:"24"}),e.jsx(s,{svg:o,size:"32"}),e.jsx(s,{svg:o,size:"48"})]}),n=()=>e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:h.map(a=>e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(s,{svg:o,expColor:a.id},a.id),e.jsx("span",{children:a.id})]},a.id))}),r=()=>e.jsx(s,{svg:e.jsx(o,{})});r.tags=["!dev","!autodocs"];const i={parameters:{chromatic:{disableSnapshot:!0}},args:{svg:o,dataset:{qaid:"icon"}},argTypes:{svg:{control:!1},dataset:{control:"object"},label:{control:"text"},color:{table:{disable:!0}}}};var p,c,d;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`() => <div style={{
|
2
2
|
display: 'flex',
|
3
3
|
alignItems: 'end',
|
4
4
|
gap: '4px'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import{j as o}from"./jsx-runtime-BYouaCF_.js";import{r as m}from"./index-B3evPFBL.js";import{r as d}from"./render-icon-CVTdrNe-.js";import{B as v}from"./ButtonBase-CoNMqmsd.js";import{w as p}from"./componentNames-Ba2ybP0W.js";import{B as c,a as f}from"./defaults-B1rzzf6M.js";const e=m.forwardRef(function({variant:l=f,size:n=c,url:t,a11yLabel:u,svg:r,...s},i){return o.jsx(v,{...s,ref:i,isIconButton:!0,variant:l,size:n,url:t,a11yLabel:u,preplyDsComponent:p.IconButton,children:d(r,{"aria-hidden":"true",focusable:"false"})})});try{e.displayName="IconButton",e.__docgenInfo={description:"",displayName:"IconButton",props:{id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"enum",value:[{value:"string"}]}},dataset:{defaultValue:null,description:"",name:"dataset",required:!1,type:{name:"enum",value:[{value:"Dataset"}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"enum",value:[{value:"MouseEventHandler<Element>"}]}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"inverted"'},{value:'"critical"'},{value:'"quaternary"'},{value:'"ghost"'},{value:'"plain"'},{value:'"dangerous"'},{value:'"onColor"'},{value:'"classroom"'},{value:'"primaryB2b"'},{value:'"primaryTutor"'},{value:'"newFeature"'},{value:'"ai"'}]}},size:{defaultValue:{value:"s"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"s"'},{value:'"m"'},{value:'"l"'},{value:'"xl"'},{value:'"large"'},{value:'"medium"'},{value:'"small"'},{value:"ResponsiveProp<ButtonSize>"}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},assistiveText:{defaultValue:null,description:"",name:"assistiveText",required:!1,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"enum",value:[{value:"string"}]}},download:{defaultValue:null,description:"",name:"download",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},opensInNewTab:{defaultValue:null,description:"",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"}]}},submitsForm:{defaultValue:null,description:"",name:"submitsForm",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},busy:{defaultValue:null,description:"Replaces the content with a loading indicator.",name:"busy",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}},as:{defaultValue:null,description:`Custom element to render the button.
|
2
|
+
|
3
|
+
Allows rendering the button using a different React element or component.
|
4
|
+
This is particularly useful for integrating with router libraries like \`react-router\` or \`next/router\`.
|
5
|
+
@example // Render as a react router link component
|
6
|
+
import { Link } from 'react-router-dom';
|
7
|
+
|
8
|
+
<ButtonBase as={<Link to="/home" />} />`,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"}]}},a11yLabel:{defaultValue:null,description:"@deprecated Use `assistiveText` instead",name:"a11yLabel",required:!1,type:{name:"enum",value:[{value:"string"}]}},svg:{defaultValue:null,description:"",name:"svg",required:!0,type:{name:"enum",value:[{value:"ComponentClass<SVGAttributes<SVGElement>, any>"},{value:"FunctionComponent<SVGAttributes<SVGElement>>"},{value:"ReactElement<any, 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: HTMLButtonElement | HTMLAnchorElement | null) => void"},{value:"RefObject<HTMLButtonElement | HTMLAnchorElement>"}]}},key:{defaultValue:null,description:"",name:"key",required:!1,type:{name:"enum",value:[{value:"null"},{value:"string"},{value:"number"},{value:"bigint"}]}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"enum",value:[{value:"false"},{value:"true"}]}}}}}catch{}export{e as I};
|