@xyd-js/storybook 0.0.1-xyd.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.storybook/main.ts +59 -0
  2. package/.storybook/preview.ts +30 -0
  3. package/.storybook/styles.css +5 -0
  4. package/CHANGELOG.md +12 -0
  5. package/README.md +50 -0
  6. package/eslint.config.js +28 -0
  7. package/package.json +50 -0
  8. package/src/content/Icons.tsx +83 -0
  9. package/src/content/code-sample.mdx +15 -0
  10. package/src/content/hello-world.mdx +116 -0
  11. package/src/docs/atlas/Atlas.stories.tsx +47 -0
  12. package/src/docs/atlas/todo-app.uniform.json +625 -0
  13. package/src/docs/atlas/uniform-to-references.ts +101 -0
  14. package/src/docs/components/brand/Button.stories.tsx +32 -0
  15. package/src/docs/components/brand/CTABanner.stories.tsx +36 -0
  16. package/src/docs/components/coder/CodeSample.stories.tsx +26 -0
  17. package/src/docs/components/writer/Badge.stories.tsx +32 -0
  18. package/src/docs/components/writer/Breadcrumbs.stories.tsx +34 -0
  19. package/src/docs/components/writer/Callout.stories.tsx +25 -0
  20. package/src/docs/components/writer/GuideCard.stories.tsx +151 -0
  21. package/src/docs/components/writer/Heading.stories.tsx +52 -0
  22. package/src/docs/components/writer/NavLinks.stories.tsx +31 -0
  23. package/src/docs/components/writer/Pre.stories.tsx +23 -0
  24. package/src/docs/components/writer/Steps.stories.tsx +27 -0
  25. package/src/docs/components/writer/Table.stories.tsx +54 -0
  26. package/src/docs/templates/CodeSample.stories.tsx +15 -0
  27. package/src/docs/themes/logo.tsx +37 -0
  28. package/src/docs/themes/themes-designsystem.stories.tsx +156 -0
  29. package/src/docs/themes/themes.stories.tsx +261 -0
  30. package/src/docs/ui/Nav.stories.tsx +58 -0
  31. package/src/docs/ui/Sidebar.stories.tsx +161 -0
  32. package/src/docs/ui/SubNav.stories.tsx +29 -0
  33. package/src/utils/mdx.ts +31 -0
  34. package/storybook-static/assets/Atlas.stories-CXIW65Hs.js +255 -0
  35. package/storybook-static/assets/Badge.stories-xjDbGZ5c.js +21 -0
  36. package/storybook-static/assets/Breadcrumbs.stories-DUn-OgPN.js +21 -0
  37. package/storybook-static/assets/Button.stories-BUAUswSC.js +21 -0
  38. package/storybook-static/assets/CTABanner-7_fa6QIU-6vh6ca3a.js +4 -0
  39. package/storybook-static/assets/CTABanner.stories-D5CtnW6h.js +22 -0
  40. package/storybook-static/assets/Callout.stories-DonqcNeI.js +16 -0
  41. package/storybook-static/assets/CodeSample.stories-4-beIs6I.js +22 -0
  42. package/storybook-static/assets/CodeSample.stories-B8_z15cp.js +8 -0
  43. package/storybook-static/assets/Color-F6OSRLHC-D5TfMBnc.js +1 -0
  44. package/storybook-static/assets/DocsRenderer-CFRXHY34-BrPAHo60.js +730 -0
  45. package/storybook-static/assets/GuideCard.stories-B8wFh9oh.js +65 -0
  46. package/storybook-static/assets/Heading.stories-D82-EGrg.js +40 -0
  47. package/storybook-static/assets/Nav.stories-CM_STIcN.js +13 -0
  48. package/storybook-static/assets/NavLinks.stories-D0QuD0H3.js +19 -0
  49. package/storybook-static/assets/Pre.stories-1WB_X0Ix.js +11 -0
  50. package/storybook-static/assets/Sidebar.stories-CwyChgiy.js +9 -0
  51. package/storybook-static/assets/Steps.stories-gANyLY_H.js +16 -0
  52. package/storybook-static/assets/SubNav.stories-D5TbjJj2.js +19 -0
  53. package/storybook-static/assets/Table.stories-BSZMHwDX.js +43 -0
  54. package/storybook-static/assets/UnderlineNav-C0OvjpyZ-D7c5zIhU.js +41 -0
  55. package/storybook-static/assets/_rollupPluginBabelHelpers-CAjWVhpp-BWJe-8U1.js +4 -0
  56. package/storybook-static/assets/browser.esm-BOPNWGdv.js +20 -0
  57. package/storybook-static/assets/chevron-right-Dfa2nijf.js +31 -0
  58. package/storybook-static/assets/chunk-K6AXKMTT-DXBwE8Vx.js +12 -0
  59. package/storybook-static/assets/chunk-XP5HYGXS-DH4vAeCa.js +1 -0
  60. package/storybook-static/assets/client-jctswkVR.js +25 -0
  61. package/storybook-static/assets/content-DfDGXctA.js +8 -0
  62. package/storybook-static/assets/entry-preview-Com-SXI0.js +10 -0
  63. package/storybook-static/assets/entry-preview-docs-Bs0lZRn3.js +47 -0
  64. package/storybook-static/assets/entry-preview-rsc-56ExrKd2.js +1 -0
  65. package/storybook-static/assets/iframe-B0k8DGQG.js +2 -0
  66. package/storybook-static/assets/index-B-gRCko5.js +1 -0
  67. package/storybook-static/assets/index-B0Jt8usF.js +9 -0
  68. package/storybook-static/assets/index-CBUcM4bS.js +8 -0
  69. package/storybook-static/assets/index-CC-8bvy6.js +9 -0
  70. package/storybook-static/assets/index-CQ7VjfMi.js +1 -0
  71. package/storybook-static/assets/index-Cu4lwwaE.js +1 -0
  72. package/storybook-static/assets/index-DIXNDbo9.js +1 -0
  73. package/storybook-static/assets/index-D_kIG38s.js +1 -0
  74. package/storybook-static/assets/index-DthG7GmK.js +17 -0
  75. package/storybook-static/assets/index-ogSvIofg.js +6 -0
  76. package/storybook-static/assets/jsx-runtime-C-_spy54.js +9 -0
  77. package/storybook-static/assets/layouts-CHVz-oC2.js +15 -0
  78. package/storybook-static/assets/preview--rrl-Bev.js +234 -0
  79. package/storybook-static/assets/preview-B3PTUHS7.js +1 -0
  80. package/storybook-static/assets/preview-CFgKly6U.js +1 -0
  81. package/storybook-static/assets/preview-CsjPNNCI.js +1 -0
  82. package/storybook-static/assets/preview-DFfOCnyz.css +1 -0
  83. package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
  84. package/storybook-static/assets/preview-DY_pW_WS.js +396 -0
  85. package/storybook-static/assets/preview-NdwLIjRI.js +2 -0
  86. package/storybook-static/assets/preview-RFMnorYX.js +1 -0
  87. package/storybook-static/assets/preview-Zk6Lo_wo.js +1 -0
  88. package/storybook-static/assets/preview-iUmqt_lp.js +34 -0
  89. package/storybook-static/assets/react-18-C4NQogKe.js +1 -0
  90. package/storybook-static/assets/themes-designsystem.stories-DyoY6VQ9.js +11 -0
  91. package/storybook-static/assets/themes.stories-BUr1Iju1.js +41 -0
  92. package/storybook-static/assets/writer-BQ7yPg-n.js +4 -0
  93. package/storybook-static/favicon.svg +1 -0
  94. package/storybook-static/iframe.html +639 -0
  95. package/storybook-static/index.html +186 -0
  96. package/storybook-static/index.json +1 -0
  97. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  98. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  99. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  100. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  101. package/storybook-static/project.json +1 -0
  102. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +331 -0
  103. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +51 -0
  104. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +3 -0
  105. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js.LEGAL.txt +0 -0
  106. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +12 -0
  107. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js.LEGAL.txt +0 -0
  108. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +391 -0
  109. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js.LEGAL.txt +0 -0
  110. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +3 -0
  111. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js.LEGAL.txt +0 -0
  112. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +3 -0
  113. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js.LEGAL.txt +0 -0
  114. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +3 -0
  115. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js.LEGAL.txt +0 -0
  116. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +3 -0
  117. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js.LEGAL.txt +0 -0
  118. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +210 -0
  119. package/storybook-static/sb-addons/interactions-11/manager-bundle.js.LEGAL.txt +0 -0
  120. package/storybook-static/sb-addons/links-2/manager-bundle.js +3 -0
  121. package/storybook-static/sb-addons/links-2/manager-bundle.js.LEGAL.txt +0 -0
  122. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +127 -0
  123. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js.LEGAL.txt +12 -0
  124. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  125. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  126. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  127. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  128. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  129. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  130. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  131. package/storybook-static/sb-manager/globals-module-info.js +1028 -0
  132. package/storybook-static/sb-manager/globals-runtime.js +40861 -0
  133. package/storybook-static/sb-manager/globals.js +48 -0
  134. package/storybook-static/sb-manager/runtime.js +13338 -0
  135. package/storybook-static/sb-preview/globals.js +33 -0
  136. package/storybook-static/sb-preview/runtime.js +7174 -0
  137. package/tsconfig.app.json +24 -0
  138. package/tsconfig.json +17 -0
  139. package/tsconfig.node.json +13 -0
  140. package/tsconfig.tsbuildinfo +1 -0
  141. package/vite.config.ts +8 -0
@@ -0,0 +1,101 @@
1
+ // TODO: move to utils or somewhere else
2
+ import React from "react";
3
+ import {parse} from "codehike";
4
+ import {visit} from "unist-util-visit";
5
+ import {recmaCodeHike, remarkCodeHike} from "codehike/mdx";
6
+ import {compile as mdxCompile} from "@mdx-js/mdx";
7
+
8
+ import {Reference} from "@xyd-js/uniform";
9
+ import {
10
+ compile as compileMarkdown,
11
+ referenceAST
12
+ } from "@xyd-js/uniform/markdown";
13
+
14
+ import todoAppUniform from "./todo-app.uniform.json";
15
+ import {MDXReference} from "../../utils/mdx.ts";
16
+
17
+ // since unist does not support heading level > 6, we need to normalize them
18
+ function normalizeCustomHeadings() {
19
+ return (tree: any) => {
20
+ visit(tree, 'paragraph', (node, index, parent) => {
21
+ const match = node.children[0] && node.children[0].value.match(/^(#+)\s+(.*)/);
22
+ if (match) {
23
+ const level = match[1].length;
24
+ const text = match[2];
25
+ if (level > 6) {
26
+ // Create a new heading node with depth 6
27
+ const headingNode = {
28
+ type: 'heading',
29
+ depth: level,
30
+ children: [{type: 'text', value: text}]
31
+ };
32
+ // Replace the paragraph node with the new heading node
33
+ //@ts-ignore
34
+ parent.children[index] = headingNode;
35
+ }
36
+ }
37
+ });
38
+ };
39
+ }
40
+
41
+ const codeHikeOptions = {
42
+ lineNumbers: true,
43
+ showCopyButton: true,
44
+ autoImport: true,
45
+ components: {code: "Code"},
46
+ // syntaxHighlighting: { // TODO: !!! FROM SETTINGS !!! wait for rr7 rsc ??
47
+ // theme: "github-dark",
48
+ // },
49
+ };
50
+
51
+ async function compile(content: string): Promise<string> {
52
+ const compiled = await mdxCompile(content, {
53
+ remarkPlugins: [normalizeCustomHeadings, [remarkCodeHike, codeHikeOptions]],
54
+ recmaPlugins: [
55
+ [recmaCodeHike, codeHikeOptions]
56
+ ],
57
+ outputFormat: 'function-body',
58
+ development: false,
59
+ });
60
+
61
+ return String(compiled)
62
+ }
63
+
64
+ // TODO: move below to content?
65
+ function getMDXComponent(code: string) {
66
+ const mdxExport = getMDXExport(code)
67
+ return mdxExport.default
68
+ }
69
+
70
+ function getMDXExport(code: string) {
71
+ const scope = {
72
+ Fragment: React.Fragment,
73
+ jsxs: React.createElement,
74
+ jsx: React.createElement,
75
+ jsxDEV: React.createElement,
76
+ }
77
+ const fn = new Function(...Object.keys(scope), code)
78
+ return fn(scope)
79
+ }
80
+
81
+ export async function uniformToReferences(): Promise<MDXReference<Reference[]> | []> {
82
+ let content: string = ""
83
+
84
+ for (const ref of todoAppUniform as Reference[]) {
85
+ const ast = referenceAST(ref)
86
+ const md = compileMarkdown(ast)
87
+
88
+ content += md + "\n"
89
+ }
90
+
91
+ const compiled = await compile(content)
92
+ const contentCode = getMDXComponent(compiled)
93
+
94
+ const parsedContent = contentCode ? parse(contentCode) : null
95
+
96
+ if (parsedContent) {
97
+ return parsedContent.references
98
+ }
99
+
100
+ return []
101
+ }
@@ -0,0 +1,32 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {Button} from "@xyd-js/components/brand";
5
+
6
+ export default {
7
+ title: 'Components/Brand/Button',
8
+ } as Meta;
9
+
10
+ export const Default = () => {
11
+ return <div style={{
12
+ padding: "100px",
13
+ paddingTop: "0px",
14
+ margin: "0 auto",
15
+ }}>
16
+ <Button>
17
+ Primary
18
+ </Button>
19
+ </div>
20
+ }
21
+
22
+ export const Secondary = () => {
23
+ return <div style={{
24
+ padding: "100px",
25
+ paddingTop: "0px",
26
+ margin: "0 auto",
27
+ }}>
28
+ <Button kind="secondary">
29
+ Secondary
30
+ </Button>
31
+ </div>
32
+ }
@@ -0,0 +1,36 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {CTABanner, Button} from "@xyd-js/components/brand";
5
+
6
+ export default {
7
+ title: 'Components/Brand/CTABanner',
8
+ } as Meta;
9
+
10
+ export const Default = () => {
11
+ return <div style={{
12
+ padding: "100px",
13
+ paddingTop: "0px",
14
+ margin: "0 auto",
15
+ }}>
16
+ <CTABanner>
17
+ <CTABanner.Heading
18
+ title="XYD"
19
+ headingEffect
20
+ subtitle={<>
21
+ Build documentation websites <br/>
22
+ <strong>better</strong>
23
+ </>}
24
+ />
25
+ <CTABanner.ButtonGroup>
26
+ <Button kind="secondary">
27
+ Quickstart
28
+ </Button>
29
+ <Button>
30
+ Github
31
+ </Button>
32
+ </CTABanner.ButtonGroup>
33
+ </CTABanner>
34
+ </div>
35
+ }
36
+
@@ -0,0 +1,26 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+ import {MemoryRouter} from "react-router";
4
+
5
+ import getContentComponents from "@xyd-js/components/content";
6
+
7
+ import Content from "../../../content/code-sample.mdx";
8
+
9
+ export default {
10
+ title: 'Components/Coder/CodeSample',
11
+ decorators: [
12
+ (Story) => <MemoryRouter>
13
+ <Story/>
14
+ </MemoryRouter>
15
+ ]
16
+ } as Meta;
17
+
18
+ export const Default = async () => {
19
+ return <div style={{
20
+ padding: "100px",
21
+ paddingTop: "0px",
22
+ margin: "0 auto",
23
+ }}>
24
+ <Content components={getContentComponents()}/>
25
+ </div>
26
+ }
@@ -0,0 +1,32 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {Badge} from "@xyd-js/components/writer";
5
+
6
+ export default {
7
+ title: 'Components/Writer/Badge',
8
+ } as Meta;
9
+
10
+ export const Default = () => {
11
+ return <div style={{
12
+ padding: "100px",
13
+ paddingTop: "0px",
14
+ margin: "0 auto",
15
+ }}>
16
+ <Badge kind="">
17
+ Default
18
+ </Badge>
19
+ </div>
20
+ }
21
+
22
+ export const Warning = () => {
23
+ return <div style={{
24
+ padding: "100px",
25
+ paddingTop: "0px",
26
+ margin: "0 auto",
27
+ }}>
28
+ <Badge kind="warning">
29
+ Warning
30
+ </Badge>
31
+ </div>
32
+ }
@@ -0,0 +1,34 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Breadcrumbs,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/Breadcrumbs',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <div style={{width: 700}}>
19
+ <Breadcrumbs items={[
20
+ {
21
+ title: "Home",
22
+ href: "/",
23
+ },
24
+ {
25
+ title: "Docs",
26
+ href: "/docs",
27
+ },
28
+ {
29
+ title: "Components"
30
+ },
31
+ ]}/>
32
+ </div>
33
+ </div>
34
+ }
@@ -0,0 +1,25 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Callout,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/Callout',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <div style={{width: 700}}>
19
+ <Callout>
20
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis id sollicitudin diam. <br/>
21
+ Aliquam tincidunt quam quis ultrices gravida.In elit nisl, varius nec ligula nec.
22
+ </Callout>
23
+ </div>
24
+ </div>
25
+ }
@@ -0,0 +1,151 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ GuideCard,
6
+
7
+ IconSessionReplay,
8
+ IconMetrics
9
+ } from '@xyd-js/components/writer';
10
+
11
+ export default {
12
+ title: 'Components/Writer/GuideCard',
13
+ } as Meta;
14
+
15
+ export const Default = () => {
16
+ return <div style={{
17
+ padding: "100px",
18
+ paddingTop: "0px",
19
+ margin: "0 auto",
20
+ display: "flex",
21
+ flexDirection: "column",
22
+ gap: "30px",
23
+ }}>
24
+ <div style={{
25
+ display: "flex",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ gap: "30px",
29
+ }}>
30
+ <GuideCard
31
+ href="#"
32
+ icon={<IconSessionReplay/>}
33
+ title="Session Replay"
34
+ kind="secondary"
35
+ >
36
+ Visualize user interactions in your product with detailed session replays.
37
+ </GuideCard>
38
+
39
+
40
+ <GuideCard
41
+ icon={<IconMetrics/>}
42
+ title="Metrics Analysis"
43
+ >
44
+ Analyze key metrics to understand user behavior and optimize your product workflows.
45
+ </GuideCard>
46
+ </div>
47
+ </div>
48
+ }
49
+
50
+ export const Grid = () => {
51
+ return <div style={{
52
+ padding: "100px",
53
+ paddingTop: "0px",
54
+ margin: "0 auto",
55
+ display: "flex",
56
+ flexDirection: "column",
57
+ gap: "30px",
58
+ }}>
59
+ <GuideCard.List>
60
+ <GuideCard
61
+ href="#"
62
+ icon={<svg
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ width="1em"
65
+ height="1em"
66
+ viewBox="0 0 24 24"
67
+ fill="none"
68
+ >
69
+ <path
70
+ d="M22 9H2M2 7.8L2 16.2C2 17.8802 2 18.7202 2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21H17.2C18.8802 21 19.7202 21 20.362 20.673C20.9265 20.3854 21.3854 19.9265 21.673 19.362C22 18.7202 22 17.8802 22 16.2V7.8C22 6.11984 22 5.27977 21.673 4.63803C21.3854 4.07354 20.9265 3.6146 20.362 3.32698C19.7202 3 18.8802 3 17.2 3L6.8 3C5.11984 3 4.27976 3 3.63803 3.32698C3.07354 3.6146 2.6146 4.07354 2.32698 4.63803C2 5.27976 2 6.11984 2 7.8Z"
71
+ stroke="#000000"
72
+ strokeWidth={2}
73
+ strokeLinecap="round"
74
+ strokeLinejoin="round"
75
+ />
76
+ </svg>}
77
+ title="Browser API"
78
+ kind="secondary"
79
+ >
80
+ Capture user interactions like clicks, page views, and events directly from your app with minimal impact
81
+ on performance.
82
+ </GuideCard>
83
+
84
+ <GuideCard
85
+ href="#"
86
+ icon={<svg
87
+ xmlns="http://www.w3.org/2000/svg"
88
+ width="1em"
89
+ height="1em"
90
+ viewBox="0 0 16 16"
91
+ fill="none"
92
+ >
93
+ <path
94
+ fill="#000000"
95
+ fillRule="evenodd"
96
+ d="M.5 2.75a2.25 2.25 0 114.28.97l1.345 1.344.284-.284a2.25 2.25 0 013.182 0l.284.284 1.344-1.344a2.25 2.25 0 111.06 1.06l-1.343 1.345.284.284a2.25 2.25 0 010 3.182l-.284.284 1.344 1.344a2.25 2.25 0 11-1.06 1.06l-1.345-1.343-.284.284a2.25 2.25 0 01-3.182 0l-.284-.284-1.344 1.344a2.25 2.25 0 11-1.06-1.06l1.343-1.345-.284-.284a2.25 2.25 0 010-3.182l.284-.284L3.72 4.781A2.25 2.25 0 01.5 2.75zM2.75 2a.75.75 0 100 1.5.75.75 0 000-1.5zm0 10.5a.75.75 0 100 1.5.75.75 0 000-1.5zm9.75.75a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM13.25 2a.75.75 0 100 1.5.75.75 0 000-1.5zM7.47 5.841a.75.75 0 011.06 0L10.16 7.47a.75.75 0 010 1.06L8.53 10.16a.75.75 0 01-1.06 0L5.84 8.53a.75.75 0 010-1.06L7.47 5.84z"
97
+ clipRule="evenodd"
98
+ />
99
+ </svg>}
100
+ title="REST API"
101
+ kind="secondary"
102
+ >
103
+ Access and manage session data, events, and user journeys programmatically. Perfect for custom
104
+ dashboards and third-party integrations.
105
+ </GuideCard>
106
+
107
+ <GuideCard
108
+ href="#"
109
+ icon={
110
+ <svg
111
+ xmlns="http://www.w3.org/2000/svg"
112
+ fill="#000"
113
+ width="1em"
114
+ height="1em"
115
+ viewBox="0 0 32 32"
116
+ >
117
+ <path
118
+ d="M18.734 3.667l6.578 3.802c1.089-1.146 2.901-1.193 4.047-0.104 0.193 0.188 0.365 0.401 0.5 0.635 0.786 1.37 0.313 3.12-1.063 3.906-0.229 0.13-0.479 0.234-0.745 0.297v7.599c1.531 0.365 2.474 1.896 2.109 3.427-0.063 0.271-0.172 0.531-0.307 0.771-0.792 1.365-2.536 1.833-3.906 1.042-0.26-0.146-0.5-0.344-0.698-0.568l-6.542 3.776c0.495 1.495-0.318 3.109-1.813 3.604-0.292 0.099-0.594 0.146-0.896 0.146-1.573 0-2.854-1.271-2.854-2.849 0-0.271 0.042-0.547 0.12-0.813l-6.583-3.797c-1.089 1.141-2.896 1.188-4.036 0.094-1.135-1.089-1.177-2.891-0.094-4.031 0.38-0.396 0.865-0.677 1.396-0.807v-7.599c-1.531-0.365-2.479-1.906-2.109-3.443 0.063-0.266 0.167-0.521 0.302-0.755 0.786-1.365 2.536-1.833 3.901-1.042 0.234 0.135 0.453 0.302 0.641 0.5l6.583-3.797c-0.448-1.51 0.417-3.099 1.922-3.542 0.26-0.083 0.536-0.12 0.813-0.12 1.573 0 2.854 1.271 2.854 2.844 0 0.281-0.042 0.557-0.12 0.823zM18.047 4.839c-0.026 0.026-0.047 0.052-0.078 0.078l8.615 14.917c0.036-0.010 0.078-0.021 0.109-0.031v-7.609c-1.526-0.375-2.453-1.922-2.073-3.448 0.005-0.031 0.016-0.068 0.021-0.099zM14.026 4.917l-0.078-0.078-6.594 3.802c0.438 1.51-0.438 3.089-1.948 3.526-0.036 0.010-0.068 0.016-0.104 0.026v7.609l0.115 0.031 8.615-14.917zM16.797 5.594c-0.521 0.146-1.073 0.146-1.589 0l-8.615 14.917c0.391 0.375 0.667 0.859 0.802 1.391h17.214c0.13-0.531 0.406-1.016 0.802-1.396zM18.109 27.229l6.552-3.786c-0.021-0.063-0.036-0.125-0.052-0.188h-17.219l-0.031 0.109 6.589 3.802c0.516-0.536 1.245-0.87 2.052-0.87 0.839 0 1.589 0.359 2.109 0.932z"/>
119
+ </svg>
120
+ }
121
+ title="GraphqQL API"
122
+ kind="secondary"
123
+ >
124
+ Query session data, user interactions, and event tracking with precision. Build custom integrations to
125
+ enhance your product analytics.
126
+ </GuideCard>
127
+
128
+ <GuideCard
129
+ href="#"
130
+ icon={<svg
131
+ xmlns="http://www.w3.org/2000/svg"
132
+ xmlnsXlink="http://www.w3.org/1999/xlink"
133
+ width="1em"
134
+ height="1em"
135
+ viewBox="-10 -5 1034 1034"
136
+ >
137
+ <path
138
+ fill="#000000"
139
+ d="M482 226h-1l-10 2q-33 4 -64.5 18.5t-55.5 38.5q-41 37 -57 91q-9 30 -8 63t12 63q17 45 52 78l13 12l-83 135q-26 -1 -45 7q-30 13 -45 40q-7 15 -9 31t2 32q8 30 33 48q15 10 33 14.5t36 2t34.5 -12.5t27.5 -25q12 -17 14.5 -39t-5.5 -41q-1 -5 -7 -14l-3 -6l118 -192 q6 -9 8 -14l-10 -3q-9 -2 -13 -4q-23 -10 -41.5 -27.5t-28.5 -39.5q-17 -36 -9 -75q4 -23 17 -43t31 -34q37 -27 82 -27q27 -1 52.5 9.5t44.5 30.5q17 16 26.5 38.5t10.5 45.5q0 17 -6 42l70 19l8 1q14 -43 7 -86q-4 -33 -19.5 -63.5t-39.5 -53.5q-42 -42 -103 -56 q-6 -2 -18 -4l-14 -2h-37zM500 350q-17 0 -34 7t-30.5 20.5t-19.5 31.5q-8 20 -4 44q3 18 14 34t28 25q24 15 56 13q3 4 5 8l112 191q3 6 6 9q27 -26 58.5 -35.5t65 -3.5t58.5 26q32 25 43.5 61.5t0.5 73.5q-8 28 -28.5 50t-48.5 33q-31 13 -66.5 8.5t-63.5 -24.5 q-4 -3 -13 -10l-5 -6q-4 3 -11 10l-47 46q23 23 52 38.5t61 21.5l22 4h39l28 -5q64 -13 110 -60q22 -22 36.5 -50.5t19.5 -59.5q5 -36 -2 -71.5t-25 -64.5t-44 -51t-57 -35q-34 -14 -70.5 -16t-71.5 7l-17 5l-81 -137q13 -19 16 -37q5 -32 -13 -60q-16 -25 -44 -35 q-17 -6 -35 -6zM218 614q-58 13 -100 53q-47 44 -61 105l-4 24v37l2 11q2 13 4 20q7 31 24.5 59t42.5 49q50 41 115 49q38 4 76 -4.5t70 -28.5q53 -34 78 -91q7 -17 14 -45q6 -1 18 0l125 2q14 0 20 1q11 20 25 31t31.5 16t35.5 4q28 -3 50 -20q27 -21 32 -54 q2 -17 -1.5 -33t-13.5 -30q-16 -22 -41 -32q-17 -7 -35.5 -6.5t-35.5 7.5q-28 12 -43 37l-3 6q-14 0 -42 -1l-113 -1q-15 -1 -43 -1l-50 -1l3 17q8 43 -13 81q-14 27 -40 45t-57 22q-35 6 -70 -7.5t-57 -42.5q-28 -35 -27 -79q1 -37 23 -69q13 -19 32 -32t41 -19l9 -3z"
140
+ />
141
+ </svg>}
142
+ title="Webhooks"
143
+ kind="secondary"
144
+ >
145
+ Trigger actions or sync apps in real-time based on user behaviors or product events. Webhooks provide a
146
+ faster, more efficient alternative to API polling.
147
+ </GuideCard>
148
+ </GuideCard.List>
149
+ </div>
150
+ }
151
+
@@ -0,0 +1,52 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Heading
6
+ } from "@xyd-js/components/writer"
7
+
8
+ export default {
9
+ title: 'Components/Writer/Heading',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ display: "flex",
18
+ flexDirection: "column"
19
+ }}>
20
+ <div>
21
+ <Heading id="heading-1">
22
+ Heading 1
23
+ </Heading>
24
+ </div>
25
+ <div>
26
+ <Heading size={2} id="heading-2">
27
+ Heading 2
28
+ </Heading>
29
+ </div>
30
+ <div>
31
+ <Heading size={3} id="heading-3">
32
+ Heading 3
33
+ </Heading>
34
+ </div>
35
+ <div>
36
+ <Heading size={4} id="heading-4">
37
+ Heading 4
38
+ </Heading>
39
+ </div>
40
+ <div>
41
+ <Heading size={5} id="heading-5">
42
+ Heading 5
43
+ </Heading>
44
+ </div>
45
+ <div>
46
+ <Heading size={6} id="heading-6">
47
+ Heading 6
48
+ </Heading>
49
+ </div>
50
+ </div>
51
+ }
52
+
@@ -0,0 +1,31 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ NavLinks,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/NavLinks',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <div style={{width: 700}}>
19
+ <NavLinks
20
+ prev={{
21
+ title: "Previous",
22
+ href: "#"
23
+ }}
24
+ next={{
25
+ title: "Next",
26
+ href: "#"
27
+ }}
28
+ />
29
+ </div>
30
+ </div>
31
+ }
@@ -0,0 +1,23 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Pre
6
+ } from "@xyd-js/components/writer"
7
+
8
+ export default {
9
+ title: 'Components/Writer/Pre',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <Pre>
19
+ {`import {Pre} from '@xyd-js/components/coder'`}
20
+ </Pre>
21
+ </div>
22
+ }
23
+
@@ -0,0 +1,27 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Steps,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/Steps',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <Steps>
19
+ <Steps.Item>
20
+ First, you need to install the package.
21
+ </Steps.Item>
22
+ <Steps.Item>
23
+ Then you need to import the component.
24
+ </Steps.Item>
25
+ </Steps>
26
+ </div>
27
+ }
@@ -0,0 +1,54 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {
5
+ Table,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/Table',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <Table>
19
+ <Table.Th>
20
+ Name
21
+ </Table.Th>
22
+ <Table.Th>
23
+ Default
24
+ </Table.Th>
25
+ <Table.Th>
26
+ Description
27
+ </Table.Th>
28
+
29
+ <Table.Tr>
30
+ <Table.Td>
31
+ disabled
32
+ </Table.Td>
33
+ <Table.Td>
34
+ false
35
+ </Table.Td>
36
+ <Table.Td>
37
+ Controls the disabled state of the tab
38
+ </Table.Td>
39
+ </Table.Tr>
40
+
41
+ <Table.Tr>
42
+ <Table.Td>
43
+ active
44
+ </Table.Td>
45
+ <Table.Td>
46
+ false
47
+ </Table.Td>
48
+ <Table.Td>
49
+ Controls the active state of the tab
50
+ </Table.Td>
51
+ </Table.Tr>
52
+ </Table>
53
+ </div>
54
+ }
@@ -0,0 +1,15 @@
1
+ import React, {} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ export default {
5
+ title: 'Templates/Pages',
6
+ } as Meta;
7
+
8
+ export const Default = () => {
9
+ return <div style={{
10
+ padding: "100px",
11
+ paddingTop: "0px",
12
+ margin: "0 auto",
13
+ }}>
14
+ </div>
15
+ }