@shohojdhara/atomix 0.3.14 → 0.3.15

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 (173) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build-tools/EXAMPLES.md +372 -0
  3. package/build-tools/README.md +242 -0
  4. package/build-tools/__tests__/error-handler.test.js +230 -0
  5. package/build-tools/__tests__/index.test.js +141 -0
  6. package/build-tools/__tests__/rollup-plugin.test.js +194 -0
  7. package/build-tools/__tests__/utils.test.js +161 -0
  8. package/build-tools/__tests__/vite-plugin.test.js +129 -0
  9. package/build-tools/__tests__/webpack-loader.test.js +190 -0
  10. package/build-tools/error-handler.js +308 -0
  11. package/build-tools/index.d.ts +43 -0
  12. package/build-tools/index.js +88 -0
  13. package/build-tools/package.json +67 -0
  14. package/build-tools/rollup-plugin.js +236 -0
  15. package/build-tools/types.d.ts +163 -0
  16. package/build-tools/utils.js +203 -0
  17. package/build-tools/vite-plugin.js +161 -0
  18. package/build-tools/webpack-loader.js +123 -0
  19. package/dist/atomix.css +203 -90
  20. package/dist/atomix.css.map +1 -1
  21. package/dist/atomix.min.css +3 -3
  22. package/dist/atomix.min.css.map +1 -1
  23. package/dist/build-tools/EXAMPLES.md +372 -0
  24. package/dist/build-tools/README.md +242 -0
  25. package/dist/build-tools/__tests__/error-handler.test.js +230 -0
  26. package/dist/build-tools/__tests__/index.test.js +141 -0
  27. package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
  28. package/dist/build-tools/__tests__/utils.test.js +161 -0
  29. package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
  30. package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
  31. package/dist/build-tools/error-handler.js +308 -0
  32. package/dist/build-tools/index.d.ts +43 -0
  33. package/dist/build-tools/index.js +88 -0
  34. package/dist/build-tools/package.json +67 -0
  35. package/dist/build-tools/rollup-plugin.js +236 -0
  36. package/dist/build-tools/types.d.ts +163 -0
  37. package/dist/build-tools/utils.js +203 -0
  38. package/dist/build-tools/vite-plugin.js +161 -0
  39. package/dist/build-tools/webpack-loader.js +123 -0
  40. package/dist/charts.d.ts +1 -1
  41. package/dist/charts.js +86 -57
  42. package/dist/charts.js.map +1 -1
  43. package/dist/core.d.ts +1 -1
  44. package/dist/core.js +136 -112
  45. package/dist/core.js.map +1 -1
  46. package/dist/forms.d.ts +2 -5
  47. package/dist/forms.js +140 -128
  48. package/dist/forms.js.map +1 -1
  49. package/dist/heavy.d.ts +1 -1
  50. package/dist/heavy.js +136 -112
  51. package/dist/heavy.js.map +1 -1
  52. package/dist/index.d.ts +9 -61
  53. package/dist/index.esm.js +237 -286
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +250 -299
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.min.js +1 -1
  58. package/dist/index.min.js.map +1 -1
  59. package/package.json +23 -8
  60. package/scripts/atomix-cli.js +170 -73
  61. package/scripts/cli/__tests__/README.md +81 -0
  62. package/scripts/cli/__tests__/basic.test.js +115 -0
  63. package/scripts/cli/__tests__/component-generator.test.js +332 -0
  64. package/scripts/cli/__tests__/integration.test.js +327 -0
  65. package/scripts/cli/__tests__/test-setup.js +133 -0
  66. package/scripts/cli/__tests__/token-manager.test.js +251 -0
  67. package/scripts/cli/__tests__/utils.test.js +161 -0
  68. package/scripts/cli/component-generator.js +253 -299
  69. package/scripts/cli/dependency-checker.js +355 -0
  70. package/scripts/cli/interactive-init.js +46 -5
  71. package/scripts/cli/template-manager.js +0 -2
  72. package/scripts/cli/templates/common-templates.js +636 -0
  73. package/scripts/cli/templates/composable-templates.js +148 -126
  74. package/scripts/cli/templates/index.js +23 -16
  75. package/scripts/cli/templates/project-templates.js +151 -23
  76. package/scripts/cli/templates/react-templates.js +280 -210
  77. package/scripts/cli/templates/scss-templates.js +90 -91
  78. package/scripts/cli/templates/testing-templates.js +206 -27
  79. package/scripts/cli/templates/testing-utils.js +278 -0
  80. package/scripts/cli/templates/types-templates.js +70 -56
  81. package/scripts/cli/theme-bridge.js +8 -2
  82. package/scripts/cli/token-manager.js +318 -206
  83. package/scripts/cli/utils.js +0 -1
  84. package/src/components/Accordion/Accordion.stories.tsx +369 -870
  85. package/src/components/AtomixGlass/AtomixGlass.tsx +80 -39
  86. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
  87. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
  88. package/src/components/AtomixGlass/glass-utils.ts +2 -2
  89. package/src/components/AtomixGlass/shader-utils.ts +5 -0
  90. package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
  91. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
  92. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
  93. package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
  94. package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
  95. package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -35
  96. package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +1 -1
  97. package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
  98. package/src/components/Avatar/Avatar.stories.tsx +213 -1
  99. package/src/components/Badge/Badge.stories.tsx +121 -362
  100. package/src/components/Block/Block.stories.tsx +21 -12
  101. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +141 -23
  102. package/src/components/Button/Button.stories.tsx +463 -1126
  103. package/src/components/Button/Button.test.tsx +107 -0
  104. package/src/components/Button/Button.tsx +46 -50
  105. package/src/components/Button/ButtonGroup.stories.tsx +373 -217
  106. package/src/components/Callout/Callout.stories.tsx +289 -634
  107. package/src/components/Card/Card.stories.tsx +248 -68
  108. package/src/components/Chart/Chart.stories.tsx +150 -8
  109. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +151 -69
  110. package/src/components/Countdown/Countdown.stories.tsx +115 -8
  111. package/src/components/DataTable/DataTable.stories.tsx +346 -146
  112. package/src/components/DatePicker/DatePicker.stories.tsx +325 -1066
  113. package/src/components/Dropdown/Dropdown.stories.tsx +153 -33
  114. package/src/components/EdgePanel/EdgePanel.stories.tsx +230 -21
  115. package/src/components/Footer/Footer.stories.tsx +392 -328
  116. package/src/components/Form/Checkbox.stories.tsx +140 -6
  117. package/src/components/Form/Checkbox.test.tsx +63 -0
  118. package/src/components/Form/Checkbox.tsx +87 -51
  119. package/src/components/Form/Form.stories.tsx +119 -20
  120. package/src/components/Form/FormGroup.stories.tsx +127 -4
  121. package/src/components/Form/Radio.stories.tsx +140 -5
  122. package/src/components/Form/Select.stories.tsx +140 -8
  123. package/src/components/Form/Textarea.stories.tsx +149 -6
  124. package/src/components/Hero/Hero.stories.tsx +333 -32
  125. package/src/components/List/List.stories.tsx +141 -3
  126. package/src/components/Modal/Modal.stories.tsx +181 -42
  127. package/src/components/Popover/Popover.stories.tsx +448 -98
  128. package/src/components/Progress/Progress.stories.tsx +167 -5
  129. package/src/components/River/River.stories.tsx +1 -1
  130. package/src/components/SectionIntro/SectionIntro.stories.tsx +240 -48
  131. package/src/components/Spinner/Spinner.stories.tsx +102 -8
  132. package/src/components/Steps/Steps.stories.tsx +172 -43
  133. package/src/components/Tabs/Tabs.stories.tsx +136 -10
  134. package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
  135. package/src/components/Todo/Todo.stories.tsx +198 -9
  136. package/src/components/Toggle/Toggle.stories.tsx +126 -39
  137. package/src/components/Tooltip/Tooltip.stories.tsx +194 -104
  138. package/src/components/Upload/Upload.stories.tsx +113 -24
  139. package/src/lib/README.md +2 -2
  140. package/src/lib/__tests__/theme-tools.test.ts +193 -0
  141. package/src/lib/composables/index.ts +2 -2
  142. package/src/lib/composables/useAtomixGlass.ts +28 -56
  143. package/src/lib/composables/useChartExport.ts +2 -7
  144. package/src/lib/composables/useDataTable.ts +46 -29
  145. package/src/lib/constants/components.ts +9 -32
  146. package/src/lib/theme/devtools/CLI.ts +1 -1
  147. package/src/lib/types/components.ts +1 -1
  148. package/src/lib/utils/__tests__/csv.test.ts +45 -0
  149. package/src/lib/utils/csv.ts +17 -0
  150. package/src/lib/utils/dataTableExport.ts +1 -10
  151. package/src/styles/01-settings/_index.scss +2 -1
  152. package/src/styles/01-settings/_settings.accordion.scss +28 -7
  153. package/src/styles/01-settings/_settings.colors.scss +11 -11
  154. package/src/styles/01-settings/_settings.typography.scss +5 -5
  155. package/src/styles/02-tools/_tools.utility-api.scss +14 -0
  156. package/src/styles/06-components/_components.accordion.scss +56 -14
  157. package/src/styles/06-components/_components.checkbox.scss +23 -17
  158. package/src/styles/99-utilities/_index.scss +2 -0
  159. package/src/styles/99-utilities/_utilities.scss +3 -1
  160. package/src/styles/99-utilities/_utilities.text-gradient.scss +45 -0
  161. package/themes/dark-complementary/README.md +98 -0
  162. package/themes/dark-complementary/index.scss +158 -0
  163. package/themes/default-light/README.md +81 -0
  164. package/themes/default-light/index.scss +154 -0
  165. package/themes/high-contrast/README.md +105 -0
  166. package/themes/high-contrast/index.scss +172 -0
  167. package/themes/test-theme/README.md +38 -0
  168. package/themes/test-theme/index.scss +47 -0
  169. package/scripts/cli/templates-original-backup.js +0 -1655
  170. package/scripts/cli/templates_backup.js +0 -684
  171. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
  172. package/src/lib/composables/useButton.ts +0 -93
  173. package/src/lib/composables/useCheckbox.ts +0 -70
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
+ import { fn } from '@storybook/test';
3
4
  import { Progress } from './Progress';
4
5
  import { THEME_COLORS, SIZES } from '../../lib/constants/components';
5
6
 
@@ -10,8 +11,61 @@ const meta = {
10
11
  layout: 'centered',
11
12
  docs: {
12
13
  description: {
13
- component:
14
- 'The Progress component displays the completion status of a task or process. It provides visual feedback on progress through a horizontal bar that fills based on a percentage value. Progress bars support multiple variants, sizes, and can be used to show loading states, form completion, or any incremental process.',
14
+ component: `
15
+ # Progress
16
+
17
+ ## Overview
18
+
19
+ Progress displays the completion status of a task or process. It provides visual feedback on progress through a horizontal bar that fills based on a percentage value. Progress bars support multiple variants, sizes, and can be used to show loading states, form completion, or any incremental process.
20
+
21
+ ## Features
22
+
23
+ - Multiple color variants (primary, secondary, success, warning, error, etc.)
24
+ - Multiple size options (sm, md, lg)
25
+ - Percentage-based value tracking
26
+ - Accessible design
27
+ - Responsive behavior
28
+ - Smooth transitions
29
+
30
+ ## Accessibility
31
+
32
+ - Screen reader: Progress value announced appropriately
33
+ - ARIA support: Proper roles and properties for progress bar
34
+ - Keyboard support: Accessible via keyboard navigation
35
+ - Focus management: Focus indicators maintained for interactive elements
36
+
37
+ ## Usage Examples
38
+
39
+ ### Basic Usage
40
+
41
+ \`\`\`tsx
42
+ <Progress value={50} />
43
+ \`\`\`
44
+
45
+ ### With Variant and Size
46
+
47
+ \`\`\`tsx
48
+ <Progress
49
+ value={75}
50
+ variant="success"
51
+ size="lg"
52
+ />
53
+ \`\`\`
54
+
55
+ ## API Reference
56
+
57
+ ### Props
58
+
59
+ | Prop | Type | Default | Description |
60
+ | ---- | ---- | ------- | ----------- |
61
+ | value | number | 0 | The progress value as a percentage (0-100) |
62
+ | variant | ThemeColor | 'primary' | The color variant of the progress bar |
63
+ | size | 'sm' \\| 'md' \\| 'lg' | 'md' | The size of the progress bar |
64
+ | animated | boolean | false | Whether to animate the progress bar |
65
+ | striped | boolean | false | Whether to apply striped styling |
66
+ | label | string | - | Optional label to display with the progress |
67
+ | max | number | 100 | The maximum value for the progress bar |
68
+ `,
15
69
  },
16
70
  },
17
71
  },
@@ -27,19 +81,60 @@ const meta = {
27
81
  value: {
28
82
  control: { type: 'range', min: 0, max: 100 },
29
83
  description: 'The progress value as a percentage (0-100)',
30
- defaultValue: 50,
84
+ table: {
85
+ type: { summary: 'number' },
86
+ defaultValue: { summary: 0 },
87
+ },
31
88
  },
32
89
  variant: {
33
90
  control: { type: 'select' },
34
91
  options: THEME_COLORS,
35
92
  description: 'The color variant of the progress bar',
36
- defaultValue: 'primary',
93
+ table: {
94
+ type: { summary: 'ThemeColor' },
95
+ defaultValue: { summary: 'primary' },
96
+ },
37
97
  },
38
98
  size: {
39
99
  control: { type: 'select' },
40
100
  options: SIZES,
41
101
  description: 'The size of the progress bar',
42
- defaultValue: 'md',
102
+ table: {
103
+ type: { summary: '"sm" | "md" | "lg"' },
104
+ defaultValue: { summary: 'md' },
105
+ },
106
+ },
107
+ animated: {
108
+ control: 'boolean',
109
+ description: 'Whether to animate the progress bar',
110
+ table: {
111
+ type: { summary: 'boolean' },
112
+ defaultValue: { summary: false },
113
+ },
114
+ },
115
+ striped: {
116
+ control: 'boolean',
117
+ description: 'Whether to apply striped styling',
118
+ table: {
119
+ type: { summary: 'boolean' },
120
+ defaultValue: { summary: false },
121
+ },
122
+ },
123
+ label: {
124
+ control: 'text',
125
+ description: 'Optional label to display with the progress',
126
+ table: {
127
+ type: { summary: 'string' },
128
+ defaultValue: { summary: '-' },
129
+ },
130
+ },
131
+ max: {
132
+ control: 'number',
133
+ description: 'The maximum value for the progress bar',
134
+ table: {
135
+ type: { summary: 'number' },
136
+ defaultValue: { summary: 100 },
137
+ },
43
138
  },
44
139
  },
45
140
  } satisfies Meta<typeof Progress>;
@@ -47,6 +142,73 @@ const meta = {
47
142
  export default meta;
48
143
  type Story = StoryObj<typeof meta>;
49
144
 
145
+ export const BasicUsage: Story = {
146
+ args: {
147
+ value: 50,
148
+ variant: 'primary',
149
+ size: 'md',
150
+ },
151
+ parameters: {
152
+ docs: {
153
+ description: {
154
+ story: 'Basic progress bar with default settings.',
155
+ },
156
+ },
157
+ },
158
+ };
159
+
160
+ export const AllVariants: Story = {
161
+ render: () => (
162
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
163
+ <div><strong>Primary:</strong> <Progress value={75} variant="primary" /></div>
164
+ <div><strong>Secondary:</strong> <Progress value={60} variant="secondary" /></div>
165
+ <div><strong>Success:</strong> <Progress value={100} variant="success" /></div>
166
+ <div><strong>Warning:</strong> <Progress value={45} variant="warning" /></div>
167
+ <div><strong>Error:</strong> <Progress value={30} variant="error" /></div>
168
+ </div>
169
+ ),
170
+ parameters: {
171
+ docs: {
172
+ description: {
173
+ story: 'Progress bars with all available color variants.',
174
+ },
175
+ },
176
+ },
177
+ };
178
+
179
+ export const AllSizes: Story = {
180
+ render: () => (
181
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
182
+ <div><strong>Small:</strong> <Progress value={60} size="sm" /></div>
183
+ <div><strong>Medium:</strong> <Progress value={70} size="md" /></div>
184
+ <div><strong>Large:</strong> <Progress value={80} size="lg" /></div>
185
+ </div>
186
+ ),
187
+ parameters: {
188
+ docs: {
189
+ description: {
190
+ story: 'Progress bars with all available sizes.',
191
+ },
192
+ },
193
+ },
194
+ };
195
+
196
+ export const WithLabel: Story = {
197
+ args: {
198
+ value: 75,
199
+ variant: 'primary',
200
+ size: 'md',
201
+ label: 'Processing files: 75%',
202
+ },
203
+ parameters: {
204
+ docs: {
205
+ description: {
206
+ story: 'Progress bar with a label showing current value.',
207
+ },
208
+ },
209
+ },
210
+ };
211
+
50
212
  // Default Progress
51
213
  export const Default: Story = {
52
214
  args: {
@@ -199,7 +199,7 @@ export const CustomTitle: Story = {
199
199
  </div>
200
200
  ),
201
201
  args: {
202
- title: <h1 className="c-river__title u-text-gradient">Custom Title with Gradient</h1>,
202
+ title: <h1 className="c-river__title u-text-gradient-primary">Custom Title with Gradient</h1>,
203
203
  text: 'The sun had set, leaving the sky painted in shades of orange and pink as the stars twinkled above. The air was filled with the sound of crickets and the rustle of leaves in the gentle breeze.',
204
204
  actions: (
205
205
  <a href="#" className="c-btn u-pl-0">
@@ -2,6 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Button } from '../Button';
3
3
  import { SectionIntro } from './SectionIntro';
4
4
  import { SIZES } from '../../lib/constants/components';
5
+ import { fn } from '@storybook/test';
5
6
 
6
7
  const meta = {
7
8
  title: 'Components/SectionIntro',
@@ -17,33 +18,129 @@ const meta = {
17
18
  },
18
19
  tags: ['autodocs'],
19
20
  argTypes: {
20
- title: { control: 'text', description: 'Main title text' },
21
- label: { control: 'text', description: 'Label text displayed above the title' },
22
- text: { control: 'text', description: 'Description text content' },
21
+ title: {
22
+ control: 'text',
23
+ description: 'Main title text (supports ReactNode)',
24
+ table: {
25
+ type: { summary: 'ReactNode' },
26
+ defaultValue: { summary: 'undefined' },
27
+ }
28
+ },
29
+ label: {
30
+ control: 'text',
31
+ description: 'Label text displayed above the title (supports ReactNode)',
32
+ table: {
33
+ type: { summary: 'ReactNode' },
34
+ defaultValue: { summary: 'undefined' },
35
+ }
36
+ },
37
+ text: {
38
+ control: 'text',
39
+ description: 'Description text content (supports ReactNode)',
40
+ table: {
41
+ type: { summary: 'ReactNode' },
42
+ defaultValue: { summary: 'undefined' },
43
+ }
44
+ },
23
45
  alignment: {
24
- control: { type: 'select' },
46
+ control: { type: 'radio', options: ['left', 'center', 'right'] },
25
47
  options: ['left', 'center', 'right'],
26
48
  description: 'Text alignment',
49
+ table: {
50
+ type: { summary: '"left" | "center" | "right"' },
51
+ defaultValue: { summary: 'left' },
52
+ }
27
53
  },
28
54
  size: {
29
- control: { type: 'select' },
55
+ control: { type: 'radio', options: SIZES },
30
56
  options: SIZES,
31
57
  description: 'Size variant',
58
+ table: {
59
+ type: { summary: '"sm" | "md" | "lg"' },
60
+ defaultValue: { summary: 'md' },
61
+ }
62
+ },
63
+ skeleton: {
64
+ control: 'boolean',
65
+ description: 'Show skeleton loading state',
66
+ table: {
67
+ type: { summary: 'boolean' },
68
+ defaultValue: { summary: false },
69
+ }
70
+ },
71
+ showOverlay: {
72
+ control: 'boolean',
73
+ description: 'Whether to show an overlay on the background',
74
+ table: {
75
+ type: { summary: 'boolean' },
76
+ defaultValue: { summary: false },
77
+ }
78
+ },
79
+ actions: {
80
+ control: { type: 'text' },
81
+ description: 'Call to action elements (supports ReactNode)',
82
+ table: {
83
+ type: { summary: 'ReactNode' },
84
+ defaultValue: { summary: 'undefined' },
85
+ }
86
+ },
87
+ backgroundImageSrc: {
88
+ control: 'text',
89
+ description: 'URL for the background image',
90
+ table: {
91
+ type: { summary: 'string' },
92
+ defaultValue: { summary: 'undefined' },
93
+ }
94
+ },
95
+ imageSrc: {
96
+ control: 'text',
97
+ description: 'URL for the foreground image',
98
+ table: {
99
+ type: { summary: 'string' },
100
+ defaultValue: { summary: 'undefined' },
101
+ }
102
+ },
103
+ imageAlt: {
104
+ control: 'text',
105
+ description: 'Alt text for the image',
106
+ table: {
107
+ type: { summary: 'string' },
108
+ defaultValue: { summary: 'Section image' },
109
+ }
110
+ },
111
+ className: {
112
+ control: 'text',
113
+ description: 'Additional CSS class',
114
+ table: {
115
+ type: { summary: 'string' },
116
+ defaultValue: { summary: '' },
117
+ }
118
+ },
119
+ style: {
120
+ control: 'object',
121
+ description: 'Custom style object for the section intro',
122
+ table: {
123
+ type: { summary: 'CSSProperties' },
124
+ defaultValue: { summary: '{}' },
125
+ }
32
126
  },
33
- skeleton: { control: 'boolean' },
34
- showOverlay: { control: 'boolean' },
35
- actions: { control: false },
36
- backgroundImageSrc: { control: 'text' },
37
- imageSrc: { control: 'text' },
38
- imageAlt: { control: 'text', description: 'Alt text for the image' },
127
+ },
128
+ args: {
129
+ title: 'Our Mission',
130
+ label: 'About Us',
131
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
132
+ alignment: 'left',
133
+ size: 'md',
134
+ // Adding a mock function for any potential event handling
135
+ onClick: fn(),
39
136
  },
40
137
  } satisfies Meta<typeof SectionIntro>;
41
138
 
42
139
  export default meta;
43
140
  type Story = StoryObj<typeof meta>;
44
141
 
45
- // Default SectionIntro
46
- export const Default: Story = {
142
+ // Basic usage example
143
+ export const BasicUsage: Story = {
47
144
  args: {
48
145
  title: 'Our Mission',
49
146
  label: 'About Us',
@@ -51,89 +148,174 @@ export const Default: Story = {
51
148
  alignment: 'left',
52
149
  size: 'md',
53
150
  },
151
+ parameters: {
152
+ docs: {
153
+ description: {
154
+ story: 'Basic usage of the SectionIntro component with title, label, and text.'
155
+ }
156
+ }
157
+ }
54
158
  };
55
159
 
56
- // Left-aligned with actions
160
+ // With actions example
57
161
  export const WithActions: Story = {
58
162
  args: {
59
- ...Default.args,
163
+ title: 'Ready to get started?',
164
+ label: 'Take Action',
165
+ text: 'Join thousands of satisfied users who have transformed their workflow with our components.',
166
+ alignment: 'center',
167
+ size: 'md',
60
168
  actions: (
61
- <div className="u-flex u-gap-md">
62
- <Button label="Learn More" />
63
- <Button label="Contact Us" variant="secondary" />
169
+ <div className="u-flex u-gap-4">
170
+ <Button label="Get Started" />
171
+ <Button label="Learn More" variant="secondary" />
64
172
  </div>
65
173
  ),
66
174
  },
175
+ parameters: {
176
+ docs: {
177
+ description: {
178
+ story: 'SectionIntro with call-to-action buttons.'
179
+ }
180
+ }
181
+ }
67
182
  };
68
183
 
69
- // Center-aligned
70
- export const Centered: Story = {
184
+ // Center-aligned example
185
+ export const CenterAligned: Story = {
71
186
  args: {
72
- ...Default.args,
73
- alignment: 'center',
187
+ title: 'Discover Our Vision',
188
+ label: 'Our Vision',
74
189
  text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
190
+ alignment: 'center',
191
+ size: 'md',
75
192
  },
193
+ parameters: {
194
+ docs: {
195
+ description: {
196
+ story: 'Center-aligned SectionIntro content.'
197
+ }
198
+ }
199
+ }
76
200
  };
77
201
 
78
- // Right-aligned
202
+ // Right-aligned example
79
203
  export const RightAligned: Story = {
80
204
  args: {
81
- ...Default.args,
82
- alignment: 'right',
205
+ title: 'Our Approach',
206
+ label: 'Methodology',
83
207
  text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
208
+ alignment: 'right',
209
+ size: 'md',
84
210
  },
211
+ parameters: {
212
+ docs: {
213
+ description: {
214
+ story: 'Right-aligned SectionIntro content.'
215
+ }
216
+ }
217
+ }
85
218
  };
86
219
 
87
- // With background image
88
- export const WithBackground: Story = {
220
+ // With background image example
221
+ export const WithBackgroundImage: Story = {
89
222
  args: {
90
- ...Default.args,
91
- backgroundImageSrc:
92
- 'https://images.unsplash.com/photo-1557682250-33bd709cbe85?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
93
- showOverlay: true,
94
- alignment: 'center',
95
223
  title: 'Discover Our Vision',
96
224
  label: 'About Us',
97
225
  text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
226
+ alignment: 'center',
227
+ size: 'md',
228
+ backgroundImageSrc:
229
+ 'https://images.unsplash.com/photo-1557682250-33bd709cbe85?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
230
+ showOverlay: true,
98
231
  },
232
+ parameters: {
233
+ docs: {
234
+ description: {
235
+ story: 'SectionIntro with a background image and overlay.'
236
+ }
237
+ }
238
+ }
99
239
  };
100
240
 
101
- // With image
102
- export const WithImage: Story = {
241
+ // With foreground image example
242
+ export const WithForegroundImage: Story = {
103
243
  args: {
104
- ...Default.args,
244
+ title: 'Team Collaboration',
245
+ label: 'Our Team',
246
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
247
+ alignment: 'left',
248
+ size: 'md',
105
249
  imageSrc:
106
250
  'https://images.unsplash.com/photo-1581291518633-83b4ebd1d83e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
107
251
  imageAlt: 'Team collaboration',
108
252
  },
253
+ parameters: {
254
+ docs: {
255
+ description: {
256
+ story: 'SectionIntro with a foreground image.'
257
+ }
258
+ }
259
+ }
109
260
  };
110
261
 
111
- // Small size
112
- export const Small: Story = {
262
+ // Small size example
263
+ export const SmallSize: Story = {
113
264
  args: {
114
- ...Default.args,
265
+ title: 'Compact View',
266
+ label: 'Small Size',
267
+ text: 'This is a smaller version of the SectionIntro component.',
268
+ alignment: 'left',
115
269
  size: 'sm',
116
270
  },
271
+ parameters: {
272
+ docs: {
273
+ description: {
274
+ story: 'Small-sized SectionIntro for compact layouts.'
275
+ }
276
+ }
277
+ }
117
278
  };
118
279
 
119
- // Large size
120
- export const Large: Story = {
280
+ // Large size example
281
+ export const LargeSize: Story = {
121
282
  args: {
122
- ...Default.args,
283
+ title: 'Impressive Header',
284
+ label: 'Large Size',
285
+ text: 'This is a larger version of the SectionIntro component suitable for hero sections and prominent displays.',
286
+ alignment: 'center',
123
287
  size: 'lg',
124
288
  },
289
+ parameters: {
290
+ docs: {
291
+ description: {
292
+ story: 'Large-sized SectionIntro for prominent displays.'
293
+ }
294
+ }
295
+ }
125
296
  };
126
297
 
127
- // Skeleton loading state
128
- export const Skeleton: Story = {
298
+ // Skeleton loading state example
299
+ export const SkeletonLoading: Story = {
129
300
  args: {
130
- ...Default.args,
301
+ title: 'Loading Content',
302
+ label: 'Please Wait',
303
+ text: 'Content is being loaded...',
304
+ alignment: 'left',
305
+ size: 'md',
131
306
  skeleton: true,
132
307
  },
308
+ parameters: {
309
+ docs: {
310
+ description: {
311
+ story: 'Skeleton loading state of the SectionIntro component.'
312
+ }
313
+ }
314
+ }
133
315
  };
134
316
 
135
- // Full example with all features
136
- export const FullExample: Story = {
317
+ // Full featured example
318
+ export const FullFeaturedExample: Story = {
137
319
  args: {
138
320
  title: 'Building the Future Together',
139
321
  label: 'Our Vision',
@@ -143,11 +325,21 @@ export const FullExample: Story = {
143
325
  backgroundImageSrc:
144
326
  'https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
145
327
  showOverlay: true,
328
+ imageSrc:
329
+ 'https://images.unsplash.com/photo-1468436139062-f6fdfcd1e6cd?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
330
+ imageAlt: 'Mountain landscape',
146
331
  actions: (
147
- <div className="u-flex u-gap-md u-justify-center">
332
+ <div className="u-flex u-justify-center u-gap-4">
148
333
  <Button label="Get Started" size="lg" />
149
334
  <Button label="Learn More" size="lg" variant="secondary" />
150
335
  </div>
151
336
  ),
152
337
  },
153
- };
338
+ parameters: {
339
+ docs: {
340
+ description: {
341
+ story: 'Full featured SectionIntro with all options enabled.'
342
+ }
343
+ }
344
+ }
345
+ };