@xyd-js/storybook 0.0.0-build

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 (63) hide show
  1. package/.storybook/main.ts +40 -0
  2. package/.storybook/manager-head.html +6 -0
  3. package/.storybook/manager.ts +18 -0
  4. package/.storybook/preview.ts +40 -0
  5. package/.storybook/styles.css +5 -0
  6. package/.storybook/theme.ts +34 -0
  7. package/CHANGELOG.md +16 -0
  8. package/LICENSE +21 -0
  9. package/README.md +50 -0
  10. package/eslint.config.js +28 -0
  11. package/package.json +61 -0
  12. package/public/logo.svg +10 -0
  13. package/src/__fixtures__/Icons.tsx +83 -0
  14. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  15. package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
  16. package/src/__fixtures__/atlas-index.mdx +53 -0
  17. package/src/__fixtures__/code-sample.mdx +15 -0
  18. package/src/__fixtures__/example-source-uniform.ts +41 -0
  19. package/src/__fixtures__/hello-world.mdx +116 -0
  20. package/src/components/DemoDocs.tsx +235 -0
  21. package/src/components/logo.tsx +37 -0
  22. package/src/decorators/DocsTemplate.tsx +101 -0
  23. package/src/docs/atlas/Atlas.stories.tsx +51 -0
  24. package/src/docs/atlas/todo-app.uniform.json +625 -0
  25. package/src/docs/atlas/uniform-to-references.ts +101 -0
  26. package/src/docs/components/coder/CodeSample.stories.tsx +29 -0
  27. package/src/docs/components/pages/PageBlogHome.stories.tsx +52 -0
  28. package/src/docs/components/pages/PageFirstSlide.stories.tsx +124 -0
  29. package/src/docs/components/pages/PageHome.stories.tsx +127 -0
  30. package/src/docs/components/system/Baseline.stories.tsx +126 -0
  31. package/src/docs/components/writer/Badge.stories.tsx +132 -0
  32. package/src/docs/components/writer/Banner.stories.tsx +394 -0
  33. package/src/docs/components/writer/Blockquote.stories.tsx +415 -0
  34. package/src/docs/components/writer/Breadcrumbs.stories.tsx +282 -0
  35. package/src/docs/components/writer/Button.stories.tsx +405 -0
  36. package/src/docs/components/writer/Callout.stories.tsx +183 -0
  37. package/src/docs/components/writer/Card.stories.tsx +457 -0
  38. package/src/docs/components/writer/ColorSchemeButton.stories.tsx +322 -0
  39. package/src/docs/components/writer/Details.stories.tsx +333 -0
  40. package/src/docs/components/writer/GuideCard.stories.tsx +384 -0
  41. package/src/docs/components/writer/Heading.stories.tsx +379 -0
  42. package/src/docs/components/writer/Hr.stories.tsx +325 -0
  43. package/src/docs/components/writer/IconSocial.stories.tsx +591 -0
  44. package/src/docs/components/writer/Image.stories.tsx +430 -0
  45. package/src/docs/components/writer/List.stories.tsx +479 -0
  46. package/src/docs/components/writer/NavLinks.stories.tsx +380 -0
  47. package/src/docs/components/writer/Pre.stories.tsx +23 -0
  48. package/src/docs/components/writer/Steps.stories.tsx +914 -0
  49. package/src/docs/components/writer/Table.stories.tsx +608 -0
  50. package/src/docs/components/writer/Tabs.stories.tsx +760 -0
  51. package/src/docs/components/writer/TocCard.stories.tsx +407 -0
  52. package/src/docs/components/writer/Update.stories.tsx +457 -0
  53. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  54. package/src/docs/templates/CodeSample.stories.tsx +15 -0
  55. package/src/docs/themes/TODO.md +1 -0
  56. package/src/docs/themes/logo.tsx +37 -0
  57. package/src/docs/themes/themes.stories.tsx +269 -0
  58. package/src/docs/ui/Nav.stories.tsx +58 -0
  59. package/src/docs/ui/Sidebar.stories.tsx +167 -0
  60. package/src/docs/ui/SubNav.stories.tsx +29 -0
  61. package/src/utils/mdx.ts +31 -0
  62. package/tsconfig.json +39 -0
  63. package/vite.config.ts +8 -0
@@ -0,0 +1,101 @@
1
+ import React from "react";
2
+
3
+ import { MemoryRouter } from "react-router";
4
+
5
+ import { LayoutPrimary } from "@xyd-js/components/layouts";
6
+ import { ContentDecorator } from "@xyd-js/components/content";
7
+ import { Footer } from "@xyd-js/components/system";
8
+
9
+ import { DemoNavbar, DemoSidebar, DemoSubNav, DemoTOC } from "../components/DemoDocs";
10
+ import { Github, Linkedin, Twitter, Youtube } from "lucide-react";
11
+
12
+ interface DocsTemplateDecoratorOptions {
13
+ toc?: boolean
14
+ }
15
+
16
+ export const DocsTemplateDecorator = ({ toc = true }: DocsTemplateDecoratorOptions) => (Story) => <MemoryRouter>
17
+ <LayoutPrimary
18
+ subheader={true}
19
+ // layout={meta?.layout}
20
+ layout="page"
21
+ scrollKey={location.pathname}
22
+ >
23
+ <LayoutPrimary.Header
24
+ // banner={banner}
25
+ header={<DemoNavbar />}
26
+ // subheader={<DemoSubNav />}
27
+ />
28
+ {/* <LayoutPrimary.MobileAside
29
+ aside={<DemoSidebar />}
30
+ /> */}
31
+
32
+ <main part="main">
33
+ {/* <aside part="sidebar"> */}
34
+ {/* <DemoSidebar /> */}
35
+ {/* </aside> */}
36
+
37
+ <LayoutPrimary.Page contentNav={toc ? <DemoTOC /> : undefined}>
38
+ <$Content>
39
+ {/* {children} */}
40
+ <Story />
41
+ </$Content>
42
+
43
+ {/* <$PageFooter>
44
+ <$BuiltWithXYD />
45
+ </$PageFooter> */}
46
+ </LayoutPrimary.Page>
47
+ </main>
48
+
49
+ <Footer
50
+ kind="minimal"
51
+ links={[
52
+ {
53
+ label: "Trademark Policy",
54
+ href: "https://www.livesession.com/trademark-policy"
55
+ },
56
+ {
57
+ label: "Privacy Policy",
58
+ href: "https://www.livesession.com/privacy-policy"
59
+ },
60
+ {
61
+ label: "Terms of Service",
62
+ href: "https://www.livesession.com/terms-of-service"
63
+ }
64
+ ]}
65
+ socials={[
66
+ {
67
+ href: "https://www.livesession.com/github",
68
+ logo: <Github />
69
+ },
70
+ {
71
+ href: "https://www.livesession.com/linkedin",
72
+ logo: <Linkedin />
73
+ },
74
+ {
75
+ href: "https://www.livesession.com/twitter",
76
+ logo: <Twitter />
77
+ },
78
+ {
79
+ href: "https://www.livesession.com/youtube",
80
+ logo: <Youtube />
81
+ }
82
+ ]}
83
+ footnote="© Livesession 2025"
84
+ />
85
+
86
+ {/* <$Footer /> */}
87
+ </LayoutPrimary>
88
+ </MemoryRouter>
89
+
90
+
91
+ function $Content({ children }) {
92
+ return <>
93
+ {/* <$Breadcrumbs /> */}
94
+
95
+ <ContentDecorator>
96
+ {children}
97
+ </ContentDecorator>
98
+
99
+ {/* <$NavLinks /> */}
100
+ </>
101
+ }
@@ -0,0 +1,51 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import type { Meta } from '@storybook/react';
3
+ import { MemoryRouter } from "react-router";
4
+
5
+ import { Reference } from '@xyd-js/uniform';
6
+ import { Atlas } from "@xyd-js/atlas";
7
+
8
+ import { uniformToReferences } from "./uniform-to-references";
9
+ import { MDXReference } from "../../utils/mdx";
10
+ import { exampleSourceUniform } from "../../__fixtures__/example-source-uniform";
11
+ import { DocsTemplateDecorator } from "../../decorators/DocsTemplate";
12
+ export default {
13
+ title: 'Atlas/Atlas',
14
+ component: Atlas,
15
+ decorators: [
16
+ DocsTemplateDecorator({ toc: false }),
17
+ ],
18
+ } as Meta;
19
+
20
+ const Template = (args: any) => {
21
+ const [references, setReferences] = useState<MDXReference<Reference[]> | []>([])
22
+
23
+ async function load() {
24
+ const resp = await uniformToReferences()
25
+ if (resp && resp.length) {
26
+ setReferences(resp)
27
+ }
28
+ }
29
+
30
+ useEffect(() => {
31
+ load()
32
+ }, [])
33
+
34
+ return <>
35
+ <Atlas references={references} />
36
+ </>
37
+ }
38
+
39
+ export const Primary = Template.bind({});
40
+ Primary.args = {};
41
+
42
+
43
+ const TemplateSecondary = () => {
44
+ return <>
45
+ <Atlas kind="secondary" references={[exampleSourceUniform]} />
46
+ </>
47
+ }
48
+
49
+ export const Secondary = TemplateSecondary.bind({});
50
+ Secondary.args = {};
51
+