@shohojdhara/atomix 0.2.4 → 0.2.5

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 (211) hide show
  1. package/README.md +19 -0
  2. package/dist/atomix.css +1266 -1412
  3. package/dist/atomix.min.css +3 -3
  4. package/dist/index.d.ts +1232 -876
  5. package/dist/index.esm.js +16212 -26364
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +15652 -22298
  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/applemix.css +15008 -0
  12. package/dist/themes/applemix.min.css +72 -0
  13. package/dist/themes/boomdevs.css +1266 -1413
  14. package/dist/themes/boomdevs.min.css +3 -3
  15. package/dist/themes/esrar.css +1267 -1413
  16. package/dist/themes/esrar.min.css +3 -3
  17. package/dist/themes/flashtrade.css +15159 -0
  18. package/dist/themes/flashtrade.min.css +86 -0
  19. package/dist/themes/mashroom.css +1264 -1410
  20. package/dist/themes/mashroom.min.css +5 -5
  21. package/dist/themes/shaj-default.css +1266 -1412
  22. package/dist/themes/shaj-default.min.css +3 -3
  23. package/package.json +6 -17
  24. package/src/components/Accordion/Accordion.stories.tsx +4 -26
  25. package/src/components/Accordion/Accordion.tsx +21 -12
  26. package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
  27. package/src/components/AtomixGlass/AtomixGlass.tsx +487 -1215
  28. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +400 -0
  29. package/src/components/AtomixGlass/GlassFilter.tsx +156 -0
  30. package/src/components/AtomixGlass/README.md +124 -2
  31. package/src/components/AtomixGlass/atomixGLass.old.tsx +1266 -0
  32. package/src/components/AtomixGlass/glass-utils.ts +263 -0
  33. package/src/components/AtomixGlass/shader-utils.ts +404 -236
  34. package/src/components/AtomixGlass/{AtomixGlass.stories.tsx → stories/AtomixGlass.stories.tsx} +55 -35
  35. package/src/components/AtomixGlass/stories/Examples.stories.tsx +57 -89
  36. package/src/components/AtomixGlass/stories/Modes.stories.tsx +149 -149
  37. package/src/components/AtomixGlass/stories/Playground.stories.tsx +95 -32
  38. package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +0 -2
  39. package/src/components/AtomixGlass/stories/shared-components.tsx +9 -18
  40. package/src/components/AtomixGlass/utils.ts +3 -3
  41. package/src/components/Avatar/Avatar.tsx +3 -0
  42. package/src/components/Avatar/AvatarGroup.tsx +2 -1
  43. package/src/components/Badge/Badge.stories.tsx +74 -54
  44. package/src/components/Badge/Badge.tsx +8 -12
  45. package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
  46. package/src/components/Button/Button.tsx +3 -5
  47. package/src/components/Callout/Callout.stories.tsx +86 -35
  48. package/src/components/Callout/Callout.tsx +4 -0
  49. package/src/components/Card/Card.stories.tsx +89 -85
  50. package/src/components/Card/Card.tsx +15 -4
  51. package/src/components/Card/ElevationCard.tsx +2 -0
  52. package/src/components/Chart/AnimatedChart.tsx +179 -156
  53. package/src/components/Chart/AreaChart.tsx +123 -12
  54. package/src/components/Chart/BarChart.tsx +91 -100
  55. package/src/components/Chart/BaseChart.tsx +80 -0
  56. package/src/components/Chart/BubbleChart.tsx +114 -290
  57. package/src/components/Chart/CandlestickChart.tsx +282 -622
  58. package/src/components/Chart/Chart.stories.tsx +576 -179
  59. package/src/components/Chart/Chart.tsx +374 -75
  60. package/src/components/Chart/ChartRenderer.tsx +371 -220
  61. package/src/components/Chart/ChartToolbar.tsx +372 -61
  62. package/src/components/Chart/ChartTooltip.tsx +33 -18
  63. package/src/components/Chart/DonutChart.tsx +172 -254
  64. package/src/components/Chart/FunnelChart.tsx +169 -240
  65. package/src/components/Chart/GaugeChart.tsx +224 -392
  66. package/src/components/Chart/HeatmapChart.tsx +302 -440
  67. package/src/components/Chart/LineChart.tsx +148 -103
  68. package/src/components/Chart/MultiAxisChart.tsx +267 -395
  69. package/src/components/Chart/PieChart.tsx +114 -64
  70. package/src/components/Chart/RadarChart.tsx +202 -218
  71. package/src/components/Chart/ScatterChart.tsx +111 -97
  72. package/src/components/Chart/TreemapChart.tsx +147 -222
  73. package/src/components/Chart/WaterfallChart.tsx +253 -291
  74. package/src/components/Chart/index.ts +11 -9
  75. package/src/components/Chart/types.ts +85 -9
  76. package/src/components/Chart/utils.ts +66 -0
  77. package/src/components/ColorModeToggle/ColorModeToggle.tsx +6 -3
  78. package/src/components/Countdown/Countdown.tsx +4 -0
  79. package/src/components/DataTable/DataTable.tsx +2 -1
  80. package/src/components/DatePicker/DatePicker.stories.tsx +0 -11
  81. package/src/components/DatePicker/DatePicker.tsx +3 -9
  82. package/src/components/DatePicker/types.ts +5 -0
  83. package/src/components/Dropdown/Dropdown.stories.tsx +32 -25
  84. package/src/components/Dropdown/Dropdown.tsx +26 -28
  85. package/src/components/EdgePanel/EdgePanel.stories.tsx +13 -15
  86. package/src/components/EdgePanel/EdgePanel.tsx +20 -5
  87. package/src/components/Footer/Footer.stories.tsx +187 -60
  88. package/src/components/Footer/Footer.test.tsx +134 -0
  89. package/src/components/Footer/Footer.tsx +133 -34
  90. package/src/components/Footer/FooterLink.tsx +1 -1
  91. package/src/components/Footer/FooterSection.tsx +53 -36
  92. package/src/components/Footer/FooterSocialLink.tsx +32 -29
  93. package/src/components/Footer/README.md +82 -3
  94. package/src/components/Footer/index.ts +1 -1
  95. package/src/components/Form/Checkbox.stories.tsx +13 -5
  96. package/src/components/Form/Checkbox.tsx +3 -6
  97. package/src/components/Form/Form.stories.tsx +10 -3
  98. package/src/components/Form/Form.tsx +2 -0
  99. package/src/components/Form/FormGroup.tsx +2 -1
  100. package/src/components/Form/Input.stories.tsx +12 -11
  101. package/src/components/Form/Input.tsx +97 -95
  102. package/src/components/Form/Radio.stories.tsx +22 -7
  103. package/src/components/Form/Radio.tsx +3 -6
  104. package/src/components/Form/Select.stories.tsx +21 -6
  105. package/src/components/Form/Select.tsx +3 -5
  106. package/src/components/Form/Textarea.stories.tsx +13 -11
  107. package/src/components/Form/Textarea.tsx +88 -86
  108. package/src/components/Hero/Hero.stories.tsx +2 -3
  109. package/src/components/Hero/Hero.tsx +5 -6
  110. package/src/components/Icon/Icon.tsx +12 -1
  111. package/src/components/List/List.tsx +2 -1
  112. package/src/components/List/ListGroup.tsx +2 -1
  113. package/src/components/Messages/Messages.tsx +3 -2
  114. package/src/components/Modal/Modal.stories.tsx +48 -34
  115. package/src/components/Modal/Modal.tsx +19 -23
  116. package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
  117. package/src/components/Navigation/Menu/Menu.tsx +2 -2
  118. package/src/components/Navigation/Nav/Nav.tsx +6 -1
  119. package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
  120. package/src/components/Navigation/Navbar/Navbar.tsx +4 -1
  121. package/src/components/Navigation/SideMenu/SideMenu.tsx +3 -2
  122. package/src/components/Pagination/Pagination.stories.tsx +13 -6
  123. package/src/components/Pagination/Pagination.tsx +7 -6
  124. package/src/components/PhotoViewer/PhotoViewer.tsx +2 -1
  125. package/src/components/Popover/Popover.stories.tsx +32 -24
  126. package/src/components/Popover/Popover.tsx +4 -1
  127. package/src/components/ProductReview/ProductReview.tsx +8 -2
  128. package/src/components/Progress/Progress.tsx +2 -1
  129. package/src/components/Rating/Rating.stories.tsx +11 -6
  130. package/src/components/Rating/Rating.tsx +3 -5
  131. package/src/components/River/River.tsx +5 -5
  132. package/src/components/SectionIntro/SectionIntro.tsx +8 -2
  133. package/src/components/Slider/Slider.stories.tsx +4 -4
  134. package/src/components/Slider/Slider.tsx +4 -3
  135. package/src/components/Spinner/Spinner.tsx +2 -1
  136. package/src/components/Steps/Steps.stories.tsx +5 -4
  137. package/src/components/Steps/Steps.tsx +8 -5
  138. package/src/components/Tab/Tab.stories.tsx +4 -3
  139. package/src/components/Tab/Tab.tsx +8 -6
  140. package/src/components/Testimonial/Testimonial.tsx +8 -2
  141. package/src/components/Todo/Todo.tsx +2 -1
  142. package/src/components/Toggle/Toggle.stories.tsx +5 -4
  143. package/src/components/Toggle/Toggle.tsx +8 -5
  144. package/src/components/Tooltip/Tooltip.stories.tsx +40 -30
  145. package/src/components/Tooltip/Tooltip.tsx +9 -2
  146. package/src/components/Upload/Upload.stories.tsx +252 -0
  147. package/src/components/Upload/Upload.tsx +92 -53
  148. package/src/components/VideoPlayer/VideoPlayer.tsx +3 -1
  149. package/src/components/index.ts +0 -4
  150. package/src/layouts/Grid/Grid.stories.tsx +10 -23
  151. package/src/layouts/Grid/Grid.tsx +20 -1
  152. package/src/layouts/Grid/GridCol.tsx +76 -48
  153. package/src/lib/composables/useAtomixGlass.ts +861 -44
  154. package/src/lib/composables/useBarChart.ts +13 -6
  155. package/src/lib/composables/useChart.ts +17 -13
  156. package/src/lib/composables/useChartExport.ts +19 -78
  157. package/src/lib/composables/useChartToolbar.ts +0 -1
  158. package/src/lib/composables/useEdgePanel.ts +111 -103
  159. package/src/lib/composables/useFooter.ts +3 -3
  160. package/src/lib/composables/useGlassContainer.ts +16 -7
  161. package/src/lib/composables/useLineChart.ts +8 -1
  162. package/src/lib/composables/useRiver.ts +5 -0
  163. package/src/lib/composables/useSlider.ts +62 -24
  164. package/src/lib/composables/useVideoPlayer.ts +60 -63
  165. package/src/lib/constants/components.ts +146 -32
  166. package/src/lib/types/components.ts +258 -10
  167. package/src/lib/utils/displacement-generator.ts +55 -49
  168. package/src/lib/utils/icons.ts +1 -1
  169. package/src/lib/utils/index.ts +16 -10
  170. package/src/styles/01-settings/_settings.accordion.scss +19 -19
  171. package/src/styles/01-settings/_settings.animations.scss +5 -5
  172. package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
  173. package/src/styles/01-settings/_settings.avatar.scss +17 -17
  174. package/src/styles/01-settings/_settings.background.scss +1 -4
  175. package/src/styles/01-settings/_settings.badge.scss +1 -1
  176. package/src/styles/01-settings/_settings.breadcrumb.scss +1 -1
  177. package/src/styles/01-settings/_settings.card.scss +1 -1
  178. package/src/styles/01-settings/_settings.chart.scss +65 -2
  179. package/src/styles/01-settings/_settings.dropdown.scss +1 -1
  180. package/src/styles/01-settings/_settings.footer.scss +35 -42
  181. package/src/styles/01-settings/_settings.input.scss +1 -1
  182. package/src/styles/01-settings/_settings.list.scss +1 -1
  183. package/src/styles/01-settings/_settings.rating.scss +1 -1
  184. package/src/styles/01-settings/_settings.tabs.scss +1 -1
  185. package/src/styles/01-settings/_settings.upload.scss +6 -5
  186. package/src/styles/02-tools/_tools.animations.scss +4 -5
  187. package/src/styles/02-tools/_tools.background.scss +1 -13
  188. package/src/styles/02-tools/_tools.glass.scss +0 -1
  189. package/src/styles/02-tools/_tools.utility-api.scss +42 -34
  190. package/src/styles/03-generic/_generic.root.scss +1 -4
  191. package/src/styles/04-elements/_elements.body.scss +0 -1
  192. package/src/styles/06-components/_components.atomix-glass.scss +216 -39
  193. package/src/styles/06-components/_components.badge.scss +6 -8
  194. package/src/styles/06-components/_components.button.scss +8 -3
  195. package/src/styles/06-components/_components.card.scss +2 -14
  196. package/src/styles/06-components/_components.chart.scss +969 -1449
  197. package/src/styles/06-components/_components.dropdown.scss +19 -7
  198. package/src/styles/06-components/_components.edge-panel.scss +4 -2
  199. package/src/styles/06-components/_components.footer.scss +166 -85
  200. package/src/styles/06-components/_components.input.scss +8 -9
  201. package/src/styles/06-components/_components.list.scss +1 -0
  202. package/src/styles/06-components/_components.modal.scss +5 -3
  203. package/src/styles/06-components/_components.skeleton.scss +8 -6
  204. package/src/styles/06-components/_components.upload.scss +219 -4
  205. package/src/styles/06-components/old.chart.styles.scss +1 -30
  206. package/src/styles/99-utilities/_utilities.opacity.scss +1 -1
  207. package/src/styles/99-utilities/_utilities.scss +1 -1
  208. package/src/components/Chart/AdvancedChart.tsx +0 -624
  209. package/src/components/Chart/LineChartNew.tsx +0 -167
  210. package/src/components/Chart/RealTimeChart.tsx +0 -436
  211. package/src/components/DatePicker/DatePicker copy.tsx +0 -551
@@ -6,99 +6,101 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
6
6
  /**
7
7
  * Textarea - A component for multiline text input
8
8
  */
9
- export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(({
10
- value,
11
- onChange,
12
- onBlur,
13
- onFocus,
14
- placeholder,
15
- className = '',
16
- disabled = false,
17
- required = false,
18
- readOnly = false,
19
- id,
20
- name,
21
- rows = 4,
22
- cols,
23
- maxLength,
24
- minLength,
25
- size = 'md',
26
- variant,
27
- invalid = false,
28
- valid = false,
29
- autoFocus = false,
30
- ariaLabel,
31
- ariaDescribedBy,
32
- glass,
33
- }, ref) => {
34
- const { generateTextareaClass } = useTextarea({
35
- size,
36
- variant,
37
- disabled,
38
- invalid,
39
- valid,
40
- });
9
+ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
10
+ (
11
+ {
12
+ value,
13
+ onChange,
14
+ onBlur,
15
+ onFocus,
16
+ placeholder,
17
+ className = '',
18
+ style,
19
+ disabled = false,
20
+ required = false,
21
+ readOnly = false,
22
+ id,
23
+ name,
24
+ rows = 4,
25
+ cols,
26
+ maxLength,
27
+ minLength,
28
+ size = 'md',
29
+ variant,
30
+ invalid = false,
31
+ valid = false,
32
+ autoFocus = false,
33
+ ariaLabel,
34
+ ariaDescribedBy,
35
+ glass,
36
+ },
37
+ ref
38
+ ) => {
39
+ const { generateTextareaClass } = useTextarea({
40
+ size,
41
+ variant,
42
+ disabled,
43
+ invalid,
44
+ valid,
45
+ });
41
46
 
42
- const textareaClass = generateTextareaClass({
43
- className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
44
- size,
45
- variant,
46
- disabled,
47
- invalid,
48
- valid,
49
- });
47
+ const textareaClass = generateTextareaClass({
48
+ className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
49
+ size,
50
+ variant,
51
+ disabled,
52
+ invalid,
53
+ valid,
54
+ });
50
55
 
51
- // Custom styles for glass effect
52
- const glassStyles = glass ? {} : {};
56
+ // Custom styles for glass effect
57
+ const glassStyles = glass ? {} : {};
53
58
 
54
- const textareaElement = (
55
- <textarea
56
- ref={ref}
57
- className={textareaClass}
58
- value={value}
59
- onChange={onChange}
60
- onBlur={onBlur}
61
- onFocus={onFocus}
62
- placeholder={placeholder}
63
- disabled={disabled}
64
- required={required}
65
- readOnly={readOnly}
66
- id={id}
67
- name={name}
68
- rows={rows}
69
- cols={cols}
70
- maxLength={maxLength}
71
- minLength={minLength}
72
- autoFocus={autoFocus}
73
- aria-label={ariaLabel}
74
- aria-describedby={ariaDescribedBy}
75
- aria-invalid={invalid}
76
- style={glass ? glassStyles : undefined}
77
- />
78
- );
59
+ const textareaElement = (
60
+ <textarea
61
+ ref={ref}
62
+ className={textareaClass}
63
+ value={value}
64
+ onChange={onChange}
65
+ onBlur={onBlur}
66
+ onFocus={onFocus}
67
+ placeholder={placeholder}
68
+ disabled={disabled}
69
+ required={required}
70
+ readOnly={readOnly}
71
+ id={id}
72
+ name={name}
73
+ rows={rows}
74
+ cols={cols}
75
+ maxLength={maxLength}
76
+ minLength={minLength}
77
+ autoFocus={autoFocus}
78
+ aria-label={ariaLabel}
79
+ aria-describedby={ariaDescribedBy}
80
+ aria-invalid={invalid}
81
+ style={glass ? { ...glassStyles, ...style } : style}
82
+ />
83
+ );
79
84
 
80
- if (glass) {
81
- // Default glass settings for textareas
82
- const defaultGlassProps = {
83
- displacementScale: 60,
84
- blurAmount: 1,
85
- saturation: 180,
86
- aberrationIntensity: 1,
87
- cornerRadius: 8,
88
- mode: 'shader' as const,
89
- };
85
+ if (glass) {
86
+ // Default glass settings for textareas
87
+ const defaultGlassProps = {
88
+ displacementScale: 60,
89
+ blurAmount: 1,
90
+ saturation: 180,
91
+ aberrationIntensity: 1,
92
+ cornerRadius: 8,
93
+ mode: 'shader' as const,
94
+ };
90
95
 
91
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
96
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
92
97
 
93
- return (
94
- <AtomixGlass {...glassProps}>
95
- {textareaElement}
96
- </AtomixGlass>
97
- );
98
- }
98
+ return <AtomixGlass {...glassProps}>{textareaElement}</AtomixGlass>;
99
+ }
99
100
 
100
- return textareaElement;
101
- });
101
+ return textareaElement;
102
+ }
103
+ );
102
104
 
103
105
  Textarea.displayName = 'Textarea';
104
106
 
@@ -178,7 +178,7 @@ export const WithCustomGlassEffect: Story = {
178
178
  aberrationIntensity: 0,
179
179
  cornerRadius: 45,
180
180
  mode: 'standard',
181
- elasticity: .2,
181
+ elasticity: 0.2,
182
182
  showBorderEffects: true,
183
183
  showHoverEffects: true,
184
184
  onClick: () => {
@@ -190,7 +190,6 @@ export const WithCustomGlassEffect: Story = {
190
190
  },
191
191
  };
192
192
 
193
-
194
193
  /**
195
194
  * Hero with left-aligned content and image on right
196
195
  */
@@ -345,4 +344,4 @@ export const VideoBackgroundWithImage: Story = {
345
344
  imageSrc: 'https://picsum.photos/id/180/712/500',
346
345
  imageAlt: 'Product showcase',
347
346
  },
348
- };
347
+ };
@@ -19,6 +19,7 @@ export const Hero: React.FC<HeroProps> = ({
19
19
  contentColSize = 5,
20
20
  contentWidth,
21
21
  className = '',
22
+ style,
22
23
  parallax = false,
23
24
  parallaxIntensity = 0.5,
24
25
  videoBackground,
@@ -54,11 +55,10 @@ export const Hero: React.FC<HeroProps> = ({
54
55
  });
55
56
 
56
57
  // Create custom style for hero element with content width if provided
57
- const heroStyle: React.CSSProperties | undefined = contentWidth
58
- ? ({
59
- '--atomix-hero-content-width': contentWidth,
60
- } as React.CSSProperties)
61
- : undefined;
58
+ const heroStyle: React.CSSProperties | undefined = {
59
+ ...(contentWidth ? { '--atomix-hero-content-width': contentWidth } : {}),
60
+ ...style,
61
+ };
62
62
 
63
63
  const renderVideoBackground = () => {
64
64
  if (!videoBackground) return null;
@@ -128,7 +128,6 @@ export const Hero: React.FC<HeroProps> = ({
128
128
  cornerRadius={8}
129
129
  overLight={false}
130
130
  mode="standard"
131
-
132
131
  >
133
132
  <div className="u-p-4">
134
133
  {subtitle && <p className={HERO.SELECTORS.SUBTITLE.replace('.', '')}>{subtitle}</p>}
@@ -36,6 +36,11 @@ export interface IconProps {
36
36
  */
37
37
  className?: string;
38
38
 
39
+ /**
40
+ * Custom style
41
+ */
42
+ style?: React.CSSProperties;
43
+
39
44
  /**
40
45
  * Alt text for accessibility
41
46
  */
@@ -60,6 +65,7 @@ export const Icon: React.FC<IconProps> = ({
60
65
  weight = 'regular',
61
66
  color,
62
67
  className = '',
68
+ style,
63
69
  alt,
64
70
  }) => {
65
71
  // Get the icon component from Phosphor
@@ -76,7 +82,12 @@ export const Icon: React.FC<IconProps> = ({
76
82
  const pixelSize = typeof size === 'string' ? sizeMap[size as IconSize] || 24 : size;
77
83
 
78
84
  return (
79
- <span className={`c-icon c-icon--${size} ${className}`} aria-hidden={!alt} title={alt}>
85
+ <span
86
+ className={`c-icon c-icon--${size} ${className}`}
87
+ style={style}
88
+ aria-hidden={!alt}
89
+ title={alt}
90
+ >
80
91
  <IconComponent size={pixelSize} weight={weight} color={color} aria-label={alt} />
81
92
  </span>
82
93
  );
@@ -6,6 +6,7 @@ export const List: React.FC<ListProps> = ({
6
6
  children,
7
7
  variant = 'default',
8
8
  className = '',
9
+ style,
9
10
  ...props
10
11
  }) => {
11
12
  // Generate CSS classes
@@ -17,7 +18,7 @@ export const List: React.FC<ListProps> = ({
17
18
  const ListElement = ['number', 'text'].includes(variant) ? 'ol' : 'ul';
18
19
 
19
20
  return (
20
- <ListElement className={listClasses} {...props}>
21
+ <ListElement className={listClasses} style={style} {...props}>
21
22
  {React.Children.map(children, child => {
22
23
  if (React.isValidElement(child)) {
23
24
  return <li className="c-list__item">{child}</li>;
@@ -7,6 +7,7 @@ import { List } from './List';
7
7
  export const ListGroup: React.FC<ListGroupProps> = ({
8
8
  children,
9
9
  className = '',
10
+ style,
10
11
  variant = 'default',
11
12
  }) => {
12
13
  // Generate CSS classes
@@ -18,7 +19,7 @@ export const ListGroup: React.FC<ListGroupProps> = ({
18
19
  ) as React.ReactElement[];
19
20
 
20
21
  return (
21
- <div className={listGroupClasses}>
22
+ <div className={listGroupClasses} style={style}>
22
23
  {validLists.map((child, index) => {
23
24
  const childProps = child.props as any;
24
25
  return React.cloneElement(child as React.ReactElement<any>, {
@@ -18,6 +18,7 @@ export const Messages: React.FC<MessagesProps> = ({
18
18
  onSendMessage,
19
19
  placeholder = 'Type a message',
20
20
  className = '',
21
+ style,
21
22
  bodyHeight,
22
23
  disabled = false,
23
24
  id,
@@ -175,7 +176,7 @@ export const Messages: React.FC<MessagesProps> = ({
175
176
  return (
176
177
  <div
177
178
  className={messagesClasses}
178
- style={{ '--atomix-messages-width': width } as React.CSSProperties}
179
+ style={{ '--atomix-messages-width': width, ...style } as React.CSSProperties}
179
180
  id={messagesId}
180
181
  aria-label="Chat messages"
181
182
  role="log"
@@ -196,7 +197,7 @@ export const Messages: React.FC<MessagesProps> = ({
196
197
  return (
197
198
  <div
198
199
  className={messagesClasses}
199
- style={{ '--atomix-messages-width': width } as React.CSSProperties}
200
+ style={{ '--atomix-messages-width': width, ...style } as React.CSSProperties}
200
201
  id={messagesId}
201
202
  aria-label="Chat messages"
202
203
  role="log"
@@ -313,23 +313,27 @@ export const GlassModal: Story = {
313
313
  glass={true}
314
314
  >
315
315
  <p>
316
- This modal demonstrates the glass morphism effect with a translucent, frosted appearance.
317
- The glass effect creates a modern, elegant look that works well over colorful backgrounds.
316
+ This modal demonstrates the glass morphism effect with a translucent, frosted
317
+ appearance. The glass effect creates a modern, elegant look that works well over
318
+ colorful backgrounds.
318
319
  </p>
319
320
  <p>
320
- The glass effect includes displacement, blur, and chromatic aberration for a premium feel.
321
+ The glass effect includes displacement, blur, and chromatic aberration for a premium
322
+ feel.
321
323
  </p>
322
324
  </Modal>
323
325
  </>
324
326
  );
325
327
  },
326
328
  decorators: [
327
- (Story) => (
328
- <div style={{
329
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
330
- minHeight: '100vh',
331
- padding: '2rem'
332
- }}>
329
+ Story => (
330
+ <div
331
+ style={{
332
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
333
+ minHeight: '100vh',
334
+ padding: '2rem',
335
+ }}
336
+ >
333
337
  <Story />
334
338
  </div>
335
339
  ),
@@ -359,14 +363,16 @@ export const GlassModalCustom: Story = {
359
363
  onOpenChange={setIsOpen}
360
364
  title="Custom Glass Modal"
361
365
  subtitle="This modal has customized glass effect settings."
362
- glass={{
363
- displacementScale: 120,
364
- blurAmount: 3,
365
- saturation: 200,
366
- aberrationIntensity: 2,
367
- cornerRadius: 20,
368
- mode: 'polar',
369
- }as any}
366
+ glass={
367
+ {
368
+ displacementScale: 120,
369
+ blurAmount: 3,
370
+ saturation: 200,
371
+ aberrationIntensity: 2,
372
+ cornerRadius: 20,
373
+ mode: 'polar',
374
+ } as any
375
+ }
370
376
  footer={
371
377
  <>
372
378
  <div
@@ -392,22 +398,26 @@ export const GlassModalCustom: Story = {
392
398
  }
393
399
  >
394
400
  <p>
395
- This modal uses custom glass settings with enhanced displacement, blur, and chromatic aberration.
396
- The polar mode creates a different visual effect compared to the standard shader mode.
401
+ This modal uses custom glass settings with enhanced displacement, blur, and chromatic
402
+ aberration. The polar mode creates a different visual effect compared to the standard
403
+ shader mode.
397
404
  </p>
398
405
  </Modal>
399
406
  </>
400
407
  );
401
408
  },
402
409
  decorators: [
403
- (Story) => (
404
- <div style={{
405
- background: 'url(https://images.unsplash.com/photo-1744872665943-fd335d371059?q=80&w=3024&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)',
406
- height: '100vh',
407
- width: '100vw',
408
- backgroundSize: 'cover',
409
- backgroundPosition: 'center',
410
- }}>
410
+ Story => (
411
+ <div
412
+ style={{
413
+ background:
414
+ 'url(https://images.unsplash.com/photo-1744872665943-fd335d371059?q=80&w=3024&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)',
415
+ height: '100vh',
416
+ width: '100vw',
417
+ backgroundSize: 'cover',
418
+ backgroundPosition: 'center',
419
+ }}
420
+ >
411
421
  <Story />
412
422
  </div>
413
423
  ),
@@ -502,18 +512,22 @@ export const GlassModalSizes: Story = {
502
512
  }
503
513
  >
504
514
  <p>This is a {size.toUpperCase()} sized glass modal.</p>
505
- <p>The glass effect adapts to different modal sizes while maintaining its visual appeal.</p>
515
+ <p>
516
+ The glass effect adapts to different modal sizes while maintaining its visual appeal.
517
+ </p>
506
518
  </Modal>
507
519
  </div>
508
520
  );
509
521
  },
510
522
  decorators: [
511
- (Story) => (
512
- <div style={{
513
- background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
514
- minHeight: '100vh',
515
- padding: '2rem'
516
- }}>
523
+ Story => (
524
+ <div
525
+ style={{
526
+ background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
527
+ minHeight: '100vh',
528
+ padding: '2rem',
529
+ }}
530
+ >
517
531
  <Story />
518
532
  </div>
519
533
  ),
@@ -88,6 +88,7 @@ export const Modal: React.FC<ModalProps> = ({
88
88
  backdrop = true,
89
89
  keyboard = true,
90
90
  className = '',
91
+ style,
91
92
  closeButton = true,
92
93
  footer,
93
94
  glass,
@@ -184,7 +185,7 @@ export const Modal: React.FC<ModalProps> = ({
184
185
  <div
185
186
  ref={modalRef}
186
187
  className={modalClasses}
187
- style={{ display: isOpenState ? 'block' : 'none' }}
188
+ style={{ display: isOpenState ? 'block' : 'none', ...style }}
188
189
  role="dialog"
189
190
  aria-modal="true"
190
191
  aria-hidden={!isOpenState}
@@ -192,28 +193,23 @@ export const Modal: React.FC<ModalProps> = ({
192
193
  >
193
194
  <div ref={backdropRef} className="c-modal__backdrop" onClick={handleBackdropClick} />
194
195
  <div ref={dialogRef} className="c-modal__dialog">
195
- {glass ? (
196
- // Default glass settings for modals
197
- (() => {
198
- const defaultGlassProps = {
199
- displacementScale: 100,
200
- blurAmount: 2,
201
- aberrationIntensity: 1,
202
- cornerRadius: 12,
203
- mode: 'shader' as const,
204
- };
205
-
206
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
207
-
208
- return (
209
- <AtomixGlass {...glassProps} >
210
- {modalContent}
211
- </AtomixGlass>
212
- );
213
- })()
214
- ) : (
215
- modalContent
216
- )}
196
+ {glass
197
+ ? // Default glass settings for modals
198
+ (() => {
199
+ const defaultGlassProps = {
200
+ displacementScale: 100,
201
+ blurAmount: 2,
202
+ aberrationIntensity: 1,
203
+ cornerRadius: 12,
204
+ mode: 'shader' as const,
205
+ };
206
+
207
+ const glassProps =
208
+ glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
209
+
210
+ return <AtomixGlass {...glassProps}>{modalContent}</AtomixGlass>;
211
+ })()
212
+ : modalContent}
217
213
  </div>
218
214
  </div>
219
215
  );
@@ -8,9 +8,9 @@ import { Icon } from '../../Icon/Icon';
8
8
  import { mapIconName } from './Menu'; // Import the mapping function
9
9
 
10
10
  export const MegaMenu: React.FC<MegaMenuProps> = forwardRef<HTMLDivElement, MegaMenuProps>(
11
- ({ children, className = '', disabled = false }, ref) => {
11
+ ({ children, className = '', style, disabled = false }, ref) => {
12
12
  return (
13
- <div ref={ref} className={`c-menu c-menu--mega ${className}`}>
13
+ <div ref={ref} className={`c-menu c-menu--mega ${className}`} style={style}>
14
14
  <div className="c-menu__container">
15
15
  <div className="c-menu__grid o-grid">
16
16
  {React.Children.map(children, child => {
@@ -3,9 +3,9 @@ import { MenuProps, MenuItemProps } from '../../../lib/types/components';
3
3
  import { Icon } from '../../Icon/Icon';
4
4
 
5
5
  export const Menu: React.FC<MenuProps> = forwardRef<HTMLDivElement, MenuProps>(
6
- ({ children, className = '', disabled = false }, ref) => {
6
+ ({ children, className = '', style, disabled = false }, ref) => {
7
7
  return (
8
- <div ref={ref} className={`c-menu ${className}`}>
8
+ <div ref={ref} className={`c-menu ${className}`} style={style}>
9
9
  <ul className="c-menu__list" role="menu">
10
10
  {React.Children.map(children, child => {
11
11
  if (React.isValidElement(child)) {
@@ -28,7 +28,12 @@ export const Nav = forwardRef<HTMLUListElement, NavProps>(
28
28
  const navClass = generateNavClass({ alignment, variant, className });
29
29
 
30
30
  const navContent = (
31
- <ul ref={ref} className={navClass + (glass ? ' c-nav--glass' : '')} role="menubar" aria-orientation="horizontal">
31
+ <ul
32
+ ref={ref}
33
+ className={navClass + (glass ? ' c-nav--glass' : '')}
34
+ role="menubar"
35
+ aria-orientation="horizontal"
36
+ >
32
37
  {React.Children.map(children, child => {
33
38
  if (React.isValidElement(child)) {
34
39
  const childProps = child.props as any;
@@ -6,7 +6,15 @@ import { Icon } from '../../Icon/Icon';
6
6
 
7
7
  export const NavDropdown: React.FC<NavDropdownProps> = forwardRef<HTMLLIElement, NavDropdownProps>(
8
8
  (
9
- { title, children, alignment = 'start', megaMenu = false, className = '', disabled = false },
9
+ {
10
+ title,
11
+ children,
12
+ alignment = 'start',
13
+ megaMenu = false,
14
+ className = '',
15
+ style,
16
+ disabled = false,
17
+ },
10
18
  ref
11
19
  ) => {
12
20
  const { generateDropdownMenuClass, getIconName } = useNavDropdown({
@@ -90,6 +98,7 @@ export const NavDropdown: React.FC<NavDropdownProps> = forwardRef<HTMLLIElement,
90
98
  href="#"
91
99
  onClick={handleToggle}
92
100
  aria-expanded={isActive}
101
+ style={style}
93
102
  >
94
103
  {titleWithIcon}
95
104
  {menuContent}
@@ -30,6 +30,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
30
30
  expanded,
31
31
  onToggle,
32
32
  className = '',
33
+ style,
33
34
  disabled = false,
34
35
  backdrop = false,
35
36
  closeOnOutsideClick = true,
@@ -159,6 +160,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
159
160
  left: 0,
160
161
  right: 0,
161
162
  top: 0,
163
+ zIndex: 1000,
162
164
  }}
163
165
  >
164
166
  <nav
@@ -166,6 +168,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
166
168
  className={navbarClass + ' c-navbar--glass'}
167
169
  aria-label={ariaLabel}
168
170
  id={id}
171
+ style={style}
169
172
  >
170
173
  {navbarContent}
171
174
  </nav>
@@ -174,7 +177,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
174
177
  }
175
178
 
176
179
  return (
177
- <nav ref={ref} className={navbarClass} aria-label={ariaLabel} id={id}>
180
+ <nav ref={ref} className={navbarClass} aria-label={ariaLabel} id={id} style={style}>
178
181
  {navbarContent}
179
182
  </nav>
180
183
  );
@@ -30,6 +30,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
30
30
  onToggle,
31
31
  collapsible = true,
32
32
  className = '',
33
+ style,
33
34
  disabled = false,
34
35
  toggleIcon,
35
36
  id,
@@ -105,7 +106,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
105
106
  const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
106
107
  return (
107
108
  <AtomixGlass {...glassProps}>
108
- <div ref={ref} className={sideMenuClass + ' c-side-menu--glass'} id={id}>
109
+ <div ref={ref} className={sideMenuClass + ' c-side-menu--glass'} id={id} style={style}>
109
110
  {sideMenuContent}
110
111
  </div>
111
112
  </AtomixGlass>
@@ -113,7 +114,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
113
114
  }
114
115
 
115
116
  return (
116
- <div ref={ref} className={sideMenuClass} id={id}>
117
+ <div ref={ref} className={sideMenuClass} id={id} style={style}>
117
118
  {sideMenuContent}
118
119
  </div>
119
120
  );