@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 { Footer } from './Footer';
4
5
  import { FooterSection } from './FooterSection';
5
6
  import { FooterLink } from './FooterLink';
@@ -12,43 +13,226 @@ const meta = {
12
13
  layout: 'fullscreen',
13
14
  docs: {
14
15
  description: {
15
- component:
16
- 'The Footer component provides a comprehensive footer section for websites with multiple layout variants, sections, links, and optional features like newsletter signup and back-to-top buttons. Footers support various color variants, sizes, and can be sticky. Essential for site navigation, branding, and additional information display.',
16
+ component: `
17
+ # Footer
18
+
19
+ ## Overview
20
+
21
+ Footer provides a comprehensive footer section for websites with multiple layout variants, sections, links, and optional features like newsletter signup and back-to-top buttons. Footers support various color variants, sizes, and can be sticky. Essential for site navigation, branding, and additional information display.
22
+
23
+ ## Features
24
+
25
+ - Multiple layout variants (columns, centered, minimal, stacked, flexible, sidebar, wide)
26
+ - Color and size variants
27
+ - Newsletter signup option
28
+ - Back-to-top button
29
+ - Social media links
30
+ - Divider options
31
+ - Sticky positioning
32
+ - Responsive design
33
+ - Glass effect option
34
+
35
+ ## Accessibility
36
+
37
+ - Screen reader: Footer content and links announced properly
38
+ - ARIA support: Proper landmarks and roles for footer section
39
+ - Keyboard support: All interactive elements accessible via keyboard
40
+ - Focus management: Visible focus indicators for navigation
41
+
42
+ ## Usage Examples
43
+
44
+ ### Basic Usage
45
+
46
+ \`\`\`tsx
47
+ <Footer>
48
+ <FooterSection title="Products">
49
+ <FooterLink href="/products">Our Products</FooterLink>
50
+ </FooterSection>
51
+ </Footer>
52
+ \`\`\`
53
+
54
+ ### With Newsletter
55
+
56
+ \`\`\`tsx
57
+ <Footer showNewsletter={true}>
58
+ <FooterSection title="Products">
59
+ <FooterLink href="/products">Our Products</FooterLink>
60
+ </FooterSection>
61
+ </Footer>
62
+ \`\`\`
63
+
64
+ ## API Reference
65
+
66
+ ### Props
67
+
68
+ | Prop | Type | Default | Description |
69
+ | ---- | ---- | ------- | ----------- |
70
+ | layout | 'columns' \\| 'centered' \\| 'minimal' \\| 'stacked' \\| 'flexible' \\| 'sidebar' \\| 'wide' | 'columns' | Footer layout variant |
71
+ | variant | ThemeColor | 'secondary' | Color variant |
72
+ | size | 'sm' \\| 'md' \\| 'lg' | 'md' | Size variant |
73
+ | showNewsletter | boolean | false | Whether to show newsletter signup |
74
+ | showBackToTop | boolean | false | Whether to show back to top button |
75
+ | showDivider | boolean | false | Whether to show divider above bottom section |
76
+ | sticky | boolean | false | Whether footer should be sticky |
77
+ | socialLinks | SocialLink[] | [] | Array of social media links |
78
+ | onBackToTopClick | () => void | - | Callback when back to top button is clicked |
79
+ | brand | ReactNode | - | Brand name or logo |
80
+ | brandLogo | string \\| ReactNode | - | Brand logo (image URL or React element) |
81
+ | brandDescription | ReactNode | - | Brand description text |
82
+ | copyright | ReactNode | - | Copyright text |
83
+ | newsletterTitle | string | 'Stay Updated' | Newsletter section title |
84
+ | newsletterDescription | string | 'Subscribe...' | Newsletter section description |
85
+ | newsletterPlaceholder | string | 'Enter your email' | Newsletter input placeholder |
86
+ | newsletterButtonText | string | 'Subscribe' | Newsletter submit button text |
87
+ | onNewsletterSubmit | (email: string) => void | - | Newsletter submit handler |
88
+ | glass | boolean | - | Whether footer should have glass effect |
89
+ `,
17
90
  },
18
91
  },
19
92
  },
20
93
  tags: ['autodocs'],
21
94
  argTypes: {
22
95
  layout: {
23
- control: 'select',
96
+ control: { type: 'select' },
24
97
  options: ['columns', 'centered', 'minimal', 'stacked', 'flexible', 'sidebar', 'wide'],
25
98
  description: 'Footer layout variant',
99
+ table: {
100
+ type: { summary: '"columns" | "centered" | "minimal" | "stacked" | "flexible" | "sidebar" | "wide"' },
101
+ defaultValue: { summary: 'columns' },
102
+ },
26
103
  },
27
104
  variant: {
28
- control: 'select',
105
+ control: { type: 'select' },
29
106
  options: THEME_COLORS,
30
107
  description: 'Color variant',
108
+ table: {
109
+ type: { summary: 'ThemeColor' },
110
+ defaultValue: { summary: 'primary' },
111
+ },
31
112
  },
32
113
  size: {
33
- control: 'select',
114
+ control: { type: 'select' },
34
115
  options: SIZES,
35
116
  description: 'Size variant',
117
+ table: {
118
+ type: { summary: '"sm" | "md" | "lg"' },
119
+ defaultValue: { summary: 'md' },
120
+ },
36
121
  },
37
122
  showNewsletter: {
38
123
  control: 'boolean',
39
124
  description: 'Whether to show newsletter signup',
125
+ table: {
126
+ type: { summary: 'boolean' },
127
+ defaultValue: { summary: false },
128
+ },
40
129
  },
41
130
  showBackToTop: {
42
131
  control: 'boolean',
43
132
  description: 'Whether to show back to top button',
133
+ table: {
134
+ type: { summary: 'boolean' },
135
+ defaultValue: { summary: false },
136
+ },
44
137
  },
45
138
  showDivider: {
46
139
  control: 'boolean',
47
140
  description: 'Whether to show divider above bottom section',
141
+ table: {
142
+ type: { summary: 'boolean' },
143
+ defaultValue: { summary: true },
144
+ },
48
145
  },
49
146
  sticky: {
50
147
  control: 'boolean',
51
148
  description: 'Whether footer should be sticky',
149
+ table: {
150
+ type: { summary: 'boolean' },
151
+ defaultValue: { summary: false },
152
+ },
153
+ },
154
+ socialLinks: {
155
+ control: 'object',
156
+ description: 'Array of social media links',
157
+ table: {
158
+ type: { summary: 'SocialLink[]' },
159
+ defaultValue: { summary: '[]' },
160
+ },
161
+ },
162
+ onBackToTop: {
163
+ action: 'back to top clicked',
164
+ description: 'Callback when back to top button is clicked',
165
+ },
166
+ onNewsletterSubmit: {
167
+ action: 'newsletter submitted',
168
+ description: 'Callback when newsletter is submitted',
169
+ },
170
+ brand: {
171
+ control: 'text',
172
+ description: 'Brand name',
173
+ table: {
174
+ type: { summary: 'ReactNode' },
175
+ },
176
+ },
177
+ brandLogo: {
178
+ control: 'text',
179
+ description: 'Brand logo URL',
180
+ table: {
181
+ type: { summary: 'string | ReactNode' },
182
+ },
183
+ },
184
+ brandDescription: {
185
+ control: 'text',
186
+ description: 'Brand description',
187
+ table: {
188
+ type: { summary: 'ReactNode' },
189
+ },
190
+ },
191
+ copyright: {
192
+ control: 'text',
193
+ description: 'Copyright text',
194
+ table: {
195
+ type: { summary: 'ReactNode' },
196
+ },
197
+ },
198
+ newsletterTitle: {
199
+ control: 'text',
200
+ description: 'Title for newsletter section',
201
+ table: {
202
+ type: { summary: 'string' },
203
+ defaultValue: { summary: 'Stay Updated' },
204
+ },
205
+ },
206
+ newsletterDescription: {
207
+ control: 'text',
208
+ description: 'Description for newsletter section',
209
+ table: {
210
+ type: { summary: 'string' },
211
+ defaultValue: { summary: 'Subscribe to our newsletter for the latest updates.' },
212
+ },
213
+ },
214
+ newsletterPlaceholder: {
215
+ control: 'text',
216
+ description: 'Placeholder for newsletter input',
217
+ table: {
218
+ type: { summary: 'string' },
219
+ defaultValue: { summary: 'Enter your email' },
220
+ },
221
+ },
222
+ newsletterButtonText: {
223
+ control: 'text',
224
+ description: 'Text for newsletter button',
225
+ table: {
226
+ type: { summary: 'string' },
227
+ defaultValue: { summary: 'Subscribe' },
228
+ },
229
+ },
230
+ glass: {
231
+ control: 'boolean',
232
+ description: 'Whether to apply glass effect',
233
+ table: {
234
+ type: { summary: 'boolean' },
235
+ },
52
236
  },
53
237
  },
54
238
  } satisfies Meta<typeof Footer>;
@@ -82,56 +266,38 @@ const SampleFooterContent = () => (
82
266
  <FooterLink href="/contact">Contact</FooterLink>
83
267
  </FooterSection>
84
268
 
85
- <FooterSection title="Company">
86
- <FooterLink href="/about">About Us</FooterLink>
87
- <FooterLink href="/careers">Careers</FooterLink>
88
- <FooterLink href="/blog">Blog</FooterLink>
89
- <FooterLink href="/contact">Contact</FooterLink>
269
+ <FooterSection title="Resources">
270
+ <FooterLink href="/docs">Documentation</FooterLink>
271
+ <FooterLink href="/tutorials">Tutorials</FooterLink>
272
+ <FooterLink href="/support">Support</FooterLink>
273
+ <FooterLink href="/community">Community</FooterLink>
90
274
  </FooterSection>
91
275
 
92
- <FooterSection title="Company">
93
- <FooterLink href="/about">About Us</FooterLink>
94
- <FooterLink href="/careers">Careers</FooterLink>
95
- <FooterLink href="/blog">Blog</FooterLink>
96
- <FooterLink href="/contact">Contact</FooterLink>
276
+ <FooterSection title="Legal">
277
+ <FooterLink href="/privacy">Privacy Policy</FooterLink>
278
+ <FooterLink href="/terms">Terms of Service</FooterLink>
279
+ <FooterLink href="/cookies">Cookie Policy</FooterLink>
280
+ <FooterLink href="/gdpr">GDPR Compliance</FooterLink>
97
281
  </FooterSection>
98
282
  </>
99
283
  );
100
284
 
101
- const LayoutTemplate: Story = {
285
+ export const BasicUsage: Story = {
102
286
  args: {
103
287
  brand: 'Atomix',
104
- brandDescription: 'A modern design system for building accessible web applications.',
105
- copyright: '© 2024 Atomix UI. All rights reserved.',
106
- layout: 'columns',
107
- variant: 'primary',
108
- size: 'md',
109
- showNewsletter: false,
110
- showBackToTop: false,
111
- showDivider: true,
112
- sticky: false,
288
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
289
+ copyright: '© 2024 Atomix. All rights reserved.',
113
290
  socialLinks: sampleSocialLinks,
114
291
  },
115
- render: (args: any) => (
116
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
117
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)', padding: '2rem' }}>
118
- <h1>Main Content</h1>
119
- <p>This is sample page content to demonstrate the footer in context.</p>
120
- </div>
121
- <Footer {...args}>
122
- <SampleFooterContent />
123
- </Footer>
124
- </div>
292
+ render: (args) => (
293
+ <Footer {...args}>
294
+ <SampleFooterContent />
295
+ </Footer>
125
296
  ),
126
- };
127
-
128
- export const Default: Story = {
129
- ...LayoutTemplate,
130
297
  parameters: {
131
298
  docs: {
132
299
  description: {
133
- story:
134
- 'Default footer configuration with modern styling, design tokens, and enhanced visual effects.',
300
+ story: 'Basic footer with sample content and default layout.',
135
301
  },
136
302
  },
137
303
  },
@@ -139,378 +305,276 @@ export const Default: Story = {
139
305
 
140
306
  export const WithNewsletter: Story = {
141
307
  args: {
142
- ...Default.args,
308
+ brand: 'Atomix',
309
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
310
+ copyright: '© 2024 Atomix. All rights reserved.',
143
311
  showNewsletter: true,
144
- newsletterTitle: 'Stay in the Loop',
145
- newsletterDescription:
146
- 'Get the latest updates, articles, and resources delivered to your inbox.',
147
- onNewsletterSubmit: (email: string) => {
148
- alert(`Thank you for subscribing with ${email}!`);
312
+ newsletterTitle: 'Stay Updated',
313
+ newsletterDescription: 'Subscribe to our newsletter for the latest updates and news.',
314
+ newsletterPlaceholder: 'Enter your email address',
315
+ newsletterButtonText: 'Subscribe Now',
316
+ onNewsletterSubmit: fn(),
317
+ socialLinks: sampleSocialLinks,
318
+ },
319
+ render: (args) => (
320
+ <Footer {...args}>
321
+ <SampleFooterContent />
322
+ </Footer>
323
+ ),
324
+ parameters: {
325
+ docs: {
326
+ description: {
327
+ story: 'Footer with newsletter signup form.',
328
+ },
149
329
  },
150
330
  },
151
- render: Default.render,
152
331
  };
153
332
 
154
333
  export const WithBackToTop: Story = {
155
334
  args: {
156
- ...Default.args,
335
+ brand: 'Atomix',
336
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
337
+ copyright: '© 2024 Atomix. All rights reserved.',
157
338
  showBackToTop: true,
158
339
  backToTopText: 'Back to Top',
159
- onBackToTop: () => {
160
- // Back to top functionality
340
+ onBackToTop: fn(),
341
+ socialLinks: sampleSocialLinks,
342
+ },
343
+ render: (args) => (
344
+ <Footer {...args}>
345
+ <SampleFooterContent />
346
+ </Footer>
347
+ ),
348
+ parameters: {
349
+ docs: {
350
+ description: {
351
+ story: 'Footer with back to top button and social links.',
352
+ },
161
353
  },
162
354
  },
163
- render: Default.render,
164
355
  };
165
356
 
166
- export const Centered: Story = {
167
- ...LayoutTemplate,
357
+ export const CenteredLayout: Story = {
168
358
  args: {
169
- ...LayoutTemplate.args,
170
359
  layout: 'centered',
171
- showNewsletter: true,
172
- showBackToTop: true,
173
- },
174
- };
175
-
176
- export const Minimal: Story = {
177
- ...LayoutTemplate,
178
- args: {
179
- ...LayoutTemplate.args,
180
- layout: 'minimal',
181
- variant: 'light',
182
- size: 'sm',
183
- socialLinks: sampleSocialLinks.slice(0, 3),
184
- showDivider: false,
185
- showNewsletter: false,
360
+ brand: 'Atomix',
361
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
362
+ copyright: '© 2024 Atomix. All rights reserved.',
363
+ socialLinks: sampleSocialLinks,
186
364
  },
187
- render: (args: any) => (
188
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
189
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
190
- <h1>Page Content</h1>
191
- <p>This is sample page content with a minimal footer.</p>
192
- </div>
193
- <Footer {...args}>
194
- <FooterSection title="Quick Links">
195
- <FooterLink href="/about">About</FooterLink>
196
- <FooterLink href="/contact">Contact</FooterLink>
197
- <FooterLink href="/privacy">Privacy</FooterLink>
198
- </FooterSection>
199
- </Footer>
200
- </div>
365
+ render: (args) => (
366
+ <Footer {...args}>
367
+ <SampleFooterContent />
368
+ </Footer>
201
369
  ),
202
- };
203
-
204
- export const Stacked: Story = {
205
- ...LayoutTemplate,
206
- args: {
207
- ...LayoutTemplate.args,
208
- layout: 'stacked',
209
- showNewsletter: true,
210
- showBackToTop: true,
211
- },
212
- };
213
-
214
- export const DarkVariant: Story = {
215
- args: {
216
- ...Default.args,
217
- variant: 'dark',
218
- showNewsletter: true,
219
- showBackToTop: true,
220
- },
221
- render: Default.render,
222
- };
223
-
224
- export const LargeSize: Story = {
225
- args: {
226
- ...Default.args,
227
- size: 'lg',
228
- showNewsletter: true,
229
- showBackToTop: true,
370
+ parameters: {
371
+ docs: {
372
+ description: {
373
+ story: 'Footer with centered layout variant.',
374
+ },
375
+ },
230
376
  },
231
- render: Default.render,
232
377
  };
233
378
 
234
- export const SmallSize: Story = {
379
+ export const MinimalLayout: Story = {
235
380
  args: {
236
- ...Default.args,
237
- size: 'sm',
238
381
  layout: 'minimal',
382
+ brand: 'Atomix',
383
+ brandLogo: 'https://via.placeholder.com/150x50.png?text=LOGO',
384
+ copyright: '© 2024 Atomix. All rights reserved.',
385
+ socialLinks: sampleSocialLinks,
239
386
  },
240
- render: Default.render,
241
- };
242
-
243
- export const WithBrandLogo: Story = {
244
- args: {
245
- ...Default.args,
246
- brandLogo: 'https://via.placeholder.com/150x50/007bff/ffffff?text=LOGO',
247
- showNewsletter: true,
387
+ render: (args) => (
388
+ <Footer {...args}>
389
+ <SampleFooterContent />
390
+ </Footer>
391
+ ),
392
+ parameters: {
393
+ docs: {
394
+ description: {
395
+ story: 'Footer with minimal layout variant.',
396
+ },
397
+ },
248
398
  },
249
- render: Default.render,
250
399
  };
251
400
 
252
- export const Sticky: Story = {
401
+ export const StackedLayout: Story = {
253
402
  args: {
254
- ...Default.args,
255
- sticky: true,
256
- size: 'sm',
257
- layout: 'minimal',
403
+ layout: 'stacked',
404
+ brand: 'Atomix',
405
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
406
+ copyright: '© 2024 Atomix. All rights reserved.',
407
+ socialLinks: sampleSocialLinks,
258
408
  },
259
- render: (args: any) => (
260
- <div style={{ height: '200vh', backgroundColor: 'var(--atomix-surface)' }}>
261
- <div style={{ padding: '2rem' }}>
262
- <h1>Scroll down to see sticky footer</h1>
263
- <p>This page is tall enough to demonstrate the sticky footer behavior.</p>
264
- {Array.from({ length: 20 }, (_, i) => (
265
- <p key={i}>
266
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor
267
- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
268
- exercitation ullamco laboris.
269
- </p>
270
- ))}
271
- </div>
272
- <Footer {...args}>
273
- <SampleFooterContent />
274
- </Footer>
275
- </div>
409
+ render: (args) => (
410
+ <Footer {...args}>
411
+ <SampleFooterContent />
412
+ </Footer>
276
413
  ),
277
- };
278
-
279
- export const CollapsibleSections: Story = {
280
- args: {
281
- ...Default.args,
282
- showNewsletter: true,
414
+ parameters: {
415
+ docs: {
416
+ description: {
417
+ story: 'Footer with stacked layout variant.',
418
+ },
419
+ },
283
420
  },
284
- render: (args: any) => (
285
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
286
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
287
- <h1>Collapsible Footer Sections</h1>
288
- <p>Resize the window to mobile size to see collapsible sections.</p>
289
- </div>
290
- <Footer {...args}>
291
- <FooterSection title="Products" collapsible defaultCollapsed>
292
- <FooterLink href="/product1">Web Development</FooterLink>
293
- <FooterLink href="/product2">Mobile Apps</FooterLink>
294
- <FooterLink href="/product3">UI/UX Design</FooterLink>
295
- </FooterSection>
296
-
297
- <FooterSection title="Company" collapsible>
298
- <FooterLink href="/about">About Us</FooterLink>
299
- <FooterLink href="/careers">Careers</FooterLink>
300
- <FooterLink href="/blog">Blog</FooterLink>
301
- </FooterSection>
302
- </Footer>
303
- </div>
304
- ),
305
421
  };
306
422
 
307
- export const WithExternalLinks: Story = {
423
+ export const FlexibleLayout: Story = {
308
424
  args: {
309
- ...Default.args,
310
- socialLinks: [
311
- ...sampleSocialLinks,
312
- { platform: 'tiktok' as const, url: 'https://tiktok.com/@company' },
313
- { platform: 'whatsapp' as const, url: 'https://wa.me/1234567890' },
314
- { platform: 'discord' as const, url: 'https://discord.gg/company' },
315
- ],
425
+ layout: 'flexible',
426
+ brand: 'Atomix',
427
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
428
+ copyright: '© 2024 Atomix. All rights reserved.',
429
+ socialLinks: sampleSocialLinks,
316
430
  },
317
- render: (args: any) => (
318
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
319
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
320
- <h1>Modern Social Links</h1>
321
- <p>Footer with enhanced social platforms and modern styling.</p>
322
- </div>
323
- <Footer {...args}>
324
- <FooterSection title="External Resources">
325
- <FooterLink href="https://github.com" external>
326
- GitHub
327
- </FooterLink>
328
- <FooterLink href="https://stackoverflow.com" external>
329
- Stack Overflow
330
- </FooterLink>
331
- <FooterLink href="https://developer.mozilla.org" external>
332
- MDN Docs
333
- </FooterLink>
334
- </FooterSection>
335
-
336
- <FooterSection title="Internal Links">
337
- <FooterLink href="/about">About Us</FooterLink>
338
- <FooterLink href="/contact">Contact</FooterLink>
339
- <FooterLink href="/blog" active>
340
- Blog
341
- </FooterLink>
342
- <FooterLink href="/disabled" disabled>
343
- Disabled Link
344
- </FooterLink>
345
- </FooterSection>
346
- </Footer>
347
- </div>
431
+ render: (args) => (
432
+ <Footer {...args}>
433
+ <SampleFooterContent />
434
+ </Footer>
348
435
  ),
436
+ parameters: {
437
+ docs: {
438
+ description: {
439
+ story: 'Footer with flexible layout variant.',
440
+ },
441
+ },
442
+ },
349
443
  };
350
444
 
351
- export const ModernGradients: Story = {
445
+ export const SidebarLayout: Story = {
352
446
  args: {
353
- ...Default.args,
354
- variant: 'primary',
355
- showNewsletter: true,
356
- showBackToTop: true,
447
+ layout: 'sidebar',
448
+ brand: 'Atomix',
449
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
450
+ copyright: '© 2024 Atomix. All rights reserved.',
357
451
  socialLinks: sampleSocialLinks,
358
452
  },
359
- render: (args: any) => (
360
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
361
- <div
362
- style={{
363
- flex: 1,
364
- padding: '2rem',
365
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
366
- }}
367
- >
368
- <h1 style={{ color: 'white' }}>Modern Design</h1>
369
- <p style={{ color: 'white' }}>Showcasing modern gradients and enhanced visual effects.</p>
370
- </div>
371
- <Footer {...args}>
372
- <SampleFooterContent />
373
- </Footer>
374
- </div>
453
+ render: (args) => (
454
+ <Footer {...args}>
455
+ <SampleFooterContent />
456
+ </Footer>
375
457
  ),
458
+ parameters: {
459
+ docs: {
460
+ description: {
461
+ story: 'Footer with sidebar layout variant.',
462
+ },
463
+ },
464
+ },
376
465
  };
377
466
 
378
- export const DesignTokensShowcase: Story = {
467
+ export const WideLayout: Story = {
379
468
  args: {
380
- ...Default.args,
381
- brand: 'Design Tokens',
382
- brandDescription:
383
- 'Showcasing consistent design tokens, modern hover effects, and enhanced visual styling throughout the footer component.',
384
- showNewsletter: true,
385
- showBackToTop: true,
469
+ layout: 'wide',
470
+ brand: 'Atomix',
471
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
472
+ copyright: '© 2024 Atomix. All rights reserved.',
386
473
  socialLinks: sampleSocialLinks,
387
474
  },
475
+ render: (args) => (
476
+ <Footer {...args}>
477
+ <SampleFooterContent />
478
+ </Footer>
479
+ ),
388
480
  parameters: {
389
481
  docs: {
390
482
  description: {
391
- story:
392
- 'Demonstrates the use of design tokens for consistent styling, enhanced hover effects, modern gradients, and improved accessibility features.',
483
+ story: 'Footer with wide layout variant.',
393
484
  },
394
485
  },
395
486
  },
396
- render: (args: any) => (
397
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
398
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
399
- <h1>Design Token Integration</h1>
400
- <p>
401
- This footer demonstrates consistent use of design tokens for colors, spacing, shadows, and
402
- typography. Hover over elements to see enhanced visual effects.
403
- </p>
404
- <ul>
405
- <li>✨ Global CSS variables for box shadows</li>
406
- <li>🎨 Design token-based colors and opacity</li>
407
- <li>📏 Consistent spacing using rem() function</li>
408
- <li>🔄 Smooth transitions and hover effects</li>
409
- <li>♿ Enhanced accessibility features</li>
410
- </ul>
411
- </div>
412
- <Footer {...args}>
413
- <FooterSection title="Design System">
414
- <FooterLink href="/tokens">Design Tokens</FooterLink>
415
- <FooterLink href="/components">Components</FooterLink>
416
- <FooterLink href="/guidelines">Guidelines</FooterLink>
417
- <FooterLink href="/accessibility">Accessibility</FooterLink>
418
- </FooterSection>
419
-
420
- <FooterSection title="Development">
421
- <FooterLink href="/scss">SCSS Architecture</FooterLink>
422
- <FooterLink href="/css-vars">CSS Variables</FooterLink>
423
- <FooterLink href="/responsive">Responsive Design</FooterLink>
424
- <FooterLink href="/performance">Performance</FooterLink>
425
- </FooterSection>
426
- </Footer>
427
- </div>
428
- ),
429
487
  };
430
488
 
431
- export const AccessibilityFocused: Story = {
489
+ export const DarkVariant: Story = {
432
490
  args: {
433
- ...Default.args,
434
- showNewsletter: true,
435
- showBackToTop: true,
491
+ variant: 'dark',
492
+ brand: 'Atomix',
493
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
494
+ copyright: '© 2024 Atomix. All rights reserved.',
495
+ socialLinks: sampleSocialLinks,
436
496
  },
437
- render: (args: any) => (
438
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
439
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
440
- <h1>Accessibility Features</h1>
441
- <p>Tab through the footer elements to see enhanced focus states and keyboard navigation.</p>
442
- </div>
443
- <Footer {...args}>
444
- <SampleFooterContent />
445
- </Footer>
446
- </div>
497
+ render: (args) => (
498
+ <Footer {...args}>
499
+ <SampleFooterContent />
500
+ </Footer>
447
501
  ),
448
- };
449
-
450
- export const ResponsiveShowcase: Story = {
451
- args: {
452
- ...Default.args,
453
- layout: 'columns',
454
- showNewsletter: true,
455
- showBackToTop: true,
502
+ parameters: {
503
+ docs: {
504
+ description: {
505
+ story: 'Footer with dark color variant.',
506
+ },
507
+ },
456
508
  },
457
- render: (args: any) => (
458
- <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
459
- <div style={{ flex: 1, backgroundColor: 'var(--atomix-brand-bg-subtle)' }}>
460
- <h1>Responsive Design</h1>
461
- <p>Resize the viewport to see responsive grid layouts and collapsible sections.</p>
462
- </div>
463
- <Footer {...args}>
464
- <SampleFooterContent />
465
- </Footer>
466
- </div>
467
- ),
468
509
  };
469
510
 
470
- export const Flexible: Story = {
471
- ...LayoutTemplate,
511
+ export const LargeSize: Story = {
472
512
  args: {
473
- ...LayoutTemplate.args,
474
- layout: 'flexible',
513
+ size: 'lg',
514
+ brand: 'Atomix',
515
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
516
+ copyright: '© 2024 Atomix. All rights reserved.',
517
+ socialLinks: sampleSocialLinks,
475
518
  },
519
+ render: (args) => (
520
+ <Footer {...args}>
521
+ <SampleFooterContent />
522
+ </Footer>
523
+ ),
476
524
  parameters: {
477
525
  docs: {
478
526
  description: {
479
- story:
480
- 'Flexible layout that automatically adapts to content width and screen size. Perfect for dynamic content scenarios.',
527
+ story: 'Footer with large size variant.',
481
528
  },
482
529
  },
483
530
  },
484
531
  };
485
532
 
486
- export const Sidebar: Story = {
487
- ...LayoutTemplate,
533
+ export const WithGlassEffect: Story = {
488
534
  args: {
489
- ...LayoutTemplate.args,
490
- layout: 'sidebar',
535
+ brand: 'Atomix',
536
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
537
+ copyright: '© 2024 Atomix. All rights reserved.',
538
+ socialLinks: sampleSocialLinks,
539
+ glass: true,
491
540
  },
541
+ render: (args) => (
542
+ <Footer {...args}>
543
+ <SampleFooterContent />
544
+ </Footer>
545
+ ),
492
546
  parameters: {
493
547
  docs: {
494
548
  description: {
495
- story:
496
- 'Sidebar layout with brand and newsletter in a left sidebar and content sections in the main area.',
549
+ story: 'Footer with glass effect enabled.',
497
550
  },
498
551
  },
499
552
  },
500
553
  };
501
554
 
502
- export const Wide: Story = {
503
- ...LayoutTemplate,
555
+ export const StickyFooter: Story = {
504
556
  args: {
505
- ...LayoutTemplate.args,
506
- layout: 'wide',
557
+ sticky: true,
558
+ brand: 'Atomix',
559
+ brandDescription: 'A modern design system for building beautiful, accessible websites.',
560
+ copyright: '© 2024 Atomix. All rights reserved.',
561
+ socialLinks: sampleSocialLinks,
507
562
  },
563
+ render: (args) => (
564
+ <div style={{ minHeight: '200vh' }}>
565
+ <div style={{ height: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
566
+ <p>Scroll down to see the sticky footer</p>
567
+ </div>
568
+ <Footer {...args}>
569
+ <SampleFooterContent />
570
+ </Footer>
571
+ </div>
572
+ ),
508
573
  parameters: {
509
574
  docs: {
510
575
  description: {
511
- story:
512
- 'Wide layout optimized for large screens with generous spacing and extended content areas.',
576
+ story: 'Sticky footer that stays at the bottom of the viewport.',
513
577
  },
514
578
  },
515
579
  },
516
- };
580
+ };