@shohojdhara/atomix 0.2.1 → 0.2.3

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 (201) hide show
  1. package/README.md +1 -28
  2. package/dist/atomix.css +1500 -241
  3. package/dist/atomix.min.css +6 -6
  4. package/dist/index.d.ts +1052 -194
  5. package/dist/index.esm.js +12201 -6066
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +5481 -2827
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.js +1 -1
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/themes/boomdevs.css +1500 -301
  12. package/dist/themes/boomdevs.min.css +60 -8
  13. package/dist/themes/esrar.css +1500 -241
  14. package/dist/themes/esrar.min.css +6 -6
  15. package/dist/themes/mashroom.css +1496 -237
  16. package/dist/themes/mashroom.min.css +8 -8
  17. package/dist/themes/shaj-default.css +1451 -192
  18. package/dist/themes/shaj-default.min.css +6 -6
  19. package/package.json +66 -15
  20. package/src/components/Accordion/Accordion.stories.tsx +137 -0
  21. package/src/components/Accordion/Accordion.tsx +33 -3
  22. package/src/components/AtomixGlass/AtomixGlass.stories.tsx +3011 -0
  23. package/src/components/AtomixGlass/AtomixGlass.test.tsx +199 -0
  24. package/src/components/AtomixGlass/AtomixGlass.tsx +1281 -0
  25. package/src/components/AtomixGlass/AtomixGlassComprehensivePreview.stories.tsx +1369 -0
  26. package/src/components/AtomixGlass/README.md +134 -0
  27. package/src/components/AtomixGlass/index.ts +10 -0
  28. package/src/components/AtomixGlass/shader-utils.ts +140 -0
  29. package/src/components/AtomixGlass/utils.ts +8 -0
  30. package/src/components/Badge/Badge.stories.tsx +169 -0
  31. package/src/components/Badge/Badge.tsx +27 -2
  32. package/src/components/Button/Button.stories.tsx +345 -0
  33. package/src/components/Button/Button.tsx +35 -3
  34. package/src/components/Button/README.md +216 -0
  35. package/src/components/Callout/Callout.stories.tsx +813 -78
  36. package/src/components/Callout/Callout.test.tsx +368 -0
  37. package/src/components/Callout/Callout.tsx +26 -7
  38. package/src/components/Callout/README.md +409 -0
  39. package/src/components/Card/Card.stories.tsx +140 -0
  40. package/src/components/Card/Card.tsx +19 -3
  41. package/src/components/DatePicker/DatePicker copy.tsx +551 -0
  42. package/src/components/DatePicker/DatePicker.stories.tsx +188 -0
  43. package/src/components/DatePicker/DatePicker.tsx +379 -332
  44. package/src/components/DatePicker/readme.md +110 -1
  45. package/src/components/DatePicker/types.ts +8 -0
  46. package/src/components/Dropdown/Dropdown.stories.tsx +145 -0
  47. package/src/components/Dropdown/Dropdown.tsx +34 -5
  48. package/src/components/Footer/Footer.stories.tsx +388 -0
  49. package/src/components/Footer/Footer.tsx +197 -0
  50. package/src/components/Footer/FooterLink.tsx +72 -0
  51. package/src/components/Footer/FooterSection.tsx +87 -0
  52. package/src/components/Footer/FooterSocialLink.tsx +117 -0
  53. package/src/components/Footer/README.md +261 -0
  54. package/src/components/Footer/index.ts +13 -0
  55. package/src/components/Form/Checkbox.stories.tsx +101 -0
  56. package/src/components/Form/Checkbox.tsx +26 -2
  57. package/src/components/Form/Input.stories.tsx +124 -0
  58. package/src/components/Form/Input.tsx +36 -7
  59. package/src/components/Form/Radio.stories.tsx +139 -0
  60. package/src/components/Form/Radio.tsx +26 -2
  61. package/src/components/Form/Select.stories.tsx +110 -0
  62. package/src/components/Form/Select.tsx +26 -2
  63. package/src/components/Form/Textarea.stories.tsx +104 -0
  64. package/src/components/Form/Textarea.tsx +36 -7
  65. package/src/components/Hero/Hero.stories.tsx +54 -1
  66. package/src/components/Hero/Hero.tsx +70 -11
  67. package/src/components/Modal/Modal.stories.tsx +235 -0
  68. package/src/components/Modal/Modal.tsx +64 -35
  69. package/src/components/Pagination/Pagination.stories.tsx +101 -0
  70. package/src/components/Pagination/Pagination.tsx +25 -1
  71. package/src/components/Popover/Popover.stories.tsx +94 -0
  72. package/src/components/Popover/Popover.tsx +30 -4
  73. package/src/components/Rating/Rating.stories.tsx +112 -0
  74. package/src/components/Rating/Rating.tsx +25 -1
  75. package/src/components/SectionIntro/SectionIntro.tsx +9 -11
  76. package/src/components/Slider/Slider.stories.tsx +634 -50
  77. package/src/components/Slider/Slider.tsx +5 -3
  78. package/src/components/Steps/Steps.stories.tsx +119 -0
  79. package/src/components/Steps/Steps.tsx +32 -1
  80. package/src/components/Tab/Tab.stories.tsx +88 -0
  81. package/src/components/Tab/Tab.tsx +32 -1
  82. package/src/components/Toggle/Toggle.stories.tsx +92 -0
  83. package/src/components/Toggle/Toggle.tsx +32 -1
  84. package/src/components/Tooltip/Tooltip.stories.tsx +131 -0
  85. package/src/components/Tooltip/Tooltip.tsx +43 -7
  86. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +1002 -196
  87. package/src/components/VideoPlayer/VideoPlayer.tsx +161 -4
  88. package/src/components/index.ts +14 -0
  89. package/src/layouts/Grid/Grid.stories.tsx +226 -159
  90. package/src/lib/composables/index.ts +4 -0
  91. package/src/lib/composables/useAtomixGlass.ts +71 -0
  92. package/src/lib/composables/useButton.ts +3 -1
  93. package/src/lib/composables/useCallout.ts +4 -1
  94. package/src/lib/composables/useFooter.ts +85 -0
  95. package/src/lib/composables/useGlassContainer.ts +168 -0
  96. package/src/lib/composables/useSlider.ts +191 -4
  97. package/src/lib/constants/components.ts +173 -0
  98. package/src/lib/types/components.ts +622 -0
  99. package/src/lib/utils/displacement-generator.ts +86 -0
  100. package/src/styles/01-settings/_index.scss +1 -0
  101. package/src/styles/01-settings/_settings.accordion.scss +20 -19
  102. package/src/styles/01-settings/_settings.animations.scss +5 -5
  103. package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
  104. package/src/styles/01-settings/_settings.avatar.scss +17 -18
  105. package/src/styles/01-settings/_settings.background.scss +10 -0
  106. package/src/styles/01-settings/_settings.badge.scss +1 -1
  107. package/src/styles/01-settings/_settings.breadcrumb.scss +8 -2
  108. package/src/styles/01-settings/_settings.callout.scss +7 -7
  109. package/src/styles/01-settings/_settings.card.scss +2 -2
  110. package/src/styles/01-settings/_settings.chart.scss +7 -7
  111. package/src/styles/01-settings/_settings.checkbox-group.scss +5 -2
  112. package/src/styles/01-settings/_settings.checkbox.scss +10 -4
  113. package/src/styles/01-settings/_settings.countdown.scss +6 -4
  114. package/src/styles/01-settings/_settings.dropdown.scss +9 -7
  115. package/src/styles/01-settings/_settings.edge-panel.scss +3 -2
  116. package/src/styles/01-settings/_settings.footer.scss +125 -0
  117. package/src/styles/01-settings/_settings.form-group.scss +3 -1
  118. package/src/styles/01-settings/_settings.form.scss +4 -2
  119. package/src/styles/01-settings/_settings.hero.scss +9 -7
  120. package/src/styles/01-settings/_settings.input.scss +9 -7
  121. package/src/styles/01-settings/_settings.list-group.scss +4 -2
  122. package/src/styles/01-settings/_settings.list.scss +4 -2
  123. package/src/styles/01-settings/_settings.menu.scss +10 -8
  124. package/src/styles/01-settings/_settings.messages.scss +19 -17
  125. package/src/styles/01-settings/_settings.modal.scss +6 -4
  126. package/src/styles/01-settings/_settings.nav.scss +6 -4
  127. package/src/styles/01-settings/_settings.navbar.scss +8 -5
  128. package/src/styles/01-settings/_settings.pagination.scss +5 -3
  129. package/src/styles/01-settings/_settings.popover.scss +6 -4
  130. package/src/styles/01-settings/_settings.rating.scss +5 -3
  131. package/src/styles/01-settings/_settings.river.scss +8 -6
  132. package/src/styles/01-settings/_settings.sectionintro.scss +8 -6
  133. package/src/styles/01-settings/_settings.select.scss +7 -5
  134. package/src/styles/01-settings/_settings.side-menu.scss +15 -13
  135. package/src/styles/01-settings/_settings.spacing.scss +4 -0
  136. package/src/styles/01-settings/_settings.steps.scss +7 -5
  137. package/src/styles/01-settings/_settings.tabs.scss +7 -5
  138. package/src/styles/01-settings/_settings.testimonials.scss +6 -4
  139. package/src/styles/01-settings/_settings.toggle.scss +3 -1
  140. package/src/styles/01-settings/_settings.tooltip.scss +5 -3
  141. package/src/styles/01-settings/_settings.upload.scss +22 -20
  142. package/src/styles/02-tools/_tools.animations.scss +19 -0
  143. package/src/styles/02-tools/_tools.background.scss +87 -0
  144. package/src/styles/02-tools/_tools.glass.scss +1 -0
  145. package/src/styles/02-tools/_tools.rem.scss +18 -5
  146. package/src/styles/02-tools/_tools.utility-api.scss +32 -26
  147. package/src/styles/03-generic/_generic.root.scss +15 -2
  148. package/src/styles/04-elements/_elements.body.scss +6 -0
  149. package/src/styles/06-components/_components.accordion.scss +24 -4
  150. package/src/styles/06-components/_components.atomix-glass.scss +0 -0
  151. package/src/styles/06-components/_components.avatar-group.scss +2 -1
  152. package/src/styles/06-components/_components.avatar.scss +2 -1
  153. package/src/styles/06-components/_components.badge.scss +36 -1
  154. package/src/styles/06-components/_components.breadcrumb.scss +2 -1
  155. package/src/styles/06-components/_components.button.scss +14 -3
  156. package/src/styles/06-components/_components.callout.scss +44 -4
  157. package/src/styles/06-components/_components.card.scss +21 -2
  158. package/src/styles/06-components/_components.chart.scss +3 -2
  159. package/src/styles/06-components/_components.checkbox.scss +2 -1
  160. package/src/styles/06-components/_components.color-mode-toggle.scss +3 -2
  161. package/src/styles/06-components/_components.countdown.scss +2 -1
  162. package/src/styles/06-components/_components.data-table.scss +7 -6
  163. package/src/styles/06-components/_components.datepicker.scss +20 -1
  164. package/src/styles/06-components/_components.dropdown.scss +11 -4
  165. package/src/styles/06-components/_components.edge-panel.scss +4 -3
  166. package/src/styles/06-components/_components.footer.scss +825 -0
  167. package/src/styles/06-components/_components.form-group.scss +1 -0
  168. package/src/styles/06-components/_components.hero.scss +4 -4
  169. package/src/styles/06-components/_components.image-gallery.scss +1 -0
  170. package/src/styles/06-components/_components.input.scss +33 -2
  171. package/src/styles/06-components/_components.list-group.scss +3 -2
  172. package/src/styles/06-components/_components.list.scss +2 -1
  173. package/src/styles/06-components/_components.menu.scss +5 -4
  174. package/src/styles/06-components/_components.messages.scss +8 -7
  175. package/src/styles/06-components/_components.modal.scss +3 -2
  176. package/src/styles/06-components/_components.nav.scss +6 -5
  177. package/src/styles/06-components/_components.navbar.scss +4 -3
  178. package/src/styles/06-components/_components.pagination.scss +2 -1
  179. package/src/styles/06-components/_components.photoviewer.scss +4 -3
  180. package/src/styles/06-components/_components.popover.scss +3 -2
  181. package/src/styles/06-components/_components.product-review.scss +3 -2
  182. package/src/styles/06-components/_components.progress.scss +3 -2
  183. package/src/styles/06-components/_components.river.scss +3 -2
  184. package/src/styles/06-components/_components.sectionintro.scss +2 -1
  185. package/src/styles/06-components/_components.select.scss +5 -4
  186. package/src/styles/06-components/_components.side-menu.scss +8 -7
  187. package/src/styles/06-components/_components.skeleton.scss +3 -2
  188. package/src/styles/06-components/_components.slider.scss +7 -6
  189. package/src/styles/06-components/_components.spinner.scss +1 -0
  190. package/src/styles/06-components/_components.steps.scss +3 -2
  191. package/src/styles/06-components/_components.tabs.scss +4 -3
  192. package/src/styles/06-components/_components.testimonials.scss +2 -1
  193. package/src/styles/06-components/_components.todo.scss +3 -2
  194. package/src/styles/06-components/_components.toggle.scss +5 -4
  195. package/src/styles/06-components/_components.tooltip.scss +3 -2
  196. package/src/styles/06-components/_components.upload.scss +4 -3
  197. package/src/styles/06-components/_components.video-player.scss +50 -27
  198. package/src/styles/06-components/_index.scss +2 -0
  199. package/src/styles/99-utilities/_utilities.glass-fixes.scss +48 -0
  200. package/dist/themes/yabai.css +0 -13711
  201. package/dist/themes/yabai.min.css +0 -189
@@ -0,0 +1,87 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { FooterSectionProps } from '../../lib/types/components';
3
+
4
+ /**
5
+ * FooterSection component provides a section within the footer for organizing links and content.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FooterSection title="Products" icon={<ProductIcon />}>
10
+ * <FooterLink href="/product1">Product 1</FooterLink>
11
+ * <FooterLink href="/product2">Product 2</FooterLink>
12
+ * </FooterSection>
13
+ * ```
14
+ */
15
+ export const FooterSection = forwardRef<HTMLDivElement, FooterSectionProps>(
16
+ (
17
+ {
18
+ title,
19
+ icon,
20
+ collapsible = false,
21
+ defaultCollapsed = false,
22
+ children,
23
+ className = '',
24
+ ...props
25
+ },
26
+ ref
27
+ ) => {
28
+ const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed);
29
+
30
+ const handleToggle = () => {
31
+ if (collapsible) {
32
+ setIsCollapsed(!isCollapsed);
33
+ }
34
+ };
35
+
36
+ const sectionClass = [
37
+ 'c-footer__section',
38
+ collapsible && 'c-footer__section--collapsible',
39
+ isCollapsed && 'c-footer__section--collapsed',
40
+ className,
41
+ ]
42
+ .filter(Boolean)
43
+ .join(' ');
44
+
45
+ return (
46
+ <div ref={ref} className={sectionClass} {...props}>
47
+ {title && (
48
+ <div className="c-footer__section-header">
49
+ {collapsible ? (
50
+ <button
51
+ type="button"
52
+ className="c-footer__section-toggle"
53
+ onClick={handleToggle}
54
+ aria-expanded={!isCollapsed}
55
+ aria-controls={`footer-section-${title.toString().toLowerCase().replace(/\s+/g, '-')}`}
56
+ >
57
+ {icon && <span className="c-footer__section-icon">{icon}</span>}
58
+ <h4 className="c-footer__section-title">{title}</h4>
59
+ <span className="c-footer__section-chevron">
60
+ {isCollapsed ? '▼' : '▲'}
61
+ </span>
62
+ </button>
63
+ ) : (
64
+ <div className="c-footer__section-header-content">
65
+ {icon && <span className="c-footer__section-icon">{icon}</span>}
66
+ <h4 className="c-footer__section-title">{title}</h4>
67
+ </div>
68
+ )}
69
+ </div>
70
+ )}
71
+ <div
72
+ className="c-footer__section-content"
73
+ id={title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, '-')}` : undefined}
74
+ style={{
75
+ display: collapsible && isCollapsed ? 'none' : 'block',
76
+ }}
77
+ >
78
+ {children}
79
+ </div>
80
+ </div>
81
+ );
82
+ }
83
+ );
84
+
85
+ FooterSection.displayName = 'FooterSection';
86
+
87
+ export default FooterSection;
@@ -0,0 +1,117 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { FooterSocialLinkProps } from '../../lib/types/components';
3
+
4
+ /**
5
+ * FooterSocialLink component provides styled social media links with platform-specific icons.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
10
+ * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
11
+ * ```
12
+ */
13
+ export const FooterSocialLink = forwardRef<HTMLAnchorElement, FooterSocialLinkProps>(
14
+ (
15
+ {
16
+ platform,
17
+ url,
18
+ icon,
19
+ label,
20
+ size = 'md',
21
+ variant = 'default',
22
+ disabled = false,
23
+ className = '',
24
+ ...props
25
+ },
26
+ ref
27
+ ) => {
28
+ const getPlatformIcon = (platform: string) => {
29
+ const icons: Record<string, string> = {
30
+ facebook: '📘',
31
+ twitter: '🐦',
32
+ instagram: '📷',
33
+ linkedin: '💼',
34
+ youtube: '📺',
35
+ github: '🐙',
36
+ discord: '🎮',
37
+ tiktok: '🎵',
38
+ pinterest: '📌',
39
+ snapchat: '👻',
40
+ whatsapp: '💬',
41
+ telegram: '✈️',
42
+ reddit: '🤖',
43
+ twitch: '🎮',
44
+ spotify: '🎵',
45
+ dribbble: '🏀',
46
+ behance: '🎨',
47
+ medium: '📝',
48
+ dev: '👨‍💻',
49
+ codepen: '✏️',
50
+ };
51
+ return icons[platform] || '🔗';
52
+ };
53
+
54
+ const getPlatformLabel = (platform: string) => {
55
+ const labels: Record<string, string> = {
56
+ facebook: 'Facebook',
57
+ twitter: 'Twitter',
58
+ instagram: 'Instagram',
59
+ linkedin: 'LinkedIn',
60
+ youtube: 'YouTube',
61
+ github: 'GitHub',
62
+ discord: 'Discord',
63
+ tiktok: 'TikTok',
64
+ pinterest: 'Pinterest',
65
+ snapchat: 'Snapchat',
66
+ whatsapp: 'WhatsApp',
67
+ telegram: 'Telegram',
68
+ reddit: 'Reddit',
69
+ twitch: 'Twitch',
70
+ spotify: 'Spotify',
71
+ dribbble: 'Dribbble',
72
+ behance: 'Behance',
73
+ medium: 'Medium',
74
+ dev: 'Dev.to',
75
+ codepen: 'CodePen',
76
+ };
77
+ return labels[platform] || platform;
78
+ };
79
+
80
+ const linkClass = [
81
+ 'c-footer__social-link',
82
+ `c-footer__social-link--${platform}`,
83
+ `c-footer__social-link--${size}`,
84
+ `c-footer__social-link--${variant}`,
85
+ disabled && 'c-footer__social-link--disabled',
86
+ className,
87
+ ]
88
+ .filter(Boolean)
89
+ .join(' ');
90
+
91
+ const ariaLabel = label || `Follow us on ${getPlatformLabel(platform)}`;
92
+
93
+ return (
94
+ <a
95
+ ref={ref}
96
+ href={disabled ? undefined : url}
97
+ className={linkClass}
98
+ target="_blank"
99
+ rel="noopener noreferrer"
100
+ aria-label={ariaLabel}
101
+ aria-disabled={disabled}
102
+ {...props}
103
+ >
104
+ <span className="c-footer__social-link-icon">
105
+ {icon || getPlatformIcon(platform)}
106
+ </span>
107
+ <span className="c-footer__social-link-label u-visually-hidden">
108
+ {ariaLabel}
109
+ </span>
110
+ </a>
111
+ );
112
+ }
113
+ );
114
+
115
+ FooterSocialLink.displayName = 'FooterSocialLink';
116
+
117
+ export default FooterSocialLink;
@@ -0,0 +1,261 @@
1
+ # Footer Component
2
+
3
+ A comprehensive footer component with multiple layout options, social links, newsletter signup, and responsive design.
4
+
5
+ ## Features
6
+
7
+ - **Multiple Layouts**: Columns, centered, minimal, and stacked layouts
8
+ - **Social Media Integration**: Built-in support for 20+ social platforms
9
+ - **Newsletter Signup**: Optional newsletter subscription form
10
+ - **Responsive Design**: Mobile-first with collapsible sections
11
+ - **Back to Top**: Optional smooth scroll to top functionality
12
+ - **Accessibility**: WCAG 2.1 AA compliant with proper ARIA attributes
13
+ - **Theme Support**: Multiple color variants and dark mode
14
+ - **Sticky Footer**: Optional sticky positioning
15
+
16
+ ## Usage
17
+
18
+ ### Basic Footer
19
+
20
+ ```tsx
21
+ import { Footer, FooterSection, FooterLink } from '@shohojdhara/atomix';
22
+
23
+ <Footer
24
+ brand="My Company"
25
+ copyright="© 2024 My Company. All rights reserved."
26
+ socialLinks={[
27
+ { platform: 'twitter', url: 'https://twitter.com/company' },
28
+ { platform: 'facebook', url: 'https://facebook.com/company' }
29
+ ]}
30
+ >
31
+ <FooterSection title="Products">
32
+ <FooterLink href="/product1">Product 1</FooterLink>
33
+ <FooterLink href="/product2">Product 2</FooterLink>
34
+ </FooterSection>
35
+
36
+ <FooterSection title="Company">
37
+ <FooterLink href="/about">About Us</FooterLink>
38
+ <FooterLink href="/contact">Contact</FooterLink>
39
+ </FooterSection>
40
+ </Footer>
41
+ ```
42
+
43
+ ### With Newsletter
44
+
45
+ ```tsx
46
+ <Footer
47
+ brand="My Company"
48
+ copyright="© 2024 My Company. All rights reserved."
49
+ showNewsletter
50
+ newsletterTitle="Stay Updated"
51
+ newsletterDescription="Get the latest updates delivered to your inbox."
52
+ onNewsletterSubmit={(email) => console.log('Newsletter signup:', email)}
53
+ >
54
+ {/* Footer sections */}
55
+ </Footer>
56
+ ```
57
+
58
+ ### Collapsible Sections (Mobile)
59
+
60
+ ```tsx
61
+ <FooterSection title="Products" collapsible defaultCollapsed>
62
+ <FooterLink href="/product1">Product 1</FooterLink>
63
+ <FooterLink href="/product2">Product 2</FooterLink>
64
+ </FooterSection>
65
+ ```
66
+
67
+ ## Props
68
+
69
+ ### Footer Props
70
+
71
+ | Prop | Type | Default | Description |
72
+ |------|------|---------|-------------|
73
+ | `brand` | `ReactNode` | - | Brand name or logo |
74
+ | `brandLogo` | `string \| ReactNode` | - | Brand logo (image URL or React element) |
75
+ | `brandDescription` | `ReactNode` | - | Brand description text |
76
+ | `copyright` | `ReactNode` | - | Copyright text |
77
+ | `layout` | `'columns' \| 'centered' \| 'minimal' \| 'stacked'` | `'columns'` | Footer layout variant |
78
+ | `variant` | `ThemeColor` | `'primary'` | Color variant |
79
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size variant |
80
+ | `showNewsletter` | `boolean` | `false` | Whether to show newsletter signup |
81
+ | `newsletterTitle` | `string` | `'Stay Updated'` | Newsletter section title |
82
+ | `newsletterDescription` | `string` | - | Newsletter section description |
83
+ | `newsletterPlaceholder` | `string` | `'Enter your email'` | Newsletter input placeholder |
84
+ | `newsletterButtonText` | `string` | `'Subscribe'` | Newsletter submit button text |
85
+ | `onNewsletterSubmit` | `(email: string) => void` | - | Newsletter submit handler |
86
+ | `socialLinks` | `SocialLink[]` | `[]` | Social media links |
87
+ | `showBackToTop` | `boolean` | `false` | Whether to show back to top button |
88
+ | `backToTopText` | `string` | `'Back to Top'` | Back to top button text |
89
+ | `onBackToTop` | `() => void` | - | Back to top click handler |
90
+ | `showDivider` | `boolean` | `true` | Whether to show divider above bottom section |
91
+ | `sticky` | `boolean` | `false` | Whether footer should be sticky |
92
+
93
+ ### FooterSection Props
94
+
95
+ | Prop | Type | Default | Description |
96
+ |------|------|---------|-------------|
97
+ | `title` | `ReactNode` | - | Section title |
98
+ | `icon` | `ReactNode` | - | Section icon |
99
+ | `collapsible` | `boolean` | `false` | Whether section is collapsible on mobile |
100
+ | `defaultCollapsed` | `boolean` | `false` | Whether section is collapsed by default |
101
+ | `children` | `ReactNode` | - | Section content |
102
+
103
+ ### FooterLink Props
104
+
105
+ | Prop | Type | Default | Description |
106
+ |------|------|---------|-------------|
107
+ | `href` | `string` | - | Link URL |
108
+ | `icon` | `ReactNode` | - | Link icon |
109
+ | `external` | `boolean` | `false` | Whether link opens in new tab |
110
+ | `active` | `boolean` | `false` | Whether link is active |
111
+ | `disabled` | `boolean` | `false` | Whether link is disabled |
112
+ | `onClick` | `(event: MouseEvent) => void` | - | Link click handler |
113
+ | `LinkComponent` | `React.ElementType` | - | Custom link component (e.g., React Router Link) |
114
+
115
+ ### Social Link Configuration
116
+
117
+ ```tsx
118
+ interface SocialLink {
119
+ platform: SocialPlatform;
120
+ url: string;
121
+ icon?: ReactNode; // Custom icon override
122
+ label?: string; // Custom accessibility label
123
+ }
124
+ ```
125
+
126
+ ### Supported Social Platforms
127
+
128
+ - `facebook`, `twitter`, `instagram`, `linkedin`
129
+ - `youtube`, `github`, `discord`, `tiktok`
130
+ - `pinterest`, `snapchat`, `whatsapp`, `telegram`
131
+ - `reddit`, `twitch`, `spotify`, `dribbble`
132
+ - `behance`, `medium`, `dev`, `codepen`
133
+ - `custom` (for custom platforms with custom icons)
134
+
135
+ ## Layout Variants
136
+
137
+ ### Columns (Default)
138
+ ```tsx
139
+ <Footer layout="columns">
140
+ {/* Sections arranged in responsive columns */}
141
+ </Footer>
142
+ ```
143
+
144
+ ### Centered
145
+ ```tsx
146
+ <Footer layout="centered">
147
+ {/* All content centered */}
148
+ </Footer>
149
+ ```
150
+
151
+ ### Minimal
152
+ ```tsx
153
+ <Footer layout="minimal" size="sm">
154
+ {/* Compact footer with minimal spacing */}
155
+ </Footer>
156
+ ```
157
+
158
+ ### Stacked
159
+ ```tsx
160
+ <Footer layout="stacked">
161
+ {/* Sections stacked vertically */}
162
+ </Footer>
163
+ ```
164
+
165
+ ## Styling
166
+
167
+ The Footer component uses CSS custom properties for theming:
168
+
169
+ ```css
170
+ .c-footer {
171
+ --atomix-footer-bg: var(--atomix-surface);
172
+ --atomix-footer-color: var(--atomix-text);
173
+ --atomix-footer-padding-y: 3rem;
174
+ --atomix-footer-container-max-width: 1200px;
175
+ }
176
+ ```
177
+
178
+ ### Custom Styling
179
+
180
+ ```scss
181
+ .c-footer {
182
+ &--custom {
183
+ --atomix-footer-bg: #1a1a1a;
184
+ --atomix-footer-color: #ffffff;
185
+
186
+ .c-footer__brand-name h3 {
187
+ color: #00ff88;
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ ## Accessibility
194
+
195
+ - Semantic HTML structure with proper `<footer>` element
196
+ - ARIA attributes for collapsible sections
197
+ - Keyboard navigation support
198
+ - Screen reader friendly
199
+ - Focus management
200
+ - High contrast support
201
+
202
+ ## Responsive Behavior
203
+
204
+ - **Mobile**: Sections stack vertically, optional collapsible sections
205
+ - **Tablet**: Responsive grid layout
206
+ - **Desktop**: Multi-column layout with proper spacing
207
+
208
+ ## Examples
209
+
210
+ ### Complete Footer with All Features
211
+
212
+ ```tsx
213
+ <Footer
214
+ brand="Atomix"
215
+ brandLogo="/logo.png"
216
+ brandDescription="A modern design system for building beautiful interfaces."
217
+ copyright="© 2024 Atomix. All rights reserved."
218
+ layout="columns"
219
+ variant="primary"
220
+ size="md"
221
+ showNewsletter
222
+ newsletterTitle="Stay in the Loop"
223
+ newsletterDescription="Get updates on new components and features."
224
+ onNewsletterSubmit={handleNewsletterSubmit}
225
+ socialLinks={[
226
+ { platform: 'github', url: 'https://github.com/company' },
227
+ { platform: 'twitter', url: 'https://twitter.com/company' },
228
+ { platform: 'discord', url: 'https://discord.gg/company' }
229
+ ]}
230
+ showBackToTop
231
+ showDivider
232
+ >
233
+ <FooterSection title="Products" icon="🚀">
234
+ <FooterLink href="/components">Components</FooterLink>
235
+ <FooterLink href="/templates">Templates</FooterLink>
236
+ <FooterLink href="/themes">Themes</FooterLink>
237
+ </FooterSection>
238
+
239
+ <FooterSection title="Resources" collapsible>
240
+ <FooterLink href="/docs">Documentation</FooterLink>
241
+ <FooterLink href="/guides">Guides</FooterLink>
242
+ <FooterLink href="/examples">Examples</FooterLink>
243
+ <FooterLink href="/blog" external>Blog</FooterLink>
244
+ </FooterSection>
245
+
246
+ <FooterSection title="Support">
247
+ <FooterLink href="/help">Help Center</FooterLink>
248
+ <FooterLink href="/community">Community</FooterLink>
249
+ <FooterLink href="/contact">Contact Us</FooterLink>
250
+ </FooterSection>
251
+ </Footer>
252
+ ```
253
+
254
+ ## Best Practices
255
+
256
+ 1. **Keep it organized**: Group related links in logical sections
257
+ 2. **Limit sections**: 3-5 sections work best for readability
258
+ 3. **Use meaningful labels**: Clear, descriptive link text
259
+ 4. **Consider mobile**: Test collapsible sections on mobile devices
260
+ 5. **Accessibility first**: Always provide proper ARIA labels
261
+ 6. **Performance**: Optimize social media icons and brand logos
@@ -0,0 +1,13 @@
1
+ export { Footer, default } from './Footer';
2
+ export { FooterSection } from './FooterSection';
3
+ export { FooterLink } from './FooterLink';
4
+ export { FooterSocialLink } from './FooterSocialLink';
5
+ export type {
6
+ FooterProps,
7
+ FooterSectionProps,
8
+ FooterLinkProps,
9
+ FooterSocialLinkProps,
10
+ FooterLayout,
11
+ SocialPlatform,
12
+ SocialLink,
13
+ } from '../../lib/types/components';
@@ -32,6 +32,10 @@ const meta = {
32
32
  control: 'boolean',
33
33
  description: 'Whether the checkbox is in indeterminate state',
34
34
  },
35
+ glass: {
36
+ control: 'boolean',
37
+ description: 'Enable glass morphism effect',
38
+ },
35
39
  },
36
40
  } satisfies Meta<typeof Checkbox>;
37
41
 
@@ -74,3 +78,100 @@ export const WithoutLabel: Story = {
74
78
  ariaLabel: 'Checkbox without visible label',
75
79
  },
76
80
  };
81
+
82
+ // Glass variant
83
+ export const Glass: Story = {
84
+ args: {
85
+ label: 'Glass Checkbox',
86
+ glass: true,
87
+ },
88
+ render: (args) => (
89
+ <div
90
+ style={{
91
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
92
+ padding: '2rem',
93
+ borderRadius: '12px',
94
+ minHeight: '200px',
95
+ display: 'flex',
96
+ alignItems: 'center',
97
+ justifyContent: 'center',
98
+ }}
99
+ >
100
+ <Checkbox {...args} />
101
+ </div>
102
+ ),
103
+ };
104
+
105
+ // Glass with custom settings
106
+ export const GlassCustom: Story = {
107
+ args: {
108
+ label: 'Custom Glass Checkbox',
109
+ glass: {
110
+ displacementScale: 80,
111
+ blurAmount: 2,
112
+ saturation: 200,
113
+ aberrationIntensity: 0.8,
114
+ cornerRadius: 12,
115
+ },
116
+ },
117
+ render: (args) => (
118
+ <div
119
+ style={{
120
+ background: 'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
121
+ backgroundSize: 'cover',
122
+ backgroundPosition: 'center',
123
+ padding: '2rem',
124
+ borderRadius: '12px',
125
+ minHeight: '200px',
126
+ display: 'flex',
127
+ alignItems: 'center',
128
+ justifyContent: 'center',
129
+ }}
130
+ >
131
+ <Checkbox {...args} />
132
+ </div>
133
+ ),
134
+ };
135
+
136
+ // Glass states
137
+ export const GlassStates: Story = {
138
+ render: () => (
139
+ <div
140
+ style={{
141
+ background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)',
142
+ backgroundSize: '400% 400%',
143
+ animation: 'gradient 15s ease infinite',
144
+ padding: '2rem',
145
+ borderRadius: '12px',
146
+ minHeight: '400px',
147
+ display: 'flex',
148
+ alignItems: 'center',
149
+ justifyContent: 'center',
150
+ }}
151
+ >
152
+ <style>
153
+ {`
154
+ @keyframes gradient {
155
+ 0% { background-position: 0% 50%; }
156
+ 50% { background-position: 100% 50%; }
157
+ 100% { background-position: 0% 50%; }
158
+ }
159
+ `}
160
+ </style>
161
+ <div>
162
+ <h3 style={{ color: 'white', marginBottom: '2rem', textAlign: 'center', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
163
+ Glass Checkbox States
164
+ </h3>
165
+ <div className="u-d-flex u-flex-column u-gap-3">
166
+ <Checkbox label="Glass Checkbox" glass />
167
+ <Checkbox label="Glass Checked" checked glass />
168
+ <Checkbox label="Glass Disabled" disabled glass />
169
+ <Checkbox label="Glass Disabled and Checked" disabled checked glass />
170
+ <Checkbox label="Glass Valid" valid checked glass />
171
+ <Checkbox label="Glass Invalid" invalid glass />
172
+ <Checkbox label="Glass Indeterminate" indeterminate glass />
173
+ </div>
174
+ </div>
175
+ </div>
176
+ ),
177
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { CheckboxProps } from '../../lib/types/components';
3
3
  import { useCheckbox } from '../../lib/composables/useCheckbox';
4
+ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
4
5
 
5
6
  /**
6
7
  * Checkbox - A component for checkbox inputs
@@ -20,6 +21,7 @@ export const Checkbox: React.FC<CheckboxProps> = ({
20
21
  indeterminate = false,
21
22
  ariaLabel,
22
23
  ariaDescribedBy,
24
+ glass,
23
25
  }) => {
24
26
  const { generateCheckboxClass, checkboxRef } = useCheckbox({
25
27
  indeterminate,
@@ -29,14 +31,14 @@ export const Checkbox: React.FC<CheckboxProps> = ({
29
31
  });
30
32
 
31
33
  const checkboxClass = generateCheckboxClass({
32
- className,
34
+ className: `${className} ${glass ? 'c-checkbox--glass' : ''}`.trim(),
33
35
  disabled,
34
36
  invalid,
35
37
  valid,
36
38
  indeterminate,
37
39
  });
38
40
 
39
- return (
41
+ const checkboxContent = (
40
42
  <div className={checkboxClass}>
41
43
  <input
42
44
  ref={checkboxRef}
@@ -60,6 +62,28 @@ export const Checkbox: React.FC<CheckboxProps> = ({
60
62
  )}
61
63
  </div>
62
64
  );
65
+
66
+ if (glass) {
67
+ // Default glass settings for checkboxes
68
+ const defaultGlassProps = {
69
+ displacementScale: 40,
70
+ blurAmount: 1,
71
+ saturation: 160,
72
+ aberrationIntensity: 0.3,
73
+ cornerRadius: 6,
74
+ mode: 'shader' as const,
75
+ };
76
+
77
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
78
+
79
+ return (
80
+ <AtomixGlass {...glassProps}>
81
+ {checkboxContent}
82
+ </AtomixGlass>
83
+ );
84
+ }
85
+
86
+ return checkboxContent;
63
87
  };
64
88
 
65
89
  export type { CheckboxProps };