@flikk/ui 1.0.0-beta.2 → 1.0.0-beta.4

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 (394) hide show
  1. package/dist/components/ai/ApprovalCard/ApprovalCard.js +2 -2
  2. package/dist/components/ai/ApprovalCard/ApprovalCard.types.d.ts +2 -2
  3. package/dist/components/ai/PromptInput/PromptInput.js +51 -10
  4. package/dist/components/ai/PromptInput/PromptInput.theme.js +1 -0
  5. package/dist/components/ai/PromptInput/PromptInput.types.d.ts +20 -0
  6. package/dist/components/charts/DonutChart/DonutChart.types.d.ts +1 -2
  7. package/dist/components/charts/DonutChart/MultiSegmentDonutChart.types.d.ts +1 -2
  8. package/dist/components/core/Accordion/Accordion.theme.js +2 -2
  9. package/dist/components/core/Alert/Alert.js +2 -2
  10. package/dist/components/core/Alert/Alert.types.d.ts +2 -2
  11. package/dist/components/core/AlertDialog/AlertDialog.d.ts +1 -1
  12. package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
  13. package/dist/components/core/AlertDialog/AlertDialog.types.d.ts +2 -2
  14. package/dist/components/core/Badge/Badge.d.ts +1 -1
  15. package/dist/components/core/Badge/Badge.js +11 -9
  16. package/dist/components/core/Badge/Badge.theme.js +13 -14
  17. package/dist/components/core/Badge/Badge.types.d.ts +8 -4
  18. package/dist/components/core/Button/Button.d.ts +1 -1
  19. package/dist/components/core/Button/Button.theme.js +8 -9
  20. package/dist/components/core/Button/Button.types.d.ts +1 -2
  21. package/dist/components/core/Calendar/Calendar.theme.js +1 -1
  22. package/dist/components/core/Card/Card.d.ts +2 -2
  23. package/dist/components/core/Card/Card.js +6 -7
  24. package/dist/components/core/Card/Card.theme.js +4 -4
  25. package/dist/components/core/Card/Card.types.d.ts +5 -20
  26. package/dist/components/core/Card/CardSubtitle.d.ts +3 -0
  27. package/dist/components/core/Card/CardSubtitle.js +11 -0
  28. package/dist/components/core/Card/index.d.ts +2 -2
  29. package/dist/components/core/CommandPalette/CommandItem.d.ts +1 -1
  30. package/dist/components/core/CommandPalette/CommandItem.js +2 -2
  31. package/dist/components/core/CommandPalette/CommandPalette.js +2 -2
  32. package/dist/components/core/CommandPalette/CommandPalette.theme.js +2 -2
  33. package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -2
  34. package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +1 -1
  35. package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
  36. package/dist/components/core/Drawer/Drawer.d.ts +13 -1
  37. package/dist/components/core/Drawer/Drawer.js +23 -10
  38. package/dist/components/core/Drawer/Drawer.theme.js +1 -1
  39. package/dist/components/core/Drawer/Drawer.types.d.ts +21 -4
  40. package/dist/components/core/Drawer/DrawerHeader.d.ts +5 -0
  41. package/dist/components/core/Drawer/DrawerHeader.js +14 -0
  42. package/dist/components/core/Drawer/DrawerSubtitle.d.ts +5 -0
  43. package/dist/components/core/Drawer/DrawerSubtitle.js +11 -0
  44. package/dist/components/core/Drawer/DrawerTitle.d.ts +5 -0
  45. package/dist/components/core/Drawer/DrawerTitle.js +11 -0
  46. package/dist/components/core/Drawer/index.d.ts +1 -1
  47. package/dist/components/core/Dropdown/Dropdown.types.d.ts +4 -4
  48. package/dist/components/core/Dropdown/DropdownItem.js +2 -2
  49. package/dist/components/core/Empty/Empty.js +2 -2
  50. package/dist/components/core/Empty/Empty.theme.d.ts +1 -1
  51. package/dist/components/core/Empty/Empty.theme.js +3 -3
  52. package/dist/components/core/Empty/Empty.types.d.ts +2 -2
  53. package/dist/components/core/Link/Link.d.ts +1 -1
  54. package/dist/components/core/Link/Link.types.d.ts +2 -2
  55. package/dist/components/core/MenuItem/MenuItem.js +2 -2
  56. package/dist/components/core/MenuItem/MenuItem.theme.d.ts +1 -2
  57. package/dist/components/core/MenuItem/MenuItem.theme.js +7 -9
  58. package/dist/components/core/MenuItem/MenuItem.types.d.ts +1 -1
  59. package/dist/components/core/Message/Message.d.ts +3 -2
  60. package/dist/components/core/Message/Message.js +30 -24
  61. package/dist/components/core/Message/Message.theme.d.ts +1 -1
  62. package/dist/components/core/Message/Message.theme.js +22 -24
  63. package/dist/components/core/Message/Message.types.d.ts +0 -7
  64. package/dist/components/core/Message/MessageList.animations.d.ts +6 -0
  65. package/dist/components/core/Message/MessageList.animations.js +32 -0
  66. package/dist/components/core/Message/MessageList.d.ts +5 -0
  67. package/dist/components/core/Message/MessageList.js +78 -0
  68. package/dist/components/core/Message/MessageList.theme.d.ts +2 -0
  69. package/dist/components/core/Message/MessageList.theme.js +6 -0
  70. package/dist/components/core/Message/MessageList.types.d.ts +32 -0
  71. package/dist/components/core/Message/index.d.ts +2 -0
  72. package/dist/components/core/Modal/Modal.d.ts +2 -2
  73. package/dist/components/core/Modal/Modal.js +5 -5
  74. package/dist/components/core/Modal/Modal.theme.js +5 -5
  75. package/dist/components/core/Modal/Modal.types.d.ts +4 -4
  76. package/dist/components/core/Modal/ModalSubtitle.d.ts +5 -0
  77. package/dist/components/core/Modal/ModalSubtitle.js +11 -0
  78. package/dist/components/core/ModalStack/ModalStack.animations.js +3 -3
  79. package/dist/components/core/ModalStack/ModalStackModal.js +3 -3
  80. package/dist/components/core/PageHeading/PageHeading.d.ts +8 -0
  81. package/dist/components/core/PageHeading/PageHeading.js +28 -0
  82. package/dist/components/core/PageHeading/PageHeading.theme.d.ts +2 -0
  83. package/dist/components/core/PageHeading/PageHeading.theme.js +11 -0
  84. package/dist/components/core/PageHeading/PageHeading.types.d.ts +55 -0
  85. package/dist/components/core/PageHeading/PageHeadingActions.d.ts +3 -0
  86. package/dist/components/core/PageHeading/PageHeadingActions.js +11 -0
  87. package/dist/components/core/PageHeading/PageHeadingBackButton.d.ts +3 -0
  88. package/dist/components/core/PageHeading/PageHeadingBackButton.js +12 -0
  89. package/dist/components/core/PageHeading/PageHeadingIcon.d.ts +3 -0
  90. package/dist/components/core/PageHeading/PageHeadingIcon.js +11 -0
  91. package/dist/components/core/PageHeading/PageHeadingSubtitle.d.ts +3 -0
  92. package/dist/components/core/PageHeading/PageHeadingSubtitle.js +11 -0
  93. package/dist/components/core/PageHeading/PageHeadingTitle.d.ts +3 -0
  94. package/dist/components/core/PageHeading/PageHeadingTitle.js +11 -0
  95. package/dist/components/core/PageHeading/index.d.ts +2 -0
  96. package/dist/components/core/Popover/Popover.theme.js +1 -1
  97. package/dist/components/core/Segmented/Segmented.theme.js +3 -3
  98. package/dist/components/core/Sidebar/Sidebar.js +1 -0
  99. package/dist/components/core/SocialIcon/SocialIcon.d.ts +3 -0
  100. package/dist/components/core/SocialIcon/SocialIcon.js +30 -0
  101. package/dist/components/core/SocialIcon/SocialIcon.theme.d.ts +2 -0
  102. package/dist/components/core/SocialIcon/SocialIcon.theme.js +12 -0
  103. package/dist/components/core/SocialIcon/SocialIcon.types.d.ts +18 -0
  104. package/dist/components/core/SocialIcon/index.d.ts +2 -0
  105. package/dist/components/core/SocialIcon/platforms.d.ts +17 -0
  106. package/dist/components/core/SocialIcon/platforms.js +234 -0
  107. package/dist/components/core/Toast/Toast.js +4 -4
  108. package/dist/components/core/Toast/Toast.theme.js +1 -1
  109. package/dist/components/core/Toast/Toast.types.d.ts +9 -9
  110. package/dist/components/core/Toast/useToast.js +6 -6
  111. package/dist/components/core/index.d.ts +2 -7
  112. package/dist/components/core/index.js +9 -19
  113. package/dist/components/{core → data-display}/DescriptionList/DescriptionList.theme.js +1 -1
  114. package/dist/components/{core → data-display}/Feed/Feed.js +2 -2
  115. package/dist/components/data-display/GanttChart/GanttChart.animations.d.ts +4 -0
  116. package/dist/components/data-display/GanttChart/GanttChart.animations.js +21 -0
  117. package/dist/components/data-display/GanttChart/GanttChart.d.ts +8 -0
  118. package/dist/components/data-display/GanttChart/GanttChart.js +170 -0
  119. package/dist/components/data-display/GanttChart/GanttChart.theme.d.ts +2 -0
  120. package/dist/components/data-display/GanttChart/GanttChart.theme.js +23 -0
  121. package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +162 -0
  122. package/dist/components/data-display/GanttChart/GanttChart.types.js +9 -0
  123. package/dist/components/data-display/GanttChart/GanttChart.utils.d.ts +80 -0
  124. package/dist/components/data-display/GanttChart/GanttChart.utils.js +274 -0
  125. package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +9 -0
  126. package/dist/components/data-display/GanttChart/GanttChartPanel.js +82 -0
  127. package/dist/components/data-display/GanttChart/GanttDependencyArrows.d.ts +2 -0
  128. package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +35 -0
  129. package/dist/components/data-display/GanttChart/GanttGroupBar.d.ts +8 -0
  130. package/dist/components/data-display/GanttChart/GanttGroupBar.js +26 -0
  131. package/dist/components/data-display/GanttChart/GanttMilestone.d.ts +9 -0
  132. package/dist/components/data-display/GanttChart/GanttMilestone.js +44 -0
  133. package/dist/components/data-display/GanttChart/GanttProgressCircle.d.ts +9 -0
  134. package/dist/components/data-display/GanttChart/GanttProgressCircle.js +11 -0
  135. package/dist/components/data-display/GanttChart/GanttSplitter.d.ts +2 -0
  136. package/dist/components/data-display/GanttChart/GanttSplitter.js +39 -0
  137. package/dist/components/data-display/GanttChart/GanttTableGroupRow.d.ts +7 -0
  138. package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +23 -0
  139. package/dist/components/data-display/GanttChart/GanttTableHeader.d.ts +2 -0
  140. package/dist/components/data-display/GanttChart/GanttTableHeader.js +13 -0
  141. package/dist/components/data-display/GanttChart/GanttTablePanel.d.ts +6 -0
  142. package/dist/components/data-display/GanttChart/GanttTablePanel.js +20 -0
  143. package/dist/components/data-display/GanttChart/GanttTableTaskRow.d.ts +8 -0
  144. package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +30 -0
  145. package/dist/components/data-display/GanttChart/GanttTaskBar.d.ts +9 -0
  146. package/dist/components/data-display/GanttChart/GanttTaskBar.js +206 -0
  147. package/dist/components/data-display/GanttChart/GanttTaskContextMenu.d.ts +8 -0
  148. package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +17 -0
  149. package/dist/components/data-display/GanttChart/GanttTimelineGrid.d.ts +7 -0
  150. package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +33 -0
  151. package/dist/components/data-display/GanttChart/GanttTimelineHeader.d.ts +8 -0
  152. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +43 -0
  153. package/dist/components/data-display/GanttChart/GanttToolbar.d.ts +2 -0
  154. package/dist/components/data-display/GanttChart/GanttToolbar.js +28 -0
  155. package/dist/components/data-display/GanttChart/hooks/useGanttDates.d.ts +12 -0
  156. package/dist/components/data-display/GanttChart/hooks/useGanttDates.js +25 -0
  157. package/dist/components/data-display/GanttChart/hooks/useGanttDrag.d.ts +25 -0
  158. package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +144 -0
  159. package/dist/components/data-display/GanttChart/hooks/useGanttLayout.d.ts +2 -0
  160. package/dist/components/data-display/GanttChart/hooks/useGanttLayout.js +33 -0
  161. package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.d.ts +6 -0
  162. package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.js +32 -0
  163. package/dist/components/data-display/GanttChart/index.d.ts +3 -0
  164. package/dist/components/{core → data-display}/KPI/KPI.js +10 -8
  165. package/dist/components/{core → data-display}/KPI/KPI.theme.js +2 -1
  166. package/dist/components/{core → data-display}/KPI/KPI.types.d.ts +5 -5
  167. package/dist/components/{core → data-display}/KPI/index.d.ts +1 -0
  168. package/dist/components/{core → data-display}/Metric/Metric.js +4 -7
  169. package/dist/components/{core → data-display}/Metric/Metric.theme.js +9 -9
  170. package/dist/components/{core → data-display}/Metric/Metric.types.d.ts +6 -6
  171. package/dist/components/{core → data-display}/Table/Table.theme.js +2 -2
  172. package/dist/components/{core → data-display}/Table/TableActions.js +8 -8
  173. package/dist/components/{core → data-display}/Table/TableColumnManager.js +4 -4
  174. package/dist/components/{core → data-display}/Table/TableFilter.js +3 -3
  175. package/dist/components/data-display/Table/TablePagination.js +25 -0
  176. package/dist/components/{core → data-display}/Table/TableRow.js +1 -1
  177. package/dist/components/{core → data-display}/Table/TableSelectionHeader.js +1 -1
  178. package/dist/components/data-display/index.d.ts +7 -0
  179. package/dist/components/data-display/index.js +20 -0
  180. package/dist/components/effects/3d/index.d.ts +6 -0
  181. package/dist/components/effects/3d/index.js +3 -0
  182. package/dist/components/effects/Aurora/Aurora.d.ts +24 -0
  183. package/dist/components/effects/Aurora/Aurora.js +119 -0
  184. package/dist/components/effects/Aurora/Aurora.types.d.ts +15 -0
  185. package/dist/components/effects/Aurora/index.d.ts +2 -0
  186. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +2 -2
  187. package/dist/components/effects/CustomCursor/CustomCursor.types.d.ts +3 -3
  188. package/dist/components/effects/DotPattern/DotPattern.d.ts +18 -0
  189. package/dist/components/effects/DotPattern/DotPattern.js +65 -0
  190. package/dist/components/effects/DotPattern/DotPattern.types.d.ts +47 -0
  191. package/dist/components/effects/DotPattern/index.d.ts +2 -0
  192. package/dist/components/effects/GridPattern/GridPattern.d.ts +18 -0
  193. package/dist/components/effects/GridPattern/GridPattern.js +64 -0
  194. package/dist/components/effects/GridPattern/GridPattern.types.d.ts +47 -0
  195. package/dist/components/effects/GridPattern/index.d.ts +2 -0
  196. package/dist/components/effects/MagneticElement/MagneticElement.d.ts +30 -0
  197. package/dist/components/effects/MagneticElement/MagneticElement.js +110 -0
  198. package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +44 -0
  199. package/dist/components/effects/MagneticElement/index.d.ts +2 -0
  200. package/dist/components/effects/MorphingText/MorphingText.d.ts +17 -0
  201. package/dist/components/effects/MorphingText/MorphingText.js +91 -0
  202. package/dist/components/effects/MorphingText/MorphingText.types.d.ts +18 -0
  203. package/dist/components/effects/MorphingText/index.d.ts +2 -0
  204. package/dist/components/effects/NoiseOverlay/NoiseOverlay.d.ts +28 -0
  205. package/dist/components/effects/NoiseOverlay/NoiseOverlay.js +61 -0
  206. package/dist/components/effects/NoiseOverlay/NoiseOverlay.types.d.ts +35 -0
  207. package/dist/components/effects/NoiseOverlay/index.d.ts +2 -0
  208. package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +26 -0
  209. package/dist/components/effects/ParallaxSection/ParallaxSection.js +71 -0
  210. package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +11 -0
  211. package/dist/components/effects/ParallaxSection/index.d.ts +2 -0
  212. package/dist/components/effects/Particles/Particles.d.ts +22 -0
  213. package/dist/components/effects/Particles/Particles.js +33 -0
  214. package/dist/components/effects/Particles/Particles.scene.d.ts +3 -0
  215. package/dist/components/effects/Particles/Particles.scene.js +284 -0
  216. package/dist/components/effects/Particles/Particles.types.d.ts +65 -0
  217. package/dist/components/effects/Particles/index.d.ts +2 -0
  218. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.d.ts +3 -0
  219. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +75 -0
  220. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.d.ts +7 -0
  221. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.js +12 -0
  222. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +47 -0
  223. package/dist/components/effects/ProgressiveBlur/index.d.ts +2 -0
  224. package/dist/components/effects/ScrollReveal/ScrollReveal.d.ts +29 -0
  225. package/dist/components/effects/ScrollReveal/ScrollReveal.js +121 -0
  226. package/dist/components/effects/ScrollReveal/ScrollReveal.types.d.ts +25 -0
  227. package/dist/components/effects/ScrollReveal/index.d.ts +2 -0
  228. package/dist/components/effects/Spotlight/Spotlight.d.ts +36 -0
  229. package/dist/components/effects/Spotlight/Spotlight.js +112 -0
  230. package/dist/components/effects/Spotlight/Spotlight.types.d.ts +29 -0
  231. package/dist/components/effects/Spotlight/index.d.ts +2 -0
  232. package/dist/components/effects/StickyScroll/StickyScroll.d.ts +30 -0
  233. package/dist/components/effects/StickyScroll/StickyScroll.js +128 -0
  234. package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +19 -0
  235. package/dist/components/effects/StickyScroll/index.d.ts +2 -0
  236. package/dist/components/effects/index.d.ts +22 -4
  237. package/dist/components/effects/index.js +11 -2
  238. package/dist/components/forms/Checkbox/Checkbox.js +3 -3
  239. package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -5
  240. package/dist/components/forms/ColorPicker/ColorPicker.theme.js +2 -2
  241. package/dist/components/forms/CronInput/CronInput.d.ts +3 -0
  242. package/dist/components/forms/CronInput/CronInput.js +107 -0
  243. package/dist/components/forms/CronInput/CronInput.theme.d.ts +6 -0
  244. package/dist/components/forms/CronInput/CronInput.theme.js +84 -0
  245. package/dist/components/forms/CronInput/CronInput.types.d.ts +98 -0
  246. package/dist/components/forms/CronInput/CronInput.utils.d.ts +67 -0
  247. package/dist/components/forms/CronInput/CronInput.utils.js +505 -0
  248. package/dist/components/forms/CronInput/index.d.ts +4 -0
  249. package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
  250. package/dist/components/forms/InputCounter/InputCounter.d.ts +1 -1
  251. package/dist/components/forms/InputCounter/InputCounter.types.d.ts +3 -2
  252. package/dist/components/forms/InputOTP/InputOTP.theme.js +1 -1
  253. package/dist/components/forms/Mention/Mention.d.ts +3 -0
  254. package/dist/components/forms/Mention/Mention.js +410 -0
  255. package/dist/components/forms/Mention/Mention.theme.d.ts +6 -0
  256. package/dist/components/forms/Mention/Mention.theme.js +56 -0
  257. package/dist/components/forms/Mention/Mention.types.d.ts +111 -0
  258. package/dist/components/forms/Mention/index.d.ts +3 -0
  259. package/dist/components/forms/Radio/Radio.js +8 -12
  260. package/dist/components/forms/Radio/Radio.theme.js +28 -5
  261. package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +2 -0
  262. package/dist/components/forms/SelectableCard/SelectableCard.animations.js +9 -0
  263. package/dist/components/forms/SelectableCard/SelectableCard.d.ts +5 -0
  264. package/dist/components/forms/SelectableCard/SelectableCard.js +58 -0
  265. package/dist/components/forms/SelectableCard/SelectableCard.theme.d.ts +2 -0
  266. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +38 -0
  267. package/dist/components/forms/SelectableCard/SelectableCard.types.d.ts +33 -0
  268. package/dist/components/forms/SelectableCard/SelectableCardContext.d.ts +3 -0
  269. package/dist/components/forms/SelectableCard/SelectableCardContext.js +12 -0
  270. package/dist/components/forms/SelectableCard/SelectableCardGroup.d.ts +3 -0
  271. package/dist/components/forms/SelectableCard/SelectableCardGroup.js +37 -0
  272. package/dist/components/forms/SelectableCard/index.d.ts +3 -0
  273. package/dist/components/forms/TransferList/TransferList.animations.d.ts +10 -0
  274. package/dist/components/forms/TransferList/TransferList.animations.js +32 -0
  275. package/dist/components/forms/TransferList/TransferList.d.ts +28 -0
  276. package/dist/components/forms/TransferList/TransferList.js +199 -0
  277. package/dist/components/forms/TransferList/TransferList.theme.d.ts +6 -0
  278. package/dist/components/forms/TransferList/TransferList.theme.js +60 -0
  279. package/dist/components/forms/TransferList/TransferList.types.d.ts +101 -0
  280. package/dist/components/forms/TransferList/index.d.ts +3 -0
  281. package/dist/components/forms/index.d.ts +13 -0
  282. package/dist/components/forms/index.js +9 -0
  283. package/dist/components/layout/FormLayout/FormLayout.d.ts +8 -0
  284. package/dist/components/layout/FormLayout/FormLayout.js +22 -0
  285. package/dist/components/layout/FormLayout/FormLayout.theme.d.ts +2 -0
  286. package/dist/components/layout/FormLayout/FormLayout.theme.js +16 -0
  287. package/dist/components/layout/FormLayout/FormLayout.types.d.ts +61 -0
  288. package/dist/components/layout/FormLayout/FormLayoutBody.d.ts +3 -0
  289. package/dist/components/layout/FormLayout/FormLayoutBody.js +13 -0
  290. package/dist/components/layout/FormLayout/FormLayoutFooter.d.ts +3 -0
  291. package/dist/components/layout/FormLayout/FormLayoutFooter.js +12 -0
  292. package/dist/components/layout/FormLayout/FormLayoutHeader.d.ts +3 -0
  293. package/dist/components/layout/FormLayout/FormLayoutHeader.js +12 -0
  294. package/dist/components/layout/FormLayout/FormLayoutSection.d.ts +3 -0
  295. package/dist/components/layout/FormLayout/FormLayoutSection.js +12 -0
  296. package/dist/components/layout/FormLayout/index.d.ts +3 -0
  297. package/dist/components/layout/PageLayout/PageLayout.d.ts +7 -0
  298. package/dist/components/layout/PageLayout/PageLayout.js +33 -0
  299. package/dist/components/layout/PageLayout/PageLayout.theme.d.ts +2 -0
  300. package/dist/components/layout/PageLayout/PageLayout.theme.js +10 -0
  301. package/dist/components/layout/PageLayout/PageLayout.types.d.ts +39 -0
  302. package/dist/components/layout/PageLayout/PageLayoutContent.d.ts +3 -0
  303. package/dist/components/layout/PageLayout/PageLayoutContent.js +12 -0
  304. package/dist/components/layout/PageLayout/PageLayoutHeader.d.ts +3 -0
  305. package/dist/components/layout/PageLayout/PageLayoutHeader.js +12 -0
  306. package/dist/components/layout/PageLayout/PageLayoutSidebar.d.ts +3 -0
  307. package/dist/components/layout/PageLayout/PageLayoutSidebar.js +12 -0
  308. package/dist/components/layout/PageLayout/index.d.ts +3 -0
  309. package/dist/components/layout/index.d.ts +2 -0
  310. package/dist/index.d.ts +2 -0
  311. package/dist/index.js +53 -21
  312. package/dist/styles.css +1 -1
  313. package/dist/utils/dateUtils.d.ts +30 -0
  314. package/dist/utils/dateUtils.js +58 -1
  315. package/dist/utils/index.d.ts +1 -1
  316. package/package.json +26 -22
  317. package/dist/components/core/Card/CardDescription.d.ts +0 -3
  318. package/dist/components/core/Card/CardDescription.js +0 -11
  319. package/dist/components/core/Modal/ModalDescription.d.ts +0 -5
  320. package/dist/components/core/Modal/ModalDescription.js +0 -11
  321. package/dist/components/core/ProgressiveBlur/ProgressiveBlur.d.ts +0 -34
  322. package/dist/components/core/ProgressiveBlur/ProgressiveBlur.js +0 -218
  323. package/dist/components/core/ProgressiveBlur/ProgressiveBlur.theme.d.ts +0 -9
  324. package/dist/components/core/ProgressiveBlur/ProgressiveBlur.types.d.ts +0 -48
  325. package/dist/components/core/ProgressiveBlur/index.d.ts +0 -2
  326. package/dist/components/core/Table/TablePagination.js +0 -25
  327. /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.d.ts +0 -0
  328. /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.js +0 -0
  329. /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.theme.d.ts +0 -0
  330. /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.types.d.ts +0 -0
  331. /package/dist/components/{core → data-display}/DescriptionList/index.d.ts +0 -0
  332. /package/dist/components/{core → data-display}/Feed/Feed.d.ts +0 -0
  333. /package/dist/components/{core → data-display}/Feed/Feed.theme.d.ts +0 -0
  334. /package/dist/components/{core → data-display}/Feed/Feed.theme.js +0 -0
  335. /package/dist/components/{core → data-display}/Feed/Feed.types.d.ts +0 -0
  336. /package/dist/components/{core → data-display}/Feed/index.d.ts +0 -0
  337. /package/dist/components/{core → data-display}/KPI/KPI.d.ts +0 -0
  338. /package/dist/components/{core → data-display}/KPI/KPI.theme.d.ts +0 -0
  339. /package/dist/components/{core → data-display}/Metric/Metric.d.ts +0 -0
  340. /package/dist/components/{core → data-display}/Metric/Metric.theme.d.ts +0 -0
  341. /package/dist/components/{core → data-display}/Metric/index.d.ts +0 -0
  342. /package/dist/components/{core → data-display}/Table/Table.animations.d.ts +0 -0
  343. /package/dist/components/{core → data-display}/Table/Table.animations.js +0 -0
  344. /package/dist/components/{core → data-display}/Table/Table.d.ts +0 -0
  345. /package/dist/components/{core → data-display}/Table/Table.filterUtils.d.ts +0 -0
  346. /package/dist/components/{core → data-display}/Table/Table.filterUtils.js +0 -0
  347. /package/dist/components/{core → data-display}/Table/Table.js +0 -0
  348. /package/dist/components/{core → data-display}/Table/Table.theme.d.ts +0 -0
  349. /package/dist/components/{core → data-display}/Table/Table.types.d.ts +0 -0
  350. /package/dist/components/{core → data-display}/Table/Table.utils.d.ts +0 -0
  351. /package/dist/components/{core → data-display}/Table/Table.utils.js +0 -0
  352. /package/dist/components/{core → data-display}/Table/TableActions.d.ts +0 -0
  353. /package/dist/components/{core → data-display}/Table/TableActionsMenu.d.ts +0 -0
  354. /package/dist/components/{core → data-display}/Table/TableActionsMenu.js +0 -0
  355. /package/dist/components/{core → data-display}/Table/TableBody.d.ts +0 -0
  356. /package/dist/components/{core → data-display}/Table/TableBody.js +0 -0
  357. /package/dist/components/{core → data-display}/Table/TableCell.d.ts +0 -0
  358. /package/dist/components/{core → data-display}/Table/TableCell.js +0 -0
  359. /package/dist/components/{core → data-display}/Table/TableColumnManager.d.ts +0 -0
  360. /package/dist/components/{core → data-display}/Table/TableDeclarative.d.ts +0 -0
  361. /package/dist/components/{core → data-display}/Table/TableDeclarative.js +0 -0
  362. /package/dist/components/{core → data-display}/Table/TableFilter.d.ts +0 -0
  363. /package/dist/components/{core → data-display}/Table/TableHeader.d.ts +0 -0
  364. /package/dist/components/{core → data-display}/Table/TableHeader.js +0 -0
  365. /package/dist/components/{core → data-display}/Table/TablePagination.d.ts +0 -0
  366. /package/dist/components/{core → data-display}/Table/TableRow.d.ts +0 -0
  367. /package/dist/components/{core → data-display}/Table/TableSelectionHeader.d.ts +0 -0
  368. /package/dist/components/{core → data-display}/Table/hooks/index.d.ts +0 -0
  369. /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.d.ts +0 -0
  370. /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.js +0 -0
  371. /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.d.ts +0 -0
  372. /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.js +0 -0
  373. /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.d.ts +0 -0
  374. /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.js +0 -0
  375. /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.d.ts +0 -0
  376. /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.js +0 -0
  377. /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.d.ts +0 -0
  378. /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.js +0 -0
  379. /package/dist/components/{core → data-display}/Table/index.d.ts +0 -0
  380. /package/dist/components/{core → data-display}/Table/index.js +0 -0
  381. /package/dist/components/{core → data-display}/Timeline/Timeline.animations.d.ts +0 -0
  382. /package/dist/components/{core → data-display}/Timeline/Timeline.animations.js +0 -0
  383. /package/dist/components/{core → data-display}/Timeline/Timeline.d.ts +0 -0
  384. /package/dist/components/{core → data-display}/Timeline/Timeline.js +0 -0
  385. /package/dist/components/{core → data-display}/Timeline/Timeline.theme.d.ts +0 -0
  386. /package/dist/components/{core → data-display}/Timeline/Timeline.theme.js +0 -0
  387. /package/dist/components/{core → data-display}/Timeline/Timeline.types.d.ts +0 -0
  388. /package/dist/components/{core → data-display}/Timeline/TimelineContent.d.ts +0 -0
  389. /package/dist/components/{core → data-display}/Timeline/TimelineContent.js +0 -0
  390. /package/dist/components/{core → data-display}/Timeline/TimelineItem.d.ts +0 -0
  391. /package/dist/components/{core → data-display}/Timeline/TimelineItem.js +0 -0
  392. /package/dist/components/{core → data-display}/Timeline/TimelineMarker.d.ts +0 -0
  393. /package/dist/components/{core → data-display}/Timeline/TimelineMarker.js +0 -0
  394. /package/dist/components/{core → data-display}/Timeline/index.d.ts +0 -0
@@ -0,0 +1,61 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useId, useRef, useEffect } from 'react';
3
+ import { useReducedMotion } from 'motion/react';
4
+ import { cn } from '../../../utils/cn.js';
5
+
6
+ /**
7
+ * NoiseOverlay Component
8
+ *
9
+ * An SVG feTurbulence-based noise/grain texture overlay that adds a
10
+ * matte or film-like quality to surfaces. Renders as an absolute-positioned,
11
+ * non-interactive layer over its parent container.
12
+ *
13
+ * The parent container should have `position: relative` and `overflow: hidden`.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <div className="relative overflow-hidden bg-gray-900 rounded-lg p-6">
18
+ * <NoiseOverlay opacity={0.2} blendMode="soft-light" />
19
+ * <span className="relative z-10">Content with grain texture</span>
20
+ * </div>
21
+ * ```
22
+ *
23
+ * @example Animated grain
24
+ * ```tsx
25
+ * <div className="relative overflow-hidden bg-indigo-600 rounded-lg p-8">
26
+ * <NoiseOverlay animated frequency={0.8} octaves={3} />
27
+ * <h2 className="relative z-10 text-white">Film grain effect</h2>
28
+ * </div>
29
+ * ```
30
+ */
31
+ const NoiseOverlay = ({ opacity = 0.15, frequency = 0.65, octaves = 4, blendMode = "overlay", animated = false, className, style, ...props }) => {
32
+ const filterId = useId();
33
+ const shouldReduceMotion = useReducedMotion();
34
+ const turbulenceRef = useRef(null);
35
+ const isAnimating = animated && !shouldReduceMotion;
36
+ useEffect(() => {
37
+ if (!isAnimating || !turbulenceRef.current)
38
+ return;
39
+ let seed = 0;
40
+ const step = () => {
41
+ var _a;
42
+ seed += 1;
43
+ if (seed > 999)
44
+ seed = 0;
45
+ (_a = turbulenceRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute("seed", String(seed));
46
+ };
47
+ // Animate at roughly 8fps for a subtle film-grain flicker
48
+ const intervalId = setInterval(step, 125);
49
+ return () => {
50
+ clearInterval(intervalId);
51
+ };
52
+ }, [isAnimating]);
53
+ return (jsx("div", { className: cn("absolute inset-0 pointer-events-none", className), style: {
54
+ mixBlendMode: blendMode,
55
+ opacity,
56
+ ...style,
57
+ }, "aria-hidden": "true", ...props, children: jsxs("svg", { className: "absolute inset-0 w-full h-full", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", children: [jsx("filter", { id: filterId, children: jsx("feTurbulence", { ref: turbulenceRef, type: "fractalNoise", baseFrequency: frequency, numOctaves: octaves, stitchTiles: "stitch", seed: 0 }) }), jsx("rect", { width: "100%", height: "100%", filter: `url(#${filterId})` })] }) }));
58
+ };
59
+ NoiseOverlay.displayName = "NoiseOverlay";
60
+
61
+ export { NoiseOverlay };
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ /** Blend mode for the noise overlay layer */
3
+ export type NoiseBlendMode = "overlay" | "soft-light" | "multiply" | "normal";
4
+ export interface NoiseOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * Opacity of the noise texture (0-1).
7
+ * @default 0.15
8
+ */
9
+ opacity?: number;
10
+ /**
11
+ * Base frequency for the feTurbulence noise generator.
12
+ * Higher values produce finer grain; lower values produce coarser patterns.
13
+ * @default 0.65
14
+ */
15
+ frequency?: number;
16
+ /**
17
+ * Number of octaves for the feTurbulence noise generator.
18
+ * More octaves add detail/complexity to the noise pattern.
19
+ * @default 4
20
+ */
21
+ octaves?: number;
22
+ /**
23
+ * CSS mix-blend-mode for how the noise composites over the parent.
24
+ * @default "overlay"
25
+ */
26
+ blendMode?: NoiseBlendMode;
27
+ /**
28
+ * Whether to animate the noise pattern with a subtle shifting effect.
29
+ * Respects prefers-reduced-motion automatically.
30
+ * @default false
31
+ */
32
+ animated?: boolean;
33
+ /** Additional className for style overrides (shadcn pattern). */
34
+ className?: string;
35
+ }
@@ -0,0 +1,2 @@
1
+ export { NoiseOverlay } from "./NoiseOverlay";
2
+ export type { NoiseOverlayProps, NoiseBlendMode } from "./NoiseOverlay.types";
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { ParallaxSectionProps } from './ParallaxSection.types';
3
+ /**
4
+ * ParallaxSection
5
+ *
6
+ * A scroll-driven parallax wrapper that translates its children at a configurable
7
+ * rate relative to normal scroll, creating depth and visual interest.
8
+ *
9
+ * Uses `transform: translate3d` for GPU-accelerated, jank-free animation.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <ParallaxSection speed={0.3}>
14
+ * <img src="/hero-bg.jpg" alt="" className="w-full h-[600px] object-cover" />
15
+ * </ParallaxSection>
16
+ * ```
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * // Opposite direction
21
+ * <ParallaxSection speed={-0.2} direction="horizontal">
22
+ * <div className="flex gap-4">{items}</div>
23
+ * </ParallaxSection>
24
+ * ```
25
+ */
26
+ export declare const ParallaxSection: React.ForwardRefExoticComponent<ParallaxSectionProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,71 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React__default, { useRef } from 'react';
3
+ import { useReducedMotion, useScroll, useTransform, motion } from 'motion/react';
4
+ import { cn } from '../../../utils/cn.js';
5
+
6
+ /**
7
+ * ParallaxSection
8
+ *
9
+ * A scroll-driven parallax wrapper that translates its children at a configurable
10
+ * rate relative to normal scroll, creating depth and visual interest.
11
+ *
12
+ * Uses `transform: translate3d` for GPU-accelerated, jank-free animation.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <ParallaxSection speed={0.3}>
17
+ * <img src="/hero-bg.jpg" alt="" className="w-full h-[600px] object-cover" />
18
+ * </ParallaxSection>
19
+ * ```
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * // Opposite direction
24
+ * <ParallaxSection speed={-0.2} direction="horizontal">
25
+ * <div className="flex gap-4">{items}</div>
26
+ * </ParallaxSection>
27
+ * ```
28
+ */
29
+ const ParallaxSection = React__default.forwardRef(({ speed = 0.5, direction = 'vertical', scrollRef, className, children, style,
30
+ // Destructure HTML event handlers that conflict with motion's API
31
+ onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, onAnimationStart: _onAnimationStart, ...restProps }, ref) => {
32
+ const shouldReduceMotion = useReducedMotion();
33
+ const internalRef = useRef(null);
34
+ // Track scroll progress of the target element through the viewport.
35
+ // offset: element bottom enters viewport -> element top exits viewport.
36
+ const { scrollYProgress } = useScroll({
37
+ target: internalRef,
38
+ container: scrollRef,
39
+ offset: ['start end', 'end start'],
40
+ });
41
+ // Map 0-1 scroll progress to a pixel displacement.
42
+ // At progress 0 (element just entering) the offset is positive (pushed down),
43
+ // and at progress 1 (element leaving) the offset is negative (pulled up),
44
+ // scaled by the speed multiplier. This creates the classic parallax feel.
45
+ const range = 200 * speed;
46
+ const yTransform = useTransform(scrollYProgress, [0, 1], [range, -range]);
47
+ const xTransform = useTransform(scrollYProgress, [0, 1], [range, -range]);
48
+ // When reduced motion is preferred, render without any parallax.
49
+ if (shouldReduceMotion) {
50
+ return (jsx("div", { ref: (node) => {
51
+ internalRef.current = node;
52
+ if (typeof ref === 'function')
53
+ ref(node);
54
+ else if (ref)
55
+ ref.current = node;
56
+ }, className: cn('will-change-transform', className), style: style, ...restProps, children: children }));
57
+ }
58
+ const motionStyle = direction === 'vertical'
59
+ ? { y: yTransform, ...style }
60
+ : { x: xTransform, ...style };
61
+ return (jsx(motion.div, { ref: (node) => {
62
+ internalRef.current = node;
63
+ if (typeof ref === 'function')
64
+ ref(node);
65
+ else if (ref)
66
+ ref.current = node;
67
+ }, className: cn('will-change-transform', className), style: motionStyle, ...restProps, children: children }));
68
+ });
69
+ ParallaxSection.displayName = 'ParallaxSection';
70
+
71
+ export { ParallaxSection };
@@ -0,0 +1,11 @@
1
+ import type { RefObject } from 'react';
2
+ export interface ParallaxSectionProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Parallax speed multiplier. Negative = moves opposite direction. (default 0.5) */
4
+ speed?: number;
5
+ /** Direction of parallax (default 'vertical') */
6
+ direction?: 'vertical' | 'horizontal';
7
+ /** Use scroll container instead of window (ref to container) */
8
+ scrollRef?: RefObject<HTMLElement>;
9
+ className?: string;
10
+ children: React.ReactNode;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { ParallaxSection } from './ParallaxSection';
2
+ export type { ParallaxSectionProps } from './ParallaxSection.types';
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import type { ParticlesProps } from "./Particles.types";
3
+ /**
4
+ * Particles creates a floating particle background effect using Three.js.
5
+ *
6
+ * Particles drift upward with slight horizontal variation and react to mouse
7
+ * proximity. Optional connection lines are drawn between nearby particles.
8
+ *
9
+ * The component renders as an absolutely-positioned layer, ideal for use as
10
+ * a section or page background.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <div className="relative h-screen overflow-hidden bg-gray-950">
15
+ * <Particles count={100} color="#6366f1" connectionDistance={120} />
16
+ * <div className="relative z-10 p-8">
17
+ * <h1 className="text-white text-4xl">Content on top</h1>
18
+ * </div>
19
+ * </div>
20
+ * ```
21
+ */
22
+ export declare const Particles: React.FC<ParticlesProps>;
@@ -0,0 +1,33 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Canvas } from '@react-three/fiber';
3
+ import { useReducedMotion } from 'motion/react';
4
+ import { cn } from '../../../utils/cn.js';
5
+ import 'react';
6
+ import { ParticlesScene } from './Particles.scene.js';
7
+
8
+ /**
9
+ * Particles creates a floating particle background effect using Three.js.
10
+ *
11
+ * Particles drift upward with slight horizontal variation and react to mouse
12
+ * proximity. Optional connection lines are drawn between nearby particles.
13
+ *
14
+ * The component renders as an absolutely-positioned layer, ideal for use as
15
+ * a section or page background.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <div className="relative h-screen overflow-hidden bg-gray-950">
20
+ * <Particles count={100} color="#6366f1" connectionDistance={120} />
21
+ * <div className="relative z-10 p-8">
22
+ * <h1 className="text-white text-4xl">Content on top</h1>
23
+ * </div>
24
+ * </div>
25
+ * ```
26
+ */
27
+ const Particles = ({ count = 80, color = "#6366f1", size = 2, speed = 1, connectionDistance = 150, connectionColor, mouseRadius = 200, mouseForce = 0.5, opacity = 0.6, className, style, ...rest }) => {
28
+ var _a;
29
+ const shouldReduceMotion = (_a = useReducedMotion()) !== null && _a !== void 0 ? _a : false;
30
+ return (jsx("div", { className: cn("absolute inset-0 pointer-events-none", className), style: style, ...rest, children: jsx(Canvas, { className: "!pointer-events-auto", dpr: [1, 2], orthographic: true, camera: { zoom: 50, near: 0.1, far: 100, position: [0, 0, 10] }, gl: { antialias: false, alpha: true }, style: { position: "absolute", inset: 0, width: "100%", height: "100%" }, children: jsx(ParticlesScene, { count: count, color: color, size: size, speed: speed, connectionDistance: connectionDistance, connectionColor: connectionColor || color, mouseRadius: mouseRadius, mouseForce: mouseForce, opacity: opacity, reducedMotion: shouldReduceMotion }) }) }));
31
+ };
32
+
33
+ export { Particles };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { ParticlesSceneProps } from "./Particles.types";
3
+ export declare const ParticlesScene: React.FC<ParticlesSceneProps>;
@@ -0,0 +1,284 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useRef, useMemo, useEffect, useCallback } from 'react';
3
+ import { useThree, useFrame } from '@react-three/fiber';
4
+ import * as THREE from 'three';
5
+
6
+ // ── Helpers ──────────────────────────────────────────────────────────────────
7
+ /** Convert a hex colour string to a normalised THREE.Color. */
8
+ function hexToColor(hex) {
9
+ return new THREE.Color(hex);
10
+ }
11
+ /**
12
+ * Seed particle data: positions scattered across an area that maps to the
13
+ * viewport, plus per-particle velocity and depth factor.
14
+ */
15
+ function createParticleData(count, width, height) {
16
+ const positions = new Float32Array(count * 3);
17
+ const velocities = new Float32Array(count * 3);
18
+ const depths = new Float32Array(count); // 0 = far, 1 = near
19
+ const originals = new Float32Array(count * 3);
20
+ for (let i = 0; i < count; i++) {
21
+ const i3 = i * 3;
22
+ const x = (Math.random() - 0.5) * width;
23
+ const y = (Math.random() - 0.5) * height;
24
+ const z = 0;
25
+ positions[i3] = x;
26
+ positions[i3 + 1] = y;
27
+ positions[i3 + 2] = z;
28
+ originals[i3] = x;
29
+ originals[i3 + 1] = y;
30
+ originals[i3 + 2] = z;
31
+ // Random gentle velocity: slight upward float + horizontal drift
32
+ velocities[i3] = (Math.random() - 0.5) * 0.3; // vx
33
+ velocities[i3 + 1] = Math.random() * 0.2 + 0.1; // vy (upward)
34
+ velocities[i3 + 2] = 0; // vz
35
+ depths[i] = Math.random();
36
+ }
37
+ return { positions, velocities, depths, originals };
38
+ }
39
+ // ── Scene ────────────────────────────────────────────────────────────────────
40
+ const ParticlesScene = ({ count, color, size, speed, connectionDistance, connectionColor, mouseRadius, mouseForce, opacity, reducedMotion, }) => {
41
+ const { viewport } = useThree();
42
+ // Refs
43
+ const pointsRef = useRef(null);
44
+ const linesRef = useRef(null);
45
+ const mouseNDC = useRef(new THREE.Vector2(9999, 9999));
46
+ // Keep latest props in a ref so useFrame reads current values
47
+ const propsRef = useRef({
48
+ speed,
49
+ mouseRadius,
50
+ mouseForce,
51
+ connectionDistance,
52
+ opacity,
53
+ reducedMotion,
54
+ });
55
+ propsRef.current = {
56
+ speed,
57
+ mouseRadius,
58
+ mouseForce,
59
+ connectionDistance,
60
+ opacity,
61
+ reducedMotion,
62
+ };
63
+ // Dimensions in world units
64
+ const worldWidth = viewport.width;
65
+ const worldHeight = viewport.height;
66
+ // ── Particle data (re-created when count or viewport changes) ────────────
67
+ const data = useMemo(() => createParticleData(count, worldWidth, worldHeight), [count, worldWidth, worldHeight]);
68
+ // ── Points geometry + material ───────────────────────────────────────────
69
+ const pointsGeometry = useMemo(() => {
70
+ const geo = new THREE.BufferGeometry();
71
+ geo.setAttribute("position", new THREE.BufferAttribute(data.positions, 3));
72
+ geo.setAttribute("depth", new THREE.BufferAttribute(data.depths, 1));
73
+ return geo;
74
+ }, [data]);
75
+ const pointsMaterial = useMemo(() => {
76
+ return new THREE.ShaderMaterial({
77
+ transparent: true,
78
+ depthWrite: false,
79
+ uniforms: {
80
+ u_color: { value: hexToColor(color) },
81
+ u_size: { value: size },
82
+ u_opacity: { value: opacity },
83
+ u_pixelRatio: { value: Math.min(window.devicePixelRatio, 2) },
84
+ },
85
+ vertexShader: /* glsl */ `
86
+ attribute float depth;
87
+ uniform float u_size;
88
+ uniform float u_pixelRatio;
89
+ varying float vDepth;
90
+
91
+ void main() {
92
+ vDepth = depth;
93
+ vec4 mvPos = modelViewMatrix * vec4(position, 1.0);
94
+ // Larger particles appear closer (depth 1 = near, 0 = far)
95
+ gl_PointSize = u_size * u_pixelRatio * (0.5 + depth * 0.8);
96
+ gl_Position = projectionMatrix * mvPos;
97
+ }
98
+ `,
99
+ fragmentShader: /* glsl */ `
100
+ uniform vec3 u_color;
101
+ uniform float u_opacity;
102
+ varying float vDepth;
103
+
104
+ void main() {
105
+ // Circular point shape
106
+ float dist = length(gl_PointCoord - vec2(0.5));
107
+ if (dist > 0.5) discard;
108
+
109
+ // Soft edge falloff
110
+ float alpha = 1.0 - smoothstep(0.3, 0.5, dist);
111
+ // Depth affects brightness: closer = brighter
112
+ float brightness = 0.4 + vDepth * 0.6;
113
+ gl_FragColor = vec4(u_color * brightness, alpha * u_opacity * (0.3 + vDepth * 0.7));
114
+ }
115
+ `,
116
+ });
117
+ }, [color, size, opacity]);
118
+ // Update material uniforms when props change
119
+ useEffect(() => {
120
+ if (pointsMaterial) {
121
+ pointsMaterial.uniforms.u_color.value = hexToColor(color);
122
+ pointsMaterial.uniforms.u_size.value = size;
123
+ pointsMaterial.uniforms.u_opacity.value = opacity;
124
+ }
125
+ }, [color, size, opacity, pointsMaterial]);
126
+ // ── Connection lines geometry + material ─────────────────────────────────
127
+ const maxLines = count * 6; // upper bound on line segments
128
+ const linesGeometry = useMemo(() => {
129
+ const geo = new THREE.BufferGeometry();
130
+ const linePositions = new Float32Array(maxLines * 6); // 2 verts * 3 coords per segment
131
+ const lineAlphas = new Float32Array(maxLines * 2); // alpha per vertex
132
+ geo.setAttribute("position", new THREE.BufferAttribute(linePositions, 3));
133
+ geo.setAttribute("alpha", new THREE.BufferAttribute(lineAlphas, 1));
134
+ geo.setDrawRange(0, 0);
135
+ return geo;
136
+ }, [maxLines]);
137
+ const linesMaterial = useMemo(() => {
138
+ return new THREE.ShaderMaterial({
139
+ transparent: true,
140
+ depthWrite: false,
141
+ uniforms: {
142
+ u_color: { value: hexToColor(connectionColor || color) },
143
+ u_opacity: { value: opacity },
144
+ },
145
+ vertexShader: /* glsl */ `
146
+ attribute float alpha;
147
+ varying float vAlpha;
148
+
149
+ void main() {
150
+ vAlpha = alpha;
151
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
152
+ }
153
+ `,
154
+ fragmentShader: /* glsl */ `
155
+ uniform vec3 u_color;
156
+ uniform float u_opacity;
157
+ varying float vAlpha;
158
+
159
+ void main() {
160
+ gl_FragColor = vec4(u_color, vAlpha * u_opacity * 0.35);
161
+ }
162
+ `,
163
+ });
164
+ }, [color, connectionColor, opacity]);
165
+ // Update line material when props change
166
+ useEffect(() => {
167
+ if (linesMaterial) {
168
+ linesMaterial.uniforms.u_color.value = hexToColor(connectionColor || color);
169
+ linesMaterial.uniforms.u_opacity.value = opacity;
170
+ }
171
+ }, [color, connectionColor, opacity, linesMaterial]);
172
+ // ── Mouse tracking ───────────────────────────────────────────────────────
173
+ const handlePointerMove = useCallback((event) => {
174
+ mouseNDC.current.set(event.point.x, event.point.y);
175
+ }, []);
176
+ const handlePointerLeave = useCallback(() => {
177
+ // Move mouse far away so it has no effect
178
+ mouseNDC.current.set(9999, 9999);
179
+ }, []);
180
+ // ── Cleanup on unmount ───────────────────────────────────────────────────
181
+ useEffect(() => {
182
+ return () => {
183
+ pointsGeometry.dispose();
184
+ pointsMaterial.dispose();
185
+ linesGeometry.dispose();
186
+ linesMaterial.dispose();
187
+ };
188
+ }, [pointsGeometry, pointsMaterial, linesGeometry, linesMaterial]);
189
+ // ── Animation loop ───────────────────────────────────────────────────────
190
+ useFrame((_, delta) => {
191
+ const { speed: spd, mouseRadius: mRadius, mouseForce: mForce, connectionDistance: connDist, opacity: opac, reducedMotion: reduced, } = propsRef.current;
192
+ if (reduced)
193
+ return; // Respect reduced motion preference
194
+ const clampedDelta = Math.min(delta, 0.05); // cap to prevent large jumps
195
+ const dt = clampedDelta * spd;
196
+ const posAttr = pointsGeometry.getAttribute("position");
197
+ const posArr = posAttr.array;
198
+ const halfW = worldWidth / 2;
199
+ const halfH = worldHeight / 2;
200
+ const mx = mouseNDC.current.x;
201
+ const my = mouseNDC.current.y;
202
+ // Convert connectionDistance from screen-pixels to world units.
203
+ // viewport.width corresponds to the canvas pixel width, so we scale.
204
+ const connDistWorld = (connDist / (viewport.width * 50)) * worldWidth;
205
+ const mouseRadiusWorld = (mRadius / (viewport.width * 50)) * worldWidth;
206
+ // ── Update particle positions ────────────────────────────────────────
207
+ for (let i = 0; i < count; i++) {
208
+ const i3 = i * 3;
209
+ // Apply velocity (floating upward + drift)
210
+ posArr[i3] += data.velocities[i3] * dt;
211
+ posArr[i3 + 1] += data.velocities[i3 + 1] * dt;
212
+ // Mouse repulsion
213
+ if (mRadius > 0) {
214
+ const dx = posArr[i3] - mx;
215
+ const dy = posArr[i3 + 1] - my;
216
+ const distSq = dx * dx + dy * dy;
217
+ const mRadSq = mouseRadiusWorld * mouseRadiusWorld;
218
+ if (distSq < mRadSq && distSq > 0.0001) {
219
+ const dist = Math.sqrt(distSq);
220
+ const force = ((mouseRadiusWorld - dist) / mouseRadiusWorld) * mForce * dt;
221
+ posArr[i3] += (dx / dist) * force;
222
+ posArr[i3 + 1] += (dy / dist) * force;
223
+ }
224
+ }
225
+ // Wrap around edges
226
+ if (posArr[i3] > halfW)
227
+ posArr[i3] = -halfW;
228
+ if (posArr[i3] < -halfW)
229
+ posArr[i3] = halfW;
230
+ if (posArr[i3 + 1] > halfH) {
231
+ posArr[i3 + 1] = -halfH;
232
+ // Re-randomize x when wrapping vertically for natural look
233
+ posArr[i3] = (Math.random() - 0.5) * worldWidth;
234
+ }
235
+ if (posArr[i3 + 1] < -halfH)
236
+ posArr[i3 + 1] = halfH;
237
+ }
238
+ posAttr.needsUpdate = true;
239
+ // ── Update connection lines ──────────────────────────────────────────
240
+ if (connDist > 0 && linesGeometry) {
241
+ const linePosAttr = linesGeometry.getAttribute("position");
242
+ const lineAlphaAttr = linesGeometry.getAttribute("alpha");
243
+ const linePosArr = linePosAttr.array;
244
+ const lineAlphaArr = lineAlphaAttr.array;
245
+ let lineIdx = 0;
246
+ const connDistSq = connDistWorld * connDistWorld;
247
+ for (let i = 0; i < count && lineIdx < maxLines; i++) {
248
+ const i3 = i * 3;
249
+ for (let j = i + 1; j < count && lineIdx < maxLines; j++) {
250
+ const j3 = j * 3;
251
+ const dx = posArr[i3] - posArr[j3];
252
+ const dy = posArr[i3 + 1] - posArr[j3 + 1];
253
+ const distSq = dx * dx + dy * dy;
254
+ if (distSq < connDistSq) {
255
+ const lineBase = lineIdx * 6;
256
+ const alphaBase = lineIdx * 2;
257
+ linePosArr[lineBase] = posArr[i3];
258
+ linePosArr[lineBase + 1] = posArr[i3 + 1];
259
+ linePosArr[lineBase + 2] = 0;
260
+ linePosArr[lineBase + 3] = posArr[j3];
261
+ linePosArr[lineBase + 4] = posArr[j3 + 1];
262
+ linePosArr[lineBase + 5] = 0;
263
+ const alpha = 1.0 - Math.sqrt(distSq) / connDistWorld;
264
+ lineAlphaArr[alphaBase] = alpha;
265
+ lineAlphaArr[alphaBase + 1] = alpha;
266
+ lineIdx++;
267
+ }
268
+ }
269
+ }
270
+ linesGeometry.setDrawRange(0, lineIdx * 2);
271
+ linePosAttr.needsUpdate = true;
272
+ lineAlphaAttr.needsUpdate = true;
273
+ if (linesMaterial) {
274
+ linesMaterial.uniforms.u_opacity.value = opac;
275
+ }
276
+ }
277
+ else if (linesGeometry) {
278
+ linesGeometry.setDrawRange(0, 0);
279
+ }
280
+ });
281
+ return (jsxs(Fragment, { children: [jsxs("mesh", { onPointerMove: handlePointerMove, onPointerLeave: handlePointerLeave, children: [jsx("planeGeometry", { args: [worldWidth * 2, worldHeight * 2] }), jsx("meshBasicMaterial", { transparent: true, opacity: 0, depthWrite: false })] }), jsx("points", { ref: pointsRef, geometry: pointsGeometry, material: pointsMaterial }), connectionDistance > 0 && (jsx("lineSegments", { ref: linesRef, geometry: linesGeometry, material: linesMaterial }))] }));
282
+ };
283
+
284
+ export { ParticlesScene };
@@ -0,0 +1,65 @@
1
+ import React from "react";
2
+ export interface ParticlesProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
3
+ /**
4
+ * Number of particles to render.
5
+ * @default 80
6
+ */
7
+ count?: number;
8
+ /**
9
+ * Particle colour as a CSS hex string.
10
+ * @default '#6366f1'
11
+ */
12
+ color?: string;
13
+ /**
14
+ * Base particle size in pixels.
15
+ * @default 2
16
+ */
17
+ size?: number;
18
+ /**
19
+ * Animation speed multiplier (1 = normal).
20
+ * @default 1
21
+ */
22
+ speed?: number;
23
+ /**
24
+ * Maximum pixel distance between particles to draw a connection line.
25
+ * Set to 0 to disable connection lines entirely.
26
+ * @default 150
27
+ */
28
+ connectionDistance?: number;
29
+ /**
30
+ * Colour of the connection lines between particles.
31
+ * Defaults to the same value as `color` when omitted.
32
+ */
33
+ connectionColor?: string;
34
+ /**
35
+ * Pixel radius within which the mouse affects particles.
36
+ * Set to 0 to disable mouse interaction.
37
+ * @default 200
38
+ */
39
+ mouseRadius?: number;
40
+ /**
41
+ * Strength of the push force applied by the mouse cursor.
42
+ * @default 0.5
43
+ */
44
+ mouseForce?: number;
45
+ /**
46
+ * Overall opacity of the particle layer (0 to 1).
47
+ * @default 0.6
48
+ */
49
+ opacity?: number;
50
+ }
51
+ /**
52
+ * Internal props forwarded to the Three.js scene component.
53
+ */
54
+ export interface ParticlesSceneProps {
55
+ count: number;
56
+ color: string;
57
+ size: number;
58
+ speed: number;
59
+ connectionDistance: number;
60
+ connectionColor: string;
61
+ mouseRadius: number;
62
+ mouseForce: number;
63
+ opacity: number;
64
+ reducedMotion: boolean;
65
+ }
@@ -0,0 +1,2 @@
1
+ export { Particles } from "./Particles";
2
+ export type { ParticlesProps } from "./Particles.types";
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { ProgressiveBlurProps } from "./ProgressiveBlur.types";
3
+ export declare const ProgressiveBlur: React.ForwardRefExoticComponent<ProgressiveBlurProps & React.RefAttributes<HTMLDivElement>>;