@preply/ds-docs 0.98.0 → 0.99.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/config/main.ts +4 -0
- package/dist/assets/{00.applications-CHktEAeI.js → 00.applications-kGdbufkv.js} +1 -1
- package/dist/assets/00.favicons.guide-DacbYQzh.js +21 -0
- package/dist/assets/{00.token-explorer-CeMnug7t.js → 00.token-explorer-CLMvmndf.js} +4 -4
- package/dist/assets/00.using-responsive-props-S75pEacQ.js +18 -0
- package/dist/assets/{10.fonts.guide-DjgeFg_o.js → 10.fonts.guide-BgJNemfK.js} +1 -1
- package/dist/assets/{10.ssr-BEROTC6a.js → 10.ssr-DlH6UKaz.js} +3 -3
- package/dist/assets/{11.languageFont.explorer-Cyv7quON.js → 11.languageFont.explorer-DV7d1sLI.js} +4 -4
- package/dist/assets/11.ssr.app-router-CTe5FOOM.js +59 -0
- package/dist/assets/{20.libraries-6ek48Mmj.js → 20.libraries-FWrxmkF1.js} +1 -1
- package/dist/assets/{30.icons.explorer-DdwYqlxd.js → 30.icons.explorer-D_jCULmS.js} +7 -7
- package/dist/assets/{30.storybook-BQjCJcP2.js → 30.storybook-GTYR0mHT.js} +1 -1
- package/dist/assets/40.illustrations.explorer-g5CehTbi.js +21 -0
- package/dist/assets/{90.advanced-fHUJ1dLA.js → 90.advanced-CDgAmnf1.js} +1 -1
- package/dist/assets/Avatar-B5VyGTND.css +1 -0
- package/dist/assets/Avatar-CbjmdBTE.css +1 -0
- package/dist/assets/Avatar-D9lQYtcf.js +1 -0
- package/dist/assets/Avatar-NseJJH9V.js +6 -0
- package/dist/assets/Avatar.stories-DkCGZst6.js +1 -0
- package/dist/assets/AvatarWithStatus-CV5oNRX5.css +1 -0
- package/dist/assets/AvatarWithStatus.stories-0MqYK9Ln.js +6 -0
- package/dist/assets/Badge-In2DaV0l.css +1 -0
- package/dist/assets/Badge.stories-DA95Cw4c.js +102 -0
- package/dist/assets/Box-C3U0bcxr.css +1 -0
- package/dist/assets/Box.stories-Cy2ky9_k.js +12 -0
- package/dist/assets/Button-BtqA2dqE.css +1 -0
- package/dist/assets/Button-DzNsOpEs.js +1 -0
- package/dist/assets/{Button.stories-DunDHbCS.js → Button.stories-Bfaocxt-.js} +1 -1
- package/dist/assets/ButtonBase-BXe5Klfi.js +1 -0
- package/dist/assets/{ButtonBase-fly5bC3X.css → ButtonBase-Cv8V2Mw0.css} +1 -1
- package/dist/assets/Chips-CiWoXrbE.css +1 -0
- package/dist/assets/Chips.stories-DkV0AIGf.js +127 -0
- package/dist/assets/{Color-KGDBMAHA-Cu8Wwe5p.js → Color-KGDBMAHA-CksLG7gU.js} +1 -1
- package/dist/assets/DocsRenderer-PKQXORMH-EEvdRLuk.js +1 -0
- package/dist/assets/FieldAdditionalText-CUCG15oV.css +1 -0
- package/dist/assets/FieldAdditionalText-D4mNbb6z.js +1 -0
- package/dist/assets/FieldAdditionalText.stories-9YNnwjy_.js +1 -0
- package/dist/assets/FieldButton-D33qtAXG.js +1 -0
- package/dist/assets/{FieldButton-BMU-DdYa.css → FieldButton-elQlJuYV.css} +1 -1
- package/dist/assets/FieldButton.stories-DJqZfgM6.js +1 -0
- package/dist/assets/FieldLayout-C1VooNJq.js +1 -0
- package/dist/assets/FieldLayout-rHHth3R7.css +1 -0
- package/dist/assets/FieldLayout.stories-D_pNRWoT.js +6 -0
- package/dist/assets/FieldLayoutBase-CbCHHPHI.js +2 -0
- package/dist/assets/FieldLayoutBase-CfEUshAO.css +1 -0
- package/dist/assets/Heading-BAzUrxgJ.js +2 -0
- package/dist/assets/{Heading-BFCUuHoK.css → Heading-CacRL-Yy.css} +1 -1
- package/dist/assets/Heading.stories-DimTg_h8.js +13 -0
- package/dist/assets/Icon-BqBV3_9d.js +8 -0
- package/dist/assets/Icon-CIabewGL.js +1 -0
- package/dist/assets/Icon-D8qvCo6q.css +1 -0
- package/dist/assets/Icon-RSC-CPLyX6oS.js +6 -0
- package/dist/assets/Icon.stories-io4seLI_.js +1 -0
- package/dist/assets/IconButton-YFQ036PO.js +1 -0
- package/dist/assets/{IconButton.stories-B-ZU8b1Q.js → IconButton.stories-CLpn2Llf.js} +1 -1
- package/dist/assets/InputText-eRnUw64o.js +1 -0
- package/dist/assets/LayoutFlex-9QKUN_c3.js +1 -0
- package/dist/assets/LayoutFlex-B-N4VfKt.css +1 -0
- package/dist/assets/LayoutFlex-BJ7WwFQm.css +1 -0
- package/dist/assets/LayoutFlex-BMAbrgpI.css +1 -0
- package/dist/assets/LayoutFlex-DnGoKdYS.js +1 -0
- package/dist/assets/LayoutFlex.stories-BiiZ0ZuP.js +19 -0
- package/dist/assets/LayoutGrid-5ifdLdnP.js +1 -0
- package/dist/assets/LayoutGrid-BwBJMRWN.css +1 -0
- package/dist/assets/LayoutGrid-DbWWX6JL.css +1 -0
- package/dist/assets/LayoutGrid.stories-DJlsxTtF.js +32 -0
- package/dist/assets/Link-ZkCoE9V3.css +1 -0
- package/dist/assets/Link.stories-CJ62odPW.js +25 -0
- package/dist/assets/Loader-DGCXnHs-.css +1 -0
- package/dist/assets/Loader.stories-Cha1yEol.js +1 -0
- package/dist/assets/NumberField.stories-C1ZcUsyv.js +34 -0
- package/dist/assets/ObserveIntersection-CiOLkzJQ.js +8 -0
- package/dist/assets/ObserveIntersection.stories-Dya1WZ0t.js +24 -0
- package/dist/assets/PasswordField.stories-CQKhBv0_.js +16 -0
- package/dist/assets/PreplyLogo-D6nWtZ44.css +1 -0
- package/dist/assets/PreplyLogo.stories-Da_UK6y4.js +3 -0
- package/dist/assets/RootProvider-CcBxia7g.js +1 -0
- package/dist/assets/SelectField-BPSTFulv.css +1 -0
- package/dist/assets/SelectField.stories-D838yNp-.js +28 -0
- package/dist/assets/ShowOnIntersection.stories-CFaEBdh4.js +17 -0
- package/dist/assets/Spinner-CACfcO5v.js +1 -0
- package/dist/assets/Spinner-ojgTV2uj.css +1 -0
- package/dist/assets/{StoryContextDSWeb-DTO1h3ed.js → StoryContextDSWeb-Cq8y4KZ8.js} +1 -1
- package/dist/assets/{StorybookGlobalStyle-BV5LdfUr.js → StorybookGlobalStyle-A7XGldSX.js} +1 -1
- package/dist/assets/Text-CvbAgCQi.css +1 -0
- package/dist/assets/Text-D0yjn65U.js +1 -0
- package/dist/assets/{Text-OCfa2Nzw.css → Text-D82X7D7k.css} +1 -1
- package/dist/assets/Text-yZzfLkiX.js +1 -0
- package/dist/assets/Text.stories-DLrEXkkR.js +11 -0
- package/dist/assets/TextField-CkPa9_Pm.css +1 -0
- package/dist/assets/TextField-IytkCeU9.js +1 -0
- package/dist/assets/TextField.stories-CmI8SyQ2.js +20 -0
- package/dist/assets/TextHighlighted-1proIqjK.css +1 -0
- package/dist/assets/TextHighlighted-BVVlR51u.js +1 -0
- package/dist/assets/TextHighlighted.stories-BBn_8Dgn.js +12 -0
- package/dist/assets/TextInline-sVYvSTDC.css +1 -0
- package/dist/assets/TextInline.stories-BXDAjPlT.js +3 -0
- package/dist/assets/TextareaField.stories-YQBiPKmT.js +20 -0
- package/dist/assets/align-self-9-POsulS.js +1 -0
- package/dist/assets/align-self-DnJjXiAG.css +1 -0
- package/dist/assets/{breakpoints-BHFDPnnV.js → breakpoints-Dp9RX5-N.js} +1 -1
- package/dist/assets/{breakpoints-DqzZ5i9h.js → breakpoints-pL5Qn1Jt.js} +1 -1
- package/dist/assets/{breakpoints-eBnX9Hq9.js → breakpoints-vqxXbKh8.js} +1 -1
- package/dist/assets/{changelog-x8953x-_.js → changelog-MuGp6SrI.js} +129 -98
- package/dist/assets/{chunk-HLWAVYOI-nHisX9N_.js → chunk-HLWAVYOI-DTFa3RTh.js} +1 -1
- package/dist/assets/classNames-Dz8Jm24I.js +1 -0
- package/dist/assets/constants-DYYVurUY.js +1 -0
- package/dist/assets/getTokenVar-DOEYYRhS.js +1 -0
- package/dist/assets/{getTokenVar-CMyl9_nH.js → getTokenVar-DccUYCDb.js} +1 -1
- package/dist/assets/{hover-D-h7UyeM.js → hover-ClyiAdXY.js} +1 -1
- package/dist/assets/{hover-BMxurVuq.js → hover-YV4OI7Jc.js} +1 -1
- package/dist/assets/{hover-p5MucVq_.js → hover-fQE7HmGu.js} +1 -1
- package/dist/assets/iframe-C9-tEs2g.js +2 -0
- package/dist/assets/{index-CYfUfEj6.js → index-87DoZhq0.js} +1 -1
- package/dist/assets/{index-Cr0eyxS1.js → index-C0R4Uw9r.js} +1 -1
- package/dist/assets/{index-B46pI2Oc.js → index-Cs2Qo7ol.js} +5 -5
- package/dist/assets/{intro-D6aMm_sE.js → intro-B7Mz1oRY.js} +1 -1
- package/dist/assets/layout-relative-B5pEjYWG.js +1 -0
- package/dist/assets/layout-relative-BVIkmQ-r.css +1 -0
- package/dist/assets/layout-relative-BhVDEqeE.js +1 -0
- package/dist/assets/layout-relative-DoO-OA4v.css +1 -0
- package/dist/assets/{migrating-from-less-BHm8Qmhr.js → migrating-from-less-DKSAPSfW.js} +1 -1
- package/dist/assets/playground-DSUjeIER.css +1 -0
- package/dist/assets/{playground.stories-Cox9zMK4.js → playground.stories-DU_ycRK0.js} +207 -217
- package/dist/assets/{preview-Mesbtrro.js → preview-BLfZ1M1g.js} +2 -2
- package/dist/assets/preview-CnpTX-dN.js +1 -0
- package/dist/assets/{preview-B4BGIvLs.js → preview-DO6fgzdg.js} +1 -1
- package/dist/assets/render-icon-C9YZCLtv.js +9 -0
- package/dist/assets/render-icon-DsMGBPwY.js +9 -0
- package/dist/assets/styled-components.browser.esm-D7-R-tx8.js +2 -0
- package/dist/assets/text-accent-DEt6vcbd.css +1 -0
- package/dist/assets/text-accent-DdHX3rNs.js +1 -0
- package/dist/assets/text-centered-BsCucYz7.css +1 -0
- package/dist/assets/text-centered-K6plBJwT.js +1 -0
- package/dist/assets/{tokens-CfqDG7zh.js → tokens-BV526yo0.js} +1 -1
- package/dist/assets/{tokens-B-OiX2j6.js → tokens-BaxEkcoW.js} +1 -1
- package/dist/assets/{tokens-BMPX6NLZ.js → tokens-BqEjbJUF.js} +1 -1
- package/dist/assets/{tokens-DR9BzpmN.js → tokens-BuyasvEu.js} +1 -1
- package/dist/assets/useForcedRef-CC5bJQVj.js +1 -0
- package/dist/assets/useNumberField-DwLXlsqE.js +1 -0
- package/dist/assets/usePasswordField-Cn9jdtbw.js +1 -0
- package/dist/assets/useSelectField-Di_eOCLK.js +1 -0
- package/dist/assets/useTextField-IMWr4_ZB.js +1 -0
- package/dist/assets/useTextareaField-HzNfFhIk.js +1 -0
- package/dist/assets/useTheme-BjN7KXjq.js +1 -0
- package/dist/assets/{welcome-BOKsbHxb.js → welcome-BshNtZc-.js} +1 -1
- package/dist/iframe.html +2 -2
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +1636 -1498
- package/dist/project.json +1 -1
- package/package.json +2 -2
- package/dist/assets/00.favicons.guide-C-FnDqNq.js +0 -22
- package/dist/assets/00.using-responsive-props-BAsA_iSR.js +0 -18
- package/dist/assets/40.illustrations.explorer-GxTP3sDO.js +0 -21
- package/dist/assets/Avatar-DmtiV1Mz.js +0 -1
- package/dist/assets/Avatar-IqZZsC_p.js +0 -1
- package/dist/assets/Avatar-oQ-Mv-ny.css +0 -1
- package/dist/assets/Avatar.stories-DSmHUd1F.js +0 -1
- package/dist/assets/AvatarWithStatus-B767Nm5D.css +0 -1
- package/dist/assets/AvatarWithStatus.stories-DthCEV28.js +0 -1
- package/dist/assets/Badge-BCIMJBZI.css +0 -1
- package/dist/assets/Badge.stories-DvUkvaU6.js +0 -97
- package/dist/assets/Box-C3nYCQ-H.css +0 -1
- package/dist/assets/Box.stories-5qSsIrLx.js +0 -12
- package/dist/assets/Button-DXCqQddo.css +0 -1
- package/dist/assets/Button-DzURzP8Y.js +0 -1
- package/dist/assets/ButtonBase-31TE-cL9.js +0 -1
- package/dist/assets/Chips-gPSDms6Z.css +0 -1
- package/dist/assets/Chips.stories-BhvAG0l8.js +0 -110
- package/dist/assets/DocsRenderer-PKQXORMH-DNeFM8EF.js +0 -1
- package/dist/assets/FieldAdditionalText-BqebVoaG.js +0 -1
- package/dist/assets/FieldAdditionalText-mFw0END4.css +0 -1
- package/dist/assets/FieldAdditionalText.stories-B5nLJpO4.js +0 -1
- package/dist/assets/FieldButton-pvE8OgyE.js +0 -1
- package/dist/assets/FieldButton.stories-BKsQ8Mbo.js +0 -1
- package/dist/assets/FieldLayout-C-8giLY8.css +0 -1
- package/dist/assets/FieldLayout-Den-dQFM.js +0 -1
- package/dist/assets/FieldLayout.stories-CJutwldm.js +0 -6
- package/dist/assets/FieldLayoutBase-8B8zAX_x.js +0 -1
- package/dist/assets/FieldLayoutBase-CPvYp6S9.css +0 -1
- package/dist/assets/Heading-DsvaXDny.js +0 -1
- package/dist/assets/Heading.stories-DJpPDRJk.js +0 -13
- package/dist/assets/Icon-BArjqZXD.js +0 -1
- package/dist/assets/Icon-B_6myo6d.css +0 -1
- package/dist/assets/Icon-veq5wQcc.js +0 -1
- package/dist/assets/Icon.stories-q3-3NfEp.js +0 -1
- package/dist/assets/IconButton-GEKP0nKB.js +0 -1
- package/dist/assets/InputText-DIoMFmKH.js +0 -1
- package/dist/assets/LayoutFlex-CkYnYaGT.js +0 -1
- package/dist/assets/LayoutFlex-DQa3zhCk.css +0 -1
- package/dist/assets/LayoutFlex-hYl5dE5q.js +0 -1
- package/dist/assets/LayoutFlex.stories-Chx7q7hC.js +0 -19
- package/dist/assets/LayoutGrid-CMRHY4jq.js +0 -1
- package/dist/assets/LayoutGrid-D-_lLr0n.css +0 -1
- package/dist/assets/LayoutGrid.stories-Cr-JtL0o.js +0 -32
- package/dist/assets/Link-D3k2VXkr.css +0 -1
- package/dist/assets/Link.stories-B_0Pwfmv.js +0 -19
- package/dist/assets/Loader-8ofSk-Uc.css +0 -1
- package/dist/assets/Loader.stories-ljnjYC8d.js +0 -1
- package/dist/assets/NumberField.stories-BinCLLYb.js +0 -34
- package/dist/assets/ObserveIntersection-CNUiVPCa.js +0 -1
- package/dist/assets/ObserveIntersection.stories-Yg_aNGx7.js +0 -24
- package/dist/assets/PasswordField.stories-nasUhlPV.js +0 -16
- package/dist/assets/PreplyLogo-Dq_ntc_L.css +0 -1
- package/dist/assets/PreplyLogo.stories-BJ95rkUt.js +0 -1
- package/dist/assets/RootProvider-LL-zBc44.js +0 -1
- package/dist/assets/SelectField-2cK5P085.css +0 -1
- package/dist/assets/SelectField.stories-AtK5G3gF.js +0 -28
- package/dist/assets/ShowOnIntersection.stories-CyXaird_.js +0 -17
- package/dist/assets/Spinner-BSnwpFf5.css +0 -1
- package/dist/assets/Spinner-CGBHcGTQ.js +0 -1
- package/dist/assets/Text-0CCfcAV6.js +0 -1
- package/dist/assets/Text-BJKNNA5M.js +0 -1
- package/dist/assets/Text.stories-BLUDrBi0.js +0 -11
- package/dist/assets/TextField-gphlYwu9.js +0 -1
- package/dist/assets/TextField.stories-CeokV-It.js +0 -20
- package/dist/assets/TextHighlighted-Bc02JqSa.js +0 -1
- package/dist/assets/TextHighlighted-vB3l281x.css +0 -1
- package/dist/assets/TextHighlighted.stories-BoJtO06J.js +0 -12
- package/dist/assets/TextInline-BAOzTiF8.css +0 -1
- package/dist/assets/TextInline.stories-D9uMiS22.js +0 -3
- package/dist/assets/TextareaField.stories-BvmtsiLg.js +0 -20
- package/dist/assets/classNames-C1v60lt_.js +0 -1
- package/dist/assets/getTokenVar-OtHJL4yA.js +0 -1
- package/dist/assets/iframe-lho9TVh-.js +0 -2
- package/dist/assets/preview-b4qEAdY0.js +0 -1
- package/dist/assets/style-inject.es-BI9ztQJ7.js +0 -1
- package/dist/assets/styled-components.browser.esm-DAuq3cw0.js +0 -2
- package/dist/assets/useAlignSelfClassNames-D4Zkdh7M.js +0 -1
- package/dist/assets/useColorScheme-B0seqviK.js +0 -1
- package/dist/assets/useForcedRef-BsHr-Tlv.js +0 -1
- package/dist/assets/useLayoutFlexClassNames-QaJAkt8L.js +0 -1
- package/dist/assets/useLayoutGridResponsiveColumns-KLCFx5pG.js +0 -1
- package/dist/assets/useLayoutRelativeClassnames-CgeMCRER.js +0 -1
- package/dist/assets/useNumberField-MlftdM3y.js +0 -1
- package/dist/assets/usePasswordField--UmZ3Rnv.js +0 -1
- package/dist/assets/useSelectField-CY5L0Juf.js +0 -1
- package/dist/assets/useTextAccentClassnames-Z590DgFQ.js +0 -1
- package/dist/assets/useTextCenteredClassnames-B21nS5IY.js +0 -1
- package/dist/assets/useTextField-D4Wp_okt.js +0 -1
- package/dist/assets/useTextWeightClassNames-ynGjsVaG.js +0 -1
- package/dist/assets/useTextareaField-_TyL8HkR.js +0 -1
- package/dist/assets/useTheme-UwDh1RCY.js +0 -1
- package/dist/assets/withColorScheme-B1f4bRhE.js +0 -1
package/config/main.ts
CHANGED
|
@@ -23,6 +23,7 @@ const config: StorybookConfig = {
|
|
|
23
23
|
stories: [
|
|
24
24
|
join(resolve('../docs-pages'), 'docs/**/*.@(stories.tsx|mdx)'),
|
|
25
25
|
join(resolve('../../packages/web-lib'), 'src/components/**/*.stories.tsx'),
|
|
26
|
+
join(resolve('../../packages/web-lib'), 'src/components/**/*.mdx'),
|
|
26
27
|
],
|
|
27
28
|
staticDirs: ['../static', ...getCodeEditorStaticDirs(__filename)],
|
|
28
29
|
addons: [
|
|
@@ -38,6 +39,9 @@ const config: StorybookConfig = {
|
|
|
38
39
|
},
|
|
39
40
|
typescript: {
|
|
40
41
|
reactDocgen: 'react-docgen-typescript',
|
|
42
|
+
reactDocgenTypescriptOptions: {
|
|
43
|
+
include: [join(resolve('../../packages/web-lib'), 'src/components/**/*.tsx')],
|
|
44
|
+
},
|
|
41
45
|
},
|
|
42
46
|
};
|
|
43
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as t}from"./index-DSz_1G2r.js";import{ae as o}from"./index-
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as t}from"./index-DSz_1G2r.js";import{ae as o}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function r(s){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Guides/Installation/Applications"}),`
|
|
2
2
|
`,e.jsx(n.h1,{id:"installation-applications",children:"Installation: Applications"}),`
|
|
3
3
|
`,e.jsx(n.p,{children:"This guide applies to both client-side and server-side rendered React applications."}),`
|
|
4
4
|
`,e.jsx(n.h2,{id:"packages",children:"Packages"}),`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as t}from"./index-DSz_1G2r.js";import{ae as i}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function o(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...t(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Guides/Assets/Favicons"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"favicons",children:"Favicons"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:["The optimised assets are available under ",e.jsx(n.strong,{children:"preply.com"})," in the formats required by modern and legacy browsers, as well as Android and iOS devices."]}),`
|
|
4
|
+
`,e.jsxs(n.p,{children:["Refer to ",e.jsx(n.a,{href:"https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs",rel:"nofollow",children:"How to Favicon in 2022: Six files that fit most needs"})," for a detailed breakdown of the formats."]}),`
|
|
5
|
+
`,e.jsx(n.h2,{id:"variants",children:"Variants"}),`
|
|
6
|
+
`,e.jsxs(n.p,{children:["Pick the approriate snippet and add it to the ",e.jsx(n.code,{children:"<head>"})," section of your application."]}),`
|
|
7
|
+
`,e.jsx(n.h3,{id:"preply-logo",children:"Preply logo"}),`
|
|
8
|
+
`,e.jsx("img",{src:"https://static.preply.com/ds/icons/favicon.svg",alt:"Preply logo icon"}),`
|
|
9
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-html",children:`<!-- Preply Favicons /story/guides-assets-favicons--page -->
|
|
10
|
+
<link rel="icon" href="https://static.preply.com/ds/icons/rebrand-23-v0/favicon.ico" sizes="any" />
|
|
11
|
+
<link
|
|
12
|
+
rel="icon"
|
|
13
|
+
href="https://static.preply.com/ds/icons/rebrand-23-v0/favicon.svg"
|
|
14
|
+
type="image/svg+xml"
|
|
15
|
+
/>
|
|
16
|
+
<link
|
|
17
|
+
rel="apple-touch-icon"
|
|
18
|
+
href="https://static.preply.com/ds/icons/rebrand-23-v0/icon-180.pngg"
|
|
19
|
+
/>
|
|
20
|
+
<link rel="manifest" href="https://static.preply.com/ds/icons/rebrand-23-v0/web.manifest.json" />
|
|
21
|
+
`})})]})}function g(s={}){const{wrapper:n}={...t(),...s.components};return n?e.jsx(n,{...s,children:e.jsx(o,{...s})}):o(s)}export{g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as P}from"./index-DSz_1G2r.js";import{ae as F}from"./index-
|
|
1
|
+
import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as P}from"./index-DSz_1G2r.js";import{ae as F}from"./index-Cs2Qo7ol.js";import{L as p}from"./LayoutFlex-DnGoKdYS.js";import{r as c}from"./index-CBqU2yxZ.js";import{a as E,u as O,T as v}from"./Text-yZzfLkiX.js";import{t as H}from"./tokens-BV526yo0.js";import{i as W,T as l,u as N}from"./TextHighlighted-BVVlR51u.js";import{T as M,e as A,g as B,d as o}from"./styled-components.browser.esm-D7-R-tx8.js";import{e as L,u as D,C as _,c as V}from"./useTheme-BjN7KXjq.js";import{L as y}from"./LayoutGrid-5ifdLdnP.js";import{o as K}from"./mixins-DZk1Zeoo.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./_commonjsHelpers-BosuxZz1.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";import"./classNames-Dz8Jm24I.js";import"./layout-relative-BhVDEqeE.js";import"./constants-DYYVurUY.js";import"./componentNames-Bs6if0Kd.js";import"./breakpoints-BfMlrtxE.js";const q=(e,r)=>({token:r,name:e,id:r[M],type:r[A],colorSchemeAware:!!r[B]}),R=(e,r)=>Object.entries(r).flatMap(([i,n])=>{const s=`${e}.${i}`;return W(n)?[q(s,n)]:R(s,n)}),X=e=>Object.entries(e).flatMap(([r,i])=>R(r,i)),Y=X(H),G=(e,r,i)=>e.filter(n=>{if(r==="-"||r==="--")return!0;if(r!=null&&r.startsWith("--"))return n.id.toLowerCase().startsWith(r.substring(2).toLowerCase());if(r){const s=n.name.toLowerCase().indexOf(r.toLowerCase())>-1,a=n.value.toLowerCase().indexOf(r.toLowerCase())>-1;return(s||a)&&(i?n.colorSchemeAware:!n.colorSchemeAware)}return i?n.colorSchemeAware:!n.colorSchemeAware}),z=c.createContext({terms:"",colorScheme:void 0,results:[],setColorScheme:()=>{},setSearchTerms:()=>{}});var C;const U=((C=window==null?void 0:window.localStorage)==null?void 0:C.getItem("storybook.ds-color-scheme"))||void 0;function J(e,r){return Y.map(n=>({...n,value:`${E(e,r,n.token)}`}))}const Q=({children:e})=>{const{findColorScheme:r}=L(),{theme:i}=D(),[n,s]=c.useState(U),[a,h]=c.useState(""),[g,x]=c.useState([]),u=c.useCallback(m=>s(m),[s]),f=c.useCallback(m=>h(m),[h]);if(!i)throw new Error("useToken() must be used within a ThemeProvider");return c.useEffect(()=>{const m=r(n||"base"),w=J(i,m);x(G(w,a,!!n))},[n,r,a,i]),t.jsx(z.Provider,{value:{terms:a,results:g,colorScheme:n,setSearchTerms:f,setColorScheme:u},children:t.jsx(_,{colorScheme:n||"base",children:e})})},j=()=>c.useContext(z),Z=o.div`
|
|
2
2
|
width: 64px;
|
|
3
3
|
height: 64px;
|
|
4
4
|
color: white;
|
|
@@ -66,7 +66,7 @@ import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as P}from"
|
|
|
66
66
|
width: 200px;
|
|
67
67
|
color: white;
|
|
68
68
|
|
|
69
|
-
${
|
|
69
|
+
${K(`
|
|
70
70
|
filter: brightness(${({value:e})=>e});
|
|
71
71
|
`)}
|
|
72
72
|
`,pe=({value:e})=>t.jsx(he,{value:e,children:"hover me"}),xe=o.div`
|
|
@@ -279,7 +279,7 @@ import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as P}from"
|
|
|
279
279
|
}
|
|
280
280
|
`,ht=o.select`
|
|
281
281
|
padding: 5px 10px;
|
|
282
|
-
`,pt=({onChange:e})=>{const{colorScheme:r,setColorScheme:i}=j(),n=c.useCallback(s=>{var h;const a=s.target.value;(h=window==null?void 0:window.localStorage)==null||h.setItem("storybook.ds-color-scheme",a),i(a??void 0),e==null||e(a)},[e,i]);return t.jsxs(lt,{isNotDefault:!!r,children:[t.jsx("label",{children:"Color Scheme"}),t.jsxs(ht,{value:r,onChange:n,children:[t.jsx("option",{value:"",children:"-- no color scheme --"},"none"),Object.keys(
|
|
282
|
+
`,pt=({onChange:e})=>{const{colorScheme:r,setColorScheme:i}=j(),n=c.useCallback(s=>{var h;const a=s.target.value;(h=window==null?void 0:window.localStorage)==null||h.setItem("storybook.ds-color-scheme",a),i(a??void 0),e==null||e(a)},[e,i]);return t.jsxs(lt,{isNotDefault:!!r,children:[t.jsx("label",{children:"Color Scheme"}),t.jsxs(ht,{value:r,onChange:n,children:[t.jsx("option",{value:"",children:"-- no color scheme --"},"none"),Object.keys(V).map(s=>t.jsx("option",{value:s,children:s},s))]})]})},xt=o.div`
|
|
283
283
|
overflow: hidden;
|
|
284
284
|
text-overflow: ellipsis;
|
|
285
285
|
max-height: 48px;
|
|
@@ -323,4 +323,4 @@ import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as P}from"
|
|
|
323
323
|
border-width: 1px;
|
|
324
324
|
border-color: ${({terms:e})=>e?"orange;":"#ccc"};
|
|
325
325
|
`,yt=()=>{const{theme:e}=D(),{themes:r}=L(),{setTheme:i}=N(),{colorScheme:n,terms:s,setColorScheme:a,setSearchTerms:h}=j(),g=c.useMemo(()=>{var d;return new URL(((d=window.top)==null?void 0:d.location.href)||"")},[]),x=g.searchParams,u=x.get("theme"),f=u&&(r==null?void 0:r.find(d=>d.name===u)),m=x.get("colorScheme"),w=x.get("terms");c.useEffect(()=>{var d;u&&(u!==e.name&&i&&f&&i(f),u&&m!==n&&a(m),h(w||"")),x.delete("theme"),x.delete("colorScheme"),x.delete("terms"),(d=window.top)==null||d.history.replaceState({},"",g)},[]);const I=c.useCallback(d=>h(d),[h]);return t.jsx(bt,{children:t.jsx(jt,{children:t.jsx(wt,{children:t.jsxs(p,{gap:"xs",direction:"column",children:[t.jsx(p,{justifyContent:"space-between",alignItems:"start",children:t.jsx("h1",{id:"tokens",className:"sbdocs sbdocs-h1 css-1j28tt",children:"Token Explorer"})}),t.jsxs(p,{gap:"2xs",nowrap:!0,children:[t.jsx(vt,{terms:s,type:"text",placeholder:"examples: teal, 300, action, primary, xs, --4adef, #00, 12px",onChange:d=>I(d.target.value),value:s}),t.jsx(pt,{})]}),t.jsx(ft,{})]})})})})};function T(e){return t.jsxs(t.Fragment,{children:[t.jsx(F,{title:"Guides/Token Explorer"}),`
|
|
326
|
-
`,t.jsxs(Q,{children:[t.jsx(yt,{}),t.jsx(dt,{})]})]})}function
|
|
326
|
+
`,t.jsxs(Q,{children:[t.jsx(yt,{}),t.jsx(dt,{})]})]})}function Xt(e={}){const{wrapper:r}={...P(),...e.components};return r?t.jsx(r,{...e,children:t.jsx(T,{...e})}):T()}export{Xt as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as i}from"./index-DSz_1G2r.js";import{A as r}from"./Avatar-D9lQYtcf.js";import{ae as p}from"./index-Cs2Qo7ol.js";import{B as a}from"./breakpoints-BfMlrtxE.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./classNames-Dz8Jm24I.js";import"./componentNames-Bs6if0Kd.js";import"./constants--ewUoBsO.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";const c=()=>e.jsx("table",{style:{fontSize:14},children:e.jsx("tbody",{children:Object.entries(a).map(([n,s])=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"0px 40px 10px 20px"},children:e.jsx("code",{children:n})}),e.jsx("td",{style:{padding:"0px 40px 10px 20px"},children:e.jsxs("code",{children:[s,"px"]})})]},n))})}),o="./web-lib/src/components/Avatar/docs/static/avatar-1.png";function t(n){const s={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...i(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Guides/Responsive Props"}),`
|
|
2
|
+
`,e.jsx(s.h1,{id:"responsive-props",children:"Responsive Props"}),`
|
|
3
|
+
`,e.jsx(s.p,{children:`Some component props optionally accept responsive values for different screen sizes
|
|
4
|
+
based on the global breakpoints:`}),`
|
|
5
|
+
`,e.jsx(s.pre,{children:e.jsx(s.code,{className:"language-jsx",children:`<Component prop={<value>} />
|
|
6
|
+
<Component prop={{ _: <value>, '<breakpoint>': <value>, ... }} />
|
|
7
|
+
`})}),`
|
|
8
|
+
`,e.jsxs(s.p,{children:["Where ",e.jsx(s.code,{children:"_"})," is the value for the smallest breakpoint, and ",e.jsx(s.code,{children:"<breakpoint>"}),` is one of
|
|
9
|
+
the following, predefined values:`]}),`
|
|
10
|
+
`,e.jsx(c,{}),`
|
|
11
|
+
`,e.jsx(s.h2,{id:"example",children:"Example"}),`
|
|
12
|
+
`,`
|
|
13
|
+
`,e.jsx(r,{src:o,size:"24"}),`
|
|
14
|
+
`,e.jsx(r,{src:o,size:{_:"24","medium-l":"48","wide-s":"64"}}),`
|
|
15
|
+
`,e.jsx(s.pre,{children:e.jsx(s.code,{className:"language-jsx",children:`<Avatar src={url} size="24" />
|
|
16
|
+
<Avatar src={url} size={{ _: '24', 'medium-l': '48', 'wide-s': '64' }} />
|
|
17
|
+
`})}),`
|
|
18
|
+
`,e.jsxs(s.p,{children:["Try resizing your viewport using the dev tools to see the ",e.jsx(s.code,{children:"Avatar"})," size update."]})]})}function C(n={}){const{wrapper:s}={...i(),...n.components};return s?e.jsx(s,{...n,children:e.jsx(t,{...n})}):t(n)}export{C as default,o as url};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as o}from"./index-DSz_1G2r.js";import{ae as r}from"./index-
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as o}from"./index-DSz_1G2r.js";import{ae as r}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function t(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...o(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Guides/Assets/Fonts"}),`
|
|
2
2
|
`,e.jsx(n.h1,{id:"fonts",children:"Fonts"}),`
|
|
3
3
|
`,e.jsxs(n.p,{children:["The optimised assets are available under ",e.jsx(n.strong,{children:"preply.com"})," in the formats required by modern and legacy browsers."]}),`
|
|
4
4
|
`,e.jsxs(n.p,{children:["Refer to ",e.jsx(n.a,{href:"https://preply.atlassian.net/l/cp/0sQoEgGa",rel:"nofollow",children:"Create new universal brand fonts"})," for a detailed breakdown of the formats, optimisations and technical decisions."]}),`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as r}from"./index-DSz_1G2r.js";import{ae as o}from"./index-
|
|
2
|
-
`,e.jsx(n.h1,{id:"installation-
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as r}from"./index-DSz_1G2r.js";import{ae as o}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function t(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Guides/Installation/SSR/Next.js pages router"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"installation-nextjs-pages-router",children:"Installation: Next.js pages router"}),`
|
|
3
3
|
`,e.jsxs(n.p,{children:["This guide assumes you have read and followed the steps in the ",e.jsx(n.a,{href:"/story/guides-installation-applications--page",children:"Installation: Applications"})," guide."]}),`
|
|
4
4
|
`,e.jsx(n.h2,{id:"packages",children:"Packages"}),`
|
|
5
5
|
`,e.jsxs(n.p,{children:["You will need to install one extra package. ",e.jsx(n.code,{children:"@preply/ds-web-core"}),", which provides you with everything you need to collect stylesheets and CSS classes during SSR time."]}),`
|
|
@@ -88,4 +88,4 @@ class MyDocument extends Document<Request & { classNames: string }> {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
`})}),`
|
|
91
|
-
`,e.jsxs(n.p,{children:["See also ",e.jsx(n.a,{href:"https://nextjs.org/docs/advanced-features/custom-document",rel:"nofollow",children:"Next.js official docs"}),"."]})]})}function
|
|
91
|
+
`,e.jsxs(n.p,{children:["See also ",e.jsx(n.a,{href:"https://nextjs.org/docs/advanced-features/custom-document",rel:"nofollow",children:"Next.js official docs"}),"."]})]})}function S(s={}){const{wrapper:n}={...r(),...s.components};return n?e.jsx(n,{...s,children:e.jsx(t,{...s})}):t(s)}export{S as default};
|
package/dist/assets/{11.languageFont.explorer-Cyv7quON.js → 11.languageFont.explorer-DV7d1sLI.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as I}from"./index-DSz_1G2r.js";import{ae as z}from"./index-
|
|
1
|
+
import{j as t}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as I}from"./index-DSz_1G2r.js";import{ae as z}from"./index-Cs2Qo7ol.js";import{B as m,T as O,H as g}from"./TextField-IytkCeU9.js";import{L as A}from"./LayoutFlex-DnGoKdYS.js";import{L as E}from"./LayoutGrid-5ifdLdnP.js";import{u as T,T as y}from"./Text-yZzfLkiX.js";import{R as n,r as u}from"./index-CBqU2yxZ.js";import{R as L}from"./RootProvider-CcBxia7g.js";import{d as D}from"./styled-components.browser.esm-D7-R-tx8.js";import{t as c}from"./tokens-BV526yo0.js";import{u as V}from"./useTheme-BjN7KXjq.js";import{H as S,b}from"./options-Bw3OpLmh.js";import{d as B}from"./classNames-Dz8Jm24I.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./_commonjsHelpers-BosuxZz1.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";import"./render-icon-C9YZCLtv.js";import"./useHostname-B91Ahm0o.js";import"./componentNames-Bs6if0Kd.js";import"./index-CC6DAVyL.js";import"./constants-DL6gdbsq.js";import"./getInputProps-CQF_KcrT.js";import"./useForcedRef-CC5bJQVj.js";import"./useTextField-IMWr4_ZB.js";import"./constants-BaXVdZRV.js";import"./layout-relative-BhVDEqeE.js";import"./constants-DYYVurUY.js";import"./breakpoints-BfMlrtxE.js";const U=D.td`
|
|
2
2
|
width: ${({width:a})=>a?`${a}px`:"auto"};
|
|
3
3
|
padding-top: 0;
|
|
4
4
|
padding-right: ${({horizontalSpace:a})=>a?"40px":"20px"};
|
|
5
5
|
padding-bottom: ${({verticalSpace:a})=>a?"20px":"0px"};
|
|
6
6
|
padding-left: 0;
|
|
7
|
-
`,j=({index:a,id:l,defaultValue:s,resolveToken:i,render:f})=>{const r=
|
|
7
|
+
`,j=({index:a,id:l,defaultValue:s,resolveToken:i,render:f})=>{const r=T(i?i(l):c.root.text.base.typeface);return n.createElement("tr",null,n.createElement(U,{verticalSpace:!0},n.createElement("span",null,n.createElement("code",null,l))),i&&n.createElement(U,{verticalSpace:!0},r),s&&l===s?n.createElement(U,{verticalSpace:!0},"(default)"):n.createElement(U,null),f&&n.createElement(U,{verticalSpace:!0},f(l,a)))};j.__docgenInfo={description:"",methods:[],displayName:"ThemeOptionsItem"};const H=D.div`
|
|
8
8
|
margin-bottom: 20px;
|
|
9
9
|
${({relevant:a})=>`opacity: ${a?"unset":.5}}`}
|
|
10
10
|
`,h=({component:a,prop:l,options:s,defaultValue:i,resolveToken:f,render:r,hideOptions:F=[],referenceTheme:d})=>{const{theme:{name:k}}=V(),w=s.filter(({id:p})=>!F.includes(p));return n.createElement(H,{relevant:d===void 0||d===k},d?n.createElement("h4",null,"Options (theme: ",d,")"):n.createElement("h4",null,"Options"),n.createElement("table",{style:{fontSize:"14px"}},n.createElement("tbody",null,w.map(({id:p},N)=>n.createElement(j,{key:p,index:N,component:a,prop:l,id:p,defaultValue:i,resolveToken:f,render:r})))))};h.__docgenInfo={description:"",methods:[],displayName:"ThemeOptionsList",props:{hideOptions:{defaultValue:{value:"[]",computed:!1},required:!1}}};const Q=()=>n.createElement("style",{"data-ds-style":"global",dangerouslySetInnerHTML:{__html:`/* Variable fonts */
|
|
@@ -1179,7 +1179,7 @@ does not use the correct Thai glyphs for Thai characters.
|
|
|
1179
1179
|
[data-preply-ds-theme='tokyo-ui'] * {
|
|
1180
1180
|
font-family: 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif;
|
|
1181
1181
|
}
|
|
1182
|
-
`}});Q.__docgenInfo={description:"",methods:[],displayName:"GlobalStyle"};const P=["caption-regular","caption-semibold","small-regular","small-regular-italic","small-semibold","small-semibold-italic","default-regular","default-regular-italic","default-semibold","default-semibold-italic","large-regular","large-regular-italic","large-semibold","large-semibold-italic"],C=[{name:"Русский (Russian)",code:"ru",localized:"Привет, мир!"},{name:"English",code:"en",localized:"Hello, World!"},{name:"Polski",code:"pl",localized:"Cześć, Świecie!"},{name:"Deutsch",code:"de",localized:"Hallo, Welt!"},{name:"Українська (Ukranina)",code:"ua",localized:"Привіт, Світ!"},{name:"Português",code:"pt",localized:"Olá, Mundo!"},{name:"Türkçe",code:"tr",localized:"Merhaba, Dünya!"},{name:"Bahasa",code:"id",localized:"Halo, Dunia!"},{name:"Français",code:"fr",localized:"Bonjour, le monde!"},{name:"Italiano",code:"it",localized:"Ciao, Mondo!"},{name:"Español",code:"es",localized:"¡Hola, Mundo!"},{name:"中文 (Chinese)",code:"zh",localized:"你好,世界!"},{name:"日本語 (Japanese)",code:"ja",localized:"こんにちは、世界!"},{name:"한국어 (Korean)",code:"ko",localized:"안녕하세요, 세계!"},{name:"العربية",code:"ar",localized:"مرحبا بك في عالم البرمجة!"},{name:"Nederlands",code:"nl",localized:"Hallo, wereld!"},{name:"Română",code:"ro",localized:"Salut, Lume!"},{name:"Thai",code:"th",localized:"สวัสดี, โลก!"},{name:"Swedish",code:"sv",localized:"Hej, världen!"},{name:"Czeck",code:"cs",localized:"Ahoj, světe!"}],x={en:!0,ua:!0,th:!0,sv:!0,zh:!0};function _(){const a=localStorage.getItem("selectedLanguages"),[l,s]=
|
|
1182
|
+
`}});Q.__docgenInfo={description:"",methods:[],displayName:"GlobalStyle"};const P=["caption-regular","caption-semibold","small-regular","small-regular-italic","small-semibold","small-semibold-italic","default-regular","default-regular-italic","default-semibold","default-semibold-italic","large-regular","large-regular-italic","large-semibold","large-semibold-italic"],C=[{name:"Русский (Russian)",code:"ru",localized:"Привет, мир!"},{name:"English",code:"en",localized:"Hello, World!"},{name:"Polski",code:"pl",localized:"Cześć, Świecie!"},{name:"Deutsch",code:"de",localized:"Hallo, Welt!"},{name:"Українська (Ukranina)",code:"ua",localized:"Привіт, Світ!"},{name:"Português",code:"pt",localized:"Olá, Mundo!"},{name:"Türkçe",code:"tr",localized:"Merhaba, Dünya!"},{name:"Bahasa",code:"id",localized:"Halo, Dunia!"},{name:"Français",code:"fr",localized:"Bonjour, le monde!"},{name:"Italiano",code:"it",localized:"Ciao, Mondo!"},{name:"Español",code:"es",localized:"¡Hola, Mundo!"},{name:"中文 (Chinese)",code:"zh",localized:"你好,世界!"},{name:"日本語 (Japanese)",code:"ja",localized:"こんにちは、世界!"},{name:"한국어 (Korean)",code:"ko",localized:"안녕하세요, 세계!"},{name:"العربية",code:"ar",localized:"مرحبا بك في عالم البرمجة!"},{name:"Nederlands",code:"nl",localized:"Hallo, wereld!"},{name:"Română",code:"ro",localized:"Salut, Lume!"},{name:"Thai",code:"th",localized:"สวัสดี, โลก!"},{name:"Swedish",code:"sv",localized:"Hej, världen!"},{name:"Czeck",code:"cs",localized:"Ahoj, světe!"}],x={en:!0,ua:!0,th:!0,sv:!0,zh:!0};function _(){const a=localStorage.getItem("selectedLanguages"),[l,s]=u.useState(a?JSON.parse(a):x),[i,f]=u.useState(!1),[r,F]=u.useState("Hello, World!");u.useEffect(()=>{localStorage.setItem("selectedLanguages",JSON.stringify(l))},[l]);const d=o=>{s({...l,[o.target.name]:o.target.checked})},k=()=>{const o=C.reduce((e,R)=>(e[R.code]=!0,e),{});s(o)},w=()=>{s({})},p=()=>{s(x)},N=()=>{f(o=>!o)};return t.jsx("div",{className:"App",children:t.jsxs(A,{column:!0,gap:"32",children:[t.jsx(E,{columns:5,gap:"8",children:C.map(o=>t.jsxs("div",{children:[t.jsx("input",{type:"checkbox",name:o.code,checked:l[o.code]||!1,onChange:d,id:o.code}),t.jsxs("label",{htmlFor:o.code,children:[o.name," (",o.code,")"]})]},o.code))}),t.jsxs(A,{gap:"8",children:[t.jsx(m,{variant:"secondary",onClick:k,children:"Select all languages"}),t.jsx(m,{variant:"secondary",onClick:w,children:"Deselect all languages"}),t.jsx(m,{variant:"ghost",onClick:p,children:"Reset selected languages"}),t.jsx(m,{variant:"ghost",onClick:N,children:"Toggle all text variants"})]}),t.jsx(A,{column:!0,gap:"32",children:t.jsx(O,{label:"English sentence",value:r,onValueChange:F})}),t.jsx(E,{columns:3,gap:"16",children:C.filter(o=>l[o.code]).map(o=>t.jsxs("div",{style:{display:"contents"},children:[t.jsxs("div",{children:[o.name," (",o.code,")"]}),t.jsxs("div",{lang:o.code,children:[t.jsx(y,{accent:"tertiary",children:t.jsx("i",{children:"English sentence"})}),t.jsx(g,{variant:"large",tag:"h2",children:r}),t.jsx(y,{children:r}),i&&t.jsxs(t.Fragment,{children:[t.jsx(h,{component:"Heading",prop:"variant",options:S,render:e=>t.jsx(g,{variant:e,children:r}),resolveToken:e=>c.heading.variant[e].fontSize}),t.jsx(h,{component:"Text",prop:"variant",options:b.filter(({id:e})=>P.includes(e)),defaultValue:B,resolveToken:e=>c.text.variant[e].fontSize,render:e=>t.jsx(y,{variant:e,children:r})})]})]}),t.jsxs("div",{lang:o.code,children:[t.jsx(y,{accent:"tertiary",children:t.jsx("i",{children:"Localized sentence"})}),t.jsx(g,{variant:"large",tag:"h2",children:o.localized}),t.jsx(y,{children:o.localized}),i&&t.jsxs(t.Fragment,{children:[t.jsx(h,{component:"Heading",prop:"variant",options:S,render:e=>t.jsx(g,{variant:e,children:o.localized}),resolveToken:e=>c.heading.variant[e].fontSize}),t.jsx(h,{component:"Text",prop:"variant",options:b.filter(({id:e})=>P.includes(e)),defaultValue:B,resolveToken:e=>c.text.variant[e].fontSize,render:e=>t.jsx(y,{variant:e,children:o.localized})})]})]})]},o.code))})]})})}const q=()=>t.jsxs(t.Fragment,{children:[t.jsx(Q,{}),t.jsx(L,{theme:"tokyo-ui",children:t.jsx("div",{"data-preply-ds-theme":"tokyo-ui",children:t.jsx(_,{})})})]});function v(a){const l={h1:"h1",p:"p",...I(),...a.components};return t.jsxs(t.Fragment,{children:[t.jsx(z,{title:"Guides/Assets/Language Font Explorer"}),`
|
|
1183
1183
|
`,t.jsx(l.h1,{id:"language-font-explorer",children:"Language Font Explorer"}),`
|
|
1184
1184
|
`,t.jsx(l.p,{children:"Here you can visualize how headings and texts are rendered for every single language."}),`
|
|
1185
|
-
`,t.jsx(q,{})]})}function
|
|
1185
|
+
`,t.jsx(q,{})]})}function Ct(a={}){const{wrapper:l}={...I(),...a.components};return l?t.jsx(l,{...a,children:t.jsx(v,{...a})}):v(a)}export{Ct as default};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as n}from"./index-DSz_1G2r.js";import{ae as s}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function o(r){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...n(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Guides/Installation/SSR/Next.js app router"}),`
|
|
2
|
+
`,e.jsx(t.h1,{id:"installation-nextjs-app-router",children:"Installation: Next.js app router"}),`
|
|
3
|
+
`,e.jsxs(t.p,{children:["This guide assumes you have read and followed the steps in the ",e.jsx(t.a,{href:"/story/guides-installation-applications--page",children:"Installation: Applications"})," guide."]}),`
|
|
4
|
+
`,e.jsx(t.h2,{id:"packages",children:"Packages"}),`
|
|
5
|
+
`,e.jsxs(t.p,{children:["You will need to install one extra package. ",e.jsx(t.code,{children:"@preply/ds-web-core"}),", which provides you with everything you need to collect stylesheets and CSS classes during SSR time."]}),`
|
|
6
|
+
`,e.jsx(t.pre,{children:e.jsx(t.code,{children:`yarn add @preply/ds-web-core
|
|
7
|
+
`})}),`
|
|
8
|
+
`,e.jsx(t.h2,{id:"create-a-client-component-for-collecting-styles-and-rendering-provider",children:"Create a client component for collecting styles and rendering provider"}),`
|
|
9
|
+
`,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-tsx",children:`'use client';
|
|
10
|
+
|
|
11
|
+
import { ReactNode, useState } from 'react';
|
|
12
|
+
import { RootProvider, SSRProvider } from '@preply/ds-web-root';
|
|
13
|
+
import { ServerStyleSheet } from '@preply/ds-web-core';
|
|
14
|
+
import { useServerInsertedHTML } from 'next/navigation';
|
|
15
|
+
|
|
16
|
+
const hostname = process.env.PREPLY_HOST; // or any other way to get the hostname
|
|
17
|
+
|
|
18
|
+
export const DSProvider = ({ children }: { children: ReactNode }) => {
|
|
19
|
+
const [stylesheet] = useState(() => new ServerStyleSheet());
|
|
20
|
+
|
|
21
|
+
useServerInsertedHTML(() => {
|
|
22
|
+
const styles = stylesheet.getStyleElement();
|
|
23
|
+
return <>{styles}</>;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<SSRProvider stylesheet={stylesheet} hostname={hostname}>
|
|
28
|
+
<RootProvider theme="tokyo-ui" target="none">
|
|
29
|
+
{children}
|
|
30
|
+
</RootProvider>
|
|
31
|
+
</SSRProvider>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
`})}),`
|
|
35
|
+
`,e.jsx(t.h2,{id:"add-dsprovider-and-the-global-styles-to-the-root-layouttsx",children:"Add DSProvider and the global styles to the root layout.tsx"}),`
|
|
36
|
+
`,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-tsx",children:`import type { Metadata } from 'next';
|
|
37
|
+
import { DSProvider } from '../components/DSProvider';
|
|
38
|
+
import { GlobalStyle } from '@preply/ds-web-root';
|
|
39
|
+
|
|
40
|
+
export const metadata: Metadata = {
|
|
41
|
+
title: 'Create Next App',
|
|
42
|
+
description: 'Generated by create next app',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
46
|
+
return (
|
|
47
|
+
<html lang="en">
|
|
48
|
+
<head>
|
|
49
|
+
<link rel="preconnect" href="https://static.preply.com" />
|
|
50
|
+
<GlobalStyle />
|
|
51
|
+
</head>
|
|
52
|
+
<body>
|
|
53
|
+
<DSProvider>{children}</DSProvider>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
`})}),`
|
|
59
|
+
`,e.jsxs(t.p,{children:["See also ",e.jsx(t.a,{href:"https://nextjs.org/docs/app/building-your-application/styling/css-in-js",rel:"nofollow",children:"Next.js official docs"}),"."]})]})}function S(r={}){const{wrapper:t}={...n(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(o,{...r})}):o(r)}export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as o}from"./index-DSz_1G2r.js";import{ae as r}from"./index-
|
|
1
|
+
import{j as e}from"./jsx-runtime-CKrituN3.js";import{useMDXComponents as o}from"./index-DSz_1G2r.js";import{ae as r}from"./index-Cs2Qo7ol.js";import"./index-CBqU2yxZ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./iframe-C9-tEs2g.js";import"../sb-preview/runtime.js";import"./index-CbwENYX-.js";import"./index-D-8MO0q_.js";import"./index-nrpnv_Jx.js";import"./index-DrFu-skq.js";function i(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...o(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Guides/Installation/Libraries"}),`
|
|
2
2
|
`,e.jsx(n.h1,{id:"installation-libraries",children:"Installation: Libraries"}),`
|
|
3
3
|
`,e.jsxs(n.p,{children:["This guide applies to libraries consumed in Preply applications, and assumes these applications are already integrated according to the steps outlined in the ",e.jsx(n.a,{href:"/story/guides-installation-applications--page",children:"Installation: Applications"})," guide."]}),`
|
|
4
4
|
`,e.jsx(n.h2,{id:"install-packages",children:"Install Packages"}),`
|