@kortix/ui 0.0.0-bootstrap.0 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/README.md +153 -2
  2. package/dist/_vendor/kortix-shared.js +341 -0
  3. package/dist/chat/agent-picker.d.ts +8 -0
  4. package/dist/chat/agent-picker.js +18 -0
  5. package/dist/chat/composer.d.ts +31 -0
  6. package/dist/chat/composer.js +114 -0
  7. package/dist/chat/index.d.ts +22 -0
  8. package/dist/chat/index.js +22 -0
  9. package/dist/chat/markdown.d.ts +10 -0
  10. package/dist/chat/markdown.js +36 -0
  11. package/dist/chat/message-list.d.ts +25 -0
  12. package/dist/chat/message-list.js +73 -0
  13. package/dist/chat/message-view.d.ts +17 -0
  14. package/dist/chat/message-view.js +86 -0
  15. package/dist/chat/model-picker.d.ts +10 -0
  16. package/dist/chat/model-picker.js +68 -0
  17. package/dist/chat/permission-prompt.d.ts +10 -0
  18. package/dist/chat/permission-prompt.js +40 -0
  19. package/dist/chat/question-prompt.d.ts +8 -0
  20. package/dist/chat/question-prompt.js +60 -0
  21. package/dist/chat/send-failure.d.ts +9 -0
  22. package/dist/chat/send-failure.js +21 -0
  23. package/dist/chat/session-thread.d.ts +28 -0
  24. package/dist/chat/session-thread.js +47 -0
  25. package/dist/chat/streaming-markdown.d.ts +21 -0
  26. package/dist/chat/streaming-markdown.js +59 -0
  27. package/dist/chat/tool-call.d.ts +4 -0
  28. package/dist/chat/tool-call.js +150 -0
  29. package/dist/chat/user-message-parts.d.ts +6 -0
  30. package/dist/chat/user-message-parts.js +11 -0
  31. package/dist/components/ui/accordion.d.ts +7 -0
  32. package/dist/components/ui/accordion.js +18 -0
  33. package/dist/components/ui/alert-dialog.d.ts +19 -0
  34. package/dist/components/ui/alert-dialog.js +48 -0
  35. package/dist/components/ui/alert.d.ts +13 -0
  36. package/dist/components/ui/alert.js +67 -0
  37. package/dist/components/ui/avatar.d.ts +11 -0
  38. package/dist/components/ui/avatar.js +23 -0
  39. package/dist/components/ui/back-pill.d.ts +13 -0
  40. package/dist/components/ui/back-pill.js +18 -0
  41. package/dist/components/ui/badge.d.ts +10 -0
  42. package/dist/components/ui/badge.js +42 -0
  43. package/dist/components/ui/breadcrumb.d.ts +11 -0
  44. package/dist/components/ui/breadcrumb.js +28 -0
  45. package/dist/components/ui/bubble.d.ts +20 -0
  46. package/dist/components/ui/bubble.js +38 -0
  47. package/dist/components/ui/button-group.d.ts +9 -0
  48. package/dist/components/ui/button-group.js +32 -0
  49. package/dist/components/ui/button.d.ts +13 -0
  50. package/dist/components/ui/button.js +67 -0
  51. package/dist/components/ui/calendar.d.ts +4 -0
  52. package/dist/components/ui/calendar.js +39 -0
  53. package/dist/components/ui/card.d.ts +96 -0
  54. package/dist/components/ui/card.js +291 -0
  55. package/dist/components/ui/chain-of-thought.d.ts +75 -0
  56. package/dist/components/ui/chain-of-thought.js +66 -0
  57. package/dist/components/ui/chart.d.ts +65 -0
  58. package/dist/components/ui/chart.js +118 -0
  59. package/dist/components/ui/checkbox-group.d.ts +19 -0
  60. package/dist/components/ui/checkbox-group.js +41 -0
  61. package/dist/components/ui/checkbox.d.ts +14 -0
  62. package/dist/components/ui/checkbox.js +27 -0
  63. package/dist/components/ui/collapsible.d.ts +5 -0
  64. package/dist/components/ui/collapsible.js +14 -0
  65. package/dist/components/ui/command.d.ts +58 -0
  66. package/dist/components/ui/command.js +135 -0
  67. package/dist/components/ui/confirm-dialog.d.ts +19 -0
  68. package/dist/components/ui/confirm-dialog.js +30 -0
  69. package/dist/components/ui/context-menu.d.ts +45 -0
  70. package/dist/components/ui/context-menu.js +93 -0
  71. package/dist/components/ui/count-badge.d.ts +26 -0
  72. package/dist/components/ui/count-badge.js +26 -0
  73. package/dist/components/ui/data-grid.d.ts +24 -0
  74. package/dist/components/ui/data-grid.js +107 -0
  75. package/dist/components/ui/date-range-picker.d.ts +119 -0
  76. package/dist/components/ui/date-range-picker.js +190 -0
  77. package/dist/components/ui/definition-list.d.ts +15 -0
  78. package/dist/components/ui/definition-list.js +26 -0
  79. package/dist/components/ui/dialog.d.ts +29 -0
  80. package/dist/components/ui/dialog.js +52 -0
  81. package/dist/components/ui/disclosure.d.ts +121 -0
  82. package/dist/components/ui/disclosure.js +138 -0
  83. package/dist/components/ui/dot-matrix/dotm-3x3-10.d.ts +4 -0
  84. package/dist/components/ui/dot-matrix/dotm-3x3-10.js +29 -0
  85. package/dist/components/ui/dot-matrix/dotm-3x3-12.d.ts +4 -0
  86. package/dist/components/ui/dot-matrix/dotm-3x3-12.js +19 -0
  87. package/dist/components/ui/dot-matrix/dotm-3x3-13.d.ts +4 -0
  88. package/dist/components/ui/dot-matrix/dotm-3x3-13.js +19 -0
  89. package/dist/components/ui/dot-matrix/dotm-3x3-15.d.ts +4 -0
  90. package/dist/components/ui/dot-matrix/dotm-3x3-15.js +22 -0
  91. package/dist/components/ui/dot-matrix/dotm-3x3-16.d.ts +4 -0
  92. package/dist/components/ui/dot-matrix/dotm-3x3-16.js +5 -0
  93. package/dist/components/ui/dot-matrix/dotm-3x3-18.d.ts +4 -0
  94. package/dist/components/ui/dot-matrix/dotm-3x3-18.js +5 -0
  95. package/dist/components/ui/dot-matrix/dotm-3x3-19.d.ts +4 -0
  96. package/dist/components/ui/dot-matrix/dotm-3x3-19.js +5 -0
  97. package/dist/components/ui/dot-matrix/dotm-3x3-2.d.ts +4 -0
  98. package/dist/components/ui/dot-matrix/dotm-3x3-2.js +3 -0
  99. package/dist/components/ui/dot-matrix/dotm-3x3-20.d.ts +4 -0
  100. package/dist/components/ui/dot-matrix/dotm-3x3-20.js +5 -0
  101. package/dist/components/ui/dot-matrix/dotm-3x3-21.d.ts +4 -0
  102. package/dist/components/ui/dot-matrix/dotm-3x3-21.js +5 -0
  103. package/dist/components/ui/dot-matrix/dotm-3x3-3.d.ts +4 -0
  104. package/dist/components/ui/dot-matrix/dotm-3x3-3.js +3 -0
  105. package/dist/components/ui/dot-matrix/dotm-3x3-4.d.ts +4 -0
  106. package/dist/components/ui/dot-matrix/dotm-3x3-4.js +3 -0
  107. package/dist/components/ui/dot-matrix/dotm-3x3-5.d.ts +4 -0
  108. package/dist/components/ui/dot-matrix/dotm-3x3-5.js +3 -0
  109. package/dist/components/ui/dot-matrix/dotm-3x3-6.d.ts +4 -0
  110. package/dist/components/ui/dot-matrix/dotm-3x3-6.js +19 -0
  111. package/dist/components/ui/dot-matrix/dotm-3x3-7.d.ts +4 -0
  112. package/dist/components/ui/dot-matrix/dotm-3x3-7.js +19 -0
  113. package/dist/components/ui/dot-matrix/dotm-3x3-8.d.ts +4 -0
  114. package/dist/components/ui/dot-matrix/dotm-3x3-8.js +19 -0
  115. package/dist/components/ui/dot-matrix/dotm-3x3-9.d.ts +4 -0
  116. package/dist/components/ui/dot-matrix/dotm-3x3-9.js +23 -0
  117. package/dist/components/ui/dot-matrix/dotm-circular-1.d.ts +4 -0
  118. package/dist/components/ui/dot-matrix/dotm-circular-1.js +28 -0
  119. package/dist/components/ui/dot-matrix/dotm-circular-10.d.ts +4 -0
  120. package/dist/components/ui/dot-matrix/dotm-circular-10.js +40 -0
  121. package/dist/components/ui/dot-matrix/dotm-circular-11.d.ts +4 -0
  122. package/dist/components/ui/dot-matrix/dotm-circular-11.js +37 -0
  123. package/dist/components/ui/dot-matrix/dotm-circular-12.d.ts +4 -0
  124. package/dist/components/ui/dot-matrix/dotm-circular-12.js +42 -0
  125. package/dist/components/ui/dot-matrix/dotm-circular-14.d.ts +4 -0
  126. package/dist/components/ui/dot-matrix/dotm-circular-14.js +37 -0
  127. package/dist/components/ui/dot-matrix/dotm-circular-15.d.ts +4 -0
  128. package/dist/components/ui/dot-matrix/dotm-circular-15.js +49 -0
  129. package/dist/components/ui/dot-matrix/dotm-circular-17.d.ts +4 -0
  130. package/dist/components/ui/dot-matrix/dotm-circular-17.js +31 -0
  131. package/dist/components/ui/dot-matrix/dotm-circular-2.d.ts +4 -0
  132. package/dist/components/ui/dot-matrix/dotm-circular-2.js +37 -0
  133. package/dist/components/ui/dot-matrix/dotm-circular-3.d.ts +4 -0
  134. package/dist/components/ui/dot-matrix/dotm-circular-3.js +54 -0
  135. package/dist/components/ui/dot-matrix/dotm-circular-4.d.ts +4 -0
  136. package/dist/components/ui/dot-matrix/dotm-circular-4.js +35 -0
  137. package/dist/components/ui/dot-matrix/dotm-circular-5.d.ts +4 -0
  138. package/dist/components/ui/dot-matrix/dotm-circular-5.js +30 -0
  139. package/dist/components/ui/dot-matrix/dotm-circular-6.d.ts +4 -0
  140. package/dist/components/ui/dot-matrix/dotm-circular-6.js +37 -0
  141. package/dist/components/ui/dot-matrix/dotm-circular-7.d.ts +4 -0
  142. package/dist/components/ui/dot-matrix/dotm-circular-7.js +25 -0
  143. package/dist/components/ui/dot-matrix/dotm-circular-8.d.ts +4 -0
  144. package/dist/components/ui/dot-matrix/dotm-circular-8.js +26 -0
  145. package/dist/components/ui/dot-matrix/dotm-circular-9.d.ts +4 -0
  146. package/dist/components/ui/dot-matrix/dotm-circular-9.js +41 -0
  147. package/dist/components/ui/dot-matrix/dotm-square-1.d.ts +4 -0
  148. package/dist/components/ui/dot-matrix/dotm-square-1.js +27 -0
  149. package/dist/components/ui/dot-matrix/dotm-square-10.d.ts +4 -0
  150. package/dist/components/ui/dot-matrix/dotm-square-10.js +27 -0
  151. package/dist/components/ui/dot-matrix/dotm-square-11.d.ts +4 -0
  152. package/dist/components/ui/dot-matrix/dotm-square-11.js +25 -0
  153. package/dist/components/ui/dot-matrix/dotm-square-12.d.ts +4 -0
  154. package/dist/components/ui/dot-matrix/dotm-square-12.js +28 -0
  155. package/dist/components/ui/dot-matrix/dotm-square-13.d.ts +4 -0
  156. package/dist/components/ui/dot-matrix/dotm-square-13.js +45 -0
  157. package/dist/components/ui/dot-matrix/dotm-square-14.d.ts +4 -0
  158. package/dist/components/ui/dot-matrix/dotm-square-14.js +38 -0
  159. package/dist/components/ui/dot-matrix/dotm-square-15.d.ts +4 -0
  160. package/dist/components/ui/dot-matrix/dotm-square-15.js +31 -0
  161. package/dist/components/ui/dot-matrix/dotm-square-16.d.ts +4 -0
  162. package/dist/components/ui/dot-matrix/dotm-square-16.js +33 -0
  163. package/dist/components/ui/dot-matrix/dotm-square-17.d.ts +4 -0
  164. package/dist/components/ui/dot-matrix/dotm-square-17.js +27 -0
  165. package/dist/components/ui/dot-matrix/dotm-square-18.d.ts +4 -0
  166. package/dist/components/ui/dot-matrix/dotm-square-18.js +29 -0
  167. package/dist/components/ui/dot-matrix/dotm-square-19.d.ts +4 -0
  168. package/dist/components/ui/dot-matrix/dotm-square-19.js +74 -0
  169. package/dist/components/ui/dot-matrix/dotm-square-2.d.ts +4 -0
  170. package/dist/components/ui/dot-matrix/dotm-square-2.js +72 -0
  171. package/dist/components/ui/dot-matrix/dotm-square-20.d.ts +4 -0
  172. package/dist/components/ui/dot-matrix/dotm-square-20.js +79 -0
  173. package/dist/components/ui/dot-matrix/dotm-square-3.d.ts +4 -0
  174. package/dist/components/ui/dot-matrix/dotm-square-3.js +23 -0
  175. package/dist/components/ui/dot-matrix/dotm-square-4.d.ts +4 -0
  176. package/dist/components/ui/dot-matrix/dotm-square-4.js +41 -0
  177. package/dist/components/ui/dot-matrix/dotm-square-5.d.ts +4 -0
  178. package/dist/components/ui/dot-matrix/dotm-square-5.js +23 -0
  179. package/dist/components/ui/dot-matrix/dotm-square-6.d.ts +4 -0
  180. package/dist/components/ui/dot-matrix/dotm-square-6.js +20 -0
  181. package/dist/components/ui/dot-matrix/dotm-square-7.d.ts +4 -0
  182. package/dist/components/ui/dot-matrix/dotm-square-7.js +43 -0
  183. package/dist/components/ui/dot-matrix/dotm-square-8.d.ts +4 -0
  184. package/dist/components/ui/dot-matrix/dotm-square-8.js +57 -0
  185. package/dist/components/ui/dot-matrix/dotm-square-9.d.ts +4 -0
  186. package/dist/components/ui/dot-matrix/dotm-square-9.js +89 -0
  187. package/dist/components/ui/dot-matrix/session-dot-matrix.d.ts +46 -0
  188. package/dist/components/ui/dot-matrix/session-dot-matrix.js +153 -0
  189. package/dist/components/ui/drawer.d.ts +15 -0
  190. package/dist/components/ui/drawer.js +35 -0
  191. package/dist/components/ui/dropdown-menu.d.ts +49 -0
  192. package/dist/components/ui/dropdown-menu.js +113 -0
  193. package/dist/components/ui/emoji-picker.d.ts +15 -0
  194. package/dist/components/ui/emoji-picker.js +137 -0
  195. package/dist/components/ui/emoji-tint.d.ts +41 -0
  196. package/dist/components/ui/emoji-tint.js +131 -0
  197. package/dist/components/ui/empty.d.ts +11 -0
  198. package/dist/components/ui/empty.js +33 -0
  199. package/dist/components/ui/entity-avatar.d.ts +84 -0
  200. package/dist/components/ui/entity-avatar.js +106 -0
  201. package/dist/components/ui/faded-scroll-area.d.ts +8 -0
  202. package/dist/components/ui/faded-scroll-area.js +80 -0
  203. package/dist/components/ui/favicon-avatar.d.ts +32 -0
  204. package/dist/components/ui/favicon-avatar.js +18 -0
  205. package/dist/components/ui/field.d.ts +15 -0
  206. package/dist/components/ui/field.js +48 -0
  207. package/dist/components/ui/file-tree.d.ts +32 -0
  208. package/dist/components/ui/file-tree.js +30 -0
  209. package/dist/components/ui/glyph-face.d.ts +18 -0
  210. package/dist/components/ui/glyph-face.js +37 -0
  211. package/dist/components/ui/glyph-paths-source.d.ts +2 -0
  212. package/dist/components/ui/glyph-paths-source.js +40 -0
  213. package/dist/components/ui/glyph-paths.generated.d.ts +2 -0
  214. package/dist/components/ui/glyph-paths.generated.js +207 -0
  215. package/dist/components/ui/glyph-picker.d.ts +22 -0
  216. package/dist/components/ui/glyph-picker.js +118 -0
  217. package/dist/components/ui/glyph-registry.d.ts +36 -0
  218. package/dist/components/ui/glyph-registry.js +479 -0
  219. package/dist/components/ui/glyph-tint.d.ts +6 -0
  220. package/dist/components/ui/glyph-tint.js +93 -0
  221. package/dist/components/ui/hint.d.ts +14 -0
  222. package/dist/components/ui/hint.js +12 -0
  223. package/dist/components/ui/histogram-bars.d.ts +38 -0
  224. package/dist/components/ui/histogram-bars.js +93 -0
  225. package/dist/components/ui/hover-card.d.ts +28 -0
  226. package/dist/components/ui/hover-card.js +35 -0
  227. package/dist/components/ui/icon-provider.d.ts +23 -0
  228. package/dist/components/ui/icon-provider.js +30 -0
  229. package/dist/components/ui/info-banner.d.ts +14 -0
  230. package/dist/components/ui/info-banner.js +72 -0
  231. package/dist/components/ui/inline-meta.d.ts +6 -0
  232. package/dist/components/ui/inline-meta.js +8 -0
  233. package/dist/components/ui/input-group.d.ts +19 -0
  234. package/dist/components/ui/input-group.js +73 -0
  235. package/dist/components/ui/input.d.ts +26 -0
  236. package/dist/components/ui/input.js +23 -0
  237. package/dist/components/ui/item.d.ts +23 -0
  238. package/dist/components/ui/item.js +67 -0
  239. package/dist/components/ui/kbd.d.ts +3 -0
  240. package/dist/components/ui/kbd.js +20 -0
  241. package/dist/components/ui/kortix-asterisk.d.ts +6 -0
  242. package/dist/components/ui/kortix-asterisk.js +17 -0
  243. package/dist/components/ui/kortix-icons.d.ts +2 -0
  244. package/dist/components/ui/kortix-icons.js +17 -0
  245. package/dist/components/ui/kortix-loader.d.ts +76 -0
  246. package/dist/components/ui/kortix-loader.js +74 -0
  247. package/dist/components/ui/kortix-logo.d.ts +30 -0
  248. package/dist/components/ui/kortix-logo.js +47 -0
  249. package/dist/components/ui/label.d.ts +4 -0
  250. package/dist/components/ui/label.js +9 -0
  251. package/dist/components/ui/list.d.ts +15 -0
  252. package/dist/components/ui/list.js +25 -0
  253. package/dist/components/ui/loading.d.ts +19 -0
  254. package/dist/components/ui/loading.js +31 -0
  255. package/dist/components/ui/local-time.d.ts +34 -0
  256. package/dist/components/ui/local-time.js +60 -0
  257. package/dist/components/ui/map.d.ts +101 -0
  258. package/dist/components/ui/map.js +257 -0
  259. package/dist/components/ui/marker.d.ts +14 -0
  260. package/dist/components/ui/marker.js +28 -0
  261. package/dist/components/ui/menu-recipe.d.ts +102 -0
  262. package/dist/components/ui/menu-recipe.js +129 -0
  263. package/dist/components/ui/mermaid-render.d.ts +51 -0
  264. package/dist/components/ui/mermaid-render.js +65 -0
  265. package/dist/components/ui/mermaid-renderer.d.ts +13 -0
  266. package/dist/components/ui/mermaid-renderer.js +340 -0
  267. package/dist/components/ui/message.d.ts +15 -0
  268. package/dist/components/ui/message.js +26 -0
  269. package/dist/components/ui/modal.d.ts +104 -0
  270. package/dist/components/ui/modal.js +180 -0
  271. package/dist/components/ui/navigation-menu.d.ts +16 -0
  272. package/dist/components/ui/navigation-menu.js +35 -0
  273. package/dist/components/ui/page-search-bar.d.ts +11 -0
  274. package/dist/components/ui/page-search-bar.js +13 -0
  275. package/dist/components/ui/phone-input.d.ts +7 -0
  276. package/dist/components/ui/phone-input.js +59 -0
  277. package/dist/components/ui/pixel-kortix-mark.d.ts +13 -0
  278. package/dist/components/ui/pixel-kortix-mark.js +40 -0
  279. package/dist/components/ui/popover.d.ts +10 -0
  280. package/dist/components/ui/popover.js +38 -0
  281. package/dist/components/ui/portal.d.ts +5 -0
  282. package/dist/components/ui/portal.js +15 -0
  283. package/dist/components/ui/preview-image.d.ts +14 -0
  284. package/dist/components/ui/preview-image.js +58 -0
  285. package/dist/components/ui/progress-ring.d.ts +6 -0
  286. package/dist/components/ui/progress-ring.js +9 -0
  287. package/dist/components/ui/progress.d.ts +6 -0
  288. package/dist/components/ui/progress.js +8 -0
  289. package/dist/components/ui/radio-group.d.ts +12 -0
  290. package/dist/components/ui/radio-group.js +20 -0
  291. package/dist/components/ui/resizable.d.ts +24 -0
  292. package/dist/components/ui/resizable.js +16 -0
  293. package/dist/components/ui/scroll-area.d.ts +5 -0
  294. package/dist/components/ui/scroll-area.js +11 -0
  295. package/dist/components/ui/section-card.d.ts +37 -0
  296. package/dist/components/ui/section-card.js +14 -0
  297. package/dist/components/ui/section.d.ts +10 -0
  298. package/dist/components/ui/section.js +22 -0
  299. package/dist/components/ui/select.d.ts +25 -0
  300. package/dist/components/ui/select.js +59 -0
  301. package/dist/components/ui/separator.d.ts +4 -0
  302. package/dist/components/ui/separator.js +8 -0
  303. package/dist/components/ui/shader-safe.d.ts +48 -0
  304. package/dist/components/ui/shader-safe.js +74 -0
  305. package/dist/components/ui/sheet.d.ts +32 -0
  306. package/dist/components/ui/sheet.js +55 -0
  307. package/dist/components/ui/sidebar-context.d.ts +72 -0
  308. package/dist/components/ui/sidebar-context.js +36 -0
  309. package/dist/components/ui/sidebar-menu-primitives.d.ts +38 -0
  310. package/dist/components/ui/sidebar-menu-primitives.js +97 -0
  311. package/dist/components/ui/sidebar-panel.d.ts +36 -0
  312. package/dist/components/ui/sidebar-panel.js +265 -0
  313. package/dist/components/ui/sidebar-peek.d.ts +27 -0
  314. package/dist/components/ui/sidebar-peek.js +70 -0
  315. package/dist/components/ui/sidebar-width.d.ts +48 -0
  316. package/dist/components/ui/sidebar-width.js +62 -0
  317. package/dist/components/ui/sidebar.d.ts +18 -0
  318. package/dist/components/ui/sidebar.js +194 -0
  319. package/dist/components/ui/skeleton.d.ts +3 -0
  320. package/dist/components/ui/skeleton.js +6 -0
  321. package/dist/components/ui/slider-native.d.ts +7 -0
  322. package/dist/components/ui/slider-native.js +16 -0
  323. package/dist/components/ui/slider.d.ts +14 -0
  324. package/dist/components/ui/slider.js +48 -0
  325. package/dist/components/ui/sliding-tab-indicator.d.ts +61 -0
  326. package/dist/components/ui/sliding-tab-indicator.js +128 -0
  327. package/dist/components/ui/split-sheet.d.ts +61 -0
  328. package/dist/components/ui/split-sheet.js +239 -0
  329. package/dist/components/ui/spotlight-card.d.ts +8 -0
  330. package/dist/components/ui/spotlight-card.js +43 -0
  331. package/dist/components/ui/status-ring.d.ts +38 -0
  332. package/dist/components/ui/status-ring.js +38 -0
  333. package/dist/components/ui/status.d.ts +58 -0
  334. package/dist/components/ui/status.js +76 -0
  335. package/dist/components/ui/stepper.d.ts +28 -0
  336. package/dist/components/ui/stepper.js +73 -0
  337. package/dist/components/ui/switch.d.ts +8 -0
  338. package/dist/components/ui/switch.js +131 -0
  339. package/dist/components/ui/system-message.d.ts +23 -0
  340. package/dist/components/ui/system-message.js +51 -0
  341. package/dist/components/ui/table.d.ts +10 -0
  342. package/dist/components/ui/table.js +28 -0
  343. package/dist/components/ui/tabs.d.ts +73 -0
  344. package/dist/components/ui/tabs.js +207 -0
  345. package/dist/components/ui/tag.d.ts +7 -0
  346. package/dist/components/ui/tag.js +22 -0
  347. package/dist/components/ui/text-shimmer.d.ts +13 -0
  348. package/dist/components/ui/text-shimmer.js +91 -0
  349. package/dist/components/ui/textarea.d.ts +33 -0
  350. package/dist/components/ui/textarea.js +87 -0
  351. package/dist/components/ui/toast.d.ts +105 -0
  352. package/dist/components/ui/toast.js +233 -0
  353. package/dist/components/ui/toggle.d.ts +12 -0
  354. package/dist/components/ui/toggle.js +26 -0
  355. package/dist/components/ui/tooltip.d.ts +9 -0
  356. package/dist/components/ui/tooltip.js +16 -0
  357. package/dist/components/ui/trigger-variants.d.ts +14 -0
  358. package/dist/components/ui/trigger-variants.js +67 -0
  359. package/dist/components/ui/type-to-confirm-dialog.d.ts +88 -0
  360. package/dist/components/ui/type-to-confirm-dialog.js +101 -0
  361. package/dist/components/ui/typed-title-logic.d.ts +22 -0
  362. package/dist/components/ui/typed-title-logic.js +33 -0
  363. package/dist/components/ui/typed-title.d.ts +38 -0
  364. package/dist/components/ui/typed-title.js +66 -0
  365. package/dist/components/ui/typing-animation.d.ts +36 -0
  366. package/dist/components/ui/typing-animation.js +141 -0
  367. package/dist/components/ui/user-avatar.d.ts +47 -0
  368. package/dist/components/ui/user-avatar.js +46 -0
  369. package/dist/hooks/use-debounce.d.ts +4 -0
  370. package/dist/hooks/use-debounce.js +17 -0
  371. package/dist/hooks/use-is-dark.d.ts +2 -0
  372. package/dist/hooks/use-is-dark.js +27 -0
  373. package/dist/hooks/use-mobile.d.ts +2 -0
  374. package/dist/hooks/use-mobile.js +15 -0
  375. package/dist/hooks/use-proximity-hover.d.ts +52 -0
  376. package/dist/hooks/use-proximity-hover.js +232 -0
  377. package/dist/icons/close.d.ts +2 -0
  378. package/dist/icons/close.js +7 -0
  379. package/dist/icons/copy.d.ts +3 -0
  380. package/dist/icons/copy.js +6 -0
  381. package/dist/icons/sidebar-toggle.d.ts +13 -0
  382. package/dist/icons/sidebar-toggle.js +13 -0
  383. package/dist/index.d.ts +24 -0
  384. package/dist/index.js +33 -0
  385. package/dist/lib/dotmatrix-core.d.ts +113 -0
  386. package/dist/lib/dotmatrix-core.js +920 -0
  387. package/dist/lib/dotmatrix-hooks.d.ts +28 -0
  388. package/dist/lib/dotmatrix-hooks.js +151 -0
  389. package/dist/lib/favicon.d.ts +4 -0
  390. package/dist/lib/favicon.js +21 -0
  391. package/dist/lib/font-weight.d.ts +6 -0
  392. package/dist/lib/font-weight.js +6 -0
  393. package/dist/lib/icon-config.d.ts +33 -0
  394. package/dist/lib/icon-config.js +22 -0
  395. package/dist/lib/icon-context.d.ts +34 -0
  396. package/dist/lib/icon-context.js +81 -0
  397. package/dist/lib/portal-root.d.ts +8 -0
  398. package/dist/lib/portal-root.js +26 -0
  399. package/dist/lib/settle.d.ts +16 -0
  400. package/dist/lib/settle.js +29 -0
  401. package/dist/lib/springs.d.ts +31 -0
  402. package/dist/lib/springs.js +29 -0
  403. package/dist/lib/utils.d.ts +2 -0
  404. package/dist/lib/utils.js +5 -0
  405. package/dist/lib/z-stack.d.ts +55 -0
  406. package/dist/lib/z-stack.js +130 -0
  407. package/dist/providers/ui-provider.d.ts +141 -0
  408. package/dist/providers/ui-provider.js +93 -0
  409. package/dist/styles/dotmatrix-loader.css +1239 -0
  410. package/dist/styles/fonts.css +46 -0
  411. package/dist/styles/tailwind.css +10 -0
  412. package/dist/styles/theme.css +1019 -0
  413. package/dist/styles/tokens.css +146 -0
  414. package/dist/styles.css +2 -0
  415. package/package.json +874 -4
  416. package/skills/kortix-ui/SKILL.md +150 -0
@@ -0,0 +1,23 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import { Separator } from './separator.js';
4
+ declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
5
+ declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
6
+ declare const itemVariants: (props?: ({
7
+ variant?: "default" | "outline" | "muted" | "warning" | null | undefined;
8
+ size?: "default" | "sm" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
11
+ asChild?: boolean;
12
+ }): React.JSX.Element;
13
+ declare const itemMediaVariants: (props?: ({
14
+ variant?: "default" | "icon" | "image" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
17
+ declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
18
+ declare function ItemTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
19
+ declare function ItemDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
20
+ declare function ItemActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
21
+ declare function ItemHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
22
+ declare function ItemFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
23
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, };
@@ -0,0 +1,67 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { Slot } from 'radix-ui';
4
+ import { Separator } from './separator.js';
5
+ import { cn } from '../../lib/utils.js';
6
+ function ItemGroup({ className, ...props }) {
7
+ return (_jsx("div", { role: "list", "data-slot": "item-group", className: cn('group/item-group flex flex-col', className), ...props }));
8
+ }
9
+ function ItemSeparator({ className, ...props }) {
10
+ return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn('my-0', className), ...props }));
11
+ }
12
+ const itemVariants = cva('group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-accent/50', {
13
+ variants: {
14
+ variant: {
15
+ default: 'bg-transparent',
16
+ outline: 'border-border',
17
+ muted: 'bg-muted/50',
18
+ warning: 'border-kortix-orange bg-kortix-orange/20',
19
+ },
20
+ size: {
21
+ default: 'gap-4 p-4',
22
+ sm: 'gap-2.5 px-4 py-3',
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ variant: 'default',
27
+ size: 'default',
28
+ },
29
+ });
30
+ function Item({ className, variant = 'default', size = 'default', asChild = false, ...props }) {
31
+ const Comp = asChild ? Slot.Root : 'div';
32
+ return (_jsx(Comp, { "data-slot": "item", "data-variant": variant, "data-size": size, className: cn(itemVariants({ variant, size, className })), ...props }));
33
+ }
34
+ const itemMediaVariants = cva('flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none', {
35
+ variants: {
36
+ variant: {
37
+ default: 'bg-transparent',
38
+ icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
39
+ image: 'size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover',
40
+ },
41
+ },
42
+ defaultVariants: {
43
+ variant: 'default',
44
+ },
45
+ });
46
+ function ItemMedia({ className, variant = 'default', ...props }) {
47
+ return (_jsx("div", { "data-slot": "item-media", "data-variant": variant, className: cn(itemMediaVariants({ variant, className })), ...props }));
48
+ }
49
+ function ItemContent({ className, ...props }) {
50
+ return (_jsx("div", { "data-slot": "item-content", className: cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className), ...props }));
51
+ }
52
+ function ItemTitle({ className, ...props }) {
53
+ return (_jsx("div", { "data-slot": "item-title", className: cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className), ...props }));
54
+ }
55
+ function ItemDescription({ className, ...props }) {
56
+ return (_jsx("p", { "data-slot": "item-description", className: cn('text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance', '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4', className), ...props }));
57
+ }
58
+ function ItemActions({ className, ...props }) {
59
+ return (_jsx("div", { "data-slot": "item-actions", className: cn('flex items-center gap-2', className), ...props }));
60
+ }
61
+ function ItemHeader({ className, ...props }) {
62
+ return (_jsx("div", { "data-slot": "item-header", className: cn('flex basis-full items-center justify-between gap-2', className), ...props }));
63
+ }
64
+ function ItemFooter({ className, ...props }) {
65
+ return (_jsx("div", { "data-slot": "item-footer", className: cn('flex basis-full items-center justify-between gap-2', className), ...props }));
66
+ }
67
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, };
@@ -0,0 +1,3 @@
1
+ declare function Kbd({ className, ...props }: React.ComponentProps<'kbd'>): import("react").JSX.Element;
2
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<'kbd'>): import("react").JSX.Element;
3
+ export { Kbd, KbdGroup };
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../../lib/utils.js';
3
+ function Kbd({ className, ...props }) {
4
+ return (_jsx("kbd", { "data-slot": "kbd", className: cn('text-muted-foreground pointer-events-none inline-flex size-4 items-center justify-center gap-1 rounded px-1 font-sans text-xs font-medium select-none', "[&_svg:not([class*='size-'])]:size-3",
5
+ // A tooltip is an INVERTED surface (`bg-foreground text-background`), so
6
+ // the default light `bg-muted` chip lands on it as a bright white blob.
7
+ // Tint from the tooltip's own text color instead: one rule that reads
8
+ // as a recessed key in both themes. This is the ONLY place the
9
+ // in-tooltip look is defined — `tooltip-content` must not restyle keys
10
+ // with a descendant `[&_kbd]` rule, or it also hits `KbdGroup`.
11
+ // '[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background',
12
+ '[[data-slot=tooltip-content]_&]:text-background', className), ...props }));
13
+ }
14
+ // Renders a `<kbd>` on purpose: nested `<kbd>` is the HTML idiom for one key
15
+ // COMBINATION made of individual keys. It carries no chrome of its own — it is
16
+ // spacing only, so ancestors must never style it as if it were a key.
17
+ function KbdGroup({ className, ...props }) {
18
+ return (_jsx("kbd", { "data-slot": "kbd-group", className: cn('inline-flex items-center gap-0', className), ...props }));
19
+ }
20
+ export { Kbd, KbdGroup };
@@ -0,0 +1,6 @@
1
+ export declare const KORTIX_BULLET_GRADIENT = "linear-gradient(to bottom, var(--kortix-red), var(--kortix-green), var(--kortix-blue), var(--kortix-yellow), var(--kortix-purple), var(--kortix-red))";
2
+ export declare function KortixAsterisk({ index, parentClass, variant, }: {
3
+ index: number;
4
+ parentClass?: string;
5
+ variant?: 'gradient' | 'solid';
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../../lib/utils.js';
3
+ export const KORTIX_BULLET_GRADIENT = 'linear-gradient(to bottom, var(--kortix-red), var(--kortix-green), var(--kortix-blue), var(--kortix-yellow), var(--kortix-purple), var(--kortix-red))';
4
+ const ASTERISK_ARMS = [
5
+ { className: 'z-10' },
6
+ { className: 'z-20 rotate-90' },
7
+ { className: 'z-30 rotate-45' },
8
+ { className: 'z-40 -rotate-45' },
9
+ ];
10
+ export function KortixAsterisk({ index, parentClass, variant = 'gradient', }) {
11
+ return (_jsx("div", { className: cn('relative mt-1 flex size-6 shrink-0 items-center justify-center', parentClass), children: ASTERISK_ARMS.map(({ className }, armIndex) => (_jsx("div", { className: cn('absolute h-3.5 w-px shrink-0 rounded-full', variant === 'gradient' && 'animate-kortix-bullet-flow bg-[length:100%_300%]', className), style: variant === 'gradient'
12
+ ? {
13
+ backgroundImage: KORTIX_BULLET_GRADIENT,
14
+ animationDelay: `${index * 0.4 + armIndex * 0.08}s`,
15
+ }
16
+ : { backgroundColor: 'var(--foreground)' } }, armIndex))) }));
17
+ }
@@ -0,0 +1,2 @@
1
+ export { PlusIcon as IconAdd, CpuIcon as IconAgent, WarningCircleIcon as IconAlert, AppWindowIcon as IconApp, ArrowUpRightIcon as IconArrowUpRight, ArrowLeftIcon as IconBack, CircleDashedIcon as IconBacklog, RobotIcon as IconBot, CalendarIcon as IconCalendar, XCircleIcon as IconCancelled, CheckIcon as IconCheck, CaretDownIcon as IconChevronDown, CaretLeftIcon as IconChevronLeft, CaretRightIcon as IconChevronRight, CaretUpIcon as IconChevronUp, CaretUpDownIcon as IconChevronsUpDown, ClockIcon as IconClock, XIcon as IconClose, CodeSimpleIcon as IconCode, ChatCircleIcon as IconComment, CopyIcon as IconCopy, TrashIcon as IconDelete, RocketIcon as IconDeploy, CheckCircleIcon as IconDone, PencilIcon as IconEdit, ArrowSquareOutIcon as IconExternal, WarningOctagonIcon as IconFailed, FileIcon as IconFile, FileTextIcon as IconFileText, FunnelIcon as IconFilter, FolderIcon as IconFolder, FolderOpenIcon as IconFolderOpen, ArrowRightIcon as IconForward, SquaresFourIcon as IconGrid, HashIcon as IconHash, RadioButtonIcon as IconInProgress, CircleDashedIcon as IconInReview, TrayIcon as IconInbox, InfoIcon as IconInfo, QuestionIcon as IconInfoNeeded, UserPlusIcon as IconInvite, LinkSimpleIcon as IconLink, ListIcon as IconList, EnvelopeIcon as IconMail, ListIcon as IconMenu, ChatIcon as IconMessage, MicrophoneIcon as IconMic, MicrophoneSlashIcon as IconMicOff, DotsThreeIcon as IconMore, DotsThreeVerticalIcon as IconMoreVertical, BellIcon as IconNotification, PauseIcon as IconPause, PhoneDisconnectIcon as IconPhoneOff, PlayIcon as IconPlay, GitBranchIcon as IconProject, ArrowClockwiseIcon as IconRefresh, MinusIcon as IconRemove, MagnifyingGlassIcon as IconSearch, PaperPlaneTiltIcon as IconSend, GearSixIcon as IconSettings, ArrowsDownUpIcon as IconSort, StarIcon as IconStar, SquareIcon as IconStop, TagIcon as IconTag, TerminalIcon as IconTerminal, CircleIcon as IconTodo, LightningIcon as IconTrigger, StarIcon as IconUnstar, UploadIcon as IconUpload, UserIcon as IconUser, UsersIcon as IconUsers, SpeakerHighIcon as IconVolume, WarningIcon as IconWarning, } from '@phosphor-icons/react';
2
+ export type { Icon } from '@phosphor-icons/react';
@@ -0,0 +1,17 @@
1
+ export {
2
+ // ── CRUD & actions ──────────────────────────────────────────
3
+ PlusIcon as IconAdd, CpuIcon as IconAgent, WarningCircleIcon as IconAlert, AppWindowIcon as IconApp, ArrowUpRightIcon as IconArrowUpRight,
4
+ // ── Navigation & layout ─────────────────────────────────────
5
+ ArrowLeftIcon as IconBack,
6
+ // ── Status / lifecycle ──────────────────────────────────────
7
+ CircleDashedIcon as IconBacklog, RobotIcon as IconBot, CalendarIcon as IconCalendar, XCircleIcon as IconCancelled, CheckIcon as IconCheck, CaretDownIcon as IconChevronDown, CaretLeftIcon as IconChevronLeft, CaretRightIcon as IconChevronRight, CaretUpIcon as IconChevronUp, CaretUpDownIcon as IconChevronsUpDown,
8
+ // ── Time & data ─────────────────────────────────────────────
9
+ ClockIcon as IconClock, XIcon as IconClose, CodeSimpleIcon as IconCode, ChatCircleIcon as IconComment, CopyIcon as IconCopy, TrashIcon as IconDelete, RocketIcon as IconDeploy, CheckCircleIcon as IconDone, PencilIcon as IconEdit, ArrowSquareOutIcon as IconExternal, WarningOctagonIcon as IconFailed, FileIcon as IconFile, FileTextIcon as IconFileText, FunnelIcon as IconFilter, FolderIcon as IconFolder, FolderOpenIcon as IconFolderOpen, ArrowRightIcon as IconForward, SquaresFourIcon as IconGrid, HashIcon as IconHash, RadioButtonIcon as IconInProgress, CircleDashedIcon as IconInReview, TrayIcon as IconInbox, InfoIcon as IconInfo, QuestionIcon as IconInfoNeeded, UserPlusIcon as IconInvite, LinkSimpleIcon as IconLink, ListIcon as IconList, EnvelopeIcon as IconMail, ListIcon as IconMenu, ChatIcon as IconMessage,
10
+ // ── Voice / call ────────────────────────────────────────────
11
+ MicrophoneIcon as IconMic, MicrophoneSlashIcon as IconMicOff, DotsThreeIcon as IconMore, DotsThreeVerticalIcon as IconMoreVertical, BellIcon as IconNotification, PauseIcon as IconPause, PhoneDisconnectIcon as IconPhoneOff, PlayIcon as IconPlay,
12
+ // ── Files & folders ─────────────────────────────────────────
13
+ GitBranchIcon as IconProject, ArrowClockwiseIcon as IconRefresh, MinusIcon as IconRemove, MagnifyingGlassIcon as IconSearch, PaperPlaneTiltIcon as IconSend, GearSixIcon as IconSettings, ArrowsDownUpIcon as IconSort, StarIcon as IconStar, SquareIcon as IconStop, TagIcon as IconTag, TerminalIcon as IconTerminal, CircleIcon as IconTodo, LightningIcon as IconTrigger,
14
+ // phosphor has no star-slash glyph; IconUnstar (currently unused) reuses Star
15
+ StarIcon as IconUnstar, UploadIcon as IconUpload,
16
+ // ── People & comms ──────────────────────────────────────────
17
+ UserIcon as IconUser, UsersIcon as IconUsers, SpeakerHighIcon as IconVolume, WarningIcon as IconWarning, } from '@phosphor-icons/react';
@@ -0,0 +1,76 @@
1
+ import * as React from 'react';
2
+ interface KortixLoaderProps {
3
+ /**
4
+ * Size preset for the loader
5
+ * @default 'medium'
6
+ */
7
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
8
+ /**
9
+ * Animation speed multiplier (affects spin duration)
10
+ * @default 1.2
11
+ */
12
+ speed?: number;
13
+ /**
14
+ * Custom size in pixels (overrides size preset)
15
+ */
16
+ customSize?: number;
17
+ /**
18
+ * Additional className for the container
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Additional style for the container
23
+ */
24
+ style?: React.CSSProperties;
25
+ /**
26
+ * Whether the animation should autoPlay
27
+ * @default true
28
+ */
29
+ autoPlay?: boolean;
30
+ /**
31
+ * Whether the animation should loop
32
+ * @default true
33
+ */
34
+ loop?: boolean;
35
+ /**
36
+ * Force a specific loader variant (overrides auto-detection)
37
+ * - 'white': White loader (for dark backgrounds)
38
+ * - 'black': Black loader (for light backgrounds)
39
+ * - 'auto': Auto-detect based on theme (default)
40
+ */
41
+ variant?: 'white' | 'black' | 'auto';
42
+ /**
43
+ * @deprecated Use 'variant' instead
44
+ */
45
+ forceTheme?: 'light' | 'dark';
46
+ }
47
+ /**
48
+ * KortixLoader - A unified circular loading animation component
49
+ *
50
+ * Uses a CSS-based circular spinner that adapts to light/dark themes.
51
+ *
52
+ * **Automatic Behavior:**
53
+ * - Light mode → Black loader (for white backgrounds)
54
+ * - Dark mode → White loader (for dark backgrounds)
55
+ *
56
+ * **Manual Override (for special cases):**
57
+ * Use the `variant` prop when the background doesn't match the theme.
58
+ * For example, a dark button in light mode needs `variant="white"`.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * // Auto-themed (default)
63
+ * <KortixLoader />
64
+ *
65
+ * // Always white (for dark backgrounds in any theme)
66
+ * <KortixLoader variant="white" />
67
+ *
68
+ * // Always black (for light backgrounds in any theme)
69
+ * <KortixLoader variant="black" />
70
+ *
71
+ * // Custom size
72
+ * <KortixLoader size="large" />
73
+ * ```
74
+ */
75
+ export declare function KortixLoader({ size, speed, customSize, className, style, autoPlay, loop, variant, forceTheme, }: KortixLoaderProps): React.JSX.Element;
76
+ export {};
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from '../../lib/utils.js';
4
+ const SIZE_MAP = {
5
+ small: 20,
6
+ medium: 24,
7
+ large: 32,
8
+ xlarge: 40,
9
+ };
10
+ /**
11
+ * KortixLoader - A unified circular loading animation component
12
+ *
13
+ * Uses a CSS-based circular spinner that adapts to light/dark themes.
14
+ *
15
+ * **Automatic Behavior:**
16
+ * - Light mode → Black loader (for white backgrounds)
17
+ * - Dark mode → White loader (for dark backgrounds)
18
+ *
19
+ * **Manual Override (for special cases):**
20
+ * Use the `variant` prop when the background doesn't match the theme.
21
+ * For example, a dark button in light mode needs `variant="white"`.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * // Auto-themed (default)
26
+ * <KortixLoader />
27
+ *
28
+ * // Always white (for dark backgrounds in any theme)
29
+ * <KortixLoader variant="white" />
30
+ *
31
+ * // Always black (for light backgrounds in any theme)
32
+ * <KortixLoader variant="black" />
33
+ *
34
+ * // Custom size
35
+ * <KortixLoader size="large" />
36
+ * ```
37
+ */
38
+ export function KortixLoader({ size = 'medium', speed = 1.2, customSize, className, style, autoPlay = true, loop = true, variant = 'auto', forceTheme, // deprecated, but kept for backwards compatibility
39
+ }) {
40
+ const loaderSize = customSize || SIZE_MAP[size];
41
+ // Explicit variant (or the deprecated forceTheme) pins the colors; otherwise
42
+ // the theme decides — via the `.dark` CSS class next-themes sets before first
43
+ // paint, so the loader renders on the server and hydrates without the old
44
+ // mounted-gate flicker (SSR used to paint an empty box for one frame).
45
+ let forcedVariant = null;
46
+ if (variant !== 'auto') {
47
+ forcedVariant = variant;
48
+ }
49
+ else if (forceTheme) {
50
+ forcedVariant = forceTheme === 'dark' ? 'white' : 'black';
51
+ }
52
+ // Calculate border width based on size (roughly 1/16 of the size, min 2px)
53
+ const borderWidth = Math.max(2, Math.round(loaderSize / 16));
54
+ // Calculate animation duration based on speed (lower = faster)
55
+ const animationDuration = 0.8 / speed;
56
+ return (_jsx("div", { className: cn('flex items-center justify-center', className), style: style, children: _jsx("div", { className: forcedVariant === null
57
+ ? 'border-[rgba(0,0,0,0.1)] border-t-[#000000] dark:border-[rgba(255,255,255,0.15)] dark:border-t-[#ffffff]'
58
+ : undefined, style: {
59
+ width: loaderSize,
60
+ height: loaderSize,
61
+ borderStyle: 'solid',
62
+ borderWidth,
63
+ ...(forcedVariant !== null && {
64
+ borderColor: forcedVariant === 'white' ? 'rgba(255, 255, 255, 0.15)' : 'rgba(0, 0, 0, 0.1)',
65
+ borderTopColor: forcedVariant === 'white' ? '#ffffff' : '#000000',
66
+ }),
67
+ borderRadius: '50%',
68
+ animation: autoPlay && loop
69
+ ? `kortix-spin ${animationDuration}s linear infinite`
70
+ : autoPlay
71
+ ? `kortix-spin ${animationDuration}s linear`
72
+ : 'none',
73
+ } }) }));
74
+ }
@@ -0,0 +1,30 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export type KortixLogoVariant = 'icon' | 'brandmark';
3
+ interface KortixLogoProps extends Omit<ComponentPropsWithoutRef<'svg'>, 'width' | 'height' | 'viewBox'> {
4
+ /** Pixel height. The brandmark scales its width to match; the icon is square. */
5
+ size?: number;
6
+ /** `icon` = the Kortix symbol alone; `brandmark` = symbol + wordmark lockup. */
7
+ variant?: KortixLogoVariant;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * The canonical Kortix logo. Renders in `currentColor` so it follows the
12
+ * surrounding text color (`text-foreground` in app surfaces).
13
+ *
14
+ * Organization branding: when the active account carries its own marks
15
+ * (`useUiBrand()`, which apps/web feeds from `useBranding()` — Enterprise
16
+ * `branding` entitlement), the matching slot
17
+ * renders that image instead: `brandmark` → `logo_url` (falling back to
18
+ * `icon_url` so a square-only brand still replaces the wordmark), `icon` →
19
+ * `icon_url`. Same box, same `size` semantics, so no call site changes.
20
+ * A dark-scheme variant (`*_dark_url`), when set, is rendered as a second
21
+ * `<img>` toggled by the theme class (`dark:` — the app theme is class-based,
22
+ * `next-themes attribute="class"`), so the swap is hydration-safe and needs
23
+ * no JS. Outside the provider — and for every unbranded account — this is
24
+ * Kortix, which renders in `currentColor` and needs no variant.
25
+ *
26
+ * `@/components/sidebar/kortix-logo` re-exports this under its legacy
27
+ * `symbol`/`logomark` variant names — new code should import from here.
28
+ */
29
+ export declare function KortixLogo({ size, variant, className, style, ...props }: KortixLogoProps): import("react").JSX.Element;
30
+ export {};
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cn } from '../../lib/utils.js';
4
+ import { useUiBrand } from '../../providers/ui-provider.js';
5
+ /**
6
+ * The canonical Kortix logo. Renders in `currentColor` so it follows the
7
+ * surrounding text color (`text-foreground` in app surfaces).
8
+ *
9
+ * Organization branding: when the active account carries its own marks
10
+ * (`useUiBrand()`, which apps/web feeds from `useBranding()` — Enterprise
11
+ * `branding` entitlement), the matching slot
12
+ * renders that image instead: `brandmark` → `logo_url` (falling back to
13
+ * `icon_url` so a square-only brand still replaces the wordmark), `icon` →
14
+ * `icon_url`. Same box, same `size` semantics, so no call site changes.
15
+ * A dark-scheme variant (`*_dark_url`), when set, is rendered as a second
16
+ * `<img>` toggled by the theme class (`dark:` — the app theme is class-based,
17
+ * `next-themes attribute="class"`), so the swap is hydration-safe and needs
18
+ * no JS. Outside the provider — and for every unbranded account — this is
19
+ * Kortix, which renders in `currentColor` and needs no variant.
20
+ *
21
+ * `@/components/sidebar/kortix-logo` re-exports this under its legacy
22
+ * `symbol`/`logomark` variant names — new code should import from here.
23
+ */
24
+ export function KortixLogo({ size = 24, variant = 'brandmark', className, style, ...props }) {
25
+ const branding = useUiBrand();
26
+ // Light is the base; dark is an optional override. A square-only brand
27
+ // stands in for the wordmark, per scheme: a dark icon is a better dark
28
+ // brandmark than a light logo.
29
+ const lightSrc = variant === 'icon' ? branding?.icon_url : (branding?.logo_url ?? branding?.icon_url);
30
+ const darkSrc = variant === 'icon'
31
+ ? branding?.icon_dark_url
32
+ : (branding?.logo_dark_url ?? branding?.icon_dark_url);
33
+ if (lightSrc) {
34
+ const alt = branding?.app_name ?? 'Home';
35
+ const imgStyle = variant === 'icon'
36
+ ? { width: `${size}px`, height: `${size}px`, ...style }
37
+ : { height: `${size}px`, width: 'auto', maxWidth: `${size * 8}px`, ...style };
38
+ const imgProps = props;
39
+ return (_jsxs(_Fragment, { children: [_jsx("img", { src: lightSrc, alt: alt, draggable: false, className: cn('shrink-0 object-contain select-none', darkSrc && 'dark:hidden', className), style: imgStyle, ...imgProps }), darkSrc ? (
40
+ // eslint-disable-next-line @next/next/no-img-element
41
+ _jsx("img", { src: darkSrc, alt: alt, draggable: false, className: cn('hidden shrink-0 object-contain select-none dark:block', className), style: imgStyle, ...imgProps })) : null] }));
42
+ }
43
+ if (variant === 'icon') {
44
+ return (_jsx("svg", { width: "30", height: "25", viewBox: "0 0 30 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: cn('shrink-0', className), style: { width: `${size}px`, height: `${size}px`, ...style }, ...props, children: _jsx("path", { d: "M25.56 24.916H29.83C29.83 19.63 26.94 15 22.62 12.46C26.94 9.91 29.83 5.29 29.83 0H25.56C25.56 5 21.89 9.19 17.07 10.17V0H12.8V10.17C7.95 9.2 4.3 5.02 4.3 0H0.04C0.04 5.29 2.93 9.91 7.25 12.46C2.93 15 0.04 19.63 0.04 24.916H4.3C4.3 19.9 7.95 15.71 12.8 14.75V24.92H17.07V14.75C21.91 15.71 25.56 19.9 25.56 24.916Z", fill: "currentColor" }) }));
45
+ }
46
+ return (_jsxs("svg", { width: "708", height: "142", viewBox: "0 0 708 142", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: cn('shrink-0', className), style: { height: `${size}px`, width: 'auto', ...style }, ...props, children: [_jsx("path", { d: "M139.522 139.53H162.84C162.84 109.932 147.046 84.02 123.427 69.77C147.046 55.52 162.839 29.61 162.839 0.01H139.522C139.522 28.02 119.455 51.45 93.08 56.94V0.01H69.76V56.94C43.26 51.54 23.32 28.1 23.32 0.01H0C0 29.61 15.79 55.52 39.41 69.77C15.79 84.02 0 109.932 0 139.53H23.32C23.32 111.434 43.26 87.996 69.76 82.6V139.556H93.08V82.598C119.579 88 139.522 111.434 139.522 139.53Z", fill: "currentColor" }), _jsx("path", { d: "M379.024 141.074C348.339 141.074 326.422 119.156 326.422 89.27C326.422 59.38 348.339 37.46 379.024 37.46C409.509 37.46 431.426 59.38 431.426 89.27C431.426 119.156 409.509 141.074 379.024 141.074ZM379.024 119.953C395.561 119.953 406.719 107.4 406.719 89.27C406.719 71.14 395.561 58.58 379.024 58.58C362.287 58.58 351.129 71.14 351.129 89.27C351.129 107.4 362.287 119.953 379.024 119.953Z", fill: "currentColor" }), _jsx("path", { d: "M500.433 59.58V39.06H492.199C475.462 39.06 441.988 49.1 441.988 89.27V139.48H466.496L467.243 89.27C467.243 70.14 472.673 59.58 488.214 59.58H500.433Z", fill: "currentColor" }), _jsx("path", { d: "M255.933 0H231.24V139.452H255.933V82.59C282.273 88.1 302.057 111.452 302.057 139.426H325.358C325.358 109.848 309.576 83.96 285.972 69.713C309.575 55.47 325.358 29.58 325.358 0H302.056C302.056 27.89 282.15 51.23 255.933 56.832V0Z", fill: "currentColor" }), _jsx("path", { d: "M509.742 8.77H534.25V39.06H568.298V59.58H534.25V103.415C534.25 113.577 539.629 118.758 548.795 118.758H568.298V139.48H546.006C524.088 139.48 509.742 126.728 509.742 104.412V8.77Z", fill: "currentColor" }), _jsx("path", { d: "M578.743 13.12C578.762 5.87 584.644 0 591.893 0C599.17 0 605.063 5.91 605.044 13.19L605.042 13.72C605.023 20.97 599.141 26.84 591.892 26.84C584.615 26.84 578.722 20.93 578.741 13.654L578.743 13.12ZM579.774 139.48V39.06H604.282V139.48H579.774Z", fill: "currentColor" }), _jsx("path", { d: "M638.582 139.42H616.248C616.248 118.788 626.473 100.544 642.133 89.479C626.474 78.41 616.249 60.17 616.249 39.54H638.583C638.583 55.39 648.093 69.02 661.718 75.03C675.342 69.02 684.852 55.39 684.852 39.54H707.187C707.187 60.17 696.961 78.41 681.302 89.479C696.962 100.544 707.188 118.788 707.188 139.42H684.853C684.853 123.571 675.343 109.943 661.718 103.93C648.092 109.943 638.582 123.571 638.582 139.42Z", fill: "currentColor" })] }));
47
+ }
@@ -0,0 +1,4 @@
1
+ import * as LabelPrimitive from '@radix-ui/react-label';
2
+ import * as React from 'react';
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
4
+ export { Label };
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { cn } from '../../lib/utils.js';
5
+ function Label({ className, ...props }) {
6
+ return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn('text-muted-foreground flex cursor-pointer items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-default peer-disabled:opacity-50', // cursor-default: disabled keeps the default cursor (AGENTS.md → States)
7
+ className), ...props }));
8
+ }
9
+ export { Label };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ /** @deprecated Use `<ul className="space-y-2">` rows inside a `Card`. */
3
+ export declare function List({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
4
+ export interface ListRowProps {
5
+ leading?: React.ReactNode;
6
+ title: React.ReactNode;
7
+ badges?: React.ReactNode;
8
+ subtitle?: React.ReactNode;
9
+ trailing?: React.ReactNode;
10
+ onClick?: () => void;
11
+ className?: string;
12
+ compact?: boolean;
13
+ }
14
+ /** @deprecated Use `<ul className="space-y-2">` rows inside a `Card`. */
15
+ export declare function ListRow({ leading, title, badges, subtitle, trailing, onClick, className, compact, }: ListRowProps): React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cn } from '../../lib/utils.js';
4
+ /** @deprecated Use `<ul className="space-y-2">` rows inside a `Card`. */
5
+ export function List({ className, ...props }) {
6
+ return _jsx("ul", { "data-slot": "list", className: cn('divide-border divide-y', className), ...props });
7
+ }
8
+ /** @deprecated Use `<ul className="space-y-2">` rows inside a `Card`. */
9
+ export function ListRow({ leading, title, badges, subtitle, trailing, onClick, className, compact, }) {
10
+ const interactive = !!onClick;
11
+ return (_jsx("li", { children: _jsxs("div", { ...(interactive
12
+ ? {
13
+ role: 'button',
14
+ tabIndex: 0,
15
+ onClick,
16
+ onKeyDown: (e) => {
17
+ if (e.key === 'Enter' || e.key === ' ') {
18
+ e.preventDefault();
19
+ onClick?.();
20
+ }
21
+ },
22
+ }
23
+ : {}), className: cn('group flex items-center gap-3 px-6 py-3', interactive &&
24
+ 'hover:bg-muted/40 focus-visible:bg-muted/40 cursor-pointer transition-colors focus-visible:outline-none', className), children: [leading ? _jsx("div", { className: "shrink-0", children: leading }) : null, _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: cn('text-foreground truncate text-sm font-medium', compact && 'leading-none'), children: title }), badges] }), subtitle ? (_jsx("div", { className: cn(compact ? 'text-xs leading-none' : 'mt-0.5'), children: subtitle })) : null] }), trailing ? _jsx("div", { className: "flex shrink-0 items-center gap-1.5", children: trailing }) : null] }) }));
25
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * How the spinner is drawn.
3
+ * - `orbit` — the default: a track with a single arc that orbits and breathes.
4
+ * - `spokes` — the ticking radial spinner. Eight spokes on a fading ramp, the
5
+ * whole wheel advancing one spoke at a time rather than sweeping
6
+ * continuously. It holds up better than `orbit` at small sizes and
7
+ * beside text, because there is no thin arc head to lose track of.
8
+ * - `ring` — `orbit`'s motion on the shared status geometry (`STATUS_RING`): the
9
+ * SAME circle the `pending` status icon draws, so a todo starting
10
+ * work does not swap to a fatter, larger disc. Reach for it
11
+ * wherever a spinner sits in a column beside static status glyphs;
12
+ * `orbit` stays the default everywhere else.
13
+ */
14
+ type LoadingVariant = 'orbit' | 'spokes' | 'ring';
15
+ declare const Loading: ({ className, variant, }: {
16
+ className?: string;
17
+ variant?: LoadingVariant;
18
+ }) => import("react").JSX.Element;
19
+ export default Loading;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { STATUS_RING } from './status-ring.js';
3
+ import { cn } from '../../lib/utils.js';
4
+ /**
5
+ * `spinner-dash` is written against the `orbit` circle: its keyframes step
6
+ * `stroke-dashoffset` through 58 → 14 → 58 against a hard-coded
7
+ * `stroke-dasharray: 62.83`, which is 2πr for orbit's r=10.
8
+ *
9
+ * `pathLength` is what lets a DIFFERENT circle reuse those numbers verbatim.
10
+ * It re-scales a path's own length to the value given, so declaring 62.83 on
11
+ * the r=6.3 ring (real circumference 39.58) makes every dash number in the CSS
12
+ * mean the same FRACTION of the ring it meant on orbit. Same breathing arc,
13
+ * same cadence, a third of the stroke weight — and no second keyframe block to
14
+ * keep in sync.
15
+ */
16
+ const RING_PATH_LENGTH = 62.83;
17
+ const SPOKE_COUNT = 8;
18
+ /** Leading spoke is opaque, each one behind it a step fainter — that ramp IS
19
+ * the direction cue. A uniform wheel would tick without appearing to turn. */
20
+ const SPOKE_FADE_STEP = 0.1;
21
+ const Loading = ({ className, variant = 'orbit', }) => {
22
+ const base = 'text-foreground in-[button]:text-background in-data-[slot=button]:text-background in-[button.bg-transparent]:text-foreground in-[[data-slot=button].bg-transparent]:text-foreground in-[button.bg-secondary]:text-foreground! in-[[data-slot=button].bg-secondary]:text-foreground! size-4';
23
+ if (variant === 'ring') {
24
+ return (_jsxs("svg", { className: cn(base, 'animate-spinner-orbit', className), viewBox: `0 0 ${STATUS_RING.BOX} ${STATUS_RING.BOX}`, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { className: "opacity-25", cx: STATUS_RING.CENTER, cy: STATUS_RING.CENTER, r: STATUS_RING.RADIUS, stroke: "currentColor", strokeWidth: STATUS_RING.STROKE, pathLength: RING_PATH_LENGTH }), _jsx("circle", { className: "animate-spinner-dash", cx: STATUS_RING.CENTER, cy: STATUS_RING.CENTER, r: STATUS_RING.RADIUS, fill: "none", stroke: "currentColor", strokeWidth: STATUS_RING.STROKE, strokeLinecap: "round", pathLength: RING_PATH_LENGTH })] }));
25
+ }
26
+ if (variant === 'spokes') {
27
+ return (_jsx("svg", { className: cn(base, 'animate-spinner-spokes', className), viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: Array.from({ length: SPOKE_COUNT }, (_, i) => (_jsx("line", { x1: "12", y1: "2.5", x2: "12", y2: "7.5", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: 1 - i * SPOKE_FADE_STEP, transform: `rotate(${(i * 360) / SPOKE_COUNT} 12 12)` }, i))) }));
28
+ }
29
+ return (_jsxs("svg", { className: cn(base, 'animate-spinner-orbit', className), viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("circle", { className: "animate-spinner-dash", cx: "12", cy: "12", r: "10", fill: "none", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round" })] }));
30
+ };
31
+ export default Loading;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Formats an instant in an explicit, fixed timezone so the output is
3
+ * deterministic regardless of the runtime's default timezone. Used for the
4
+ * server-rendered fallback (we always render in UTC on the server).
5
+ *
6
+ * Exported for tests: this is the invariant that prevents React hydration
7
+ * mismatch #418 — the server-rendered text must not depend on `process.env.TZ`.
8
+ */
9
+ export declare function formatInTimeZone(date: Date, options: Intl.DateTimeFormatOptions, timeZone: string): string;
10
+ export interface LocalTimeProps {
11
+ /** The instant to render — an ISO string, epoch ms, or Date. */
12
+ value: string | number | Date;
13
+ /** Intl formatting options (weekday/month/day/hour/minute/…). */
14
+ options?: Intl.DateTimeFormatOptions;
15
+ /** Rendered (verbatim) when `value` can't be parsed into a valid date. */
16
+ fallback?: string;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * Renders a date/time that is safe to server-render.
21
+ *
22
+ * `toLocaleString`/`toLocaleDateString` format using the runtime's *default*
23
+ * timezone. During SSR that's the server (UTC); in the browser it's the user's
24
+ * timezone — so the two produce different text for the same instant and React
25
+ * throws a hydration mismatch (minified error #418, e.g. for a release dated
26
+ * near midnight UTC, or any time-of-day on the maintenance page).
27
+ *
28
+ * This component sidesteps that the same way `SessionTimeLabel` does: it renders
29
+ * a **timezone-stable UTC string on the server**, and only switches to the
30
+ * viewer's local timezone *after mount* (in `useEffect`, which never runs on the
31
+ * server). `suppressHydrationWarning` covers the one intentional, post-hydration
32
+ * text swap on this single element.
33
+ */
34
+ export declare function LocalTime({ value, options, fallback, className }: LocalTimeProps): import("react").JSX.Element | null;
@@ -0,0 +1,60 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useState } from 'react';
4
+ /**
5
+ * Formats an instant in an explicit, fixed timezone so the output is
6
+ * deterministic regardless of the runtime's default timezone. Used for the
7
+ * server-rendered fallback (we always render in UTC on the server).
8
+ *
9
+ * Exported for tests: this is the invariant that prevents React hydration
10
+ * mismatch #418 — the server-rendered text must not depend on `process.env.TZ`.
11
+ */
12
+ export function formatInTimeZone(date, options, timeZone) {
13
+ return new Intl.DateTimeFormat('en-US', { ...options, timeZone }).format(date);
14
+ }
15
+ const localFormatterCache = new Map();
16
+ /**
17
+ * Renders a date/time that is safe to server-render.
18
+ *
19
+ * `toLocaleString`/`toLocaleDateString` format using the runtime's *default*
20
+ * timezone. During SSR that's the server (UTC); in the browser it's the user's
21
+ * timezone — so the two produce different text for the same instant and React
22
+ * throws a hydration mismatch (minified error #418, e.g. for a release dated
23
+ * near midnight UTC, or any time-of-day on the maintenance page).
24
+ *
25
+ * This component sidesteps that the same way `SessionTimeLabel` does: it renders
26
+ * a **timezone-stable UTC string on the server**, and only switches to the
27
+ * viewer's local timezone *after mount* (in `useEffect`, which never runs on the
28
+ * server). `suppressHydrationWarning` covers the one intentional, post-hydration
29
+ * text swap on this single element.
30
+ */
31
+ export function LocalTime({ value, options, fallback, className }) {
32
+ const date = value instanceof Date ? value : new Date(value);
33
+ const isValid = !Number.isNaN(date.getTime());
34
+ const fmtOptions = options ?? {
35
+ year: 'numeric',
36
+ month: 'long',
37
+ day: 'numeric',
38
+ };
39
+ // Server + first client render: a stable UTC string (identical in both).
40
+ const serverText = isValid ? formatInTimeZone(date, fmtOptions, 'UTC') : '';
41
+ const [text, setText] = useState(serverText);
42
+ useEffect(() => {
43
+ if (!isValid)
44
+ return;
45
+ // After hydration, re-render in the viewer's own timezone/locale.
46
+ const cacheKey = JSON.stringify(fmtOptions);
47
+ let formatter = localFormatterCache.get(cacheKey);
48
+ if (!formatter) {
49
+ formatter = new Intl.DateTimeFormat('en-US', fmtOptions);
50
+ localFormatterCache.set(cacheKey, formatter);
51
+ }
52
+ setText(formatter.format(date));
53
+ // date / options are derived from props; stringify options for a stable dep.
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
55
+ }, [date.getTime(), JSON.stringify(fmtOptions), isValid]);
56
+ if (!isValid) {
57
+ return fallback !== undefined ? _jsx("span", { className: className, children: fallback }) : null;
58
+ }
59
+ return (_jsx("span", { className: className, suppressHydrationWarning: true, children: text }));
60
+ }