@xyd-js/storybook 0.0.1-xyd.6 → 0.0.1-xyd.63

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 +8 -9
  2. package/.storybook/preview.ts +1 -3
  3. package/.storybook/styles.css +0 -5
  4. package/CHANGELOG.md +702 -0
  5. package/LICENSE +21 -0
  6. package/package.json +18 -15
  7. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  8. package/src/{content → __fixtures__}/atlas-index/wip1.mdx +3 -3
  9. package/src/__fixtures__/example-source-uniform.ts +41 -0
  10. package/src/{content → __fixtures__}/hello-world.mdx +1 -1
  11. package/src/components/{DemoWireframe.tsx → DemoDocs.tsx} +1 -1
  12. package/src/decorators/DocsTemplate.tsx +23 -0
  13. package/src/docs/atlas/Atlas.stories.tsx +27 -18
  14. package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
  15. package/src/docs/components/writer/Badge.stories.tsx +15 -40
  16. package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
  17. package/src/docs/components/writer/Table.stories.tsx +22 -58
  18. package/src/docs/components/writer/Tabs.stories.tsx +55 -0
  19. package/src/docs/components/writer/TocCard.stories.tsx +30 -0
  20. package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
  21. package/src/docs/components/writer/Update.stories.tsx +91 -0
  22. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  23. package/src/docs/themes/TODO.md +1 -0
  24. package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
  25. package/src/docs/themes/themes.stories.tsx +6 -2
  26. package/src/docs/ui/Sidebar.stories.tsx +8 -2
  27. package/storybook-static/assets/Atlas.stories-DsQbLsBO.js +153 -0
  28. package/storybook-static/assets/Badge.stories-BB25VaXB.js +6 -0
  29. package/storybook-static/assets/Breadcrumbs.stories-8dY-0FZ6.js +21 -0
  30. package/storybook-static/assets/{Button.stories-zZz68Dp3.js → Button.stories-Ct9tcWxH.js} +1 -1
  31. package/storybook-static/assets/CTABanner-SOi-EjNb-1gNhmGHe.js +4 -0
  32. package/storybook-static/assets/{CTABanner.stories-CCWd5nXl.js → CTABanner.stories-B5jWAOv9.js} +1 -1
  33. package/storybook-static/assets/Callout.stories-DYh3dp1V.js +16 -0
  34. package/storybook-static/assets/CodeSample.stories-DdqAV6pE.js +22 -0
  35. package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
  36. package/storybook-static/assets/Color-YHDXOIA2-BLLMp-rk.js +1 -0
  37. package/storybook-static/assets/DocsRenderer-CFRXHY34-iREIpqZs.js +575 -0
  38. package/storybook-static/assets/{GuideCard.stories-CtHzplO6.js → GuideCard.stories-DlOupG-0.js} +2 -2
  39. package/storybook-static/assets/Heading.stories-CTPUxGQU.js +40 -0
  40. package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
  41. package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
  42. package/storybook-static/assets/NavLinks.stories-ChboVW3X.js +19 -0
  43. package/storybook-static/assets/Pre.stories-BiOV0Oe6.js +11 -0
  44. package/storybook-static/assets/Sidebar.stories-DkscgzB6.js +9 -0
  45. package/storybook-static/assets/Steps.stories-DdgI2muz.js +16 -0
  46. package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
  47. package/storybook-static/assets/Table.stories-_JY94lJp.js +38 -0
  48. package/storybook-static/assets/Tabs.stories-C91xYkjj.js +42 -0
  49. package/storybook-static/assets/TocCard.stories-3Hrq8ntN.js +7 -0
  50. package/storybook-static/assets/UnderlineNav.stories-D44nShoc.js +96 -0
  51. package/storybook-static/assets/Update-DvGnbDKn-BxY7KlqE.js +33 -0
  52. package/storybook-static/assets/Update.stories-DXMAnZ21.js +56 -0
  53. package/storybook-static/assets/VideoGuide.stories-w76_6bQA.js +3 -0
  54. package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
  55. package/storybook-static/assets/_rollupPluginBabelHelpers-DK3gn7J7-CY8sTQTJ.js +4 -0
  56. package/storybook-static/assets/{copy-DNsBvoDT.js → browser.esm-BBxEv_2n.js} +12 -12
  57. package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
  58. package/storybook-static/assets/content-Cgm3P2iF.js +8 -0
  59. package/storybook-static/assets/{entry-preview-p5a0L45N.js → entry-preview-XrF1hMc_.js} +2 -2
  60. package/storybook-static/assets/{entry-preview-docs-D4yhrvjB.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
  61. package/storybook-static/assets/iframe-B8sZbN7f.js +211 -0
  62. package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
  63. package/storybook-static/assets/index-BsiG4v0x.js +3 -0
  64. package/storybook-static/assets/index-CXQShRbs.js +8 -0
  65. package/storybook-static/assets/index-CXwkSlW-.js +1 -0
  66. package/storybook-static/assets/index-CzKwSnp0.js +9 -0
  67. package/storybook-static/assets/index-D_kTjGoR.js +9 -0
  68. package/storybook-static/assets/index-DgnBCu_c.js +1 -0
  69. package/storybook-static/assets/{index-C3_PYvTT.js → index-H0MBf5rE.js} +1 -1
  70. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  71. package/storybook-static/assets/layouts-Bfh4ZDPm.js +1 -0
  72. package/storybook-static/assets/preview-CoBvlzsX.css +1 -0
  73. package/storybook-static/assets/preview-CxgX81oj.js +2 -0
  74. package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
  75. package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
  76. package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
  77. package/storybook-static/assets/themes-designsystem.stories-Do8f936h.js +11 -0
  78. package/storybook-static/assets/themes.stories-By9PFakX.js +41 -0
  79. package/storybook-static/assets/writer-ia0ggDZA.js +1 -0
  80. package/storybook-static/iframe.html +1 -1
  81. package/storybook-static/index.html +1 -1
  82. package/storybook-static/index.json +1 -1
  83. package/storybook-static/project.json +1 -1
  84. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
  85. package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
  86. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
  87. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
  88. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
  89. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
  90. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
  91. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
  92. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  93. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
  94. package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
  95. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
  96. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
  97. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  98. package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
  99. package/storybook-static/sb-manager/runtime.js +119 -119
  100. package/tsconfig.json +17 -0
  101. package/vite.config.ts +1 -1
  102. package/src/content/atlas-index/package-index.mdx +0 -192
  103. package/src/docs/atlas/AtlasIndex.stories.tsx +0 -130
  104. package/storybook-static/assets/Atlas.stories-DeK56mng.js +0 -252
  105. package/storybook-static/assets/AtlasIndex.stories-CgaI1jRb.js +0 -41
  106. package/storybook-static/assets/Badge.stories-DZifzirN.js +0 -31
  107. package/storybook-static/assets/Breadcrumbs.stories-vunfoj7H.js +0 -21
  108. package/storybook-static/assets/CTABanner-wB-mvAxd-DwYWZ4fP.js +0 -4
  109. package/storybook-static/assets/Callout.stories-BZSlwnWD.js +0 -16
  110. package/storybook-static/assets/CodeSample-DB1D3F7N-C5AHaCBx-D2i_bX1Z.js +0 -9
  111. package/storybook-static/assets/CodeSample.stories-Zju_BViQ.js +0 -22
  112. package/storybook-static/assets/Color-YHDXOIA2-DEwwEJF5.js +0 -1
  113. package/storybook-static/assets/DocsRenderer-CFRXHY34-BnbD8jil.js +0 -575
  114. package/storybook-static/assets/Heading.stories-hOIiOtGj.js +0 -40
  115. package/storybook-static/assets/Nav.stories-DDu5T02Y.js +0 -13
  116. package/storybook-static/assets/NavLinks.stories-C-m4jsZG.js +0 -19
  117. package/storybook-static/assets/Pre.stories-Cx3Xp7p5.js +0 -11
  118. package/storybook-static/assets/Sidebar.stories-5uZaQT9P.js +0 -9
  119. package/storybook-static/assets/Steps.stories-CroVYyMk.js +0 -16
  120. package/storybook-static/assets/SubNav.stories-DH8b0a7D.js +0 -19
  121. package/storybook-static/assets/Table.stories-DH33FA7O.js +0 -72
  122. package/storybook-static/assets/UnderlineNav-CdHpxTEt-DnGwWXeI.js +0 -46
  123. package/storybook-static/assets/_rollupPluginBabelHelpers-BsWmI4nf-CerVq3GU.js +0 -4
  124. package/storybook-static/assets/chevron-right-MQoc73cD.js +0 -31
  125. package/storybook-static/assets/chunk-K6AXKMTT-CzEIZnfC.js +0 -12
  126. package/storybook-static/assets/content-C3X0CWsZ.js +0 -22
  127. package/storybook-static/assets/iframe-5hRm0uzd.js +0 -211
  128. package/storybook-static/assets/index-BPIV5q2-.js +0 -18
  129. package/storybook-static/assets/index-BdGwgT04.js +0 -9
  130. package/storybook-static/assets/index-C7VnYWJ0.js +0 -9
  131. package/storybook-static/assets/index-CGqnQ2T-.js +0 -8
  132. package/storybook-static/assets/index-DXayMMq-.js +0 -1
  133. package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
  134. package/storybook-static/assets/layouts-CkIqr4wb.js +0 -32
  135. package/storybook-static/assets/preview-BYe-pB8z.js +0 -2
  136. package/storybook-static/assets/preview-BaYfXIWh.css +0 -1
  137. package/storybook-static/assets/react-18-DQs0uuxx.js +0 -25
  138. package/storybook-static/assets/test-utils-Di69x3Vj.js +0 -9
  139. package/storybook-static/assets/themes-designsystem.stories-CYUUtSoI.js +0 -11
  140. package/storybook-static/assets/themes.stories-lpuIOBo2.js +0 -41
  141. package/storybook-static/assets/writer-B4lgk2fa.js +0 -4
  142. /package/src/{content → __fixtures__}/Icons.tsx +0 -0
  143. /package/src/{content → __fixtures__}/atlas-index.mdx +0 -0
  144. /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
  145. /package/storybook-static/assets/{preview-BvcEG2BB.js → preview-BNQ06L9w.js} +0 -0
@@ -0,0 +1,55 @@
1
+ import React, { } from 'react';
2
+ import type { Meta } from '@storybook/react';
3
+
4
+ import {
5
+ Tabs,
6
+ } from '@xyd-js/components/writer';
7
+
8
+ export default {
9
+ title: 'Components/Writer/Tabs',
10
+ } as Meta;
11
+
12
+ export const Default = () => {
13
+ return <div style={{
14
+ padding: "100px",
15
+ paddingTop: "0px",
16
+ margin: "0 auto",
17
+ }}>
18
+ <Tabs items={["User Behavior", "Feature Adoption", "Churn Analysis", "Churn Analysis2", "Churn Analysis3", "Churn Analysis4", "Churn Analysis5", "Churn Analysis6"]}>
19
+ <Tabs.Content value="User Behavior">
20
+ Gain insights into user behavior by replaying sessions and analyzing click patterns. This helps uncover friction
21
+ points in your app's user experience.
22
+ </Tabs.Content>
23
+ <Tabs.Content value="Feature Adoption">
24
+ Understand how users engage with new features. Track metrics like time to adoption and overall usage to measure
25
+ feature success.
26
+ </Tabs.Content>
27
+ <Tabs.Content value="Churn Analysis">
28
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
29
+ retention strategies.
30
+ </Tabs.Content>
31
+ <Tabs.Content value="Churn Analysis2">
32
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
33
+ retention strategies.
34
+ </Tabs.Content>
35
+ <Tabs.Content value="Churn Analysis3">
36
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
37
+ retention strategies.
38
+ </Tabs.Content>
39
+ <Tabs.Content value="Churn Analysis4">
40
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
41
+ retention strategies.
42
+ </Tabs.Content>
43
+ <Tabs.Content value="Churn Analysis5">
44
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
45
+ retention strategies.
46
+ </Tabs.Content>
47
+ <Tabs.Content value="Churn Analysis6">
48
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
49
+ retention strategies.
50
+ </Tabs.Content>
51
+ </Tabs>
52
+ </div>
53
+ }
54
+
55
+
@@ -0,0 +1,30 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { TocCard } from '@xyd-js/components/writer';
4
+
5
+ const meta: Meta<typeof TocCard> = {
6
+ title: 'Components/Writer/TocCard',
7
+ component: TocCard,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'A server-side rendered card component for table of contents entries. Displays a title, description, and favicon for a linked resource without client-side fetching.',
13
+ },
14
+ },
15
+ },
16
+ tags: [],
17
+ };
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof TocCard>;
21
+
22
+ export const Default: Story = {
23
+ args: {
24
+ title: 'Example App',
25
+ description: 'Explore our example app to see how the TocCard component works.',
26
+ href: 'https://github.com/livesession/xyd',
27
+ },
28
+ };
29
+
30
+
@@ -0,0 +1,114 @@
1
+ import { useState } from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+
4
+ import { UnderlineNav } from '@xyd-js/components/writer';
5
+
6
+ const meta: Meta<typeof UnderlineNav> = {
7
+ title: 'Components/Writer/UnderlineNav',
8
+ component: UnderlineNav,
9
+ parameters: {
10
+ layout: 'padded',
11
+ },
12
+ tags: [],
13
+ };
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof UnderlineNav>;
17
+
18
+ export const Default: Story = {
19
+ args: {
20
+ value: 'tab1',
21
+ onChange: (value) => console.log('Selected tab:', value),
22
+ },
23
+ render: (args) => {
24
+ const [value, setValue] = useState('tab1');
25
+
26
+ return <div style={{ width: 600 }}>
27
+ <UnderlineNav value={value} onChange={setValue}>
28
+ <UnderlineNav.Item value="tab1" href="#tab1">
29
+ First Tab
30
+ </UnderlineNav.Item>
31
+ <UnderlineNav.Item value="tab2" href="#tab2">
32
+ Second Tab
33
+ </UnderlineNav.Item>
34
+ <UnderlineNav.Item value="tab3" href="#tab3">
35
+ Third Tab
36
+ </UnderlineNav.Item>
37
+
38
+ <UnderlineNav.Content value="tab1">
39
+ This is tab 1
40
+ </UnderlineNav.Content>
41
+ <UnderlineNav.Content value="tab2">
42
+ This is tab 2
43
+ </UnderlineNav.Content>
44
+ <UnderlineNav.Content value="tab3">
45
+ This is tab 3
46
+ </UnderlineNav.Content>
47
+ </UnderlineNav>
48
+ </div>
49
+ }
50
+ };
51
+
52
+ export const WithoutSlide: Story = {
53
+ args: {
54
+ value: 'tab1',
55
+ onChange: (value) => console.log('Selected tab:', value),
56
+ slide: false,
57
+ },
58
+ render: (args) => {
59
+ const [value, setValue] = useState('tab1');
60
+
61
+ return <div style={{ width: 600 }}>
62
+ <UnderlineNav value={value} onChange={setValue} slide={false}>
63
+ <UnderlineNav.Item value="tab1" href="#tab1">
64
+ First Tab
65
+ </UnderlineNav.Item>
66
+ <UnderlineNav.Item value="tab2" href="#tab2">
67
+ Second Tab
68
+ </UnderlineNav.Item>
69
+ <UnderlineNav.Item value="tab3" href="#tab3">
70
+ Third Tab
71
+ </UnderlineNav.Item>
72
+
73
+ <UnderlineNav.Content value="tab1">
74
+ This is tab 1
75
+ </UnderlineNav.Content>
76
+ <UnderlineNav.Content value="tab2">
77
+ This is tab 2
78
+ </UnderlineNav.Content>
79
+ <UnderlineNav.Content value="tab3">
80
+ This is tab 3
81
+ </UnderlineNav.Content>
82
+ </UnderlineNav>
83
+ </div>
84
+ }
85
+ };
86
+
87
+ export const Uncontrolled: Story = {
88
+ render: () => {
89
+ return <div style={{ width: 600 }}>
90
+ <UnderlineNav>
91
+ <UnderlineNav.Item value="tab1" href="#tab1">
92
+ First Tab
93
+ </UnderlineNav.Item>
94
+ <UnderlineNav.Item value="tab2" href="#tab2">
95
+ Second Tab
96
+ </UnderlineNav.Item>
97
+ <UnderlineNav.Item value="tab3" href="#tab3">
98
+ Third Tab
99
+ </UnderlineNav.Item>
100
+
101
+ <UnderlineNav.Content value="tab1">
102
+ This is tab 1
103
+ </UnderlineNav.Content>
104
+ <UnderlineNav.Content value="tab2">
105
+ This is tab 2
106
+ </UnderlineNav.Content>
107
+ <UnderlineNav.Content value="tab3">
108
+ This is tab 3
109
+ </UnderlineNav.Content>
110
+ </UnderlineNav>
111
+ </div>
112
+ }
113
+ };
114
+
@@ -0,0 +1,91 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { ContentDecorator } from '@xyd-js/components/content';
4
+ import { Heading, Image, List, Text, Update } from '@xyd-js/components/writer';
5
+
6
+ const meta: Meta<typeof Update> = {
7
+ title: 'Components/Writer/Update',
8
+ component: Update,
9
+ parameters: {
10
+ layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component: '',
14
+ },
15
+ },
16
+ },
17
+ tags: [],
18
+ };
19
+
20
+ export default meta;
21
+ type Story = StoryObj<typeof Update>;
22
+
23
+ export const Default: Story = {
24
+ args: {
25
+ date: '2024-10-12',
26
+ version: 'v0.1.1',
27
+ features: [
28
+ 'Responsive design',
29
+ 'Sticky section for each changelog',
30
+ ],
31
+ children: <ContentDecorator>
32
+ <Image
33
+ src="https://placehold.co/600x300?text=Screenshot+or+Content"
34
+ alt="Screenshot placeholder"
35
+ />
36
+ <Heading size={2}>
37
+ Changelog
38
+ </Heading>
39
+ <Text>
40
+ You can add anything here, like a screenshot, a code snippet, or a list of changes.
41
+ </Text>
42
+
43
+ <Heading size={3}>
44
+ Features
45
+ </Heading>
46
+ <List>
47
+ <List.Item>Initial layout</List.Item>
48
+ <List.Item>Basic navigation</List.Item>
49
+ </List>
50
+ </ContentDecorator>,
51
+ },
52
+ };
53
+
54
+ export const MultipleUpdates: Story = {
55
+ render: () => (
56
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '3rem', alignItems: 'stretch' }}>
57
+ <Update date="2024-10-12" version="v0.1.1">
58
+ <ContentDecorator>
59
+ <Image
60
+ src="https://placehold.co/600x300?text=Screenshot+or+Content+1"
61
+ alt="Screenshot 1"
62
+ />
63
+ <Heading size={2}>Changelog</Heading>
64
+ <Text>First update: new features and improvements.</Text>
65
+ <Heading size={3}>Features</Heading>
66
+ <List>
67
+ <List.Item>Initial layout</List.Item>
68
+ <List.Item>Basic navigation</List.Item>
69
+ </List>
70
+ </ContentDecorator>
71
+ </Update>
72
+ <Update date="2024-09-01" version="v0.1.0">
73
+ <ContentDecorator>
74
+ <Image
75
+ src="https://placehold.co/600x300?text=Screenshot+or+Content+2"
76
+ alt="Screenshot 2"
77
+ />
78
+ <Heading size={2}>Changelog</Heading>
79
+ <Text>Initial release with basic functionality.</Text>
80
+ <Heading size={3}>Features</Heading>
81
+ <List>
82
+ <List.Item>Initial layout</List.Item>
83
+ <List.Item>Basic navigation</List.Item>
84
+ </List>
85
+ </ContentDecorator>
86
+ </Update>
87
+ </div>
88
+ ),
89
+ };
90
+
91
+
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { VideoGuide } from '@xyd-js/components/writer';
3
+
4
+ const meta: Meta<typeof VideoGuide> = {
5
+ title: 'Components/Writer/VideoGuide',
6
+ component: VideoGuide,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof VideoGuide>;
14
+
15
+ export const Miniature: Story = {
16
+ render: () => <VideoGuide.Miniature />,
17
+ };
@@ -0,0 +1 @@
1
+ move this to "templates" and here should be showcase of "gusto" | "poetry"
@@ -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',
@@ -6,7 +6,11 @@ import {
6
6
  LayoutPrimary
7
7
  } from '@xyd-js/components/layouts';
8
8
 
9
- 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
+
10
14
  import {
11
15
  Breadcrumbs,
12
16
  NavLinks
@@ -19,7 +23,7 @@ import {
19
23
  } from "@xyd-js/ui"
20
24
 
21
25
  import {LiveSessionPlatformLogo} from "./logo";
22
- import Content from "../../content/hello-world.mdx";
26
+ import Content from "../../__fixtures__/hello-world.mdx";
23
27
 
24
28
  export default {
25
29
  title: 'Themes/Default',
@@ -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={<></>}