@xyd-js/storybook 0.0.1-xyd.4 → 0.0.1-xyd.51

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 (145) hide show
  1. package/.storybook/main.ts +172 -4
  2. package/.storybook/preview.ts +1 -2
  3. package/.storybook/styles.css +0 -5
  4. package/CHANGELOG.md +527 -0
  5. package/LICENSE +21 -0
  6. package/package.json +14 -10
  7. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  8. package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
  9. package/src/__fixtures__/atlas-index.mdx +53 -0
  10. package/src/__fixtures__/example-source-uniform.ts +41 -0
  11. package/src/{content → __fixtures__}/hello-world.mdx +1 -1
  12. package/src/components/DemoDocs.tsx +237 -0
  13. package/src/components/logo.tsx +37 -0
  14. package/src/decorators/DocsTemplate.tsx +23 -0
  15. package/src/docs/atlas/Atlas.stories.tsx +30 -26
  16. package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
  17. package/src/docs/components/writer/Badge.stories.tsx +15 -40
  18. package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
  19. package/src/docs/components/writer/Table.stories.tsx +23 -27
  20. package/src/docs/components/writer/Tabs.stories.tsx +55 -0
  21. package/src/docs/components/writer/TocCard.stories.tsx +30 -0
  22. package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
  23. package/src/docs/components/writer/Update.stories.tsx +91 -0
  24. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  25. package/src/docs/themes/TODO.md +1 -0
  26. package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
  27. package/src/docs/themes/themes.stories.tsx +33 -26
  28. package/src/docs/ui/Sidebar.stories.tsx +8 -2
  29. package/storybook-static/assets/Atlas.stories-DsQbLsBO.js +153 -0
  30. package/storybook-static/assets/Badge.stories-BB25VaXB.js +6 -0
  31. package/storybook-static/assets/Breadcrumbs.stories-8dY-0FZ6.js +21 -0
  32. package/storybook-static/assets/{Button.stories-BXyfQD_l.js → Button.stories-Ct9tcWxH.js} +1 -1
  33. package/storybook-static/assets/CTABanner-SOi-EjNb-1gNhmGHe.js +4 -0
  34. package/storybook-static/assets/{CTABanner.stories-CboCyNul.js → CTABanner.stories-B5jWAOv9.js} +1 -1
  35. package/storybook-static/assets/Callout.stories-DYh3dp1V.js +16 -0
  36. package/storybook-static/assets/CodeSample.stories-DdqAV6pE.js +22 -0
  37. package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
  38. package/storybook-static/assets/Color-YHDXOIA2-BLLMp-rk.js +1 -0
  39. package/storybook-static/assets/DocsRenderer-CFRXHY34-iREIpqZs.js +575 -0
  40. package/storybook-static/assets/{GuideCard.stories-D_PCT7Jx.js → GuideCard.stories-DlOupG-0.js} +2 -2
  41. package/storybook-static/assets/Heading.stories-CTPUxGQU.js +40 -0
  42. package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
  43. package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
  44. package/storybook-static/assets/NavLinks.stories-ChboVW3X.js +19 -0
  45. package/storybook-static/assets/Pre.stories-BiOV0Oe6.js +11 -0
  46. package/storybook-static/assets/Sidebar.stories-DkscgzB6.js +9 -0
  47. package/storybook-static/assets/Steps.stories-DdgI2muz.js +16 -0
  48. package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
  49. package/storybook-static/assets/Table.stories-_JY94lJp.js +38 -0
  50. package/storybook-static/assets/Tabs.stories-C91xYkjj.js +42 -0
  51. package/storybook-static/assets/TocCard.stories-3Hrq8ntN.js +7 -0
  52. package/storybook-static/assets/UnderlineNav.stories-D44nShoc.js +96 -0
  53. package/storybook-static/assets/Update-DvGnbDKn-BxY7KlqE.js +33 -0
  54. package/storybook-static/assets/Update.stories-DXMAnZ21.js +56 -0
  55. package/storybook-static/assets/VideoGuide.stories-w76_6bQA.js +3 -0
  56. package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
  57. package/storybook-static/assets/_rollupPluginBabelHelpers-DK3gn7J7-CY8sTQTJ.js +4 -0
  58. package/storybook-static/assets/{browser.esm-CjKZlQaR.js → browser.esm-BBxEv_2n.js} +1 -1
  59. package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
  60. package/storybook-static/assets/content-Cgm3P2iF.js +8 -0
  61. package/storybook-static/assets/entry-preview-XrF1hMc_.js +2 -0
  62. package/storybook-static/assets/{entry-preview-docs-B1zb5AAd.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
  63. package/storybook-static/assets/iframe-B8sZbN7f.js +211 -0
  64. package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
  65. package/storybook-static/assets/index-BsiG4v0x.js +3 -0
  66. package/storybook-static/assets/index-CXQShRbs.js +8 -0
  67. package/storybook-static/assets/index-CXwkSlW-.js +1 -0
  68. package/storybook-static/assets/index-CzKwSnp0.js +9 -0
  69. package/storybook-static/assets/index-D_kTjGoR.js +9 -0
  70. package/storybook-static/assets/index-DgnBCu_c.js +1 -0
  71. package/storybook-static/assets/{index-BxVt_j7t.js → index-H0MBf5rE.js} +1 -1
  72. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  73. package/storybook-static/assets/layouts-Bfh4ZDPm.js +1 -0
  74. package/storybook-static/assets/preview-CoBvlzsX.css +1 -0
  75. package/storybook-static/assets/preview-CxgX81oj.js +2 -0
  76. package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
  77. package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
  78. package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
  79. package/storybook-static/assets/themes-designsystem.stories-Do8f936h.js +11 -0
  80. package/storybook-static/assets/themes.stories-By9PFakX.js +41 -0
  81. package/storybook-static/assets/writer-ia0ggDZA.js +1 -0
  82. package/storybook-static/iframe.html +1 -1
  83. package/storybook-static/index.html +1 -1
  84. package/storybook-static/index.json +1 -1
  85. package/storybook-static/project.json +1 -1
  86. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
  87. package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
  88. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
  89. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
  90. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
  91. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
  92. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
  93. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
  94. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  95. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
  96. package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
  97. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
  98. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
  99. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  100. package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
  101. package/storybook-static/sb-manager/runtime.js +119 -119
  102. package/tsconfig.json +33 -11
  103. package/vite.config.ts +1 -1
  104. package/storybook-static/assets/Atlas.stories-C5gRCegi.js +0 -255
  105. package/storybook-static/assets/Badge.stories-XOQv4P0k.js +0 -31
  106. package/storybook-static/assets/Breadcrumbs.stories-DBonCt0B.js +0 -21
  107. package/storybook-static/assets/CTABanner-Dxjlb-Oo-D4ZzKv-X.js +0 -4
  108. package/storybook-static/assets/Callout.stories-1M6sBDsc.js +0 -16
  109. package/storybook-static/assets/CodeSample.stories-ygE0LGuD.js +0 -22
  110. package/storybook-static/assets/Color-YHDXOIA2-DKdobiDN.js +0 -1
  111. package/storybook-static/assets/DocsRenderer-CFRXHY34-Bal2bsPI.js +0 -575
  112. package/storybook-static/assets/Heading.stories-IvodKnYL.js +0 -40
  113. package/storybook-static/assets/Nav.stories-DpHSEq4D.js +0 -13
  114. package/storybook-static/assets/NavLinks.stories--GLnE3VD.js +0 -19
  115. package/storybook-static/assets/Pre.stories-D5iLAJJ5.js +0 -11
  116. package/storybook-static/assets/Sidebar.stories-Ck4U5ocr.js +0 -9
  117. package/storybook-static/assets/Steps.stories-DJGuK21z.js +0 -16
  118. package/storybook-static/assets/SubNav.stories-C6zqzDri.js +0 -19
  119. package/storybook-static/assets/Table.stories-zUHxRyRv.js +0 -43
  120. package/storybook-static/assets/UnderlineNav-yn8_whBd-Bbi7p2g-.js +0 -41
  121. package/storybook-static/assets/_rollupPluginBabelHelpers-Dh5BmVB--DyHbsKhl.js +0 -4
  122. package/storybook-static/assets/chevron-right-B9VhLASW.js +0 -31
  123. package/storybook-static/assets/chunk-K6AXKMTT-BnQROexa.js +0 -12
  124. package/storybook-static/assets/content-BSQS1YU1.js +0 -8
  125. package/storybook-static/assets/entry-preview-BTiD55pK.js +0 -2
  126. package/storybook-static/assets/iframe-VEPF5FFi.js +0 -211
  127. package/storybook-static/assets/index-0nua7n0t.js +0 -1
  128. package/storybook-static/assets/index-B7gF9TUu.js +0 -9
  129. package/storybook-static/assets/index-C2_NlWRN.js +0 -8
  130. package/storybook-static/assets/index-D1ZprCIH.js +0 -9
  131. package/storybook-static/assets/index-UoN3NoLW.js +0 -17
  132. package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
  133. package/storybook-static/assets/layouts-DvpaRV78.js +0 -32
  134. package/storybook-static/assets/preview-BK56XEt8.js +0 -2
  135. package/storybook-static/assets/preview-EtXI0_34.css +0 -1
  136. package/storybook-static/assets/react-18-BsB9_d4u.js +0 -25
  137. package/storybook-static/assets/test-utils-CHVDXiZU.js +0 -9
  138. package/storybook-static/assets/themes-designsystem.stories-D43FSrQO.js +0 -11
  139. package/storybook-static/assets/themes.stories-CNT0emaP.js +0 -41
  140. package/storybook-static/assets/writer-BNuXwA0f.js +0 -4
  141. package/tsconfig.app.json +0 -24
  142. package/tsconfig.node.json +0 -13
  143. /package/src/{content → __fixtures__}/Icons.tsx +0 -0
  144. /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
  145. /package/storybook-static/assets/{preview-BOIWi3FM.js → preview-BNQ06L9w.js} +0 -0
@@ -7,14 +7,15 @@ import {
7
7
  Table,
8
8
  UnderlineNav,
9
9
  } from '@xyd-js/components/writer';
10
- import getContentComponents from "@xyd-js/components/content";
10
+ import {ReactContent} from "@xyd-js/components/content";
11
11
 
12
+ const reactContent = new ReactContent()
12
13
  const {
13
14
  h1: H1,
14
15
  h3: H3,
15
16
  h4: H4,
16
17
  p: Text,
17
- } = getContentComponents();
18
+ } = reactContent.components()
18
19
 
19
20
  export default {
20
21
  title: 'Themes',
@@ -3,11 +3,14 @@ import type {Meta} from '@storybook/react';
3
3
  import {MemoryRouter} from "react-router";
4
4
 
5
5
  import {
6
- Layout,
7
6
  LayoutPrimary
8
7
  } from '@xyd-js/components/layouts';
9
8
 
10
- import getContentComponents from "@xyd-js/components/content";
9
+ import {ReactContent} from "@xyd-js/components/content";
10
+
11
+ const reactContent = new ReactContent()
12
+ const getContentComponents = reactContent.components
13
+
11
14
  import {
12
15
  Breadcrumbs,
13
16
  NavLinks
@@ -19,8 +22,8 @@ import {
19
22
  UISidebar
20
23
  } from "@xyd-js/ui"
21
24
 
22
- import {LiveSessionPlatformLogo} from "./logo.tsx";
23
- import Content from "../../content/hello-world.mdx";
25
+ import {LiveSessionPlatformLogo} from "./logo";
26
+ import Content from "../../__fixtures__/hello-world.mdx";
24
27
 
25
28
  export default {
26
29
  title: 'Themes/Default',
@@ -33,17 +36,18 @@ export default {
33
36
 
34
37
  export const Default = () => {
35
38
  return <LayoutPrimary
36
- header={<DemoNavbar/>}
37
- subheader
38
- aside={<DemoSidebar/>}
39
- content={<DemoContent/>}
40
- contentNav={<DemoTOC/>}
39
+ header={<$DemoNavbar/>}
40
+ subheader={<$DemoSubNav/>}
41
+ aside={<$DemoSidebar/>}
42
+ content={<$DemoContent/>}
43
+ contentNav={<$DemoTOC/>}
41
44
  />
42
45
  }
43
46
 
44
- function DemoNavbar() {
47
+ function $DemoNavbar() {
45
48
  return <>
46
49
  <Nav
50
+ onChange={() => {}}
47
51
  value="api-reference"
48
52
  logo={<LiveSessionPlatformLogo/>}
49
53
  kind="middle"
@@ -58,21 +62,24 @@ function DemoNavbar() {
58
62
  GraphQL
59
63
  </Nav.Item>
60
64
  </Nav>
61
- <SubNav title="Apps" value="build">
62
- <SubNav.Item value="build" href="/build">
63
- Build
64
- </SubNav.Item>
65
- <SubNav.Item value="design" href="/design">
66
- Design
67
- </SubNav.Item>
68
- <SubNav.Item value="launch" href="/launch">
69
- Launch
70
- </SubNav.Item>
71
- </SubNav>
72
65
  </>
73
66
  }
74
67
 
75
- function DemoSidebar() {
68
+ function $DemoSubNav() {
69
+ return <SubNav onChange={() => {}} title="Apps" value="build">
70
+ <SubNav.Item value="build" href="/build">
71
+ Build
72
+ </SubNav.Item>
73
+ <SubNav.Item value="design" href="/design">
74
+ Design
75
+ </SubNav.Item>
76
+ <SubNav.Item value="launch" href="/launch">
77
+ Launch
78
+ </SubNav.Item>
79
+ </SubNav>
80
+ }
81
+
82
+ function $DemoSidebar() {
76
83
  const [isOpen, setIsOpen] = useState(false)
77
84
 
78
85
  function onClick() {
@@ -84,7 +91,7 @@ function DemoSidebar() {
84
91
  </UISidebar.Item>
85
92
  )
86
93
 
87
- return <UISidebar footerItems={<DemoSidebarFooter/>}>
94
+ return <UISidebar footerItems={<$DemoSidebarFooter/>}>
88
95
  <UISidebar.ItemHeader>
89
96
  GET STARTED
90
97
  </UISidebar.ItemHeader>
@@ -131,7 +138,7 @@ function DemoSidebar() {
131
138
  </UISidebar>
132
139
  }
133
140
 
134
- function DemoSidebarFooter() {
141
+ function $DemoSidebarFooter() {
135
142
  return <>
136
143
  <UISidebar.FooterItem
137
144
  href="#"
@@ -209,7 +216,7 @@ function DemoSidebarFooter() {
209
216
  }
210
217
 
211
218
 
212
- function DemoContent() {
219
+ function $DemoContent() {
213
220
  return <>
214
221
  <Breadcrumbs
215
222
  items={[
@@ -245,7 +252,7 @@ function DemoContent() {
245
252
  </>
246
253
  }
247
254
 
248
- function DemoTOC() {
255
+ function $DemoTOC() {
249
256
  return <Toc defaultValue="quickstart">
250
257
  <Toc.Item value="quickstart">
251
258
  Quickstart
@@ -1,11 +1,17 @@
1
1
  import React, {useState} from 'react';
2
2
  import type {Meta} from '@storybook/react';
3
+ import {MemoryRouter} from "react-router";
3
4
 
4
5
  import {UISidebar} from '@xyd-js/ui';
5
- import {Layout} from "@xyd-js/components/layouts";
6
+ import {LayoutPrimary} from "@xyd-js/components/layouts";
6
7
 
7
8
  export default {
8
9
  title: 'UI/Sidebar',
10
+ decorators: [
11
+ (Story) => <MemoryRouter>
12
+ <Story />
13
+ </MemoryRouter>,
14
+ ],
9
15
  } as Meta;
10
16
 
11
17
  export const Default = () => {
@@ -14,7 +20,7 @@ export const Default = () => {
14
20
  paddingTop: "0px",
15
21
  margin: "0 auto",
16
22
  }}>
17
- <Layout
23
+ <LayoutPrimary
18
24
  header={<></>}
19
25
  aside={<DemoSidebar/>}
20
26
  content={<></>}