@preply/ds-docs 7.1.0 → 8.0.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 → .storybook}/decorators/preventIframeFromScrollingParent.tsx +1 -1
- package/{config → .storybook}/decorators/withIntlProvider.tsx +1 -1
- package/{config → .storybook}/main.ts +9 -21
- package/{config/manager.js → .storybook/manager.ts} +3 -3
- package/{config → .storybook}/preview-head.html +5 -0
- package/{config → .storybook}/preview.tsx +32 -7
- package/.storybook/vitest.setup.ts +5 -0
- package/README.md +1 -2
- package/dist/assets/00.LayoutFlex.stories-Trn9fl1r.js +85 -0
- package/dist/assets/{00.applications-CUkoHGre.js → 00.applications-DgG50o0h.js} +2 -2
- package/dist/assets/{00.favicons.guide-BACLlsQJ.js → 00.favicons.guide-BPbT_6WU.js} +2 -2
- package/dist/assets/{00.token-explorer-KvyvCOUP.js → 00.token-explorer-ClCpyqpc.js} +45 -45
- package/dist/assets/00.using-responsive-props-Bb1iomQW.js +18 -0
- package/dist/assets/01.semantic-tokens-C27rrlvA.js +11 -0
- package/dist/assets/{01.using-shorthand-props-BVcqSsu2.js → 01.using-shorthand-props-Cx8UqLGh.js} +2 -2
- package/dist/assets/10.Combinations.stories-DW0Awy7g.js +128 -0
- package/dist/assets/{10.fonts.guide-C0WN5q3d.js → 10.fonts.guide-mlrpbwOs.js} +2 -2
- package/dist/assets/{10.ssr-nXkWq-Jg.js → 10.ssr-Bxv1R5s2.js} +2 -2
- package/dist/assets/{11.languageFont.explorer.stories-CtRFTC-u.js → 11.languageFont.explorer.stories-CduWkRQi.js} +5 -5
- package/dist/assets/{11.ssr.app-router-DQgi7F2D.js → 11.ssr.app-router-DaFyxoYP.js} +2 -2
- package/dist/assets/{20.libraries-DU9GpL6L.js → 20.libraries-B1FxeNSm.js} +2 -2
- package/dist/assets/{2025-q4-ds-cleanup-C1ZmbxTl.js → 2025-q4-ds-cleanup-CyVfiEF_.js} +2 -2
- package/dist/assets/30.icons.explorer-J5XXpjOy.js +72 -0
- package/dist/assets/{30.storybook-DZPRDZF1.js → 30.storybook-BXPxdYYA.js} +2 -2
- package/dist/assets/40.illustrations.explorer-Ll2UaYWn.js +21 -0
- package/dist/assets/{90.advanced-C_XdYJPc.js → 90.advanced-BkBCaIij.js} +2 -2
- package/dist/assets/Accordion-Bjcf873X.js +1 -0
- package/dist/assets/{Accordion.stories-BUn1TO-l.js → Accordion.stories-CwmuD6M9.js} +3 -3
- package/dist/assets/{Accordion.tests.stories-DHNOscki.js → Accordion.tests.stories-DycRaTsm.js} +8 -8
- package/dist/assets/AlertDialog.stories-CMG96OPW.js +240 -0
- package/dist/assets/Avatar-BHWZ6iZn.js +1 -0
- package/dist/assets/Avatar.stories-DcHCuUcU.js +42 -0
- package/dist/assets/AvatarWithStatus.stories-BQ9j0v-r.js +36 -0
- package/dist/assets/Badge-e3LEfrfi.css +1 -0
- package/dist/assets/Badge.stories-CjBGqctl.js +82 -0
- package/dist/assets/Box.stories-F4YHVHtw.js +44 -0
- package/dist/assets/BubbleCounter.stories-W-QyzoZM.js +238 -0
- package/dist/assets/{Button-C2MXHYlY.css → Button-6DthIrMV.css} +1 -1
- package/dist/assets/Button-Db3mZeHX.js +1 -0
- package/dist/assets/Button-KgwWX-kY.js +1 -0
- package/dist/assets/{Button.stories-VjpvM5FZ.js → Button.stories-DZXg3fC6.js} +8 -8
- package/dist/assets/ButtonBase-LoF75NjE.js +1 -0
- package/dist/assets/{ButtonBase-Ide6FPM1.css → ButtonBase-vTD2whCv.css} +1 -1
- package/dist/assets/Checkbox-Bdi6imAj.js +1 -0
- package/dist/assets/{Checkbox.stories-C1RURGZy.js → Checkbox.stories-Wzzjomc-.js} +4 -4
- package/dist/assets/Checkbox.tests.stories-CGPErtLg.js +64 -0
- package/dist/assets/Chips.stories-BwJJ2fGW.js +140 -0
- package/dist/assets/Color-ASIRERSW-B8huhEry.js +1 -0
- package/dist/assets/ComposingPopovers.stories-CYrydDT0.js +49 -0
- package/dist/assets/CountryFlag-BsylP9aC.js +1 -0
- package/dist/assets/{CountryFlag.stories-lizf_vqO.js → CountryFlag.stories-CV_Ix2uc.js} +6 -6
- package/dist/assets/CountryFlag.test.stories-D-_jZuZ1.js +27 -0
- package/dist/assets/Dialog-DBQC7rLf.js +9 -0
- package/dist/assets/Dialog.stories-CLAeCRCv.js +381 -0
- package/dist/assets/DismissibleChips-BTc-ZGnG.js +1 -0
- package/dist/assets/{DismissibleChips.stories-CM10Bclv.js → DismissibleChips.stories-DYuvYDPR.js} +10 -10
- package/dist/assets/Divider-aEUPegmM.js +1 -0
- package/dist/assets/Divider.stories-DY-9haru.js +9 -0
- package/dist/assets/DocsRenderer-GHJI37HO-ZaAnf_mS.js +2 -0
- package/dist/assets/DropdownMenu-Eg6NEumE.js +1 -0
- package/dist/assets/{DropdownMenu.stories-BMPgkvR1.js → DropdownMenu.stories-DRc0OM4l.js} +25 -20
- package/dist/assets/FieldButton-CE-kxD0a.js +1 -0
- package/dist/assets/FieldButton.stories-0iohAlVk.js +1 -0
- package/dist/assets/FormControl-DI4h0Rn1.js +1 -0
- package/dist/assets/FormControl.stories-B-wRzqin.js +42 -0
- package/dist/assets/Heading-jyl-6mnE.js +1 -0
- package/dist/assets/Heading.stories-C--u6-XB.js +67 -0
- package/dist/assets/Icon-BbVZ9NP7.js +1 -0
- package/dist/assets/Icon-RSC-iQ3CU9mQ.js +6 -0
- package/dist/assets/{Icon.stories-C8lZfyvV.js → Icon.stories-DRfWUzol.js} +2 -2
- package/dist/assets/IconButton-DvmHN9Bh.js +1 -0
- package/dist/assets/Input-qJLg_DQg.js +1 -0
- package/dist/assets/InputContainer-DxTdO3rg.js +1 -0
- package/dist/assets/IntegrationWithReactHookForm.stories-D7Os2mOo.js +467 -0
- package/dist/assets/IntlFormattedCurrency.stories-DsOonDv4.js +1 -0
- package/dist/assets/IntlFormattedDateTime.stories-CEfl-J8a.js +1 -0
- package/dist/assets/LayoutFlex-7DoB3s9X.css +1 -0
- package/dist/assets/LayoutFlex-CtFx5gUZ.js +1 -0
- package/dist/assets/LayoutFlex-TxluN-Yw.js +1 -0
- package/dist/assets/LayoutFlexItem-CG7Crdkt.js +1 -0
- package/dist/assets/LayoutGrid-CyPyNDw1.js +1 -0
- package/dist/assets/LayoutGrid-Ddqp2KT2.js +1 -0
- package/dist/assets/LayoutGrid.stories-D1L7aqlu.js +88 -0
- package/dist/assets/LayoutGridItem-D9IWdXiI.js +1 -0
- package/dist/assets/Link-DBtlp5DH.js +1 -0
- package/dist/assets/{Link.stories-DVvzdQg0.js → Link.stories-BGk_oU7W.js} +2 -2
- package/dist/assets/Loader.stories-BW_8B3fu.js +37 -0
- package/dist/assets/MultiSelectChips-vFJ-9-kf.js +1 -0
- package/dist/assets/{MultiSelectChips.stories-DtyVRO_D.js → MultiSelectChips.stories-DMQnklfd.js} +11 -11
- package/dist/assets/NativeSelectField.stories-iktDEjbi.js +243 -0
- package/dist/assets/NumberField-DachAjtc.js +1 -0
- package/dist/assets/NumberField.stories-CHm83Evu.js +254 -0
- package/dist/assets/ObserveIntersection-Gkcdp17D.js +1 -0
- package/dist/assets/ObserveIntersection.stories-Crg5XGQK.js +27 -0
- package/dist/assets/OnboardingTooltip-Clfuyvq4.js +1 -0
- package/dist/assets/{OnboardingTooltip.stories-CXeGdwmF.js → OnboardingTooltip.stories-1rbEN6tf.js} +5 -5
- package/dist/assets/OnboardingTooltip.tests.stories-DbaxrQeh.js +79 -0
- package/dist/assets/OnboardingTour-DlsIO1Gv.js +1 -0
- package/dist/assets/OnboardingTour.stories-eO-vrmSq.js +42 -0
- package/dist/assets/{OnboardingTour.tests.stories-geQyXRg0.js → OnboardingTour.tests.stories-nH2oAAkE.js} +6 -6
- package/dist/assets/PasswordField-Cb1fJLBM.js +1 -0
- package/dist/assets/PasswordField.stories-BpCu_Nmu.js +229 -0
- package/dist/assets/PreplyLogo.stories-C7DVat2q.js +93 -0
- package/dist/assets/ProgressBar.stories-CJTsS-k-.js +43 -0
- package/dist/assets/ProgressSteps-LRQw0WxN.js +1 -0
- package/dist/assets/ProgressSteps.stories-DkKhdsEq.js +31 -0
- package/dist/assets/PromoDialog-BD77J0Sb.js +3 -0
- package/dist/assets/RangeSlider-C7BMuKPO.js +3 -0
- package/dist/assets/{RangeSlider.stories-DOKf_qXp.js → RangeSlider.stories-BR0J8t26.js} +6 -6
- package/dist/assets/Rating.stories-C4odIVLb.js +115 -0
- package/dist/assets/{RatingInput.stories-BmhUO-vY.js → RatingInput.stories-C3TFrxw_.js} +30 -57
- package/dist/assets/SelectField-BvrdbknI.css +1 -0
- package/dist/assets/SelectField-qkC5zVlE.js +1 -0
- package/dist/assets/SelectField.stories-BkyQpgee.js +516 -0
- package/dist/assets/ShowOnIntersection.stories-DMrPWP_X.js +17 -0
- package/dist/assets/SingleSelectChips-URtzgStH.js +1 -0
- package/dist/assets/{SingleSelectChips.stories-CgSCJR-h.js → SingleSelectChips.stories-C62wkEv2.js} +19 -19
- package/dist/assets/Slider-DwJ11rhB.js +1 -0
- package/dist/assets/Slider.stories-Ctv9GCye.js +69 -0
- package/dist/assets/Spinner-BtlYJQrD.js +1 -0
- package/dist/assets/{Stars-DGzJFzmk.js → Stars-noMq-Uej.js} +1 -1
- package/dist/assets/Steps-ZKxhdp_N.js +1 -0
- package/dist/assets/{Steps.stories-BppoL2gK.js → Steps.stories-DcQb87xm.js} +12 -12
- package/dist/assets/Switch-CukXNUpT.js +1 -0
- package/dist/assets/{Switch.stories-aVZF_-KJ.js → Switch.stories-DDel8GN3.js} +9 -9
- package/dist/assets/Text-BaQf6qnx.js +1 -0
- package/dist/assets/Text-D2ssZW1_.js +1 -0
- package/dist/assets/Text-O3SM8a3p.css +1 -0
- package/dist/assets/Text.stories-DAYsyFR5.js +58 -0
- package/dist/assets/TextField-D3FL7yE0.js +1 -0
- package/dist/assets/TextField.stories-B7yiySGl.js +254 -0
- package/dist/assets/TextHighlighted.stories-GrC4GB2n.js +32 -0
- package/dist/assets/TextInline.stories-CLDPL3xz.js +50 -0
- package/dist/assets/TextareaField-lItTPjhC.js +1 -0
- package/dist/assets/{TextareaField.stories-oScbbK_V.js → TextareaField.stories-CSn1Y1es.js} +13 -12
- package/dist/assets/Toast-PKFBYWQw.css +1 -0
- package/dist/assets/Toast.stories-WMpE2CUA.js +183 -0
- package/dist/assets/TokyoUIAttach-DEHypfd2.js +1 -0
- package/dist/assets/TokyoUIAvailability7LateNight-DqIhY2LI.js +1 -0
- package/dist/assets/TokyoUICheck-DFXDKlST.js +1 -0
- package/dist/assets/TokyoUICheckmark-CC75JvoU.js +1 -0
- package/dist/assets/TokyoUIChevronDown-CV0GTyb_.js +1 -0
- package/dist/assets/TokyoUIClose-Bf-N_4aK.js +1 -0
- package/dist/assets/TokyoUIEmojiFrowning-CEEry-ar.js +1 -0
- package/dist/assets/TokyoUIEye-CvZmomj8.js +1 -0
- package/dist/assets/TokyoUIFav-CV3HlDno.js +1 -0
- package/dist/assets/TokyoUIInfo-S99idYL9.js +1 -0
- package/dist/assets/TokyoUILanguage-dDro1t5I.js +1 -0
- package/dist/assets/TokyoUILibraryExplore-3boXHfri.js +1 -0
- package/dist/assets/TokyoUILock-Ddb0LZOj.js +1 -0
- package/dist/assets/TokyoUIMessages-DddkimKx.js +1 -0
- package/dist/assets/TokyoUIMinus-BM97SQFD.js +1 -0
- package/dist/assets/TokyoUINotebook-CzW-xZ-S.js +1 -0
- package/dist/assets/TokyoUINotesWithPad-CZPHd-s1.js +1 -0
- package/dist/assets/TokyoUIPhone-B41go8ay.js +1 -0
- package/dist/assets/TokyoUISettings-r8yUukmp.js +1 -0
- package/dist/assets/TokyoUIStarFilled-DAFjKfr3.js +1 -0
- package/dist/assets/TokyoUITag-BOlMKPwF.js +1 -0
- package/dist/assets/TokyoUIUpload-DqgHhwt9.js +1 -0
- package/dist/assets/TokyoUIUser-DQL_EW5M.js +1 -0
- package/dist/assets/Tooltip-nL6-qc2S.js +1 -0
- package/dist/assets/Tooltip.stories-BCIj91Tz.js +93 -0
- package/dist/assets/{Tooltip.tests.stories-t8Ra6jdu.js → Tooltip.tests.stories-BuldDnaS.js} +3 -3
- package/dist/assets/VisuallyHidden-CBzPUOy4.js +1 -0
- package/dist/assets/WithTooltip-IO6J4KBT-sdWoJ5kA.js +9 -0
- package/dist/assets/align-self-Dj6Hw1ei.js +1 -0
- package/dist/assets/avatar-1.png +0 -0
- package/dist/assets/avatar-2.png +0 -0
- package/dist/assets/avatar-3.png +0 -0
- package/dist/assets/avatar-4.png +0 -0
- package/dist/assets/avatar-5.png +0 -0
- package/dist/assets/{axe-KozDj-05.js → axe-COSWniE7.js} +1 -1
- package/dist/assets/{breakpoints-BU3g7toZ.js → breakpoints-Bq0N-WKo.js} +2 -2
- package/dist/assets/{breakpoints-B9BgZenX.js → breakpoints-DAuVWyVl.js} +2 -2
- package/dist/assets/{breakpoints-BwVzZWx6.js → breakpoints-r5YNDlDj.js} +2 -2
- package/dist/assets/changelog-DfbyLrVG.js +2392 -0
- package/dist/assets/client-B0RkqQz5.js +1 -0
- package/dist/assets/{componentNames-k0j3gHgH.js → componentNames-CmmTyjin.js} +1 -1
- package/dist/assets/constants-DiGI6Pao.js +47 -0
- package/dist/assets/createRequiredContext-Dh2RVm_M.js +1 -0
- package/dist/assets/emotion-unitless.esm-BZwEwAnk.js +1 -0
- package/dist/assets/formatter-QJ4M4OGQ-DkyPaaGf.js +1 -0
- package/dist/assets/getTokenVar-DAf6Dqww.js +11 -0
- package/dist/assets/getTokenVar-DGGittrV.js +1 -0
- package/dist/assets/gradientBorders-BLAK8Z-v.js +45 -0
- package/dist/assets/hover-BK-WJeH0.js +16 -0
- package/dist/assets/hover-Bny3ccNR.js +13 -0
- package/dist/assets/hover-reiWegqW.js +14 -0
- package/dist/assets/iframe-CWgEsn_I.js +1891 -0
- package/dist/assets/iframe-Dl7aNcg3.css +1 -0
- package/dist/assets/index-BAEPs7Y-.js +12 -0
- package/dist/assets/index-BiSZC2o0.js +1 -0
- package/dist/assets/{index-Bd3pAdGF.js → index-CC1MzVDH.js} +2 -2
- package/dist/assets/index-D3eu31XZ.js +41 -0
- package/dist/assets/index-DN8YXDVa.js +1 -0
- package/dist/assets/index-DVMjwMfI.js +1 -0
- package/dist/assets/{intro-W6KSFbTA.js → intro-BstePxGk.js} +2 -2
- package/dist/assets/layout-relative-Dd1oD7no.js +1 -0
- package/dist/assets/layout-relative.module-1z75aSwo-BlGCRaGo.js +1 -0
- package/dist/assets/layout-relative.module-DtLbhGhZ.js +1 -0
- package/dist/assets/matchers-DMFSMG2O-CAdg16Fl.js +14 -0
- package/dist/assets/mcp-BnvXyj7V.js +32 -0
- package/dist/assets/message-qc_MCF3J.js +1 -0
- package/dist/assets/{migrating-from-less-DsURcUxp.js → migrating-from-less-DeeEWMYL.js} +2 -2
- package/dist/assets/playground.stories-CvceWUq7.js +6 -0
- package/dist/assets/preload-helper-Dp1pzeXC.js +1 -0
- package/dist/assets/react-18-Cn7fKkEX.js +1 -0
- package/dist/assets/{render-icon-Du0nasoi.js → render-icon-CcTDatKg.js} +2 -2
- package/dist/assets/render-icon-DCa6Vadq.js +9 -0
- package/dist/assets/{shared-strings-DFzxd8lM.js → shared-strings-I9WUPC_k.js} +1 -1
- package/dist/assets/styled-components.browser.esm-BZ4U6qbl.js +2 -0
- package/dist/assets/styled-components.browser.esm-DsfIp3u0.js +2 -0
- package/dist/assets/syntaxhighlighter-IQDEPFLK-BGcWLhM8.js +6 -0
- package/dist/assets/text-accent-CvDqGyH8.js +1 -0
- package/dist/assets/text-centered-4FcavPd_.js +1 -0
- package/dist/assets/text-centered-nO9Uq8mN.js +1 -0
- package/dist/assets/tokens-BEq-FCvC.js +15 -0
- package/dist/assets/tokens-I7xc-5gL.js +1 -0
- package/dist/assets/{tokens-Dr0rNfCQ.js → tokens-as7cem5X.js} +2 -2
- package/dist/assets/{tokens-CwpsI1W8.js → tokens-kjKX1OOx.js} +2 -2
- package/dist/assets/useControllableState-CB098DmS.js +1 -0
- package/dist/assets/useHostname-DENeD9To.js +1 -0
- package/dist/assets/useMergeRefs-Cma75nFm.js +1 -0
- package/dist/assets/useMergeRefs-DrdDSUH5.js +1 -0
- package/dist/assets/useOpenInteractionType-DeCsKa-1.js +15 -0
- package/dist/assets/usePortalElement-CK58JXLC.js +19 -0
- package/dist/assets/useStableCallback-Cg8WkzY2.js +1 -0
- package/dist/assets/useToken-Dy7e7qui.js +1 -0
- package/dist/assets/{welcome-CqKVBlQ_.js → welcome-DnB7jiTV.js} +3 -3
- package/dist/assets/{zeroheight-bhuS12y3.js → zeroheight-BLhCMMHP.js} +3 -3
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +2 -1
- package/dist/iframe.html +37 -11
- package/dist/index.html +30 -65
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +13185 -12261
- package/dist/project.json +1 -1
- package/dist/sb-addons/a11y-1/manager-bundle.js +3 -218
- package/dist/sb-addons/docs-4/manager-bundle.js +3 -0
- package/dist/sb-addons/links-2/manager-bundle.js +3 -0
- package/dist/sb-addons/storybook-5/manager-bundle.js +3 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
- package/dist/sb-addons/vitest-3/manager-bundle.js +3 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -1
- package/dist/sb-manager/globals-runtime.js +73678 -40227
- package/dist/sb-manager/globals.js +13 -37
- package/dist/sb-manager/manager-stores.js +23 -0
- package/dist/sb-manager/runtime.js +17313 -9663
- package/dist/vite-inject-mocker-entry.js +18 -0
- package/package.json +17 -23
- package/pages/06.changelog/changelog.mdx +7 -0
- package/pages/30.guides/00.installation/00.applications.mdx +67 -0
- package/pages/30.guides/00.installation/10.ssr.mdx +113 -0
- package/pages/30.guides/00.installation/11.ssr.app-router.mdx +74 -0
- package/pages/30.guides/00.installation/20.libraries.mdx +38 -0
- package/pages/30.guides/00.installation/30.storybook.mdx +60 -0
- package/pages/30.guides/00.installation/90.advanced.mdx +41 -0
- package/pages/30.guides/10.MCP/mcp.mdx +50 -0
- package/pages/30.guides/40.tokens/00.token-explorer.mdx +17 -0
- package/pages/30.guides/40.tokens/01.semantic-tokens.mdx +33 -0
- package/pages/30.guides/40.tokens/components/SchemeSwitcher.styles.ts +34 -0
- package/pages/30.guides/40.tokens/components/SchemeSwitcher.tsx +41 -0
- package/pages/30.guides/40.tokens/components/SearchTerms.styles.tsx +17 -0
- package/pages/30.guides/40.tokens/components/SearchTerms.tsx +63 -0
- package/pages/30.guides/40.tokens/components/SemanticTokens.tsx +183 -0
- package/pages/30.guides/40.tokens/components/TokenCard.styles.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenCard.tsx +50 -0
- package/pages/30.guides/40.tokens/components/TokenList.styles.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenList.tsx +32 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderDuration.tsx +25 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderEasing.tsx +7 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderTransition.tsx +21 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBackground.tsx +15 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBgColor.tsx +15 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderColor.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderImage.tsx +19 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderRadius.tsx +19 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderWidth.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBoxShadow.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBrightness.tsx +22 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererEasingCoordinate.tsx +8 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFgColor.tsx +20 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontFamily.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontSize.tsx +16 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontStyle.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontWeight.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererHeight.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLetterSpacing.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLineHeightPixels.tsx +23 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLineHeightRatio.tsx +23 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineColor.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineOffset.tsx +29 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineWidth.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererPaletteItem.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererProps.tsx +6 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSize.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSpace.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSwatch.tsx +25 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererTextDecoration.tsx +26 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererTypeface.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenSearch.styles.tsx +42 -0
- package/pages/30.guides/40.tokens/components/TokenSearch.tsx +79 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHint.styles.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHint.tsx +41 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHints.tsx +25 -0
- package/pages/30.guides/40.tokens/constants/search-hints.tsx +34 -0
- package/pages/30.guides/40.tokens/constants/token-values-flattened.ts +35 -0
- package/pages/30.guides/40.tokens/functions/token-type.renderer.test.tsx +72 -0
- package/pages/30.guides/40.tokens/functions/token-type.renderer.tsx +206 -0
- package/pages/30.guides/40.tokens/functions/token.filter.ts +25 -0
- package/pages/30.guides/40.tokens/providers/TokenSearchProvider.tsx +76 -0
- package/pages/30.guides/40.tokens/providers/useTokenSearchContext.ts +5 -0
- package/pages/30.guides/40.tokens/types.ts +18 -0
- package/pages/30.guides/50.special-props/00.using-responsive-props.mdx +35 -0
- package/pages/30.guides/50.special-props/01.using-shorthand-props.mdx +64 -0
- package/pages/30.guides/50.special-props/components/BreakpointList.tsx +19 -0
- package/pages/30.guides/60.components/20.sc/examples/MyStyledComponentWithTokens.ts +14 -0
- package/pages/30.guides/60.components/index.mdx +28 -0
- package/pages/30.guides/60.components/less/breakpoints.mdx +43 -0
- package/pages/30.guides/60.components/less/hover.mdx +19 -0
- package/pages/30.guides/60.components/less/tokens.mdx +24 -0
- package/pages/30.guides/60.components/scss/breakpoints.mdx +52 -0
- package/pages/30.guides/60.components/scss/hover.mdx +30 -0
- package/pages/30.guides/60.components/scss/migrating-from-less.mdx +55 -0
- package/pages/30.guides/60.components/scss/tokens.mdx +33 -0
- package/pages/30.guides/60.components/styled-components/breakpoints.mdx +45 -0
- package/pages/30.guides/60.components/styled-components/hover.mdx +20 -0
- package/pages/30.guides/60.components/styled-components/intro.mdx +49 -0
- package/pages/30.guides/60.components/styled-components/tokens.mdx +22 -0
- package/pages/30.guides/70.assets/00.favicons.guide.mdx +32 -0
- package/pages/30.guides/70.assets/10.fonts.guide.mdx +59 -0
- package/pages/30.guides/70.assets/11.languageFont.explorer.stories.tsx +15 -0
- package/pages/30.guides/70.assets/30.icons.explorer.mdx +30 -0
- package/pages/30.guides/70.assets/40.illustrations.explorer.mdx +12 -0
- package/pages/30.guides/70.assets/components/FontForLanguages.tsx +357 -0
- package/pages/30.guides/70.assets/components/IconDetails.styles.ts +29 -0
- package/pages/30.guides/70.assets/components/IconDetails.tsx +163 -0
- package/pages/30.guides/70.assets/components/IconItem.styles.ts +51 -0
- package/pages/30.guides/70.assets/components/IconItem.tsx +35 -0
- package/pages/30.guides/70.assets/components/IconList.styles.ts +9 -0
- package/pages/30.guides/70.assets/components/IconList.tsx +26 -0
- package/pages/30.guides/70.assets/components/IconSearch.styles.ts +23 -0
- package/pages/30.guides/70.assets/components/IconSearch.tsx +19 -0
- package/pages/30.guides/70.assets/components/IconSearchResults.styles.ts +7 -0
- package/pages/30.guides/70.assets/components/IconSearchResults.tsx +37 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/IconSearchProvider.tsx +37 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/IconsContext.ts +36 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/useIconSearchContext.ts +5 -0
- package/pages/30.guides/70.assets/components/IllustrationsList.tsx +133 -0
- package/pages/30.guides/70.assets/components/ThemeOptionsItem.tsx +49 -0
- package/pages/30.guides/70.assets/components/ThemeOptionsList.tsx +61 -0
- package/pages/30.guides/70.assets/constants/icon-imports.ts +583 -0
- package/pages/30.guides/70.assets/functions/import-svg-file-name.tsx +8 -0
- package/pages/30.guides/70.assets/styles.css +35 -0
- package/pages/30.guides/90.migrations/2025-q4-ds-cleanup.mdx +1295 -0
- package/pages/50.utilities/getTokenVar.mdx +19 -0
- package/pages/50.utilities/gradientBorders.mdx +87 -0
- package/pages/50.utilities/usePortalElement.mdx +26 -0
- package/pages/hat.svg +3 -0
- package/pages/playground.stories.tsx +26 -0
- package/pages/welcome.mdx +35 -0
- package/pages/zeroheight.mdx +53 -0
- package/public/assets/avatar-1.png +0 -0
- package/public/assets/avatar-2.png +0 -0
- package/public/assets/avatar-3.png +0 -0
- package/public/assets/avatar-4.png +0 -0
- package/public/assets/avatar-5.png +0 -0
- package/public/assets/logo.svg +1 -0
- package/public/assets/path-preply-org.jpg +0 -0
- package/public/assets/path.png +0 -0
- package/root.html +13 -0
- package/tsconfig.json +11 -1
- package/vitest.config.mts +5 -3
- package/config/packages.js +0 -21
- package/config/utils/statics.js +0 -30
- package/config/vitest.setup.ts +0 -9
- package/dist/assets/00.LayoutFlex.stories-DER40PUP.js +0 -85
- package/dist/assets/00.using-responsive-props-Dtv6-YXW.js +0 -18
- package/dist/assets/01.semantic-tokens-DnB7r57n.js +0 -2
- package/dist/assets/10.Combinations.stories-B7f7hRFA.js +0 -128
- package/dist/assets/30.icons.explorer-Dj-ys2GU.js +0 -73
- package/dist/assets/40.illustrations.explorer-Coq1W0EG.js +0 -21
- package/dist/assets/Accordion-iUMOrUCV.js +0 -23
- package/dist/assets/AlertDialog.stories-Dt0cfcEo.js +0 -243
- package/dist/assets/Avatar-NdNFhLYi.js +0 -6
- package/dist/assets/Avatar.stories-DYqwXUUw.js +0 -42
- package/dist/assets/AvatarWithStatus.stories-Bhrj0cSz.js +0 -41
- package/dist/assets/Badge-DWapjrJk.css +0 -1
- package/dist/assets/Badge.stories-DR_x-i6O.js +0 -85
- package/dist/assets/Box.stories-DieBkr98.js +0 -44
- package/dist/assets/BubbleCounter.stories-CCKFDvHr.js +0 -242
- package/dist/assets/Button-B5i7cA94.js +0 -1
- package/dist/assets/Button-C-6rDSzI.js +0 -20
- package/dist/assets/ButtonBase-h431KMrY.js +0 -8
- package/dist/assets/Checkbox-BnqXU33n.js +0 -10
- package/dist/assets/Checkbox.tests.stories-CKbpVER5.js +0 -64
- package/dist/assets/Chips.stories-kLSnMqrz.js +0 -146
- package/dist/assets/Color-YHDXOIA2-BWptXrTc.js +0 -1
- package/dist/assets/ComposingPopovers.stories--SKHALGr.js +0 -49
- package/dist/assets/CountryFlag-DuiC2miK.js +0 -49
- package/dist/assets/CountryFlag.test.stories-BoCBFg0i.js +0 -27
- package/dist/assets/Dialog.stories-RQp6xIqU.js +0 -379
- package/dist/assets/DismissibleChips-BGcUuQYK.js +0 -1
- package/dist/assets/Divider-BPgGsji3.js +0 -1
- package/dist/assets/Divider.stories-D0XhMPpe.js +0 -9
- package/dist/assets/DocsRenderer-CFRXHY34-7_I-DC5T.js +0 -2
- package/dist/assets/DropdownMenu-PLTFFi-U.js +0 -1229
- package/dist/assets/FieldButton-DAY3HLuQ.js +0 -1
- package/dist/assets/FieldButton.stories-DApRDUo4.js +0 -1
- package/dist/assets/FormControl-BIPOTQBb.js +0 -7
- package/dist/assets/FormControl.stories-Ybw0qxva.js +0 -67
- package/dist/assets/Heading-CzIRSKAr.js +0 -1
- package/dist/assets/Heading.stories-B0-2LbXt.js +0 -67
- package/dist/assets/Icon-BsfKiFZj.js +0 -8
- package/dist/assets/Icon-RSC-4fhV_e9B.js +0 -6
- package/dist/assets/IconButton-BgdrD9k8.js +0 -8
- package/dist/assets/Input-CfV08vH7.js +0 -48
- package/dist/assets/InputContainer-Cnv--ROK.js +0 -2
- package/dist/assets/IntegrationWithReactHookForm.stories-BgtVrzFb.js +0 -460
- package/dist/assets/IntlFormattedCurrency.stories-BMYzNxPt.js +0 -1
- package/dist/assets/IntlFormattedDateTime.stories-ZBusegeN.js +0 -1
- package/dist/assets/LayoutFlex-B05EaYB1.css +0 -1
- package/dist/assets/LayoutFlex-BkczeydK.js +0 -1
- package/dist/assets/LayoutFlex-DF8MvGnJ.js +0 -1
- package/dist/assets/LayoutFlexItem-XGd2QoPI.js +0 -1
- package/dist/assets/LayoutGrid-B5JJKgNY.js +0 -1
- package/dist/assets/LayoutGrid-CcWPCxyF.js +0 -1
- package/dist/assets/LayoutGrid.stories-CLDor39v.js +0 -88
- package/dist/assets/LayoutGridItem-BLoIIsgH.js +0 -1
- package/dist/assets/Link-CjAvDgdX.js +0 -5
- package/dist/assets/Loader.stories-CgVn9xQk.js +0 -37
- package/dist/assets/MultiSelectChips-9U0Tnh2Z.js +0 -2
- package/dist/assets/NumberField-CmClnfq6.js +0 -6
- package/dist/assets/NumberField.stories-3yRHDVS1.js +0 -254
- package/dist/assets/ObserveIntersection-tF7V09tr.js +0 -8
- package/dist/assets/ObserveIntersection.stories-CU9weI-s.js +0 -27
- package/dist/assets/OnboardingTooltip-DVeLAHtQ.js +0 -16
- package/dist/assets/OnboardingTooltip.tests.stories-O2UC2o4R.js +0 -79
- package/dist/assets/OnboardingTour-D3xEUgOf.js +0 -4
- package/dist/assets/OnboardingTour.stories-CBnSnEFN.js +0 -46
- package/dist/assets/PasswordField-DAL68lC4.js +0 -6
- package/dist/assets/PasswordField.stories-DYI1gVQx.js +0 -228
- package/dist/assets/PortalElementProvider-BAqvxZzH.js +0 -1
- package/dist/assets/PreplyLogo.stories-DP9KwK_Z.js +0 -95
- package/dist/assets/ProgressBar.stories-DZGEpHCd.js +0 -44
- package/dist/assets/ProgressSteps-BfCnfM68.js +0 -2
- package/dist/assets/ProgressSteps.stories--Zns7FpA.js +0 -31
- package/dist/assets/PromoDialog-oLEsdGtd.js +0 -3
- package/dist/assets/RangeSlider-BKOYT1ZU.js +0 -4
- package/dist/assets/Rating.stories-CC-5R6ut.js +0 -116
- package/dist/assets/RootProvider-CyXG17jf.js +0 -1
- package/dist/assets/SelectField-ByfZzt_b.js +0 -53
- package/dist/assets/SelectField.stories-IaZzYevq.js +0 -243
- package/dist/assets/ShowOnIntersection.stories-C2m-k9HC.js +0 -17
- package/dist/assets/SingleSelectChips-D7f85tAs.js +0 -2
- package/dist/assets/Slider-GGejckz6.js +0 -2
- package/dist/assets/Slider.stories-DSglTZg5.js +0 -69
- package/dist/assets/Spinner-qiZily8k.js +0 -1
- package/dist/assets/Steps-BnIR8N56.js +0 -26
- package/dist/assets/StorybookGlobalStyle-CtZU2X7e.js +0 -42
- package/dist/assets/Switch-B-jGiz3C.js +0 -12
- package/dist/assets/Text-DVl1HBkZ.js +0 -1
- package/dist/assets/Text.stories-CHcPPDZB.js +0 -58
- package/dist/assets/TextField-BRDwFAhX.js +0 -6
- package/dist/assets/TextField.stories-Psl8ijNV.js +0 -253
- package/dist/assets/TextHighlighted.stories-CTQM4A4u.js +0 -32
- package/dist/assets/TextInline.stories-TEw3tSim.js +0 -50
- package/dist/assets/TextareaField-BUSqPXn3.js +0 -53
- package/dist/assets/Toast-Bce4LWtf.css +0 -1
- package/dist/assets/Toast.stories-Den6Rcqh.js +0 -101
- package/dist/assets/TokyoUIAttach-BWl7Jkq1.js +0 -1
- package/dist/assets/TokyoUIAvailability7LateNight-TgMFD5Or.js +0 -1
- package/dist/assets/TokyoUICheck-BMIsD36S.js +0 -1
- package/dist/assets/TokyoUIChevronDown-CEw5hWWz.js +0 -1
- package/dist/assets/TokyoUIClose-thK8sk63.js +0 -1
- package/dist/assets/TokyoUIEmojiFrowning-DwuiVRut.js +0 -1
- package/dist/assets/TokyoUIEye-CteyS9_g.js +0 -1
- package/dist/assets/TokyoUIFav-DOVerCtW.js +0 -1
- package/dist/assets/TokyoUIInfo-DbkQBubr.js +0 -1
- package/dist/assets/TokyoUILanguage-CLpo5Vdq.js +0 -1
- package/dist/assets/TokyoUILibraryExplore-B9OQyi-V.js +0 -1
- package/dist/assets/TokyoUILock-CUE2UpP8.js +0 -1
- package/dist/assets/TokyoUIMessages-BShhOmUG.js +0 -1
- package/dist/assets/TokyoUIMinus-RacYe9uc.js +0 -1
- package/dist/assets/TokyoUINotebook-kt8pWj_a.js +0 -1
- package/dist/assets/TokyoUINotesWithPad-B-o4vu0Y.js +0 -1
- package/dist/assets/TokyoUIPhone-CvuBM6jb.js +0 -1
- package/dist/assets/TokyoUISettings-NNMqOtUc.js +0 -1
- package/dist/assets/TokyoUIStarFilled-CVOoYvsY.js +0 -1
- package/dist/assets/TokyoUITag-CS4uarg6.js +0 -1
- package/dist/assets/TokyoUIUpload-Bf0gWv4M.js +0 -1
- package/dist/assets/TokyoUIUser-Cvenl_VS.js +0 -1
- package/dist/assets/Tooltip-_f_f-kTL.js +0 -9
- package/dist/assets/Tooltip.stories-C2Yz1gLt.js +0 -93
- package/dist/assets/VisuallyHidden-CZd13GOS.js +0 -1
- package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
- package/dist/assets/align-self-Cj4aclWl.js +0 -1
- package/dist/assets/changelog-Caynf8sn.js +0 -2325
- package/dist/assets/chunk-XP5HYGXS-BpfKkqn7.js +0 -1
- package/dist/assets/classNames-9hsFPPZv.js +0 -1
- package/dist/assets/client-CYxxc9KC.js +0 -1
- package/dist/assets/constants-DTpaCXm6.js +0 -1
- package/dist/assets/constants-DVSid1Xr.js +0 -48
- package/dist/assets/createRequiredContext-DPmvfWRz.js +0 -241
- package/dist/assets/defaults-_YAxqn11.js +0 -1
- package/dist/assets/entry-preview-B8S6AF6S.js +0 -2
- package/dist/assets/entry-preview-docs-BuAKzHmI.js +0 -46
- package/dist/assets/getTokenVar-4Jlty0xz.js +0 -1
- package/dist/assets/getTokenVar-Ik0AWZ4t.js +0 -11
- package/dist/assets/hoist-non-react-statics.cjs-C-Qo8PK8.js +0 -8
- package/dist/assets/hover-CquEGcLG.js +0 -13
- package/dist/assets/hover-DSaWqp3c.js +0 -14
- package/dist/assets/hover-ZyQgH17L.js +0 -16
- package/dist/assets/iframe-C3SpczPa.js +0 -211
- package/dist/assets/index--TGv0Gnn.js +0 -131
- package/dist/assets/index-2TVOn9du.js +0 -1
- package/dist/assets/index-B-lxVbXh.js +0 -1
- package/dist/assets/index-BN6VMYqa.js +0 -1
- package/dist/assets/index-BPCsOyHr.js +0 -24
- package/dist/assets/index-BV2iXjxm.js +0 -1
- package/dist/assets/index-BqT8peiM.js +0 -1
- package/dist/assets/index-C5uDgNEj.js +0 -12
- package/dist/assets/index-CA5R8PN9.js +0 -8
- package/dist/assets/index-CRQycg-8.js +0 -575
- package/dist/assets/index-CUHsGBvM.js +0 -41
- package/dist/assets/index-Cb9e4tly.js +0 -1
- package/dist/assets/index-Cc-bXjHe.js +0 -1
- package/dist/assets/index-ChsGqxH_.js +0 -9
- package/dist/assets/index-DR63UjCN.js +0 -1
- package/dist/assets/index-DWSmmBvQ.js +0 -12
- package/dist/assets/index-Dk_MCKuE.js +0 -240
- package/dist/assets/index-DrFu-skq.js +0 -6
- package/dist/assets/index-qlqSh81O.js +0 -1
- package/dist/assets/index-s7KTOhR7.js +0 -1
- package/dist/assets/jsx-runtime-BTJTZTIL.js +0 -9
- package/dist/assets/layout-relative-Rn-Bns4t.js +0 -1
- package/dist/assets/layout-relative.module-1z75aSwo-rvXP8TMg.js +0 -1
- package/dist/assets/layout-relative.module-FOVgic7W.js +0 -1
- package/dist/assets/matchers-7Z3WT2CE-T3xScrR7.js +0 -14
- package/dist/assets/message-CSdaKtIj.js +0 -1
- package/dist/assets/playground.stories-_pKinBuZ.js +0 -6
- package/dist/assets/preview-B2Uoj8bD.js +0 -2
- package/dist/assets/preview-B8lJiyuQ.js +0 -34
- package/dist/assets/preview-BBWR9nbA.js +0 -1
- package/dist/assets/preview-BO3Eq4YI.js +0 -11
- package/dist/assets/preview-BTnW7Hye.js +0 -1
- package/dist/assets/preview-BWzBA1C2.js +0 -396
- package/dist/assets/preview-CtMGbgR3.js +0 -1
- package/dist/assets/preview-CvbIS5ZJ.js +0 -1
- package/dist/assets/preview-CzAPySEb.css +0 -1
- package/dist/assets/preview-DGUiP6tS.js +0 -7
- package/dist/assets/preview-DHQbi4pV.js +0 -1
- package/dist/assets/preview-RZiq1oHg.js +0 -2
- package/dist/assets/react-18-vqCHxTgY.js +0 -1
- package/dist/assets/render-icon-BT0Aq7PA.js +0 -9
- package/dist/assets/styled-components.browser.esm-COuAnjOv.js +0 -2
- package/dist/assets/test-utils-Cec0Zua5.js +0 -9
- package/dist/assets/text-accent-VILyY3zt.js +0 -1
- package/dist/assets/text-centered-BFb64PJw.js +0 -1
- package/dist/assets/text-centered-DRiH4EXX.js +0 -1
- package/dist/assets/tokens-BYLcI6Lk.js +0 -1
- package/dist/assets/tokens-CNkSTEMS.js +0 -15
- package/dist/assets/tslib.es6-C7pnyCjR.js +0 -1
- package/dist/assets/useControllableState-DKskwY-e.js +0 -1
- package/dist/assets/useHostname-PsilflFC.js +0 -1
- package/dist/assets/useMergeRefs-D_RfOOSs.js +0 -1
- package/dist/assets/useMergeRefs-SFH7Mw4x.js +0 -1
- package/dist/assets/useOpenInteractionType-BkuUI9ak.js +0 -15
- package/dist/assets/usePortalElement-CZ5jtEVS.js +0 -19
- package/dist/assets/useTheme-zzbPBRtu.js +0 -1
- package/dist/assets/useToken-Cfvk3vM1.js +0 -1
- package/dist/assets/v4-CtRu48qb.js +0 -1
- package/dist/sb-addons/actions-2/manager-bundle.js +0 -3
- package/dist/sb-addons/config-13/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-actions-5/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-backgrounds-7/manager-bundle.js +0 -12
- package/dist/sb-addons/essentials-controls-4/manager-bundle.js +0 -402
- package/dist/sb-addons/essentials-docs-6/manager-bundle.js +0 -242
- package/dist/sb-addons/essentials-measure-10/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-outline-11/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-toolbars-9/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-viewport-8/manager-bundle.js +0 -3
- package/dist/sb-addons/links-3/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-experimental-addon-test-12/manager-bundle.js +0 -223
- package/dist/sb-manager/globals-module-info.js +0 -1052
- package/docs/root.html +0 -13
- package/scripts/copy-statics.js +0 -12
- package/scripts/publish-changelog.js +0 -39
- /package/{config → .storybook}/decorators/preventIframeFromScrollingParent.module.css +0 -0
- /package/{config → .storybook}/decorators/withRootProvider.tsx +0 -0
- /package/{config → .storybook}/manager-head.html +0 -0
- /package/dist/assets/{index-D1siTi3u.css → Dialog-D1siTi3u.css} +0 -0
- /package/{docs/static → dist/assets}/logo.svg +0 -0
- /package/{docs/static → dist/assets}/path-preply-org.jpg +0 -0
- /package/{docs/static → dist/assets}/path.png +0 -0
- /package/{docs/static → public}/favicon.svg +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: 64px;
|
|
8
|
+
padding-top: ${({ value }) => value};
|
|
9
|
+
background: #666;
|
|
10
|
+
|
|
11
|
+
span {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border-top-style: solid;
|
|
15
|
+
border-color: white;
|
|
16
|
+
border-width: 2px;
|
|
17
|
+
height: 28px;
|
|
18
|
+
background: #999;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const RendererBorderWidth: FC<RendererProps> = ({ value }) => {
|
|
23
|
+
return (
|
|
24
|
+
<Div value={value}>
|
|
25
|
+
<span />
|
|
26
|
+
</Div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: 64px;
|
|
8
|
+
height: 64px;
|
|
9
|
+
box-shadow: ${({ value }) => value};
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const RendererBoxShadow: FC<RendererProps> = ({ value }) => {
|
|
13
|
+
return <Div value={value} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { onHover } from '@preply/ds-web-core';
|
|
2
|
+
import React, { FC } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import { RendererProps } from './RendererProps';
|
|
6
|
+
|
|
7
|
+
const Div = styled.div<RendererProps>`
|
|
8
|
+
background: #999;
|
|
9
|
+
font-size: 16px;
|
|
10
|
+
line-height: 32px;
|
|
11
|
+
text-align: center;
|
|
12
|
+
width: 200px;
|
|
13
|
+
color: white;
|
|
14
|
+
|
|
15
|
+
${onHover(`
|
|
16
|
+
filter: brightness(${({ value }) => value});
|
|
17
|
+
`)}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const RendererBrightness: FC<RendererProps> = ({ value }) => {
|
|
21
|
+
return <Div value={value}>hover me</Div>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 64px;
|
|
11
|
+
height: 64px;
|
|
12
|
+
font-size: 20px;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
color: ${({ value }) => value};
|
|
15
|
+
background: ${({ value }) => (value === 'white' ? 'black' : 'white')};
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const RendererFgColor: FC<RendererProps> = ({ value }) => {
|
|
19
|
+
return <Div value={value}>A</Div>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: ${({ value }) => value};
|
|
8
|
+
font-size: 20px;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
|
|
11
|
+
p:first-child {
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
p:last-child {
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const RendererFontFamily: FC<RendererProps> = ({ value }) => {
|
|
21
|
+
return (
|
|
22
|
+
<Div value={value}>
|
|
23
|
+
<p>Lorem ipsum dolor sit amet (700)</p>
|
|
24
|
+
<p>Lorem ipsum dolor sit amet (500)</p>
|
|
25
|
+
<p>Lorem ipsum dolor sit amet (400)</p>
|
|
26
|
+
</Div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
font-size: ${({ value }) => value};
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const RendererFontSize: FC<RendererProps> = ({ value }) => {
|
|
15
|
+
return <Div value={value}>Lorem ipsum dolor sit amet</Div>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
font-style: ${({ value }) => value};
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const RendererFontStyle: FC<RendererProps> = ({ value }) => {
|
|
16
|
+
return <Div value={value}>Lorem ipsum dolor sit amet.</Div>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
font-size: 20px;
|
|
12
|
+
font-weight: ${({ value }) => value};
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const RendererFontWeight: FC<RendererProps> = ({ value }) => {
|
|
16
|
+
return <Div value={value}>Lorem ipsum dolor sit amet</Div>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
height: ${({ value }) => value};
|
|
8
|
+
width: 40px;
|
|
9
|
+
background-color: black;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const RendererHeight: FC<RendererProps> = ({ value }) => {
|
|
13
|
+
return <Div value={value} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
letter-spacing: ${({ value }) => value};
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const RendererLetterSpacing: FC<RendererProps> = ({ value }) => {
|
|
16
|
+
return <Div value={value}>Lorem ipsum dolor sit amet.</Div>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
line-height: ${({ value }) => value};
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const RendererLineHeightPixels: FC<RendererProps> = ({ value }) => {
|
|
16
|
+
return (
|
|
17
|
+
<Div value={value}>
|
|
18
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nulla, suscipit id
|
|
19
|
+
purus quis, facilisis tempus tortor. Praesent felis quam, tincidunt vitae libero ut,
|
|
20
|
+
bibendum condimentum nunc.
|
|
21
|
+
</Div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: PreplyInter;
|
|
8
|
+
@supports (font-variation-settings: normal) {
|
|
9
|
+
font-family: PreplyInterV;
|
|
10
|
+
}
|
|
11
|
+
line-height: ${({ value }) => value};
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const RendererLineHeightRatio: FC<RendererProps> = ({ value }) => {
|
|
16
|
+
return (
|
|
17
|
+
<Div value={value}>
|
|
18
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec massa nulla, suscipit id
|
|
19
|
+
purus quis, facilisis tempus tortor. Praesent felis quam, tincidunt vitae libero ut,
|
|
20
|
+
bibendum condimentum nunc.
|
|
21
|
+
</Div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
background: white;
|
|
8
|
+
width: 48px;
|
|
9
|
+
height: 48px
|
|
10
|
+
padding: 8px 0 0 8px;
|
|
11
|
+
background: ${({ value }) => (value === 'white' ? 'black' : 'white')};
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
span {
|
|
15
|
+
display: block;
|
|
16
|
+
width: 40px;
|
|
17
|
+
height: 40px;
|
|
18
|
+
border-width: 2px;
|
|
19
|
+
border-style: solid;
|
|
20
|
+
border-top-left-radius: 16px;
|
|
21
|
+
border-color: ${({ value }) => value};
|
|
22
|
+
border-right: none;
|
|
23
|
+
border-bottom: none;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const RendererOutlineColor: FC<RendererProps> = ({ value }) => {
|
|
28
|
+
return (
|
|
29
|
+
<Div value={value}>
|
|
30
|
+
<span />
|
|
31
|
+
</Div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: 64px;
|
|
8
|
+
padding-top: 2px;
|
|
9
|
+
background: #666;
|
|
10
|
+
|
|
11
|
+
span {
|
|
12
|
+
height: 2px;
|
|
13
|
+
display: block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
border-top-style: solid;
|
|
16
|
+
border-color: white;
|
|
17
|
+
border-width: ${({ value }) => value};
|
|
18
|
+
height: 28px;
|
|
19
|
+
background: #999;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export const RendererOutlineOffset: FC<RendererProps> = ({ value }) => {
|
|
24
|
+
return (
|
|
25
|
+
<Div value={value}>
|
|
26
|
+
<span />
|
|
27
|
+
</Div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: 64px;
|
|
8
|
+
padding-top: ${({ value }) => value};
|
|
9
|
+
background: #666;
|
|
10
|
+
|
|
11
|
+
span {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border-top-style: solid;
|
|
15
|
+
border-color: white;
|
|
16
|
+
border-width: 2px;
|
|
17
|
+
height: 28px;
|
|
18
|
+
background: #999;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const RendererOutlineWidth: FC<RendererProps> = ({ value }) => {
|
|
23
|
+
return (
|
|
24
|
+
<Div value={value}>
|
|
25
|
+
<span />
|
|
26
|
+
</Div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: 64px;
|
|
8
|
+
height: 64px;
|
|
9
|
+
background-color: ${({ value }) => value};
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const RendererPaletteItem: FC<RendererProps> = ({ value }) => {
|
|
13
|
+
return <Div value={value} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: ${({ value }) => value};
|
|
8
|
+
height: ${({ value }) => value};
|
|
9
|
+
background-color: black;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const RendererSize: FC<RendererProps> = ({ value }) => {
|
|
13
|
+
return <Div value={value} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
width: ${({ value }) => value};
|
|
8
|
+
height: 40px;
|
|
9
|
+
background-color: black;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const RendererSpace: FC<RendererProps> = ({ value }) => {
|
|
13
|
+
return <Div value={value} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps & { invert: boolean }>`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 64px;
|
|
11
|
+
height: 64px;
|
|
12
|
+
font-size: 20px;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
color: ${({ invert }) => (invert ? 'white' : 'black')};
|
|
15
|
+
background-color: ${({ value }) => value};
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const RendererSwatch: FC<RendererProps> = ({ value, name }) => {
|
|
19
|
+
const swatch = Number(name?.split('.').pop());
|
|
20
|
+
return (
|
|
21
|
+
<Div value={value} invert={swatch >= 300}>
|
|
22
|
+
A
|
|
23
|
+
</Div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
text-decoration: ${({ value }) => value};
|
|
8
|
+
font-size: 20px;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
|
|
11
|
+
p:first-child {
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
p:last-child {
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const RendererTextDecoration: FC<RendererProps> = ({ value }) => {
|
|
21
|
+
return (
|
|
22
|
+
<Div value={value}>
|
|
23
|
+
<p>Lorem ipsum dolor sit amet</p>
|
|
24
|
+
</Div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RendererProps } from './RendererProps';
|
|
5
|
+
|
|
6
|
+
const Div = styled.div<RendererProps>`
|
|
7
|
+
font-family: ${({ value }) => value};
|
|
8
|
+
font-size: 20px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
|
|
11
|
+
p:first-child {
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
p:last-child {
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const RendererTypeface: FC<RendererProps> = ({ value }) => {
|
|
21
|
+
return (
|
|
22
|
+
<Div value={value}>
|
|
23
|
+
<p>Lorem ipsum dolor sit amet (400)</p>
|
|
24
|
+
<p>Lorem ipsum dolor sit amet (500)</p>
|
|
25
|
+
<p>Lorem ipsum dolor sit amet (700)</p>
|
|
26
|
+
</Div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const TokenSearchStatic = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
margin-top: -20px;
|
|
6
|
+
padding-bottom: 200px;
|
|
7
|
+
h1 {
|
|
8
|
+
margin: 0;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const SearchForm = styled.div`
|
|
13
|
+
position: fixed;
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
z-index: 9999;
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
padding: 20px 20px 24px;
|
|
20
|
+
gap: 16px;
|
|
21
|
+
background: white;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const SearchFormContent = styled.div`
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 1000px;
|
|
27
|
+
margin: 0 auto;
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
type SearchProps = {
|
|
31
|
+
terms?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const SearchInput = styled.input<SearchProps>`
|
|
35
|
+
flex: 1;
|
|
36
|
+
padding: 8px;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
height: 32px;
|
|
39
|
+
border-style: solid;
|
|
40
|
+
border-width: 1px;
|
|
41
|
+
border-color: ${({ terms }) => (terms ? `orange;` : '#ccc')};
|
|
42
|
+
`;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ColorSchemeName } from '@preply/ds-core';
|
|
2
|
+
import { useSetTheme, useTheme, useThemes } from '@preply/ds-web-core';
|
|
3
|
+
import { LayoutFlex } from '@preply/ds-web-lib';
|
|
4
|
+
import React, { FC, useCallback, useEffect, useMemo } from 'react';
|
|
5
|
+
|
|
6
|
+
import { useTokenSearchContext } from '../providers/useTokenSearchContext';
|
|
7
|
+
|
|
8
|
+
import { SchemeSwitcher } from './SchemeSwitcher';
|
|
9
|
+
import { SearchTerms } from './SearchTerms';
|
|
10
|
+
import {
|
|
11
|
+
SearchForm,
|
|
12
|
+
SearchFormContent,
|
|
13
|
+
SearchInput,
|
|
14
|
+
TokenSearchStatic,
|
|
15
|
+
} from './TokenSearch.styles';
|
|
16
|
+
|
|
17
|
+
export const TokenSearch: FC = () => {
|
|
18
|
+
const { theme } = useTheme();
|
|
19
|
+
const { themes } = useThemes();
|
|
20
|
+
const { setTheme } = useSetTheme();
|
|
21
|
+
const { colorScheme, terms, setColorScheme, setSearchTerms } = useTokenSearchContext();
|
|
22
|
+
|
|
23
|
+
const url = useMemo(() => new URL(window.top?.location.href || ''), []);
|
|
24
|
+
const params = url.searchParams;
|
|
25
|
+
const urlTheme = params.get('theme');
|
|
26
|
+
const newTheme = urlTheme && themes?.find(t => t.name === urlTheme);
|
|
27
|
+
const urlColorScheme = params.get('colorScheme');
|
|
28
|
+
const urlTerms = params.get('terms');
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (urlTheme) {
|
|
32
|
+
if (urlTheme !== theme.name && setTheme && newTheme) {
|
|
33
|
+
setTheme(newTheme);
|
|
34
|
+
}
|
|
35
|
+
if (urlTheme && urlColorScheme !== colorScheme) {
|
|
36
|
+
setColorScheme(urlColorScheme as ColorSchemeName);
|
|
37
|
+
}
|
|
38
|
+
setSearchTerms(urlTerms || '');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
params.delete('theme');
|
|
42
|
+
params.delete('colorScheme');
|
|
43
|
+
params.delete('terms');
|
|
44
|
+
window.top?.history.replaceState({}, '', url);
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
+
}, []);
|
|
47
|
+
|
|
48
|
+
const handleSearchTermsChange = useCallback(
|
|
49
|
+
(value: string) => setSearchTerms(value),
|
|
50
|
+
[setSearchTerms],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<TokenSearchStatic>
|
|
55
|
+
<SearchForm>
|
|
56
|
+
<SearchFormContent>
|
|
57
|
+
<LayoutFlex gap="16" direction="column">
|
|
58
|
+
<LayoutFlex justifyContent="space-between" alignItems="start">
|
|
59
|
+
<h1 id="tokens" className="sbdocs sbdocs-h1 css-1j28tt">
|
|
60
|
+
Token Explorer
|
|
61
|
+
</h1>
|
|
62
|
+
</LayoutFlex>
|
|
63
|
+
<LayoutFlex gap="8" nowrap>
|
|
64
|
+
<SearchInput
|
|
65
|
+
terms={terms}
|
|
66
|
+
type="text"
|
|
67
|
+
placeholder="examples: teal, 300, action, primary, xs, --4adef, #00, 12px"
|
|
68
|
+
onChange={ev => handleSearchTermsChange(ev.target.value)}
|
|
69
|
+
value={terms}
|
|
70
|
+
/>
|
|
71
|
+
<SchemeSwitcher />
|
|
72
|
+
</LayoutFlex>
|
|
73
|
+
<SearchTerms />
|
|
74
|
+
</LayoutFlex>
|
|
75
|
+
</SearchFormContent>
|
|
76
|
+
</SearchForm>
|
|
77
|
+
</TokenSearchStatic>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const Heading = styled.h3`
|
|
4
|
+
margin: 0;
|
|
5
|
+
font-size: 24px;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
export const Alternatives = styled.h3`
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const Note = styled.h3`
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
`;
|