@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,98 @@
1
+ import * as React from "react";
2
+ /**
3
+ * One image in the set.
4
+ */
5
+ export interface MediaViewerItem {
6
+ /**
7
+ * The image URL.
8
+ */
9
+ src: string;
10
+ /**
11
+ * The image's description — alternative text for screen readers and
12
+ * search engines. It also names the trigger that previews it, and the
13
+ * view shows it under the title while the image is open.
14
+ */
15
+ alt: string;
16
+ /**
17
+ * A smaller image for the trigger's preview. Falls back to `src`.
18
+ */
19
+ thumbnailSrc?: string;
20
+ /**
21
+ * The file Download saves — say, the original at full size. Falls back to
22
+ * `src`.
23
+ */
24
+ downloadSrc?: string;
25
+ /**
26
+ * When the image was taken or added, shown under the title while it is
27
+ * open. An ISO 8601 timestamp or a Date; a plain `YYYY-MM-DD` string for a
28
+ * calendar date with no time of day.
29
+ */
30
+ date?: string | Date;
31
+ /**
32
+ * Marks a capture that is no longer available. The frame shows the
33
+ * unavailable message instead of requesting the image. An image that fails to
34
+ * load is treated the same way.
35
+ * @default false
36
+ */
37
+ expired?: boolean;
38
+ }
39
+ export declare const MediaViewerControlsContext: React.Context<{
40
+ lead: React.ReactNode;
41
+ more: React.ReactNode;
42
+ }>;
43
+ export declare const MediaViewerActionsRegistry: React.Context<(() => () => void) | null>;
44
+ export interface MediaViewerContextValue {
45
+ items: MediaViewerItem[];
46
+ index: number;
47
+ setIndex: (index: number) => void;
48
+ /** The trigger that last opened the view, for focus return. */
49
+ openerRef: React.MutableRefObject<HTMLButtonElement | null>;
50
+ open: boolean;
51
+ setOpen: (open: boolean) => void;
52
+ /** Counts openings; per-opening state in the view is keyed by it, as the
53
+ view's component stays mounted while closed. */
54
+ openCount: number;
55
+ /** When the opening press happened (event time), for the zoom's cutoff. */
56
+ openedAtRef: React.MutableRefObject<number>;
57
+ /** Whether the view's image has appeared this opening (its zoom has
58
+ started, or the reader has stepped) — only then does the preview step
59
+ aside, so there is never a frame with neither on screen. */
60
+ revealed: boolean;
61
+ reveal: () => void;
62
+ /** Mounted triggers by item index — where the image zooms from and to. */
63
+ triggersRef: React.MutableRefObject<Map<number, HTMLButtonElement>>;
64
+ /** Where the pointer last was while the view was open — the preview
65
+ under it when the view closes holds off its hover zoom. */
66
+ pointerRef: React.MutableRefObject<{
67
+ x: number;
68
+ y: number;
69
+ } | null>;
70
+ /** The item's menu, as the root's `actions` builds it, or null. */
71
+ renderActions: ((item: MediaViewerItem, index: number) => React.ReactNode) | null;
72
+ actionsLabel: (item: MediaViewerItem, index: number) => string;
73
+ /** Whether the set has a full view; without one the previews only show. */
74
+ viewable: boolean;
75
+ }
76
+ export declare const MediaViewerContext: React.Context<MediaViewerContextValue | null>;
77
+ export declare function useMediaViewerContext(part: string): MediaViewerContextValue;
78
+ export declare const defaultActionsLabel: (item: MediaViewerItem, index: number) => string;
79
+ export declare const defaultTriggerLabel: (item: MediaViewerItem, index: number, total: number) => string;
80
+ export declare function ItemActionsMenu({ dataHook, label, variant, children, }: {
81
+ dataHook: string;
82
+ label: string;
83
+ variant: "secondary" | "ghost";
84
+ children: React.ReactNode;
85
+ }): React.JSX.Element;
86
+ /**
87
+ * Renders `render(ref)` — an element that truncates to one line — inside a
88
+ * tooltip with the full text, which opens only when the text is actually
89
+ * cut at the moment the pointer or focus arrives.
90
+ */
91
+ export declare function TruncatedText<T extends HTMLElement>({ dataHook, forwardRef, full, render, }: {
92
+ dataHook: string;
93
+ /** A ref of the caller's to set to the same element. Keep it stable. */
94
+ forwardRef?: (node: T | null) => void;
95
+ full: React.ReactNode;
96
+ render: (ref: (node: T | null) => void) => React.ReactElement;
97
+ }): React.JSX.Element;
98
+ //# sourceMappingURL=media-viewer-internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-viewer-internal.d.ts","sourceRoot":"","sources":["../../src/lib/media-viewer-internal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD,eAAO,MAAM,0BAA0B;UAC/B,KAAK,CAAC,SAAS;UACf,KAAK,CAAC,SAAS;EACO,CAAC;AAC/B,eAAO,MAAM,0BAA0B,uBAC9B,MAAM,IAAI,SACZ,CAAC;AAER,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC5D,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;uDACmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC5C;;mEAE+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0EAA0E;IAC1E,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;IACpE;kEAC8D;IAC9D,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACpE,mEAAmE;IACnE,aAAa,EACX,CAAC,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACrE,YAAY,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/D,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,+CAC4B,CAAC;AAE5D,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,2BAMjD;AAED,eAAO,MAAM,mBAAmB,GAAI,MAAM,eAAe,EAAE,OAAO,MAAM,WAChB,CAAC;AAEzD,eAAO,MAAM,mBAAmB,GAC9B,MAAM,eAAe,EACrB,OAAO,MAAM,EACb,OAAO,MAAM,WACkC,CAAC;AAIlD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAmBA;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EAAE,EACnD,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,KAAK,KAAK,CAAC,YAAY,CAAC;CAC/D,qBAuBA"}
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { Button as p } from "../button.js";
3
+ import { DropdownMenu as f, DropdownMenuContent as h, DropdownMenuTrigger as C } from "../dropdown-menu.js";
4
+ import { Tooltip as g, TooltipContent as x, TooltipTrigger as w } from "../tooltip.js";
5
+ import * as n from "react";
6
+ import { Ellipsis as M } from "@brightlocal/icons";
7
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
8
+ var A = n.createContext({
9
+ lead: null,
10
+ more: null
11
+ }), D = n.createContext(null), T = n.createContext(null);
12
+ function L(t) {
13
+ const e = n.useContext(T);
14
+ if (!e) throw new Error(`${t} must be used within <MediaViewer>`);
15
+ return e;
16
+ }
17
+ var O = (t, e) => `More actions for ${t.alt || `image ${e + 1}`}`, j = (t, e, o) => t.alt || `Image ${e + 1} of ${o}`;
18
+ function k({ dataHook: t, label: e, variant: o, children: l }) {
19
+ return /* @__PURE__ */ s(f, { children: [/* @__PURE__ */ r(C, {
20
+ asChild: !0,
21
+ children: /* @__PURE__ */ r(p, {
22
+ iconOnly: !0,
23
+ ariaLabel: e,
24
+ dataHook: t,
25
+ size: o === "secondary" ? "sm" : void 0,
26
+ variant: o,
27
+ children: /* @__PURE__ */ r(M, { "aria-hidden": !0 })
28
+ })
29
+ }), /* @__PURE__ */ r(h, {
30
+ align: "end",
31
+ dataHook: `${t}-content`,
32
+ children: l
33
+ })] });
34
+ }
35
+ function E({ dataHook: t, forwardRef: e, full: o, render: l }) {
36
+ const [a, u] = n.useState(null), [d, c] = n.useState(!1), m = n.useCallback((i) => {
37
+ u(i), e?.(i);
38
+ }, [e]);
39
+ return /* @__PURE__ */ s(g, {
40
+ open: d,
41
+ onOpenChange: (i) => c(i && !!a && a.scrollWidth > a.clientWidth),
42
+ children: [/* @__PURE__ */ r(w, {
43
+ asChild: !0,
44
+ children: l(m)
45
+ }), /* @__PURE__ */ r(x, {
46
+ dataHook: `${t}-full`,
47
+ side: "top",
48
+ children: o
49
+ })]
50
+ });
51
+ }
52
+ export {
53
+ k as ItemActionsMenu,
54
+ D as MediaViewerActionsRegistry,
55
+ T as MediaViewerContext,
56
+ A as MediaViewerControlsContext,
57
+ E as TruncatedText,
58
+ O as defaultActionsLabel,
59
+ j as defaultTriggerLabel,
60
+ L as useMediaViewerContext
61
+ };
@@ -0,0 +1 @@
1
+ let m=require("@brightlocal/ui-components/lib/motion");var A={transform:"none",transformOrigin:"0 0",clipPath:"inset(0px 0px 0px 0px round 0px)"};function T(o,e){const t=o.getBoundingClientRect(),n=e.getBoundingClientRect();if(!t.width||!t.height||!n.width||!n.height||t.bottom<=0||t.right<=0||t.top>=window.innerHeight||t.left>=window.innerWidth)return null;const r=Math.max(t.width/n.width,t.height/n.height),E=o.querySelector("img"),a=E&&parseFloat(getComputedStyle(E).scale)||1,i=r*a,h=t.left+t.width/2,s=t.top+t.height/2,l=(n.width-t.width/r)/2*r,c=h+a*(t.left-l-h),_=s+a*(t.top-s),g=(t.left-c)/i,R=(t.top-_)/i,d=n.width-g-t.width/i,p=n.height-R-t.height/i,u=(parseFloat(getComputedStyle(o).borderTopLeftRadius)||0)/i;return{transform:`translate(${c-n.left}px, ${_-n.top}px) scale(${i})`,transformOrigin:"0 0",clipPath:`inset(${R}px ${d}px ${p}px ${g}px round ${u}px)`}}var f=.2,x=.5,B=(o,e)=>({duration:Math.min(320,Math.max(120,Math.abs(o)/Math.max(Math.abs(e),.6))),easing:m.MOTION_EASE_DECELERATE}),b=.1,S=.55,w=.2,D=1.2;function H(o,e){if(!e)return 0;const t=1-1/(Math.abs(o)*S/e+1);return Math.sign(o)*t*e}exports.DRAG_STEP_SHARE=f;exports.DRAG_STEP_SPEED=x;exports.RUBBER_BAND_SHARE=b;exports.RUBBER_BAND_STIFFNESS=S;exports.WHEEL_INERTIA_RISE=D;exports.WHEEL_STEP_SHARE=w;exports.ZOOM_REST=A;exports.glideTiming=B;exports.rubberBand=H;exports.zoomKeyframe=T;
@@ -0,0 +1,40 @@
1
+ /** The image at its resting place, unclipped. */
2
+ export declare const ZOOM_REST: Keyframe;
3
+ export declare function zoomKeyframe(preview: HTMLElement, image: HTMLImageElement): Keyframe | null;
4
+ /** Share of the stage width a drag must cover to step on release… */
5
+ export declare const DRAG_STEP_SHARE = 0.2;
6
+ /** …capped, in px, so a wide screen does not ask for a long pull. */
7
+ export declare const DRAG_STEP_MAX = 160;
8
+ /** Release speed, in px/ms, that steps however short the drag. */
9
+ export declare const DRAG_STEP_SPEED = 0.5;
10
+ export declare const glideTiming: (distance: number, speed: number) => {
11
+ duration: number;
12
+ easing: string;
13
+ };
14
+ /** Rubber band past the first or last image: the most it gives, as a share
15
+ of the stage, and how stiffly (Apple's scroll-view constant). */
16
+ export declare const RUBBER_BAND_SHARE = 0.1;
17
+ export declare const RUBBER_BAND_STIFFNESS = 0.55;
18
+ /** Horizontal travel, in px, before a trackpad swipe starts moving the
19
+ image — a resting hand's drift does nothing. */
20
+ export declare const WHEEL_INTENT = 30;
21
+ /** Share of the stage width a trackpad swipe must pull to step. */
22
+ export declare const WHEEL_STEP_SHARE = 0.2;
23
+ /** Quiet time, in ms, after which a swipe short of a step springs back —
24
+ long enough that a pause in the fingers is not a let-go. */
25
+ export declare const WHEEL_CANCEL_DELAY = 600;
26
+ /** After a step, the inertia that follows is recognised by size: a delta
27
+ no more than this many times the last one is inertia, not new fingers.
28
+ The record fades after WHEEL_INERTIA_TTL ms of quiet. */
29
+ export declare const WHEEL_INERTIA_RISE = 1.2;
30
+ export declare const WHEEL_INERTIA_TTL = 300;
31
+ /** Inertia only fades: once it has, a delta this many times its faintest is
32
+ new fingers — the next swipe, without waiting for the inertia to die. */
33
+ export declare const WHEEL_FRESH_RISE = 2;
34
+ /**
35
+ * Where a track pulled `offset` px past the first or last image stands: it
36
+ * gives like a rubber band, ever stiffer, approaching but never reaching
37
+ * `limit`.
38
+ */
39
+ export declare function rubberBand(offset: number, limit: number): number;
40
+ //# sourceMappingURL=media-viewer-motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-viewer-motion.d.ts","sourceRoot":"","sources":["../../src/lib/media-viewer-motion.ts"],"names":[],"mappings":"AAQA,iDAAiD;AACjD,eAAO,MAAM,SAAS,EAAE,QAIvB,CAAC;AAQF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,gBAAgB,GACtB,QAAQ,GAAG,IAAI,CAmCjB;AAED,qEAAqE;AACrE,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,qEAAqE;AACrE,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,kEAAkE;AAClE,eAAO,MAAM,eAAe,MAAM,CAAC;AAKnC,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,OAAO,MAAM;;;CAMzD,CAAC;AAKH;oEACoE;AACpE,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C;mDACmD;AACnD,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;+DAC+D;AAC/D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;4DAE4D;AAC5D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;4EAC4E;AAC5E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE"}
@@ -0,0 +1,37 @@
1
+ import { MOTION_EASE_DECELERATE as f } from "@brightlocal/ui-components/lib/motion";
2
+ var _ = {
3
+ transform: "none",
4
+ transformOrigin: "0 0",
5
+ clipPath: "inset(0px 0px 0px 0px round 0px)"
6
+ };
7
+ function w(o, r) {
8
+ const t = o.getBoundingClientRect(), n = r.getBoundingClientRect();
9
+ if (!t.width || !t.height || !n.width || !n.height || t.bottom <= 0 || t.right <= 0 || t.top >= window.innerHeight || t.left >= window.innerWidth) return null;
10
+ const i = Math.max(t.width / n.width, t.height / n.height), h = o.querySelector("img"), a = h && parseFloat(getComputedStyle(h).scale) || 1, e = i * a, s = t.left + t.width / 2, c = t.top + t.height / 2, l = (n.width - t.width / i) / 2 * i, p = s + a * (t.left - l - s), g = c + a * (t.top - c), d = (t.left - p) / e, E = (t.top - g) / e, u = n.width - d - t.width / e, m = n.height - E - t.height / e, x = (parseFloat(getComputedStyle(o).borderTopLeftRadius) || 0) / e;
11
+ return {
12
+ transform: `translate(${p - n.left}px, ${g - n.top}px) scale(${e})`,
13
+ transformOrigin: "0 0",
14
+ clipPath: `inset(${E}px ${u}px ${m}px ${d}px round ${x}px)`
15
+ };
16
+ }
17
+ var v = 0.2, A = 0.5, M = (o, r) => ({
18
+ duration: Math.min(320, Math.max(120, Math.abs(o) / Math.max(Math.abs(r), 0.6))),
19
+ easing: f
20
+ }), T = 0.1, R = 0.55, b = 0.2, B = 1.2;
21
+ function $(o, r) {
22
+ if (!r) return 0;
23
+ const t = 1 - 1 / (Math.abs(o) * R / r + 1);
24
+ return Math.sign(o) * t * r;
25
+ }
26
+ export {
27
+ v as DRAG_STEP_SHARE,
28
+ A as DRAG_STEP_SPEED,
29
+ T as RUBBER_BAND_SHARE,
30
+ R as RUBBER_BAND_STIFFNESS,
31
+ B as WHEEL_INERTIA_RISE,
32
+ b as WHEEL_STEP_SHARE,
33
+ _ as ZOOM_REST,
34
+ M as glideTiming,
35
+ $ as rubberBand,
36
+ w as zoomKeyframe
37
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=150,S=200,N={type:"spring",stiffness:500,damping:45},_={stiffness:180,damping:24,mass:1},n={type:"spring",stiffness:80,damping:20,mass:1},t={type:"spring",stiffness:30,damping:9,mass:.5};exports.MOTION_DURATION_BASE_MS=S;exports.MOTION_DURATION_FAST_MS=s;exports.SPRING_GENTLE=n;exports.SPRING_SETTLE=t;exports.SPRING_SMOOTH=_;exports.SPRING_SNAPPY=N;
1
+ const s=require("./spring-settle.cjs");var S={type:"spring",stiffness:500,damping:45},E={type:"spring",stiffness:180,damping:24,mass:1},T={type:"spring",stiffness:80,damping:20,mass:1},i={type:"spring",stiffness:30,damping:9,mass:.5};exports.SETTLE_REST_DELTA=s.SETTLE_REST_DELTA;exports.SPRING_GENTLE=T;exports.SPRING_SETTLE=i;exports.SPRING_SMOOTH=E;exports.SPRING_SNAPPY=S;
@@ -25,6 +25,14 @@ export { SETTLE_REST_DELTA } from './spring-settle';
25
25
  export declare const MOTION_DURATION_FAST_MS = 150;
26
26
  export declare const MOTION_DURATION_BASE_MS = 200;
27
27
  export declare const MOTION_DURATION_SLOW_MS = 300;
28
+ /**
29
+ * Easing curves — mirror --ds-motion-ease-decelerate / -emphasized, for
30
+ * JS-driven animation (WAAPI `easing`) that cannot read the CSS tokens.
31
+ * decelerate: motion that carries on from a gesture and settles
32
+ * emphasized: entrances that land with a soft finish
33
+ */
34
+ export declare const MOTION_EASE_DECELERATE = "cubic-bezier(0, 0, 0.2, 1)";
35
+ export declare const MOTION_EASE_EMPHASIZED = "cubic-bezier(0.22, 1, 0.36, 1)";
28
36
  /**
29
37
  * Quick and controlled, no overshoot — list reorders and other
30
38
  * small-element layout moves.
@@ -1 +1 @@
1
- {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
1
+ {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
@@ -1,27 +1,28 @@
1
- const s = 150, n = 200, t = {
1
+ import { SETTLE_REST_DELTA as p } from "./spring-settle.js";
2
+ var i = {
2
3
  type: "spring",
3
4
  stiffness: 500,
4
5
  damping: 45
5
- }, i = {
6
+ }, n = {
7
+ type: "spring",
6
8
  stiffness: 180,
7
9
  damping: 24,
8
10
  mass: 1
9
- }, p = {
11
+ }, a = {
10
12
  type: "spring",
11
13
  stiffness: 80,
12
14
  damping: 20,
13
15
  mass: 1
14
- }, S = {
16
+ }, r = {
15
17
  type: "spring",
16
18
  stiffness: 30,
17
19
  damping: 9,
18
20
  mass: 0.5
19
21
  };
20
22
  export {
21
- n as MOTION_DURATION_BASE_MS,
22
- s as MOTION_DURATION_FAST_MS,
23
- p as SPRING_GENTLE,
24
- S as SPRING_SETTLE,
25
- i as SPRING_SMOOTH,
26
- t as SPRING_SNAPPY
23
+ p as SETTLE_REST_DELTA,
24
+ a as SPRING_GENTLE,
25
+ r as SPRING_SETTLE,
26
+ n as SPRING_SMOOTH,
27
+ i as SPRING_SNAPPY
27
28
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function r({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-hidden":"true",className:"flex-1"}),t,e.jsx("div",{"aria-hidden":"true",className:"flex-[1.6]"})]})}exports.OpticalCenter=r;
1
+ const i=require("../_virtual/_rolldown/runtime.cjs");let r=require("react");r=i.__toESM(r,1);let e=require("react/jsx-runtime");function a({children:t}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"aria-hidden":"true",className:"flex-1"}),t,(0,e.jsx)("div",{"aria-hidden":"true",className:"flex-[1.6]"})]})}exports.OpticalCenter=a;
@@ -7,6 +7,6 @@ interface OpticalCenterProps {
7
7
  * Two flexible spacers in a 38/62 ratio around the children. The parent must
8
8
  * be a `flex flex-1 flex-col` box for the ratio to have room to work.
9
9
  */
10
- declare function OpticalCenter({ children }: OpticalCenterProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function OpticalCenter({ children }: OpticalCenterProps): React.JSX.Element;
11
11
  export { OpticalCenter };
12
12
  //# sourceMappingURL=optical-center.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAQtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,qBAQtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,11 +1,18 @@
1
- import { jsxs as a, Fragment as i, jsx as e } from "react/jsx-runtime";
2
- function n({ children: r }) {
1
+ import "react";
2
+ import { Fragment as i, jsx as e, jsxs as a } from "react/jsx-runtime";
3
+ function d({ children: r }) {
3
4
  return /* @__PURE__ */ a(i, { children: [
4
- /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "flex-1" }),
5
+ /* @__PURE__ */ e("div", {
6
+ "aria-hidden": "true",
7
+ className: "flex-1"
8
+ }),
5
9
  r,
6
- /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "flex-[1.6]" })
10
+ /* @__PURE__ */ e("div", {
11
+ "aria-hidden": "true",
12
+ className: "flex-[1.6]"
13
+ })
7
14
  ] });
8
15
  }
9
16
  export {
10
- n as OpticalCenter
17
+ d as OpticalCenter
11
18
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=.005;exports.SETTLE_REST_DELTA=T;
1
+ var E=.005;exports.SETTLE_REST_DELTA=E;
@@ -1,4 +1,4 @@
1
- const E = 5e-3;
1
+ var E = 5e-3;
2
2
  export {
3
3
  E as SETTLE_REST_DELTA
4
4
  };
@@ -0,0 +1 @@
1
+ const t=require("../_virtual/_rolldown/runtime.cjs");let e=require("react");e=t.__toESM(e,1);var l="[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]",a={default:48,sm:40},n=e.createContext("default");function o(r){return{role:"region","aria-label":r??"Scrollable table",tabIndex:0}}exports.TABLE_CONTAINER_INSET=l;exports.TABLE_ROW_MIN_HEIGHT=a;exports.TableSizeContext=n;exports.scrollRegionProps=o;
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Internals shared by `Table` and `DataTable` / `VirtualizedDataTable`.
4
+ * This module is not in the package `exports` map, so nothing here is public
5
+ * API — `components/table.tsx` re-exports only what consumers need
6
+ * (`TableSize`).
7
+ */
8
+ /**
9
+ * Table density. One axis on the root (DS-556): the Table sets the row
10
+ * min-height for every cell and head beneath it, so a table reads as one
11
+ * density and sized content (Input, Button, Checkbox) never fights a per-cell
12
+ * size.
13
+ * - `default` — rows `h-12` (48px), column headers `h-12` (48px). The
14
+ * physical default height is unchanged from before DS-556.
15
+ * - `sm` — rows `h-10` (40px), column headers `h-9` (36px).
16
+ */
17
+ export type TableSize = "default" | "sm";
18
+ /**
19
+ * Where a table's frame comes from (DS-1103).
20
+ * - `own` — the table draws its own 1px `border-border` frame with `rounded-md`
21
+ * corners; every cell keeps its `p-2`.
22
+ * - `container` — no border, square corners; the first and last cell of every
23
+ * row (head, body, footer, empty and skeleton rows alike) pad to the
24
+ * surrounding container's gutter, `var(--content-inset)`, which `Card`
25
+ * publishes per density (24px for `data`); the `content` spacing token (24px)
26
+ * is the fallback outside any container. Use it inside `CardContent flush`,
27
+ * a Sheet or a dialog body so the page shows one box, not two.
28
+ */
29
+ export type TableFrame = "own" | "container";
30
+ /**
31
+ * Edge-cell padding for `frame="container"` — applied on the `<table>` so it
32
+ * reaches `TableHead`, `TableCell`, `TableEmpty`, footer and skeleton cells in
33
+ * both scroll-owner modes. The compound selector outranks the cells' own
34
+ * `p-2` / `px-2`.
35
+ */
36
+ export declare const TABLE_CONTAINER_INSET = "[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]";
37
+ /**
38
+ * Row min-height per Table `size`, in px — the `h-12` / `h-10` the cells
39
+ * carry in `tableCellVariants`. Keep the two in step: DataTable's virtualizer
40
+ * uses this as its default row estimate.
41
+ */
42
+ export declare const TABLE_ROW_MIN_HEIGHT: Record<TableSize, number>;
43
+ /** Density of the enclosing `Table`; cells and heads read it. */
44
+ export declare const TableSizeContext: React.Context<TableSize>;
45
+ /**
46
+ * Focusable scroll-region semantics for a table's scroll container:
47
+ * `role="region"` with an accessible name plus `tabIndex={0}`, so keyboard
48
+ * users can focus the container and scroll it (axe:
49
+ * scrollable-region-focusable).
50
+ *
51
+ * Single source of the contract and its "Scrollable table" default.
52
+ * `Table` applies it to its own wrapper (`scrollOwner="self"` + `minWidth`);
53
+ * `DataTable` / `VirtualizedDataTable` apply it to their outer wrapper,
54
+ * which owns scrolling instead. The caller decides *when* the container is
55
+ * a scroll region; this helper only says *what* that means.
56
+ */
57
+ export declare function scrollRegionProps(scrollRegionLabel: string | undefined): {
58
+ readonly role: "region";
59
+ readonly "aria-label": string;
60
+ readonly tabIndex: 0;
61
+ };
62
+ //# sourceMappingURL=table-internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-internal.d.ts","sourceRoot":"","sources":["../../src/lib/table-internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,WAAW,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,2GACwE,CAAC;AAE3G;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAG1D,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,gBAAgB,0BAA4C,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS;;;;EAMtE"}
@@ -0,0 +1,18 @@
1
+ import * as e from "react";
2
+ var r = "[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]", a = {
3
+ default: 48,
4
+ sm: 40
5
+ }, l = e.createContext("default");
6
+ function n(t) {
7
+ return {
8
+ role: "region",
9
+ "aria-label": t ?? "Scrollable table",
10
+ tabIndex: 0
11
+ };
12
+ }
13
+ export {
14
+ r as TABLE_CONTAINER_INSET,
15
+ a as TABLE_ROW_MIN_HEIGHT,
16
+ l as TableSizeContext,
17
+ n as scrollRegionProps
18
+ };
@@ -0,0 +1 @@
1
+ const a=require("../_virtual/_rolldown/runtime.cjs");let e=require("react");e=a.__toESM(e,1);function v(t,i,u){const[l,f]=e.useState(i),n=t!==void 0?t:l,s=e.useRef(n);e.useEffect(()=>{s.current=n});const o=t!==void 0;return[n,e.useCallback(r=>{const c=typeof r=="function"?r(s.current):r;o||f(c),u?.(c)},[o,u])]}exports.useControllable=v;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Controlled/uncontrolled state helper.
3
+ *
4
+ * Resolves a "controlled or internal" value and returns a setter that takes
5
+ * a value or an updater (`SetStateAction<T>`, as TanStack Table expects).
6
+ * When the `controlled` value is defined, the parent owns state and
7
+ * `onChange` is called with the next value. When undefined, state is kept
8
+ * internally and `onChange` is still invoked (the common "notify but
9
+ * self-manage" pattern). Shared by DataTable and MediaViewer.
10
+ */
11
+ export declare function useControllable<T>(controlled: T | undefined, initialValue: T, onChange?: (next: T) => void): [T, (updater: T | ((prev: T) => T)) => void];
12
+ //# sourceMappingURL=use-controllable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-controllable.d.ts","sourceRoot":"","sources":["../../src/lib/use-controllable.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,YAAY,EAAE,CAAC,EACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAC3B,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CA0B9C"}
@@ -0,0 +1,15 @@
1
+ import * as t from "react";
2
+ function l(e, r, o) {
3
+ const [i, a] = t.useState(r), n = e !== void 0 ? e : i, c = t.useRef(n);
4
+ t.useEffect(() => {
5
+ c.current = n;
6
+ });
7
+ const u = e !== void 0;
8
+ return [n, t.useCallback((s) => {
9
+ const f = typeof s == "function" ? s(c.current) : s;
10
+ u || a(f), o?.(f);
11
+ }, [u, o])];
12
+ }
13
+ export {
14
+ l as useControllable
15
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");function o(e,n,r){process.env.NODE_ENV==="development"&&i.useEffect(()=>{const t=requestAnimationFrame(()=>{e()&&console.warn(`[BrightLocal DS] ${n}`)});return()=>cancelAnimationFrame(t)},r)}exports.useDevWarning=o;
1
+ let a=require("react");function i(e,n,r){process.env.NODE_ENV==="development"&&(0,a.useEffect)(()=>{const t=requestAnimationFrame(()=>{e()&&console.warn(`[BrightLocal DS] ${n}`)});return()=>cancelAnimationFrame(t)},r)}exports.useDevWarning=i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("clsx"),a=require("tailwind-merge"),o=a.extendTailwindMerge({extend:{classGroups:{duration:[{duration:["fast","base","slow"]}],ease:[{ease:["emphasized","overshoot"]}],"font-weight":[{text:["emphasis"]}],"font-size":[{text:["display","heading-page","heading-section","heading-subsection","heading-compact","body","body-sm","body-xs","label","label-sm","metric","code","code-inline"]}]}}});function s(...e){return o(t.clsx(e))}const d="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";exports.FLOATING_CONTENT_ANIMATION=d;exports.cn=s;
1
+ let t=require("clsx"),a=require("tailwind-merge");var d=(0,a.extendTailwindMerge)({extend:{classGroups:{duration:[{duration:["fast","base","slow"]}],ease:[{ease:["emphasized","overshoot"]}],"font-weight":[{text:["emphasis"]}],"font-size":[{text:["display","heading-page","heading-section","heading-subsection","heading-compact","body","body-sm","body-xs","label","label-sm","field","metric","code","code-inline"]}]}}});function s(...e){return d((0,t.clsx)(e))}var i="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";exports.FLOATING_CONTENT_ANIMATION=i;exports.cn=s;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAyC7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,0BAA0B,0aACkY,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AA0C7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,0BAA0B,0aACkY,CAAC"}
package/dist/lib/utils.js CHANGED
@@ -1,40 +1,34 @@
1
- import { clsx as e } from "clsx";
1
+ import { clsx as t } from "clsx";
2
2
  import { extendTailwindMerge as a } from "tailwind-merge";
3
- const o = a({
4
- extend: {
5
- classGroups: {
6
- duration: [{ duration: ["fast", "base", "slow"] }],
7
- ease: [{ ease: ["emphasized", "overshoot"] }],
8
- // text-emphasis sets font-weight only, so it belongs to the font-weight
9
- // group (conflicts with font-bold etc.), NOT font-size — and unregistered
10
- // it would be treated as a text colour and clobber color utilities.
11
- "font-weight": [{ text: ["emphasis"] }],
12
- "font-size": [
13
- {
14
- text: [
15
- "display",
16
- "heading-page",
17
- "heading-section",
18
- "heading-subsection",
19
- "heading-compact",
20
- "body",
21
- "body-sm",
22
- "body-xs",
23
- "label",
24
- "label-sm",
25
- "metric",
26
- "code",
27
- "code-inline"
28
- ]
29
- }
30
- ]
31
- }
32
- }
33
- });
34
- function i(...t) {
35
- return o(e(t));
3
+ var o = a({ extend: { classGroups: {
4
+ duration: [{ duration: [
5
+ "fast",
6
+ "base",
7
+ "slow"
8
+ ] }],
9
+ ease: [{ ease: ["emphasized", "overshoot"] }],
10
+ "font-weight": [{ text: ["emphasis"] }],
11
+ "font-size": [{ text: [
12
+ "display",
13
+ "heading-page",
14
+ "heading-section",
15
+ "heading-subsection",
16
+ "heading-compact",
17
+ "body",
18
+ "body-sm",
19
+ "body-xs",
20
+ "label",
21
+ "label-sm",
22
+ "field",
23
+ "metric",
24
+ "code",
25
+ "code-inline"
26
+ ] }]
27
+ } } });
28
+ function i(...e) {
29
+ return o(t(e));
36
30
  }
37
- const n = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";
31
+ var n = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";
38
32
  export {
39
33
  n as FLOATING_CONTENT_ANIMATION,
40
34
  i as cn
package/dist/link.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),y=require("@brightlocal/icons"),u=require("@radix-ui/react-slot"),j=require("class-variance-authority"),S=require("@brightlocal/ui-components/button"),a=require("@brightlocal/ui-components/lib/utils");function q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const O=q(m),_=new Set(["aria-disabled:opacity-50","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive","data-[state=open]:bg-accent"]),i=t=>a.cn(S.ButtonVariants({variant:t,size:"default"}).split(/\s+/).filter(e=>e&&!_.has(e)).join(" "),"no-underline"),w=j.cva("",{variants:{variant:{inline:["inline-flex","items-center","gap-2","cursor-pointer","outline-none","rounded-sm","text-link","dark:text-link-dark","no-underline","hover:underline","hover:underline-offset-4","active:text-link/80","visited:text-link-visited","visited:dark:text-link-visited-dark","transition-[text-decoration,text-decoration-color,text-underline-offset,color]","duration-fast","ease-out","focus-visible:shadow-default"],inherit:["inline","cursor-pointer","outline-none","rounded-sm","text-inherit","underline","underline-offset-4","decoration-current/60","hover:decoration-current","[&_svg]:ml-1","[&_svg]:inline","[&_svg]:align-text-bottom","transition-[text-decoration-color]","duration-fast","ease-out","focus-visible:shadow-default"],primary:i("primary"),filled:i("secondary"),outline:a.cn(i("outline"),"text-foreground"),ghost:i("ghost"),icon:a.cn(i("ghost"),"size-9 p-0")}},defaultVariants:{variant:"inline"}}),f=O.forwardRef(({className:t,variant:e="inline",dataHook:n,trackingEl:r,trackingLabel:k,asChild:g=!1,external:s=!1,showExternalIcon:v=!0,children:l,...x},b)=>{const p=s?{target:"_blank",rel:"noopener noreferrer"}:{},h=e==="inline"?"link-default":`link-${e}`,c={ref:b,className:a.cn(w({variant:e}),t),"data-hook":n,"data-slot":"link","data-tracking-el":r||h,"data-tracking-label":k,...p,...x},d=s&&v&&o.jsx(y.ExternalLink,{"aria-hidden":"true","data-slot":"external-icon"});return g?o.jsxs(u.Slot,{...c,children:[o.jsx(u.Slottable,{children:l}),d]}):o.jsxs("a",{...c,children:[l,d]})});f.displayName="Link";exports.Link=f;
1
+ const m=require("./_virtual/_rolldown/runtime.cjs");let a=require("react");a=m.__toESM(a,1);let q=require("@brightlocal/icons"),n=require("@brightlocal/ui-components/lib/utils"),i=require("react/jsx-runtime"),u=require("@radix-ui/react-slot"),y=require("class-variance-authority"),j=require("@brightlocal/ui-components/button");var S=new Set(["aria-disabled:opacity-50","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive","data-[state=open]:bg-accent"]),t=r=>(0,n.cn)((0,j.ButtonVariants)({variant:r,size:"default"}).split(/\s+/).filter(e=>e&&!S.has(e)).join(" "),"no-underline"),L=(0,y.cva)("",{variants:{variant:{inline:["inline-flex","items-center","gap-2","cursor-pointer","outline-none","rounded-sm","text-link","dark:text-link-dark","no-underline","hover:underline","hover:underline-offset-4","active:text-link/80","visited:text-link-visited","visited:dark:text-link-visited-dark","transition-[text-decoration,text-decoration-color,text-underline-offset,color]","duration-fast","ease-out","focus-visible:shadow-default"],inherit:["inline","cursor-pointer","outline-none","rounded-sm","text-inherit","underline","underline-offset-4","decoration-current/60","hover:decoration-current","[&_svg]:ml-1","[&_svg]:inline","[&_svg]:align-text-bottom","transition-[text-decoration-color]","duration-fast","ease-out","focus-visible:shadow-default"],primary:t("primary"),filled:t("secondary"),outline:(0,n.cn)(t("outline"),"text-foreground"),ghost:t("ghost"),icon:(0,n.cn)(t("ghost"),"size-9 p-0")}},defaultVariants:{variant:"inline"}}),c=a.forwardRef(({className:r,variant:e="inline",dataHook:f,trackingEl:v,trackingLabel:_,asChild:k=!1,external:o=!1,showExternalIcon:x=!0,children:l,...g},h)=>{const b=o?{target:"_blank",rel:"noopener noreferrer"}:{},p=e==="inline"?"link-default":`link-${e}`,s={ref:h,className:(0,n.cn)(L({variant:e}),r),"data-hook":f,"data-slot":"link","data-tracking-el":v||p,"data-tracking-label":_,...b,...g},d=o&&x&&(0,i.jsx)(q.ExternalLink,{"aria-hidden":"true","data-slot":"external-icon"});return k?(0,i.jsxs)(u.Slot,{...s,children:[(0,i.jsx)(u.Slottable,{children:l}),d]}):(0,i.jsxs)("a",{...s,children:[l,d]})});c.displayName="Link";exports.Link=c;
package/dist/link.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const linkVariants: (props?: ({
4
- variant?: "inherit" | "inline" | "ghost" | "filled" | "icon" | "outline" | "primary" | null | undefined;
4
+ variant?: "inherit" | "inline" | "ghost" | "filled" | "icon" | "primary" | "outline" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  /** Supported visual style variants for the Link component. */
7
7
  export type LinkVariant = NonNullable<VariantProps<typeof linkVariants>["variant"]>;