@roadlittledawn/docs-design-system-react 0.3.0 → 0.5.0

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.
@@ -25,6 +25,13 @@ export var Primary = {
25
25
  variant: 'primary',
26
26
  children: 'Primary Button',
27
27
  },
28
+ parameters: {
29
+ docs: {
30
+ source: {
31
+ code: "<Button variant=\"primary\">Primary Button</Button>",
32
+ },
33
+ },
34
+ },
28
35
  };
29
36
  /**
30
37
  * The secondary button style is used for alternative or less important actions.
@@ -34,6 +41,13 @@ export var Secondary = {
34
41
  variant: 'secondary',
35
42
  children: 'Secondary Button',
36
43
  },
44
+ parameters: {
45
+ docs: {
46
+ source: {
47
+ code: "<Button variant=\"secondary\">Secondary Button</Button>",
48
+ },
49
+ },
50
+ },
37
51
  };
38
52
  /**
39
53
  * The outline button style is used for tertiary actions or when you need a more subtle button.
@@ -43,6 +57,13 @@ export var Outline = {
43
57
  variant: 'outline',
44
58
  children: 'Outline Button',
45
59
  },
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ code: "<Button variant=\"outline\">Outline Button</Button>",
64
+ },
65
+ },
66
+ },
46
67
  };
47
68
  /**
48
69
  * Small button size for compact interfaces or less prominent actions.
@@ -53,6 +74,13 @@ export var Small = {
53
74
  size: 'sm',
54
75
  children: 'Small Button',
55
76
  },
77
+ parameters: {
78
+ docs: {
79
+ source: {
80
+ code: "<Button variant=\"primary\" size=\"sm\">Small Button</Button>",
81
+ },
82
+ },
83
+ },
56
84
  };
57
85
  /**
58
86
  * Medium is the default button size, suitable for most use cases.
@@ -63,6 +91,13 @@ export var Medium = {
63
91
  size: 'md',
64
92
  children: 'Medium Button',
65
93
  },
94
+ parameters: {
95
+ docs: {
96
+ source: {
97
+ code: "<Button variant=\"primary\" size=\"md\">Medium Button</Button>",
98
+ },
99
+ },
100
+ },
66
101
  };
67
102
  /**
68
103
  * Large button size for prominent calls-to-action.
@@ -73,6 +108,13 @@ export var Large = {
73
108
  size: 'lg',
74
109
  children: 'Large Button',
75
110
  },
111
+ parameters: {
112
+ docs: {
113
+ source: {
114
+ code: "<Button variant=\"primary\" size=\"lg\">Large Button</Button>",
115
+ },
116
+ },
117
+ },
76
118
  };
77
119
  /**
78
120
  * Disabled state for buttons that are temporarily unavailable.
@@ -83,16 +125,37 @@ export var Disabled = {
83
125
  children: 'Disabled Button',
84
126
  disabled: true,
85
127
  },
128
+ parameters: {
129
+ docs: {
130
+ source: {
131
+ code: "<Button variant=\"primary\" disabled>Disabled Button</Button>",
132
+ },
133
+ },
134
+ },
86
135
  };
87
136
  /**
88
137
  * Example showing all button variants side by side for comparison.
89
138
  */
90
139
  export var AllVariants = {
140
+ parameters: {
141
+ docs: {
142
+ source: {
143
+ code: "<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap', alignItems: 'center' }}>\n <Button variant=\"primary\">Primary</Button>\n <Button variant=\"secondary\">Secondary</Button>\n <Button variant=\"outline\">Outline</Button>\n</div>",
144
+ },
145
+ },
146
+ },
91
147
  render: function () { return (_jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap', alignItems: 'center' }, children: [_jsx(Button, { variant: "primary", children: "Primary" }), _jsx(Button, { variant: "secondary", children: "Secondary" }), _jsx(Button, { variant: "outline", children: "Outline" })] })); },
92
148
  };
93
149
  /**
94
150
  * Example showing all button sizes side by side for comparison.
95
151
  */
96
152
  export var AllSizes = {
153
+ parameters: {
154
+ docs: {
155
+ source: {
156
+ code: "<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap', alignItems: 'center' }}>\n <Button size=\"sm\">Small</Button>\n <Button size=\"md\">Medium</Button>\n <Button size=\"lg\">Large</Button>\n</div>",
157
+ },
158
+ },
159
+ },
97
160
  render: function () { return (_jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap', alignItems: 'center' }, children: [_jsx(Button, { size: "sm", children: "Small" }), _jsx(Button, { size: "md", children: "Medium" }), _jsx(Button, { size: "lg", children: "Large" })] })); },
98
161
  };
@@ -24,6 +24,13 @@ export var Caution = {
24
24
  variant: 'caution',
25
25
  children: 'This operation cannot be undone. Make sure you have a backup before proceeding.',
26
26
  },
27
+ parameters: {
28
+ docs: {
29
+ source: {
30
+ code: "<Callout variant=\"caution\">\n This operation cannot be undone. Make sure you have a backup before proceeding.\n</Callout>",
31
+ },
32
+ },
33
+ },
27
34
  };
28
35
  /**
29
36
  * Important callout for critical information.
@@ -33,6 +40,13 @@ export var Important = {
33
40
  variant: 'important',
34
41
  children: 'All users must update their passwords by the end of the month to comply with the new security policy.',
35
42
  },
43
+ parameters: {
44
+ docs: {
45
+ source: {
46
+ code: "<Callout variant=\"important\">\n All users must update their passwords by the end of the month to comply with the new security policy.\n</Callout>",
47
+ },
48
+ },
49
+ },
36
50
  };
37
51
  /**
38
52
  * Tip callout for helpful suggestions.
@@ -42,6 +56,13 @@ export var Tip = {
42
56
  variant: 'tip',
43
57
  children: 'You can use keyboard shortcuts (Cmd+K or Ctrl+K) to quickly search the documentation.',
44
58
  },
59
+ parameters: {
60
+ docs: {
61
+ source: {
62
+ code: "<Callout variant=\"tip\">\n You can use keyboard shortcuts (Cmd+K or Ctrl+K) to quickly search the documentation.\n</Callout>",
63
+ },
64
+ },
65
+ },
45
66
  };
46
67
  /**
47
68
  * Course callout for learning-oriented content.
@@ -51,6 +72,13 @@ export var Course = {
51
72
  variant: 'course',
52
73
  children: 'In this section, you will learn how to configure your development environment and install the necessary dependencies.',
53
74
  },
75
+ parameters: {
76
+ docs: {
77
+ source: {
78
+ code: "<Callout variant=\"course\">\n In this section, you will learn how to configure your development environment and install the necessary dependencies.\n</Callout>",
79
+ },
80
+ },
81
+ },
54
82
  };
55
83
  /**
56
84
  * Callout with a custom title.
@@ -61,6 +89,13 @@ export var CustomTitle = {
61
89
  title: 'Security Notice',
62
90
  children: 'Two-factor authentication is now required for all administrator accounts.',
63
91
  },
92
+ parameters: {
93
+ docs: {
94
+ source: {
95
+ code: "<Callout variant=\"important\" title=\"Security Notice\">\n Two-factor authentication is now required for all administrator accounts.\n</Callout>",
96
+ },
97
+ },
98
+ },
64
99
  };
65
100
  /**
66
101
  * Callout without a title.
@@ -71,10 +106,24 @@ export var NoTitle = {
71
106
  title: null,
72
107
  children: 'This callout has no title and displays only the content.',
73
108
  },
109
+ parameters: {
110
+ docs: {
111
+ source: {
112
+ code: "<Callout variant=\"tip\" title={null}>\n This callout has no title and displays only the content.\n</Callout>",
113
+ },
114
+ },
115
+ },
74
116
  };
75
117
  /**
76
118
  * All callout variants displayed together for comparison.
77
119
  */
78
120
  export var AllVariants = {
121
+ parameters: {
122
+ docs: {
123
+ source: {
124
+ code: "<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>\n <Callout variant=\"caution\">\n Caution: Be careful when modifying system files.\n </Callout>\n <Callout variant=\"important\">\n Important: This feature requires administrator privileges.\n </Callout>\n <Callout variant=\"tip\">\n Tip: Use the search function to find topics quickly.\n </Callout>\n <Callout variant=\"course\">\n Course: This module covers the basics of component design.\n </Callout>\n</div>",
125
+ },
126
+ },
127
+ },
79
128
  render: function () { return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(Callout, { variant: "caution", children: "Caution: Be careful when modifying system files." }), _jsx(Callout, { variant: "important", children: "Important: This feature requires administrator privileges." }), _jsx(Callout, { variant: "tip", children: "Tip: Use the search function to find topics quickly." }), _jsx(Callout, { variant: "course", children: "Course: This module covers the basics of component design." })] })); },
80
129
  };
@@ -24,6 +24,13 @@ export var Basic = {
24
24
  title: 'Getting Started',
25
25
  children: 'Learn the basics of using this documentation system.',
26
26
  },
27
+ parameters: {
28
+ docs: {
29
+ source: {
30
+ code: "<Card title=\"Getting Started\">\n Learn the basics of using this documentation system.\n</Card>",
31
+ },
32
+ },
33
+ },
27
34
  };
28
35
  /**
29
36
  * Clickable card that links to another page.
@@ -34,6 +41,13 @@ export var Clickable = {
34
41
  href: '/docs/api',
35
42
  children: 'Complete reference for all available components and utilities.',
36
43
  },
44
+ parameters: {
45
+ docs: {
46
+ source: {
47
+ code: "<Card title=\"API Reference\" href=\"/docs/api\">\n Complete reference for all available components and utilities.\n</Card>",
48
+ },
49
+ },
50
+ },
37
51
  };
38
52
  /**
39
53
  * Card with colored background.
@@ -45,6 +59,13 @@ export var ColoredBackground = {
45
59
  backgroundColor: 'blue',
46
60
  children: 'Check out our latest component additions.',
47
61
  },
62
+ parameters: {
63
+ docs: {
64
+ source: {
65
+ code: "<Card title=\"New Feature\" titleColor=\"blue\" backgroundColor=\"blue\">\n Check out our latest component additions.\n</Card>",
66
+ },
67
+ },
68
+ },
48
69
  };
49
70
  /**
50
71
  * Card without a title.
@@ -53,16 +74,37 @@ export var NoTitle = {
53
74
  args: {
54
75
  children: 'This card displays content without a title.',
55
76
  },
77
+ parameters: {
78
+ docs: {
79
+ source: {
80
+ code: "<Card>This card displays content without a title.</Card>",
81
+ },
82
+ },
83
+ },
56
84
  };
57
85
  /**
58
86
  * All title color variants.
59
87
  */
60
88
  export var TitleColors = {
89
+ parameters: {
90
+ docs: {
91
+ source: {
92
+ code: "<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>\n <Card title=\"Blue Title\" titleColor=\"blue\">Content with blue title</Card>\n <Card title=\"Green Title\" titleColor=\"green\">Content with green title</Card>\n <Card title=\"Purple Title\" titleColor=\"purple\">Content with purple title</Card>\n <Card title=\"Red Title\" titleColor=\"red\">Content with red title</Card>\n <Card title=\"Yellow Title\" titleColor=\"yellow\">Content with yellow title</Card>\n <Card title=\"Gray Title\" titleColor=\"gray\">Content with gray title</Card>\n</div>",
93
+ },
94
+ },
95
+ },
61
96
  render: function () { return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(Card, { title: "Blue Title", titleColor: "blue", children: "Content with blue title" }), _jsx(Card, { title: "Green Title", titleColor: "green", children: "Content with green title" }), _jsx(Card, { title: "Purple Title", titleColor: "purple", children: "Content with purple title" }), _jsx(Card, { title: "Red Title", titleColor: "red", children: "Content with red title" }), _jsx(Card, { title: "Yellow Title", titleColor: "yellow", children: "Content with yellow title" }), _jsx(Card, { title: "Gray Title", titleColor: "gray", children: "Content with gray title" })] })); },
62
97
  };
63
98
  /**
64
99
  * All background color variants.
65
100
  */
66
101
  export var BackgroundColors = {
102
+ parameters: {
103
+ docs: {
104
+ source: {
105
+ code: "<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>\n <Card title=\"Blue\" backgroundColor=\"blue\">Card with blue background</Card>\n <Card title=\"Green\" backgroundColor=\"green\">Card with green background</Card>\n <Card title=\"Purple\" backgroundColor=\"purple\">Card with purple background</Card>\n <Card title=\"Red\" backgroundColor=\"red\">Card with red background</Card>\n <Card title=\"Yellow\" backgroundColor=\"yellow\">Card with yellow background</Card>\n <Card title=\"Gray\" backgroundColor=\"gray\">Card with gray background</Card>\n <Card title=\"White\" backgroundColor=\"white\">Card with white background</Card>\n</div>",
106
+ },
107
+ },
108
+ },
67
109
  render: function () { return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(Card, { title: "Blue", backgroundColor: "blue", children: "Card with blue background" }), _jsx(Card, { title: "Green", backgroundColor: "green", children: "Card with green background" }), _jsx(Card, { title: "Purple", backgroundColor: "purple", children: "Card with purple background" }), _jsx(Card, { title: "Red", backgroundColor: "red", children: "Card with red background" }), _jsx(Card, { title: "Yellow", backgroundColor: "yellow", children: "Card with yellow background" }), _jsx(Card, { title: "Gray", backgroundColor: "gray", children: "Card with gray background" }), _jsx(Card, { title: "White", backgroundColor: "white", children: "Card with white background" })] })); },
68
110
  };
@@ -25,6 +25,13 @@ export var TwoColumns = {
25
25
  columns: 2,
26
26
  children: (_jsxs(_Fragment, { children: [_jsx(Card, { title: "Getting Started", children: "Learn the basics of our documentation system." }), _jsx(Card, { title: "Components", children: "Explore all available UI components." }), _jsx(Card, { title: "Best Practices", children: "Follow guidelines for effective documentation." }), _jsx(Card, { title: "Examples", children: "See real-world usage examples." })] })),
27
27
  },
28
+ parameters: {
29
+ docs: {
30
+ source: {
31
+ code: "<CardGrid columns={2}>\n <Card title=\"Getting Started\">Learn the basics of our documentation system.</Card>\n <Card title=\"Components\">Explore all available UI components.</Card>\n <Card title=\"Best Practices\">Follow guidelines for effective documentation.</Card>\n <Card title=\"Examples\">See real-world usage examples.</Card>\n</CardGrid>",
32
+ },
33
+ },
34
+ },
28
35
  };
29
36
  /**
30
37
  * Grid with 3 columns (default, responsive).
@@ -34,6 +41,13 @@ export var ThreeColumns = {
34
41
  columns: 3,
35
42
  children: (_jsxs(_Fragment, { children: [_jsx(Card, { title: "Tutorials", children: "Step-by-step learning guides." }), _jsx(Card, { title: "How-To Guides", children: "Task-oriented instructions." }), _jsx(Card, { title: "Reference", children: "Technical reference documentation." }), _jsx(Card, { title: "Explanation", children: "Conceptual background information." }), _jsx(Card, { title: "API", children: "Complete API documentation." }), _jsx(Card, { title: "FAQ", children: "Frequently asked questions." })] })),
36
43
  },
44
+ parameters: {
45
+ docs: {
46
+ source: {
47
+ code: "<CardGrid columns={3}>\n <Card title=\"Tutorials\">Step-by-step learning guides.</Card>\n <Card title=\"How-To Guides\">Task-oriented instructions.</Card>\n <Card title=\"Reference\">Technical reference documentation.</Card>\n <Card title=\"Explanation\">Conceptual background information.</Card>\n <Card title=\"API\">Complete API documentation.</Card>\n <Card title=\"FAQ\">Frequently asked questions.</Card>\n</CardGrid>",
48
+ },
49
+ },
50
+ },
37
51
  };
38
52
  /**
39
53
  * Grid with 4 columns (responsive).
@@ -43,6 +57,13 @@ export var FourColumns = {
43
57
  columns: 4,
44
58
  children: (_jsxs(_Fragment, { children: [_jsx(Card, { titleColor: "blue", backgroundColor: "blue", children: "Feature 1" }), _jsx(Card, { titleColor: "green", backgroundColor: "green", children: "Feature 2" }), _jsx(Card, { titleColor: "purple", backgroundColor: "purple", children: "Feature 3" }), _jsx(Card, { titleColor: "red", backgroundColor: "red", children: "Feature 4" }), _jsx(Card, { titleColor: "yellow", backgroundColor: "yellow", children: "Feature 5" }), _jsx(Card, { titleColor: "gray", backgroundColor: "gray", children: "Feature 6" }), _jsx(Card, { titleColor: "blue", backgroundColor: "blue", children: "Feature 7" }), _jsx(Card, { titleColor: "green", backgroundColor: "green", children: "Feature 8" })] })),
45
59
  },
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ code: "<CardGrid columns={4}>\n <Card titleColor=\"blue\" backgroundColor=\"blue\">Feature 1</Card>\n <Card titleColor=\"green\" backgroundColor=\"green\">Feature 2</Card>\n <Card titleColor=\"purple\" backgroundColor=\"purple\">Feature 3</Card>\n <Card titleColor=\"red\" backgroundColor=\"red\">Feature 4</Card>\n <Card titleColor=\"yellow\" backgroundColor=\"yellow\">Feature 5</Card>\n <Card titleColor=\"gray\" backgroundColor=\"gray\">Feature 6</Card>\n <Card titleColor=\"blue\" backgroundColor=\"blue\">Feature 7</Card>\n <Card titleColor=\"green\" backgroundColor=\"green\">Feature 8</Card>\n</CardGrid>",
64
+ },
65
+ },
66
+ },
46
67
  };
47
68
  /**
48
69
  * Grid with clickable cards.
@@ -52,4 +73,11 @@ export var ClickableCards = {
52
73
  columns: 3,
53
74
  children: (_jsxs(_Fragment, { children: [_jsx(Card, { title: "Documentation", href: "/docs", children: "Complete documentation guide" }), _jsx(Card, { title: "API Reference", href: "/api", children: "Detailed API reference" }), _jsx(Card, { title: "Examples", href: "/examples", children: "Code examples and patterns" })] })),
54
75
  },
76
+ parameters: {
77
+ docs: {
78
+ source: {
79
+ code: "<CardGrid columns={3}>\n <Card title=\"Documentation\" href=\"/docs\">Complete documentation guide</Card>\n <Card title=\"API Reference\" href=\"/api\">Detailed API reference</Card>\n <Card title=\"Examples\" href=\"/examples\">Code examples and patterns</Card>\n</CardGrid>",
80
+ },
81
+ },
82
+ },
55
83
  };
@@ -23,6 +23,13 @@ export var Basic = {
23
23
  code: "function greet(name: string) {\n return `Hello, ${name}!`;\n}\n\nconsole.log(greet(\"World\"));",
24
24
  language: 'typescript',
25
25
  },
26
+ parameters: {
27
+ docs: {
28
+ source: {
29
+ code: "<CodeBlock\n language=\"typescript\"\n code={`function greet(name: string) {\n return \\`Hello, \\${name}!\\`;\n}\n\nconsole.log(greet(\"World\"));`}\n/>",
30
+ },
31
+ },
32
+ },
26
33
  };
27
34
  /**
28
35
  * Code block with a filename displayed.
@@ -33,6 +40,13 @@ export var WithFilename = {
33
40
  language: 'jsx',
34
41
  filename: 'Button.jsx',
35
42
  },
43
+ parameters: {
44
+ docs: {
45
+ source: {
46
+ code: "<CodeBlock\n language=\"jsx\"\n filename=\"Button.jsx\"\n code={`export const Button = ({ children, onClick }) => {\n return (\n <button onClick={onClick}>\n {children}\n </button>\n );\n};`}\n/>",
47
+ },
48
+ },
49
+ },
36
50
  };
37
51
  /**
38
52
  * Code block with highlighted lines.
@@ -43,6 +57,13 @@ export var WithHighlightedLines = {
43
57
  language: 'javascript',
44
58
  highlightLines: [2, 3, 4],
45
59
  },
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ code: "<CodeBlock\n language=\"javascript\"\n highlightLines={[2, 3, 4]}\n code={`function calculateTotal(items) {\n let total = 0;\n for (const item of items) {\n total += item.price * item.quantity;\n }\n return total;\n}`}\n/>",
64
+ },
65
+ },
66
+ },
46
67
  };
47
68
  /**
48
69
  * Multiple code snippets displayed in tabs.
@@ -70,6 +91,13 @@ export var WithTabs = {
70
91
  },
71
92
  ],
72
93
  },
94
+ parameters: {
95
+ docs: {
96
+ source: {
97
+ code: "<CodeBlock\n snippets={[\n {\n code: `export const Button = ({ children }) => {\n return <button>{children}</button>;\n};`,\n language: 'jsx',\n filename: 'Button.jsx',\n tabTitle: 'Button.jsx',\n },\n {\n code: `.button {\n padding: 0.5rem 1rem;\n background-color: blue;\n color: white;\n}`,\n language: 'css',\n filename: 'Button.css',\n tabTitle: 'Button.css',\n },\n {\n code: `import { Button } from './Button';\n\nexport default {\n component: Button,\n};`,\n language: 'typescript',\n filename: 'Button.stories.ts',\n tabTitle: 'Button.stories.ts',\n },\n ]}\n/>",
98
+ },
99
+ },
100
+ },
73
101
  };
74
102
  /**
75
103
  * Multiple language versions with language dropdown.
@@ -99,6 +127,13 @@ export var WithLanguageDropdown = {
99
127
  },
100
128
  ],
101
129
  },
130
+ parameters: {
131
+ docs: {
132
+ source: {
133
+ code: "<CodeBlock\n snippets={[\n { code: `function greet(name: string): string {\n return \\`Hello, \\${name}!\\`;\n}`, language: 'typescript', filename: 'greet.ts' },\n { code: `function greet(name) {\n return \\`Hello, \\${name}!\\`;\n}`, language: 'javascript', filename: 'greet.js' },\n { code: `def greet(name):\n return f\"Hello, {name}!\"`, language: 'python', filename: 'greet.py' },\n { code: `def greet(name)\n \"Hello, #{name}!\"\nend`, language: 'ruby', filename: 'greet.rb' },\n ]}\n/>",
134
+ },
135
+ },
136
+ },
102
137
  };
103
138
  /**
104
139
  * Complex example with tabs and highlighted lines.
@@ -122,6 +157,13 @@ export var ComplexExample = {
122
157
  },
123
158
  ],
124
159
  },
160
+ parameters: {
161
+ docs: {
162
+ source: {
163
+ code: "<CodeBlock\n snippets={[\n {\n code: `import React from 'react';\n\nexport function Button({ children, onClick }) {\n return (\n <button onClick={onClick} className=\"btn\">\n {children}\n </button>\n );\n}`,\n language: 'jsx',\n filename: 'Button.jsx',\n tabTitle: 'Button.jsx',\n highlightLines: [3, 4, 5],\n },\n {\n code: `.btn {\n padding: 0.5rem 1rem;\n background-color: #3b82f6;\n color: white;\n border-radius: 0.375rem;\n}`,\n language: 'css',\n filename: 'Button.css',\n tabTitle: 'Button.css',\n highlightLines: [2, 3],\n },\n ]}\n/>",
164
+ },
165
+ },
166
+ },
125
167
  };
126
168
  /**
127
169
  * Example using path prop to load from external markdown file.
@@ -131,6 +173,13 @@ export var WithPath = {
131
173
  args: {
132
174
  path: 'https://raw.githubusercontent.com/storybookjs/storybook/47e331ffbaa61a476ddb873bdb12bf46a93a5131/docs/_snippets/before-each-in-meta-mock-date.md',
133
175
  },
176
+ parameters: {
177
+ docs: {
178
+ source: {
179
+ code: "<CodeBlock path=\"https://raw.githubusercontent.com/storybookjs/storybook/47e331ffbaa61a476ddb873bdb12bf46a93a5131/docs/_snippets/before-each-in-meta-mock-date.md\" />",
180
+ },
181
+ },
182
+ },
134
183
  };
135
184
  /**
136
185
  * JSON code example.
@@ -141,6 +190,13 @@ export var JSONExample = {
141
190
  language: 'json',
142
191
  filename: 'package.json',
143
192
  },
193
+ parameters: {
194
+ docs: {
195
+ source: {
196
+ code: "<CodeBlock\n language=\"json\"\n filename=\"package.json\"\n code={`{\n \"name\": \"docs-design-system\",\n \"version\": \"0.1.0\",\n \"dependencies\": {\n \"react\": \"^18.0.0\"\n }\n}`}\n/>",
197
+ },
198
+ },
199
+ },
144
200
  };
145
201
  /**
146
202
  * Bash/shell script example.
@@ -151,6 +207,13 @@ export var BashExample = {
151
207
  language: 'bash',
152
208
  filename: 'setup.sh',
153
209
  },
210
+ parameters: {
211
+ docs: {
212
+ source: {
213
+ code: "<CodeBlock\n language=\"bash\"\n filename=\"setup.sh\"\n code={`#!/bin/bash\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run tests\nnpm test`}\n/>",
214
+ },
215
+ },
216
+ },
154
217
  };
155
218
  /**
156
219
  * Multiple TSX files displayed as flat tabs with bottom-border accent.
@@ -172,6 +235,13 @@ export var WithFilenameTabs = {
172
235
  },
173
236
  ],
174
237
  },
238
+ parameters: {
239
+ docs: {
240
+ source: {
241
+ code: "<CodeBlock\n snippets={[\n {\n code: `import { CodeBlock } from '@docs-design-system/ui';\n\nexport function Example() {\n return (\n <CodeBlock\n code=\"console.log('hello')\"\n language=\"typescript\"\n />\n );\n}`,\n language: 'tsx',\n filename: 'Example.tsx',\n tabTitle: 'Example.tsx',\n },\n {\n code: `import { CodeBlock } from '@docs-design-system/ui';\n\nexport function Advanced() {\n return (\n <CodeBlock\n snippets={[\n { code: 'const a = 1;', language: 'typescript', tabTitle: 'a.ts' },\n { code: 'const b = 2;', language: 'typescript', tabTitle: 'b.ts' },\n ]}\n />\n );\n}`,\n language: 'tsx',\n filename: 'Advanced.tsx',\n tabTitle: 'Advanced.tsx',\n },\n ]}\n/>",
242
+ },
243
+ },
244
+ },
175
245
  };
176
246
  /**
177
247
  * Single snippet with a filename — displays a flat filename label in the header.
@@ -182,6 +252,13 @@ export var SingleFilename = {
182
252
  language: 'tsx',
183
253
  filename: 'page.tsx',
184
254
  },
255
+ parameters: {
256
+ docs: {
257
+ source: {
258
+ code: "<CodeBlock\n language=\"tsx\"\n filename=\"page.tsx\"\n code={`export default function Home() {\n return <h1>Welcome</h1>;\n}`}\n/>",
259
+ },
260
+ },
261
+ },
185
262
  };
186
263
  /**
187
264
  * PHP syntax highlighting example.
@@ -192,6 +269,13 @@ export var PHPExample = {
192
269
  language: 'php',
193
270
  filename: 'UserController.php',
194
271
  },
272
+ parameters: {
273
+ docs: {
274
+ source: {
275
+ code: "<CodeBlock\n language=\"php\"\n filename=\"UserController.php\"\n code={`<?php\n\nnamespace App\\\\Http\\\\Controllers;\n\nuse Illuminate\\\\Http\\\\Request;\n\nclass UserController extends Controller\n{\n public function index()\n {\n $users = User::all();\n return view('users.index', compact('users'));\n }\n\n public function show(int $id)\n {\n $user = User::findOrFail($id);\n return response()->json($user);\n }\n}`}\n/>",
276
+ },
277
+ },
278
+ },
195
279
  };
196
280
  /**
197
281
  * Many tabs to verify horizontal scroll behavior.
@@ -231,4 +315,11 @@ export var ManyTabs = {
231
315
  },
232
316
  ],
233
317
  },
318
+ parameters: {
319
+ docs: {
320
+ source: {
321
+ code: "<CodeBlock\n snippets={[\n { code: `export const App = () => <div>App</div>;`, language: 'tsx', tabTitle: 'App.tsx' },\n { code: `export const Header = () => <header>Header</header>;`, language: 'tsx', tabTitle: 'Header.tsx' },\n { code: `export const Footer = () => <footer>Footer</footer>;`, language: 'tsx', tabTitle: 'Footer.tsx' },\n { code: `export const Sidebar = () => <aside>Sidebar</aside>;`, language: 'tsx', tabTitle: 'Sidebar.tsx' },\n { code: `export const Nav = () => <nav>Nav</nav>;`, language: 'tsx', tabTitle: 'Navigation.tsx' },\n { code: `export const Content = () => <main>Content</main>;`, language: 'tsx', tabTitle: 'ContentArea.tsx' },\n ]}\n/>",
322
+ },
323
+ },
324
+ },
234
325
  };
@@ -25,6 +25,13 @@ export var Basic = {
25
25
  title: 'Click to expand',
26
26
  children: (_jsx("p", { children: "This content is hidden by default and can be revealed by clicking the title. It includes smooth height animations for a better user experience." })),
27
27
  },
28
+ parameters: {
29
+ docs: {
30
+ source: {
31
+ code: "<Collapser title=\"Click to expand\">\n <p>\n This content is hidden by default and can be revealed by clicking the title.\n It includes smooth height animations for a better user experience.\n </p>\n</Collapser>",
32
+ },
33
+ },
34
+ },
28
35
  };
29
36
  /**
30
37
  * Collapser that starts in the open state.
@@ -35,6 +42,13 @@ export var DefaultOpen = {
35
42
  defaultOpen: true,
36
43
  children: (_jsx("p", { children: "This collapser is open by default. Users can still click to collapse it." })),
37
44
  },
45
+ parameters: {
46
+ docs: {
47
+ source: {
48
+ code: "<Collapser title=\"This section starts open\" defaultOpen>\n <p>This collapser is open by default. Users can still click to collapse it.</p>\n</Collapser>",
49
+ },
50
+ },
51
+ },
38
52
  };
39
53
  /**
40
54
  * Collapser with an ID for the title.
@@ -45,6 +59,13 @@ export var WithID = {
45
59
  id: 'faq-question-1',
46
60
  children: (_jsx("p", { children: "This collapser has an ID on its title, which is useful for anchor links and accessibility purposes." })),
47
61
  },
62
+ parameters: {
63
+ docs: {
64
+ source: {
65
+ code: "<Collapser title=\"Section with ID\" id=\"faq-question-1\">\n <p>\n This collapser has an ID on its title, which is useful for anchor links\n and accessibility purposes.\n </p>\n</Collapser>",
66
+ },
67
+ },
68
+ },
48
69
  };
49
70
  /**
50
71
  * Collapser containing complex content.
@@ -54,10 +75,24 @@ export var ComplexContent = {
54
75
  title: 'How do I install the components?',
55
76
  children: (_jsxs("div", { children: [_jsx("p", { children: "You can install the components using npm:" }), _jsx("pre", { style: { background: '#f5f5f5', padding: '1rem', borderRadius: '4px' }, children: "npm install @docs-design-system/ui" }), _jsx("p", { children: "Then import them in your React application:" }), _jsx("pre", { style: { background: '#f5f5f5', padding: '1rem', borderRadius: '4px' }, children: "import { Button, Card } from '@docs-design-system/ui';" })] })),
56
77
  },
78
+ parameters: {
79
+ docs: {
80
+ source: {
81
+ code: "<Collapser title=\"How do I install the components?\">\n <div>\n <p>You can install the components using npm:</p>\n <pre>npm install @docs-design-system/ui</pre>\n <p>Then import them in your React application:</p>\n <pre>import {'{ Button, Card }'} from '@docs-design-system/ui';</pre>\n </div>\n</Collapser>",
82
+ },
83
+ },
84
+ },
57
85
  };
58
86
  /**
59
87
  * Multiple collapsers in a FAQ-style layout using CollapserGroup.
60
88
  */
61
89
  export var FAQExample = {
90
+ parameters: {
91
+ docs: {
92
+ source: {
93
+ code: "<CollapserGroup>\n <Collapser title=\"What is this documentation system?\">\n <p>\n This is a comprehensive documentation design system that provides\n reusable components and guidelines for creating effective technical\n documentation.\n </p>\n </Collapser>\n <Collapser title=\"How do I get started?\">\n <p>\n Start by installing the component package, then explore the components\n in Storybook to understand their usage and configuration options.\n </p>\n </Collapser>\n <Collapser title=\"Can I customize the components?\">\n <p>\n Yes! All components accept a className prop for custom styling, and you\n can override the default styles using CSS.\n </p>\n </Collapser>\n <Collapser title=\"Is this accessible?\">\n <p>\n Accessibility is a core principle. All components follow WAI-ARIA best\n practices and are keyboard navigable.\n </p>\n </Collapser>\n</CollapserGroup>",
94
+ },
95
+ },
96
+ },
62
97
  render: function () { return (_jsxs(CollapserGroup, { children: [_jsx(Collapser, { title: "What is this documentation system?", children: _jsx("p", { children: "This is a comprehensive documentation design system that provides reusable components and guidelines for creating effective technical documentation." }) }), _jsx(Collapser, { title: "How do I get started?", children: _jsx("p", { children: "Start by installing the component package, then explore the components in Storybook to understand their usage and configuration options." }) }), _jsx(Collapser, { title: "Can I customize the components?", children: _jsx("p", { children: "Yes! All components accept a className prop for custom styling, and you can override the default styles using CSS." }) }), _jsx(Collapser, { title: "Is this accessible?", children: _jsx("p", { children: "Accessibility is a core principle. All components follow WAI-ARIA best practices and are keyboard navigable." }) })] })); },
63
98
  };