@xyd-js/components 0.1.0-xyd.1 → 0.1.0-xyd.11
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/CHANGELOG.md +61 -0
- package/LICENSE +21 -0
- package/dist/CTABanner-BLDHbq5h.js +2 -0
- package/dist/CTABanner-BLDHbq5h.js.map +1 -0
- package/dist/CTABanner-n3vc4xW5.js +2 -0
- package/dist/CTABanner-n3vc4xW5.js.map +1 -0
- package/dist/CodeSample-CVki5fdQ.js +2 -0
- package/dist/CodeSample-CVki5fdQ.js.map +1 -0
- package/dist/CodeSample-Dkob5gWa.js +2 -0
- package/dist/CodeSample-Dkob5gWa.js.map +1 -0
- package/dist/HomeView-DHdqouwJ.js +2 -0
- package/dist/HomeView-DHdqouwJ.js.map +1 -0
- package/dist/HomeView-TDx2tcP_.js +2 -0
- package/dist/HomeView-TDx2tcP_.js.map +1 -0
- package/dist/UnderlineNav-9lJPvnIp.js +2 -0
- package/dist/UnderlineNav-9lJPvnIp.js.map +1 -0
- package/dist/UnderlineNav-VqB7jDQD.js +2 -0
- package/dist/UnderlineNav-VqB7jDQD.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-C8nLsqZ7.js +2 -0
- package/dist/_rollupPluginBabelHelpers-C8nLsqZ7.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-CrdNG0jb.js +2 -0
- package/dist/_rollupPluginBabelHelpers-CrdNG0jb.js.map +1 -0
- package/dist/brand.d.ts +11 -10
- package/dist/brand.js +2 -1
- package/dist/brand.js.map +1 -0
- package/dist/coder/themes/cosmo-light.d.ts +5 -0
- package/dist/coder/themes/cosmo-light.js +2 -0
- package/dist/coder/themes/cosmo-light.js.map +1 -0
- package/dist/coder.d.ts +52 -3
- package/dist/coder.js +2 -1
- package/dist/coder.js.map +1 -0
- package/dist/content.d.ts +103 -37
- package/dist/content.js +2 -1
- package/dist/content.js.map +1 -0
- package/dist/index-TkBHKzGT.js +2 -0
- package/dist/index-TkBHKzGT.js.map +1 -0
- package/dist/index-YH6Q3iH2.js +2 -0
- package/dist/index-YH6Q3iH2.js.map +1 -0
- package/dist/index.css +217 -135
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts.d.ts +12 -1
- package/dist/layouts.js +2 -1
- package/dist/layouts.js.map +1 -0
- package/dist/pages.d.ts +2 -1
- package/dist/pages.js +2 -1
- package/dist/pages.js.map +1 -0
- package/dist/{tslib.es6-B1gizQU6.js → tslib.es6-BI9zka_a.js} +1 -0
- package/dist/tslib.es6-BI9zka_a.js.map +1 -0
- package/dist/{tslib.es6-CMPV4d4T.js → tslib.es6-sxmRJynD.js} +1 -0
- package/dist/tslib.es6-sxmRJynD.js.map +1 -0
- package/dist/views.d.ts +2 -1
- package/dist/views.js +2 -1
- package/dist/views.js.map +1 -0
- package/dist/writer.d.ts +62 -8
- package/dist/writer.js +2 -1
- package/dist/writer.js.map +1 -0
- package/package.json +21 -14
- package/rollup.config.js +53 -8
- package/src/brand/Button/Button.styles.tsx +31 -0
- package/src/brand/Button/Button.tsx +3 -35
- package/src/brand/CTABanner/CTABanner.styles.tsx +82 -0
- package/src/brand/CTABanner/CTABanner.tsx +34 -112
- package/src/brand/Footer/Footer.styles.tsx +21 -0
- package/src/brand/Footer/Footer.tsx +4 -24
- package/src/brand/TODO.md +1 -0
- package/src/coder/Code/Code.styles.tsx +47 -0
- package/src/coder/Code/Code.tsx +76 -0
- package/src/coder/Code/CodeLoader.tsx +10 -0
- package/src/coder/Code/annotations.tsx +31 -0
- package/src/coder/Code/highlight.ts +170 -0
- package/src/coder/Code/index.ts +15 -0
- package/src/coder/CodeCopy/CodeCopy.styles.tsx +19 -0
- package/src/coder/CodeCopy/CodeCopy.tsx +2 -4
- package/src/coder/CodeSample/CodeSample.tsx +42 -133
- package/src/coder/CodeSample/index.ts +0 -1
- package/src/coder/CodeSample/withLocalStored.tsx +1 -1
- package/src/coder/CodeTabs/CodeTabs.styles.tsx +104 -0
- package/src/coder/CodeTabs/CodeTabs.tsx +95 -0
- package/src/coder/CodeTabs/index.ts +6 -0
- package/src/coder/CodeTheme/CodeTheme.tsx +79 -0
- package/src/coder/CodeTheme/index.ts +8 -0
- package/src/coder/hooks/highlight.ts +182 -0
- package/src/coder/index.ts +31 -1
- package/src/coder/{CodeSample/default-theme.ts → themes/cosmo-light.ts} +3 -2
- package/src/content/Anchor/Anchor.styles.tsx +5 -0
- package/src/content/Anchor/Anchor.tsx +4 -14
- package/src/content/Content/Content.styles.tsx +9 -0
- package/src/content/Content/Content.tsx +4 -11
- package/src/content/Content.tsx +48 -6
- package/src/content/Subtitle/Subtitle.styles.ts +8 -0
- package/src/content/Subtitle/Subtitle.tsx +2 -11
- package/src/layouts/Layout.styles.tsx +135 -131
- package/src/layouts/Layout.tsx +21 -23
- package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +341 -0
- package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +157 -0
- package/src/layouts/LayoutPrimary/index.ts +5 -0
- package/src/layouts/index.ts +7 -1
- package/src/pages/HomePage/HomePage.styles.tsx +16 -0
- package/src/pages/HomePage/HomePage.tsx +7 -21
- package/src/pages/TODO.md +1 -0
- package/src/pages/index.ts +1 -0
- package/src/ui/Loader/Loader.styles.tsx +54 -0
- package/src/ui/Loader/Loader.tsx +26 -0
- package/src/ui/TODO.md +2 -0
- package/src/ui/index.ts +1 -0
- package/src/utils/useStyle.ts +19 -0
- package/src/views/HomeView/HomeView.styles.tsx +37 -0
- package/src/views/HomeView/HomeView.tsx +5 -45
- package/src/views/TODO.md +1 -0
- package/src/views/index.ts +1 -0
- package/src/writer/Badge/Badge.styles.tsx +31 -26
- package/src/writer/Badge/Badge.tsx +42 -9
- package/src/writer/Blockquote/Blockquote.styles.tsx +6 -8
- package/src/writer/Blockquote/Blockquote.tsx +2 -2
- package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +27 -26
- package/src/writer/Breadcrumbs/Breadcrumbs.tsx +5 -5
- package/src/writer/Callout/Callout.styles.tsx +44 -48
- package/src/writer/Callout/Callout.tsx +5 -5
- package/src/writer/Code/Code.styles.tsx +11 -13
- package/src/writer/Code/Code.tsx +2 -2
- package/src/writer/Details/Details.styles.tsx +102 -74
- package/src/writer/Details/Details.tsx +46 -30
- package/src/writer/GuideCard/GuideCard.styles.tsx +116 -112
- package/src/writer/GuideCard/GuideCard.tsx +19 -19
- package/src/writer/Heading/Heading.styles.tsx +65 -61
- package/src/writer/Heading/Heading.tsx +11 -11
- package/src/writer/Hr/Hr.styles.tsx +3 -5
- package/src/writer/Hr/Hr.tsx +2 -2
- package/src/writer/Icon/index.tsx +243 -0
- package/src/writer/NavLinks/NavLinks.styles.ts +30 -30
- package/src/writer/NavLinks/NavLinks.tsx +6 -6
- package/src/writer/Pre/Pre.styles.tsx +8 -10
- package/src/writer/Pre/Pre.tsx +2 -2
- package/src/writer/Steps/Steps.styles.tsx +30 -31
- package/src/writer/Steps/Steps.tsx +3 -4
- package/src/writer/Table/Table.styles.tsx +32 -31
- package/src/writer/Table/Table.tsx +5 -5
- package/src/writer/Table/TableV2.styles.tsx +117 -0
- package/src/writer/Table/TableV2.tsx +83 -0
- package/src/writer/Table/index.ts +4 -0
- package/src/writer/Tabs/Tabs.styles.tsx +60 -63
- package/src/writer/Tabs/Tabs.tsx +11 -16
- package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +44 -42
- package/src/writer/UnderlineNav/UnderlineNav.tsx +5 -5
- package/tsconfig.json +2 -3
- package/dist/CTABanner-CYKba2Vn.js +0 -1
- package/dist/CTABanner-hV6NH0Xf.js +0 -1
- package/dist/CodeSample-D1QMQt89.js +0 -1
- package/dist/CodeSample-DLJNHIaK.js +0 -1
- package/dist/CodeSample-DZq0_qWL.js +0 -1
- package/dist/Footer-CkBDl828.js +0 -1
- package/dist/HomeView-CEgDQeAf.js +0 -1
- package/dist/UnderlineNav-BaOK-iez.js +0 -1
- package/dist/UnderlineNav-D5zXLK6j.js +0 -1
- package/dist/UnderlineNav-DGzjCvkM.js +0 -1
- package/dist/abap-DsN9RuMZ.js +0 -1
- package/dist/actionscript-3-B1SSyZyS.js +0 -1
- package/dist/ada-D_J1lW-E.js +0 -1
- package/dist/angular-html-CYREiUrW.js +0 -1
- package/dist/angular-ts-DcAOu8WU.js +0 -1
- package/dist/apache-CCuSaqCk.js +0 -1
- package/dist/apex-DblqgZJW.js +0 -1
- package/dist/apl-PFYbmQM7.js +0 -1
- package/dist/applescript-CxR8VFYt.js +0 -1
- package/dist/ara-DyvEMt1M.js +0 -1
- package/dist/asciidoc-CnwoPPuH.js +0 -1
- package/dist/asm-CjptKFp1.js +0 -1
- package/dist/astro-suE8bk8k.js +0 -1
- package/dist/awk-DCM8RPoH.js +0 -1
- package/dist/ballerina-Cj78GSWA.js +0 -1
- package/dist/bat-DOoDZywo.js +0 -1
- package/dist/beancount-t-WR86_8.js +0 -1
- package/dist/berry-B4bZSCCn.js +0 -1
- package/dist/bibtex-BrVhJY3k.js +0 -1
- package/dist/bicep-B9mKM727.js +0 -1
- package/dist/blade-C5Z797nx.js +0 -1
- package/dist/c-DAjGiO5B.js +0 -1
- package/dist/cadence-PrerV_VN.js +0 -1
- package/dist/clarity-BHTd5LJm.js +0 -1
- package/dist/clojure-CfEyl-7j.js +0 -1
- package/dist/cmake-CRA2Enzy.js +0 -1
- package/dist/cobol-BnLJxYQT.js +0 -1
- package/dist/codeowners-BvrirGey.js +0 -1
- package/dist/codeql-B2c2mBK0.js +0 -1
- package/dist/coffee-CG62yMWj.js +0 -1
- package/dist/common-lisp-CN6bltgb.js +0 -1
- package/dist/cpp-BbrQ837u.js +0 -1
- package/dist/crystal-rvb5jzSz.js +0 -1
- package/dist/csharp-CUz8u4K7.js +0 -1
- package/dist/css-JK7NOE59.js +0 -1
- package/dist/csv-CA_RykxK.js +0 -1
- package/dist/cue-AyD8vP8S.js +0 -1
- package/dist/cypher-eVjUZ0JC.js +0 -1
- package/dist/d-D1E5UK87.js +0 -1
- package/dist/dark-plus-C6xVaa39.js +0 -1
- package/dist/dart-DofOkkdM.js +0 -1
- package/dist/dax-DqGHRpF4.js +0 -1
- package/dist/desktop-j1oT-0Fo.js +0 -1
- package/dist/diff-ChebWHqI.js +0 -1
- package/dist/docker-BU6yAGy2.js +0 -1
- package/dist/dotenv-GyMvMNRw.js +0 -1
- package/dist/dracula-DUKRH7Zb.js +0 -1
- package/dist/dracula-soft-MlIR18G6.js +0 -1
- package/dist/dream-maker-BsQ1dbNp.js +0 -1
- package/dist/edge-F-AR7ZfW.js +0 -1
- package/dist/elixir-k4xxGl4V.js +0 -1
- package/dist/elm-CInOOHq9.js +0 -1
- package/dist/emacs-lisp-C6yIvom4.js +0 -1
- package/dist/erb-3pxr-NQS.js +0 -1
- package/dist/erlang-pmWC-Wee.js +0 -1
- package/dist/fennel-DViJm-jY.js +0 -1
- package/dist/fish-XcExlNEH.js +0 -1
- package/dist/fluent-DuJOAG6K.js +0 -1
- package/dist/fortran-fixed-form-Db5I_UFX.js +0 -1
- package/dist/fortran-free-form-B2xyqK-y.js +0 -1
- package/dist/fsharp-is-Hk3Eq.js +0 -1
- package/dist/gdresource-RuRLtBIa.js +0 -1
- package/dist/gdscript-pJ_75zwI.js +0 -1
- package/dist/gdshader-C5a9x3vh.js +0 -1
- package/dist/genie-BQ1oppDb.js +0 -1
- package/dist/gherkin-CuOELy7c.js +0 -1
- package/dist/git-commit-3zS8hqVZ.js +0 -1
- package/dist/git-rebase-DbS4r3GX.js +0 -1
- package/dist/github-dark-MxM60tcF.js +0 -1
- package/dist/github-dark-dimmed-DDWwGITy.js +0 -1
- package/dist/github-from-css-3tseHBGr.js +0 -1
- package/dist/github-light-pTwVS4k8.js +0 -1
- package/dist/gleam-DNxiWDAA.js +0 -1
- package/dist/glimmer-js-BGxcWjEE.js +0 -1
- package/dist/glimmer-ts-BB1An-Xq.js +0 -1
- package/dist/glsl-DaDHpxzv.js +0 -1
- package/dist/gnuplot-B1t-F_Gz.js +0 -1
- package/dist/go-BiVONvim.js +0 -1
- package/dist/graphql-LpWkIzuc.js +0 -1
- package/dist/groovy-DcxmRonw.js +0 -1
- package/dist/hack-BCsHcJ0e.js +0 -1
- package/dist/haml-CXlzR84c.js +0 -1
- package/dist/handlebars-DLTopqNS.js +0 -1
- package/dist/haskell-35U1u5gK.js +0 -1
- package/dist/haxe-ssN4Oy09.js +0 -1
- package/dist/hcl-kzI--7Cv.js +0 -1
- package/dist/hjson-pR2iiFsp.js +0 -1
- package/dist/hlsl-8PIy5U5-.js +0 -1
- package/dist/html-BEHbZ4zc.js +0 -1
- package/dist/html-derivative-K5xYNXck.js +0 -1
- package/dist/http-Cd2N6YgB.js +0 -1
- package/dist/hxml-BiAYlMbG.js +0 -1
- package/dist/hy-Cg5rcmur.js +0 -1
- package/dist/imba-DIe-G4Fn.js +0 -1
- package/dist/index-B7QE1KUr.js +0 -1
- package/dist/index-BE4Aq8NU.js +0 -1
- package/dist/index-CpFJxv5e.js +0 -1
- package/dist/index-DMAgLttD.js +0 -1
- package/dist/index-byGIVYaJ.js +0 -1
- package/dist/index-eU5so3Si.js +0 -1
- package/dist/ini-H0Ga-buI.js +0 -1
- package/dist/java-DoE_enjS.js +0 -1
- package/dist/javascript-__QKtyFe.js +0 -1
- package/dist/jinja-UYHlv864.js +0 -1
- package/dist/jison-B9nCySXt.js +0 -1
- package/dist/json-B7oi-vA0.js +0 -1
- package/dist/json5-BetPwqJO.js +0 -1
- package/dist/jsonc-pWWkBlCi.js +0 -1
- package/dist/jsonl-B6mt3pJZ.js +0 -1
- package/dist/jsonnet-CoMYTNCI.js +0 -1
- package/dist/jssm-Cid3TtQ5.js +0 -1
- package/dist/jsx-Ckobzlnq.js +0 -1
- package/dist/julia-C8xlDV3I.js +0 -1
- package/dist/kotlin-DvN1jcCb.js +0 -1
- package/dist/kusto-BCF_-dC3.js +0 -1
- package/dist/latex-DRFLltbj.js +0 -1
- package/dist/lean-DNZ3POMR.js +0 -1
- package/dist/less-XiEW6aqg.js +0 -1
- package/dist/light-plus-BnkOXVnc.js +0 -1
- package/dist/liquid-B40PlvwD.js +0 -1
- package/dist/log-xo3MDRlF.js +0 -1
- package/dist/logo-DTYzs3BE.js +0 -1
- package/dist/lua-BDEQNtpi.js +0 -1
- package/dist/luau-B1E5PlN9.js +0 -1
- package/dist/make-DtNOxXXX.js +0 -1
- package/dist/markdown-B6FKqc-0.js +0 -1
- package/dist/marko-mRmYVKe_.js +0 -1
- package/dist/material-darker-DFW2iB51.js +0 -1
- package/dist/material-default-BFApb2Ag.js +0 -1
- package/dist/material-from-css-bTkjEQjF.js +0 -1
- package/dist/material-lighter-CYEL5tGv.js +0 -1
- package/dist/material-ocean-BhuQqQbt.js +0 -1
- package/dist/material-palenight-B_DfQHjY.js +0 -1
- package/dist/matlab-BovMnqtG.js +0 -1
- package/dist/mdc-DIkT1TyN.js +0 -1
- package/dist/mdx-CxAyQTjI.js +0 -1
- package/dist/mermaid-i0z8tyOx.js +0 -1
- package/dist/min-dark-BE2n4wJj.js +0 -1
- package/dist/min-light-BJgErz0d.js +0 -1
- package/dist/mojo-C-lVJL5A.js +0 -1
- package/dist/monokai-eaa8L1cq.js +0 -1
- package/dist/move-C3Zui0bc.js +0 -1
- package/dist/narrat-THKEk6T8.js +0 -1
- package/dist/nextflow-CtnPKe-i.js +0 -1
- package/dist/nginx-CGEFMta9.js +0 -1
- package/dist/nim-C8mPZfis.js +0 -1
- package/dist/nix-JCk4_G_4.js +0 -1
- package/dist/nord-Doy8uXi5.js +0 -1
- package/dist/nushell-CX0evzNH.js +0 -1
- package/dist/objective-c-CRUJa2eY.js +0 -1
- package/dist/objective-cpp-CCYeWv4r.js +0 -1
- package/dist/ocaml-DGJqpgv5.js +0 -1
- package/dist/one-dark-pro-u8LD4Pzz.js +0 -1
- package/dist/pascal-DBmHAUBB.js +0 -1
- package/dist/perl-DeqR1cIo.js +0 -1
- package/dist/php-DgxB75vC.js +0 -1
- package/dist/plsql-7JGOsii8.js +0 -1
- package/dist/po-iKcL_E8G.js +0 -1
- package/dist/poimandres-CA110GE1.js +0 -1
- package/dist/postcss-Da2iRvoL.js +0 -1
- package/dist/powerquery-DPeggvzL.js +0 -1
- package/dist/powershell-CaJNoU_J.js +0 -1
- package/dist/prisma-CJb-Lxak.js +0 -1
- package/dist/prolog-DfSRFLOg.js +0 -1
- package/dist/proto-CQScmtFO.js +0 -1
- package/dist/pug-C812gnD5.js +0 -1
- package/dist/puppet-B1xO3kuT.js +0 -1
- package/dist/purescript-CNYgFxmJ.js +0 -1
- package/dist/python-D9HM-cQI.js +0 -1
- package/dist/qml-DJVpVDAW.js +0 -1
- package/dist/qmldir-CHfKHU4H.js +0 -1
- package/dist/qss-C4aoutlf.js +0 -1
- package/dist/r-CqYxKsjx.js +0 -1
- package/dist/racket-DUEDYd32.js +0 -1
- package/dist/raku-D9-XDqRz.js +0 -1
- package/dist/razor-3rNKfrrf.js +0 -1
- package/dist/reg-b5Nk8lNx.js +0 -1
- package/dist/regexp-DVRafeF7.js +0 -1
- package/dist/rel--gRyHcrO.js +0 -1
- package/dist/riscv-C8SxbbN2.js +0 -1
- package/dist/rose-pine-DPGqNU4b.js +0 -1
- package/dist/rose-pine-dawn-DymfQU_V.js +0 -1
- package/dist/rose-pine-moon-BQUAYUon.js +0 -1
- package/dist/rst-CmHkCKmJ.js +0 -1
- package/dist/ruby-Q-VH1uZA.js +0 -1
- package/dist/rust-ClS6MAIk.js +0 -1
- package/dist/sas-D3oI_z1n.js +0 -1
- package/dist/sass-C7IOYsXa.js +0 -1
- package/dist/scala-Bo-OrDK4.js +0 -1
- package/dist/scheme-CZPOfAv0.js +0 -1
- package/dist/scss-CrrfDAqb.js +0 -1
- package/dist/shaderlab-BHdRvEKr.js +0 -1
- package/dist/shellscript-CGx4lQcC.js +0 -1
- package/dist/shellsession-DNVyDTwx.js +0 -1
- package/dist/slack-dark-BdYiGGaR.js +0 -1
- package/dist/slack-ochin-D47ofNk9.js +0 -1
- package/dist/smalltalk-CSwwxfh6.js +0 -1
- package/dist/solarized-dark-B_ueb431.js +0 -1
- package/dist/solarized-light-ClfNXI7y.js +0 -1
- package/dist/solidity-DTxkUBi_.js +0 -1
- package/dist/soy-CWDkaEw-.js +0 -1
- package/dist/sparql-iRDOfWr5.js +0 -1
- package/dist/splunk-BEkc8uO-.js +0 -1
- package/dist/sql-BJ_taBmN.js +0 -1
- package/dist/ssh-config-Df9b2KGk.js +0 -1
- package/dist/stata-D3UR29Ve.js +0 -1
- package/dist/stylus-CdDBOxWC.js +0 -1
- package/dist/svelte-DyEd0oQk.js +0 -1
- package/dist/swift-BxhiGBjX.js +0 -1
- package/dist/system-verilog-CetQnQ4g.js +0 -1
- package/dist/systemd-BnD0vcw3.js +0 -1
- package/dist/tasl-DVvrvOfd.js +0 -1
- package/dist/tcl-DLSUI_zn.js +0 -1
- package/dist/templ-DSz21pzx.js +0 -1
- package/dist/terraform-EK_dQKQM.js +0 -1
- package/dist/tex-BM4Fklib.js +0 -1
- package/dist/toml-kuUrbkod.js +0 -1
- package/dist/ts-tags-By7dzkmj.js +0 -1
- package/dist/tslib.es6-DlLz3CkS.js +0 -1
- package/dist/tsv-BCJoRl62.js +0 -1
- package/dist/tsx-BjuLHzrJ.js +0 -1
- package/dist/turtle-CufS_WpN.js +0 -1
- package/dist/twig-JhO6NGAT.js +0 -1
- package/dist/txt-C4POgh3W.js +0 -1
- package/dist/typescript-B1VYfqvp.js +0 -1
- package/dist/typespec-CZzVsQ68.js +0 -1
- package/dist/typst-DLkGCZHs.js +0 -1
- package/dist/v-DNo0Cbkd.js +0 -1
- package/dist/vala-J9aWDLgT.js +0 -1
- package/dist/vb-CukbP-ad.js +0 -1
- package/dist/verilog-C7Ns4wPb.js +0 -1
- package/dist/vhdl-D94Lw1Fr.js +0 -1
- package/dist/viml-gaixGh_X.js +0 -1
- package/dist/vue-BX9d0W3t.js +0 -1
- package/dist/vue-html-CPRiJ8jH.js +0 -1
- package/dist/vyper-Ckj8wEzF.js +0 -1
- package/dist/wasm-BIwf60De.js +0 -1
- package/dist/wenyan-8NGlujRm.js +0 -1
- package/dist/wgsl-BcYJIOdN.js +0 -1
- package/dist/wikitext-B892rECa.js +0 -1
- package/dist/wolfram-CsrnIKPa.js +0 -1
- package/dist/xml-bnQL-E2F.js +0 -1
- package/dist/xsl-n4ZnN1T3.js +0 -1
- package/dist/yaml-8btRgevg.js +0 -1
- package/dist/zenscript-C4tShGxI.js +0 -1
- package/dist/zig-YA915rBO.js +0 -1
- package/src/coder/CodeCopy/CodeCopy.style.tsx +0 -21
- package/src/coder/CodeSample/CodeSample.styles.tsx +0 -137
package/dist/index.css
CHANGED
|
@@ -1,135 +1,217 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
.
|
|
30
|
-
@media (max-width: 1200px){.
|
|
31
|
-
@media (max-width: 768px){.
|
|
32
|
-
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
.
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.
|
|
65
|
-
.
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
.
|
|
83
|
-
.
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.
|
|
101
|
-
.
|
|
102
|
-
.
|
|
103
|
-
.
|
|
104
|
-
.
|
|
105
|
-
.
|
|
106
|
-
.
|
|
107
|
-
.
|
|
108
|
-
.
|
|
109
|
-
.
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.
|
|
118
|
-
.
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
.
|
|
124
|
-
.
|
|
125
|
-
.
|
|
126
|
-
.
|
|
127
|
-
.
|
|
128
|
-
.
|
|
129
|
-
.
|
|
130
|
-
.
|
|
131
|
-
.
|
|
132
|
-
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
.
|
|
1
|
+
.XydComponents-Component-pages-HomePage__HomePageCardsHost{display:grid;grid-template-columns:repeat(2, 500px);justify-content:center;gap:30px;}@media (max-width: 1200px){.XydComponents-Component-pages-HomePage__HomePageCardsHost{grid-template-columns:repeat(2, 1fr);}}@media (max-width: 768px){.XydComponents-Component-pages-HomePage__HomePageCardsHost{grid-template-columns:1fr;}}
|
|
2
|
+
|
|
3
|
+
.XydComponents-Component-brand-Button__ButtonHost{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;border-radius:20px;padding:0 20px;line-height:38px;font-size:14px;border-color:transparent;color:#3c3c43;background-color:#f7f7f8;transition:color .25s,border-color .25s,background-color .25s;}.XydComponents-Component-brand-Button__ButtonHost:hover{background:#e3e3e6;}.XydComponents-Component-brand-Button__ButtonHostSecondary{color:#fff;background-color:rgb(112, 81, 212);}.XydComponents-Component-brand-Button__ButtonHostSecondary:hover{background-color:rgb(95, 59, 211);}
|
|
4
|
+
|
|
5
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHost{padding:20px;}
|
|
6
|
+
.XydComponents-Component-brand-CTABanner__CTABannerContainer{display:flex;align-items:center;justify-content:center;gap:80px;}
|
|
7
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHero{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:40px;}
|
|
8
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHeadingEffect{display:flex;align-items:center;justify-content:center;flex-direction:column;background:-webkit-linear-gradient(
|
|
9
|
+
120deg,
|
|
10
|
+
var(--headingEffect-color-tertiary) 20%,
|
|
11
|
+
var(--headingEffect-color-tertiary) 30%,
|
|
12
|
+
var(--headingEffect-color-secondary) 60%,
|
|
13
|
+
var(--headingEffect-color-primary) 75%,
|
|
14
|
+
var(--headingEffect-color-primary) 85%
|
|
15
|
+
);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:wave-XydComponents-Component-brand-CTABanner__CTABannerHeadingEffect 5s infinite;background-size:200% 200%;-webkit-background-position:50% 50%;background-position:50% 50%;}
|
|
16
|
+
@keyframes wave-XydComponents-Component-brand-CTABanner__CTABannerHeadingEffect{0%{-webkit-background-position:50% 50%;background-position:50% 50%;}50%{-webkit-background-position:0% 50%;background-position:0% 50%;}100%{-webkit-background-position:50% 50%;background-position:50% 50%;}}
|
|
17
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHeadingHost{display:flex;align-items:center;justify-content:center;flex-direction:column;}
|
|
18
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHeadingTitle{font-size:76px;font-weight:900;text-align:center;letter-spacing:3px;margin:0;}
|
|
19
|
+
.XydComponents-Component-brand-CTABanner__CTABannerHeadingSubtitle{color:#3c3c43;font-size:46px;font-weight:600;text-align:center;}
|
|
20
|
+
.XydComponents-Component-brand-CTABanner__CTABannerButtonGroupHost{display:flex;align-items:center;justify-content:center;gap:10px;}
|
|
21
|
+
|
|
22
|
+
.XydComponents-Component-brand-Footer__FooterHost{position:relative;border-top:1px solid #f0f0f0;padding:32px;background-color:#fff;}
|
|
23
|
+
.XydComponents-Component-brand-Footer__FooterContainer{margin:0 auto;max-width:1200px;text-align:center;}
|
|
24
|
+
.XydComponents-Component-brand-Footer__FooterTextContainer{line-height:24px;font-size:14px;font-weight:500;color:rgba(60, 60, 67, .78);}
|
|
25
|
+
|
|
26
|
+
.XydComponents-Component-views-HomeView__HomeViewHost{display:flex;flex-direction:column;min-height:100vh;}
|
|
27
|
+
.XydComponents-Component-views-HomeView__HomeViewBodyHost{background:radial-gradient(circle, hsl(0 0% 9% / .3) 1px, transparent 1px);-webkit-backdrop-filter:sepia(10%);backdrop-filter:sepia(10%);background-size:30px 30px;padding:60px;flex:1;}
|
|
28
|
+
.XydComponents-Component-views-HomeView__HomeViewBodyHostSecondary{background:repeating-linear-gradient(to right, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px),repeating-linear-gradient(to bottom, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px);}
|
|
29
|
+
.XydComponents-Component-views-HomeView__HomeViewBodyContent{width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:80px;}
|
|
30
|
+
@media (max-width: 1200px){.XydComponents-Component-views-HomeView__HomeViewBodyContent{width:100%;padding:0 20px;}}
|
|
31
|
+
@media (max-width: 768px){.XydComponents-Component-views-HomeView__HomeViewBodyContent{width:100%;padding:0 10px;}}
|
|
32
|
+
|
|
33
|
+
.XydComponents-Component-writer-Blockquote__BlockquoteHost{color:rgb(55 65 81 / 1);font-style:italic;border-color:rgb(209 213 219 / 1);margin:0;}
|
|
34
|
+
|
|
35
|
+
.XydComponents-Component-writer-UnderlineNav__UnderlineNavHost{align-items:center;display:flex;height:42px;background-color:#fff;border-bottom:1px solid hsl(212, 15%, calc(96% - 12% * 1));z-index:99;}
|
|
36
|
+
.XydComponents-Component-writer-UnderlineNav__UnderlineNavUl{display:flex;gap:10px;height:100%;color:hsl(212, 15%, calc(96% - 12% * 4));list-style:none;padding:0;white-space:nowrap;}
|
|
37
|
+
.XydComponents-Component-writer-UnderlineNav__UnderlineNavItem{height:100%;}
|
|
38
|
+
.XydComponents-Component-writer-UnderlineNav__UnderlineNavItem[data-state="active"] a{border-bottom-color:rgb(112, 81, 212);}
|
|
39
|
+
.XydComponents-Component-writer-UnderlineNav__UnderlineNavItemLink{display:inline-flex;border-bottom:3px solid transparent;-webkit-text-decoration:none;text-decoration:none;height:100%;padding:10px;}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.XydComponents-Component-writer-Callout__CalloutHost{display:inline-flex;align-items:center;position:relative;width:100%;min-width:275px;padding:8px 12px;border-radius:8px;text-align:center;border:1px solid #ececf1;}
|
|
43
|
+
.XydComponents-Component-writer-Callout__CalloutNeutral{background-color:#f7f7f8;border-color:#ececf1;}
|
|
44
|
+
.XydComponents-Component-writer-Callout__CalloutIcon{display:inline-flex;margin-right:14px;flex:0 0 auto;align-self:flex-start;color:#6e6e80;font-size:20px;margin-top:2px;}
|
|
45
|
+
.XydComponents-Component-writer-Callout__CalloutMessage{color:#353740;text-align:left;flex:1 1 auto;}
|
|
46
|
+
.XydComponents-Component-writer-Callout__CalloutMessageBody{font-size:14px;line-height:20px;}
|
|
47
|
+
|
|
48
|
+
.XydComponents-Component-writer-Code__CodeHost{display:inline-block;padding:0 .3em;border-radius:6px;margin:0 3px;border:.5px solid #ececf1;font-size:14px;font-weight:500;line-height:1.6em;background:linear-gradient(45deg, #f7f7f8 0%, rgba(247, 247, 248, 1) 100%);}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
.XydComponents-Component-writer-GuideCard__GuideHostSecondary{display:flex;position:relative;overflow:hidden;border:1px solid #ebebeb;background:#f8f8f8;border-radius:8px;padding:24px;z-index:0;transition:box-shadow .2s ease-in-out,background-image .2s ease;}.XydComponents-Component-writer-GuideCard__GuideHostSecondary:hover{background:#FFF;}.XydComponents-Component-writer-GuideCard__GuideHostSecondaryMd{padding:21px 25px 25px;}.XydComponents-Component-writer-GuideCard__GuideLink{width:100%;height:100%;}.XydComponents-Component-writer-GuideCard__GuideItem{border-radius:8px;display:flex;align-items:flex-start;cursor:pointer;transition:opacity .15s;}.XydComponents-Component-writer-GuideCard__GuideItem:hover [data-pointer="true"]{opacity:1;transform:translate(0);}.XydComponents-Component-writer-GuideCard__GuideItemSecondary{width:100%;height:100%;}.XydComponents-Component-writer-GuideCard__GuideIcon{line-height:0px;font-size:24px;height:32px;display:flex;justify-content:center;align-items:center;color:#000;transition:background .2s ease;box-sizing:border-box;flex-shrink:0;}.XydComponents-Component-writer-GuideCard__GuideRight{padding-left:16px;display:flex;flex-direction:column;gap:4px;}.XydComponents-Component-writer-GuideCard__GuideTitle{display:flex;color:#000;font-weight:600;align-items:center;transition:color .15s;}.XydComponents-Component-writer-GuideCard__GuideTitleBody{font-size:16px;line-height:20px;}.XydComponents-Component-writer-GuideCard__GuideTitleBodyMd{font-size:18px;}.XydComponents-Component-writer-GuideCard__GuideBody{font-weight:400;font-size:14px;line-height:20px;color:#5C5C5C;white-space:normal;overflow:hidden;text-overflow:ellipsis;}.XydComponents-Component-writer-GuideCard__GuideBodyMd{font-size:16px;}.XydComponents-Component-writer-GuideCard__GuidePointer{opacity:0;transform:translate(-4px);display:flex;justify-content:center;transition:opacity .15s ease-in-out,transform .15s ease-in-out;}.XydComponents-Component-writer-GuideCard__GuideListHost{display:grid;grid-template-columns:1fr 1fr;justify-content:center;gap:24px;}
|
|
52
|
+
|
|
53
|
+
.XydComponents-Component-writer-Heading__HeadingHost{line-height:40px;font-weight:600;position:relative;display:inline-block;margin:0;padding:0 24px 0 0;scroll-snap-margin-top:30px;scroll-margin-top:30px;cursor:pointer;}.XydComponents-Component-writer-Heading__HeadingHost:hover svg{opacity:1;}.XydComponents-Component-writer-Heading__HeadingH1{font-size:36px;}.XydComponents-Component-writer-Heading__HeadingH1 code{font-size:30px;}.XydComponents-Component-writer-Heading__HeadingH2{font-size:30px;}.XydComponents-Component-writer-Heading__HeadingH2 code{font-size:24px;}.XydComponents-Component-writer-Heading__HeadingH3{font-size:26px;}.XydComponents-Component-writer-Heading__HeadingH3 code{font-size:22px;}.XydComponents-Component-writer-Heading__HeadingH4{font-size:22px;}.XydComponents-Component-writer-Heading__HeadingH4 code{font-size:18px;}.XydComponents-Component-writer-Heading__HeadingH5{font-size:18px;}.XydComponents-Component-writer-Heading__HeadingH5 code{font-size:14px;}.XydComponents-Component-writer-Heading__HeadingH6{font-size:16px;}.XydComponents-Component-writer-Heading__HeadingH6 code{font-size:12px;}.XydComponents-Component-writer-Heading__HeadingLink{position:absolute;top:50%;right:0;margin-top:-6px;opacity:0;color:#7051d4;transition:opacity .15s ease;}
|
|
54
|
+
|
|
55
|
+
.XydComponents-Component-writer-Badge__BadgeHost{display:inline-flex;align-items:center;line-height:1rem;font-style:normal;font-weight:500;letter-spacing:normal;white-space:nowrap;text-transform:none;}
|
|
56
|
+
.XydComponents-Component-writer-Badge__BadgeHostWarning{color:#434e4e;background-color:#ffffe1;}
|
|
57
|
+
.XydComponents-Component-writer-Badge__BadgeHostInfo{color:#fff;background-color:#1971a8;}
|
|
58
|
+
.XydComponents-Component-writer-Badge__BadgeHostSm{font-size:12px;height:18px;padding:0 6px;gap:3px;border-radius:6px;}
|
|
59
|
+
.XydComponents-Component-writer-Badge__BadgeItem{position:relative;}
|
|
60
|
+
|
|
61
|
+
.XydComponents-Component-writer-Details__DetailsHost{border-top:1px solid #ececf1;}.XydComponents-Component-writer-Details__DetailsHost[open] summary svg[data-icon="true"]{transform:rotate(90deg);}.XydComponents-Component-writer-Details__DetailsHostSecondary{background-color:#f7f7f8;border:1px solid #ececf1;border-radius:8px;}.XydComponents-Component-writer-Details__DetailsSummary{padding:16px 14px 16px 0;font-size:18px;cursor:pointer;font-weight:500;font-variant-numeric:tabular-nums;line-height:1.4;transition:color 0.3s;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;list-style:none;}.XydComponents-Component-writer-Details__DetailsSummary:hover{color:#565869;}.XydComponents-Component-writer-Details__DetailsSummarySecondary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;padding:20px 24px;}.XydComponents-Component-writer-Details__DetailsSummaryTertiary{padding:10px 24px;}.XydComponents-Component-writer-Details__DetailsSummaryDeep{display:flex;align-items:center;margin-bottom:8px;}.XydComponents-Component-writer-Details__DetailsSummaryDeepText{color:#6e6e80;text-transform:uppercase;font-size:12px;line-height:16px;letter-spacing:.08em;margin-left:8px;font-weight:700;}.XydComponents-Component-writer-Details__DetailsSummaryDeepTextTertiary{text-transform:none;}.XydComponents-Component-writer-Details__DetailsSummaryDeepTextTertiary code{background:white;}.XydComponents-Component-writer-Details__DetailsLabel{flex:1 1 auto;}.XydComponents-Component-writer-Details__DetailsLabelTertiary{padding:10px;}.XydComponents-Component-writer-Details__DetailsIcon{flex:0 0 auto;font-size:16px;display:flex;align-items:center;justify-content:center;padding-right:6px;}.XydComponents-Component-writer-Details__DetailsContent{padding:0 24px 20px;}.XydComponents-Component-writer-Details__DetailsContentSecondary code{background:white;}.XydComponents-Component-writer-Details__DetailsContentTertiary{background:white;padding-top:20px;}
|
|
62
|
+
|
|
63
|
+
.XydComponents-Component-writer-Breadcrumbs-Breadcrumbs_styles_ts__BreadcrumbsHost{display:flex;overflow:hidden;margin-top:0.375rem;gap:0.25rem;align-items:center;font-size:0.875rem;line-height:1.25rem;color:#6B7280;}
|
|
64
|
+
.XydComponents-Component-writer-Breadcrumbs-Breadcrumbs_styles_ts__BreadcrumbsIcon{shrink:0;width:0.875rem;}
|
|
65
|
+
.XydComponents-Component-writer-Breadcrumbs-Breadcrumbs_styles_ts__BreadcrumbsItem{white-space:nowrap;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;}
|
|
66
|
+
.XydComponents-Component-writer-Breadcrumbs-Breadcrumbs_styles_ts__BreadcrumbsItemActive{color:#000;font-weight:bold;}
|
|
67
|
+
|
|
68
|
+
.XydComponents-Component-writer-Hr__HrHost{border-color:rgb(229 229 229 / 0.7);}
|
|
69
|
+
|
|
70
|
+
.XydComponents-Component-writer-Table__TableHost{display:block;overflow-x:scroll;border-collapse:collapse;border-radius:3px;}
|
|
71
|
+
.XydComponents-Component-writer-Table__TableTh{padding:0.5rem 1rem;margin:0;font-weight:600;border-width:1px;border-color:#D1D5DB;background:rgba(234, 238, 242, 0.5);}
|
|
72
|
+
.XydComponents-Component-writer-Table__TableTr{padding:0;margin:0;border-top-width:1px;border-color:#D1D5DB;}
|
|
73
|
+
.XydComponents-Component-writer-Table__TableTd{padding:0.5rem 1rem;margin:0;border-width:1px;border-color:#D1D5DB;}
|
|
74
|
+
|
|
75
|
+
.XydComponents-Component-writer-NavLinks-NavLinks_styles_ts__NavLinksHost{display:flex;padding-top:2rem;margin-top:2rem;margin-bottom:2rem;justify-content:space-between;align-items:center;border-top-width:1px;border-color:#d7d7d7;}
|
|
76
|
+
.XydComponents-Component-writer-NavLinks-NavLinks_styles_ts__NavLinksLink{display:flex;gap:8px;align-items:center;font-size:16px;line-height:1.5;font-weight:600;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;max-width:50%;}
|
|
77
|
+
.XydComponents-Component-writer-NavLinks-NavLinks_styles_ts__NavLinksIcon{display:inline;height:1.25rem;flex-shrink:0;}
|
|
78
|
+
|
|
79
|
+
.XydComponents-Component-writer-Pre__PreHost{margin-top:0;border-radius:6px;padding:16px;border:0;background-color:rgb(246, 248, 250);overflow:auto;}
|
|
80
|
+
|
|
81
|
+
.XydComponents-Component-writer-Table__Host{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
|
|
82
|
+
.XydComponents-Component-writer-Table__Table{display:table;width:100%;min-width:640px;border-collapse:separate;border-spacing:0;border:1px solid #ECECF1;border-radius:8px;font-size:0.875rem;line-height:1.25rem;margin-top:1rem;overflow:hidden;}
|
|
83
|
+
.XydComponents-Component-writer-Table__Thead{background:#F7F7F8;}
|
|
84
|
+
.XydComponents-Component-writer-Table__Th{text-align:left;font-weight:500;padding:0.5rem 1rem;color:#353740;vertical-align:middle;border-bottom:1px solid #ECECF1;white-space:nowrap;}
|
|
85
|
+
.XydComponents-Component-writer-Table__Th:first-child{width:24rem;max-width:40%;border-right:1px solid #ECECF1;}
|
|
86
|
+
@media (max-width: 768px){.XydComponents-Component-writer-Table__Th:first-child{width:auto;min-width:12rem;}}
|
|
87
|
+
.XydComponents-Component-writer-Table__Th.numeric{text-align:right;font-weight:400;min-width:5rem;}
|
|
88
|
+
@media (max-width: 768px){.XydComponents-Component-writer-Table__Th.numeric{min-width:4rem;}}
|
|
89
|
+
.XydComponents-Component-writer-Table__Tr:not(:last-child){border-bottom:1px solid #ECECF1;}
|
|
90
|
+
.XydComponents-Component-writer-Table__Td{padding:0.5rem 1rem;vertical-align:middle;border-top:1px solid #ECECF1;}
|
|
91
|
+
.XydComponents-Component-writer-Table__Td:first-child{border-right:1px solid #ECECF1;}
|
|
92
|
+
.XydComponents-Component-writer-Table__Td.numeric{text-align:right;}
|
|
93
|
+
.XydComponents-Component-writer-Table__Td.muted{color:#6E6E80;}
|
|
94
|
+
@media (max-width: 768px){.XydComponents-Component-writer-Table__Td{padding:0.5rem;}}
|
|
95
|
+
.XydComponents-Component-writer-Table__Cell{display:flex;align-items:baseline;width:100%;gap:0.5rem;}
|
|
96
|
+
.XydComponents-Component-writer-Table__CellContent{flex:1;text-align:right;}
|
|
97
|
+
.XydComponents-Component-writer-Table__ModelCell{display:flex;align-items:center;gap:0.5rem;white-space:nowrap;color:#202123;}
|
|
98
|
+
@media (max-width: 768px){.XydComponents-Component-writer-Table__ModelCell{font-size:0.8125rem;}}
|
|
99
|
+
|
|
100
|
+
.XydComponents-Component-writer-Tabs__TabsSampleHost{position:relative;max-width:100%;}
|
|
101
|
+
.XydComponents-Component-writer-Tabs__TabsSampleButtons{display:flex;align-items:center;}
|
|
102
|
+
.XydComponents-Component-writer-Tabs__TabsSampleContent{margin-top:16px;}
|
|
103
|
+
.XydComponents-Component-writer-Tabs__TabsArrowHost{padding:8px;background-color:#ffffff;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);}
|
|
104
|
+
.XydComponents-Component-writer-Tabs__TabsArrowIcon{width:16px;height:16px;}
|
|
105
|
+
.XydComponents-Component-writer-Tabs__TabsScrollerHost{overflow-x:auto;flex-grow:1;}
|
|
106
|
+
.XydComponents-Component-writer-Tabs__TabsScrollerContainer{display:inline-flex;gap:4px;border-radius:8px;background-color:#F3F4F6;padding:4px;margin-left:4px;}
|
|
107
|
+
.XydComponents-Component-writer-Tabs__TabsButtonHost{padding:0.5rem 1rem;border-radius:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:500;white-space:nowrap;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;color:#6B7280;}
|
|
108
|
+
.XydComponents-Component-writer-Tabs__TabsButtonHost:hover{color:#111827;}
|
|
109
|
+
.XydComponents-Component-writer-Tabs__TabsButtonHost[data-state="active"]{color:#111827;background-color:#ffffff;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);}
|
|
110
|
+
.XydComponents-Component-writer-Tabs__TabsButtonActive{color:#111827;background-color:#ffffff;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);}
|
|
111
|
+
|
|
112
|
+
.XydComponents-Component-writer-Steps__StepsHost{padding-left:0;list-style:none;counter-reset:ordered-listitem;display:flex;flex-direction:column;gap:6px;}
|
|
113
|
+
.XydComponents-Component-writer-Steps__StepsLi{padding-left:32px;position:relative;line-height:1.5;}
|
|
114
|
+
.XydComponents-Component-writer-Steps__StepsLi::after{position:absolute;top:0;left:0;counter-increment:ordered-listitem;content:counter(ordered-listitem);background:#ececf1;color:#353740;font-size:12px;line-height:24px;font-weight:500;text-align:center;height:24px;width:24px;border-radius:12px;}
|
|
115
|
+
|
|
116
|
+
:root {--xyd-navbar-height:40px;--xyd-global-page-gutter:8px;}
|
|
117
|
+
.XydComponents-Component-layouts__LayoutHost{width:100%;}
|
|
118
|
+
.XydComponents-Component-layouts__LayoutHeader{display:flex;justify-content:space-between;align-items:center;position:fixed;top:0px;right:8px;left:8px;height:40px;}
|
|
119
|
+
.XydComponents-Component-layouts__LayoutHeaderSub{flex-direction:column;height:94px;transition:transform 200ms;}
|
|
120
|
+
.XydComponents-Component-layouts__LayoutHeaderHideMain{transform:translateY(calc(-40px + 3px));}
|
|
121
|
+
.XydComponents-Component-layouts__LayoutMain{position:fixed;top:calc(40px + 0px);bottom:8px;left:8px;right:8px;}
|
|
122
|
+
.XydComponents-Component-layouts__LayoutMainSub{top:calc(94px + 0px);transition:top 200ms;}
|
|
123
|
+
.XydComponents-Component-layouts__LayoutSidebar{flex-direction:column;position:absolute;top:0;left:0;bottom:0;right:0;z-index:101;width:210px;border:0;padding:12px 0 0;overflow:visible;background:none;border-radius:0;opacity:1;visibility:visible;transition:opacity .3s cubic-bezier(.65, 0, .35, 1);}
|
|
124
|
+
.XydComponents-Component-layouts__PageHost{position:absolute;top:12px;right:0;bottom:0;z-index:201;background:#fff;overflow:hidden;transition:opacity .3s cubic-bezier(.65, 0, .35, 1);left:210px;}
|
|
125
|
+
.XydComponents-Component-layouts__PageScroll{overflow:scroll;height:100%;}
|
|
126
|
+
.XydComponents-Component-layouts__PageContainer{padding:0;width:100%;min-height:100%;max-width:100%;margin:0 auto;font-size:15px;line-height:24px;}
|
|
127
|
+
.XydComponents-Component-layouts__PageArticleContainer{width:980px;padding:40px 56px;padding-top:20px;max-width:100%;margin:0 auto;}
|
|
128
|
+
.XydComponents-Component-layouts__PageArticleContainerFullWidth{width:1200px;}
|
|
129
|
+
.XydComponents-Component-layouts__ArticleHost{display:flex;gap:30px;width:100%;align-items:flex-start;}
|
|
130
|
+
.XydComponents-Component-layouts__ArticleContent{flex:1 1 0;overflow:hidden;}
|
|
131
|
+
.XydComponents-Component-layouts__ArticleNav{position:sticky;top:30px;width:180px;margin-top:0;margin-left:50px;padding-left:16px;flex:none;}
|
|
132
|
+
|
|
133
|
+
.XydComponents-Component-content-Subtitle-Subtitle_styles_ts__Host{margin-top:-18px;font-size:18px;color:#6e6e80;font-weight:300;}
|
|
134
|
+
|
|
135
|
+
.XydComponents-Component-content-Anchor__AnchorHost{color:#7051d4;}
|
|
136
|
+
|
|
137
|
+
.XydComponents-Component-coder-Code__MarkHost{display:flex;border-left-width:4px;border-color:transparent;margin:4px 0;}
|
|
138
|
+
.XydComponents-Component-coder-Code__MarkLine{flex:1 1 0%;}
|
|
139
|
+
.XydComponents-Component-coder-Code__MarkAnnotated{border-color:#60A5FA;background-color:#EEF2FF;}
|
|
140
|
+
.XydComponents-Component-coder-Code__LineNumberHost{margin:0 12px 0px 4px;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0.5;}
|
|
141
|
+
.XydComponents-Component-coder-Code__CodeHost{max-height:400px;background:linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%)!important;margin:0;padding:8px 16px;border-top:1px solid rgb(236, 236, 241);border-bottom-left-radius:10px;border-bottom-right-radius:10px;font-size:12px;line-height:20px;white-space:pre-wrap;word-break:break-all;overflow-y:scroll;}
|
|
142
|
+
.XydComponents-Component-coder-Code__CodeHostFull{max-height:100%;}
|
|
143
|
+
|
|
144
|
+
.XydComponents-Component-content-Content__ContentHost{display:flex;flex-direction:column;gap:24px;font-size:16px;line-height:1.5;}
|
|
145
|
+
|
|
146
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsHost{overflow:hidden;min-width:0;border:1px solid rgb(236, 236, 241);border-radius:16px;}
|
|
147
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsPreSingle{border:none!important;}
|
|
148
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesHost{display:flex;flex:1 1 0%;background:linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%)!important;border-top-right-radius:10px;border-top-left-radius:10px;border-bottom:0px;min-width:0;}
|
|
149
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesHostSingle{height:0;}
|
|
150
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesList{display:flex;flex-grow:1;justify-content:end;gap:8px;padding:0 10px;}
|
|
151
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesButton{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:6px;font-size:14px;color:rgb(53, 55, 64);}
|
|
152
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesButton[data-state="active"]{color:rgb(112, 81, 212);border-bottom:1px solid rgb(112, 81, 212);border-bottom-left-radius:0px;border-bottom-right-radius:0px;}
|
|
153
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesButton:hover{transition:ease-in 0.1s;background:#e3e3eb;}
|
|
154
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesDescription{display:flex;align-items:center;gap:4px;font-size:14px;color:rgb(53, 55, 64);margin-left:4px;margin-right:4px;}
|
|
155
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesDescriptionItem{display:flex;padding-left:16px;padding-right:16px;flex:1 1 0%;gap:16px;border-radius:4px;}
|
|
156
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesCopy{display:flex;padding-left:8px;padding-right:8px;align-items:center;}
|
|
157
|
+
.XydComponents-Component-coder-CodeTabs__CodeTabsLanguagesCopySingle{top:17px;position:relative;right:5px;}
|
|
158
|
+
|
|
159
|
+
.XydComponents-Component-ui-Loader__LoaderHost{display:inline-flex;align-items:center;justify-content:center;}
|
|
160
|
+
.XydComponents-Component-ui-Loader__LoaderDots{display:flex;gap:4px;}
|
|
161
|
+
.XydComponents-Component-ui-Loader__LoaderDot{width:8px;height:8px;background-color:currentColor;border-radius:50%;animation:pulse-XydComponents-Component-ui-Loader__LoaderDot 1.4s infinite ease-in-out;opacity:0.6;}
|
|
162
|
+
.XydComponents-Component-ui-Loader__LoaderDot:nth-of-type(2){animation-delay:0.2s;}
|
|
163
|
+
.XydComponents-Component-ui-Loader__LoaderDot:nth-of-type(3){animation-delay:0.4s;}
|
|
164
|
+
@keyframes pulse-XydComponents-Component-ui-Loader__LoaderDot{0%,80%,100%{transform:scale(0.6);opacity:0.4;}40%{transform:scale(1);opacity:1;}}
|
|
165
|
+
.XydComponents-Component-ui-Loader__LoaderSmall .XydComponents-Component-ui-Loader__LoaderDot{width:6px;height:6px;}
|
|
166
|
+
.XydComponents-Component-ui-Loader__LoaderLarge .XydComponents-Component-ui-Loader__LoaderDot{width:12px;height:12px;}
|
|
167
|
+
|
|
168
|
+
.XydComponents-Component-coder-CodeCopy__CodeCopyHost{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:6px;}.XydComponents-Component-coder-CodeCopy__CodeCopyHost:hover{transition:ease-in 0.1s;background:#e3e3eb;}
|
|
169
|
+
|
|
170
|
+
:root {--xyd-navbar-height:50px;--xyd-global-page-gutter:8px;--xyd-sidebar-width:250px;}
|
|
171
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHost{width:100%;overflow-x:hidden;background:#fff;}
|
|
172
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeader{display:flex;justify-content:space-between;align-items:center;position:fixed;top:0px;right:8px;left:8px;height:50px;z-index:20;background:#fff;}
|
|
173
|
+
@media (max-width: 768px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeader{padding:0;}}
|
|
174
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderContent{display:flex;align-items:center;width:100%;}
|
|
175
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderSub{flex-direction:column;height:94px;transition:transform 200ms;}
|
|
176
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderHideMain{transform:translateY(calc(-50px + 3px));}
|
|
177
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerButton{display:none;}
|
|
178
|
+
@media (max-width: 768px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerButton{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:none;background:none;cursor:pointer;padding:0;}}
|
|
179
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerIcon{width:24px;height:24px;position:relative;display:flex;flex-direction:column;justify-content:space-between;}
|
|
180
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLine{width:100%;height:2px;background:#000;transition:transform 0.3s cubic-bezier(.65, 0, .35, 1);}
|
|
181
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLineOpen:first-child{transform:translateY(11px) rotate(45deg);}
|
|
182
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLineOpen:nth-child(2){opacity:0;}
|
|
183
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLineOpen:last-child{transform:translateY(-11px) rotate(-45deg);}
|
|
184
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMain{position:fixed;display:flex;top:calc(50px + 0px);bottom:0;left:0;right:0;padding:8px;overflow:hidden;}
|
|
185
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMain{padding-top:calc(50px + 0px + 8px);}}
|
|
186
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMainSub{top:calc(94px + 0px);}
|
|
187
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMainSub{padding-top:calc(94px + 0px + 8px);}}
|
|
188
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryStaticSidebar{flex:none;width:250px;background:#fff;display:flex;flex-direction:column;position:relative;height:100%;}
|
|
189
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryStaticSidebar{display:none;}}
|
|
190
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMobileSidebar{display:none;}
|
|
191
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMobileSidebar{display:flex;position:fixed;top:0;bottom:0;left:0;width:250px;background:#fff;flex-direction:column;z-index:50;transform:translateX(-100%);transition:transform .3s cubic-bezier(.65, 0, .35, 1);box-shadow:4px 0 8px rgba(0, 0, 0, 0.1);}}
|
|
192
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMobileSidebarOpen{transform:translateX(0);}}
|
|
193
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimarySidebarContent{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;height:100%;}
|
|
194
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseButton{position:absolute;top:12px;right:12px;width:32px;height:32px;border:none;background:none;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;}
|
|
195
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimarySearchInput{width:100%;height:40px;padding:0 12px;border:1px solid #eaeaea;border-radius:6px;font-size:14px;outline:none;transition:border-color 0.2s;}
|
|
196
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimarySearchInput:focus{border-color:#666;}
|
|
197
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon{width:20px;height:20px;position:relative;}
|
|
198
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon::before,.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon::after{content:'';position:absolute;top:50%;left:0;width:100%;height:2px;background:#666;transform-origin:center;}
|
|
199
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon::before{transform:rotate(45deg);}
|
|
200
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon::after{transform:rotate(-45deg);}
|
|
201
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryOverlay{display:none;}
|
|
202
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryOverlay{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.6);transition:opacity .3s;opacity:0;pointer-events:none;z-index:40;height:100vh;}}
|
|
203
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryOverlayVisible{opacity:1;pointer-events:auto;}
|
|
204
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageHost{position:relative;flex:1;background:#fff;overflow:hidden;min-width:0;height:100%;}
|
|
205
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageScroll{overflow-y:auto;height:100%;-webkit-overflow-scrolling:touch;padding:0 48px;}
|
|
206
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageScroll{padding:0 32px;}}
|
|
207
|
+
@media (max-width: 768px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageScroll{padding:0 24px;}}
|
|
208
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageContainer{max-width:1000px;margin:0 auto;padding:0 8px;}
|
|
209
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageContainerLarge{max-width:1200px;}
|
|
210
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageArticleContainer{display:flex;gap:48px;padding:48px 0;min-height:100%;}
|
|
211
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageArticleContainer{gap:32px;}}
|
|
212
|
+
@media (max-width: 768px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageArticleContainer{flex-direction:column;padding:24px 0;gap:24px;}}
|
|
213
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleHost{flex:1;min-width:0;}
|
|
214
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleContent{width:100%;}
|
|
215
|
+
.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleNav{flex:none;width:256px;position:sticky;top:0;height:-moz-fit-content;height:fit-content;max-height:100vh;overflow-y:auto;padding-right:24px;padding-top:12px;}
|
|
216
|
+
@media (max-width: 1024px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleNav{width:200px;padding-right:16px;}}
|
|
217
|
+
@media (max-width: 768px){.XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleNav{width:100%;position:static;max-height:none;padding-right:0;}}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { };
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/layouts.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
interface LayoutPrimaryProps {
|
|
4
|
+
header: React.ReactNode;
|
|
5
|
+
aside: React.ReactNode;
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
contentNav?: React.ReactNode;
|
|
8
|
+
subheader?: React.ReactNode;
|
|
9
|
+
layoutSize?: "large";
|
|
10
|
+
}
|
|
11
|
+
declare function LayoutPrimary(props: LayoutPrimaryProps): React.JSX.Element;
|
|
12
|
+
|
|
3
13
|
interface LayoutProps {
|
|
4
14
|
header: React.ReactNode;
|
|
5
15
|
aside: React.ReactNode;
|
|
@@ -16,4 +26,5 @@ declare namespace Layout {
|
|
|
16
26
|
}) => React.JSX.Element;
|
|
17
27
|
}
|
|
18
28
|
|
|
19
|
-
export { Layout,
|
|
29
|
+
export { Layout, LayoutPrimary };
|
|
30
|
+
export type { LayoutPrimaryProps, LayoutProps };
|
package/dist/layouts.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e}from"./_rollupPluginBabelHelpers-C8nLsqZ7.js";import t,{useState as a,useEffect as n}from"react";var o="50px",r="XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLine",m="XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerLineOpen",l="XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageScroll";function c(c){var s=a(!1),y=e(s,2),i=y[0],u=y[1],d=c.subheader?function(){var t=a(!1),r=e(t,2),m=r[0],c=r[1],s=a(0),y=e(s,2),i=y[0],u=y[1],d=a(0),p=e(d,2),C=p[0],_=p[1];function L(e){var t;if(e.target instanceof HTMLElement){var a=null===(t=e.target)||void 0===t?void 0:t.scrollTop;u(a)}}function v(e){var t;e.target instanceof HTMLElement&&_(null===(t=e.target)||void 0===t?void 0:t.scrollTop)}return n((function(){if(i!==C){var e=parseInt(o,10)/2,t=i-C,a=Math.abs(i-C);t>e?c(!0):a>e&&c(!1)}}),[i,C]),n((function(){var e,t;return null===(e=document.querySelector(".".concat(l)))||void 0===e||e.addEventListener("scroll",L),null===(t=document.querySelector(".".concat(l)))||void 0===t||t.addEventListener("scrollend",v),function(){var e,t;null===(e=document.querySelector(".".concat(l)))||void 0===e||e.removeEventListener("scroll",L),null===(t=document.querySelector(".".concat(l)))||void 0===t||t.removeEventListener("scrollend",v)}}),[]),{hideMainHeader:m}}():{hideMainHeader:!1},p=d.hideMainHeader;return t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHost"},t.createElement("header",{className:" \n ".concat("XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeader","\n ").concat(c.subheader&&"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderSub","\n ").concat(p&&"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderHideMain","\n ")},t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHeaderContent"},c.header,t.createElement("button",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerButton",onClick:function(){return u(!i)},"aria-label":"Toggle navigation menu"},t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryHamburgerIcon"},t.createElement("span",{className:"".concat(r," ").concat(i?m:"")}),t.createElement("span",{className:"".concat(r," ").concat(i?m:"")}),t.createElement("span",{className:"".concat(r," ").concat(i?m:"")})))),c.subheader),t.createElement("div",{className:"".concat("XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryOverlay"," ").concat(i?"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryOverlayVisible":""),onClick:function(){return u(!1)}}),t.createElement("aside",{className:"\n ".concat("XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMobileSidebar","\n ").concat(i?"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMobileSidebarOpen":"","\n ")},t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimarySidebarContent"},c.aside),t.createElement("button",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseButton",onClick:function(){return u(!1)},"aria-label":"Close navigation menu"},t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryCloseIcon"}))),t.createElement("main",{className:"\n ".concat("XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMain","\n ").concat(!p&&c.subheader&&"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryMainSub","\n ")},t.createElement("aside",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryStaticSidebar"},c.aside),t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageHost"},t.createElement("div",{className:l},t.createElement("div",{className:"\n ".concat("XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageContainer","\n ").concat("large"==c.layoutSize&&"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageContainerLarge","\n ")},t.createElement("div",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryPageArticleContainer"},t.createElement("article",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleHost"},t.createElement("section",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleContent"},c.content)),c.contentNav&&t.createElement("nav",{className:"XydComponents-Component-layouts-LayoutPrimary__LayoutPrimaryArticleNav"},c.contentNav)))))))}var s="XydComponents-Component-layouts__PageScroll";function y(o){var r=a(!1),m=e(r,2),l=m[0],c=m[1],i=a(0),u=e(i,2),d=u[0],p=u[1],C=a(0),_=e(C,2),L=_[0],v=_[1];function P(e){var t;if(e.target instanceof HTMLElement){var a=null===(t=e.target)||void 0===t?void 0:t.scrollTop;p(a)}}function E(e){var t;e.target instanceof HTMLElement&&v(null===(t=e.target)||void 0===t?void 0:t.scrollTop)}return n((function(){if(d!==L){var e=parseInt("40px",10)/2,t=d-L,a=Math.abs(d-L);t>e?c(!0):a>e&&c(!1)}}),[d,L]),n((function(){var e,t;if(o.subheader)return null===(e=document.querySelector(".".concat(s)))||void 0===e||e.addEventListener("scroll",P),null===(t=document.querySelector(".".concat(s)))||void 0===t||t.addEventListener("scrollend",E),function(){var e,t;null===(e=document.querySelector(".".concat(s)))||void 0===e||e.removeEventListener("scroll",P),null===(t=document.querySelector(".".concat(s)))||void 0===t||t.removeEventListener("scrollend",E)}}),[]),t.createElement("div",{className:"XydComponents-Component-layouts__LayoutHost"},t.createElement(y.Header,{className:"\n ".concat(o.subheader&&"XydComponents-Component-layouts__LayoutHeaderSub","\n ").concat(l&&"XydComponents-Component-layouts__LayoutHeaderHideMain","\n ")},o.header),t.createElement("main",{className:"\n ".concat("XydComponents-Component-layouts__LayoutMain","\n ").concat(!l&&o.subheader&&"XydComponents-Component-layouts__LayoutMainSub","\n ")},t.createElement("aside",{className:"XydComponents-Component-layouts__LayoutSidebar"},o.aside),t.createElement("div",{className:"XydComponents-Component-layouts__PageHost"},t.createElement("div",{className:s},t.createElement("div",{className:"XydComponents-Component-layouts__PageContainer"},t.createElement("div",{className:"\n ".concat("XydComponents-Component-layouts__PageArticleContainer","\n ").concat("fullwidth"==o.kind&&"XydComponents-Component-layouts__PageArticleContainerFullWidth","\n ")},t.createElement("article",{className:"XydComponents-Component-layouts__ArticleHost"},t.createElement("section",{className:"XydComponents-Component-layouts__ArticleContent"},o.content),o.contentNav&&t.createElement("nav",{className:"XydComponents-Component-layouts__ArticleNav"},o.contentNav))))))))}y.Header=function(e){var a=e.className,n=e.children;return t.createElement("header",{className:"\n ".concat("XydComponents-Component-layouts__LayoutHeader","\n ").concat(a,"\n ")},n)};export{y as Layout,c as LayoutPrimary};
|
|
2
|
+
//# sourceMappingURL=layouts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layouts.js","sources":["../src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx","../src/layouts/LayoutPrimary/LayoutPrimary.tsx","../src/layouts/Layout.styles.tsx","../src/layouts/Layout.tsx"],"sourcesContent":["import {css} from \"@linaria/core\";\n\nconst globalPageGutter = '8px';\nexport const globalHeaderHeight = '50px';\nconst globalHeaderWarningHeight = \"0px\";\nconst contentTopSpace = \"12px\";\n\nconst globalHeaderHeightWithSub = '94px';\n\nconst cubicMove = \"cubic-bezier(.65, 0, .35, 1)\";\nconst sidebarWidth = \"250px\";\n\nconst tabletBreakpoint = '1024px';\nconst mobileBreakpoint = '768px';\n\n// TODO: better solution - design tokens\nexport const globals = css`\n :global() {\n :root {\n --xyd-navbar-height: ${globalHeaderHeight};\n --xyd-global-page-gutter: ${globalPageGutter};\n --xyd-sidebar-width: ${sidebarWidth};\n }\n }\n`;\n\nexport const LayoutPrimaryHost = css`\n width: 100%;\n overflow-x: hidden;\n background: #fff;\n`;\n\nexport const LayoutPrimaryHeader = css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: fixed;\n top: ${globalHeaderWarningHeight};\n right: ${globalPageGutter};\n left: ${globalPageGutter};\n height: ${globalHeaderHeight};\n z-index: 20;\n background: #fff;\n\n @media (max-width: 768px) {\n padding: 0;\n }\n`;\n\nexport const LayoutPrimaryHeaderContent = css`\n display: flex;\n align-items: center;\n width: 100%;\n`;\n\nexport const LayoutPrimaryHeaderSub = css`\n flex-direction: column;\n height: ${globalHeaderHeightWithSub};\n transition: transform 200ms;\n`;\n\nexport const LayoutPrimaryHeaderHideMain = css`\n transform: translateY(calc(-${globalHeaderHeight} + 3px));\n`;\n\nexport const LayoutPrimaryHamburgerButton = css`\n display: none;\n\n @media (max-width: 768px) {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: none;\n cursor: pointer;\n padding: 0;\n }\n`;\n\nexport const LayoutPrimaryHamburgerIcon = css`\n width: 24px;\n height: 24px;\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n`;\n\nexport const LayoutPrimaryHamburgerLine = css`\n width: 100%;\n height: 2px;\n background: #000;\n transition: transform 0.3s ${cubicMove};\n`;\n\nexport const LayoutPrimaryHamburgerLineOpen = css`\n &:first-child {\n transform: translateY(11px) rotate(45deg);\n }\n &:nth-child(2) {\n opacity: 0;\n }\n &:last-child {\n transform: translateY(-11px) rotate(-45deg);\n }\n`;\n\nexport const LayoutPrimaryMain = css`\n position: fixed;\n display: flex;\n top: calc(${globalHeaderHeight} + ${globalHeaderWarningHeight});\n bottom: 0;\n left: 0;\n right: 0;\n padding: ${globalPageGutter};\n overflow: hidden;\n\n @media (max-width: ${tabletBreakpoint}) {\n padding-top: calc(${globalHeaderHeight} + ${globalHeaderWarningHeight} + ${globalPageGutter});\n }\n`;\n\nexport const LayoutPrimaryMainSub = css`\n top: calc(${globalHeaderHeightWithSub} + ${globalHeaderWarningHeight});\n\n @media (max-width: ${tabletBreakpoint}) {\n padding-top: calc(${globalHeaderHeightWithSub} + ${globalHeaderWarningHeight} + ${globalPageGutter});\n }\n`;\n\nexport const LayoutPrimaryStaticSidebar = css`\n flex: none;\n width: ${sidebarWidth};\n background: #fff;\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n \n @media (max-width: ${tabletBreakpoint}) {\n display: none;\n }\n`;\n\nexport const LayoutPrimaryMobileSidebar = css`\n display: none;\n\n @media (max-width: ${tabletBreakpoint}) {\n display: flex;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: ${sidebarWidth};\n background: #fff;\n flex-direction: column;\n z-index: 50;\n transform: translateX(-100%);\n transition: transform .3s ${cubicMove};\n box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1);\n }\n`;\n\nexport const LayoutPrimaryMobileSidebarOpen = css`\n @media (max-width: ${tabletBreakpoint}) {\n transform: translateX(0);\n }\n`;\n\nexport const LayoutPrimarySidebarContent = css`\n flex: 1;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n height: 100%;\n`;\n\nexport const LayoutPrimaryCloseButton = css`\n position: absolute;\n top: 12px;\n right: 12px;\n width: 32px;\n height: 32px;\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const LayoutPrimarySearchInput = css`\n width: 100%;\n height: 40px;\n padding: 0 12px;\n border: 1px solid #eaeaea;\n border-radius: 6px;\n font-size: 14px;\n outline: none;\n transition: border-color 0.2s;\n\n &:focus {\n border-color: #666;\n }\n`;\n\nexport const LayoutPrimaryCloseIcon = css`\n width: 20px;\n height: 20px;\n position: relative;\n\n &::before,\n &::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n width: 100%;\n height: 2px;\n background: #666;\n transform-origin: center;\n }\n\n &::before {\n transform: rotate(45deg);\n }\n\n &::after {\n transform: rotate(-45deg);\n }\n`;\n\nexport const LayoutPrimaryOverlay = css`\n display: none;\n\n @media (max-width: ${tabletBreakpoint}) {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.6);\n transition: opacity .3s;\n opacity: 0;\n pointer-events: none;\n z-index: 40;\n height: 100vh;\n }\n`;\n\nexport const LayoutPrimaryOverlayVisible = css`\n opacity: 1;\n pointer-events: auto;\n`;\n\nexport const LayoutPrimaryPageHost = css`\n position: relative;\n flex: 1;\n background: #fff;\n overflow: hidden;\n min-width: 0;\n height: 100%;\n`;\n\nexport const LayoutPrimaryPageScroll = css`\n overflow-y: auto;\n height: 100%;\n -webkit-overflow-scrolling: touch;\n padding: 0 48px;\n\n @media (max-width: ${tabletBreakpoint}) {\n padding: 0 32px;\n }\n\n @media (max-width: ${mobileBreakpoint}) {\n padding: 0 24px;\n }\n`;\n\nexport const LayoutPrimaryPageContainer = css`\n max-width: 1000px;\n margin: 0 auto;\n padding: 0 ${globalPageGutter};\n`;\n\nexport const LayoutPrimaryPageContainerLarge = css`\n max-width: 1200px;\n`;\n\nexport const LayoutPrimaryPageArticleContainer = css`\n display: flex;\n gap: 48px;\n padding: 48px 0;\n min-height: 100%;\n\n @media (max-width: ${tabletBreakpoint}) {\n gap: 32px;\n }\n\n @media (max-width: ${mobileBreakpoint}) {\n flex-direction: column;\n padding: 24px 0;\n gap: 24px;\n }\n`;\n\nexport const LayoutPrimaryArticleHost = css`\n flex: 1;\n min-width: 0;\n`;\n\nexport const LayoutPrimaryArticleContent = css`\n width: 100%;\n`;\n\nexport const LayoutPrimaryArticleNav = css`\n flex: none;\n width: 256px;\n position: sticky;\n top: 0;\n height: fit-content;\n max-height: 100vh;\n overflow-y: auto;\n padding-right: 24px;\n padding-top: ${contentTopSpace};\n\n @media (max-width: ${tabletBreakpoint}) {\n width: 200px;\n padding-right: 16px;\n }\n\n @media (max-width: ${mobileBreakpoint}) {\n width: 100%;\n position: static;\n max-height: none;\n padding-right: 0;\n }\n`;","import React, {useEffect, useState} from \"react\"\n\nimport * as cn from \"./LayoutPrimary.styles\"\n\nexport interface LayoutPrimaryProps {\n header: React.ReactNode;\n aside: React.ReactNode;\n content: React.ReactNode;\n contentNav?: React.ReactNode;\n\n subheader?: React.ReactNode;\n layoutSize?: \"large\"\n}\n\n// TODO: move scroller to xyd-foo\nexport function LayoutPrimary(props: LayoutPrimaryProps) {\n const [isMobileNavOpen, setIsMobileNavOpen] = useState(false)\n\n const {hideMainHeader} = props.subheader ? useSubHeader() : {hideMainHeader: false}\n\n return <div className={cn.LayoutPrimaryHost}>\n <header className={` \n ${cn.LayoutPrimaryHeader}\n ${props.subheader && cn.LayoutPrimaryHeaderSub}\n ${hideMainHeader && cn.LayoutPrimaryHeaderHideMain}\n `}>\n <div className={cn.LayoutPrimaryHeaderContent}>\n {props.header}\n <button\n className={cn.LayoutPrimaryHamburgerButton}\n onClick={() => setIsMobileNavOpen(!isMobileNavOpen)}\n aria-label=\"Toggle navigation menu\"\n >\n <div className={cn.LayoutPrimaryHamburgerIcon}>\n <span\n className={`${cn.LayoutPrimaryHamburgerLine} ${isMobileNavOpen ? cn.LayoutPrimaryHamburgerLineOpen : ''}`}/>\n <span\n className={`${cn.LayoutPrimaryHamburgerLine} ${isMobileNavOpen ? cn.LayoutPrimaryHamburgerLineOpen : ''}`}/>\n <span\n className={`${cn.LayoutPrimaryHamburgerLine} ${isMobileNavOpen ? cn.LayoutPrimaryHamburgerLineOpen : ''}`}/>\n </div>\n </button>\n </div>\n {props.subheader}\n </header>\n\n {/* Mobile Drawer Sidebar */}\n <div\n className={`${cn.LayoutPrimaryOverlay} ${isMobileNavOpen ? cn.LayoutPrimaryOverlayVisible : ''}`}\n onClick={() => setIsMobileNavOpen(false)}\n />\n <aside className={`\n ${cn.LayoutPrimaryMobileSidebar}\n ${isMobileNavOpen ? cn.LayoutPrimaryMobileSidebarOpen : ''}\n `}>\n <div className={cn.LayoutPrimarySidebarContent}>\n {props.aside}\n </div>\n <button\n className={cn.LayoutPrimaryCloseButton}\n onClick={() => setIsMobileNavOpen(false)}\n aria-label=\"Close navigation menu\"\n >\n <div className={cn.LayoutPrimaryCloseIcon}/>\n </button>\n </aside>\n\n <main className={`\n ${cn.LayoutPrimaryMain}\n ${!hideMainHeader && props.subheader && cn.LayoutPrimaryMainSub}\n `}>\n {/* Desktop Static Sidebar */}\n <aside className={cn.LayoutPrimaryStaticSidebar}>\n {props.aside}\n </aside>\n\n <div className={cn.LayoutPrimaryPageHost}>\n <div className={cn.LayoutPrimaryPageScroll}>\n <div className={`\n ${cn.LayoutPrimaryPageContainer}\n ${props.layoutSize == \"large\" && cn.LayoutPrimaryPageContainerLarge}\n `}>\n <div className={cn.LayoutPrimaryPageArticleContainer}>\n <article className={cn.LayoutPrimaryArticleHost}>\n <section className={cn.LayoutPrimaryArticleContent}>\n {props.content}\n </section>\n </article>\n {props.contentNav && <nav className={cn.LayoutPrimaryArticleNav}>\n {props.contentNav}\n </nav>}\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n}\n\n// TODO: move to `xyd-foo` or somewhere else\nfunction useSubHeader() {\n const [hideMainHeader, setHideMainHeader] = useState(false)\n const [scrollTop, setScrollTop] = useState(0)\n const [controlScrollPos, setControlScrollPos] = useState(0)\n\n useEffect(() => {\n if (scrollTop === controlScrollPos) {\n return\n }\n\n const checkpoint = parseInt(cn.globalHeaderHeight, 10) / 2\n const diff = scrollTop - controlScrollPos\n const reversePosDiff = Math.abs(scrollTop - controlScrollPos)\n\n if (diff > checkpoint) {\n setHideMainHeader(true)\n } else if (reversePosDiff > checkpoint) {\n setHideMainHeader(false)\n }\n }, [\n scrollTop,\n controlScrollPos,\n ]);\n\n function onScroll(e: Event) {\n if (!(e.target instanceof HTMLElement)) {\n return\n }\n\n const scroll = e.target?.scrollTop\n setScrollTop(scroll)\n }\n\n function onScrollFinish(e: Event) {\n if (!(e.target instanceof HTMLElement)) {\n return\n }\n\n setControlScrollPos(e.target?.scrollTop)\n }\n\n // TODO: by ref?\n // TODO: MOVE SOMEWHERE ELSE BECAUSE IT DECREASE PERFORMANCE (RERENDER)\n useEffect(() => {\n document.querySelector(`.${cn.LayoutPrimaryPageScroll}`)?.addEventListener(\"scroll\", onScroll)\n document.querySelector(`.${cn.LayoutPrimaryPageScroll}`)?.addEventListener(\"scrollend\", onScrollFinish)\n\n return () => {\n document.querySelector(`.${cn.LayoutPrimaryPageScroll}`)?.removeEventListener(\"scroll\", onScroll)\n document.querySelector(`.${cn.LayoutPrimaryPageScroll}`)?.removeEventListener(\"scrollend\", onScrollFinish)\n }\n }, []);\n\n return {\n hideMainHeader,\n }\n}","import {css} from \"@linaria/core\";\n\nconst globalPageGutter = '8px';\nexport const globalHeaderHeight = '40px';\nconst globalHeaderWarningHeight = \"0px\";\nconst contentTopSpace = \"12px\";\n\nconst globalHeaderHeightWithSub = '94px';\n\nconst cubicMove = \"cubic-bezier(.65, 0, .35, 1)\";\nconst sidebarWidth = \"210px\";\n\n// TODO: better solution - design tokens\nexport const globals = css`\n :global() {\n :root {\n --xyd-navbar-height: ${globalHeaderHeight};\n --xyd-global-page-gutter: ${globalPageGutter};\n }\n }\n`;\n\nexport const LayoutHost = css`\n width: 100%;\n`;\n\nexport const LayoutHeader = css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n position: fixed;\n top: ${globalHeaderWarningHeight};\n right: ${globalPageGutter};\n left: ${globalPageGutter};\n\n height: ${globalHeaderHeight};\n`;\n\nexport const LayoutHeaderSub = css`\n flex-direction: column;\n height: ${globalHeaderHeightWithSub};\n transition: transform 200ms;\n`;\n\nexport const LayoutHeaderHideMain = css`\n transform: translateY(calc(-${globalHeaderHeight} + 3px));\n`;\n\nexport const LayoutMain = css`\n position: fixed;\n top: calc(${globalHeaderHeight} + ${globalHeaderWarningHeight});\n bottom: ${globalPageGutter};\n left: ${globalPageGutter};\n right: ${globalPageGutter};\n}`;\n\nexport const LayoutMainSub = css`\n top: calc(${globalHeaderHeightWithSub} + ${globalHeaderWarningHeight});\n transition: top 200ms;\n`;\n\nexport const LayoutSidebar = css`\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 101;\n width: ${sidebarWidth};\n border: 0;\n padding: ${contentTopSpace} 0 0;\n overflow: visible;\n background: none;\n border-radius: 0;\n opacity: 1;\n visibility: visible;\n transition: opacity .3s ${cubicMove};\n`;\n\nexport const PageHost = css`\n position: absolute;\n top: ${contentTopSpace};\n right: 0;\n bottom: 0;\n z-index: 201;\n background: #fff;\n\n //border-radius: 8px;\n //border: 1px solid #ececf1;\n\n overflow: hidden;\n transition: opacity .3s ${cubicMove};\n\n left: ${sidebarWidth};\n`;\n\nexport const PageScroll = css`\n //position: absolute;\n //top: 0;\n //right: 0;\n //bottom: 0;\n //left: 0;\n //overflow: auto;\n\n overflow: scroll;\n height: 100%;\n`;\n\nexport const PageContainer = css`\n padding: 0;\n width: 100%;\n //position: relative; TODO: unset if during client render?\n min-height: 100%;\n\n max-width: 100%;\n margin: 0 auto;\n font-size: 15px;\n line-height: 24px;\n`;\n\nexport const PageArticleContainer = css`\n width: 980px;\n padding: 40px 56px;\n padding-top: 20px;\n max-width: 100%;\n margin: 0 auto;\n`;\n\nexport const PageArticleContainerFullWidth = css`\n width: 1200px;\n`;\n\nexport const ArticleHost = css`\n display: flex;\n gap: 30px;\n width: 100%;\n align-items: flex-start;;\n`;\n\nexport const ArticleContent = css`\n flex: 1 1 0;\n overflow: hidden;\n`;\n\nexport const ArticleNav = css`\n position: sticky;\n top: 30px;\n width: 180px;\n margin-top: 0;\n margin-left: 50px;\n padding-left: 16px;\n flex: none;\n`;","import React, {useEffect, useState} from \"react\"\n\nimport * as cn from \"./Layout.styles\"\n\nexport interface LayoutProps {\n header: React.ReactNode;\n aside: React.ReactNode;\n content: React.ReactNode;\n contentNav: React.ReactNode;\n subheader?: boolean;\n kind?: \"fullwidth\"\n}\n\nexport function Layout(props: LayoutProps) {\n const [hideMainHeader, setHideMainHeader] = useState(false)\n const [scrollTop, setScrollTop] = useState(0)\n const [controlScrollPos, setControlScrollPos] = useState(0)\n\n useEffect(() => {\n if (scrollTop === controlScrollPos) {\n return\n }\n\n const checkpoint = parseInt(cn.globalHeaderHeight, 10) / 2\n const diff = scrollTop - controlScrollPos\n const reversePosDiff = Math.abs(scrollTop - controlScrollPos)\n\n if (diff > checkpoint) {\n setHideMainHeader(true)\n } else if (reversePosDiff > checkpoint) {\n setHideMainHeader(false)\n }\n }, [\n scrollTop,\n controlScrollPos,\n ]);\n\n function onScroll(e: Event) {\n if (!(e.target instanceof HTMLElement)) {\n return\n }\n\n const scroll = e.target?.scrollTop\n setScrollTop(scroll)\n }\n\n function onScrollFinish(e: Event) {\n if (!(e.target instanceof HTMLElement)) {\n return\n }\n\n setControlScrollPos(e.target?.scrollTop)\n }\n\n // TODO: by ref?\n // TODO: MOVE SOMEWHERE ELSE BECAUSE IT DECREASE PERFORMANCE (RERENDER)\n useEffect(() => {\n // return // TODO: UNCOMMENT\n\n if (!props.subheader) {\n return\n }\n\n document.querySelector(`.${cn.PageScroll}`)?.addEventListener(\"scroll\", onScroll)\n document.querySelector(`.${cn.PageScroll}`)?.addEventListener(\"scrollend\", onScrollFinish)\n\n return () => {\n document.querySelector(`.${cn.PageScroll}`)?.removeEventListener(\"scroll\", onScroll)\n document.querySelector(`.${cn.PageScroll}`)?.removeEventListener(\"scrollend\", onScrollFinish)\n }\n }, []);\n\n return <div className={cn.LayoutHost}>\n <Layout.Header className={`\n ${props.subheader && cn.LayoutHeaderSub}\n ${hideMainHeader && cn.LayoutHeaderHideMain}\n `}>\n {props.header}\n </Layout.Header>\n <main className={`\n ${cn.LayoutMain}\n ${!hideMainHeader && props.subheader && cn.LayoutMainSub}\n `}>\n <aside className={cn.LayoutSidebar}>\n {props.aside}\n </aside>\n <div className={cn.PageHost}>\n <div className={cn.PageScroll}>\n <div className={cn.PageContainer}>\n <div className={`\n ${cn.PageArticleContainer}\n ${props.kind == \"fullwidth\" && cn.PageArticleContainerFullWidth}\n `}>\n <article className={cn.ArticleHost}>\n <section className={cn.ArticleContent}>\n {props.content}\n </section>\n {\n props.contentNav && <nav className={cn.ArticleNav}>\n {props.contentNav}\n </nav>\n }\n </article>\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n}\n\nLayout.Header = function LayoutHeader({className, children}: { className?: string, children: React.ReactNode }) {\n return <header className={`\n ${cn.LayoutHeader}\n ${className}\n `}>\n {children}\n </header>\n}\n"],"names":["globalHeaderHeight","LayoutPrimaryHamburgerLine","LayoutPrimaryHamburgerLineOpen","LayoutPrimaryPageScroll","LayoutPrimary","props","_useState","useState","_useState2","_slicedToArray","isMobileNavOpen","setIsMobileNavOpen","_ref","subheader","_useState3","_useState4","hideMainHeader","setHideMainHeader","_useState5","_useState6","scrollTop","setScrollTop","_useState7","_useState8","controlScrollPos","setControlScrollPos","onScroll","e","target","HTMLElement","scroll","_a","onScrollFinish","useEffect","checkpoint","parseInt","cn","diff","reversePosDiff","Math","abs","document","querySelector","concat","addEventListener","_b","removeEventListener","useSubHeader","React","createElement","className","header","onClick","aside","layoutSize","content","contentNav","PageScroll","Layout","Header","kind","children"],"mappings":"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"}
|
package/dist/pages.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ interface HomePageProps {
|
|
|
27
27
|
}
|
|
28
28
|
declare function HomePage(props: HomePageProps): React.JSX.Element;
|
|
29
29
|
|
|
30
|
-
export { HomePage
|
|
30
|
+
export { HomePage };
|
|
31
|
+
export type { HomePageProps, IHomePageFeature, IHomePageHero, IHomePageHeroAction };
|
package/dist/pages.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import"./tslib.es6-BI9zka_a.js";import"@radix-ui/react-icons";import{G as t}from"./UnderlineNav-9lJPvnIp.js";import{C as o,B as r}from"./CTABanner-n3vc4xW5.js";import{H as n}from"./HomeView-TDx2tcP_.js";import"./_rollupPluginBabelHelpers-C8nLsqZ7.js";import"@radix-ui/react-tabs";import"lucide-react";function i(t){var o;return e.createElement(n,{header:t.header,body:e.createElement(n.Body,null,e.createElement(l,Object.assign({},t)),(null===(o=t.hero)||void 0===o?void 0:o.actions)&&e.createElement(a,Object.assign({},t)),t.children),footer:t.footer})}function l(t){var n,i,l,a,d,c,s="string"==typeof(null===(n=t.hero)||void 0===n?void 0:n.subtitle)?t.hero.subtitle:(null===(l=null===(i=t.hero)||void 0===i?void 0:i.subtitle)||void 0===l?void 0:l.toString())||"";return e.createElement(o,null,e.createElement(o.Heading,{title:(null===(a=t.hero)||void 0===a?void 0:a.text)||"",subtitle:s}),(null===(d=null==t?void 0:t.hero)||void 0===d?void 0:d.actions)&&e.createElement(o.ButtonGroup,null,null===(c=null==t?void 0:t.hero)||void 0===c?void 0:c.actions.map((function(t,o){return e.createElement("a",{href:t.href},e.createElement(r,{key:t.text+o,kind:t.kind},t.text))}))))}function a(o){var r;return e.createElement("div",{className:"\n ".concat("XydComponents-Component-pages-HomePage__HomePageCardsHost","\n xyd_page-comp-homepage-cards\n ")},null===(r=o.features)||void 0===r?void 0:r.map((function(o,r){return e.createElement(t,{key:o.title+r,href:o.href||"",title:o.title,icon:o.icon,kind:"secondary",size:"md"},o.description)})))}export{i as HomePage};
|
|
2
|
+
//# sourceMappingURL=pages.js.map
|