@brightlocal/ui-components 3.1.0 → 3.3.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 (463) hide show
  1. package/AI_USAGE.md +10 -0
  2. package/README.md +8 -1
  3. package/component-meta.json +1591 -123
  4. package/deprecations.json +45 -1
  5. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  6. package/dist/accordion.cjs +1 -1
  7. package/dist/accordion.js +73 -102
  8. package/dist/alert-dialog.cjs +1 -1
  9. package/dist/alert-dialog.d.ts +36 -5
  10. package/dist/alert-dialog.d.ts.map +1 -1
  11. package/dist/alert-dialog.js +83 -128
  12. package/dist/alert.cjs +1 -1
  13. package/dist/alert.d.ts +4 -4
  14. package/dist/alert.d.ts.map +1 -1
  15. package/dist/alert.js +116 -177
  16. package/dist/aspect-ratio.cjs +1 -1
  17. package/dist/aspect-ratio.js +13 -16
  18. package/dist/avatar.cjs +1 -1
  19. package/dist/avatar.js +30 -45
  20. package/dist/badge.cjs +1 -1
  21. package/dist/badge.d.ts +32 -1
  22. package/dist/badge.d.ts.map +1 -1
  23. package/dist/badge.js +90 -71
  24. package/dist/banner.cjs +1 -0
  25. package/dist/banner.d.ts +81 -0
  26. package/dist/banner.d.ts.map +1 -0
  27. package/dist/banner.js +130 -0
  28. package/dist/blocks/empty-state.cjs +1 -1
  29. package/dist/blocks/empty-state.d.ts +24 -6
  30. package/dist/blocks/empty-state.d.ts.map +1 -1
  31. package/dist/blocks/empty-state.js +74 -140
  32. package/dist/blocks/input-list.cjs +2 -2
  33. package/dist/blocks/input-list.d.ts +2 -2
  34. package/dist/blocks/input-list.d.ts.map +1 -1
  35. package/dist/blocks/input-list.js +136 -176
  36. package/dist/blocks/progress-state.cjs +1 -1
  37. package/dist/blocks/progress-state.d.ts +2 -2
  38. package/dist/blocks/progress-state.js +223 -347
  39. package/dist/blocks/sidebar.cjs +1 -1
  40. package/dist/blocks/sidebar.d.ts +28 -6
  41. package/dist/blocks/sidebar.d.ts.map +1 -1
  42. package/dist/blocks/sidebar.js +763 -1086
  43. package/dist/brand-illustration-motif.cjs +1 -1
  44. package/dist/brand-illustration-motif.d.ts +1 -1
  45. package/dist/brand-illustration-motif.js +40 -61
  46. package/dist/breadcrumb.cjs +1 -1
  47. package/dist/breadcrumb.js +62 -102
  48. package/dist/button-group.cjs +1 -1
  49. package/dist/button-group.js +23 -31
  50. package/dist/button.cjs +1 -1
  51. package/dist/button.d.ts +4 -2
  52. package/dist/button.d.ts.map +1 -1
  53. package/dist/button.js +149 -189
  54. package/dist/calendar.cjs +1 -1
  55. package/dist/calendar.d.ts +87 -3
  56. package/dist/calendar.d.ts.map +1 -1
  57. package/dist/calendar.js +116 -173
  58. package/dist/callout.cjs +1 -1
  59. package/dist/callout.js +73 -96
  60. package/dist/card.cjs +1 -1
  61. package/dist/card.d.ts +92 -6
  62. package/dist/card.d.ts.map +1 -1
  63. package/dist/card.js +240 -234
  64. package/dist/carousel.cjs +1 -1
  65. package/dist/carousel.d.ts +3 -3
  66. package/dist/carousel.d.ts.map +1 -1
  67. package/dist/carousel.js +174 -268
  68. package/dist/centred-layout.cjs +1 -1
  69. package/dist/centred-layout.js +27 -48
  70. package/dist/chart-empty.cjs +1 -1
  71. package/dist/chart-empty.js +18 -27
  72. package/dist/chart.cjs +7 -7
  73. package/dist/chart.d.ts +253 -25
  74. package/dist/chart.d.ts.map +1 -1
  75. package/dist/chart.js +465 -511
  76. package/dist/checkbox.cjs +1 -1
  77. package/dist/checkbox.d.ts +1 -1
  78. package/dist/checkbox.d.ts.map +1 -1
  79. package/dist/checkbox.js +37 -69
  80. package/dist/chip.cjs +1 -1
  81. package/dist/chip.js +116 -173
  82. package/dist/collapsible.cjs +1 -1
  83. package/dist/collapsible.d.ts.map +1 -1
  84. package/dist/collapsible.js +35 -41
  85. package/dist/combobox.cjs +3 -3
  86. package/dist/combobox.d.ts +14 -4
  87. package/dist/combobox.d.ts.map +1 -1
  88. package/dist/combobox.js +440 -639
  89. package/dist/command.cjs +1 -1
  90. package/dist/command.d.ts.map +1 -1
  91. package/dist/command.js +273 -420
  92. package/dist/context-menu.cjs +1 -1
  93. package/dist/context-menu.d.ts +5 -5
  94. package/dist/context-menu.d.ts.map +1 -1
  95. package/dist/context-menu.js +121 -191
  96. package/dist/data-table.cjs +1 -1
  97. package/dist/data-table.d.ts +442 -144
  98. package/dist/data-table.d.ts.map +1 -1
  99. package/dist/data-table.js +708 -835
  100. package/dist/date-picker.cjs +1 -1
  101. package/dist/date-picker.d.ts +15 -4
  102. package/dist/date-picker.d.ts.map +1 -1
  103. package/dist/date-picker.js +156 -231
  104. package/dist/delta.cjs +1 -0
  105. package/dist/delta.d.ts +79 -0
  106. package/dist/delta.d.ts.map +1 -0
  107. package/dist/delta.js +62 -0
  108. package/dist/description.cjs +1 -1
  109. package/dist/description.js +11 -20
  110. package/dist/dialog.cjs +1 -1
  111. package/dist/dialog.d.ts +1 -1
  112. package/dist/dialog.d.ts.map +1 -1
  113. package/dist/dialog.js +76 -116
  114. package/dist/drawer.cjs +1 -1
  115. package/dist/drawer.d.ts +11 -11
  116. package/dist/drawer.d.ts.map +1 -1
  117. package/dist/drawer.js +76 -134
  118. package/dist/dropdown-menu.cjs +1 -1
  119. package/dist/dropdown-menu.d.ts +6 -6
  120. package/dist/dropdown-menu.d.ts.map +1 -1
  121. package/dist/dropdown-menu.js +179 -300
  122. package/dist/field.cjs +1 -1
  123. package/dist/field.d.ts +9 -9
  124. package/dist/field.d.ts.map +1 -1
  125. package/dist/field.js +166 -286
  126. package/dist/global-layout.cjs +1 -1
  127. package/dist/global-layout.js +203 -342
  128. package/dist/grid.cjs +1 -1
  129. package/dist/grid.d.ts +24 -1
  130. package/dist/grid.d.ts.map +1 -1
  131. package/dist/grid.js +16 -29
  132. package/dist/header.cjs +1 -1
  133. package/dist/header.js +21 -38
  134. package/dist/height-transition.cjs +1 -1
  135. package/dist/height-transition.js +38 -55
  136. package/dist/hooks/use-breakpoint.cjs +1 -1
  137. package/dist/hooks/use-breakpoint.d.ts +1 -1
  138. package/dist/hooks/use-breakpoint.d.ts.map +1 -1
  139. package/dist/hooks/use-breakpoint.js +10 -9
  140. package/dist/hooks/use-debounce.cjs +1 -1
  141. package/dist/hooks/use-debounce.js +12 -11
  142. package/dist/hooks/use-delayed-pending.cjs +1 -1
  143. package/dist/hooks/use-delayed-pending.js +8 -9
  144. package/dist/hooks/use-filter-search-params.cjs +1 -0
  145. package/dist/hooks/use-filter-search-params.d.ts +93 -0
  146. package/dist/hooks/use-filter-search-params.d.ts.map +1 -0
  147. package/dist/hooks/use-filter-search-params.js +122 -0
  148. package/dist/hooks/use-mobile.cjs +1 -1
  149. package/dist/hooks/use-mobile.js +6 -6
  150. package/dist/hooks/use-overlay-pointer-lock.cjs +1 -1
  151. package/dist/hooks/use-overlay-pointer-lock.js +8 -9
  152. package/dist/hooks/use-prefers-reduced-motion.cjs +1 -1
  153. package/dist/hooks/use-prefers-reduced-motion.js +5 -8
  154. package/dist/hover-card.cjs +1 -1
  155. package/dist/hover-card.d.ts +1 -1
  156. package/dist/hover-card.d.ts.map +1 -1
  157. package/dist/hover-card.js +30 -62
  158. package/dist/index.cjs +1 -1
  159. package/dist/index.d.ts +11 -0
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.js +636 -582
  162. package/dist/info-tooltip.cjs +1 -0
  163. package/dist/info-tooltip.d.ts +39 -0
  164. package/dist/info-tooltip.d.ts.map +1 -0
  165. package/dist/info-tooltip.js +27 -0
  166. package/dist/input-chip.cjs +1 -1
  167. package/dist/input-chip.d.ts +32 -3
  168. package/dist/input-chip.d.ts.map +1 -1
  169. package/dist/input-chip.js +182 -231
  170. package/dist/input-group.cjs +1 -1
  171. package/dist/input-group.d.ts +33 -2
  172. package/dist/input-group.d.ts.map +1 -1
  173. package/dist/input-group.js +188 -122
  174. package/dist/input-otp.cjs +1 -1
  175. package/dist/input-otp.d.ts +3 -3
  176. package/dist/input-otp.d.ts.map +1 -1
  177. package/dist/input-otp.js +102 -146
  178. package/dist/input-password.cjs +1 -1
  179. package/dist/input-password.d.ts +26 -8
  180. package/dist/input-password.d.ts.map +1 -1
  181. package/dist/input-password.js +139 -171
  182. package/dist/input.cjs +1 -1
  183. package/dist/input.d.ts.map +1 -1
  184. package/dist/input.js +51 -73
  185. package/dist/label.cjs +1 -1
  186. package/dist/label.js +20 -38
  187. package/dist/lib/block-illustration.cjs +1 -1
  188. package/dist/lib/block-illustration.d.ts +5 -2
  189. package/dist/lib/block-illustration.d.ts.map +1 -1
  190. package/dist/lib/block-illustration.js +16 -17
  191. package/dist/lib/compose-event-handlers.cjs +1 -0
  192. package/dist/lib/compose-event-handlers.d.ts +9 -0
  193. package/dist/lib/compose-event-handlers.d.ts.map +1 -0
  194. package/dist/lib/compose-event-handlers.js +8 -0
  195. package/dist/lib/download-file.cjs +1 -0
  196. package/dist/lib/download-file.d.ts +14 -0
  197. package/dist/lib/download-file.d.ts.map +1 -0
  198. package/dist/lib/download-file.js +40 -0
  199. package/dist/lib/empty-canvas.cjs +1 -1
  200. package/dist/lib/empty-canvas.js +28 -56
  201. package/dist/lib/empty-chip.cjs +1 -1
  202. package/dist/lib/empty-chip.d.ts +14 -3
  203. package/dist/lib/empty-chip.d.ts.map +1 -1
  204. package/dist/lib/empty-chip.js +15 -11
  205. package/dist/lib/field-aria.cjs +1 -0
  206. package/dist/lib/field-aria.d.ts +34 -0
  207. package/dist/lib/field-aria.d.ts.map +1 -0
  208. package/dist/lib/field-aria.js +52 -0
  209. package/dist/lib/image-file-info.cjs +1 -0
  210. package/dist/lib/image-file-info.d.ts +25 -0
  211. package/dist/lib/image-file-info.d.ts.map +1 -0
  212. package/dist/lib/image-file-info.js +67 -0
  213. package/dist/lib/media-viewer-content.cjs +1 -0
  214. package/dist/lib/media-viewer-content.d.ts +102 -0
  215. package/dist/lib/media-viewer-content.d.ts.map +1 -0
  216. package/dist/lib/media-viewer-content.js +650 -0
  217. package/dist/lib/media-viewer-internal.cjs +1 -0
  218. package/dist/lib/media-viewer-internal.d.ts +98 -0
  219. package/dist/lib/media-viewer-internal.d.ts.map +1 -0
  220. package/dist/lib/media-viewer-internal.js +61 -0
  221. package/dist/lib/media-viewer-motion.cjs +1 -0
  222. package/dist/lib/media-viewer-motion.d.ts +40 -0
  223. package/dist/lib/media-viewer-motion.d.ts.map +1 -0
  224. package/dist/lib/media-viewer-motion.js +37 -0
  225. package/dist/lib/motion.cjs +1 -1
  226. package/dist/lib/motion.d.ts +8 -0
  227. package/dist/lib/motion.d.ts.map +1 -1
  228. package/dist/lib/motion.js +11 -10
  229. package/dist/lib/optical-center.cjs +1 -1
  230. package/dist/lib/optical-center.d.ts +1 -1
  231. package/dist/lib/optical-center.d.ts.map +1 -1
  232. package/dist/lib/optical-center.js +12 -5
  233. package/dist/lib/spring-settle.cjs +1 -1
  234. package/dist/lib/spring-settle.js +1 -1
  235. package/dist/lib/table-internal.cjs +1 -0
  236. package/dist/lib/table-internal.d.ts +62 -0
  237. package/dist/lib/table-internal.d.ts.map +1 -0
  238. package/dist/lib/table-internal.js +18 -0
  239. package/dist/lib/use-controllable.cjs +1 -0
  240. package/dist/lib/use-controllable.d.ts +12 -0
  241. package/dist/lib/use-controllable.d.ts.map +1 -0
  242. package/dist/lib/use-controllable.js +15 -0
  243. package/dist/lib/use-dev-warning.cjs +1 -1
  244. package/dist/lib/utils.cjs +1 -1
  245. package/dist/lib/utils.d.ts.map +1 -1
  246. package/dist/lib/utils.js +29 -35
  247. package/dist/link.cjs +1 -1
  248. package/dist/link.d.ts +1 -1
  249. package/dist/link.js +78 -124
  250. package/dist/list.cjs +1 -1
  251. package/dist/list.d.ts +8 -0
  252. package/dist/list.d.ts.map +1 -1
  253. package/dist/list.js +94 -156
  254. package/dist/loading.cjs +1 -1
  255. package/dist/loading.js +124 -151
  256. package/dist/logo-mark.cjs +1 -0
  257. package/dist/logo-mark.d.ts +79 -0
  258. package/dist/logo-mark.d.ts.map +1 -0
  259. package/dist/logo-mark.js +219 -0
  260. package/dist/logo.cjs +1 -1
  261. package/dist/logo.d.ts +1 -1
  262. package/dist/logo.d.ts.map +1 -1
  263. package/dist/logo.js +51 -87
  264. package/dist/map.cjs +1 -1
  265. package/dist/map.d.ts.map +1 -1
  266. package/dist/map.js +390 -586
  267. package/dist/media-empty.cjs +1 -1
  268. package/dist/media-empty.js +27 -42
  269. package/dist/media-viewer.cjs +1 -0
  270. package/dist/media-viewer.d.ts +224 -0
  271. package/dist/media-viewer.d.ts.map +1 -0
  272. package/dist/media-viewer.js +295 -0
  273. package/dist/menubar.cjs +1 -1
  274. package/dist/menubar.d.ts +14 -14
  275. package/dist/menubar.d.ts.map +1 -1
  276. package/dist/menubar.js +130 -267
  277. package/dist/multi-select-filter.cjs +1 -0
  278. package/dist/multi-select-filter.d.ts +186 -0
  279. package/dist/multi-select-filter.d.ts.map +1 -0
  280. package/dist/multi-select-filter.js +374 -0
  281. package/dist/navigation-menu.cjs +1 -1
  282. package/dist/navigation-menu.js +108 -172
  283. package/dist/pagination.cjs +1 -1
  284. package/dist/pagination.d.ts +36 -12
  285. package/dist/pagination.d.ts.map +1 -1
  286. package/dist/pagination.js +208 -281
  287. package/dist/popover.cjs +1 -1
  288. package/dist/popover.d.ts +1 -1
  289. package/dist/popover.d.ts.map +1 -1
  290. package/dist/popover.js +34 -45
  291. package/dist/progress.cjs +1 -1
  292. package/dist/progress.d.ts +139 -17
  293. package/dist/progress.d.ts.map +1 -1
  294. package/dist/progress.js +116 -148
  295. package/dist/radio-group.cjs +1 -1
  296. package/dist/radio-group.js +90 -146
  297. package/dist/rating.cjs +1 -1
  298. package/dist/rating.d.ts +80 -13
  299. package/dist/rating.d.ts.map +1 -1
  300. package/dist/rating.js +70 -65
  301. package/dist/relative-date.cjs +1 -0
  302. package/dist/relative-date.d.ts +65 -0
  303. package/dist/relative-date.d.ts.map +1 -0
  304. package/dist/relative-date.js +112 -0
  305. package/dist/resizable.cjs +1 -1
  306. package/dist/resizable.d.ts +39 -23
  307. package/dist/resizable.d.ts.map +1 -1
  308. package/dist/resizable.js +42 -44
  309. package/dist/result-count.cjs +1 -0
  310. package/dist/result-count.d.ts +110 -0
  311. package/dist/result-count.d.ts.map +1 -0
  312. package/dist/result-count.js +49 -0
  313. package/dist/route-progress.cjs +1 -1
  314. package/dist/route-progress.js +58 -102
  315. package/dist/scroll-area.cjs +1 -1
  316. package/dist/scroll-area.d.ts +9 -1
  317. package/dist/scroll-area.d.ts.map +1 -1
  318. package/dist/scroll-area.js +44 -79
  319. package/dist/select.cjs +2 -2
  320. package/dist/select.d.ts +20 -10
  321. package/dist/select.d.ts.map +1 -1
  322. package/dist/select.js +132 -236
  323. package/dist/separator.cjs +1 -1
  324. package/dist/separator.js +90 -78
  325. package/dist/sheet.cjs +1 -1
  326. package/dist/sheet.d.ts +86 -7
  327. package/dist/sheet.d.ts.map +1 -1
  328. package/dist/sheet.js +275 -235
  329. package/dist/single-select-filter.cjs +1 -0
  330. package/dist/single-select-filter.d.ts +113 -0
  331. package/dist/single-select-filter.d.ts.map +1 -0
  332. package/dist/single-select-filter.js +224 -0
  333. package/dist/skeleton.cjs +1 -1
  334. package/dist/skeleton.js +24 -38
  335. package/dist/slider.cjs +1 -1
  336. package/dist/slider.js +51 -81
  337. package/dist/sonner.cjs +1 -1
  338. package/dist/sonner.d.ts +1 -1
  339. package/dist/sonner.d.ts.map +1 -1
  340. package/dist/sonner.js +113 -137
  341. package/dist/spinner.cjs +1 -1
  342. package/dist/spinner.js +22 -31
  343. package/dist/split-layout.cjs +1 -1
  344. package/dist/split-layout.d.ts +1 -1
  345. package/dist/split-layout.js +53 -102
  346. package/dist/status.cjs +1 -0
  347. package/dist/status.d.ts +51 -0
  348. package/dist/status.d.ts.map +1 -0
  349. package/dist/status.js +60 -0
  350. package/dist/stepper.cjs +1 -1
  351. package/dist/stepper.js +184 -316
  352. package/dist/switch.cjs +1 -1
  353. package/dist/switch.js +17 -32
  354. package/dist/table.cjs +1 -1
  355. package/dist/table.d.ts +127 -13
  356. package/dist/table.d.ts.map +1 -1
  357. package/dist/table.js +170 -192
  358. package/dist/tabs.cjs +1 -1
  359. package/dist/tabs.d.ts +12 -1
  360. package/dist/tabs.d.ts.map +1 -1
  361. package/dist/tabs.js +123 -146
  362. package/dist/text-reveal-motion.cjs +1 -1
  363. package/dist/text-reveal-motion.js +307 -363
  364. package/dist/textarea.cjs +1 -1
  365. package/dist/textarea.d.ts.map +1 -1
  366. package/dist/textarea.js +23 -36
  367. package/dist/toggle-group.cjs +1 -1
  368. package/dist/toggle-group.js +43 -62
  369. package/dist/toggle.cjs +1 -1
  370. package/dist/toggle.js +34 -46
  371. package/dist/tooltip.cjs +1 -1
  372. package/dist/tooltip.d.ts +38 -36
  373. package/dist/tooltip.d.ts.map +1 -1
  374. package/dist/tooltip.js +175 -78
  375. package/dist/typography-heading.cjs +1 -1
  376. package/dist/typography-heading.js +25 -61
  377. package/dist/typography-text.cjs +1 -1
  378. package/dist/typography-text.d.ts +1 -2
  379. package/dist/typography-text.d.ts.map +1 -1
  380. package/dist/typography-text.js +27 -57
  381. package/dist/typography.cjs +1 -1
  382. package/dist/typography.d.ts +1 -1
  383. package/dist/typography.js +132 -340
  384. package/package.json +45 -46
  385. package/src/blocks/empty-state.tsx +42 -21
  386. package/src/blocks/progress-state.tsx +2 -2
  387. package/src/blocks/sidebar.tsx +111 -32
  388. package/src/components/accordion.tsx +1 -1
  389. package/src/components/alert-dialog.tsx +52 -5
  390. package/src/components/alert.tsx +16 -8
  391. package/src/components/badge.tsx +152 -3
  392. package/src/components/banner.tsx +288 -0
  393. package/src/components/brand-illustration-motif.tsx +1 -1
  394. package/src/components/breadcrumb.tsx +1 -1
  395. package/src/components/button.tsx +8 -6
  396. package/src/components/calendar.tsx +155 -9
  397. package/src/components/card.tsx +266 -26
  398. package/src/components/carousel.tsx +4 -1
  399. package/src/components/chart.tsx +664 -42
  400. package/src/components/checkbox.tsx +2 -2
  401. package/src/components/collapsible.tsx +4 -1
  402. package/src/components/combobox.tsx +42 -9
  403. package/src/components/command.tsx +10 -11
  404. package/src/components/context-menu.tsx +4 -4
  405. package/src/components/data-table.tsx +1363 -398
  406. package/src/components/date-picker.tsx +31 -4
  407. package/src/components/delta.tsx +217 -0
  408. package/src/components/drawer.tsx +5 -5
  409. package/src/components/dropdown-menu.tsx +4 -4
  410. package/src/components/field.tsx +36 -15
  411. package/src/components/global-layout.tsx +1 -1
  412. package/src/components/grid.tsx +32 -1
  413. package/src/components/info-tooltip.tsx +94 -0
  414. package/src/components/input-chip.tsx +52 -8
  415. package/src/components/input-group.tsx +247 -12
  416. package/src/components/input-otp.tsx +1 -1
  417. package/src/components/input-password.tsx +29 -11
  418. package/src/components/input.tsx +11 -2
  419. package/src/components/list.tsx +15 -3
  420. package/src/components/logo-mark.tsx +345 -0
  421. package/src/components/map.tsx +18 -20
  422. package/src/components/media-viewer.tsx +908 -0
  423. package/src/components/multi-select-filter.tsx +1046 -0
  424. package/src/components/navigation-menu.tsx +2 -2
  425. package/src/components/pagination.tsx +86 -26
  426. package/src/components/progress.tsx +281 -54
  427. package/src/components/rating.tsx +200 -74
  428. package/src/components/relative-date.tsx +238 -0
  429. package/src/components/resizable.tsx +86 -33
  430. package/src/components/result-count.tsx +253 -0
  431. package/src/components/scroll-area.tsx +31 -5
  432. package/src/components/select.tsx +37 -7
  433. package/src/components/sheet.tsx +252 -6
  434. package/src/components/single-select-filter.tsx +538 -0
  435. package/src/components/slider.tsx +2 -2
  436. package/src/components/sonner.tsx +16 -5
  437. package/src/components/split-layout.tsx +2 -2
  438. package/src/components/status.tsx +162 -0
  439. package/src/components/switch.tsx +1 -1
  440. package/src/components/table.tsx +305 -73
  441. package/src/components/tabs.tsx +94 -46
  442. package/src/components/textarea.tsx +21 -3
  443. package/src/components/toggle.tsx +2 -2
  444. package/src/components/tooltip.tsx +431 -68
  445. package/src/components/typography-text.tsx +1 -2
  446. package/src/components/typography.tsx +1 -1
  447. package/src/hooks/use-breakpoint.ts +2 -1
  448. package/src/hooks/use-filter-search-params.ts +302 -0
  449. package/src/index.ts +11 -0
  450. package/src/lib/block-illustration.tsx +5 -1
  451. package/src/lib/compose-event-handlers.ts +14 -0
  452. package/src/lib/download-file.ts +61 -0
  453. package/src/lib/empty-chip.tsx +52 -0
  454. package/src/lib/field-aria.tsx +97 -0
  455. package/src/lib/image-file-info.ts +102 -0
  456. package/src/lib/media-viewer-content.tsx +1587 -0
  457. package/src/lib/media-viewer-internal.tsx +191 -0
  458. package/src/lib/media-viewer-motion.ts +120 -0
  459. package/src/lib/motion.ts +9 -0
  460. package/src/lib/table-internal.ts +74 -0
  461. package/src/lib/use-controllable.ts +43 -0
  462. package/src/lib/utils.ts +1 -0
  463. package/src/lib/empty-chip.ts +0 -24
@@ -0,0 +1,538 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import type { VariantProps } from "class-variance-authority";
5
+
6
+ import { ChevronDown, SearchX } from "@brightlocal/icons";
7
+ import { Button } from "@brightlocal/ui-components/button";
8
+ import {
9
+ Drawer,
10
+ DrawerBody,
11
+ DrawerClose,
12
+ DrawerContent,
13
+ DrawerDescription,
14
+ DrawerFooter,
15
+ DrawerHeader,
16
+ DrawerTitle,
17
+ DrawerTrigger,
18
+ } from "@brightlocal/ui-components/drawer";
19
+ import { useIsBelowBreakpoint } from "@brightlocal/ui-components/hooks/use-breakpoint";
20
+ import {
21
+ InputGroup,
22
+ InputGroupClear,
23
+ InputGroupInput,
24
+ } from "@brightlocal/ui-components/input-group";
25
+ import { Label } from "@brightlocal/ui-components/label";
26
+ import { EmptyChip } from "../lib/empty-chip";
27
+ import {
28
+ RadioGroup,
29
+ RadioGroupItem,
30
+ } from "@brightlocal/ui-components/radio-group";
31
+ import {
32
+ Select,
33
+ SelectContent,
34
+ SelectItem,
35
+ SelectTrigger,
36
+ SelectValue,
37
+ } from "@brightlocal/ui-components/select";
38
+ import { cn } from "@brightlocal/ui-components/lib/utils";
39
+ import { multiSelectFilterTriggerVariants } from "@brightlocal/ui-components/multi-select-filter";
40
+
41
+ /* SingleSelectFilter — the Filtering pattern's single-value dimension
42
+ (Patterns/Filtering → Which filter → 5 or more, one at a time):
43
+ one value from one dimension, e.g. time period, interval, source type.
44
+
45
+ Desktop. A DS Select reads its chosen label and opens a native listbox —
46
+ the same dropdown the form Select uses, wearing the filter trigger look
47
+ (multiSelectFilterTriggerVariants) so it sits beside a MultiSelectFilter
48
+ in a toolbar row without looking different.
49
+
50
+ Mobile. Below the md breakpoint (or when presentation="drawer") the
51
+ trigger opens a bottom Drawer with RadioGroup in two columns — the same
52
+ anatomy as MultiSelectFilter's drawer, using radios instead of checkboxes
53
+ because only one value can be active. Picking any radio applies at once;
54
+ Clear resets to defaultValue; Done closes.
55
+
56
+ Commit model matches MultiSelectFilter: onValueChange fires on every
57
+ pick so client data can reflect immediately. */
58
+
59
+ /* ------------------------------------------------------------------------ */
60
+ /* Types */
61
+ /* ------------------------------------------------------------------------ */
62
+
63
+ interface SingleSelectFilterOption<Value extends string = string> {
64
+ value: Value;
65
+ label: string;
66
+ count?: number;
67
+ disabled?: boolean;
68
+ /**
69
+ * Glyph before the label in the menu and the drawer — the option's own
70
+ * mark (a source's logo, a period's clock), 16px. The trigger wears the
71
+ * picked option's glyph when no `icon` is set. Hidden from assistive tech.
72
+ */
73
+ icon?: React.ReactNode;
74
+ }
75
+
76
+ interface SingleSelectFilterProps<Value extends string = string>
77
+ extends
78
+ Omit<
79
+ React.ComponentPropsWithoutRef<"button">,
80
+ "value" | "defaultValue" | "onChange" | "children"
81
+ >,
82
+ VariantProps<typeof multiSelectFilterTriggerVariants> {
83
+ /** Data hook for automated testing (REQUIRED). */
84
+ dataHook: string;
85
+ /**
86
+ * The dimension's name — drawer title, Select accessible label.
87
+ * Use the product's words ("Time period"), never an internal field name.
88
+ */
89
+ label: string;
90
+ /**
91
+ * The selectable options, in the dimension's own order. Values must be
92
+ * non-empty — `""` means "nothing picked", so make "All" an explicit value.
93
+ */
94
+ options: readonly SingleSelectFilterOption<Value>[];
95
+ /** Controlled selected value. */
96
+ value?: Value;
97
+ /**
98
+ * Initial value for uncontrolled mode.
99
+ * @default ""
100
+ */
101
+ defaultValue?: Value;
102
+ /** Callback on every pick. */
103
+ onValueChange?: (value: Value) => void;
104
+ /** Controlled open state. */
105
+ open?: boolean;
106
+ /** Callback when the surface opens or closes. */
107
+ onOpenChange?: (open: boolean) => void;
108
+ /**
109
+ * Fixed glyph leading the trigger — the dimension's own icon (a calendar,
110
+ * a funnel), 16px. Without it the trigger wears the picked option's
111
+ * `option.icon`. Hidden from assistive tech.
112
+ */
113
+ icon?: React.ReactNode;
114
+ /**
115
+ * How the options open: the DS Select `menu`, a bottom `drawer`, or `auto`
116
+ * — the menu from the md breakpoint up and the drawer below it.
117
+ * @default "menu"
118
+ */
119
+ presentation?: "menu" | "drawer" | "auto";
120
+ /** Disables the trigger. */
121
+ disabled?: boolean;
122
+ /**
123
+ * Label of the clear action inside the drawer.
124
+ * @default "Clear filters"
125
+ */
126
+ clearLabel?: string;
127
+ /**
128
+ * Label of the drawer's Done button.
129
+ * @default "Done"
130
+ */
131
+ doneLabel?: string;
132
+ /**
133
+ * Screen-reader description of the drawer.
134
+ * @default "Pick one option."
135
+ */
136
+ drawerDescription?: string;
137
+ /**
138
+ * Show a search field in the drawer when the list is long.
139
+ * `true` forces it on, `false` forces it off; leave `undefined` to show it
140
+ * automatically when `options.length > searchThreshold`.
141
+ */
142
+ searchable?: boolean;
143
+ /**
144
+ * Number of options above which the drawer shows a search field
145
+ * automatically (unless `searchable` overrides it).
146
+ * @default 10
147
+ */
148
+ searchThreshold?: number;
149
+ /**
150
+ * Placeholder and aria-label for the drawer search field.
151
+ * @default "Search options..."
152
+ */
153
+ searchPlaceholder?: string;
154
+ /**
155
+ * Accessible label for the search clear button.
156
+ * @default "Clear search"
157
+ */
158
+ clearSearchAriaLabel?: string;
159
+ /**
160
+ * Heading of the empty state shown when the search matches nothing.
161
+ * @default "No options found."
162
+ */
163
+ emptyLabel?: string;
164
+ /**
165
+ * Description below the empty state heading.
166
+ * @default "Try another search."
167
+ */
168
+ emptyDescription?: string;
169
+ /** Analytics element identifier. @default "single-select-filter" */
170
+ trackingEl?: string;
171
+ /** Analytics label */
172
+ trackingLabel?: string;
173
+ }
174
+
175
+ /* ------------------------------------------------------------------------ */
176
+ /* Engine */
177
+ /* ------------------------------------------------------------------------ */
178
+
179
+ interface UseSingleSelectFilterStateOptions<Value extends string = string> {
180
+ value?: Value;
181
+ defaultValue: Value;
182
+ onValueChange?: (value: Value) => void;
183
+ open?: boolean;
184
+ onOpenChange?: (open: boolean) => void;
185
+ }
186
+
187
+ function useSingleSelectFilterState<Value extends string = string>({
188
+ value: controlledValue,
189
+ defaultValue,
190
+ onValueChange,
191
+ open: controlledOpen,
192
+ onOpenChange,
193
+ }: UseSingleSelectFilterStateOptions<Value>) {
194
+ const [uncontrolledValue, setUncontrolledValue] =
195
+ React.useState<Value>(defaultValue);
196
+ const isControlled = controlledValue !== undefined;
197
+ const value = isControlled ? controlledValue : uncontrolledValue;
198
+
199
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
200
+ const isOpenControlled = controlledOpen !== undefined;
201
+ const open = isOpenControlled ? controlledOpen : uncontrolledOpen;
202
+
203
+ const setValue = React.useCallback(
204
+ (next: Value) => {
205
+ if (!isControlled) setUncontrolledValue(next);
206
+ onValueChange?.(next);
207
+ },
208
+ [isControlled, onValueChange]
209
+ );
210
+
211
+ const handleOpenChange = React.useCallback(
212
+ (next: boolean) => {
213
+ if (!isOpenControlled) setUncontrolledOpen(next);
214
+ onOpenChange?.(next);
215
+ },
216
+ [isOpenControlled, onOpenChange]
217
+ );
218
+
219
+ return {
220
+ clear: () => setValue(defaultValue),
221
+ onOpenChange: handleOpenChange,
222
+ open,
223
+ setValue,
224
+ value,
225
+ };
226
+ }
227
+
228
+ /* ------------------------------------------------------------------------ */
229
+ /* Pieces */
230
+ /* ------------------------------------------------------------------------ */
231
+
232
+ function OptionCount({ count }: { count: number }) {
233
+ return (
234
+ <span className="text-muted-foreground text-label-sm ml-auto tabular-nums">
235
+ {count}
236
+ </span>
237
+ );
238
+ }
239
+
240
+ function Glyph({
241
+ children,
242
+ dataHook,
243
+ }: {
244
+ children: React.ReactNode;
245
+ dataHook: string;
246
+ }) {
247
+ return (
248
+ <span
249
+ aria-hidden="true"
250
+ className="flex shrink-0 items-center [&_svg]:size-4"
251
+ data-hook={dataHook}
252
+ >
253
+ {children}
254
+ </span>
255
+ );
256
+ }
257
+
258
+ /* ------------------------------------------------------------------------ */
259
+ /* Component */
260
+ /* ------------------------------------------------------------------------ */
261
+
262
+ function SingleSelectFilterInner<Value extends string = string>({
263
+ className,
264
+ dataHook,
265
+ label,
266
+ options,
267
+ value: controlledValue,
268
+ defaultValue = "" as Value,
269
+ onValueChange,
270
+ open: controlledOpen,
271
+ onOpenChange,
272
+ size = "default",
273
+ icon,
274
+ presentation = "menu",
275
+ disabled = false,
276
+ clearLabel,
277
+ doneLabel,
278
+ drawerDescription,
279
+ searchable,
280
+ searchThreshold = 10,
281
+ searchPlaceholder,
282
+ clearSearchAriaLabel,
283
+ emptyLabel,
284
+ emptyDescription,
285
+ trackingEl,
286
+ trackingLabel,
287
+ "aria-label": ariaLabelProp,
288
+ ref,
289
+ ...props
290
+ }: SingleSelectFilterProps<Value> & {
291
+ ref?: React.Ref<HTMLButtonElement>;
292
+ }) {
293
+ const state = useSingleSelectFilterState<Value>({
294
+ defaultValue,
295
+ onOpenChange,
296
+ onValueChange,
297
+ open: controlledOpen,
298
+ value: controlledValue,
299
+ });
300
+
301
+ const [query, setQuery] = React.useState("");
302
+ const normalizedQuery = query.trim().toLowerCase();
303
+ const showSearch = searchable ?? options.length > searchThreshold;
304
+ const searching = showSearch && normalizedQuery.length > 0;
305
+ const visibleOptions = searching
306
+ ? options.filter(
307
+ (option) =>
308
+ option.label.toLowerCase().includes(normalizedQuery) ||
309
+ option.value.toLowerCase().includes(normalizedQuery)
310
+ )
311
+ : options;
312
+
313
+ const handleOpenChange = (next: boolean) => {
314
+ if (next) setQuery("");
315
+ state.onOpenChange(next);
316
+ };
317
+
318
+ const belowMd = useIsBelowBreakpoint("md");
319
+ const useDrawer =
320
+ presentation === "drawer" || (presentation === "auto" && belowMd);
321
+ const idPrefix = React.useId();
322
+
323
+ const selected =
324
+ state.value === ""
325
+ ? undefined
326
+ : options.find((option) => option.value === state.value);
327
+ const selectedLabel = selected?.label;
328
+ const hasValue = selected !== undefined;
329
+
330
+ const triggerText = hasValue ? selectedLabel : label;
331
+ const triggerIcon = icon ?? selected?.icon;
332
+ const triggerGlyph = triggerIcon ? (
333
+ <Glyph dataHook={`${dataHook}-icon`}>{triggerIcon}</Glyph>
334
+ ) : null;
335
+
336
+ const computedAriaLabel = hasValue ? `${label}: ${selectedLabel}` : label;
337
+
338
+ /* ------- Drawer mode ------- */
339
+ if (useDrawer) {
340
+ const triggerNode = (
341
+ <button
342
+ ref={ref}
343
+ aria-label={ariaLabelProp ?? computedAriaLabel}
344
+ className={cn(multiSelectFilterTriggerVariants({ size }), className)}
345
+ data-hook={dataHook}
346
+ data-slot="single-select-filter"
347
+ data-tracking-el={trackingEl ?? "single-select-filter"}
348
+ data-tracking-label={trackingLabel}
349
+ disabled={disabled}
350
+ type="button"
351
+ {...props}
352
+ >
353
+ {triggerGlyph}
354
+ <span data-hook={`${dataHook}-summary`}>{triggerText}</span>
355
+ <ChevronDown aria-hidden="true" className="text-muted-foreground" />
356
+ </button>
357
+ );
358
+
359
+ return (
360
+ <Drawer open={state.open} onOpenChange={handleOpenChange}>
361
+ <DrawerTrigger asChild>{triggerNode}</DrawerTrigger>
362
+ <DrawerContent dataHook={`${dataHook}-drawer`}>
363
+ <DrawerHeader>
364
+ <DrawerTitle>{label}</DrawerTitle>
365
+ <DrawerDescription className="sr-only">
366
+ {drawerDescription ?? "Pick one option."}
367
+ </DrawerDescription>
368
+ </DrawerHeader>
369
+ {showSearch ? (
370
+ <DrawerBody className="shrink-0 pb-4">
371
+ <InputGroup dataHook={`${dataHook}-search`}>
372
+ <InputGroupInput
373
+ aria-label={searchPlaceholder ?? "Search options..."}
374
+ placeholder={searchPlaceholder ?? "Search options..."}
375
+ value={query}
376
+ onChange={(event) => setQuery(event.target.value)}
377
+ />
378
+ <InputGroupClear
379
+ clearSearchAriaLabel={clearSearchAriaLabel}
380
+ dataHook={`${dataHook}-search-clear`}
381
+ />
382
+ </InputGroup>
383
+ </DrawerBody>
384
+ ) : null}
385
+ <DrawerBody className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto pt-1 pb-2">
386
+ {searching && visibleOptions.length === 0 ? (
387
+ <div
388
+ className="text-body-sm flex flex-col items-center gap-1 py-6 text-center"
389
+ data-hook={`${dataHook}-empty`}
390
+ >
391
+ <EmptyChip
392
+ className="mb-1"
393
+ dataHook={`${dataHook}-empty-icon`}
394
+ icon={<SearchX />}
395
+ slot="single-select-filter-empty-icon"
396
+ />
397
+ <p>{emptyLabel ?? "No options found."}</p>
398
+ <p className="text-muted-foreground">
399
+ {emptyDescription ?? "Try another search."}
400
+ </p>
401
+ </div>
402
+ ) : (
403
+ <RadioGroup
404
+ className="grid grid-cols-2 gap-x-4 gap-y-3"
405
+ dataHook={`${dataHook}-radio-group`}
406
+ value={state.value}
407
+ onValueChange={(next) => {
408
+ state.setValue(next as Value);
409
+ }}
410
+ >
411
+ {visibleOptions.map((option, index) => {
412
+ const optionDisabled = option.disabled || option.count === 0;
413
+ const optionId = `${idPrefix}-${index}`;
414
+ return (
415
+ <div key={option.value} className="flex items-center gap-2">
416
+ <RadioGroupItem
417
+ data-hook={`${dataHook}-option-${option.value}`}
418
+ disabled={optionDisabled}
419
+ id={optionId}
420
+ value={option.value}
421
+ />
422
+ <Label className="flex-1 gap-2" htmlFor={optionId}>
423
+ {option.icon ? (
424
+ <Glyph
425
+ dataHook={`${dataHook}-option-${option.value}-icon`}
426
+ >
427
+ {option.icon}
428
+ </Glyph>
429
+ ) : null}
430
+ {option.label}
431
+ </Label>
432
+ {option.count !== undefined ? (
433
+ <OptionCount count={option.count} />
434
+ ) : null}
435
+ </div>
436
+ );
437
+ })}
438
+ </RadioGroup>
439
+ )}
440
+ {hasValue && state.value !== defaultValue && !searching ? (
441
+ <Button
442
+ dataHook={`${dataHook}-clear`}
443
+ variant="ghost"
444
+ onClick={() => state.clear()}
445
+ >
446
+ {clearLabel ?? "Clear filters"}
447
+ </Button>
448
+ ) : null}
449
+ </DrawerBody>
450
+ <DrawerFooter>
451
+ <DrawerClose asChild>
452
+ <Button dataHook={`${dataHook}-done`}>
453
+ {doneLabel ?? "Done"}
454
+ </Button>
455
+ </DrawerClose>
456
+ </DrawerFooter>
457
+ </DrawerContent>
458
+ </Drawer>
459
+ );
460
+ }
461
+
462
+ /* ------- Select mode (desktop) ------- */
463
+ return (
464
+ <span
465
+ data-hook={dataHook}
466
+ data-slot="single-select-filter"
467
+ data-tracking-el={trackingEl ?? "single-select-filter"}
468
+ data-tracking-label={trackingLabel}
469
+ >
470
+ <Select
471
+ disabled={disabled}
472
+ open={state.open}
473
+ value={state.value}
474
+ onOpenChange={handleOpenChange}
475
+ onValueChange={(next) => state.setValue(next as Value)}
476
+ >
477
+ <SelectTrigger
478
+ ref={ref}
479
+ className={cn(
480
+ multiSelectFilterTriggerVariants({ size }),
481
+ // A filter reads the dimension name like a value, never muted.
482
+ "data-[placeholder]:text-foreground w-auto",
483
+ className
484
+ )}
485
+ dataHook={`${dataHook}-trigger`}
486
+ selectLabel={ariaLabelProp ?? computedAriaLabel}
487
+ {...props}
488
+ >
489
+ {triggerGlyph}
490
+ {/* Children replace Radix's mirror of the picked item, so the
491
+ trigger shows only the label — never the item's icon or count. */}
492
+ <SelectValue placeholder={label}>{selectedLabel}</SelectValue>
493
+ </SelectTrigger>
494
+ <SelectContent align="start">
495
+ {options.map((option) => {
496
+ const optionDisabled = option.disabled || option.count === 0;
497
+ return (
498
+ <SelectItem
499
+ key={option.value}
500
+ data-hook={`${dataHook}-option-${option.value}`}
501
+ disabled={optionDisabled}
502
+ hint={
503
+ option.count !== undefined ? (
504
+ <span className="tabular-nums">{option.count}</span>
505
+ ) : undefined
506
+ }
507
+ value={option.value}
508
+ >
509
+ <span className="flex items-center gap-2">
510
+ {option.icon ? (
511
+ <Glyph dataHook={`${dataHook}-option-${option.value}-icon`}>
512
+ {option.icon}
513
+ </Glyph>
514
+ ) : null}
515
+ {option.label}
516
+ </span>
517
+ </SelectItem>
518
+ );
519
+ })}
520
+ </SelectContent>
521
+ </Select>
522
+ </span>
523
+ );
524
+ }
525
+
526
+ // No forwardRef: it erases the Value generic; React 19 passes ref as a prop.
527
+ const SingleSelectFilter = SingleSelectFilterInner as <
528
+ Value extends string = string,
529
+ >(
530
+ props: SingleSelectFilterProps<Value> & {
531
+ ref?: React.Ref<HTMLButtonElement>;
532
+ }
533
+ ) => React.ReactElement | null;
534
+
535
+ SingleSelectFilterInner.displayName = "SingleSelectFilter";
536
+
537
+ export { SingleSelectFilter, type SingleSelectFilterOption };
538
+ export type { SingleSelectFilterProps };
@@ -138,7 +138,7 @@ const Slider = React.forwardRef<
138
138
  <SliderPrimitive.Root
139
139
  ref={ref}
140
140
  className={cn(
141
- "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
141
+ "relative flex w-full cursor-pointer touch-none items-center select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
142
142
  className
143
143
  )}
144
144
  data-hook={dataHook}
@@ -169,7 +169,7 @@ const Slider = React.forwardRef<
169
169
  <SliderPrimitive.Thumb
170
170
  key={index}
171
171
  aria-label={getThumbLabel(index)}
172
- className="border-primary bg-background ring-ring/50 duration-fast block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] ease-out hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
172
+ className="border-primary bg-background ring-ring/50 duration-fast block size-4 shrink-0 cursor-grab rounded-full border shadow-sm transition-[color,box-shadow] ease-out hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden active:cursor-grabbing disabled:pointer-events-none disabled:opacity-50"
173
173
  data-slot="slider-thumb"
174
174
  />
175
175
  ))}
@@ -69,6 +69,17 @@ type ToastInput = Omit<ToastProps, "id"> & { id?: string | number };
69
69
  const DEFAULT_DURATION = 4000;
70
70
 
71
71
  // CVA variant definitions extracted for reusability and testing
72
+ //
73
+ // The success colour schema repeats `text-success-foreground
74
+ // dark:text-green-100` across title, description and icon rather than sharing a
75
+ // constant: the token-drift scanner classifies utility strings per source line
76
+ // and does not resolve identifiers, so a constant would hide these three
77
+ // usages from the audit instead of tokenising them.
78
+ //
79
+ // `dark:text-green-100` stays a palette class on purpose. The success toast
80
+ // sits on the `popover` surface in dark, and no semantic token resolves to
81
+ // green-100 (#e7faeb) there — `success-foreground` is green-200 (#baf5c8) in
82
+ // dark, so switching would change the rendered colour.
72
83
  const CONTAINER_VARIANTS = cva(
73
84
  [
74
85
  "flex",
@@ -87,8 +98,8 @@ const CONTAINER_VARIANTS = cva(
87
98
  {
88
99
  variants: {
89
100
  colorSchema: {
90
- default: "bg-white dark:bg-popover",
91
- success: "bg-green-200 dark:bg-popover",
101
+ default: "bg-popover",
102
+ success: "bg-success-background dark:bg-popover",
92
103
  },
93
104
  },
94
105
  defaultVariants: {
@@ -101,7 +112,7 @@ const TITLE_VARIANTS = cva("text-heading-compact", {
101
112
  variants: {
102
113
  colorSchema: {
103
114
  default: "text-foreground",
104
- success: "text-green-900 dark:text-green-100",
115
+ success: "text-success-foreground dark:text-green-100",
105
116
  },
106
117
  },
107
118
  defaultVariants: {
@@ -113,7 +124,7 @@ const DESCRIPTION_VARIANTS = cva("text-body-sm", {
113
124
  variants: {
114
125
  colorSchema: {
115
126
  default: "text-muted-foreground",
116
- success: "text-green-900 dark:text-green-100",
127
+ success: "text-success-foreground dark:text-green-100",
117
128
  },
118
129
  },
119
130
  defaultVariants: {
@@ -125,7 +136,7 @@ const ICON_VARIANTS = cva("", {
125
136
  variants: {
126
137
  colorSchema: {
127
138
  default: "text-foreground",
128
- success: "text-green-900 dark:text-green-100",
139
+ success: "text-success-foreground dark:text-green-100",
129
140
  },
130
141
  },
131
142
  defaultVariants: {
@@ -223,7 +223,7 @@ interface SplitLayoutContentRightProps extends React.ComponentProps<"div"> {
223
223
  * SplitLayoutContentRight - Right/secondary section within a SplitLayout.
224
224
  *
225
225
  * Hidden on mobile/tablet (<1024px), visible on desktop (≥1024px).
226
- * Uses bg-card background color.
226
+ * Uses the muted background colour (bg-muted).
227
227
  * Self-positions in the second column, spanning all rows of the grid.
228
228
  *
229
229
  * Set `flush` to remove padding for full-bleed content (e.g. images).
@@ -236,7 +236,7 @@ const SplitLayoutContentRight = React.forwardRef<
236
236
  <div
237
237
  ref={ref}
238
238
  className={cn(
239
- "bg-card hidden lg:col-start-2 lg:row-span-full lg:row-start-1",
239
+ "bg-muted hidden lg:col-start-2 lg:row-span-full lg:row-start-1",
240
240
  flush
241
241
  ? "relative overflow-hidden lg:block"
242
242
  : "p-section-sm min-h-0 items-center justify-center overflow-auto lg:flex",