@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,380 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+
4
+ import { NavLinks } from '@xyd-js/components/writer';
5
+
6
+ const meta: Meta<typeof NavLinks> = {
7
+ title: 'Components/Writer/NavLinks',
8
+ component: NavLinks,
9
+ parameters: {
10
+ docs: {
11
+ description: {
12
+ component: 'NavLinks component provides navigation links for moving between pages, typically used at the bottom of documentation pages with previous and next links.',
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ prev: {
18
+ description: 'Previous page navigation link',
19
+ control: 'object',
20
+ },
21
+ next: {
22
+ description: 'Next page navigation link',
23
+ control: 'object',
24
+ },
25
+ as: {
26
+ description: 'Custom component to render as the link element',
27
+ control: false,
28
+ },
29
+ className: {
30
+ description: 'Additional CSS class name',
31
+ control: 'text',
32
+ },
33
+ },
34
+ };
35
+
36
+ export default meta;
37
+ type Story = StoryObj<typeof NavLinks>;
38
+
39
+ // Basic usage with both prev and next
40
+ export const Default: Story = {
41
+ args: {
42
+ prev: {
43
+ title: 'Getting Started',
44
+ href: '#',
45
+ },
46
+ next: {
47
+ title: 'Installation',
48
+ href: '#',
49
+ },
50
+ },
51
+ render: (args) => (
52
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
53
+ <NavLinks {...args} />
54
+ </div>
55
+ ),
56
+ };
57
+
58
+ // Only previous link
59
+ export const PreviousOnly: Story = {
60
+ args: {
61
+ prev: {
62
+ title: 'Introduction',
63
+ href: '#',
64
+ },
65
+ },
66
+ render: (args) => (
67
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
68
+ <NavLinks {...args} />
69
+ </div>
70
+ ),
71
+ };
72
+
73
+ // Only next link
74
+ export const NextOnly: Story = {
75
+ args: {
76
+ next: {
77
+ title: 'Advanced Configuration',
78
+ href: '#',
79
+ },
80
+ },
81
+ render: (args) => (
82
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
83
+ <NavLinks {...args} />
84
+ </div>
85
+ ),
86
+ };
87
+
88
+ // Long titles
89
+ export const LongTitles: Story = {
90
+ args: {
91
+ prev: {
92
+ title: 'Getting Started with Our Comprehensive Documentation',
93
+ href: '#',
94
+ },
95
+ next: {
96
+ title: 'Advanced Configuration and Customization Options',
97
+ href: '#',
98
+ },
99
+ },
100
+ render: (args) => (
101
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
102
+ <NavLinks {...args} />
103
+ </div>
104
+ ),
105
+ };
106
+
107
+ // Short titles
108
+ export const ShortTitles: Story = {
109
+ args: {
110
+ prev: {
111
+ title: 'Home',
112
+ href: '#',
113
+ },
114
+ next: {
115
+ title: 'Next',
116
+ href: '#',
117
+ },
118
+ },
119
+ render: (args) => (
120
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
121
+ <NavLinks {...args} />
122
+ </div>
123
+ ),
124
+ };
125
+
126
+ // Documentation example
127
+ export const DocumentationExample: Story = {
128
+ args: {
129
+ prev: {
130
+ title: 'Quick Start',
131
+ href: '/docs/quick-start',
132
+ },
133
+ next: {
134
+ title: 'API Reference',
135
+ href: '/docs/api-reference',
136
+ },
137
+ },
138
+ render: (args) => (
139
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
140
+ <div style={{ marginBottom: '20px' }}>
141
+ <h2>Component Documentation</h2>
142
+ <p>This is an example of how NavLinks would appear at the bottom of a documentation page.</p>
143
+ </div>
144
+ <NavLinks {...args} />
145
+ </div>
146
+ ),
147
+ };
148
+
149
+ // Tutorial example
150
+ export const TutorialExample: Story = {
151
+ args: {
152
+ prev: {
153
+ title: 'Step 1: Setup',
154
+ href: '/tutorial/setup',
155
+ },
156
+ next: {
157
+ title: 'Step 3: Deployment',
158
+ href: '/tutorial/deployment',
159
+ },
160
+ },
161
+ render: (args) => (
162
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
163
+ <div style={{ marginBottom: '20px' }}>
164
+ <h2>Step 2: Configuration</h2>
165
+ <p>This step covers the configuration process for your project.</p>
166
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
167
+ </div>
168
+ <NavLinks {...args} />
169
+ </div>
170
+ ),
171
+ };
172
+
173
+ // Guide example
174
+ export const GuideExample: Story = {
175
+ args: {
176
+ prev: {
177
+ title: 'Installation Guide',
178
+ href: '/guides/installation',
179
+ },
180
+ next: {
181
+ title: 'Configuration Guide',
182
+ href: '/guides/configuration',
183
+ },
184
+ },
185
+ render: (args) => (
186
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
187
+ <div style={{ marginBottom: '20px' }}>
188
+ <h2>Getting Started Guide</h2>
189
+ <p>This guide will walk you through the essential steps to get up and running.</p>
190
+ <p>Follow along with the examples and you'll have everything set up in no time.</p>
191
+ </div>
192
+ <NavLinks {...args} />
193
+ </div>
194
+ ),
195
+ };
196
+
197
+ // First page (no previous)
198
+ export const FirstPage: Story = {
199
+ args: {
200
+ next: {
201
+ title: 'Installation',
202
+ href: '/docs/installation',
203
+ },
204
+ },
205
+ render: (args) => (
206
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
207
+ <div style={{ marginBottom: '20px' }}>
208
+ <h2>Welcome</h2>
209
+ <p>This is the first page of our documentation. There's no previous page to navigate to.</p>
210
+ </div>
211
+ <NavLinks {...args} />
212
+ </div>
213
+ ),
214
+ };
215
+
216
+ // Last page (no next)
217
+ export const LastPage: Story = {
218
+ args: {
219
+ prev: {
220
+ title: 'Advanced Topics',
221
+ href: '/docs/advanced',
222
+ },
223
+ },
224
+ render: (args) => (
225
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
226
+ <div style={{ marginBottom: '20px' }}>
227
+ <h2>Conclusion</h2>
228
+ <p>This is the final page of our documentation. You've reached the end!</p>
229
+ </div>
230
+ <NavLinks {...args} />
231
+ </div>
232
+ ),
233
+ };
234
+
235
+ // With custom styling
236
+ export const WithCustomStyling: Story = {
237
+ args: {
238
+ prev: {
239
+ title: 'Previous Chapter',
240
+ href: '#',
241
+ },
242
+ next: {
243
+ title: 'Next Chapter',
244
+ href: '#',
245
+ },
246
+ className: 'custom-nav-links',
247
+ },
248
+ render: (args) => (
249
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
250
+ <style>
251
+ {`
252
+ .custom-nav-links {
253
+ border-top-color: #e5e7eb !important;
254
+ background-color: #f9fafb;
255
+ padding: 1.5rem;
256
+ border-radius: 8px;
257
+ margin-top: 3rem;
258
+ }
259
+ `}
260
+ </style>
261
+ <NavLinks {...args} />
262
+ </div>
263
+ ),
264
+ parameters: {
265
+ docs: {
266
+ description: {
267
+ story: 'This example shows how to apply custom styling to the NavLinks component using the className prop.',
268
+ },
269
+ },
270
+ },
271
+ };
272
+
273
+ // All variants showcase
274
+ export const AllVariants: Story = {
275
+ render: () => (
276
+ <div style={{ padding: '20px' }}>
277
+ <div style={{ marginBottom: '40px' }}>
278
+ <h3 style={{ marginBottom: '10px', color: '#666' }}>Both Previous and Next</h3>
279
+ <div style={{ maxWidth: '800px' }}>
280
+ <NavLinks
281
+ prev={{
282
+ title: 'Getting Started',
283
+ href: '#',
284
+ }}
285
+ next={{
286
+ title: 'Installation',
287
+ href: '#',
288
+ }}
289
+ />
290
+ </div>
291
+ </div>
292
+
293
+ <div style={{ marginBottom: '40px' }}>
294
+ <h3 style={{ marginBottom: '10px', color: '#666' }}>Previous Only</h3>
295
+ <div style={{ maxWidth: '800px' }}>
296
+ <NavLinks
297
+ prev={{
298
+ title: 'Introduction',
299
+ href: '#',
300
+ }}
301
+ />
302
+ </div>
303
+ </div>
304
+
305
+ <div style={{ marginBottom: '40px' }}>
306
+ <h3 style={{ marginBottom: '10px', color: '#666' }}>Next Only</h3>
307
+ <div style={{ maxWidth: '800px' }}>
308
+ <NavLinks
309
+ next={{
310
+ title: 'Advanced Configuration',
311
+ href: '#',
312
+ }}
313
+ />
314
+ </div>
315
+ </div>
316
+
317
+ <div style={{ marginBottom: '40px' }}>
318
+ <h3 style={{ marginBottom: '10px', color: '#666' }}>Long Titles</h3>
319
+ <div style={{ maxWidth: '800px' }}>
320
+ <NavLinks
321
+ prev={{
322
+ title: 'Getting Started with Our Comprehensive Documentation System',
323
+ href: '#',
324
+ }}
325
+ next={{
326
+ title: 'Advanced Configuration and Customization Options for Power Users',
327
+ href: '#',
328
+ }}
329
+ />
330
+ </div>
331
+ </div>
332
+
333
+ <div style={{ marginBottom: '40px' }}>
334
+ <h3 style={{ marginBottom: '10px', color: '#666' }}>Short Titles</h3>
335
+ <div style={{ maxWidth: '800px' }}>
336
+ <NavLinks
337
+ prev={{
338
+ title: 'Home',
339
+ href: '#',
340
+ }}
341
+ next={{
342
+ title: 'Next',
343
+ href: '#',
344
+ }}
345
+ />
346
+ </div>
347
+ </div>
348
+ </div>
349
+ ),
350
+ };
351
+
352
+ // Interactive example
353
+ export const Interactive: Story = {
354
+ args: {
355
+ prev: {
356
+ title: 'Previous Page',
357
+ href: '#',
358
+ },
359
+ next: {
360
+ title: 'Next Page',
361
+ href: '#',
362
+ },
363
+ },
364
+ render: (args) => (
365
+ <div style={{ padding: '20px', maxWidth: '800px' }}>
366
+ <div style={{ marginBottom: '20px' }}>
367
+ <h2>Interactive Navigation</h2>
368
+ <p>Try clicking on the navigation links below to see the hover effects and transitions.</p>
369
+ </div>
370
+ <NavLinks {...args} />
371
+ </div>
372
+ ),
373
+ parameters: {
374
+ docs: {
375
+ description: {
376
+ story: 'This example demonstrates the interactive behavior of the NavLinks component. Notice the smooth transitions and hover effects.',
377
+ },
378
+ },
379
+ },
380
+ };
@@ -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
+