@shohojdhara/atomix 0.2.3 → 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 (225) hide show
  1. package/README.md +19 -0
  2. package/dist/atomix.css +1703 -1544
  3. package/dist/atomix.min.css +4 -4
  4. package/dist/index.d.ts +1465 -963
  5. package/dist/index.esm.js +16289 -25908
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +15650 -21780
  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 +1608 -1450
  14. package/dist/themes/boomdevs.min.css +5 -5
  15. package/dist/themes/esrar.css +1702 -1543
  16. package/dist/themes/esrar.min.css +4 -4
  17. package/dist/themes/flashtrade.css +15159 -0
  18. package/dist/themes/flashtrade.min.css +86 -0
  19. package/dist/themes/mashroom.css +1699 -1540
  20. package/dist/themes/mashroom.min.css +7 -7
  21. package/dist/themes/shaj-default.css +1693 -1534
  22. package/dist/themes/shaj-default.min.css +4 -4
  23. package/package.json +6 -17
  24. package/src/components/Accordion/Accordion.stories.tsx +662 -21
  25. package/src/components/Accordion/Accordion.tsx +21 -14
  26. package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
  27. package/src/components/AtomixGlass/AtomixGlass.tsx +529 -1195
  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 +792 -68
  34. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1250 -0
  35. package/src/components/AtomixGlass/stories/Examples.stories.tsx +5768 -0
  36. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1065 -0
  37. package/src/components/AtomixGlass/stories/Playground.stories.tsx +1129 -0
  38. package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +395 -0
  39. package/src/components/AtomixGlass/stories/shared-components.tsx +301 -0
  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 +76 -55
  44. package/src/components/Badge/Badge.tsx +12 -14
  45. package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
  46. package/src/components/Button/Button.stories.tsx +501 -20
  47. package/src/components/Button/Button.tsx +5 -8
  48. package/src/components/Callout/Callout.stories.tsx +86 -35
  49. package/src/components/Callout/Callout.tsx +31 -9
  50. package/src/components/Card/Card.stories.tsx +565 -2
  51. package/src/components/Card/Card.tsx +15 -4
  52. package/src/components/Card/ElevationCard.tsx +2 -0
  53. package/src/components/Chart/AnimatedChart.tsx +179 -156
  54. package/src/components/Chart/AreaChart.tsx +123 -12
  55. package/src/components/Chart/BarChart.tsx +91 -100
  56. package/src/components/Chart/BaseChart.tsx +80 -0
  57. package/src/components/Chart/BubbleChart.tsx +114 -290
  58. package/src/components/Chart/CandlestickChart.tsx +282 -622
  59. package/src/components/Chart/Chart.stories.tsx +576 -179
  60. package/src/components/Chart/Chart.tsx +374 -75
  61. package/src/components/Chart/ChartRenderer.tsx +371 -220
  62. package/src/components/Chart/ChartToolbar.tsx +372 -61
  63. package/src/components/Chart/ChartTooltip.tsx +33 -18
  64. package/src/components/Chart/DonutChart.tsx +172 -254
  65. package/src/components/Chart/FunnelChart.tsx +169 -240
  66. package/src/components/Chart/GaugeChart.tsx +224 -392
  67. package/src/components/Chart/HeatmapChart.tsx +302 -440
  68. package/src/components/Chart/LineChart.tsx +148 -103
  69. package/src/components/Chart/MultiAxisChart.tsx +267 -395
  70. package/src/components/Chart/PieChart.tsx +114 -64
  71. package/src/components/Chart/RadarChart.tsx +202 -218
  72. package/src/components/Chart/ScatterChart.tsx +111 -97
  73. package/src/components/Chart/TreemapChart.tsx +147 -222
  74. package/src/components/Chart/WaterfallChart.tsx +253 -291
  75. package/src/components/Chart/index.ts +11 -9
  76. package/src/components/Chart/types.ts +85 -9
  77. package/src/components/Chart/utils.ts +66 -0
  78. package/src/components/ColorModeToggle/ColorModeToggle.tsx +6 -3
  79. package/src/components/Countdown/Countdown.tsx +4 -0
  80. package/src/components/DataTable/DataTable.tsx +2 -1
  81. package/src/components/DatePicker/DatePicker.stories.tsx +689 -12
  82. package/src/components/DatePicker/DatePicker.tsx +3 -9
  83. package/src/components/DatePicker/types.ts +5 -0
  84. package/src/components/Dropdown/Dropdown.stories.tsx +32 -25
  85. package/src/components/Dropdown/Dropdown.tsx +26 -28
  86. package/src/components/EdgePanel/EdgePanel.stories.tsx +473 -2
  87. package/src/components/EdgePanel/EdgePanel.tsx +101 -13
  88. package/src/components/Footer/Footer.stories.tsx +187 -60
  89. package/src/components/Footer/Footer.test.tsx +134 -0
  90. package/src/components/Footer/Footer.tsx +133 -34
  91. package/src/components/Footer/FooterLink.tsx +1 -1
  92. package/src/components/Footer/FooterSection.tsx +53 -36
  93. package/src/components/Footer/FooterSocialLink.tsx +32 -29
  94. package/src/components/Footer/README.md +82 -3
  95. package/src/components/Footer/index.ts +1 -1
  96. package/src/components/Form/Checkbox.stories.tsx +13 -5
  97. package/src/components/Form/Checkbox.tsx +3 -6
  98. package/src/components/Form/Form.stories.tsx +10 -3
  99. package/src/components/Form/Form.tsx +2 -0
  100. package/src/components/Form/FormGroup.tsx +2 -1
  101. package/src/components/Form/Input.stories.tsx +12 -11
  102. package/src/components/Form/Input.tsx +97 -95
  103. package/src/components/Form/Radio.stories.tsx +22 -7
  104. package/src/components/Form/Radio.tsx +3 -6
  105. package/src/components/Form/Select.stories.tsx +21 -6
  106. package/src/components/Form/Select.tsx +3 -5
  107. package/src/components/Form/Textarea.stories.tsx +13 -11
  108. package/src/components/Form/Textarea.tsx +88 -86
  109. package/src/components/Hero/Hero.stories.tsx +2 -3
  110. package/src/components/Hero/Hero.tsx +5 -6
  111. package/src/components/Icon/Icon.tsx +12 -1
  112. package/src/components/List/List.tsx +2 -1
  113. package/src/components/List/ListGroup.tsx +2 -1
  114. package/src/components/Messages/Messages.stories.tsx +113 -0
  115. package/src/components/Messages/Messages.tsx +52 -9
  116. package/src/components/Modal/Modal.stories.tsx +48 -32
  117. package/src/components/Modal/Modal.tsx +19 -24
  118. package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
  119. package/src/components/Navigation/Menu/Menu.tsx +2 -2
  120. package/src/components/Navigation/Nav/Nav.stories.tsx +469 -0
  121. package/src/components/Navigation/Nav/Nav.tsx +22 -4
  122. package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
  123. package/src/components/Navigation/Navbar/Navbar.stories.tsx +413 -0
  124. package/src/components/Navigation/Navbar/Navbar.tsx +70 -29
  125. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +340 -0
  126. package/src/components/Navigation/SideMenu/SideMenu.tsx +29 -2
  127. package/src/components/Pagination/Pagination.stories.tsx +13 -6
  128. package/src/components/Pagination/Pagination.tsx +7 -6
  129. package/src/components/PhotoViewer/PhotoViewer.tsx +2 -1
  130. package/src/components/Popover/Popover.stories.tsx +32 -24
  131. package/src/components/Popover/Popover.tsx +4 -1
  132. package/src/components/ProductReview/ProductReview.tsx +8 -2
  133. package/src/components/Progress/Progress.tsx +19 -3
  134. package/src/components/Rating/Rating.stories.tsx +11 -6
  135. package/src/components/Rating/Rating.tsx +3 -5
  136. package/src/components/River/River.tsx +5 -5
  137. package/src/components/SectionIntro/SectionIntro.tsx +8 -2
  138. package/src/components/Slider/Slider.stories.tsx +4 -4
  139. package/src/components/Slider/Slider.tsx +4 -3
  140. package/src/components/Spinner/Spinner.tsx +19 -3
  141. package/src/components/Steps/Steps.stories.tsx +5 -4
  142. package/src/components/Steps/Steps.tsx +8 -5
  143. package/src/components/Tab/Tab.stories.tsx +4 -3
  144. package/src/components/Tab/Tab.tsx +8 -6
  145. package/src/components/Testimonial/Testimonial.tsx +8 -2
  146. package/src/components/Todo/Todo.tsx +2 -1
  147. package/src/components/Toggle/Toggle.stories.tsx +5 -4
  148. package/src/components/Toggle/Toggle.tsx +8 -5
  149. package/src/components/Tooltip/Tooltip.stories.tsx +40 -30
  150. package/src/components/Tooltip/Tooltip.tsx +9 -2
  151. package/src/components/Upload/Upload.stories.tsx +252 -0
  152. package/src/components/Upload/Upload.tsx +92 -53
  153. package/src/components/VideoPlayer/VideoPlayer.tsx +3 -1
  154. package/src/components/index.ts +0 -4
  155. package/src/layouts/Grid/Grid.stories.tsx +10 -23
  156. package/src/layouts/Grid/Grid.tsx +20 -1
  157. package/src/layouts/Grid/GridCol.tsx +76 -48
  158. package/src/lib/composables/useAtomixGlass.ts +861 -44
  159. package/src/lib/composables/useBarChart.ts +21 -4
  160. package/src/lib/composables/useChart.ts +227 -370
  161. package/src/lib/composables/useChartExport.ts +19 -78
  162. package/src/lib/composables/useChartToolbar.ts +11 -21
  163. package/src/lib/composables/useEdgePanel.ts +125 -71
  164. package/src/lib/composables/useFooter.ts +3 -3
  165. package/src/lib/composables/useGlassContainer.ts +16 -7
  166. package/src/lib/composables/useLineChart.ts +11 -2
  167. package/src/lib/composables/usePieChart.ts +4 -14
  168. package/src/lib/composables/useRiver.ts +5 -0
  169. package/src/lib/composables/useSlider.ts +62 -24
  170. package/src/lib/composables/useVideoPlayer.ts +60 -63
  171. package/src/lib/constants/components.ts +147 -32
  172. package/src/lib/types/components.ts +355 -25
  173. package/src/lib/utils/displacement-generator.ts +55 -49
  174. package/src/lib/utils/icons.ts +1 -1
  175. package/src/lib/utils/index.ts +16 -10
  176. package/src/styles/01-settings/_settings.accordion.scss +19 -19
  177. package/src/styles/01-settings/_settings.animations.scss +5 -5
  178. package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
  179. package/src/styles/01-settings/_settings.avatar.scss +17 -17
  180. package/src/styles/01-settings/_settings.background.scss +0 -3
  181. package/src/styles/01-settings/_settings.badge.scss +1 -1
  182. package/src/styles/01-settings/_settings.breadcrumb.scss +1 -1
  183. package/src/styles/01-settings/_settings.card.scss +1 -1
  184. package/src/styles/01-settings/_settings.chart.scss +65 -2
  185. package/src/styles/01-settings/_settings.dropdown.scss +1 -1
  186. package/src/styles/01-settings/_settings.edge-panel.scss +1 -1
  187. package/src/styles/01-settings/_settings.footer.scss +35 -42
  188. package/src/styles/01-settings/_settings.input.scss +1 -1
  189. package/src/styles/01-settings/_settings.list.scss +1 -1
  190. package/src/styles/01-settings/_settings.rating.scss +1 -1
  191. package/src/styles/01-settings/_settings.tabs.scss +1 -1
  192. package/src/styles/01-settings/_settings.upload.scss +6 -5
  193. package/src/styles/02-tools/_tools.animations.scss +4 -5
  194. package/src/styles/02-tools/_tools.background.scss +1 -13
  195. package/src/styles/02-tools/_tools.glass.scss +0 -1
  196. package/src/styles/02-tools/_tools.utility-api.scss +91 -48
  197. package/src/styles/03-generic/_generic.root.scss +1 -4
  198. package/src/styles/04-elements/_elements.body.scss +0 -1
  199. package/src/styles/06-components/_components.atomix-glass.scss +249 -0
  200. package/src/styles/06-components/_components.badge.scss +8 -23
  201. package/src/styles/06-components/_components.button.scss +8 -3
  202. package/src/styles/06-components/_components.callout.scss +10 -5
  203. package/src/styles/06-components/_components.card.scss +2 -14
  204. package/src/styles/06-components/_components.chart.scss +969 -1449
  205. package/src/styles/06-components/_components.dropdown.scss +19 -7
  206. package/src/styles/06-components/_components.edge-panel.scss +103 -0
  207. package/src/styles/06-components/_components.footer.scss +166 -85
  208. package/src/styles/06-components/_components.input.scss +8 -9
  209. package/src/styles/06-components/_components.list.scss +1 -0
  210. package/src/styles/06-components/_components.messages.scss +176 -0
  211. package/src/styles/06-components/_components.modal.scss +16 -4
  212. package/src/styles/06-components/_components.navbar.scss +12 -1
  213. package/src/styles/06-components/_components.side-menu.scss +5 -0
  214. package/src/styles/06-components/_components.skeleton.scss +8 -6
  215. package/src/styles/06-components/_components.upload.scss +219 -4
  216. package/src/styles/06-components/old.chart.styles.scss +1 -30
  217. package/src/styles/99-utilities/_index.scss +1 -0
  218. package/src/styles/99-utilities/_utilities.glass-fixes.scss +1 -0
  219. package/src/styles/99-utilities/_utilities.scss +1 -1
  220. package/src/components/AtomixGlass/AtomixGlass.stories.tsx +0 -3011
  221. package/src/components/AtomixGlass/AtomixGlassComprehensivePreview.stories.tsx +0 -1369
  222. package/src/components/Chart/AdvancedChart.tsx +0 -624
  223. package/src/components/Chart/LineChartNew.tsx +0 -167
  224. package/src/components/Chart/RealTimeChart.tsx +0 -436
  225. package/src/components/DatePicker/DatePicker copy.tsx +0 -551
@@ -37,6 +37,11 @@ export interface TooltipProps {
37
37
  */
38
38
  className?: string;
39
39
 
40
+ /**
41
+ * Inline style for the component
42
+ */
43
+ style?: React.CSSProperties;
44
+
40
45
  /**
41
46
  * Delay before showing the tooltip (in milliseconds)
42
47
  */
@@ -60,6 +65,7 @@ export const Tooltip: React.FC<TooltipProps> = ({
60
65
  position = TOOLTIP.DEFAULTS.POSITION,
61
66
  trigger = TOOLTIP.DEFAULTS.TRIGGER,
62
67
  className = '',
68
+ style,
63
69
  delay = TOOLTIP.DEFAULTS.DELAY,
64
70
  offset = TOOLTIP.DEFAULTS.OFFSET,
65
71
  glass,
@@ -129,7 +135,7 @@ export const Tooltip: React.FC<TooltipProps> = ({
129
135
  }
130
136
 
131
137
  return (
132
- <div className="u-position-relative u-d-inline-block">
138
+ <div className="u-position-relative u-d-inline-block" style={style}>
133
139
  <div
134
140
  className={`${TOOLTIP.SELECTORS.TRIGGER.substring(1)}${className ? ` ${className}` : ''}`}
135
141
  {...triggerProps}
@@ -154,7 +160,8 @@ export const Tooltip: React.FC<TooltipProps> = ({
154
160
  mode: 'shader' as const,
155
161
  };
156
162
 
157
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
163
+ const glassProps =
164
+ glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
158
165
 
159
166
  return (
160
167
  <AtomixGlass {...glassProps}>
@@ -5,26 +5,55 @@ import { Upload } from './Upload';
5
5
  export default {
6
6
  title: 'Components/Upload',
7
7
  component: Upload,
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'A modern file upload component with drag & drop functionality, progress tracking, and multiple size variants.',
13
+ },
14
+ },
15
+ },
8
16
  argTypes: {
17
+ size: {
18
+ control: { type: 'select' },
19
+ options: ['sm', 'md', 'lg'],
20
+ defaultValue: 'md',
21
+ description: 'Size variant of the upload component',
22
+ },
9
23
  disabled: {
10
24
  control: { type: 'boolean' },
11
25
  defaultValue: false,
26
+ description: 'Whether the upload component is disabled',
12
27
  },
13
28
  maxSizeInMB: {
14
29
  control: { type: 'number' },
15
30
  defaultValue: 5,
31
+ description: 'Maximum file size in MB',
16
32
  },
17
33
  multiple: {
18
34
  control: { type: 'boolean' },
19
35
  defaultValue: false,
36
+ description: 'Whether multiple files can be selected',
20
37
  },
21
38
  title: {
22
39
  control: { type: 'text' },
23
40
  defaultValue: 'Drag and Drop files here',
41
+ description: 'Text for the drag and drop section',
42
+ },
43
+ supportedFilesText: {
44
+ control: { type: 'text' },
45
+ defaultValue: 'Files supported: PDF, XSLS, JPEG, PNG, Scanner',
46
+ description: 'Text describing supported file types',
24
47
  },
25
48
  buttonText: {
26
49
  control: { type: 'text' },
27
50
  defaultValue: 'Choose File',
51
+ description: 'Text for the upload button',
52
+ },
53
+ helperText: {
54
+ control: { type: 'text' },
55
+ defaultValue: 'Maximum size: 5MB',
56
+ description: 'Helper text displayed below the button',
28
57
  },
29
58
  },
30
59
  } as Meta<typeof Upload>;
@@ -38,11 +67,72 @@ const Template: StoryFn<typeof Upload> = args => (
38
67
  // Default upload component
39
68
  export const Default = Template.bind({});
40
69
  Default.args = {
70
+ size: 'md',
41
71
  title: 'Drag and Drop files here',
42
72
  supportedFilesText: 'Files supported: PDF, XSLS, JPEG, PNG, Scanner',
43
73
  buttonText: 'Choose File',
44
74
  helperText: 'Maximum size: 5MB',
45
75
  };
76
+ Default.parameters = {
77
+ docs: {
78
+ description: {
79
+ story: 'The default upload component with medium size and standard styling.',
80
+ },
81
+ },
82
+ };
83
+
84
+ // Size Variants
85
+ export const SizeVariants: StoryFn<typeof Upload> = () => (
86
+ <div style={{ padding: '30px' }}>
87
+ <div style={{ marginBottom: '40px' }}>
88
+ <h3 style={{ marginBottom: '20px', fontSize: '18px', fontWeight: '600' }}>Small Size</h3>
89
+ <div style={{ maxWidth: '400px' }}>
90
+ <Upload
91
+ size="sm"
92
+ title="Small Upload Area"
93
+ supportedFilesText="PDF, JPEG, PNG"
94
+ buttonText="Choose File"
95
+ helperText="Max: 2MB"
96
+ />
97
+ </div>
98
+ </div>
99
+
100
+ <div style={{ marginBottom: '40px' }}>
101
+ <h3 style={{ marginBottom: '20px', fontSize: '18px', fontWeight: '600' }}>
102
+ Medium Size (Default)
103
+ </h3>
104
+ <div style={{ maxWidth: '500px' }}>
105
+ <Upload
106
+ size="md"
107
+ title="Drag and Drop files here"
108
+ supportedFilesText="Files supported: PDF, XSLS, JPEG, PNG, Scanner"
109
+ buttonText="Choose File"
110
+ helperText="Maximum size: 5MB"
111
+ />
112
+ </div>
113
+ </div>
114
+
115
+ <div>
116
+ <h3 style={{ marginBottom: '20px', fontSize: '18px', fontWeight: '600' }}>Large Size</h3>
117
+ <div style={{ maxWidth: '700px' }}>
118
+ <Upload
119
+ size="lg"
120
+ title="Drop your files here for upload"
121
+ supportedFilesText="Supported formats: PDF, Excel, Word, Images, and more"
122
+ buttonText="Browse Files"
123
+ helperText="Maximum file size: 10MB per file"
124
+ />
125
+ </div>
126
+ </div>
127
+ </div>
128
+ );
129
+ SizeVariants.parameters = {
130
+ docs: {
131
+ description: {
132
+ story: 'Upload component in different sizes: small (sm), medium (md), and large (lg).',
133
+ },
134
+ },
135
+ };
46
136
 
47
137
  // Disabled state
48
138
  export const Disabled = Template.bind({});
@@ -50,6 +140,13 @@ Disabled.args = {
50
140
  ...Default.args,
51
141
  disabled: true,
52
142
  };
143
+ Disabled.parameters = {
144
+ docs: {
145
+ description: {
146
+ story: 'Upload component in disabled state with reduced opacity and no interactions.',
147
+ },
148
+ },
149
+ };
53
150
 
54
151
  // Manual state controls
55
152
  const WithStateControls: React.FC = () => {
@@ -203,12 +300,29 @@ const WithStateControls: React.FC = () => {
203
300
  };
204
301
 
205
302
  export const WithControls: StoryFn<typeof Upload> = () => <WithStateControls />;
303
+ WithControls.parameters = {
304
+ docs: {
305
+ description: {
306
+ story:
307
+ 'Interactive example showing different upload states: default, uploading with progress, success, and error states.',
308
+ },
309
+ },
310
+ };
206
311
 
207
312
  // Custom Icon
208
313
  export const CustomIcon = Template.bind({});
209
314
  CustomIcon.args = {
210
315
  ...Default.args,
211
316
  icon: <i className="icon-lux-upload-cloud"></i>,
317
+ title: 'Upload your documents',
318
+ supportedFilesText: 'Drag files here or click to browse',
319
+ };
320
+ CustomIcon.parameters = {
321
+ docs: {
322
+ description: {
323
+ story: 'Upload component with a custom icon and personalized text content.',
324
+ },
325
+ },
212
326
  };
213
327
 
214
328
  // Multiple file upload
@@ -217,4 +331,142 @@ MultipleFiles.args = {
217
331
  ...Default.args,
218
332
  multiple: true,
219
333
  buttonText: 'Choose Files',
334
+ title: 'Upload multiple files',
335
+ supportedFilesText: 'Select multiple files at once',
336
+ helperText: 'Maximum size: 5MB per file',
337
+ };
338
+ MultipleFiles.parameters = {
339
+ docs: {
340
+ description: {
341
+ story: 'Upload component configured to accept multiple files at once.',
342
+ },
343
+ },
344
+ };
345
+
346
+ // Drag and Drop Demo
347
+ export const DragDropDemo: StoryFn<typeof Upload> = () => {
348
+ const [dragState, setDragState] = useState<'idle' | 'dragging'>('idle');
349
+ const [uploadedFiles, setUploadedFiles] = useState<string[]>([]);
350
+
351
+ const handleFileSelect = (files: File[]) => {
352
+ const fileNames = files.map(file => file.name);
353
+ setUploadedFiles(prev => [...prev, ...fileNames]);
354
+ };
355
+
356
+ return (
357
+ <div style={{ padding: '30px' }}>
358
+ <div style={{ marginBottom: '20px' }}>
359
+ <h3 style={{ fontSize: '18px', fontWeight: '600', marginBottom: '10px' }}>
360
+ Interactive Drag & Drop Demo
361
+ </h3>
362
+ <p style={{ color: '#666', fontSize: '14px', marginBottom: '20px' }}>
363
+ Try dragging files over the upload area to see the hover effects, or click to select
364
+ files.
365
+ </p>
366
+ </div>
367
+
368
+ <div style={{ maxWidth: '600px', marginBottom: '20px' }}>
369
+ <Upload
370
+ title="Drag files here to see the magic ✨"
371
+ supportedFilesText="PDF, Images, Documents - All welcome!"
372
+ buttonText="Or click to browse"
373
+ helperText="Watch the upload area respond to your interactions"
374
+ onFileSelect={handleFileSelect}
375
+ multiple={true}
376
+ />
377
+ </div>
378
+
379
+ {uploadedFiles.length > 0 && (
380
+ <div
381
+ style={{
382
+ padding: '16px',
383
+ backgroundColor: '#f8f9fa',
384
+ borderRadius: '8px',
385
+ border: '1px solid #e9ecef',
386
+ }}
387
+ >
388
+ <h4
389
+ style={{ fontSize: '14px', fontWeight: '600', marginBottom: '8px', color: '#495057' }}
390
+ >
391
+ Selected Files:
392
+ </h4>
393
+ <ul style={{ margin: 0, paddingLeft: '20px' }}>
394
+ {uploadedFiles.map((fileName, index) => (
395
+ <li key={index} style={{ fontSize: '14px', color: '#6c757d', marginBottom: '4px' }}>
396
+ {fileName}
397
+ </li>
398
+ ))}
399
+ </ul>
400
+ <button
401
+ onClick={() => setUploadedFiles([])}
402
+ style={{
403
+ marginTop: '12px',
404
+ padding: '6px 12px',
405
+ fontSize: '12px',
406
+ backgroundColor: '#6c757d',
407
+ color: 'white',
408
+ border: 'none',
409
+ borderRadius: '4px',
410
+ cursor: 'pointer',
411
+ }}
412
+ >
413
+ Clear List
414
+ </button>
415
+ </div>
416
+ )}
417
+ </div>
418
+ );
419
+ };
420
+ DragDropDemo.parameters = {
421
+ docs: {
422
+ description: {
423
+ story:
424
+ 'Interactive demonstration of drag & drop functionality with visual feedback and file tracking.',
425
+ },
426
+ },
427
+ };
428
+
429
+ // Different File Types
430
+ export const FileTypeRestrictions: StoryFn<typeof Upload> = () => (
431
+ <div style={{ padding: '30px' }}>
432
+ <div style={{ marginBottom: '40px' }}>
433
+ <h3 style={{ marginBottom: '20px', fontSize: '18px', fontWeight: '600' }}>Images Only</h3>
434
+ <div style={{ maxWidth: '500px' }}>
435
+ <Upload
436
+ title="Upload Images"
437
+ supportedFilesText="JPEG, PNG, GIF, WebP"
438
+ buttonText="Choose Images"
439
+ helperText="Maximum size: 10MB"
440
+ acceptedFileTypes={['image/jpeg', 'image/png', 'image/gif', 'image/webp']}
441
+ multiple={true}
442
+ />
443
+ </div>
444
+ </div>
445
+
446
+ <div style={{ marginBottom: '40px' }}>
447
+ <h3 style={{ marginBottom: '20px', fontSize: '18px', fontWeight: '600' }}>Documents Only</h3>
448
+ <div style={{ maxWidth: '500px' }}>
449
+ <Upload
450
+ title="Upload Documents"
451
+ supportedFilesText="PDF, Word, Excel, PowerPoint"
452
+ buttonText="Choose Documents"
453
+ helperText="Maximum size: 25MB"
454
+ acceptedFileTypes={[
455
+ 'application/pdf',
456
+ 'application/msword',
457
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
458
+ 'application/vnd.ms-excel',
459
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
460
+ ]}
461
+ />
462
+ </div>
463
+ </div>
464
+ </div>
465
+ );
466
+ FileTypeRestrictions.parameters = {
467
+ docs: {
468
+ description: {
469
+ story: 'Upload components configured for specific file types with appropriate messaging.',
470
+ },
471
+ },
220
472
  };
@@ -7,6 +7,11 @@ export interface UploadProps {
7
7
  */
8
8
  disabled?: boolean;
9
9
 
10
+ /**
11
+ * Size variant of the upload component
12
+ */
13
+ size?: 'sm' | 'md' | 'lg';
14
+
10
15
  /**
11
16
  * Maximum file size in MB
12
17
  */
@@ -71,6 +76,11 @@ export interface UploadProps {
71
76
  * Additional CSS class
72
77
  */
73
78
  className?: string;
79
+
80
+ /**
81
+ * Custom style for the upload component
82
+ */
83
+ style?: React.CSSProperties;
74
84
  }
75
85
 
76
86
  /**
@@ -83,6 +93,7 @@ type UploadStatus = 'idle' | 'loading' | 'success' | 'error';
83
93
  */
84
94
  export const Upload: React.FC<UploadProps> = ({
85
95
  disabled = false,
96
+ size = 'md',
86
97
  maxSizeInMB = 5,
87
98
  acceptedFileTypes = [
88
99
  'application/pdf',
@@ -102,6 +113,7 @@ export const Upload: React.FC<UploadProps> = ({
102
113
  onFileUploadComplete,
103
114
  onFileUploadError,
104
115
  className = '',
116
+ style,
105
117
  }) => {
106
118
  const inputRef = useRef<HTMLInputElement>(null);
107
119
 
@@ -272,15 +284,42 @@ export const Upload: React.FC<UploadProps> = ({
272
284
  setSuccessMessage(null);
273
285
  };
274
286
 
287
+ // Build CSS classes
288
+ const uploadClasses = [
289
+ 'c-upload',
290
+ size !== 'md' && `c-upload--${size}`,
291
+ isDragging && UPLOAD.CLASSES.DRAGGING,
292
+ disabled && UPLOAD.CLASSES.DISABLED,
293
+ status === 'loading' && 'c-upload--loading',
294
+ status === 'success' && 'c-upload--success',
295
+ status === 'error' && 'c-upload--error',
296
+ className,
297
+ ]
298
+ .filter(Boolean)
299
+ .join(' ');
300
+
275
301
  return (
276
302
  <div
277
- className={`c-upload ${isDragging ? UPLOAD.CLASSES.DRAGGING : ''} ${disabled ? UPLOAD.CLASSES.DISABLED : ''} ${className}`}
303
+ className={uploadClasses}
304
+ style={style}
278
305
  onDragEnter={handleDragEnter}
279
306
  onDragLeave={handleDragLeave}
280
307
  onDragOver={handleDragOver}
281
308
  onDrop={handleDrop}
282
309
  >
283
- <div className="c-upload__inner">
310
+ <div
311
+ className="c-upload__inner"
312
+ role="button"
313
+ tabIndex={disabled ? -1 : 0}
314
+ aria-label={`${title}. ${supportedFilesText}. ${helperText}`}
315
+ aria-disabled={disabled}
316
+ onKeyDown={e => {
317
+ if ((e.key === 'Enter' || e.key === ' ') && !disabled) {
318
+ e.preventDefault();
319
+ handleButtonClick();
320
+ }
321
+ }}
322
+ >
284
323
  {/* Hidden file input */}
285
324
  <input
286
325
  type="file"
@@ -290,62 +329,62 @@ export const Upload: React.FC<UploadProps> = ({
290
329
  disabled={disabled}
291
330
  accept={acceptedFileTypes.join(',')}
292
331
  multiple={multiple}
332
+ aria-hidden="true"
293
333
  />
294
334
 
295
- {/* Drag and drop area */}
296
- <div className="c-upload__inner">
297
- <div className="c-upload__icon">{icon}</div>
298
- <h3 className="c-upload__title">{title}</h3>
299
- <p className="c-upload__text">{supportedFilesText}</p>
300
-
301
- <button
302
- type="button"
303
- className="c-upload__btn c-btn"
304
- onClick={handleButtonClick}
305
- disabled={disabled}
306
- >
307
- {buttonText}
308
- </button>
309
-
310
- <p className="c-upload__helper-text">{helperText}</p>
311
- </div>
335
+ {/* Drag and drop area content */}
336
+ <div className="c-upload__icon">{icon}</div>
337
+ <h3 className="c-upload__title">{title}</h3>
338
+ <p className="c-upload__text">{supportedFilesText}</p>
339
+
340
+ <button
341
+ type="button"
342
+ className="c-upload__btn c-btn"
343
+ onClick={handleButtonClick}
344
+ disabled={disabled}
345
+ >
346
+ {buttonText}
347
+ </button>
312
348
 
313
- {/* Progress and status area */}
314
- {status !== 'idle' && (
315
- <div
316
- className="c-upload__loader"
317
- style={{ '--upload-loader-percentage': uploadProgress } as React.CSSProperties}
318
- >
319
- {currentFile && (
320
- <div className="c-upload__loader-status">
321
- <h5 className="c-upload__loader-title">{currentFile.name}</h5>
322
- <div className="c-upload__loader-progress">
323
- <div className="c-upload__loader-par">{uploadProgress}%</div>
324
- <div className="c-upload__loader-time">{timeLeft}</div>
325
- </div>
349
+ <p className="c-upload__helper-text">{helperText}</p>
350
+ </div>
351
+
352
+ {/* Progress and status area */}
353
+ {status !== 'idle' && (
354
+ <div
355
+ className="c-upload__loader"
356
+ style={{ '--upload-loader-percentage': uploadProgress } as React.CSSProperties}
357
+ >
358
+ {currentFile && (
359
+ <div className="c-upload__loader-status">
360
+ <h5 className="c-upload__loader-title">{currentFile.name}</h5>
361
+ <div className="c-upload__loader-progress">
362
+ <div className="c-upload__loader-par">{uploadProgress}%</div>
363
+ <div className="c-upload__loader-time">{timeLeft}</div>
326
364
  </div>
327
- )}
328
-
329
- {(status === 'loading' || status === 'error' || status === 'success') && (
330
- <div className="c-upload__loader-control">
331
- <div className="c-upload__loader-bar">
332
- <svg>
333
- <circle cx="10" cy="10" r="10"></circle>
334
- <circle cx="10" cy="10" r="10"></circle>
335
- </svg>
336
- </div>
337
- <button
338
- type="button"
339
- className="c-upload__loader-close c-btn"
340
- onClick={resetUpload}
341
- >
342
- <i className="icon-lux-x"></i>
343
- </button>
365
+ </div>
366
+ )}
367
+
368
+ {(status === 'loading' || status === 'error' || status === 'success') && (
369
+ <div className="c-upload__loader-control">
370
+ <div className="c-upload__loader-bar">
371
+ <svg>
372
+ <circle cx="10" cy="10" r="10"></circle>
373
+ <circle cx="10" cy="10" r="10"></circle>
374
+ </svg>
344
375
  </div>
345
- )}
346
- </div>
347
- )}
348
- </div>
376
+ <button
377
+ type="button"
378
+ className="c-upload__loader-close"
379
+ onClick={resetUpload}
380
+ aria-label="Close upload progress"
381
+ >
382
+ <i className="icon-lux-x"></i>
383
+ </button>
384
+ </div>
385
+ )}
386
+ </div>
387
+ )}
349
388
  </div>
350
389
  );
351
390
  };
@@ -55,6 +55,7 @@ export const VideoPlayer = forwardRef<HTMLVideoElement, VideoPlayerProps>(
55
55
  glass = false,
56
56
  glassOpacity = 1,
57
57
  glassContent,
58
+ style,
58
59
  ...props
59
60
  },
60
61
  ref
@@ -170,7 +171,7 @@ export const VideoPlayer = forwardRef<HTMLVideoElement, VideoPlayerProps>(
170
171
  const video = videoRef.current;
171
172
  if (video) {
172
173
  const tracks = video.textTracks;
173
- console.log('Setting subtitle:', subtitleLang, 'Available tracks:', tracks.length);
174
+ console.log('Setting subtitle:', subtitleLang ? 'enabled' : 'disabled', 'Available tracks:', tracks.length);
174
175
 
175
176
  // Hide all tracks first
176
177
  for (let i = 0; i < tracks.length; i++) {
@@ -380,6 +381,7 @@ export const VideoPlayer = forwardRef<HTMLVideoElement, VideoPlayerProps>(
380
381
  width,
381
382
  height,
382
383
  aspectRatio: aspectRatio ? aspectRatio.replace(':', '/') : undefined,
384
+ ...style,
383
385
  }}
384
386
  tabIndex={0}
385
387
  onClick={handleContainerClick}
@@ -11,7 +11,6 @@ export { default as Button, type ButtonProps } from './Button/Button';
11
11
  export { default as Callout, type CalloutProps } from './Callout/Callout';
12
12
  export { default as Card, type CardProps } from './Card/Card';
13
13
  export {
14
- AdvancedChart,
15
14
  AnimatedChart,
16
15
  AreaChart,
17
16
  BarChart,
@@ -27,11 +26,9 @@ export {
27
26
  MultiAxisChart,
28
27
  PieChart,
29
28
  RadarChart,
30
- RealTimeChart,
31
29
  ScatterChart,
32
30
  TreemapChart,
33
31
  WaterfallChart,
34
- type AdvancedChartProps,
35
32
  type AnimatedChartProps,
36
33
  type AreaChartProps,
37
34
  type BarChartProps,
@@ -50,7 +47,6 @@ export {
50
47
  type MultiAxisChartProps,
51
48
  type PieChartProps,
52
49
  type RadarChartProps,
53
- type RealTimeChartProps,
54
50
  type ScatterChartProps,
55
51
  type ScatterDataPoint,
56
52
  type TreemapChartProps,