@xyd-js/components 0.1.0-build.168
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/.idea/git_toolbox_blame.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/xyd-components.iml +12 -0
- package/CHANGELOG.md +1369 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/TODO.md +1 -0
- package/coder.ts +1 -0
- package/content.ts +1 -0
- package/dist/Button-BLA2ghHZ.js +2 -0
- package/dist/Button-BLA2ghHZ.js.map +1 -0
- package/dist/Button-BTJ2hIal.js +2 -0
- package/dist/Button-BTJ2hIal.js.map +1 -0
- package/dist/Button-r4BCrEjy.js +2 -0
- package/dist/Button-r4BCrEjy.js.map +1 -0
- package/dist/CodeSample-BZ5tvyWY.js +2 -0
- package/dist/CodeSample-BZ5tvyWY.js.map +1 -0
- package/dist/CodeSample-BqXDbWdi.js +2 -0
- package/dist/CodeSample-BqXDbWdi.js.map +1 -0
- package/dist/CodeSample-Cqv86IdN.js +2 -0
- package/dist/CodeSample-Cqv86IdN.js.map +1 -0
- package/dist/Icon--77MqplU.js +2 -0
- package/dist/Icon--77MqplU.js.map +1 -0
- package/dist/Icon-DbNmvK_Q.js +2 -0
- package/dist/Icon-DbNmvK_Q.js.map +1 -0
- package/dist/Icon-uVIU1LW6.js +2 -0
- package/dist/Icon-uVIU1LW6.js.map +1 -0
- package/dist/PageFirstSlide-BDNmCTiJ.js +2 -0
- package/dist/PageFirstSlide-BDNmCTiJ.js.map +1 -0
- package/dist/PageFirstSlide-BpZ42bEU.js +2 -0
- package/dist/PageFirstSlide-BpZ42bEU.js.map +1 -0
- package/dist/PageFirstSlide-CqxiyK57.js +2 -0
- package/dist/PageFirstSlide-CqxiyK57.js.map +1 -0
- package/dist/TabsAnalytics-B_JYpawG.js +2 -0
- package/dist/TabsAnalytics-B_JYpawG.js.map +1 -0
- package/dist/TabsAnalytics-DAOfTZgv.js +2 -0
- package/dist/TabsAnalytics-DAOfTZgv.js.map +1 -0
- package/dist/TabsAnalytics-Dhyadlbu.js +2 -0
- package/dist/TabsAnalytics-Dhyadlbu.js.map +1 -0
- package/dist/Update-53fEhmjh.js +2 -0
- package/dist/Update-53fEhmjh.js.map +1 -0
- package/dist/Update-CFi6uapq.js +2 -0
- package/dist/Update-CFi6uapq.js.map +1 -0
- package/dist/Update-CiMIOgZi.js +2 -0
- package/dist/Update-CiMIOgZi.js.map +1 -0
- package/dist/VideoGuide-C0K9fFar.js +2 -0
- package/dist/VideoGuide-C0K9fFar.js.map +1 -0
- package/dist/VideoGuide-CJYkuLst.js +2 -0
- package/dist/VideoGuide-CJYkuLst.js.map +1 -0
- package/dist/VideoGuide-DBY-EyxG.js +2 -0
- package/dist/VideoGuide-DBY-EyxG.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-CvhQFv1t.js +4 -0
- package/dist/_rollupPluginBabelHelpers-CvhQFv1t.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-DSwDY1Dm.js +4 -0
- package/dist/_rollupPluginBabelHelpers-DSwDY1Dm.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-Dc-ocx4G.js +4 -0
- package/dist/_rollupPluginBabelHelpers-Dc-ocx4G.js.map +1 -0
- package/dist/coder/themes/classic.css +57 -0
- package/dist/coder/themes/classic.d.ts +96 -0
- package/dist/coder/themes/classic.js +2 -0
- package/dist/coder/themes/classic.js.map +1 -0
- package/dist/coder/themes/cosmo.css +64 -0
- package/dist/coder/themes/cosmo.d.ts +96 -0
- package/dist/coder/themes/cosmo.js +2 -0
- package/dist/coder/themes/cosmo.js.map +1 -0
- package/dist/coder.d.ts +94 -0
- package/dist/coder.js +2 -0
- package/dist/coder.js.map +1 -0
- package/dist/content.d.ts +411 -0
- package/dist/content.js +2 -0
- package/dist/content.js.map +1 -0
- package/dist/index.css +282 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts.d.ts +33 -0
- package/dist/layouts.js +2 -0
- package/dist/layouts.js.map +1 -0
- package/dist/pages.d.ts +176 -0
- package/dist/pages.js +2 -0
- package/dist/pages.js.map +1 -0
- package/dist/system.d.ts +45 -0
- package/dist/system.js +2 -0
- package/dist/system.js.map +1 -0
- package/dist/useUXClick-DK3cTAMR.js +2 -0
- package/dist/useUXClick-DK3cTAMR.js.map +1 -0
- package/dist/useUXClick-DO6qBcRy.js +2 -0
- package/dist/useUXClick-DO6qBcRy.js.map +1 -0
- package/dist/useUXClick-NwpsiuK9.js +2 -0
- package/dist/useUXClick-NwpsiuK9.js.map +1 -0
- package/dist/useUXEvents-CJtgGV4R.js +2 -0
- package/dist/useUXEvents-CJtgGV4R.js.map +1 -0
- package/dist/useUXEvents-Cxgl7xb-.js +2 -0
- package/dist/useUXEvents-Cxgl7xb-.js.map +1 -0
- package/dist/useUXEvents-XqAGxoEj.js +2 -0
- package/dist/useUXEvents-XqAGxoEj.js.map +1 -0
- package/dist/useUXScrollDepth-3rk3Z95r.js +2 -0
- package/dist/useUXScrollDepth-3rk3Z95r.js.map +1 -0
- package/dist/useUXScrollDepth-BwK-XOBg.js +2 -0
- package/dist/useUXScrollDepth-BwK-XOBg.js.map +1 -0
- package/dist/useUXScrollDepth-DKre7PBz.js +2 -0
- package/dist/useUXScrollDepth-DKre7PBz.js.map +1 -0
- package/dist/uxsdk.d.ts +53 -0
- package/dist/uxsdk.js +2 -0
- package/dist/uxsdk.js.map +1 -0
- package/dist/views.d.ts +18 -0
- package/dist/views.js +2 -0
- package/dist/views.js.map +1 -0
- package/dist/writer.d.ts +580 -0
- package/dist/writer.js +2 -0
- package/dist/writer.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1640 -0
- package/docs/functions/GuideCard.html +6 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +2 -0
- package/docs/interfaces/GuideCardProps.html +18 -0
- package/docs/modules.html +1 -0
- package/index.ts +0 -0
- package/layouts.ts +1 -0
- package/output.txt +13 -0
- package/package.json +81 -0
- package/pages.ts +1 -0
- package/postcss.config.cjs +5 -0
- package/rollup.config.js +195 -0
- package/src/coder/Code/Code.styles.tsx +151 -0
- package/src/coder/Code/Code.tsx +171 -0
- package/src/coder/Code/CodeLoader.tsx +10 -0
- package/src/coder/Code/annotations.tsx +51 -0
- package/src/coder/Code/highlight.ts +208 -0
- package/src/coder/Code/index.ts +16 -0
- package/src/coder/CodeCopy/CodeCopy.styles.tsx +21 -0
- package/src/coder/CodeCopy/CodeCopy.tsx +36 -0
- package/src/coder/CodeCopy/index.ts +7 -0
- package/src/coder/CodeSample/CodeSample.tsx +118 -0
- package/src/coder/CodeSample/CodeSampleAnalytics.tsx +112 -0
- package/src/coder/CodeSample/index.ts +11 -0
- package/src/coder/CodeSample/withLocalStored.tsx +50 -0
- package/src/coder/CodeTabs/CodeTabs.styles.tsx +126 -0
- package/src/coder/CodeTabs/CodeTabs.tsx +128 -0
- package/src/coder/CodeTabs/index.ts +6 -0
- package/src/coder/CodeTheme/CodeTheme.tsx +126 -0
- package/src/coder/CodeTheme/index.ts +7 -0
- package/src/coder/CoderProvider.tsx +26 -0
- package/src/coder/README.md +1 -0
- package/src/coder/hooks/highlight.ts +182 -0
- package/src/coder/index.ts +37 -0
- package/src/coder/themes/classic.css +57 -0
- package/src/coder/themes/classic.ts +270 -0
- package/src/coder/themes/cosmo.css +64 -0
- package/src/coder/themes/cosmo.ts +264 -0
- package/src/content/AppearanceDecorator.styles.tsx +11 -0
- package/src/content/ContentDecoator.styles.tsx +180 -0
- package/src/content/ContentDecorator.tsx +17 -0
- package/src/content/GridDecorator.styles.tsx +86 -0
- package/src/content/GridDecorator.tsx +23 -0
- package/src/content/ReactContent.tsx +671 -0
- package/src/content/TODO.md +1 -0
- package/src/content/index.ts +13 -0
- package/src/kit/Loader/Loader.styles.tsx +53 -0
- package/src/kit/Loader/Loader.tsx +22 -0
- package/src/kit/TODO.md +2 -0
- package/src/kit/index.ts +1 -0
- package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +325 -0
- package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +252 -0
- package/src/layouts/LayoutPrimary/index.ts +3 -0
- package/src/layouts/index.ts +6 -0
- package/src/pages/PageBlogHome/PageBlogHome.styles.tsx +67 -0
- package/src/pages/PageBlogHome/PageBlogHome.tsx +64 -0
- package/src/pages/PageBlogHome/index.ts +3 -0
- package/src/pages/PageBlogHome/types.ts +35 -0
- package/src/pages/PageBlogPost/PageBlogPost.styles.tsx +4 -0
- package/src/pages/PageBlogPost/PageBlogPost.tsx +9 -0
- package/src/pages/PageBlogPost/index.ts +3 -0
- package/src/pages/PageFirstSlide/PageFirstSlide.styles.tsx +134 -0
- package/src/pages/PageFirstSlide/PageFirstSlide.tsx +56 -0
- package/src/pages/PageFirstSlide/index.ts +1 -0
- package/src/pages/PageFirstSlide/types.ts +67 -0
- package/src/pages/PageHome/PageHome.styles.tsx +51 -0
- package/src/pages/PageHome/PageHome.tsx +62 -0
- package/src/pages/PageHome/index.ts +3 -0
- package/src/pages/PageHome/types.ts +79 -0
- package/src/pages/index.ts +7 -0
- package/src/system/Baseline/Baseline.styles.tsx +128 -0
- package/src/system/Baseline/Baseline.tsx +40 -0
- package/src/system/Baseline/bun.svg +1 -0
- package/src/system/Baseline/check.svg +1 -0
- package/src/system/Baseline/index.ts +1 -0
- package/src/system/Baseline/logo.svg +1 -0
- package/src/system/Baseline/node.svg +7 -0
- package/src/system/Baseline/npm.svg +5 -0
- package/src/system/Baseline/pnpm.svg +1 -0
- package/src/system/Footer/Footer.styles.tsx +213 -0
- package/src/system/Footer/Footer.tsx +105 -0
- package/src/system/Footer/index.ts +1 -0
- package/src/system/SearchButton/SearchButton.styles.tsx +89 -0
- package/src/system/SearchButton/SearchButton.tsx +118 -0
- package/src/system/SearchButton/index.ts +1 -0
- package/src/system/index.ts +3 -0
- package/src/utils/useStyle.ts +19 -0
- package/src/uxsdk/const.ts +1 -0
- package/src/uxsdk/index.ts +21 -0
- package/src/uxsdk/useUXClick.ts +21 -0
- package/src/uxsdk/useUXEvents.ts +105 -0
- package/src/uxsdk/useUXScrollDepth.ts +49 -0
- package/src/uxsdk/useUXUnreachableElementTracker.ts +100 -0
- package/src/views/HomeView/HomeView.styles.tsx +37 -0
- package/src/views/HomeView/HomeView.tsx +34 -0
- package/src/views/HomeView/index.ts +3 -0
- package/src/writer/Anchor/Anchor.styles.tsx +26 -0
- package/src/writer/Anchor/Anchor.tsx +51 -0
- package/src/writer/Anchor/index.tsx +1 -0
- package/src/writer/Badge/Badge.styles.tsx +44 -0
- package/src/writer/Badge/Badge.tsx +47 -0
- package/src/writer/Badge/index.ts +7 -0
- package/src/writer/Banner/Banner.styles.tsx +111 -0
- package/src/writer/Banner/Banner.tsx +151 -0
- package/src/writer/Banner/index.ts +1 -0
- package/src/writer/Blockquote/Blockquote.styles.tsx +20 -0
- package/src/writer/Blockquote/Blockquote.tsx +38 -0
- package/src/writer/Blockquote/index.ts +7 -0
- package/src/writer/BlogCard/BlogCard.styles.tsx +4 -0
- package/src/writer/BlogCard/BlogCard.tsx +9 -0
- package/src/writer/BlogCard/index.ts +3 -0
- package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +24 -0
- package/src/writer/Breadcrumbs/Breadcrumbs.tsx +57 -0
- package/src/writer/Breadcrumbs/index.ts +7 -0
- package/src/writer/Button/Button.styles.tsx +149 -0
- package/src/writer/Button/Button.tsx +82 -0
- package/src/writer/Button/index.ts +2 -0
- package/src/writer/Callout/Callout.styles.tsx +102 -0
- package/src/writer/Callout/Callout.tsx +166 -0
- package/src/writer/Callout/index.tsx +3 -0
- package/src/writer/Card/Card.styles.tsx +110 -0
- package/src/writer/Card/Card.tsx +94 -0
- package/src/writer/Card/index.ts +1 -0
- package/src/writer/Code/Code.styles.tsx +16 -0
- package/src/writer/Code/Code.tsx +16 -0
- package/src/writer/Code/index.ts +3 -0
- package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +191 -0
- package/src/writer/ColorSchemeButton/index.ts +1 -0
- package/src/writer/Details/Details.styles.tsx +101 -0
- package/src/writer/Details/Details.tsx +168 -0
- package/src/writer/Details/DetailsProps.tsx +34 -0
- package/src/writer/Details/index.ts +6 -0
- package/src/writer/GuideCard/GuideCard.styles.tsx +129 -0
- package/src/writer/GuideCard/GuideCard.tsx +123 -0
- package/src/writer/GuideCard/index.ts +1 -0
- package/src/writer/Heading/Heading.styles.tsx +93 -0
- package/src/writer/Heading/Heading.tsx +123 -0
- package/src/writer/Heading/index.ts +7 -0
- package/src/writer/Hr/Hr.styles.tsx +7 -0
- package/src/writer/Hr/Hr.tsx +10 -0
- package/src/writer/Hr/index.ts +3 -0
- package/src/writer/Icon/Icon.styles.tsx +15 -0
- package/src/writer/Icon/Icon.tsx +99 -0
- package/src/writer/Icon/index.ts +1 -0
- package/src/writer/IconSocial/IconSocial.tsx +107 -0
- package/src/writer/IconSocial/index.ts +1 -0
- package/src/writer/Image/Image.styles.tsx +9 -0
- package/src/writer/Image/Image.tsx +35 -0
- package/src/writer/Image/index.ts +1 -0
- package/src/writer/List/List.styles.tsx +47 -0
- package/src/writer/List/List.tsx +29 -0
- package/src/writer/List/index.ts +4 -0
- package/src/writer/NavLinks/NavLinks.styles.ts +32 -0
- package/src/writer/NavLinks/NavLinks.tsx +95 -0
- package/src/writer/NavLinks/index.ts +7 -0
- package/src/writer/Pre/Pre.styles.tsx +13 -0
- package/src/writer/Pre/Pre.tsx +14 -0
- package/src/writer/Pre/index.ts +3 -0
- package/src/writer/README.md +1 -0
- package/src/writer/Steps/Steps.styles.tsx +91 -0
- package/src/writer/Steps/Steps.tsx +75 -0
- package/src/writer/Steps/index.ts +5 -0
- package/src/writer/Table/Table.styles.tsx +100 -0
- package/src/writer/Table/Table.tsx +158 -0
- package/src/writer/Table/index.ts +3 -0
- package/src/writer/Tabs/Tabs.tsx +67 -0
- package/src/writer/Tabs/TabsAnalytics.tsx +25 -0
- package/src/writer/Tabs/TabsPrimary.styles.tsx +187 -0
- package/src/writer/Tabs/TabsPrimary.tsx +215 -0
- package/src/writer/Tabs/TabsProps.tsx +13 -0
- package/src/writer/Tabs/TabsSecondary.styles.tsx +78 -0
- package/src/writer/Tabs/TabsSecondary.tsx +176 -0
- package/src/writer/Tabs/index.ts +2 -0
- package/src/writer/Tabs/useValueChange.ts +84 -0
- package/src/writer/Text/Text.styles.tsx +66 -0
- package/src/writer/Text/Text.tsx +79 -0
- package/src/writer/Text/index.ts +3 -0
- package/src/writer/TocCard/TocCard.module.css +44 -0
- package/src/writer/TocCard/TocCard.tsx +42 -0
- package/src/writer/TocCard/index.ts +3 -0
- package/src/writer/Update/Update.styles.tsx +33 -0
- package/src/writer/Update/Update.tsx +37 -0
- package/src/writer/Update/index.ts +1 -0
- package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
- package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
- package/src/writer/VideoGuide/index.ts +1 -0
- package/src/writer/index.ts +53 -0
- package/system.ts +1 -0
- package/tsconfig.json +46 -0
- package/types.d.ts +52 -0
- package/uxsdk.ts +1 -0
- package/views.ts +2 -0
- package/writer.ts +1 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Social } from "@xyd-js/core"
|
|
4
|
+
|
|
5
|
+
export interface IconSocialProps extends React.SVGProps<SVGSVGElement> {
|
|
6
|
+
kind: Social
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function IconSocial({ kind, ...props }: IconSocialProps) {
|
|
10
|
+
switch (kind) {
|
|
11
|
+
case "x":
|
|
12
|
+
return <IconSocial.Twitter {...props} />
|
|
13
|
+
case "facebook":
|
|
14
|
+
return <IconSocial.Facebook {...props} />
|
|
15
|
+
case "youtube":
|
|
16
|
+
return <IconSocial.Youtube {...props} />
|
|
17
|
+
case "discord":
|
|
18
|
+
return <IconSocial.Discord {...props} />
|
|
19
|
+
case "slack":
|
|
20
|
+
return <IconSocial.Slack {...props} />
|
|
21
|
+
case "github":
|
|
22
|
+
return <IconSocial.Github {...props} />
|
|
23
|
+
case "linkedin":
|
|
24
|
+
return <IconSocial.Linkedin {...props} />
|
|
25
|
+
case "instagram":
|
|
26
|
+
return <IconSocial.Intagram {...props} />
|
|
27
|
+
case "hackernews":
|
|
28
|
+
return <IconSocial.HackerNews {...props} />
|
|
29
|
+
case "medium":
|
|
30
|
+
return <IconSocial.Medium {...props} />
|
|
31
|
+
case "telegram":
|
|
32
|
+
return <IconSocial.Telegram {...props} />
|
|
33
|
+
case "bluesky":
|
|
34
|
+
return <IconSocial.Bluesky {...props} />
|
|
35
|
+
case "reddit":
|
|
36
|
+
return <IconSocial.Reddit {...props} />
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return null
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
IconSocial.Twitter = function IconSocialTwitter(props: React.SVGProps<SVGSVGElement>) {
|
|
43
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 512 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
44
|
+
<path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" />
|
|
45
|
+
</svg>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
IconSocial.Facebook = function IconSocialFacebook(props: React.SVGProps<SVGSVGElement>) {
|
|
49
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 512 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
50
|
+
<path d="M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z" />
|
|
51
|
+
</svg>
|
|
52
|
+
}
|
|
53
|
+
IconSocial.Youtube = function IconSocialYoutube(props: React.SVGProps<SVGSVGElement>) {
|
|
54
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 576 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
55
|
+
<path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" />
|
|
56
|
+
</svg>
|
|
57
|
+
}
|
|
58
|
+
IconSocial.Discord = function IconSocialDiscord(props: React.SVGProps<SVGSVGElement>) {
|
|
59
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 640 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
60
|
+
<path d="M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z" />
|
|
61
|
+
</svg>
|
|
62
|
+
}
|
|
63
|
+
IconSocial.Slack = function IconSocialSlack(props: React.SVGProps<SVGSVGElement>) {
|
|
64
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 448 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
65
|
+
<path d="M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z" />
|
|
66
|
+
</svg>
|
|
67
|
+
}
|
|
68
|
+
IconSocial.Github = function IconSocialGithub(props: React.SVGProps<SVGSVGElement>) {
|
|
69
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 496 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
70
|
+
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" />
|
|
71
|
+
</svg>
|
|
72
|
+
}
|
|
73
|
+
IconSocial.Linkedin = function IconSocialLinkedin(props: React.SVGProps<SVGSVGElement>) {
|
|
74
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 448 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
75
|
+
<path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z" />
|
|
76
|
+
</svg>
|
|
77
|
+
}
|
|
78
|
+
IconSocial.Intagram = function IconSocialIntagram(props: React.SVGProps<SVGSVGElement>) {
|
|
79
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 448 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
80
|
+
<path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z" />
|
|
81
|
+
</svg>
|
|
82
|
+
}
|
|
83
|
+
IconSocial.HackerNews = function IconSocialHackerNews(props: React.SVGProps<SVGSVGElement>) {
|
|
84
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 448 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
85
|
+
<path d="M0 32v448h448V32H0zm21.2 197.2H21c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4zm218 53.9V384h-31.4V281.3L128 128h37.3c52.5 98.3 49.2 101.2 59.3 125.6 12.3-27 5.8-24.4 60.6-125.6H320l-80.8 155.1z" />
|
|
86
|
+
</svg>
|
|
87
|
+
}
|
|
88
|
+
IconSocial.Medium = function IconSocialMedium(props: React.SVGProps<SVGSVGElement>) {
|
|
89
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 640 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
90
|
+
<path d="M180.5,74.262C80.813,74.262,0,155.633,0,256S80.819,437.738,180.5,437.738,361,356.373,361,256,280.191,74.262,180.5,74.262Zm288.25,10.646c-49.845,0-90.245,76.619-90.245,171.095s40.406,171.1,90.251,171.1,90.251-76.619,90.251-171.1H559C559,161.5,518.6,84.908,468.752,84.908Zm139.506,17.821c-17.526,0-31.735,68.628-31.735,153.274s14.2,153.274,31.735,153.274S640,340.631,640,256C640,171.351,625.785,102.729,608.258,102.729Z" />
|
|
91
|
+
</svg>
|
|
92
|
+
}
|
|
93
|
+
IconSocial.Telegram = function IconSocialTelegram(props: React.SVGProps<SVGSVGElement>) {
|
|
94
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 496 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
95
|
+
<path d="M248,8C111.033,8,0,119.033,0,256S111.033,504,248,504,496,392.967,496,256,384.967,8,248,8ZM362.952,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z" />
|
|
96
|
+
</svg>
|
|
97
|
+
}
|
|
98
|
+
IconSocial.Bluesky = function IconSocialBluesky(props: React.SVGProps<SVGSVGElement>) {
|
|
99
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 576 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
100
|
+
<path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3 .5-6.6 1-10 1.4C74.3 308.6-9.1 342.8 100.3 464.5C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z" />
|
|
101
|
+
</svg>
|
|
102
|
+
}
|
|
103
|
+
IconSocial.Reddit = function IconSocialReddit(props: React.SVGProps<SVGSVGElement>) {
|
|
104
|
+
return <svg xmlns="http://www.w3.org/2000/svg" color="currentColor" width="24" height="24" viewBox="0 0 512 512" style={{color: "currentcolor", fill: "currentcolor"}} {...props}>
|
|
105
|
+
<path d="M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" />
|
|
106
|
+
</svg>
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./IconSocial"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import * as cn from "./Image.styles"
|
|
6
|
+
|
|
7
|
+
export interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
8
|
+
src: string
|
|
9
|
+
alt: string
|
|
10
|
+
style?: React.CSSProperties
|
|
11
|
+
caption?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function Image(props: ImageProps) {
|
|
15
|
+
const { src, alt, style, caption, children, ...rest } = props
|
|
16
|
+
|
|
17
|
+
const img = <img
|
|
18
|
+
src={src}
|
|
19
|
+
alt={alt}
|
|
20
|
+
style={style}
|
|
21
|
+
className={cn.ImageHost}
|
|
22
|
+
{...rest}
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
if (!caption) {
|
|
26
|
+
return img
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return <>
|
|
30
|
+
<figure>
|
|
31
|
+
{img}
|
|
32
|
+
<figcaption>{caption}</figcaption>
|
|
33
|
+
</figure>
|
|
34
|
+
</>
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Image } from "./Image"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from '@linaria/core'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
List: css`
|
|
5
|
+
@layer defaults {
|
|
6
|
+
list-style: none;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
|
|
10
|
+
ol& {
|
|
11
|
+
list-style-type: decimal;
|
|
12
|
+
padding-inline-start: 1.625em;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`,
|
|
16
|
+
Item: css`
|
|
17
|
+
@layer defaults {
|
|
18
|
+
ul & {
|
|
19
|
+
margin-bottom: 0.5rem;
|
|
20
|
+
position: relative;
|
|
21
|
+
padding-inline-start: .375em;
|
|
22
|
+
padding-left: 2em !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* TODO: IN THE FUTURE BETTER SOLUTION IS NEEDED */
|
|
26
|
+
xyd-grid-decorator ul & {
|
|
27
|
+
padding-left: 0 !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ul &::before {
|
|
31
|
+
content: "";
|
|
32
|
+
width: .375em;
|
|
33
|
+
height: .375em;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 0.5em;
|
|
36
|
+
left: .5em;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
background-color: var(--xyd-list-item-bgcolor);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ol &::marker {
|
|
42
|
+
padding-inline-start: .375em;
|
|
43
|
+
color: var(--xyd-list-marker-color);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
import cn from "./List.styles";
|
|
4
|
+
|
|
5
|
+
export interface ListProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function List({ children }: ListProps) {
|
|
10
|
+
return <ul className={cn.List}>
|
|
11
|
+
{children}
|
|
12
|
+
</ul>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function ListOl({ children }: ListProps) {
|
|
16
|
+
return <ol className={cn.List}>
|
|
17
|
+
{children}
|
|
18
|
+
</ol>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ListItemProps {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function ListItem({ children }: ListItemProps) {
|
|
26
|
+
return <li className={cn.Item}>{children}</li>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
List.Item = ListItem;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const NavLinksHost = css`
|
|
4
|
+
@layer defaults {
|
|
5
|
+
font-weight: var(--xyd-font-weight-semibold);
|
|
6
|
+
display: flex;
|
|
7
|
+
padding-top: 2rem;
|
|
8
|
+
margin-top: 2rem;
|
|
9
|
+
margin-bottom: 2rem;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-top-width: 1px;
|
|
13
|
+
border-color: var(--xyd-navlinks-border-color);
|
|
14
|
+
|
|
15
|
+
[part="link"] {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
20
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
+
transition-duration: 300ms;
|
|
22
|
+
max-width: 50%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[part="icon"] {
|
|
26
|
+
display: inline;
|
|
27
|
+
height: 1.25rem;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
import * as cn from "./NavLinks.styles";
|
|
4
|
+
|
|
5
|
+
export interface NavLinksProps {
|
|
6
|
+
prev?: {
|
|
7
|
+
title: string
|
|
8
|
+
href: string
|
|
9
|
+
}
|
|
10
|
+
next?: {
|
|
11
|
+
title: string
|
|
12
|
+
href: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
as?: React.ElementType
|
|
16
|
+
|
|
17
|
+
className?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function NavLinks(
|
|
21
|
+
props: NavLinksProps
|
|
22
|
+
) {
|
|
23
|
+
const Link = props.as || $Anchor
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<xyd-navlinks
|
|
27
|
+
className={`${cn.NavLinksHost} ${props.className || ""}`}
|
|
28
|
+
>
|
|
29
|
+
{props.prev ? (
|
|
30
|
+
<Link
|
|
31
|
+
href={props.prev.href}
|
|
32
|
+
title={props.prev.title}
|
|
33
|
+
part="link"
|
|
34
|
+
>
|
|
35
|
+
<$ArrowLeftIcon part="icon"/>
|
|
36
|
+
{props.prev.title}
|
|
37
|
+
</Link>
|
|
38
|
+
) : <div/>}
|
|
39
|
+
{props.next && (
|
|
40
|
+
<Link
|
|
41
|
+
href={props.next.href}
|
|
42
|
+
title={props.next.title}
|
|
43
|
+
part="link"
|
|
44
|
+
>
|
|
45
|
+
{props.next.title}
|
|
46
|
+
<$ArrowRightIcon part="icon"/>
|
|
47
|
+
</Link>
|
|
48
|
+
)}
|
|
49
|
+
</xyd-navlinks>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
function $Anchor({children, ...rest}) {
|
|
55
|
+
return <a {...rest}>
|
|
56
|
+
{children}
|
|
57
|
+
</a>
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
function $ArrowRightIcon(props: React.SVGProps<SVGSVGElement>) {
|
|
62
|
+
return <svg
|
|
63
|
+
width={15}
|
|
64
|
+
height={15}
|
|
65
|
+
viewBox="0 0 15 15"
|
|
66
|
+
fill="none"
|
|
67
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
68
|
+
{...props}
|
|
69
|
+
>
|
|
70
|
+
<path
|
|
71
|
+
d="M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z"
|
|
72
|
+
fill="currentColor"
|
|
73
|
+
fillRule="evenodd"
|
|
74
|
+
clipRule="evenodd"
|
|
75
|
+
/>
|
|
76
|
+
</svg>
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function $ArrowLeftIcon(props: React.SVGProps<SVGSVGElement>) {
|
|
80
|
+
return <svg
|
|
81
|
+
width={15}
|
|
82
|
+
height={15}
|
|
83
|
+
viewBox="0 0 15 15"
|
|
84
|
+
fill="none"
|
|
85
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
86
|
+
{...props}
|
|
87
|
+
>
|
|
88
|
+
<path
|
|
89
|
+
d="M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z"
|
|
90
|
+
fill="currentColor"
|
|
91
|
+
fillRule="evenodd"
|
|
92
|
+
clipRule="evenodd"
|
|
93
|
+
/>
|
|
94
|
+
</svg>
|
|
95
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
import * as cn from "./Pre.styles"
|
|
4
|
+
|
|
5
|
+
export interface PreProps {
|
|
6
|
+
children: React.ReactNode
|
|
7
|
+
className?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Pre({ children, className }: PreProps) {
|
|
11
|
+
return <pre className={`${cn.PreHost} ${className || ""}`}>
|
|
12
|
+
{children}
|
|
13
|
+
</pre>
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @xyd-js/components/writer
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { css } from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
const bulletPx = 24;
|
|
4
|
+
const lineWidth = 0.5;
|
|
5
|
+
|
|
6
|
+
export const StepsHost = css`
|
|
7
|
+
display: block;
|
|
8
|
+
|
|
9
|
+
@layer defaults {
|
|
10
|
+
ol {
|
|
11
|
+
padding-left: 0;
|
|
12
|
+
list-style: none;
|
|
13
|
+
counter-reset: ordered-listitem;
|
|
14
|
+
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 6px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
&[data-kind="secondary"] {
|
|
22
|
+
li {
|
|
23
|
+
margin-bottom: 32px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
li::before {
|
|
27
|
+
content: "";
|
|
28
|
+
position: absolute;
|
|
29
|
+
border: ${lineWidth}px solid var(--dark32);
|
|
30
|
+
height: 100%;
|
|
31
|
+
top: calc(${bulletPx}px + 6px);
|
|
32
|
+
left: calc(${bulletPx}px / 2 - (${lineWidth}px / 2));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export const StepsItem = css`
|
|
39
|
+
@layer defaults {
|
|
40
|
+
li {
|
|
41
|
+
padding-left: 32px;
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part="title"] {
|
|
46
|
+
display: block;
|
|
47
|
+
margin-bottom: 32px;
|
|
48
|
+
font-weight: var(--xyd-font-weight-medium);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-numeric="true"] {
|
|
52
|
+
li::after {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
counter-increment: ordered-listitem;
|
|
57
|
+
content: counter(ordered-listitem);
|
|
58
|
+
|
|
59
|
+
background: var(--xyd-steps-marker-bgcolor);
|
|
60
|
+
color: var(--xyd-steps-marker-color);
|
|
61
|
+
font-size: var(--xyd-font-size-xsmall);
|
|
62
|
+
line-height: var(--xyd-line-height-medium);
|
|
63
|
+
font-weight: var(--xyd-font-weight-medium);
|
|
64
|
+
text-align: center;
|
|
65
|
+
height: ${bulletPx}px;
|
|
66
|
+
width: ${bulletPx}px;
|
|
67
|
+
border-radius: 12px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[part="step"] {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
|
|
76
|
+
background: var(--xyd-steps-marker-bgcolor);
|
|
77
|
+
color: var(--xyd-steps-marker-color);
|
|
78
|
+
font-size: var(--xyd-font-size-xsmall);
|
|
79
|
+
line-height: var(--xyd-line-height-medium);
|
|
80
|
+
font-weight: var(--xyd-font-weight-medium);
|
|
81
|
+
text-align: center;
|
|
82
|
+
height: ${bulletPx}px;
|
|
83
|
+
width: ${bulletPx}px;
|
|
84
|
+
border-radius: 12px;
|
|
85
|
+
|
|
86
|
+
svg {
|
|
87
|
+
width: 12px !important; // TODO: remove !important
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
import * as cn from "./Steps.styles";
|
|
4
|
+
import { Icon } from "../Icon"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Steps component
|
|
8
|
+
*/
|
|
9
|
+
export interface StepsProps {
|
|
10
|
+
/** Content to be rendered inside the steps list */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
|
|
13
|
+
/** Optional CSS class name to be applied to the steps container */
|
|
14
|
+
className?: string;
|
|
15
|
+
|
|
16
|
+
/** Optional kind of steps to be rendered */
|
|
17
|
+
kind?: "secondary" | undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Steps component that renders a numbered list of steps or stages.
|
|
22
|
+
* Use this component to display a sequence of steps in a process or workflow.
|
|
23
|
+
*
|
|
24
|
+
* @category Component
|
|
25
|
+
*/
|
|
26
|
+
export function Steps({ children, className, kind }: StepsProps) {
|
|
27
|
+
return <xyd-steps
|
|
28
|
+
data-kind={kind}
|
|
29
|
+
className={`${cn.StepsHost} ${className || ""}`}
|
|
30
|
+
>
|
|
31
|
+
<ol>
|
|
32
|
+
{children}
|
|
33
|
+
</ol>
|
|
34
|
+
</xyd-steps>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Props for the Steps.Item component
|
|
39
|
+
*/
|
|
40
|
+
export interface StepsItemProps {
|
|
41
|
+
/** Content to be rendered inside the step item */
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
|
|
44
|
+
/** Optional icon to be displayed in the step item */
|
|
45
|
+
icon?: string | React.ReactNode;
|
|
46
|
+
|
|
47
|
+
/** Optional title to be displayed in the step item */
|
|
48
|
+
title?: string;
|
|
49
|
+
|
|
50
|
+
/** Optional CSS class name to be applied to the step item */
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Individual step item component that represents a single step in the sequence.
|
|
56
|
+
* This component should be used as a child of the Steps component.
|
|
57
|
+
*
|
|
58
|
+
* @category Component
|
|
59
|
+
*/
|
|
60
|
+
Steps.Item = function StepsItem({ children, icon, title, className }: StepsItemProps) {
|
|
61
|
+
const iconElement = typeof icon === "string" ? <Icon name={icon} /> : icon;
|
|
62
|
+
|
|
63
|
+
return <xyd-steps-item
|
|
64
|
+
className={`${cn.StepsItem} ${className || ""}`}
|
|
65
|
+
data-numeric={!icon ? "true" : undefined}
|
|
66
|
+
>
|
|
67
|
+
<li>
|
|
68
|
+
{title && <span part="title">{title}</span>}
|
|
69
|
+
|
|
70
|
+
{children}
|
|
71
|
+
|
|
72
|
+
{iconElement && <span part="step">{iconElement}</span>}
|
|
73
|
+
</li>
|
|
74
|
+
</xyd-steps-item>
|
|
75
|
+
}
|