@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.
- package/.storybook/main.ts +172 -4
- package/.storybook/preview.ts +1 -2
- package/.storybook/styles.css +0 -5
- package/CHANGELOG.md +527 -0
- package/LICENSE +21 -0
- package/package.json +14 -10
- package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
- package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
- package/src/__fixtures__/atlas-index.mdx +53 -0
- package/src/__fixtures__/example-source-uniform.ts +41 -0
- package/src/{content → __fixtures__}/hello-world.mdx +1 -1
- package/src/components/DemoDocs.tsx +237 -0
- package/src/components/logo.tsx +37 -0
- package/src/decorators/DocsTemplate.tsx +23 -0
- package/src/docs/atlas/Atlas.stories.tsx +30 -26
- package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
- package/src/docs/components/writer/Badge.stories.tsx +15 -40
- package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
- package/src/docs/components/writer/Table.stories.tsx +23 -27
- package/src/docs/components/writer/Tabs.stories.tsx +55 -0
- package/src/docs/components/writer/TocCard.stories.tsx +30 -0
- package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
- package/src/docs/components/writer/Update.stories.tsx +91 -0
- package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
- package/src/docs/themes/TODO.md +1 -0
- package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
- package/src/docs/themes/themes.stories.tsx +33 -26
- package/src/docs/ui/Sidebar.stories.tsx +8 -2
- package/storybook-static/assets/Atlas.stories-DsQbLsBO.js +153 -0
- package/storybook-static/assets/Badge.stories-BB25VaXB.js +6 -0
- package/storybook-static/assets/Breadcrumbs.stories-8dY-0FZ6.js +21 -0
- package/storybook-static/assets/{Button.stories-BXyfQD_l.js → Button.stories-Ct9tcWxH.js} +1 -1
- package/storybook-static/assets/CTABanner-SOi-EjNb-1gNhmGHe.js +4 -0
- package/storybook-static/assets/{CTABanner.stories-CboCyNul.js → CTABanner.stories-B5jWAOv9.js} +1 -1
- package/storybook-static/assets/Callout.stories-DYh3dp1V.js +16 -0
- package/storybook-static/assets/CodeSample.stories-DdqAV6pE.js +22 -0
- package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
- package/storybook-static/assets/Color-YHDXOIA2-BLLMp-rk.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-iREIpqZs.js +575 -0
- package/storybook-static/assets/{GuideCard.stories-D_PCT7Jx.js → GuideCard.stories-DlOupG-0.js} +2 -2
- package/storybook-static/assets/Heading.stories-CTPUxGQU.js +40 -0
- package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
- package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
- package/storybook-static/assets/NavLinks.stories-ChboVW3X.js +19 -0
- package/storybook-static/assets/Pre.stories-BiOV0Oe6.js +11 -0
- package/storybook-static/assets/Sidebar.stories-DkscgzB6.js +9 -0
- package/storybook-static/assets/Steps.stories-DdgI2muz.js +16 -0
- package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
- package/storybook-static/assets/Table.stories-_JY94lJp.js +38 -0
- package/storybook-static/assets/Tabs.stories-C91xYkjj.js +42 -0
- package/storybook-static/assets/TocCard.stories-3Hrq8ntN.js +7 -0
- package/storybook-static/assets/UnderlineNav.stories-D44nShoc.js +96 -0
- package/storybook-static/assets/Update-DvGnbDKn-BxY7KlqE.js +33 -0
- package/storybook-static/assets/Update.stories-DXMAnZ21.js +56 -0
- package/storybook-static/assets/VideoGuide.stories-w76_6bQA.js +3 -0
- package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
- package/storybook-static/assets/_rollupPluginBabelHelpers-DK3gn7J7-CY8sTQTJ.js +4 -0
- package/storybook-static/assets/{browser.esm-CjKZlQaR.js → browser.esm-BBxEv_2n.js} +1 -1
- package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
- package/storybook-static/assets/content-Cgm3P2iF.js +8 -0
- package/storybook-static/assets/entry-preview-XrF1hMc_.js +2 -0
- package/storybook-static/assets/{entry-preview-docs-B1zb5AAd.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
- package/storybook-static/assets/iframe-B8sZbN7f.js +211 -0
- package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
- package/storybook-static/assets/index-BsiG4v0x.js +3 -0
- package/storybook-static/assets/index-CXQShRbs.js +8 -0
- package/storybook-static/assets/index-CXwkSlW-.js +1 -0
- package/storybook-static/assets/index-CzKwSnp0.js +9 -0
- package/storybook-static/assets/index-D_kTjGoR.js +9 -0
- package/storybook-static/assets/index-DgnBCu_c.js +1 -0
- package/storybook-static/assets/{index-BxVt_j7t.js → index-H0MBf5rE.js} +1 -1
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/layouts-Bfh4ZDPm.js +1 -0
- package/storybook-static/assets/preview-CoBvlzsX.css +1 -0
- package/storybook-static/assets/preview-CxgX81oj.js +2 -0
- package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
- package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
- package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
- package/storybook-static/assets/themes-designsystem.stories-Do8f936h.js +11 -0
- package/storybook-static/assets/themes.stories-By9PFakX.js +41 -0
- package/storybook-static/assets/writer-ia0ggDZA.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
- package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
- package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
- package/storybook-static/sb-manager/runtime.js +119 -119
- package/tsconfig.json +33 -11
- package/vite.config.ts +1 -1
- package/storybook-static/assets/Atlas.stories-C5gRCegi.js +0 -255
- package/storybook-static/assets/Badge.stories-XOQv4P0k.js +0 -31
- package/storybook-static/assets/Breadcrumbs.stories-DBonCt0B.js +0 -21
- package/storybook-static/assets/CTABanner-Dxjlb-Oo-D4ZzKv-X.js +0 -4
- package/storybook-static/assets/Callout.stories-1M6sBDsc.js +0 -16
- package/storybook-static/assets/CodeSample.stories-ygE0LGuD.js +0 -22
- package/storybook-static/assets/Color-YHDXOIA2-DKdobiDN.js +0 -1
- package/storybook-static/assets/DocsRenderer-CFRXHY34-Bal2bsPI.js +0 -575
- package/storybook-static/assets/Heading.stories-IvodKnYL.js +0 -40
- package/storybook-static/assets/Nav.stories-DpHSEq4D.js +0 -13
- package/storybook-static/assets/NavLinks.stories--GLnE3VD.js +0 -19
- package/storybook-static/assets/Pre.stories-D5iLAJJ5.js +0 -11
- package/storybook-static/assets/Sidebar.stories-Ck4U5ocr.js +0 -9
- package/storybook-static/assets/Steps.stories-DJGuK21z.js +0 -16
- package/storybook-static/assets/SubNav.stories-C6zqzDri.js +0 -19
- package/storybook-static/assets/Table.stories-zUHxRyRv.js +0 -43
- package/storybook-static/assets/UnderlineNav-yn8_whBd-Bbi7p2g-.js +0 -41
- package/storybook-static/assets/_rollupPluginBabelHelpers-Dh5BmVB--DyHbsKhl.js +0 -4
- package/storybook-static/assets/chevron-right-B9VhLASW.js +0 -31
- package/storybook-static/assets/chunk-K6AXKMTT-BnQROexa.js +0 -12
- package/storybook-static/assets/content-BSQS1YU1.js +0 -8
- package/storybook-static/assets/entry-preview-BTiD55pK.js +0 -2
- package/storybook-static/assets/iframe-VEPF5FFi.js +0 -211
- package/storybook-static/assets/index-0nua7n0t.js +0 -1
- package/storybook-static/assets/index-B7gF9TUu.js +0 -9
- package/storybook-static/assets/index-C2_NlWRN.js +0 -8
- package/storybook-static/assets/index-D1ZprCIH.js +0 -9
- package/storybook-static/assets/index-UoN3NoLW.js +0 -17
- package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
- package/storybook-static/assets/layouts-DvpaRV78.js +0 -32
- package/storybook-static/assets/preview-BK56XEt8.js +0 -2
- package/storybook-static/assets/preview-EtXI0_34.css +0 -1
- package/storybook-static/assets/react-18-BsB9_d4u.js +0 -25
- package/storybook-static/assets/test-utils-CHVDXiZU.js +0 -9
- package/storybook-static/assets/themes-designsystem.stories-D43FSrQO.js +0 -11
- package/storybook-static/assets/themes.stories-CNT0emaP.js +0 -41
- package/storybook-static/assets/writer-BNuXwA0f.js +0 -4
- package/tsconfig.app.json +0 -24
- package/tsconfig.node.json +0 -13
- /package/src/{content → __fixtures__}/Icons.tsx +0 -0
- /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
- /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
|
|
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
|
-
} =
|
|
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
|
|
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
|
|
23
|
-
import Content from "../../
|
|
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={
|
|
37
|
-
subheader
|
|
38
|
-
aside={
|
|
39
|
-
content={
|
|
40
|
-
contentNav={
|
|
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
|
|
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={
|
|
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 {
|
|
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
|
-
<
|
|
23
|
+
<LayoutPrimary
|
|
18
24
|
header={<></>}
|
|
19
25
|
aside={<DemoSidebar/>}
|
|
20
26
|
content={<></>}
|