@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
package/dist/select.js CHANGED
@@ -1,275 +1,171 @@
1
+ "use client";
2
+ import { useDevWarning as N } from "./lib/use-dev-warning.js";
3
+ import * as m from "react";
4
+ import { Check as w, ChevronDown as x, ChevronUp as k } from "@brightlocal/icons";
5
+ import { FLOATING_CONTENT_ANIMATION as C, cn as n } from "@brightlocal/ui-components/lib/utils";
1
6
  import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import * as o from "@radix-ui/react-select";
4
- import { Check as N, ChevronDown as S, ChevronUp as w } from "@brightlocal/icons";
5
- import { cva as k } from "class-variance-authority";
6
- import { cn as l, FLOATING_CONTENT_ANIMATION as C } from "@brightlocal/ui-components/lib/utils";
7
- import { useDevWarning as I } from "./lib/use-dev-warning.js";
7
+ import { cva as I } from "class-variance-authority";
8
8
  import { useOverlayPointerLock as R } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
9
- function T({
10
- children: t,
11
- onClose: r,
12
- onOpenChange: n,
13
- open: s,
14
- defaultOpen: i,
15
- ...p
16
- }) {
17
- const [a, m] = d.useState(
18
- i ?? !1
19
- ), u = s !== void 0, c = u ? s : a, f = d.useCallback(
20
- (h) => {
21
- u || m(h), n?.(h);
22
- },
23
- [u, n]
24
- ), b = d.useRef(r);
25
- d.useEffect(() => {
26
- b.current = r;
9
+ import * as a from "@radix-ui/react-select";
10
+ function T({ children: t, onClose: r, onOpenChange: o, open: l, defaultOpen: i, ...p }) {
11
+ const [c, s] = m.useState(i ?? !1), d = l !== void 0, u = d ? l : c, h = m.useCallback((v) => {
12
+ d || s(v), o?.(v);
13
+ }, [d, o]), f = m.useRef(r);
14
+ m.useEffect(() => {
15
+ f.current = r;
27
16
  }, [r]);
28
- const v = d.useRef(c);
29
- return d.useEffect(() => {
30
- v.current && !c && b.current?.(), v.current = c;
31
- }, [c]), d.useEffect(() => () => {
32
- v.current && b.current?.();
33
- }, []), /* @__PURE__ */ e(
34
- o.Root,
35
- {
36
- "data-slot": "select",
37
- defaultOpen: i,
38
- open: s,
39
- onOpenChange: f,
40
- ...p,
41
- children: t
42
- }
43
- );
17
+ const b = m.useRef(u);
18
+ return m.useEffect(() => {
19
+ b.current && !u && f.current?.(), b.current = u;
20
+ }, [u]), m.useEffect(() => () => {
21
+ b.current && f.current?.();
22
+ }, []), /* @__PURE__ */ e(a.Root, {
23
+ "data-slot": "select",
24
+ defaultOpen: i,
25
+ open: l,
26
+ onOpenChange: h,
27
+ ...p,
28
+ children: t
29
+ });
44
30
  }
45
31
  T.displayName = "Select";
46
32
  function O(t) {
47
- return /* @__PURE__ */ e(o.Group, { "data-slot": "select-group", ...t });
33
+ return /* @__PURE__ */ e(a.Group, {
34
+ "data-slot": "select-group",
35
+ ...t
36
+ });
48
37
  }
49
38
  O.displayName = "SelectGroup";
50
39
  function j(t) {
51
- return /* @__PURE__ */ e(o.Value, { "data-slot": "select-value", ...t });
40
+ return /* @__PURE__ */ e(a.Value, {
41
+ "data-slot": "select-value",
42
+ ...t
43
+ });
52
44
  }
53
45
  j.displayName = "SelectValue";
54
- const B = k([
55
- // Base layout
46
+ var B = I([
56
47
  "relative flex w-full h-9 items-center justify-between gap-2",
57
48
  "px-3 py-2",
58
- // Base appearance
59
49
  "border border-border rounded-sm outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out",
60
50
  "bg-neutral-50 border-neutral-300",
61
51
  "dark:bg-white/5 dark:border-white/15",
62
- // Typography — text-body (16px) per the Figma form-field example: the select
63
- // sits beside inputs and both are values, so both are body (DS-921).
64
- "text-body text-foreground",
65
- // Text truncation for long content (shadcn default behavior)
52
+ "text-field text-foreground",
66
53
  "[&>span]:block [&>span]:truncate",
67
- // Placeholder state
68
54
  "data-[placeholder]:text-muted-foreground",
69
- // Focus state (keyboard navigation only - not on click)
70
55
  "focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background",
71
56
  "focus-visible:shadow-default",
72
- // Open dropdown state
73
57
  "data-[state=open]:border-ring",
74
- // Disabled state
75
- "disabled:cursor-not-allowed disabled:opacity-50",
76
- // Icon styles (chevron and custom icons)
58
+ "cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
77
59
  "[&_svg]:pointer-events-none [&_svg]:shrink-0"
78
60
  ]);
79
- function L({
80
- className: t,
81
- children: r,
82
- placeholder: n,
83
- dataHook: s,
84
- error: i,
85
- selectLabel: p,
86
- ...a
87
- }) {
88
- const m = i || a["aria-invalid"] === !0 || a["aria-invalid"] === "true", u = a["aria-required"] === !0 || a["aria-required"] === "true", c = a["aria-label"] || p || n || "Select an option", f = m ? "border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive" : "";
89
- return /* @__PURE__ */ g(
90
- o.Trigger,
91
- {
92
- ...a,
93
- "aria-invalid": m ? "true" : void 0,
94
- "aria-label": c,
95
- "aria-required": u ? "true" : void 0,
96
- className: l(B(), f, t),
97
- "data-hook": s,
98
- "data-slot": "select-trigger",
99
- children: [
100
- r,
101
- /* @__PURE__ */ e(o.Icon, { asChild: !0, children: /* @__PURE__ */ e(S, { className: "text-muted-foreground" }) })
102
- ]
103
- }
104
- );
61
+ function L({ className: t, children: r, placeholder: o, dataHook: l, error: i, selectLabel: p, reserveValues: c, ...s }) {
62
+ const d = i || s["aria-invalid"] === !0 || s["aria-invalid"] === "true", u = s["aria-required"] === !0 || s["aria-required"] === "true", h = s["aria-label"] || p || o || "Select an option", f = d ? "border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive" : "";
63
+ return /* @__PURE__ */ g(a.Trigger, {
64
+ ...s,
65
+ "aria-invalid": d ? "true" : void 0,
66
+ "aria-label": h,
67
+ "aria-required": u ? "true" : void 0,
68
+ className: n(B(), f, t),
69
+ "data-hook": l,
70
+ "data-slot": "select-trigger",
71
+ children: [c?.length ? /* @__PURE__ */ g("span", {
72
+ className: "!grid min-w-0 text-left",
73
+ "data-slot": "select-reserve",
74
+ children: [c.map((b, v) => /* @__PURE__ */ e("span", {
75
+ "aria-hidden": "true",
76
+ className: "invisible col-start-1 row-start-1 truncate",
77
+ children: b
78
+ }, v)), /* @__PURE__ */ e("span", {
79
+ className: "col-start-1 row-start-1 truncate",
80
+ children: r
81
+ })]
82
+ }) : r, /* @__PURE__ */ e(a.Icon, {
83
+ asChild: !0,
84
+ children: /* @__PURE__ */ e(x, { className: "text-muted-foreground" })
85
+ })]
86
+ });
105
87
  }
106
88
  L.displayName = "SelectTrigger";
107
- function _({
108
- className: t,
109
- children: r,
110
- position: n = "popper",
111
- maxHeight: s,
112
- style: i,
113
- ...p
114
- }) {
89
+ function _({ className: t, children: r, position: o = "popper", maxHeight: l, style: i, ...p }) {
115
90
  R();
116
- const a = d.useRef(null);
117
- I(
118
- () => a.current ? a.current.querySelectorAll('[data-slot="select-item"]').length >= 100 : !1,
119
- `Select contains many items. For large lists (100+), consider using <Combobox> which supports search and filtering.
120
- Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
121
- [r]
122
- );
123
- const m = l(
124
- // Base appearance
125
- "relative z-50 overflow-hidden",
126
- "min-w-[8rem]",
127
- "rounded-md border border-border bg-popover shadow-md",
128
- "text-popover-foreground",
129
- // Size constraints using Radix CSS variables
130
- "max-h-[var(--radix-select-content-available-height)]",
131
- "origin-[var(--radix-select-content-transform-origin)]",
132
- // Animations
133
- C
134
- ), u = n === "popper" && l(
135
- "data-[side=bottom]:translate-y-1",
136
- "data-[side=left]:-translate-x-1",
137
- "data-[side=right]:translate-x-1",
138
- "data-[side=top]:-translate-y-1"
139
- ), c = s !== void 0 ? {
91
+ const c = m.useRef(null);
92
+ N(() => c.current ? c.current.querySelectorAll('[data-slot="select-item"]').length >= 100 : !1, `Select contains many items. For large lists (100+), consider using <Combobox> which supports search and filtering.
93
+ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`, [r]);
94
+ const s = n("relative z-50 overflow-hidden", "min-w-[8rem]", "rounded-md border border-border bg-popover shadow-md", "text-popover-foreground", "max-h-[var(--radix-select-content-available-height)]", "origin-[var(--radix-select-content-transform-origin)]", C), d = o === "popper" && n("data-[side=bottom]:translate-y-1", "data-[side=left]:-translate-x-1", "data-[side=right]:translate-x-1", "data-[side=top]:-translate-y-1"), u = l !== void 0 ? {
140
95
  ...i,
141
- maxHeight: `min(${s}px, var(--radix-select-content-available-height))`
96
+ maxHeight: `min(${l}px, var(--radix-select-content-available-height))`
142
97
  } : i;
143
- return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ g(
144
- o.Content,
145
- {
146
- className: l(m, u, t),
147
- "data-slot": "select-content",
148
- position: n,
149
- style: c,
150
- ...p,
151
- children: [
152
- /* @__PURE__ */ e(x, {}),
153
- /* @__PURE__ */ e(
154
- o.Viewport,
155
- {
156
- ref: a,
157
- className: l(
158
- "p-1",
159
- n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
160
- ),
161
- children: r
162
- }
163
- ),
164
- /* @__PURE__ */ e(y, {})
165
- ]
166
- }
167
- ) });
98
+ return /* @__PURE__ */ e(a.Portal, { children: /* @__PURE__ */ g(a.Content, {
99
+ className: n(s, d, t),
100
+ "data-slot": "select-content",
101
+ position: o,
102
+ style: u,
103
+ ...p,
104
+ children: [
105
+ /* @__PURE__ */ e(S, {}),
106
+ /* @__PURE__ */ e(a.Viewport, {
107
+ ref: c,
108
+ className: n("p-1", o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
109
+ children: r
110
+ }),
111
+ /* @__PURE__ */ e(y, {})
112
+ ]
113
+ }) });
168
114
  }
169
115
  _.displayName = "SelectContent";
170
- function q({
171
- className: t,
172
- ...r
173
- }) {
174
- return /* @__PURE__ */ e(
175
- o.Label,
176
- {
177
- className: l(
178
- "text-muted-foreground text-label-sm px-2 py-1.5",
179
- t
180
- ),
181
- "data-slot": "select-label",
182
- ...r
183
- }
184
- );
116
+ function q({ className: t, ...r }) {
117
+ return /* @__PURE__ */ e(a.Label, {
118
+ className: n("text-muted-foreground text-label-sm px-2 py-1.5", t),
119
+ "data-slot": "select-label",
120
+ ...r
121
+ });
185
122
  }
186
123
  q.displayName = "SelectLabel";
187
- function D({ className: t, children: r, hint: n, ...s }) {
188
- const i = l(
189
- // Base layout
190
- "relative flex w-full cursor-default select-none items-center gap-2",
191
- "rounded py-1.5 pl-2 pr-8",
192
- // Typography
193
- "text-label text-popover-foreground",
194
- // Interactive states
195
- "focus:bg-accent focus:text-accent-foreground",
196
- "hover:bg-accent/50 hover:text-accent-foreground",
197
- "outline-none focus:outline-none",
198
- // Disabled state
199
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
200
- // Icon styles
201
- "[&_svg]:pointer-events-none [&_svg]:shrink-0"
202
- );
203
- return /* @__PURE__ */ g(
204
- o.Item,
205
- {
206
- className: l(i, t),
207
- "data-slot": "select-item",
208
- ...s,
209
- children: [
210
- /* @__PURE__ */ e("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(N, {}) }) }),
211
- /* @__PURE__ */ e(o.ItemText, { children: r }),
212
- n != null && /* @__PURE__ */ e(
213
- "span",
214
- {
215
- className: "text-label-sm text-muted-foreground ml-auto",
216
- "data-slot": "select-item-hint",
217
- children: n
218
- }
219
- )
220
- ]
221
- }
222
- );
124
+ function D({ className: t, children: r, hint: o, ...l }) {
125
+ const i = n("relative flex w-full cursor-pointer select-none items-center gap-2", "rounded py-1.5 pl-2 pr-8", "text-label text-popover-foreground", "focus:bg-accent focus:text-accent-foreground", "hover:bg-accent/50 hover:text-accent-foreground", "outline-none focus:outline-none", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0");
126
+ return /* @__PURE__ */ g(a.Item, {
127
+ className: n(i, t),
128
+ "data-slot": "select-item",
129
+ ...l,
130
+ children: [
131
+ /* @__PURE__ */ e("span", {
132
+ className: "absolute right-2 flex size-4 items-center justify-center",
133
+ children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(w, {}) })
134
+ }),
135
+ /* @__PURE__ */ e(a.ItemText, { children: r }),
136
+ o != null && /* @__PURE__ */ e("span", {
137
+ className: "text-label-sm text-muted-foreground ml-auto",
138
+ "data-slot": "select-item-hint",
139
+ children: o
140
+ })
141
+ ]
142
+ });
223
143
  }
224
144
  D.displayName = "SelectItem";
225
- function E({
226
- className: t,
227
- ...r
228
- }) {
229
- return /* @__PURE__ */ e(
230
- o.Separator,
231
- {
232
- className: l("bg-border pointer-events-none -mx-1 my-1 h-px", t),
233
- "data-slot": "select-separator",
234
- ...r
235
- }
236
- );
145
+ function E({ className: t, ...r }) {
146
+ return /* @__PURE__ */ e(a.Separator, {
147
+ className: n("bg-border pointer-events-none -mx-1 my-1 h-px", t),
148
+ "data-slot": "select-separator",
149
+ ...r
150
+ });
237
151
  }
238
152
  E.displayName = "SelectSeparator";
239
- function x({
240
- className: t,
241
- ...r
242
- }) {
243
- return /* @__PURE__ */ e(
244
- o.ScrollUpButton,
245
- {
246
- className: l(
247
- "flex cursor-default items-center justify-center py-1",
248
- t
249
- ),
250
- "data-slot": "select-scroll-up-button",
251
- ...r,
252
- children: /* @__PURE__ */ e(w, {})
253
- }
254
- );
153
+ function S({ className: t, ...r }) {
154
+ return /* @__PURE__ */ e(a.ScrollUpButton, {
155
+ className: n("flex cursor-default items-center justify-center py-1", t),
156
+ "data-slot": "select-scroll-up-button",
157
+ ...r,
158
+ children: /* @__PURE__ */ e(k, {})
159
+ });
255
160
  }
256
- x.displayName = "SelectScrollUpButton";
257
- function y({
258
- className: t,
259
- ...r
260
- }) {
261
- return /* @__PURE__ */ e(
262
- o.ScrollDownButton,
263
- {
264
- className: l(
265
- "flex cursor-default items-center justify-center py-1",
266
- t
267
- ),
268
- "data-slot": "select-scroll-down-button",
269
- ...r,
270
- children: /* @__PURE__ */ e(S, {})
271
- }
272
- );
161
+ S.displayName = "SelectScrollUpButton";
162
+ function y({ className: t, ...r }) {
163
+ return /* @__PURE__ */ e(a.ScrollDownButton, {
164
+ className: n("flex cursor-default items-center justify-center py-1", t),
165
+ "data-slot": "select-scroll-down-button",
166
+ ...r,
167
+ children: /* @__PURE__ */ e(x, {})
168
+ });
273
169
  }
274
170
  y.displayName = "SelectScrollDownButton";
275
171
  export {
@@ -279,7 +175,7 @@ export {
279
175
  D as SelectItem,
280
176
  q as SelectLabel,
281
177
  y as SelectScrollDownButton,
282
- x as SelectScrollUpButton,
178
+ S as SelectScrollUpButton,
283
179
  E as SelectSeparator,
284
180
  L as SelectTrigger,
285
181
  j as SelectValue
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),p=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function x(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const c=x(h),N=p.cva("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px border-0",vertical:"w-px"},spacing:{default:"",sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",spacing:"default",className:"w-full"},{orientation:"horizontal",spacing:"sm",className:"my-2 mx-6 w-auto"},{orientation:"horizontal",spacing:"md",className:"my-4 mx-6 w-auto"},{orientation:"horizontal",spacing:"lg",className:"m-6 w-auto"},{orientation:"vertical",spacing:"default",className:"h-full"},{orientation:"vertical",spacing:"sm",className:"self-stretch mx-2"},{orientation:"vertical",spacing:"md",className:"self-stretch mx-4"},{orientation:"vertical",spacing:"lg",className:"self-stretch mx-6"}],defaultVariants:{orientation:"horizontal",spacing:"default"}}),v=p.cva("flex items-center gap-2",{variants:{spacing:{default:"",sm:"py-2 px-6",md:"py-4 px-6",lg:"p-6"}},defaultVariants:{spacing:"default"}}),o=c.forwardRef(({className:t,orientation:a="horizontal",spacing:e="default",decorative:r=!0,dataHook:n,trackingEl:i,trackingLabel:l,...u},f)=>{const g=r?{role:"none"}:a==="vertical"?{"aria-orientation":"vertical",role:"separator"}:{};return c.createElement(a==="horizontal"?"hr":"div",{ref:f,className:d.cn(N({orientation:a,spacing:e}),t),"data-hook":n,"data-orientation":a,"data-slot":"separator","data-tracking-el":i,"data-tracking-label":l,...g,...u})});o.displayName="Separator";const m=c.forwardRef(({className:t,children:a,spacing:e="default",dataHook:r,trackingEl:n,trackingLabel:i},l)=>s.jsxs("div",{ref:l,className:d.cn(v({spacing:e}),t),"data-hook":r,"data-slot":"separator-with-text","data-tracking-el":n,"data-tracking-label":i,children:[s.jsx(o,{className:"flex-1"}),s.jsx("span",{className:"text-body-sm text-muted-foreground shrink-0 leading-none whitespace-nowrap",children:a}),s.jsx(o,{className:"flex-1"})]}));m.displayName="SeparatorWithText";exports.Separator=o;exports.SeparatorWithText=m;
1
+ "use client";const x=require("./_virtual/_rolldown/runtime.cjs");let t=require("react");t=x.__toESM(t,1);let m=require("@brightlocal/ui-components/lib/utils"),e=require("react/jsx-runtime"),p=require("class-variance-authority");var f=(0,p.cva)("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px border-0",vertical:"w-px"},spacing:{default:"",sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",spacing:"default",className:"w-full"},{orientation:"horizontal",spacing:"sm",className:"my-2 mx-6 w-auto"},{orientation:"horizontal",spacing:"md",className:"my-4 mx-6 w-auto"},{orientation:"horizontal",spacing:"lg",className:"m-6 w-auto"},{orientation:"vertical",spacing:"default",className:"h-full"},{orientation:"vertical",spacing:"sm",className:"self-stretch mx-2"},{orientation:"vertical",spacing:"md",className:"self-stretch mx-4"},{orientation:"vertical",spacing:"lg",className:"self-stretch mx-6"}],defaultVariants:{orientation:"horizontal",spacing:"default"}}),v=(0,p.cva)("flex items-center gap-2",{variants:{spacing:{default:"",sm:"py-2 px-6",md:"py-4 px-6",lg:"p-6"}},defaultVariants:{spacing:"default"}}),r=t.forwardRef(({className:i,orientation:a="horizontal",spacing:s="default",decorative:l=!0,dataHook:o,trackingEl:n,trackingLabel:c,...u},h)=>{const g=l?{role:"none"}:a==="vertical"?{"aria-orientation":"vertical",role:"separator"}:{};return t.createElement(a==="horizontal"?"hr":"div",{ref:h,className:(0,m.cn)(f({orientation:a,spacing:s}),i),"data-hook":o,"data-orientation":a,"data-slot":"separator","data-tracking-el":n,"data-tracking-label":c,...g,...u})});r.displayName="Separator";var d=t.forwardRef(({className:i,children:a,spacing:s="default",dataHook:l,trackingEl:o,trackingLabel:n},c)=>(0,e.jsxs)("div",{ref:c,className:(0,m.cn)(v({spacing:s}),i),"data-hook":l,"data-slot":"separator-with-text","data-tracking-el":o,"data-tracking-label":n,children:[(0,e.jsx)(r,{className:"flex-1"}),(0,e.jsx)("span",{className:"text-body-sm text-muted-foreground shrink-0 leading-none whitespace-nowrap",children:a}),(0,e.jsx)(r,{className:"flex-1"})]}));d.displayName="SeparatorWithText";exports.Separator=r;exports.SeparatorWithText=d;
package/dist/separator.js CHANGED
@@ -1,8 +1,9 @@
1
- import { jsxs as h, jsx as l } from "react/jsx-runtime";
1
+ "use client";
2
2
  import * as n from "react";
3
- import { cva as m } from "class-variance-authority";
4
- import { cn as p } from "@brightlocal/ui-components/lib/utils";
5
- const u = m("bg-border shrink-0", {
3
+ import { cn as m } from "@brightlocal/ui-components/lib/utils";
4
+ import { jsx as l, jsxs as h } from "react/jsx-runtime";
5
+ import { cva as p } from "class-variance-authority";
6
+ var u = p("bg-border shrink-0", {
6
7
  variants: {
7
8
  orientation: {
8
9
  horizontal: "h-px border-0",
@@ -16,87 +17,98 @@ const u = m("bg-border shrink-0", {
16
17
  }
17
18
  },
18
19
  compoundVariants: [
19
- { orientation: "horizontal", spacing: "default", className: "w-full" },
20
- { orientation: "horizontal", spacing: "sm", className: "my-2 mx-6 w-auto" },
21
- { orientation: "horizontal", spacing: "md", className: "my-4 mx-6 w-auto" },
22
- { orientation: "horizontal", spacing: "lg", className: "m-6 w-auto" },
23
- { orientation: "vertical", spacing: "default", className: "h-full" },
24
- { orientation: "vertical", spacing: "sm", className: "self-stretch mx-2" },
25
- { orientation: "vertical", spacing: "md", className: "self-stretch mx-4" },
26
- { orientation: "vertical", spacing: "lg", className: "self-stretch mx-6" }
20
+ {
21
+ orientation: "horizontal",
22
+ spacing: "default",
23
+ className: "w-full"
24
+ },
25
+ {
26
+ orientation: "horizontal",
27
+ spacing: "sm",
28
+ className: "my-2 mx-6 w-auto"
29
+ },
30
+ {
31
+ orientation: "horizontal",
32
+ spacing: "md",
33
+ className: "my-4 mx-6 w-auto"
34
+ },
35
+ {
36
+ orientation: "horizontal",
37
+ spacing: "lg",
38
+ className: "m-6 w-auto"
39
+ },
40
+ {
41
+ orientation: "vertical",
42
+ spacing: "default",
43
+ className: "h-full"
44
+ },
45
+ {
46
+ orientation: "vertical",
47
+ spacing: "sm",
48
+ className: "self-stretch mx-2"
49
+ },
50
+ {
51
+ orientation: "vertical",
52
+ spacing: "md",
53
+ className: "self-stretch mx-4"
54
+ },
55
+ {
56
+ orientation: "vertical",
57
+ spacing: "lg",
58
+ className: "self-stretch mx-6"
59
+ }
27
60
  ],
28
61
  defaultVariants: {
29
62
  orientation: "horizontal",
30
63
  spacing: "default"
31
64
  }
32
- }), x = m("flex items-center gap-2", {
33
- variants: {
34
- spacing: {
35
- default: "",
36
- sm: "py-2 px-6",
37
- md: "py-4 px-6",
38
- lg: "p-6"
39
- }
40
- },
41
- defaultVariants: {
42
- spacing: "default"
43
- }
44
- }), c = n.forwardRef(
45
- ({
46
- className: t,
47
- orientation: a = "horizontal",
48
- spacing: e = "default",
49
- decorative: r = !0,
50
- dataHook: o,
51
- trackingEl: s,
52
- trackingLabel: i,
65
+ }), x = p("flex items-center gap-2", {
66
+ variants: { spacing: {
67
+ default: "",
68
+ sm: "py-2 px-6",
69
+ md: "py-4 px-6",
70
+ lg: "p-6"
71
+ } },
72
+ defaultVariants: { spacing: "default" }
73
+ }), c = n.forwardRef(({ className: t, orientation: a = "horizontal", spacing: e = "default", decorative: r = !0, dataHook: o, trackingEl: s, trackingLabel: i, ...d }, f) => {
74
+ const g = r ? { role: "none" } : a === "vertical" ? {
75
+ "aria-orientation": "vertical",
76
+ role: "separator"
77
+ } : {};
78
+ return n.createElement(a === "horizontal" ? "hr" : "div", {
79
+ ref: f,
80
+ className: m(u({
81
+ orientation: a,
82
+ spacing: e
83
+ }), t),
84
+ "data-hook": o,
85
+ "data-orientation": a,
86
+ "data-slot": "separator",
87
+ "data-tracking-el": s,
88
+ "data-tracking-label": i,
89
+ ...g,
53
90
  ...d
54
- }, f) => {
55
- const g = r ? { role: "none" } : a === "vertical" ? {
56
- "aria-orientation": "vertical",
57
- role: "separator"
58
- } : {};
59
- return n.createElement(a === "horizontal" ? "hr" : "div", {
60
- ref: f,
61
- className: p(u({ orientation: a, spacing: e }), t),
62
- "data-hook": o,
63
- "data-orientation": a,
64
- "data-slot": "separator",
65
- "data-tracking-el": s,
66
- "data-tracking-label": i,
67
- ...g,
68
- ...d
69
- });
70
- }
71
- );
91
+ });
92
+ });
72
93
  c.displayName = "Separator";
73
- const N = n.forwardRef(
74
- ({
75
- className: t,
76
- children: a,
77
- spacing: e = "default",
78
- dataHook: r,
79
- trackingEl: o,
80
- trackingLabel: s
81
- }, i) => /* @__PURE__ */ h(
82
- "div",
83
- {
84
- ref: i,
85
- className: p(x({ spacing: e }), t),
86
- "data-hook": r,
87
- "data-slot": "separator-with-text",
88
- "data-tracking-el": o,
89
- "data-tracking-label": s,
90
- children: [
91
- /* @__PURE__ */ l(c, { className: "flex-1" }),
92
- /* @__PURE__ */ l("span", { className: "text-body-sm text-muted-foreground shrink-0 leading-none whitespace-nowrap", children: a }),
93
- /* @__PURE__ */ l(c, { className: "flex-1" })
94
- ]
95
- }
96
- )
97
- );
98
- N.displayName = "SeparatorWithText";
94
+ var v = n.forwardRef(({ className: t, children: a, spacing: e = "default", dataHook: r, trackingEl: o, trackingLabel: s }, i) => /* @__PURE__ */ h("div", {
95
+ ref: i,
96
+ className: m(x({ spacing: e }), t),
97
+ "data-hook": r,
98
+ "data-slot": "separator-with-text",
99
+ "data-tracking-el": o,
100
+ "data-tracking-label": s,
101
+ children: [
102
+ /* @__PURE__ */ l(c, { className: "flex-1" }),
103
+ /* @__PURE__ */ l("span", {
104
+ className: "text-body-sm text-muted-foreground shrink-0 leading-none whitespace-nowrap",
105
+ children: a
106
+ }),
107
+ /* @__PURE__ */ l(c, { className: "flex-1" })
108
+ ]
109
+ }));
110
+ v.displayName = "SeparatorWithText";
99
111
  export {
100
112
  c as Separator,
101
- N as SeparatorWithText
113
+ v as SeparatorWithText
102
114
  };