@zendir/ui 0.5.0 → 0.6.0

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 (391) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +640 -631
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/index.js +17 -221
  5. package/dist/react/3d/CesiumCaptureSource.d.ts +0 -1
  6. package/dist/react/3d/CesiumCaptureSource.js +364 -283
  7. package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
  8. package/dist/react/3d/ZenSpace3D.d.ts +2 -3
  9. package/dist/react/3d/ZenSpace3D.js +1681 -1237
  10. package/dist/react/3d/ZenSpace3D.js.map +1 -1
  11. package/dist/react/3d/ZenSpace3DCesium.d.ts +0 -1
  12. package/dist/react/3d/ZenSpace3DCesium.js +513 -560
  13. package/dist/react/3d/ZenSpace3DCesium.js.map +1 -1
  14. package/dist/react/3d/ZenSpace3DShaders.js +61 -66
  15. package/dist/react/3d/ZenSpace3DShaders.js.map +1 -1
  16. package/dist/react/3d/ZenSpace3DTypes.d.ts +19 -20
  17. package/dist/react/3d/ZenSpace3DUtils.d.ts +0 -1
  18. package/dist/react/3d/ZenSpace3DUtils.js +37 -24
  19. package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
  20. package/dist/react/3d/capturePngAnalysis.js +42 -36
  21. package/dist/react/3d/capturePngAnalysis.js.map +1 -1
  22. package/dist/react/3d/index.d.ts +3 -3
  23. package/dist/react/3d/index.js +5 -53
  24. package/dist/react/3d/threeLoader.d.ts +1 -1
  25. package/dist/react/3d/threeLoader.js +23 -18
  26. package/dist/react/3d/threeLoader.js.map +1 -1
  27. package/dist/react/astro/ClassificationBanner.d.ts +2 -3
  28. package/dist/react/astro/ClassificationBanner.js +95 -79
  29. package/dist/react/astro/ClassificationBanner.js.map +1 -1
  30. package/dist/react/astro/GlobalStatusBar.d.ts +0 -1
  31. package/dist/react/astro/GlobalStatusBar.js +157 -163
  32. package/dist/react/astro/GlobalStatusBar.js.map +1 -1
  33. package/dist/react/astro/MissionClock.d.ts +7 -8
  34. package/dist/react/astro/MissionClock.js +377 -400
  35. package/dist/react/astro/MissionClock.js.map +1 -1
  36. package/dist/react/astro/MonitoringIcon.d.ts +1 -2
  37. package/dist/react/astro/MonitoringIcon.js +422 -358
  38. package/dist/react/astro/MonitoringIcon.js.map +1 -1
  39. package/dist/react/astro/Notification.d.ts +1 -2
  40. package/dist/react/astro/Notification.js +229 -126
  41. package/dist/react/astro/Notification.js.map +1 -1
  42. package/dist/react/astro/Progress.d.ts +0 -1
  43. package/dist/react/astro/Progress.js +199 -141
  44. package/dist/react/astro/Progress.js.map +1 -1
  45. package/dist/react/astro/SimulationControls.d.ts +3 -4
  46. package/dist/react/astro/SimulationControls.js +596 -650
  47. package/dist/react/astro/SimulationControls.js.map +1 -1
  48. package/dist/react/astro/StatusIndicator.d.ts +0 -1
  49. package/dist/react/astro/StatusIndicator.js +236 -170
  50. package/dist/react/astro/StatusIndicator.js.map +1 -1
  51. package/dist/react/astro/UnifiedTimeline.d.ts +9 -10
  52. package/dist/react/astro/UnifiedTimeline.js +2345 -2392
  53. package/dist/react/astro/UnifiedTimeline.js.map +1 -1
  54. package/dist/react/astro/index.d.ts +5 -5
  55. package/dist/react/astro/index.js +1 -25
  56. package/dist/react/cards/AccessCard.d.ts +0 -1
  57. package/dist/react/cards/AccessCard.js +471 -405
  58. package/dist/react/cards/AccessCard.js.map +1 -1
  59. package/dist/react/cards/OrbitCard.d.ts +0 -1
  60. package/dist/react/cards/OrbitCard.js +487 -364
  61. package/dist/react/cards/OrbitCard.js.map +1 -1
  62. package/dist/react/cards/SpacecraftCard.d.ts +0 -1
  63. package/dist/react/cards/SpacecraftCard.js +813 -925
  64. package/dist/react/cards/SpacecraftCard.js.map +1 -1
  65. package/dist/react/cards/TelemetryCard.d.ts +0 -1
  66. package/dist/react/cards/TelemetryCard.js +1055 -732
  67. package/dist/react/cards/TelemetryCard.js.map +1 -1
  68. package/dist/react/cards/TelemetryStreamCard.d.ts +0 -1
  69. package/dist/react/cards/TelemetryStreamCard.js +323 -297
  70. package/dist/react/cards/TelemetryStreamCard.js.map +1 -1
  71. package/dist/react/cards/index.d.ts +1 -1
  72. package/dist/react/cards/index.js +1 -8
  73. package/dist/react/charts/GroundTrackMap.d.ts +6 -7
  74. package/dist/react/charts/GroundTrackMap.js +1377 -1256
  75. package/dist/react/charts/GroundTrackMap.js.map +1 -1
  76. package/dist/react/charts/GroundTrackMapLeaflet.d.ts +1 -2
  77. package/dist/react/charts/GroundTrackMapLeaflet.js +1065 -987
  78. package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
  79. package/dist/react/charts/groundTrackMapLeafletTiles.js +34 -25
  80. package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
  81. package/dist/react/charts/groundTrackMapLeafletUtils.js +70 -61
  82. package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -1
  83. package/dist/react/charts/index.d.ts +1 -1
  84. package/dist/react/charts/index.js +7 -100
  85. package/dist/react/charts/unified/AstroChart.d.ts +1 -2
  86. package/dist/react/charts/unified/AstroChart.js +1331 -1411
  87. package/dist/react/charts/unified/AstroChart.js.map +1 -1
  88. package/dist/react/charts/unified/PowerOverviewChart.d.ts +3 -3
  89. package/dist/react/charts/unified/PowerOverviewChart.js +495 -478
  90. package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -1
  91. package/dist/react/charts/unified/domain.d.ts +12 -13
  92. package/dist/react/charts/unified/domain.js +3999 -3145
  93. package/dist/react/charts/unified/domain.js.map +1 -1
  94. package/dist/react/charts/unified/generators.d.ts +3 -4
  95. package/dist/react/charts/unified/generators.js +561 -498
  96. package/dist/react/charts/unified/generators.js.map +1 -1
  97. package/dist/react/charts/unified/index.d.ts +1 -1
  98. package/dist/react/charts/unified/presets.d.ts +14 -15
  99. package/dist/react/charts/unified/presets.js +857 -994
  100. package/dist/react/charts/unified/presets.js.map +1 -1
  101. package/dist/react/charts/unified/sync.d.ts +2 -3
  102. package/dist/react/charts/unified/sync.js +229 -195
  103. package/dist/react/charts/unified/sync.js.map +1 -1
  104. package/dist/react/charts/unified/theme.d.ts +11 -12
  105. package/dist/react/charts/unified/theme.js +606 -642
  106. package/dist/react/charts/unified/theme.js.map +1 -1
  107. package/dist/react/charts/unified/types.d.ts +32 -33
  108. package/dist/react/charts/unified/useChartStream.d.ts +1 -2
  109. package/dist/react/charts/unified/useChartStream.js +203 -216
  110. package/dist/react/charts/unified/useChartStream.js.map +1 -1
  111. package/dist/react/chatgpt/AppCard.d.ts +1 -2
  112. package/dist/react/chatgpt/index.d.ts +7 -7
  113. package/dist/react/chatgpt/index.js +160 -139
  114. package/dist/react/chatgpt/index.js.map +1 -1
  115. package/dist/react/context/CategoryContext.d.ts +0 -1
  116. package/dist/react/context/CategoryContext.js +78 -29
  117. package/dist/react/context/CategoryContext.js.map +1 -1
  118. package/dist/react/context/DisplaySettingsContext.d.ts +1 -2
  119. package/dist/react/context/DisplaySettingsContext.js +205 -156
  120. package/dist/react/context/DisplaySettingsContext.js.map +1 -1
  121. package/dist/react/context/SpatialSelectionContext.d.ts +0 -1
  122. package/dist/react/context/SpatialSelectionContext.js +36 -7
  123. package/dist/react/context/SpatialSelectionContext.js.map +1 -1
  124. package/dist/react/core/data/DataTable.d.ts +3 -4
  125. package/dist/react/core/data/DataTable.js +473 -440
  126. package/dist/react/core/data/DataTable.js.map +1 -1
  127. package/dist/react/core/data/DataValue.d.ts +4 -5
  128. package/dist/react/core/data/DataValue.js +605 -571
  129. package/dist/react/core/data/DataValue.js.map +1 -1
  130. package/dist/react/core/data/propertyConfig.d.ts +1 -2
  131. package/dist/react/core/data/propertyConfig.js +446 -382
  132. package/dist/react/core/data/propertyConfig.js.map +1 -1
  133. package/dist/react/core/display/AstroIcon.d.ts +4 -5
  134. package/dist/react/core/display/AstroIcon.js +339 -429
  135. package/dist/react/core/display/AstroIcon.js.map +1 -1
  136. package/dist/react/core/display/Badge.d.ts +2 -3
  137. package/dist/react/core/display/Badge.js +131 -131
  138. package/dist/react/core/display/Badge.js.map +1 -1
  139. package/dist/react/core/display/CardHeader.d.ts +0 -1
  140. package/dist/react/core/display/CardHeader.js +398 -311
  141. package/dist/react/core/display/CardHeader.js.map +1 -1
  142. package/dist/react/core/display/Container.d.ts +2 -3
  143. package/dist/react/core/display/Container.js +640 -668
  144. package/dist/react/core/display/Container.js.map +1 -1
  145. package/dist/react/core/display/CopyButton.d.ts +1 -2
  146. package/dist/react/core/display/CopyButton.js +158 -101
  147. package/dist/react/core/display/CopyButton.js.map +1 -1
  148. package/dist/react/core/display/GlassCard.d.ts +3 -4
  149. package/dist/react/core/display/GlassCard.js +416 -369
  150. package/dist/react/core/display/GlassCard.js.map +1 -1
  151. package/dist/react/core/display/HeaderIconWithStatus.d.ts +0 -1
  152. package/dist/react/core/display/HeaderIconWithStatus.js +152 -152
  153. package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -1
  154. package/dist/react/core/display/Icon.d.ts +2 -3
  155. package/dist/react/core/display/Icon.js +172 -143
  156. package/dist/react/core/display/Icon.js.map +1 -1
  157. package/dist/react/core/display/Typography.d.ts +24 -25
  158. package/dist/react/core/display/Typography.js +360 -178
  159. package/dist/react/core/display/Typography.js.map +1 -1
  160. package/dist/react/core/feedback/ConfirmDialog.d.ts +1 -2
  161. package/dist/react/core/feedback/ConfirmDialog.js +343 -304
  162. package/dist/react/core/feedback/ConfirmDialog.js.map +1 -1
  163. package/dist/react/core/feedback/Dialog.d.ts +2 -3
  164. package/dist/react/core/feedback/Dialog.js +189 -197
  165. package/dist/react/core/feedback/Dialog.js.map +1 -1
  166. package/dist/react/core/feedback/Toast.d.ts +2 -3
  167. package/dist/react/core/feedback/Toast.js +346 -207
  168. package/dist/react/core/feedback/Toast.js.map +1 -1
  169. package/dist/react/core/index.d.ts +26 -26
  170. package/dist/react/core/index.js +7 -119
  171. package/dist/react/core/inputs/Button.d.ts +2 -3
  172. package/dist/react/core/inputs/Button.js +281 -304
  173. package/dist/react/core/inputs/Button.js.map +1 -1
  174. package/dist/react/core/inputs/Checkbox.d.ts +2 -3
  175. package/dist/react/core/inputs/Checkbox.js +139 -127
  176. package/dist/react/core/inputs/Checkbox.js.map +1 -1
  177. package/dist/react/core/inputs/Input.d.ts +3 -4
  178. package/dist/react/core/inputs/Input.js +277 -285
  179. package/dist/react/core/inputs/Input.js.map +1 -1
  180. package/dist/react/core/inputs/LimitsBar.d.ts +1 -2
  181. package/dist/react/core/inputs/LimitsBar.js +271 -196
  182. package/dist/react/core/inputs/LimitsBar.js.map +1 -1
  183. package/dist/react/core/inputs/NumberInput.d.ts +2 -3
  184. package/dist/react/core/inputs/NumberInput.js +531 -503
  185. package/dist/react/core/inputs/NumberInput.js.map +1 -1
  186. package/dist/react/core/inputs/PinInput.d.ts +2 -3
  187. package/dist/react/core/inputs/PinInput.js +224 -207
  188. package/dist/react/core/inputs/PinInput.js.map +1 -1
  189. package/dist/react/core/inputs/Select.d.ts +1 -2
  190. package/dist/react/core/inputs/Select.js +298 -299
  191. package/dist/react/core/inputs/Select.js.map +1 -1
  192. package/dist/react/core/inputs/Toggle.d.ts +2 -3
  193. package/dist/react/core/inputs/Toggle.js +142 -148
  194. package/dist/react/core/inputs/Toggle.js.map +1 -1
  195. package/dist/react/core/layout/Box.d.ts +3 -4
  196. package/dist/react/core/layout/Box.js +118 -122
  197. package/dist/react/core/layout/Box.js.map +1 -1
  198. package/dist/react/core/layout/Center.d.ts +0 -1
  199. package/dist/react/core/layout/Center.js +45 -32
  200. package/dist/react/core/layout/Center.js.map +1 -1
  201. package/dist/react/core/layout/Divider.d.ts +1 -2
  202. package/dist/react/core/layout/Divider.js +112 -106
  203. package/dist/react/core/layout/Divider.js.map +1 -1
  204. package/dist/react/core/layout/Flex.d.ts +4 -5
  205. package/dist/react/core/layout/Flex.js +120 -124
  206. package/dist/react/core/layout/Flex.js.map +1 -1
  207. package/dist/react/core/layout/Grid.d.ts +5 -6
  208. package/dist/react/core/layout/Grid.js +131 -138
  209. package/dist/react/core/layout/Grid.js.map +1 -1
  210. package/dist/react/core/layout/Spacer.d.ts +0 -1
  211. package/dist/react/core/layout/Spacer.js +36 -29
  212. package/dist/react/core/layout/Spacer.js.map +1 -1
  213. package/dist/react/core/layout/Stack.d.ts +4 -5
  214. package/dist/react/core/layout/Stack.js +127 -70
  215. package/dist/react/core/layout/Stack.js.map +1 -1
  216. package/dist/react/core/layout/responsive.d.ts +1 -2
  217. package/dist/react/core/layout/responsive.js +25 -19
  218. package/dist/react/core/layout/responsive.js.map +1 -1
  219. package/dist/react/core/layout/useBreakpoint.d.ts +1 -1
  220. package/dist/react/core/layout/useBreakpoint.js +119 -66
  221. package/dist/react/core/layout/useBreakpoint.js.map +1 -1
  222. package/dist/react/core/navigation/AppBar.d.ts +1 -2
  223. package/dist/react/core/navigation/AppBar.js +827 -805
  224. package/dist/react/core/navigation/AppBar.js.map +1 -1
  225. package/dist/react/core/navigation/Pagination.d.ts +2 -3
  226. package/dist/react/core/navigation/Pagination.js +207 -187
  227. package/dist/react/core/navigation/Pagination.js.map +1 -1
  228. package/dist/react/core/navigation/SideNav.d.ts +5 -6
  229. package/dist/react/core/navigation/SideNav.js +855 -629
  230. package/dist/react/core/navigation/SideNav.js.map +1 -1
  231. package/dist/react/core/navigation/Tabs.d.ts +0 -1
  232. package/dist/react/core/navigation/Tabs.js +113 -119
  233. package/dist/react/core/navigation/Tabs.js.map +1 -1
  234. package/dist/react/core/overlays/Popover.d.ts +2 -3
  235. package/dist/react/core/overlays/Popover.js +303 -282
  236. package/dist/react/core/overlays/Popover.js.map +1 -1
  237. package/dist/react/core/overlays/SidePanel.d.ts +1 -2
  238. package/dist/react/core/overlays/SidePanel.js +217 -212
  239. package/dist/react/core/overlays/SidePanel.js.map +1 -1
  240. package/dist/react/core/overlays/Tooltip.d.ts +1 -2
  241. package/dist/react/core/overlays/Tooltip.js +170 -176
  242. package/dist/react/core/overlays/Tooltip.js.map +1 -1
  243. package/dist/react/core/widgets/ActivityPlanner.d.ts +0 -1
  244. package/dist/react/core/widgets/ActivityPlanner.js +855 -517
  245. package/dist/react/core/widgets/ActivityPlanner.js.map +1 -1
  246. package/dist/react/core/widgets/Capture.d.ts +2 -3
  247. package/dist/react/core/widgets/Capture.js +965 -779
  248. package/dist/react/core/widgets/Capture.js.map +1 -1
  249. package/dist/react/core/widgets/ChatPanel.d.ts +16 -17
  250. package/dist/react/core/widgets/ChatPanel.js +1734 -1034
  251. package/dist/react/core/widgets/ChatPanel.js.map +1 -1
  252. package/dist/react/core/widgets/ColorPickerPanel.d.ts +0 -1
  253. package/dist/react/core/widgets/ColorPickerPanel.js +298 -287
  254. package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -1
  255. package/dist/react/core/widgets/CommandBuilder.d.ts +2 -3
  256. package/dist/react/core/widgets/CommandBuilder.js +624 -516
  257. package/dist/react/core/widgets/CommandBuilder.js.map +1 -1
  258. package/dist/react/core/widgets/ConnectionForm.d.ts +2 -3
  259. package/dist/react/core/widgets/ConnectionForm.js +528 -492
  260. package/dist/react/core/widgets/ConnectionForm.js.map +1 -1
  261. package/dist/react/core/widgets/FileExplorer.d.ts +3 -4
  262. package/dist/react/core/widgets/FileExplorer.js +617 -505
  263. package/dist/react/core/widgets/FileExplorer.js.map +1 -1
  264. package/dist/react/core/widgets/HexViewer.d.ts +2 -3
  265. package/dist/react/core/widgets/HexViewer.js +1353 -1091
  266. package/dist/react/core/widgets/HexViewer.js.map +1 -1
  267. package/dist/react/core/widgets/ImageFrame.d.ts +1 -2
  268. package/dist/react/core/widgets/ImageFrame.js +230 -193
  269. package/dist/react/core/widgets/ImageFrame.js.map +1 -1
  270. package/dist/react/core/widgets/ImageGallery.d.ts +2 -1
  271. package/dist/react/core/widgets/ImageGallery.js +380 -314
  272. package/dist/react/core/widgets/ImageGallery.js.map +1 -1
  273. package/dist/react/core/widgets/ImagePanel.d.ts +0 -1
  274. package/dist/react/core/widgets/ImagePanel.js +110 -101
  275. package/dist/react/core/widgets/ImagePanel.js.map +1 -1
  276. package/dist/react/core/widgets/LogViewer.d.ts +2 -3
  277. package/dist/react/core/widgets/LogViewer.js +711 -607
  278. package/dist/react/core/widgets/LogViewer.js.map +1 -1
  279. package/dist/react/core/widgets/MessageStream.d.ts +3 -4
  280. package/dist/react/core/widgets/MessageStream.js +514 -444
  281. package/dist/react/core/widgets/MessageStream.js.map +1 -1
  282. package/dist/react/core/widgets/MissionCalendar.d.ts +3 -4
  283. package/dist/react/core/widgets/MissionCalendar.js +1488 -1020
  284. package/dist/react/core/widgets/MissionCalendar.js.map +1 -1
  285. package/dist/react/core/widgets/PacketViewer.d.ts +2 -3
  286. package/dist/react/core/widgets/PacketViewer.js +550 -421
  287. package/dist/react/core/widgets/PacketViewer.js.map +1 -1
  288. package/dist/react/core/widgets/capture-placeholder.png.js +6 -5
  289. package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -1
  290. package/dist/react/hooks/index.d.ts +5 -5
  291. package/dist/react/hooks/useAccessWindows.d.ts +0 -1
  292. package/dist/react/hooks/useCompactMode.d.ts +1 -1
  293. package/dist/react/hooks/useCompactMode.js +104 -58
  294. package/dist/react/hooks/useCompactMode.js.map +1 -1
  295. package/dist/react/hooks/useGroundTrackHistory.d.ts +0 -1
  296. package/dist/react/hooks/useSimulationScene.d.ts +1 -2
  297. package/dist/react/hooks/useSimulationScene.js +481 -374
  298. package/dist/react/hooks/useSimulationScene.js.map +1 -1
  299. package/dist/react/index.d.ts +3 -3
  300. package/dist/react/panels/LayerControlPanel.d.ts +1 -2
  301. package/dist/react/panels/LayerControlPanel.js +223 -180
  302. package/dist/react/panels/LayerControlPanel.js.map +1 -1
  303. package/dist/react/panels/ObjectInventoryPanel.d.ts +2 -3
  304. package/dist/react/panels/ObjectInventoryPanel.js +315 -250
  305. package/dist/react/panels/ObjectInventoryPanel.js.map +1 -1
  306. package/dist/react/panels/index.d.ts +1 -1
  307. package/dist/react/panels/index.js +1 -6
  308. package/dist/react/shared/ErrorBoundary.d.ts +1 -2
  309. package/dist/react/shared/ErrorBoundary.js +170 -139
  310. package/dist/react/shared/ErrorBoundary.js.map +1 -1
  311. package/dist/react/shared/Skeleton.d.ts +1 -2
  312. package/dist/react/shared/Skeleton.js +300 -301
  313. package/dist/react/shared/Skeleton.js.map +1 -1
  314. package/dist/react/theme/ThemeProvider.d.ts +2 -321
  315. package/dist/react/theme/ThemeProvider.js +312 -939
  316. package/dist/react/theme/ThemeProvider.js.map +1 -1
  317. package/dist/react/theme/cardAccent.d.ts +1 -2
  318. package/dist/react/theme/cardAccent.js +196 -126
  319. package/dist/react/theme/cardAccent.js.map +1 -1
  320. package/dist/react/theme/config.d.ts +0 -1
  321. package/dist/react/theme/config.js +47 -25
  322. package/dist/react/theme/config.js.map +1 -1
  323. package/dist/react/theme/index.d.ts +2 -2
  324. package/dist/react/theme/index.js +1 -16
  325. package/dist/react/theme/types.d.ts +332 -0
  326. package/dist/react/theme/types.js +39 -0
  327. package/dist/react/theme/types.js.map +1 -0
  328. package/dist/react/types.d.ts +8 -8
  329. package/dist/react/types.js +147 -47
  330. package/dist/react/types.js.map +1 -1
  331. package/dist/react/utils/categoryPalette.d.ts +0 -1
  332. package/dist/react/utils/categoryPalette.js +91 -102
  333. package/dist/react/utils/categoryPalette.js.map +1 -1
  334. package/dist/react/utils/index.d.ts +5 -5
  335. package/dist/react/utils/index.js +457 -371
  336. package/dist/react/utils/index.js.map +1 -1
  337. package/dist/react/visualizations/EclipseTimerCard.d.ts +0 -1
  338. package/dist/react/visualizations/LinkBudgetCard.d.ts +0 -1
  339. package/dist/react/visualizations/NavBallCard.d.ts +0 -1
  340. package/dist/react/visualizations/PropulsionCard.d.ts +1 -2
  341. package/dist/react/visualizations/SensorFootprintCard.d.ts +1 -2
  342. package/dist/react/visualizations/ThermalHeatmapCard.d.ts +0 -1
  343. package/dist/react/visualizations/index.d.ts +3 -3
  344. package/dist/react.d.ts +2 -1
  345. package/dist/react.js +17 -221
  346. package/dist/shaders/atmosphere.frag.js +6 -5
  347. package/dist/shaders/atmosphere.frag.js.map +1 -1
  348. package/dist/shaders/atmosphere.vert.js +6 -5
  349. package/dist/shaders/atmosphere.vert.js.map +1 -1
  350. package/dist/shaders/stars.frag.js +6 -5
  351. package/dist/shaders/stars.frag.js.map +1 -1
  352. package/dist/shaders/stars.vert.js +6 -5
  353. package/dist/shaders/stars.vert.js.map +1 -1
  354. package/dist/style.css +217 -194
  355. package/dist/tokens/core.d.ts +159 -0
  356. package/dist/tokens/core.js +144 -0
  357. package/dist/tokens/core.js.map +1 -0
  358. package/dist/tokens/css-vars.d.ts +213 -2
  359. package/dist/tokens/css-vars.js +590 -227
  360. package/dist/tokens/css-vars.js.map +1 -1
  361. package/dist/tokens/index.d.ts +31 -228
  362. package/dist/tokens/index.js +281 -366
  363. package/dist/tokens/index.js.map +1 -1
  364. package/dist/tokens/palettes/astro.d.ts +129 -0
  365. package/dist/tokens/palettes/astro.js +112 -0
  366. package/dist/tokens/palettes/astro.js.map +1 -0
  367. package/dist/tokens/palettes/index.d.ts +288 -0
  368. package/dist/tokens/palettes/index.js +35 -0
  369. package/dist/tokens/palettes/index.js.map +1 -0
  370. package/dist/tokens/palettes/tailwind.d.ts +324 -0
  371. package/dist/tokens/palettes/tailwind.js +201 -0
  372. package/dist/tokens/palettes/tailwind.js.map +1 -0
  373. package/dist/tokens/palettes/zendir.d.ts +126 -0
  374. package/dist/tokens/palettes/zendir.js +92 -0
  375. package/dist/tokens/palettes/zendir.js.map +1 -0
  376. package/dist/tokens/themes.d.ts +30 -0
  377. package/dist/tokens/themes.js +704 -0
  378. package/dist/tokens/themes.js.map +1 -0
  379. package/dist/tokens/tokens.css +419 -41
  380. package/dist/types/index.d.ts +2 -2
  381. package/package.json +310 -313
  382. package/dist/index.js.map +0 -1
  383. package/dist/react/3d/index.js.map +0 -1
  384. package/dist/react/astro/index.js.map +0 -1
  385. package/dist/react/cards/index.js.map +0 -1
  386. package/dist/react/charts/index.js.map +0 -1
  387. package/dist/react/core/index.js.map +0 -1
  388. package/dist/react/panels/index.js.map +0 -1
  389. package/dist/react/theme/astro-tokens.d.ts +0 -153
  390. package/dist/react/theme/index.js.map +0 -1
  391. package/dist/react.js.map +0 -1
@@ -1,375 +1,422 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { memo } from "react";
3
1
  import { useTheme } from "../../theme/ThemeProvider.js";
4
2
  import { classNames } from "../../utils/index.js";
5
- const GLASS_COLOR_OVERLAYS = {
6
- // Core brand colors
7
- electric: {
8
- gradient: "linear-gradient(135deg, rgba(62, 60, 255, 0.15) 0%, rgba(62, 60, 255, 0.05) 100%)",
9
- accent: "#3E3CFF",
10
- border: "rgba(62, 60, 255, 0.3)",
11
- glow: "rgba(62, 60, 255, 0.4)"
12
- },
13
- purple: {
14
- gradient: "linear-gradient(135deg, rgba(157, 112, 255, 0.15) 0%, rgba(157, 112, 255, 0.05) 100%)",
15
- accent: "#9D70FF",
16
- border: "rgba(157, 112, 255, 0.3)",
17
- glow: "rgba(157, 112, 255, 0.4)"
18
- },
19
- prussianBlue: {
20
- gradient: "linear-gradient(135deg, rgba(27, 45, 160, 0.2) 0%, rgba(27, 45, 160, 0.08) 100%)",
21
- accent: "#1B2DA0",
22
- border: "rgba(27, 45, 160, 0.4)",
23
- glow: "rgba(27, 45, 160, 0.5)"
24
- },
25
- // Cyan/Teal (matching the reference image style)
26
- cyan: {
27
- gradient: "linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(0, 180, 220, 0.04) 100%)",
28
- accent: "#00D4FF",
29
- border: "rgba(0, 212, 255, 0.35)",
30
- glow: "rgba(0, 212, 255, 0.5)"
31
- },
32
- teal: {
33
- gradient: "linear-gradient(135deg, rgba(45, 204, 255, 0.12) 0%, rgba(45, 204, 255, 0.04) 100%)",
34
- accent: "#2DCCFF",
35
- border: "rgba(45, 204, 255, 0.35)",
36
- glow: "rgba(45, 204, 255, 0.5)"
37
- },
38
- // Neutral options
39
- dark: {
40
- gradient: "linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%)",
41
- accent: "#1a1a2e",
42
- border: "rgba(255, 255, 255, 0.1)",
43
- glow: "rgba(0, 0, 0, 0.3)"
44
- },
45
- light: {
46
- gradient: "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)",
47
- accent: "#ffffff",
48
- border: "rgba(255, 255, 255, 0.25)",
49
- glow: "rgba(255, 255, 255, 0.3)"
50
- },
51
- white: {
52
- gradient: "linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%)",
53
- accent: "#ffffff",
54
- border: "rgba(255, 255, 255, 0.3)",
55
- glow: "rgba(255, 255, 255, 0.4)"
56
- },
57
- // Additional shades
58
- electricLight: {
59
- gradient: "linear-gradient(135deg, rgba(107, 105, 255, 0.15) 0%, rgba(107, 105, 255, 0.05) 100%)",
60
- accent: "#6B69FF",
61
- border: "rgba(107, 105, 255, 0.3)",
62
- glow: "rgba(107, 105, 255, 0.4)"
63
- },
64
- purpleLight: {
65
- gradient: "linear-gradient(135deg, rgba(180, 141, 255, 0.15) 0%, rgba(180, 141, 255, 0.05) 100%)",
66
- accent: "#B48DFF",
67
- border: "rgba(180, 141, 255, 0.3)",
68
- glow: "rgba(180, 141, 255, 0.4)"
69
- },
70
- // No overlay (transparent)
71
- none: {
72
- gradient: "none",
73
- accent: "transparent",
74
- border: "rgba(255, 255, 255, 0.1)",
75
- glow: "transparent"
76
- }
3
+ import { memo } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/react/core/display/GlassCard.tsx
6
+ /**
7
+ * @zendir/ui - GlassCard Component
8
+ *
9
+ * Glassmorphic card component with transparent blur backgrounds,
10
+ * gradient overlays, and Zendir brand color accent system.
11
+ *
12
+ * Inspired by AstroUXDS radar chart styling with modern glassmorphism.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <GlassCard title="Radar Chart 001" colorOverlay="electric">
17
+ * <RadarChart data={data} />
18
+ * </GlassCard>
19
+ *
20
+ * <GlassCard title="System Status" colorOverlay="purple" accentPosition="top">
21
+ * <StatusContent />
22
+ * </GlassCard>
23
+ * ```
24
+ */
25
+ var GLASS_COLOR_OVERLAYS = {
26
+ electric: {
27
+ gradient: "linear-gradient(135deg, rgba(62, 60, 255, 0.15) 0%, rgba(62, 60, 255, 0.05) 100%)",
28
+ accent: "#3E3CFF",
29
+ border: "rgba(62, 60, 255, 0.3)",
30
+ glow: "rgba(62, 60, 255, 0.4)"
31
+ },
32
+ purple: {
33
+ gradient: "linear-gradient(135deg, rgba(157, 112, 255, 0.15) 0%, rgba(157, 112, 255, 0.05) 100%)",
34
+ accent: "#9D70FF",
35
+ border: "rgba(157, 112, 255, 0.3)",
36
+ glow: "rgba(157, 112, 255, 0.4)"
37
+ },
38
+ prussianBlue: {
39
+ gradient: "linear-gradient(135deg, rgba(27, 45, 160, 0.2) 0%, rgba(27, 45, 160, 0.08) 100%)",
40
+ accent: "#1B2DA0",
41
+ border: "rgba(27, 45, 160, 0.4)",
42
+ glow: "rgba(27, 45, 160, 0.5)"
43
+ },
44
+ cyan: {
45
+ gradient: "linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(0, 180, 220, 0.04) 100%)",
46
+ accent: "#00D4FF",
47
+ border: "rgba(0, 212, 255, 0.35)",
48
+ glow: "rgba(0, 212, 255, 0.5)"
49
+ },
50
+ teal: {
51
+ gradient: "linear-gradient(135deg, rgba(45, 204, 255, 0.12) 0%, rgba(45, 204, 255, 0.04) 100%)",
52
+ accent: "#2DCCFF",
53
+ border: "rgba(45, 204, 255, 0.35)",
54
+ glow: "rgba(45, 204, 255, 0.5)"
55
+ },
56
+ dark: {
57
+ gradient: "linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%)",
58
+ accent: "#1a1a2e",
59
+ border: "rgba(255, 255, 255, 0.1)",
60
+ glow: "rgba(0, 0, 0, 0.3)"
61
+ },
62
+ light: {
63
+ gradient: "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)",
64
+ accent: "#ffffff",
65
+ border: "rgba(255, 255, 255, 0.25)",
66
+ glow: "rgba(255, 255, 255, 0.3)"
67
+ },
68
+ white: {
69
+ gradient: "linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%)",
70
+ accent: "#ffffff",
71
+ border: "rgba(255, 255, 255, 0.3)",
72
+ glow: "rgba(255, 255, 255, 0.4)"
73
+ },
74
+ electricLight: {
75
+ gradient: "linear-gradient(135deg, rgba(107, 105, 255, 0.15) 0%, rgba(107, 105, 255, 0.05) 100%)",
76
+ accent: "#6B69FF",
77
+ border: "rgba(107, 105, 255, 0.3)",
78
+ glow: "rgba(107, 105, 255, 0.4)"
79
+ },
80
+ purpleLight: {
81
+ gradient: "linear-gradient(135deg, rgba(180, 141, 255, 0.15) 0%, rgba(180, 141, 255, 0.05) 100%)",
82
+ accent: "#B48DFF",
83
+ border: "rgba(180, 141, 255, 0.3)",
84
+ glow: "rgba(180, 141, 255, 0.4)"
85
+ },
86
+ none: {
87
+ gradient: "none",
88
+ accent: "transparent",
89
+ border: "rgba(255, 255, 255, 0.1)",
90
+ glow: "transparent"
91
+ }
77
92
  };
93
+ /**
94
+ * GlassCard - Glassmorphic card with Zendir brand styling
95
+ *
96
+ * Features:
97
+ * - Transparent blur background
98
+ * - Gradient color overlays
99
+ * - Accent lines with glow effects
100
+ * - Legend support for charts
101
+ * - Customizable via props or custom overlay object
102
+ */
103
+ /**
104
+ * Create overlay from accent color hex
105
+ */
78
106
  function createOverlayFromColor(color) {
79
- const hex = color.replace("#", "");
80
- const r = parseInt(hex.substring(0, 2), 16);
81
- const g = parseInt(hex.substring(2, 4), 16);
82
- const b = parseInt(hex.substring(4, 6), 16);
83
- return {
84
- gradient: `linear-gradient(135deg, rgba(${r}, ${g}, ${b}, 0.15) 0%, rgba(${r}, ${g}, ${b}, 0.05) 100%)`,
85
- accent: color,
86
- border: `rgba(${r}, ${g}, ${b}, 0.35)`,
87
- glow: `rgba(${r}, ${g}, ${b}, 0.5)`
88
- };
107
+ const hex = color.replace("#", "");
108
+ const r = parseInt(hex.substring(0, 2), 16);
109
+ const g = parseInt(hex.substring(2, 4), 16);
110
+ const b = parseInt(hex.substring(4, 6), 16);
111
+ return {
112
+ gradient: `linear-gradient(135deg, rgba(${r}, ${g}, ${b}, 0.15) 0%, rgba(${r}, ${g}, ${b}, 0.05) 100%)`,
113
+ accent: color,
114
+ border: `rgba(${r}, ${g}, ${b}, 0.35)`,
115
+ glow: `rgba(${r}, ${g}, ${b}, 0.5)`
116
+ };
89
117
  }
90
- const GlassCard = memo(function GlassCard2({
91
- title,
92
- subtitle,
93
- colorOverlay = "cyan",
94
- customOverlay,
95
- accentColor,
96
- accentPosition = "top",
97
- accentStyle = "gradient",
98
- icon,
99
- actions,
100
- legend,
101
- status,
102
- blur = 12,
103
- backgroundOpacity = 0.85,
104
- glowOnHover = true,
105
- children,
106
- className = "",
107
- style,
108
- onClick,
109
- fullHeight = false,
110
- padding = "md"
111
- }) {
112
- var _a, _b, _c, _d, _e, _f;
113
- const { tokens, mode, theme } = useTheme();
114
- const isDark = mode === "dark";
115
- const isTransparent = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
116
- const isBoldVariant = theme === "transparent-bold";
117
- const isMinimalVariant = theme === "transparent-minimal";
118
- const showAccentStyling = isBoldVariant || isMinimalVariant || !isTransparent;
119
- const effectiveColorOverlay = isTransparent && colorOverlay === "cyan" ? "purple" : colorOverlay;
120
- const overlay = accentColor ? createOverlayFromColor(accentColor) : customOverlay || GLASS_COLOR_OVERLAYS[effectiveColorOverlay];
121
- const effectiveOverlay = mode === "light" && colorOverlay === "white" && !accentColor && !customOverlay ? GLASS_COLOR_OVERLAYS.dark : overlay;
122
- const cardBackground = isDark ? `rgba(15, 20, 35, ${backgroundOpacity})` : `rgba(255, 255, 255, ${backgroundOpacity})`;
123
- const baseBorderColor = isDark ? effectiveOverlay.border : `rgba(100, 116, 139, 0.25)`;
124
- const paddingConfig = {
125
- none: "0",
126
- sm: tokens.spacing.sm,
127
- md: tokens.spacing.md,
128
- lg: tokens.spacing.lg
129
- };
130
- const isInteractive = !!onClick;
131
- const getAccentStyles = () => {
132
- if (isTransparent && !showAccentStyling) {
133
- return {};
134
- }
135
- if (accentPosition === "none") return {};
136
- const accentColorValue = effectiveOverlay.accent;
137
- const glowColor = effectiveOverlay.glow || accentColorValue;
138
- const baseAccentStyle = {};
139
- const positions = {
140
- top: "borderTop",
141
- left: "borderLeft",
142
- right: "borderRight",
143
- bottom: "borderBottom",
144
- none: ""
145
- };
146
- const borderProp = positions[accentPosition];
147
- if (accentStyle === "solid") {
148
- baseAccentStyle[borderProp] = `2px solid ${accentColorValue}`;
149
- } else if (accentStyle === "gradient" || accentStyle === "glow") {
150
- baseAccentStyle[borderProp] = `2px solid ${accentColorValue}`;
151
- if (accentStyle === "glow") {
152
- baseAccentStyle.boxShadow = `0 -2px 20px ${glowColor}, 0 -1px 8px ${glowColor}`;
153
- }
154
- } else if (accentStyle === "dots") {
155
- baseAccentStyle[borderProp] = `2px dotted ${accentColorValue}`;
156
- }
157
- return baseAccentStyle;
158
- };
159
- const statusColor = status ? tokens.colors.status[status] : void 0;
160
- return /* @__PURE__ */ jsxs(
161
- "div",
162
- {
163
- className: classNames("zendir-glass-card", `zendir-glass-card--${colorOverlay}`, className),
164
- onClick,
165
- role: isInteractive ? "button" : void 0,
166
- tabIndex: isInteractive ? 0 : void 0,
167
- onKeyDown: onClick ? (e) => {
168
- if (e.key === "Enter" || e.key === " ") {
169
- e.preventDefault();
170
- onClick();
171
- }
172
- } : void 0,
173
- style: {
174
- position: "relative",
175
- borderRadius: tokens.borderRadius.lg,
176
- overflow: "hidden",
177
- height: fullHeight ? "100%" : "auto",
178
- display: "flex",
179
- flexDirection: "column",
180
- cursor: isInteractive ? "pointer" : "default",
181
- // Glassmorphic base (theme-aware)
182
- background: cardBackground,
183
- backdropFilter: isTransparent ? `blur(${blur}px)` : "none",
184
- WebkitBackdropFilter: isTransparent ? `blur(${blur}px)` : "none",
185
- // Border with color tint (theme-aware)
186
- border: `1px solid ${baseBorderColor}`,
187
- // Accent positioning
188
- ...getAccentStyles(),
189
- // Hover glow effect
190
- transition: "all 0.3s ease-out",
191
- boxShadow: glowOnHover ? "none" : void 0,
192
- ...style
193
- },
194
- onMouseEnter: (e) => {
195
- if (glowOnHover && effectiveOverlay.glow) {
196
- e.currentTarget.style.boxShadow = `0 0 30px ${effectiveOverlay.glow}, 0 4px 20px rgba(0,0,0,0.3)`;
197
- }
198
- },
199
- onMouseLeave: (e) => {
200
- if (glowOnHover) {
201
- e.currentTarget.style.boxShadow = "none";
202
- }
203
- },
204
- children: [
205
- /* @__PURE__ */ jsx(
206
- "div",
207
- {
208
- style: {
209
- position: "absolute",
210
- inset: 0,
211
- background: effectiveOverlay.gradient,
212
- pointerEvents: "none",
213
- zIndex: 0
214
- }
215
- }
216
- ),
217
- showAccentStyling && accentPosition === "top" && accentStyle === "glow" && /* @__PURE__ */ jsx(
218
- "div",
219
- {
220
- style: {
221
- position: "absolute",
222
- top: 0,
223
- left: "10%",
224
- right: "10%",
225
- height: "2px",
226
- background: `linear-gradient(90deg, transparent, ${effectiveOverlay.accent}, transparent)`,
227
- boxShadow: `0 0 15px ${effectiveOverlay.glow}, 0 0 30px ${effectiveOverlay.glow}`,
228
- zIndex: 1
229
- }
230
- }
231
- ),
232
- /* @__PURE__ */ jsxs("div", { style: { position: "relative", zIndex: 1, display: "flex", flexDirection: "column", flex: 1 }, children: [
233
- (title || actions || legend) && /* @__PURE__ */ jsxs(
234
- "div",
235
- {
236
- style: {
237
- display: "flex",
238
- alignItems: "center",
239
- justifyContent: "space-between",
240
- gap: tokens.spacing.md,
241
- padding: `${paddingConfig[padding]} ${paddingConfig[padding]} 0`,
242
- marginBottom: tokens.spacing.sm
243
- },
244
- children: [
245
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.sm }, children: [
246
- icon && /* @__PURE__ */ jsx("span", { style: { color: effectiveOverlay.accent, display: "flex", alignItems: "center" }, children: icon }),
247
- status && statusColor && (() => {
248
- const s = 10;
249
- const h = s / 2;
250
- const glow = `drop-shadow(0 0 4px ${statusColor})`;
251
- switch (status) {
252
- case "critical":
253
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("polygon", { points: `${h},${s} 0,0 ${s},0`, fill: statusColor }) });
254
- case "serious":
255
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("polygon", { points: `${h},0 ${s},${h} ${h},${s} 0,${h}`, fill: statusColor }) });
256
- case "caution":
257
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("rect", { width: s, height: s, fill: statusColor }) });
258
- case "standby":
259
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: "0 0 12 12", style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "3.5", fill: "none", stroke: statusColor, strokeWidth: "2" }) });
260
- case "off":
261
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: "0 0 12 12", style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "3", fill: statusColor }) });
262
- default:
263
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: { flexShrink: 0, filter: glow }, children: /* @__PURE__ */ jsx("circle", { cx: h, cy: h, r: h, fill: statusColor }) });
264
- }
265
- })(),
266
- /* @__PURE__ */ jsxs("div", { children: [
267
- title && /* @__PURE__ */ jsx(
268
- "h3",
269
- {
270
- style: {
271
- margin: 0,
272
- fontSize: ((_c = (_b = (_a = tokens.layout) == null ? void 0 : _a.card) == null ? void 0 : _b.heading) == null ? void 0 : _c.titleFontSize) ?? "1.125rem",
273
- fontWeight: ((_f = (_e = (_d = tokens.layout) == null ? void 0 : _d.card) == null ? void 0 : _e.heading) == null ? void 0 : _f.titleFontWeight) ?? 500,
274
- color: effectiveOverlay.accent,
275
- letterSpacing: "0.5px",
276
- textShadow: `0 0 20px ${effectiveOverlay.glow}`
277
- },
278
- children: title
279
- }
280
- ),
281
- subtitle && /* @__PURE__ */ jsx(
282
- "p",
283
- {
284
- style: {
285
- margin: `${tokens.spacing.xs} 0 0`,
286
- fontSize: tokens.typography.body[3].fontSize,
287
- color: tokens.colors.text.secondary
288
- },
289
- children: subtitle
290
- }
291
- )
292
- ] })
293
- ] }),
294
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.md }, children: [
295
- legend && legend.length > 0 && /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.md }, children: legend.map((item, idx) => /* @__PURE__ */ jsxs(
296
- "div",
297
- {
298
- style: {
299
- display: "flex",
300
- alignItems: "center",
301
- gap: tokens.spacing.xs
302
- },
303
- children: [
304
- /* @__PURE__ */ jsx(
305
- "span",
306
- {
307
- style: {
308
- width: "8px",
309
- height: "8px",
310
- borderRadius: "2px",
311
- backgroundColor: item.color
312
- }
313
- }
314
- ),
315
- /* @__PURE__ */ jsx(
316
- "span",
317
- {
318
- style: {
319
- fontSize: tokens.typography.body[3].fontSize,
320
- color: tokens.colors.text.secondary
321
- },
322
- children: item.label
323
- }
324
- )
325
- ]
326
- },
327
- idx
328
- )) }),
329
- actions && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: tokens.spacing.xs }, children: actions })
330
- ] })
331
- ]
332
- }
333
- ),
334
- showAccentStyling && accentPosition === "top" && /* @__PURE__ */ jsx(
335
- "div",
336
- {
337
- style: {
338
- display: "flex",
339
- alignItems: "center",
340
- padding: `0 ${paddingConfig[padding]}`,
341
- marginBottom: tokens.spacing.sm
342
- },
343
- children: /* @__PURE__ */ jsx(
344
- "div",
345
- {
346
- style: {
347
- flex: 1,
348
- height: "2px",
349
- background: `linear-gradient(90deg, ${effectiveOverlay.accent} 0%, ${effectiveOverlay.accent}60 70%, ${effectiveOverlay.accent}20 100%)`,
350
- boxShadow: `0 0 6px ${effectiveOverlay.accent}40`
351
- }
352
- }
353
- )
354
- }
355
- ),
356
- /* @__PURE__ */ jsx(
357
- "div",
358
- {
359
- style: {
360
- flex: 1,
361
- padding: title ? `0 ${paddingConfig[padding]} ${paddingConfig[padding]}` : paddingConfig[padding]
362
- },
363
- children
364
- }
365
- )
366
- ] })
367
- ]
368
- }
369
- );
118
+ var GlassCard = memo(function GlassCard({ title, subtitle, colorOverlay = "cyan", customOverlay, accentColor, accentPosition = "top", accentStyle = "gradient", icon, actions, legend, status, blur = 12, backgroundOpacity = .85, glowOnHover = true, children, className = "", style, onClick, fullHeight = false, padding = "md" }) {
119
+ const { tokens, mode, theme } = useTheme();
120
+ const isDark = mode === "dark";
121
+ const isTransparent = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
122
+ const showAccentStyling = theme === "transparent-bold" || theme === "transparent-minimal" || !isTransparent;
123
+ const overlay = accentColor ? createOverlayFromColor(accentColor) : customOverlay || GLASS_COLOR_OVERLAYS[isTransparent && colorOverlay === "cyan" ? "purple" : colorOverlay];
124
+ const effectiveOverlay = mode === "light" && colorOverlay === "white" && !accentColor && !customOverlay ? GLASS_COLOR_OVERLAYS.dark : overlay;
125
+ const cardBackground = isDark ? `rgba(15, 20, 35, ${backgroundOpacity})` : `rgba(255, 255, 255, ${backgroundOpacity})`;
126
+ const baseBorderColor = isDark ? effectiveOverlay.border : `rgba(100, 116, 139, 0.25)`;
127
+ const paddingConfig = {
128
+ none: "0",
129
+ sm: tokens.spacing.sm,
130
+ md: tokens.spacing.md,
131
+ lg: tokens.spacing.lg
132
+ };
133
+ const isInteractive = !!onClick;
134
+ const getAccentStyles = () => {
135
+ if (isTransparent && !showAccentStyling) return {};
136
+ if (accentPosition === "none") return {};
137
+ const accentColorValue = effectiveOverlay.accent;
138
+ const glowColor = effectiveOverlay.glow || accentColorValue;
139
+ const baseAccentStyle = {};
140
+ const borderProp = {
141
+ top: "borderTop",
142
+ left: "borderLeft",
143
+ right: "borderRight",
144
+ bottom: "borderBottom",
145
+ none: ""
146
+ }[accentPosition];
147
+ if (accentStyle === "solid") baseAccentStyle[borderProp] = `2px solid ${accentColorValue}`;
148
+ else if (accentStyle === "gradient" || accentStyle === "glow") {
149
+ baseAccentStyle[borderProp] = `2px solid ${accentColorValue}`;
150
+ if (accentStyle === "glow") baseAccentStyle.boxShadow = `0 -2px 20px ${glowColor}, 0 -1px 8px ${glowColor}`;
151
+ } else if (accentStyle === "dots") baseAccentStyle[borderProp] = `2px dotted ${accentColorValue}`;
152
+ return baseAccentStyle;
153
+ };
154
+ const statusColor = status ? tokens.colors.status[status] : void 0;
155
+ return /* @__PURE__ */ jsxs("div", {
156
+ className: classNames("zendir-glass-card", `zendir-glass-card--${colorOverlay}`, className),
157
+ onClick,
158
+ role: isInteractive ? "button" : void 0,
159
+ tabIndex: isInteractive ? 0 : void 0,
160
+ onKeyDown: onClick ? (e) => {
161
+ if (e.key === "Enter" || e.key === " ") {
162
+ e.preventDefault();
163
+ onClick();
164
+ }
165
+ } : void 0,
166
+ style: {
167
+ position: "relative",
168
+ borderRadius: tokens.borderRadius.lg,
169
+ overflow: "hidden",
170
+ height: fullHeight ? "100%" : "auto",
171
+ display: "flex",
172
+ flexDirection: "column",
173
+ cursor: isInteractive ? "pointer" : "default",
174
+ background: cardBackground,
175
+ backdropFilter: isTransparent ? `blur(${blur}px)` : "none",
176
+ WebkitBackdropFilter: isTransparent ? `blur(${blur}px)` : "none",
177
+ border: `1px solid ${baseBorderColor}`,
178
+ ...getAccentStyles(),
179
+ transition: "all 0.3s ease-out",
180
+ boxShadow: glowOnHover ? "none" : void 0,
181
+ ...style
182
+ },
183
+ onMouseEnter: (e) => {
184
+ if (glowOnHover && effectiveOverlay.glow) e.currentTarget.style.boxShadow = `0 0 30px ${effectiveOverlay.glow}, 0 4px 20px rgba(0,0,0,0.3)`;
185
+ },
186
+ onMouseLeave: (e) => {
187
+ if (glowOnHover) e.currentTarget.style.boxShadow = "none";
188
+ },
189
+ children: [
190
+ /* @__PURE__ */ jsx("div", { style: {
191
+ position: "absolute",
192
+ inset: 0,
193
+ background: effectiveOverlay.gradient,
194
+ pointerEvents: "none",
195
+ zIndex: 0
196
+ } }),
197
+ showAccentStyling && accentPosition === "top" && accentStyle === "glow" && /* @__PURE__ */ jsx("div", { style: {
198
+ position: "absolute",
199
+ top: 0,
200
+ left: "10%",
201
+ right: "10%",
202
+ height: "2px",
203
+ background: `linear-gradient(90deg, transparent, ${effectiveOverlay.accent}, transparent)`,
204
+ boxShadow: `0 0 15px ${effectiveOverlay.glow}, 0 0 30px ${effectiveOverlay.glow}`,
205
+ zIndex: 1
206
+ } }),
207
+ /* @__PURE__ */ jsxs("div", {
208
+ style: {
209
+ position: "relative",
210
+ zIndex: 1,
211
+ display: "flex",
212
+ flexDirection: "column",
213
+ flex: 1
214
+ },
215
+ children: [
216
+ (title || actions || legend) && /* @__PURE__ */ jsxs("div", {
217
+ style: {
218
+ display: "flex",
219
+ alignItems: "center",
220
+ justifyContent: "space-between",
221
+ gap: tokens.spacing.md,
222
+ padding: `${paddingConfig[padding]} ${paddingConfig[padding]} 0`,
223
+ marginBottom: tokens.spacing.sm
224
+ },
225
+ children: [/* @__PURE__ */ jsxs("div", {
226
+ style: {
227
+ display: "flex",
228
+ alignItems: "center",
229
+ gap: tokens.spacing.sm
230
+ },
231
+ children: [
232
+ icon && /* @__PURE__ */ jsx("span", {
233
+ style: {
234
+ color: effectiveOverlay.accent,
235
+ display: "flex",
236
+ alignItems: "center"
237
+ },
238
+ children: icon
239
+ }),
240
+ status && statusColor && (() => {
241
+ const s = 10;
242
+ const h = s / 2;
243
+ const glow = `drop-shadow(0 0 4px ${statusColor})`;
244
+ switch (status) {
245
+ case "critical": return /* @__PURE__ */ jsx("svg", {
246
+ width: s,
247
+ height: s,
248
+ viewBox: `0 0 ${s} ${s}`,
249
+ style: {
250
+ flexShrink: 0,
251
+ filter: glow
252
+ },
253
+ children: /* @__PURE__ */ jsx("polygon", {
254
+ points: `${h},${s} 0,0 ${s},0`,
255
+ fill: statusColor
256
+ })
257
+ });
258
+ case "serious": return /* @__PURE__ */ jsx("svg", {
259
+ width: s,
260
+ height: s,
261
+ viewBox: `0 0 ${s} ${s}`,
262
+ style: {
263
+ flexShrink: 0,
264
+ filter: glow
265
+ },
266
+ children: /* @__PURE__ */ jsx("polygon", {
267
+ points: `${h},0 ${s},${h} ${h},${s} 0,${h}`,
268
+ fill: statusColor
269
+ })
270
+ });
271
+ case "caution": return /* @__PURE__ */ jsx("svg", {
272
+ width: s,
273
+ height: s,
274
+ viewBox: `0 0 ${s} ${s}`,
275
+ style: {
276
+ flexShrink: 0,
277
+ filter: glow
278
+ },
279
+ children: /* @__PURE__ */ jsx("rect", {
280
+ width: s,
281
+ height: s,
282
+ fill: statusColor
283
+ })
284
+ });
285
+ case "standby": return /* @__PURE__ */ jsx("svg", {
286
+ width: s,
287
+ height: s,
288
+ viewBox: "0 0 12 12",
289
+ style: {
290
+ flexShrink: 0,
291
+ filter: glow
292
+ },
293
+ children: /* @__PURE__ */ jsx("circle", {
294
+ cx: "6",
295
+ cy: "6",
296
+ r: "3.5",
297
+ fill: "none",
298
+ stroke: statusColor,
299
+ strokeWidth: "2"
300
+ })
301
+ });
302
+ case "off": return /* @__PURE__ */ jsx("svg", {
303
+ width: s,
304
+ height: s,
305
+ viewBox: "0 0 12 12",
306
+ style: {
307
+ flexShrink: 0,
308
+ filter: glow
309
+ },
310
+ children: /* @__PURE__ */ jsx("circle", {
311
+ cx: "6",
312
+ cy: "6",
313
+ r: "3",
314
+ fill: statusColor
315
+ })
316
+ });
317
+ default: return /* @__PURE__ */ jsx("svg", {
318
+ width: s,
319
+ height: s,
320
+ viewBox: `0 0 ${s} ${s}`,
321
+ style: {
322
+ flexShrink: 0,
323
+ filter: glow
324
+ },
325
+ children: /* @__PURE__ */ jsx("circle", {
326
+ cx: h,
327
+ cy: h,
328
+ r: h,
329
+ fill: statusColor
330
+ })
331
+ });
332
+ }
333
+ })(),
334
+ /* @__PURE__ */ jsxs("div", { children: [title && /* @__PURE__ */ jsx("h3", {
335
+ style: {
336
+ margin: 0,
337
+ fontSize: tokens.layout?.card?.heading?.titleFontSize ?? "1.125rem",
338
+ fontWeight: tokens.layout?.card?.heading?.titleFontWeight ?? 500,
339
+ color: effectiveOverlay.accent,
340
+ letterSpacing: "0.5px",
341
+ textShadow: `0 0 20px ${effectiveOverlay.glow}`
342
+ },
343
+ children: title
344
+ }), subtitle && /* @__PURE__ */ jsx("p", {
345
+ style: {
346
+ margin: `${tokens.spacing.xs} 0 0`,
347
+ fontSize: tokens.typography.body[3].fontSize,
348
+ color: tokens.colors.text.secondary
349
+ },
350
+ children: subtitle
351
+ })] })
352
+ ]
353
+ }), /* @__PURE__ */ jsxs("div", {
354
+ style: {
355
+ display: "flex",
356
+ alignItems: "center",
357
+ gap: tokens.spacing.md
358
+ },
359
+ children: [legend && legend.length > 0 && /* @__PURE__ */ jsx("div", {
360
+ style: {
361
+ display: "flex",
362
+ alignItems: "center",
363
+ gap: tokens.spacing.md
364
+ },
365
+ children: legend.map((item, idx) => /* @__PURE__ */ jsxs("div", {
366
+ style: {
367
+ display: "flex",
368
+ alignItems: "center",
369
+ gap: tokens.spacing.xs
370
+ },
371
+ children: [/* @__PURE__ */ jsx("span", { style: {
372
+ width: "8px",
373
+ height: "8px",
374
+ borderRadius: "2px",
375
+ backgroundColor: item.color
376
+ } }), /* @__PURE__ */ jsx("span", {
377
+ style: {
378
+ fontSize: tokens.typography.body[3].fontSize,
379
+ color: tokens.colors.text.secondary
380
+ },
381
+ children: item.label
382
+ })]
383
+ }, idx))
384
+ }), actions && /* @__PURE__ */ jsx("div", {
385
+ style: {
386
+ display: "flex",
387
+ gap: tokens.spacing.xs
388
+ },
389
+ children: actions
390
+ })]
391
+ })]
392
+ }),
393
+ showAccentStyling && accentPosition === "top" && /* @__PURE__ */ jsx("div", {
394
+ style: {
395
+ display: "flex",
396
+ alignItems: "center",
397
+ padding: `0 ${paddingConfig[padding]}`,
398
+ marginBottom: tokens.spacing.sm
399
+ },
400
+ children: /* @__PURE__ */ jsx("div", { style: {
401
+ flex: 1,
402
+ height: "2px",
403
+ background: `linear-gradient(90deg, ${effectiveOverlay.accent} 0%, ${effectiveOverlay.accent}60 70%, ${effectiveOverlay.accent}20 100%)`,
404
+ boxShadow: `0 0 6px ${effectiveOverlay.accent}40`
405
+ } })
406
+ }),
407
+ /* @__PURE__ */ jsx("div", {
408
+ style: {
409
+ flex: 1,
410
+ padding: title ? `0 ${paddingConfig[padding]} ${paddingConfig[padding]}` : paddingConfig[padding]
411
+ },
412
+ children
413
+ })
414
+ ]
415
+ })
416
+ ]
417
+ });
370
418
  });
371
- export {
372
- GLASS_COLOR_OVERLAYS,
373
- GlassCard
374
- };
375
- //# sourceMappingURL=GlassCard.js.map
419
+ //#endregion
420
+ export { GLASS_COLOR_OVERLAYS, GlassCard, GlassCard as default };
421
+
422
+ //# sourceMappingURL=GlassCard.js.map