@brightlocal/ui-components 3.2.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 (428) hide show
  1. package/AI_USAGE.md +10 -0
  2. package/README.md +3 -1
  3. package/component-meta.json +1271 -428
  4. package/deprecations.json +44 -0
  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 +6 -4
  10. package/dist/alert-dialog.d.ts.map +1 -1
  11. package/dist/alert-dialog.js +85 -133
  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 +106 -168
  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 +23 -1
  22. package/dist/badge.d.ts.map +1 -1
  23. package/dist/badge.js +90 -91
  24. package/dist/banner.cjs +1 -1
  25. package/dist/banner.js +102 -148
  26. package/dist/blocks/empty-state.cjs +1 -1
  27. package/dist/blocks/empty-state.d.ts +20 -3
  28. package/dist/blocks/empty-state.d.ts.map +1 -1
  29. package/dist/blocks/empty-state.js +73 -140
  30. package/dist/blocks/input-list.cjs +2 -2
  31. package/dist/blocks/input-list.d.ts +2 -2
  32. package/dist/blocks/input-list.d.ts.map +1 -1
  33. package/dist/blocks/input-list.js +136 -176
  34. package/dist/blocks/progress-state.cjs +1 -1
  35. package/dist/blocks/progress-state.js +223 -347
  36. package/dist/blocks/sidebar.cjs +1 -1
  37. package/dist/blocks/sidebar.d.ts +11 -6
  38. package/dist/blocks/sidebar.d.ts.map +1 -1
  39. package/dist/blocks/sidebar.js +763 -1092
  40. package/dist/brand-illustration-motif.cjs +1 -1
  41. package/dist/brand-illustration-motif.js +40 -61
  42. package/dist/breadcrumb.cjs +1 -1
  43. package/dist/breadcrumb.js +62 -102
  44. package/dist/button-group.cjs +1 -1
  45. package/dist/button-group.js +23 -31
  46. package/dist/button.cjs +1 -1
  47. package/dist/button.d.ts +4 -2
  48. package/dist/button.d.ts.map +1 -1
  49. package/dist/button.js +149 -189
  50. package/dist/calendar.cjs +1 -1
  51. package/dist/calendar.d.ts +87 -3
  52. package/dist/calendar.d.ts.map +1 -1
  53. package/dist/calendar.js +116 -173
  54. package/dist/callout.cjs +1 -1
  55. package/dist/callout.js +73 -96
  56. package/dist/card.cjs +1 -1
  57. package/dist/card.d.ts +10 -4
  58. package/dist/card.d.ts.map +1 -1
  59. package/dist/card.js +233 -316
  60. package/dist/carousel.cjs +1 -1
  61. package/dist/carousel.d.ts +3 -3
  62. package/dist/carousel.d.ts.map +1 -1
  63. package/dist/carousel.js +174 -268
  64. package/dist/centred-layout.cjs +1 -1
  65. package/dist/centred-layout.js +27 -48
  66. package/dist/chart-empty.cjs +1 -1
  67. package/dist/chart-empty.js +18 -27
  68. package/dist/chart.cjs +7 -7
  69. package/dist/chart.d.ts +23 -13
  70. package/dist/chart.d.ts.map +1 -1
  71. package/dist/chart.js +445 -651
  72. package/dist/checkbox.cjs +1 -1
  73. package/dist/checkbox.js +36 -69
  74. package/dist/chip.cjs +1 -1
  75. package/dist/chip.js +116 -173
  76. package/dist/collapsible.cjs +1 -1
  77. package/dist/collapsible.d.ts.map +1 -1
  78. package/dist/collapsible.js +35 -41
  79. package/dist/combobox.cjs +3 -3
  80. package/dist/combobox.d.ts +14 -4
  81. package/dist/combobox.d.ts.map +1 -1
  82. package/dist/combobox.js +439 -638
  83. package/dist/command.cjs +1 -1
  84. package/dist/command.d.ts.map +1 -1
  85. package/dist/command.js +273 -420
  86. package/dist/context-menu.cjs +1 -1
  87. package/dist/context-menu.d.ts +5 -5
  88. package/dist/context-menu.d.ts.map +1 -1
  89. package/dist/context-menu.js +121 -191
  90. package/dist/data-table.cjs +1 -1
  91. package/dist/data-table.d.ts +280 -129
  92. package/dist/data-table.d.ts.map +1 -1
  93. package/dist/data-table.js +687 -948
  94. package/dist/date-picker.cjs +1 -1
  95. package/dist/date-picker.d.ts +15 -4
  96. package/dist/date-picker.d.ts.map +1 -1
  97. package/dist/date-picker.js +156 -231
  98. package/dist/delta.cjs +1 -0
  99. package/dist/delta.d.ts +79 -0
  100. package/dist/delta.d.ts.map +1 -0
  101. package/dist/delta.js +62 -0
  102. package/dist/description.cjs +1 -1
  103. package/dist/description.js +11 -20
  104. package/dist/dialog.cjs +1 -1
  105. package/dist/dialog.d.ts +1 -1
  106. package/dist/dialog.d.ts.map +1 -1
  107. package/dist/dialog.js +76 -116
  108. package/dist/drawer.cjs +1 -1
  109. package/dist/drawer.d.ts +11 -11
  110. package/dist/drawer.d.ts.map +1 -1
  111. package/dist/drawer.js +76 -134
  112. package/dist/dropdown-menu.cjs +1 -1
  113. package/dist/dropdown-menu.d.ts +6 -6
  114. package/dist/dropdown-menu.d.ts.map +1 -1
  115. package/dist/dropdown-menu.js +179 -300
  116. package/dist/field.cjs +1 -1
  117. package/dist/field.d.ts +9 -9
  118. package/dist/field.d.ts.map +1 -1
  119. package/dist/field.js +166 -286
  120. package/dist/global-layout.cjs +1 -1
  121. package/dist/global-layout.js +203 -342
  122. package/dist/grid.cjs +1 -1
  123. package/dist/grid.js +16 -29
  124. package/dist/header.cjs +1 -1
  125. package/dist/header.js +21 -38
  126. package/dist/height-transition.cjs +1 -1
  127. package/dist/height-transition.js +38 -55
  128. package/dist/hooks/use-breakpoint.cjs +1 -1
  129. package/dist/hooks/use-breakpoint.js +9 -9
  130. package/dist/hooks/use-debounce.cjs +1 -1
  131. package/dist/hooks/use-debounce.js +12 -11
  132. package/dist/hooks/use-delayed-pending.cjs +1 -1
  133. package/dist/hooks/use-delayed-pending.js +8 -9
  134. package/dist/hooks/use-filter-search-params.cjs +1 -0
  135. package/dist/hooks/use-filter-search-params.d.ts +93 -0
  136. package/dist/hooks/use-filter-search-params.d.ts.map +1 -0
  137. package/dist/hooks/use-filter-search-params.js +122 -0
  138. package/dist/hooks/use-mobile.cjs +1 -1
  139. package/dist/hooks/use-mobile.js +6 -6
  140. package/dist/hooks/use-overlay-pointer-lock.cjs +1 -1
  141. package/dist/hooks/use-overlay-pointer-lock.js +8 -9
  142. package/dist/hooks/use-prefers-reduced-motion.cjs +1 -1
  143. package/dist/hooks/use-prefers-reduced-motion.js +5 -8
  144. package/dist/hover-card.cjs +1 -1
  145. package/dist/hover-card.d.ts +1 -1
  146. package/dist/hover-card.d.ts.map +1 -1
  147. package/dist/hover-card.js +30 -62
  148. package/dist/index.cjs +1 -1
  149. package/dist/index.d.ts +6 -0
  150. package/dist/index.d.ts.map +1 -1
  151. package/dist/index.js +630 -608
  152. package/dist/info-tooltip.cjs +1 -1
  153. package/dist/info-tooltip.js +22 -36
  154. package/dist/input-chip.cjs +1 -1
  155. package/dist/input-chip.d.ts +32 -3
  156. package/dist/input-chip.d.ts.map +1 -1
  157. package/dist/input-chip.js +181 -230
  158. package/dist/input-group.cjs +1 -1
  159. package/dist/input-group.js +174 -221
  160. package/dist/input-otp.cjs +1 -1
  161. package/dist/input-otp.d.ts +3 -3
  162. package/dist/input-otp.d.ts.map +1 -1
  163. package/dist/input-otp.js +102 -146
  164. package/dist/input-password.cjs +1 -1
  165. package/dist/input-password.d.ts +12 -16
  166. package/dist/input-password.d.ts.map +1 -1
  167. package/dist/input-password.js +139 -171
  168. package/dist/input.cjs +1 -1
  169. package/dist/input.d.ts.map +1 -1
  170. package/dist/input.js +51 -73
  171. package/dist/label.cjs +1 -1
  172. package/dist/label.js +20 -38
  173. package/dist/lib/block-illustration.cjs +1 -1
  174. package/dist/lib/block-illustration.d.ts +1 -1
  175. package/dist/lib/block-illustration.d.ts.map +1 -1
  176. package/dist/lib/block-illustration.js +16 -18
  177. package/dist/lib/compose-event-handlers.cjs +1 -0
  178. package/dist/lib/compose-event-handlers.d.ts +9 -0
  179. package/dist/lib/compose-event-handlers.d.ts.map +1 -0
  180. package/dist/lib/compose-event-handlers.js +8 -0
  181. package/dist/lib/download-file.cjs +1 -0
  182. package/dist/lib/download-file.d.ts +14 -0
  183. package/dist/lib/download-file.d.ts.map +1 -0
  184. package/dist/lib/download-file.js +40 -0
  185. package/dist/lib/empty-canvas.cjs +1 -1
  186. package/dist/lib/empty-canvas.js +28 -56
  187. package/dist/lib/empty-chip.cjs +1 -1
  188. package/dist/lib/empty-chip.d.ts +14 -3
  189. package/dist/lib/empty-chip.d.ts.map +1 -1
  190. package/dist/lib/empty-chip.js +15 -11
  191. package/dist/lib/field-aria.cjs +1 -0
  192. package/dist/lib/field-aria.d.ts +34 -0
  193. package/dist/lib/field-aria.d.ts.map +1 -0
  194. package/dist/lib/field-aria.js +52 -0
  195. package/dist/lib/image-file-info.cjs +1 -0
  196. package/dist/lib/image-file-info.d.ts +25 -0
  197. package/dist/lib/image-file-info.d.ts.map +1 -0
  198. package/dist/lib/image-file-info.js +67 -0
  199. package/dist/lib/media-viewer-content.cjs +1 -0
  200. package/dist/lib/media-viewer-content.d.ts +102 -0
  201. package/dist/lib/media-viewer-content.d.ts.map +1 -0
  202. package/dist/lib/media-viewer-content.js +650 -0
  203. package/dist/lib/media-viewer-internal.cjs +1 -0
  204. package/dist/lib/media-viewer-internal.d.ts +98 -0
  205. package/dist/lib/media-viewer-internal.d.ts.map +1 -0
  206. package/dist/lib/media-viewer-internal.js +61 -0
  207. package/dist/lib/media-viewer-motion.cjs +1 -0
  208. package/dist/lib/media-viewer-motion.d.ts +40 -0
  209. package/dist/lib/media-viewer-motion.d.ts.map +1 -0
  210. package/dist/lib/media-viewer-motion.js +37 -0
  211. package/dist/lib/motion.cjs +1 -1
  212. package/dist/lib/motion.d.ts +8 -0
  213. package/dist/lib/motion.d.ts.map +1 -1
  214. package/dist/lib/motion.js +11 -10
  215. package/dist/lib/optical-center.cjs +1 -1
  216. package/dist/lib/optical-center.d.ts +1 -1
  217. package/dist/lib/optical-center.d.ts.map +1 -1
  218. package/dist/lib/optical-center.js +12 -5
  219. package/dist/lib/spring-settle.cjs +1 -1
  220. package/dist/lib/spring-settle.js +1 -1
  221. package/dist/lib/table-internal.cjs +1 -0
  222. package/dist/lib/table-internal.d.ts +62 -0
  223. package/dist/lib/table-internal.d.ts.map +1 -0
  224. package/dist/lib/table-internal.js +18 -0
  225. package/dist/lib/use-controllable.cjs +1 -0
  226. package/dist/lib/use-controllable.d.ts +12 -0
  227. package/dist/lib/use-controllable.d.ts.map +1 -0
  228. package/dist/lib/use-controllable.js +15 -0
  229. package/dist/lib/use-dev-warning.cjs +1 -1
  230. package/dist/lib/utils.cjs +1 -1
  231. package/dist/lib/utils.js +26 -33
  232. package/dist/link.cjs +1 -1
  233. package/dist/link.d.ts +1 -1
  234. package/dist/link.js +78 -124
  235. package/dist/list.cjs +1 -1
  236. package/dist/list.d.ts +8 -0
  237. package/dist/list.d.ts.map +1 -1
  238. package/dist/list.js +94 -156
  239. package/dist/loading.cjs +1 -1
  240. package/dist/loading.js +124 -151
  241. package/dist/logo-mark.cjs +1 -0
  242. package/dist/logo-mark.d.ts +79 -0
  243. package/dist/logo-mark.d.ts.map +1 -0
  244. package/dist/logo-mark.js +219 -0
  245. package/dist/logo.cjs +1 -1
  246. package/dist/logo.d.ts +1 -1
  247. package/dist/logo.d.ts.map +1 -1
  248. package/dist/logo.js +51 -87
  249. package/dist/map.cjs +1 -1
  250. package/dist/map.d.ts.map +1 -1
  251. package/dist/map.js +390 -586
  252. package/dist/media-empty.cjs +1 -1
  253. package/dist/media-empty.js +27 -42
  254. package/dist/media-viewer.cjs +1 -0
  255. package/dist/media-viewer.d.ts +224 -0
  256. package/dist/media-viewer.d.ts.map +1 -0
  257. package/dist/media-viewer.js +295 -0
  258. package/dist/menubar.cjs +1 -1
  259. package/dist/menubar.d.ts +14 -14
  260. package/dist/menubar.d.ts.map +1 -1
  261. package/dist/menubar.js +130 -267
  262. package/dist/multi-select-filter.cjs +1 -1
  263. package/dist/multi-select-filter.d.ts +9 -1
  264. package/dist/multi-select-filter.d.ts.map +1 -1
  265. package/dist/multi-select-filter.js +357 -446
  266. package/dist/navigation-menu.cjs +1 -1
  267. package/dist/navigation-menu.js +108 -172
  268. package/dist/pagination.cjs +1 -1
  269. package/dist/pagination.d.ts +36 -12
  270. package/dist/pagination.d.ts.map +1 -1
  271. package/dist/pagination.js +208 -281
  272. package/dist/popover.cjs +1 -1
  273. package/dist/popover.d.ts +1 -1
  274. package/dist/popover.d.ts.map +1 -1
  275. package/dist/popover.js +34 -45
  276. package/dist/progress.cjs +1 -1
  277. package/dist/progress.d.ts +17 -2
  278. package/dist/progress.d.ts.map +1 -1
  279. package/dist/progress.js +116 -162
  280. package/dist/radio-group.cjs +1 -1
  281. package/dist/radio-group.js +90 -146
  282. package/dist/rating.cjs +1 -1
  283. package/dist/rating.d.ts +80 -13
  284. package/dist/rating.d.ts.map +1 -1
  285. package/dist/rating.js +70 -65
  286. package/dist/relative-date.cjs +1 -1
  287. package/dist/relative-date.d.ts.map +1 -1
  288. package/dist/relative-date.js +73 -89
  289. package/dist/resizable.cjs +1 -1
  290. package/dist/resizable.d.ts +39 -23
  291. package/dist/resizable.d.ts.map +1 -1
  292. package/dist/resizable.js +42 -44
  293. package/dist/result-count.cjs +1 -0
  294. package/dist/result-count.d.ts +110 -0
  295. package/dist/result-count.d.ts.map +1 -0
  296. package/dist/result-count.js +49 -0
  297. package/dist/route-progress.cjs +1 -1
  298. package/dist/route-progress.js +58 -102
  299. package/dist/scroll-area.cjs +1 -1
  300. package/dist/scroll-area.d.ts +9 -1
  301. package/dist/scroll-area.d.ts.map +1 -1
  302. package/dist/scroll-area.js +44 -79
  303. package/dist/select.cjs +2 -2
  304. package/dist/select.d.ts +10 -10
  305. package/dist/select.d.ts.map +1 -1
  306. package/dist/select.js +118 -238
  307. package/dist/separator.cjs +1 -1
  308. package/dist/separator.js +90 -78
  309. package/dist/sheet.cjs +1 -1
  310. package/dist/sheet.d.ts +8 -5
  311. package/dist/sheet.d.ts.map +1 -1
  312. package/dist/sheet.js +250 -317
  313. package/dist/single-select-filter.cjs +1 -1
  314. package/dist/single-select-filter.d.ts +32 -0
  315. package/dist/single-select-filter.d.ts.map +1 -1
  316. package/dist/single-select-filter.js +201 -203
  317. package/dist/skeleton.cjs +1 -1
  318. package/dist/skeleton.js +24 -38
  319. package/dist/slider.cjs +1 -1
  320. package/dist/slider.js +51 -81
  321. package/dist/sonner.cjs +1 -1
  322. package/dist/sonner.d.ts +1 -1
  323. package/dist/sonner.d.ts.map +1 -1
  324. package/dist/sonner.js +101 -125
  325. package/dist/spinner.cjs +1 -1
  326. package/dist/spinner.js +22 -31
  327. package/dist/split-layout.cjs +1 -1
  328. package/dist/split-layout.js +52 -101
  329. package/dist/status.cjs +1 -0
  330. package/dist/status.d.ts +51 -0
  331. package/dist/status.d.ts.map +1 -0
  332. package/dist/status.js +60 -0
  333. package/dist/stepper.cjs +1 -1
  334. package/dist/stepper.js +184 -316
  335. package/dist/switch.cjs +1 -1
  336. package/dist/switch.js +17 -32
  337. package/dist/table.cjs +1 -1
  338. package/dist/table.d.ts +103 -30
  339. package/dist/table.d.ts.map +1 -1
  340. package/dist/table.js +170 -209
  341. package/dist/tabs.cjs +1 -1
  342. package/dist/tabs.d.ts.map +1 -1
  343. package/dist/tabs.js +102 -147
  344. package/dist/text-reveal-motion.cjs +1 -1
  345. package/dist/text-reveal-motion.js +307 -363
  346. package/dist/textarea.cjs +1 -1
  347. package/dist/textarea.d.ts.map +1 -1
  348. package/dist/textarea.js +22 -35
  349. package/dist/toggle-group.cjs +1 -1
  350. package/dist/toggle-group.js +43 -62
  351. package/dist/toggle.cjs +1 -1
  352. package/dist/toggle.js +34 -46
  353. package/dist/tooltip.cjs +1 -1
  354. package/dist/tooltip.d.ts +2 -2
  355. package/dist/tooltip.d.ts.map +1 -1
  356. package/dist/tooltip.js +157 -249
  357. package/dist/typography-heading.cjs +1 -1
  358. package/dist/typography-heading.js +25 -61
  359. package/dist/typography-text.cjs +1 -1
  360. package/dist/typography-text.js +27 -57
  361. package/dist/typography.cjs +1 -1
  362. package/dist/typography.js +132 -340
  363. package/package.json +46 -46
  364. package/src/blocks/empty-state.tsx +34 -18
  365. package/src/blocks/sidebar.tsx +86 -31
  366. package/src/components/accordion.tsx +1 -1
  367. package/src/components/alert-dialog.tsx +4 -2
  368. package/src/components/badge.tsx +127 -15
  369. package/src/components/breadcrumb.tsx +1 -1
  370. package/src/components/button.tsx +8 -6
  371. package/src/components/calendar.tsx +155 -9
  372. package/src/components/card.tsx +63 -10
  373. package/src/components/carousel.tsx +4 -1
  374. package/src/components/chart.tsx +151 -17
  375. package/src/components/checkbox.tsx +1 -1
  376. package/src/components/collapsible.tsx +4 -1
  377. package/src/components/combobox.tsx +40 -7
  378. package/src/components/command.tsx +9 -10
  379. package/src/components/context-menu.tsx +4 -4
  380. package/src/components/data-table.tsx +619 -237
  381. package/src/components/date-picker.tsx +31 -4
  382. package/src/components/delta.tsx +217 -0
  383. package/src/components/drawer.tsx +5 -5
  384. package/src/components/dropdown-menu.tsx +4 -4
  385. package/src/components/field.tsx +36 -15
  386. package/src/components/global-layout.tsx +1 -1
  387. package/src/components/input-chip.tsx +51 -7
  388. package/src/components/input-group.tsx +1 -1
  389. package/src/components/input-password.tsx +15 -19
  390. package/src/components/input.tsx +10 -1
  391. package/src/components/list.tsx +14 -2
  392. package/src/components/logo-mark.tsx +345 -0
  393. package/src/components/map.tsx +18 -20
  394. package/src/components/media-viewer.tsx +908 -0
  395. package/src/components/multi-select-filter.tsx +255 -121
  396. package/src/components/navigation-menu.tsx +2 -2
  397. package/src/components/pagination.tsx +86 -26
  398. package/src/components/progress.tsx +91 -23
  399. package/src/components/rating.tsx +200 -74
  400. package/src/components/relative-date.tsx +19 -11
  401. package/src/components/resizable.tsx +86 -33
  402. package/src/components/result-count.tsx +253 -0
  403. package/src/components/scroll-area.tsx +31 -5
  404. package/src/components/select.tsx +2 -2
  405. package/src/components/sheet.tsx +14 -4
  406. package/src/components/single-select-filter.tsx +136 -41
  407. package/src/components/slider.tsx +2 -2
  408. package/src/components/status.tsx +162 -0
  409. package/src/components/switch.tsx +1 -1
  410. package/src/components/table.tsx +278 -106
  411. package/src/components/tabs.tsx +1 -0
  412. package/src/components/textarea.tsx +20 -2
  413. package/src/components/toggle.tsx +2 -2
  414. package/src/components/tooltip.tsx +11 -20
  415. package/src/hooks/use-filter-search-params.ts +302 -0
  416. package/src/index.ts +6 -0
  417. package/src/lib/compose-event-handlers.ts +14 -0
  418. package/src/lib/download-file.ts +61 -0
  419. package/src/lib/empty-chip.tsx +52 -0
  420. package/src/lib/field-aria.tsx +97 -0
  421. package/src/lib/image-file-info.ts +102 -0
  422. package/src/lib/media-viewer-content.tsx +1587 -0
  423. package/src/lib/media-viewer-internal.tsx +191 -0
  424. package/src/lib/media-viewer-motion.ts +120 -0
  425. package/src/lib/motion.ts +9 -0
  426. package/src/lib/table-internal.ts +74 -0
  427. package/src/lib/use-controllable.ts +43 -0
  428. package/src/lib/empty-chip.ts +0 -24
@@ -1,8 +1,9 @@
1
- import { jsxs as g, Fragment as w, jsx as m } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as O, useEffect as k } from "react";
3
- import { cn as S } from "@brightlocal/ui-components/lib/utils";
4
- import { Tooltip as U, TooltipTrigger as v, TooltipContent as F } from "@brightlocal/ui-components/tooltip";
5
- const x = {
1
+ "use client";
2
+ import { forwardRef as O, useEffect as k, useState as U } from "react";
3
+ import { cn as p } from "@brightlocal/ui-components/lib/utils";
4
+ import { Fragment as A, jsx as m, jsxs as g } from "react/jsx-runtime";
5
+ import { Tooltip as F, TooltipContent as Y, TooltipTrigger as j } from "@brightlocal/ui-components/tooltip";
6
+ var M = {
6
7
  justNow: "just now",
7
8
  minuteAgo: "1 minute ago",
8
9
  minutesAgo: "{n} minutes ago",
@@ -12,117 +13,100 @@ const x = {
12
13
  yesterday: "yesterday",
13
14
  daysAgo: "{n} days ago",
14
15
  unknown: "unknown"
15
- }, h = 1e3, $ = 60 * h, M = 60 * $, T = 24 * M, Y = /^\d{4}-\d{2}-\d{2}$/;
16
+ }, l = 1e3, E = 60 * l, L = 60 * E, v = 24 * L, I = /^\d{4}-\d{2}-\d{2}$/;
16
17
  function y(t) {
17
- return typeof t == "string" && Y.test(t);
18
+ return typeof t == "string" && I.test(t);
18
19
  }
19
- function E(t) {
20
+ function N(t) {
20
21
  return t instanceof Date ? t : new Date(y(t) ? `${t}T00:00:00` : t);
21
22
  }
22
- const A = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime(), f = (t, e) => t.replace("{n}", String(e));
23
- function p(t, e = /* @__PURE__ */ new Date()) {
23
+ var x = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime(), f = (t, n) => t.replace("{n}", String(n));
24
+ function $(t, n = /* @__PURE__ */ new Date()) {
24
25
  return t.toLocaleDateString("en-US", {
25
26
  month: "long",
26
27
  day: "numeric",
27
- ...t.getFullYear() === e.getFullYear() ? {} : { year: "numeric" }
28
+ ...t.getFullYear() === n.getFullYear() ? {} : { year: "numeric" }
28
29
  });
29
30
  }
30
- function j(t, e) {
31
- const n = t.toLocaleDateString("en-US", {
31
+ function R(t, n) {
32
+ const e = t.toLocaleDateString("en-US", {
32
33
  month: "long",
33
34
  day: "numeric",
34
35
  year: "numeric"
35
36
  });
36
- if (e) return n;
37
+ if (n) return e;
37
38
  const i = t.toLocaleTimeString("en-US", {
38
39
  hour: "numeric",
39
40
  minute: "2-digit"
40
- }), o = -t.getTimezoneOffset(), r = o >= 0 ? "+" : "-", s = Math.floor(Math.abs(o) / 60), a = Math.abs(o) % 60, c = `${r}${s}${a ? `:${String(a).padStart(2, "0")}` : ""}`;
41
- return `${n} at ${i} UTC${c}`;
41
+ }), o = -t.getTimezoneOffset(), r = o >= 0 ? "+" : "-", s = Math.floor(Math.abs(o) / 60), a = Math.abs(o) % 60;
42
+ return `${e} at ${i} UTC${`${r}${s}${a ? `:${String(a).padStart(2, "0")}` : ""}`}`;
42
43
  }
43
- function I(t, e, n = x) {
44
- const i = E(t);
44
+ function _(t, n, e = M) {
45
+ const i = N(t);
45
46
  if (y(t)) {
46
- const d = Math.max(
47
- 0,
48
- Math.round((A(e) - A(i)) / T)
49
- );
50
- return d === 0 ? n.today : d === 1 ? n.yesterday : d < 7 ? f(n.daysAgo, d) : p(i, e);
47
+ const d = Math.max(0, Math.round((x(n) - x(i)) / v));
48
+ return d === 0 ? e.today : d === 1 ? e.yesterday : d < 7 ? f(e.daysAgo, d) : $(i, n);
51
49
  }
52
- const o = Math.max(0, e.getTime() - i.getTime()), r = o / h, s = o / $, a = o / M, c = o / T;
53
- return r < 45 ? n.justNow : r < 90 ? n.minuteAgo : s < 45 ? f(n.minutesAgo, Math.round(s)) : s < 90 ? n.hourAgo : a < 22 ? f(n.hoursAgo, Math.round(a)) : a < 36 ? n.yesterday : c < 7 ? f(n.daysAgo, Math.round(c)) : p(i, e);
50
+ const o = Math.max(0, n.getTime() - i.getTime()), r = o / l, s = o / E, a = o / L, u = o / v;
51
+ return r < 45 ? e.justNow : r < 90 ? e.minuteAgo : s < 45 ? f(e.minutesAgo, Math.round(s)) : s < 90 ? e.hourAgo : a < 22 ? f(e.hoursAgo, Math.round(a)) : a < 36 ? e.yesterday : u < 7 ? f(e.daysAgo, Math.round(u)) : $(i, n);
54
52
  }
55
- function R(t = 30 * h) {
56
- const [e, n] = O(() => /* @__PURE__ */ new Date());
53
+ function C(t = 30 * l) {
54
+ const [n, e] = U(() => /* @__PURE__ */ new Date());
57
55
  return k(() => {
58
- const i = () => n(/* @__PURE__ */ new Date()), o = window.setInterval(i, t), r = () => {
56
+ const i = () => e(/* @__PURE__ */ new Date()), o = window.setInterval(i, t), r = () => {
59
57
  document.visibilityState === "visible" && i();
60
58
  };
61
59
  return document.addEventListener("visibilitychange", r), () => {
62
60
  window.clearInterval(o), document.removeEventListener("visibilitychange", r);
63
61
  };
64
- }, [t]), e;
62
+ }, [t]), n;
65
63
  }
66
- const z = N(
67
- function({ value: e, label: n, labels: i, className: o, dataHook: r, trackingEl: s, trackingLabel: a }, c) {
68
- const d = R(), l = { ...x, ...i };
69
- if (e == null)
70
- return /* @__PURE__ */ g(
71
- "span",
72
- {
73
- ref: c,
74
- className: S("text-body-xs text-muted-foreground", o),
75
- "data-hook": r,
76
- "data-slot": "relative-date",
77
- "data-tracking-el": s,
78
- "data-tracking-label": a,
79
- children: [
80
- n && /* @__PURE__ */ g(w, { children: [
81
- n,
82
- " "
83
- ] }),
84
- l.unknown
85
- ]
86
- }
87
- );
88
- const D = y(e), u = E(e), L = D ? `${u.getFullYear()}-${String(u.getMonth() + 1).padStart(2, "0")}-${String(u.getDate()).padStart(2, "0")}` : u.toISOString();
89
- return /* @__PURE__ */ g(
90
- "span",
91
- {
92
- ref: c,
93
- className: S("text-body-xs text-muted-foreground", o),
94
- "data-hook": r,
95
- "data-slot": "relative-date",
96
- "data-tracking-el": s,
97
- "data-tracking-label": a,
98
- children: [
99
- n && /* @__PURE__ */ g(w, { children: [
100
- n,
101
- " "
102
- ] }),
103
- /* @__PURE__ */ g(U, { children: [
104
- /* @__PURE__ */ m(
105
- v,
106
- {
107
- className: "focus-visible:shadow-default cursor-default rounded-xs underline decoration-dotted decoration-1 underline-offset-4 focus-visible:outline-none",
108
- dataHook: `${r}-trigger`,
109
- children: /* @__PURE__ */ m("time", { dateTime: L, children: I(e, d, l) })
110
- }
111
- ),
112
- /* @__PURE__ */ m(F, { dataHook: `${r}-tooltip`, side: "bottom", children: j(u, D) })
113
- ] })
114
- ]
115
- }
116
- );
117
- }
118
- );
64
+ var W = O(function({ value: n, label: e, labels: i, className: o, dataHook: r, trackingEl: s, trackingLabel: a }, u) {
65
+ const d = C(), w = {
66
+ ...M,
67
+ ...i
68
+ };
69
+ if (n == null) return /* @__PURE__ */ g("span", {
70
+ ref: u,
71
+ className: p("text-body-xs text-muted-foreground", o),
72
+ "data-hook": r,
73
+ "data-slot": "relative-date",
74
+ "data-tracking-el": s,
75
+ "data-tracking-label": a,
76
+ children: [e && /* @__PURE__ */ g(A, { children: [e, " "] }), w.unknown]
77
+ });
78
+ const D = y(n), c = N(n), S = D ? `${c.getFullYear()}-${String(c.getMonth() + 1).padStart(2, "0")}-${String(c.getDate()).padStart(2, "0")}` : c.toISOString(), h = _(n, d, w), T = R(c, D);
79
+ return /* @__PURE__ */ g("span", {
80
+ ref: u,
81
+ className: p("text-body-xs text-muted-foreground", o),
82
+ "data-hook": r,
83
+ "data-slot": "relative-date",
84
+ "data-tracking-el": s,
85
+ "data-tracking-label": a,
86
+ children: [e && /* @__PURE__ */ g(A, { children: [e, " "] }), h === T ? /* @__PURE__ */ m("time", {
87
+ dateTime: S,
88
+ children: h
89
+ }) : /* @__PURE__ */ g(F, { children: [/* @__PURE__ */ m(j, {
90
+ className: "focus-visible:shadow-default cursor-help rounded-xs underline decoration-dotted decoration-1 underline-offset-4 focus-visible:outline-none",
91
+ dataHook: `${r}-trigger`,
92
+ children: /* @__PURE__ */ m("time", {
93
+ dateTime: S,
94
+ children: h
95
+ })
96
+ }), /* @__PURE__ */ m(Y, {
97
+ dataHook: `${r}-tooltip`,
98
+ side: "bottom",
99
+ children: T
100
+ })] })]
101
+ });
102
+ });
119
103
  export {
120
- x as DEFAULT_RELATIVE_DATE_LABELS,
121
- z as RelativeDate,
122
- p as dateLabel,
123
- j as exactText,
104
+ M as DEFAULT_RELATIVE_DATE_LABELS,
105
+ W as RelativeDate,
106
+ $ as dateLabel,
107
+ R as exactText,
124
108
  y as isDateOnly,
125
- I as relativeWords,
126
- E as toDate,
127
- R as useNow
109
+ _ as relativeWords,
110
+ N as toDate,
111
+ C as useNow
128
112
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),g=require("@brightlocal/icons"),v=require("react-resizable-panels"),n=require("@brightlocal/ui-components/lib/utils");function o(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const s=o(b),i=o(v),c=s.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:l,...f},p)=>r.jsx(i.PanelGroup,{ref:p,className:n.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),"data-hook":a,"data-slot":"resizable-panel-group","data-tracking-el":t,"data-tracking-label":l,...f}));c.displayName="ResizablePanelGroup";const d=s.forwardRef(({...e},a)=>r.jsx(i.Panel,{ref:a,"data-slot":"resizable-panel",...e}));d.displayName="ResizablePanel";function u({withHandle:e,className:a,...t}){return r.jsx(i.PanelResizeHandle,{className:n.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",a),"data-slot":"resizable-handle",...t,children:e&&r.jsx("div",{className:"border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(g.GripVertical,{size:10})})})}u.displayName="ResizableHandle";exports.ResizableHandle=u;exports.ResizablePanel=d;exports.ResizablePanelGroup=c;
1
+ "use client";const p=require("./_virtual/_rolldown/runtime.cjs");let l=require("react");l=p.__toESM(l,1);let h=require("@brightlocal/icons"),u=require("@brightlocal/ui-components/lib/utils"),i=require("react/jsx-runtime"),f=require("react-resizable-panels");var b=l.forwardRef(({className:e,direction:a="horizontal",dataHook:r,trackingEl:n,trackingLabel:o,...s},z)=>(0,i.jsx)(f.Group,{className:(0,u.cn)("h-full w-full",e),"data-hook":r,"data-panel-group-direction":a,"data-slot":"resizable-panel-group","data-tracking-el":n,"data-tracking-label":o,elementRef:z,orientation:a,...s}));b.displayName="ResizablePanelGroup";var t=e=>typeof e=="number"?`${e}%`:e,c=l.forwardRef(({defaultSize:e,minSize:a,maxSize:r,collapsedSize:n,...o},s)=>(0,i.jsx)(f.Panel,{collapsedSize:t(n),"data-slot":"resizable-panel",defaultSize:t(e),elementRef:s,maxSize:t(r),minSize:t(a),...o}));c.displayName="ResizablePanel";function d({withHandle:e,className:a,...r}){return(0,i.jsx)(f.Separator,{className:(0,u.cn)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:[&>div]:rotate-90",a),"data-slot":"resizable-handle",...r,children:e&&(0,i.jsx)("div",{className:"border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:(0,i.jsx)(h.GripVertical,{size:10})})})}d.displayName="ResizableHandle";exports.ResizableHandle=d;exports.ResizablePanel=c;exports.ResizablePanelGroup=b;
@@ -1,9 +1,15 @@
1
+ import { Group, Separator, PanelProps } from 'react-resizable-panels';
1
2
  import * as React from "react";
2
- import * as ResizablePrimitive from "react-resizable-panels";
3
3
  /**
4
4
  * Props for the ResizablePanelGroup component.
5
5
  */
6
- interface ResizablePanelGroupProps extends React.ComponentProps<typeof ResizablePrimitive.PanelGroup> {
6
+ interface ResizablePanelGroupProps extends Omit<React.ComponentProps<typeof Group>, "orientation" | "elementRef"> {
7
+ /**
8
+ * Layout direction of the panels. Maps to `orientation` in
9
+ * react-resizable-panels 4.
10
+ * @default "horizontal"
11
+ */
12
+ direction?: "horizontal" | "vertical";
7
13
  /**
8
14
  * Data hook for automated testing
9
15
  */
@@ -19,36 +25,46 @@ interface ResizablePanelGroupProps extends React.ComponentProps<typeof Resizable
19
25
  }
20
26
  /**
21
27
  * Container for resizable panels. Manages layout direction and panel sizing.
28
+ * `ref` is the root element; use the `groupRef` prop for the imperative handle.
29
+ */
30
+ declare const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePanelGroupProps & React.RefAttributes<HTMLDivElement>>;
31
+ /**
32
+ * react-resizable-panels 4 reads a bare number as pixels. The DS keeps the
33
+ * previous contract: a number is a percentage of the group, a string passes
34
+ * through with its own unit ("240px", "20rem").
22
35
  */
23
- declare const ResizablePanelGroup: React.ForwardRefExoticComponent<Omit<ResizablePanelGroupProps, "ref"> & React.RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
36
+ type PanelSize = number | string;
24
37
  /**
25
38
  * Props for the ResizablePanel component.
26
39
  */
27
- type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>;
40
+ type ResizablePanelProps = Omit<PanelProps, "defaultSize" | "minSize" | "maxSize" | "collapsedSize" | "elementRef"> & {
41
+ /** Initial size. A number is a percentage of the group. */
42
+ defaultSize?: PanelSize;
43
+ /** Minimum size. A number is a percentage of the group. */
44
+ minSize?: PanelSize;
45
+ /** Maximum size. A number is a percentage of the group. */
46
+ maxSize?: PanelSize;
47
+ /** Size when collapsed. A number is a percentage of the group. */
48
+ collapsedSize?: PanelSize;
49
+ };
28
50
  /**
29
51
  * Individual resizable panel within a panel group.
52
+ * `ref` is the root element; use the `panelRef` prop for the imperative handle.
30
53
  */
31
- declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<Omit<React.HTMLAttributes<HTMLSpanElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLLinkElement | HTMLMapElement | HTMLButtonElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLVideoElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
32
- className?: string;
33
- collapsedSize?: number | undefined;
34
- collapsible?: boolean | undefined;
35
- defaultSize?: number | undefined;
36
- id?: string;
37
- maxSize?: number | undefined;
38
- minSize?: number | undefined;
39
- onCollapse?: ResizablePrimitive.PanelOnCollapse;
40
- onExpand?: ResizablePrimitive.PanelOnExpand;
41
- onResize?: ResizablePrimitive.PanelOnResize;
42
- order?: number;
43
- style?: object;
44
- tagName?: keyof HTMLElementTagNameMap | undefined;
45
- } & {
46
- children?: import('react').ReactNode | undefined;
47
- } & React.RefAttributes<ResizablePrimitive.ImperativePanelHandle>, "ref"> & React.RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
54
+ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<PanelProps, "elementRef" | "defaultSize" | "minSize" | "maxSize" | "collapsedSize"> & {
55
+ /** Initial size. A number is a percentage of the group. */
56
+ defaultSize?: PanelSize;
57
+ /** Minimum size. A number is a percentage of the group. */
58
+ minSize?: PanelSize;
59
+ /** Maximum size. A number is a percentage of the group. */
60
+ maxSize?: PanelSize;
61
+ /** Size when collapsed. A number is a percentage of the group. */
62
+ collapsedSize?: PanelSize;
63
+ } & React.RefAttributes<HTMLDivElement>>;
48
64
  /**
49
65
  * Props for the ResizableHandle component.
50
66
  */
51
- interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> {
67
+ interface ResizableHandleProps extends React.ComponentProps<typeof Separator> {
52
68
  /**
53
69
  * Show a visible drag handle indicator
54
70
  */
@@ -57,7 +73,7 @@ interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrim
57
73
  /**
58
74
  * Draggable handle between resizable panels.
59
75
  */
60
- declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): import("react/jsx-runtime").JSX.Element;
76
+ declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): React.JSX.Element;
61
77
  declare namespace ResizableHandle {
62
78
  var displayName: string;
63
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAC7D,OAAO,kBAAkB,CAAC,UAAU,CACrC;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,QAAA,MAAM,mBAAmB,6IAgBvB,CAAC;AAIH;;GAEG;AACH,KAAK,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAC7C,OAAO,kBAAkB,CAAC,KAAK,CAChC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;0IAKlB,CAAC;AAIH;;GAEG;AACH,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CACzD,OAAO,kBAAkB,CAAC,iBAAiB,CAC5C;IACC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAiBtB;kBArBQ,eAAe;;;AAyBxB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhE,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACrB,CAAC"}
1
+ {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,KAAK,EAEL,SAAS,EACT,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,UAAU,wBAAyB,SAAQ,IAAI,CAC7C,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAClC,aAAa,GAAG,YAAY,CAC7B;IACC;;;;OAIG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,QAAA,MAAM,mBAAmB,iGA4BxB,CAAC;AAIF;;;;GAIG;AACH,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAKjC;;GAEG;AACH,KAAK,mBAAmB,GAAG,IAAI,CAC7B,UAAU,EACV,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,eAAe,GAAG,YAAY,CACvE,GAAG;IACF,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc;IAdlB,2DAA2D;kBAC7C,SAAS;IACvB,2DAA2D;cACjD,SAAS;IACnB,2DAA2D;cACjD,SAAS;IACnB,kEAAkE;oBAClD,SAAS;wCAmB1B,CAAC;AAIF;;GAEG;AACH,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC;IAC3E;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAmBtB;kBAvBQ,eAAe;;;AA2BxB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhE,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACrB,CAAC"}
package/dist/resizable.js CHANGED
@@ -1,47 +1,45 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { GripVertical as c } from "@brightlocal/icons";
4
- import * as l from "react-resizable-panels";
5
- import { cn as o } from "@brightlocal/ui-components/lib/utils";
6
- const f = i.forwardRef(({ className: e, dataHook: a, trackingEl: t, trackingLabel: n, ...s }, d) => /* @__PURE__ */ r(
7
- l.PanelGroup,
8
- {
9
- ref: d,
10
- className: o(
11
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
12
- e
13
- ),
14
- "data-hook": a,
15
- "data-slot": "resizable-panel-group",
16
- "data-tracking-el": t,
17
- "data-tracking-label": n,
18
- ...s
19
- }
20
- ));
21
- f.displayName = "ResizablePanelGroup";
22
- const p = i.forwardRef(({ ...e }, a) => /* @__PURE__ */ r(l.Panel, { ref: a, "data-slot": "resizable-panel", ...e }));
23
- p.displayName = "ResizablePanel";
24
- function u({
25
- withHandle: e,
26
- className: a,
27
- ...t
28
- }) {
29
- return /* @__PURE__ */ r(
30
- l.PanelResizeHandle,
31
- {
32
- className: o(
33
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
34
- a
35
- ),
36
- "data-slot": "resizable-handle",
37
- ...t,
38
- children: e && /* @__PURE__ */ r("div", { className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ r(c, { size: 10 }) })
39
- }
40
- );
1
+ "use client";
2
+ import * as s from "react";
3
+ import { GripVertical as b } from "@brightlocal/icons";
4
+ import { cn as f } from "@brightlocal/ui-components/lib/utils";
5
+ import { jsx as t } from "react/jsx-runtime";
6
+ import { Group as m, Panel as p, Separator as u } from "react-resizable-panels";
7
+ var c = s.forwardRef(({ className: e, direction: a = "horizontal", dataHook: r, trackingEl: o, trackingLabel: l, ...n }, d) => /* @__PURE__ */ t(m, {
8
+ className: f("h-full w-full", e),
9
+ "data-hook": r,
10
+ "data-panel-group-direction": a,
11
+ "data-slot": "resizable-panel-group",
12
+ "data-tracking-el": o,
13
+ "data-tracking-label": l,
14
+ elementRef: d,
15
+ orientation: a,
16
+ ...n
17
+ }));
18
+ c.displayName = "ResizablePanelGroup";
19
+ var i = (e) => typeof e == "number" ? `${e}%` : e, z = s.forwardRef(({ defaultSize: e, minSize: a, maxSize: r, collapsedSize: o, ...l }, n) => /* @__PURE__ */ t(p, {
20
+ collapsedSize: i(o),
21
+ "data-slot": "resizable-panel",
22
+ defaultSize: i(e),
23
+ elementRef: n,
24
+ maxSize: i(r),
25
+ minSize: i(a),
26
+ ...l
27
+ }));
28
+ z.displayName = "ResizablePanel";
29
+ function h({ withHandle: e, className: a, ...r }) {
30
+ return /* @__PURE__ */ t(u, {
31
+ className: f("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:[&>div]:rotate-90", a),
32
+ "data-slot": "resizable-handle",
33
+ ...r,
34
+ children: e && /* @__PURE__ */ t("div", {
35
+ className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
36
+ children: /* @__PURE__ */ t(b, { size: 10 })
37
+ })
38
+ });
41
39
  }
42
- u.displayName = "ResizableHandle";
40
+ h.displayName = "ResizableHandle";
43
41
  export {
44
- u as ResizableHandle,
45
- p as ResizablePanel,
46
- f as ResizablePanelGroup
42
+ h as ResizableHandle,
43
+ z as ResizablePanel,
44
+ c as ResizablePanelGroup
47
45
  };
@@ -0,0 +1 @@
1
+ "use client";const C=require("./_virtual/_rolldown/runtime.cjs");let i=require("react");i=C.__toESM(i,1);let k=require("@brightlocal/ui-components/lib/utils"),t=require("react/jsx-runtime"),v=require("@brightlocal/ui-components/spinner");function a(u,o){return Object.entries(o).reduce((e,[r,n])=>e.replaceAll(`{{${r}}}`,String(n)).replaceAll(`{${r}}`,String(n)),u)}var x=i.forwardRef(({className:u,dataHook:o,count:e,from:r,to:n,total:s,updating:_=!1,label:c,labelOne:g,noTotalLabel:d,noTotalLabelOne:h,rangeLabel:m,rangeLabelOne:j,updatingLabel:q,emptyLabel:y,trackingEl:b,trackingLabel:N,...R},S)=>{const p=typeof r=="number"&&typeof n=="number",f=p?s===0:e===0;let l;return p?l=a(s===1?j??m??"{from} to {to} of {total} result":m??"{from} to {to} of {total} results",{from:r,to:n,total:s??0}):s!==void 0?l=a(s===1?g??c??"{count} of {total} result":c??"{count} of {total} results",{count:e??0,total:s}):l=a(e===1?h??d??"{count} result":d??"{count} results",{count:e??0}),(0,t.jsx)("p",{ref:S,className:(0,k.cn)("text-muted-foreground text-body-sm relative flex items-center gap-2",u),"data-hook":o,"data-slot":"result-count","data-tracking-el":b??"result-count","data-tracking-label":N,role:"status",...R,children:_?(0,t.jsxs)(t.Fragment,{children:[!f&&(0,t.jsx)("span",{"aria-hidden":"true","data-slot":"result-count-text",children:l}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5","data-slot":"result-count-updating",children:[(0,t.jsx)(v.Spinner,{size:"sm"}),q??"Updating results"]})]}):f?(0,t.jsx)("span",{className:"sr-only","data-slot":"result-count-empty",children:y??"No results"}):(0,t.jsx)("span",{"data-slot":"result-count-text",children:l})})});x.displayName="ResultCount";exports.ResultCount=x;
@@ -0,0 +1,110 @@
1
+ import * as React from "react";
2
+ interface ResultCountBaseProps extends Omit<React.ComponentPropsWithoutRef<"p">, "children"> {
3
+ /**
4
+ * Data hook for automated testing (REQUIRED)
5
+ * @example "locations-result-count"
6
+ */
7
+ dataHook: string;
8
+ /**
9
+ * Refetch in flight — the live region announces the updating message
10
+ * alone, while the previous count stays on screen (aria-hidden) beside
11
+ * the spinner. Dimming the rows is the consumer's job; this indicator is
12
+ * what makes dimming never the only signal.
13
+ * @default false
14
+ */
15
+ updating?: boolean;
16
+ /**
17
+ * Text shown beside the spinner during a refetch — and, on its own, the
18
+ * whole of what the live region announces while it is in flight.
19
+ * @default "Updating results"
20
+ */
21
+ updatingLabel?: string;
22
+ /**
23
+ * Screen-reader-only text while the collection is empty. The visible
24
+ * count hides at zero — the empty state already says it — but the live
25
+ * region still announces the result.
26
+ * @default "No results"
27
+ */
28
+ emptyLabel?: string;
29
+ /** Analytics element identifier. @default "result-count" */
30
+ trackingEl?: string;
31
+ /** Analytics label */
32
+ trackingLabel?: string;
33
+ }
34
+ /** Plain form: how many records the filters left, out of an optional total. */
35
+ interface ResultCountPlainProps extends ResultCountBaseProps {
36
+ /** How many records the collection currently shows. */
37
+ count: number;
38
+ /** The unfiltered total. Omit when it isn't cheap to know. */
39
+ total?: number;
40
+ from?: never;
41
+ to?: never;
42
+ /**
43
+ * Count text while `total` is present. Supports the `{count}` and
44
+ * `{total}` placeholders — name the records in the product's words
45
+ * ("{count} of {total} locations"). i18next's `{{count}}` form is
46
+ * accepted too, so the untranslated `t()` string can be passed straight in.
47
+ * @default "{count} of {total} results"
48
+ */
49
+ label?: string;
50
+ /**
51
+ * `label` for a total of exactly 1 — the noun follows the total ("1 of 1
52
+ * location"). Falls back to `label`, so a template without a singular keeps
53
+ * its own noun. Pair with i18next's `_one` key: `labelOne={t("count_one")}`.
54
+ * @default "{count} of {total} result"
55
+ */
56
+ labelOne?: string;
57
+ /**
58
+ * Count text while `total` is omitted. Supports the `{count}`
59
+ * placeholder.
60
+ * @default "{count} results"
61
+ */
62
+ noTotalLabel?: string;
63
+ /**
64
+ * `noTotalLabel` for a count of exactly 1 ("1 location"). Falls back to
65
+ * `noTotalLabel`.
66
+ * @default "{count} result"
67
+ */
68
+ noTotalLabelOne?: string;
69
+ rangeLabel?: never;
70
+ rangeLabelOne?: never;
71
+ }
72
+ /** Range form: which slice of the (filtered) set the current page shows. */
73
+ interface ResultCountRangeProps extends ResultCountBaseProps {
74
+ /** First record on this page (1-based). */
75
+ from: number;
76
+ /** Last record on this page. */
77
+ to: number;
78
+ /** Size of the set being paged — the filtered count, not the unfiltered one. */
79
+ total: number;
80
+ count?: never;
81
+ /**
82
+ * Range text. Supports the `{from}`, `{to}` and `{total}` placeholders —
83
+ * name the records in the product's words
84
+ * ("{from} to {to} of {total} locations"). i18next's `{{from}}` form
85
+ * is accepted too, so the untranslated `t()` string can be passed straight in.
86
+ * @default "{from} to {to} of {total} results"
87
+ */
88
+ rangeLabel?: string;
89
+ /**
90
+ * `rangeLabel` for a total of exactly 1 — the noun follows the total ("1 to
91
+ * 1 of 1 location"). Falls back to `rangeLabel`. Pair with i18next's `_one`
92
+ * key: `rangeLabelOne={t("range_one")}`.
93
+ * @default "{from} to {to} of {total} result"
94
+ */
95
+ rangeLabelOne?: string;
96
+ label?: never;
97
+ labelOne?: never;
98
+ noTotalLabel?: never;
99
+ noTotalLabelOne?: never;
100
+ }
101
+ type ResultCountProps = ResultCountPlainProps | ResultCountRangeProps;
102
+ /**
103
+ * The collection's count as a `role="status"` live region — one per
104
+ * screen. Announces the new count once per change, "Updating results" once
105
+ * per refetch, and the empty label (screen-reader only) at zero.
106
+ */
107
+ declare const ResultCount: React.ForwardRefExoticComponent<ResultCountProps & React.RefAttributes<HTMLParagraphElement>>;
108
+ export { ResultCount };
109
+ export type { ResultCountProps, ResultCountPlainProps, ResultCountRangeProps };
110
+ //# sourceMappingURL=result-count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-count.d.ts","sourceRoot":"","sources":["../../src/components/result-count.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,UAAU,oBAAqB,SAAQ,IAAI,CACzC,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,EACnC,UAAU,CACX;IACC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,+EAA+E;AAC/E,UAAU,qBAAsB,SAAQ,oBAAoB;IAC1D,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,EAAE,CAAC,EAAE,KAAK,CAAC;IACX;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB;AAED,4EAA4E;AAC5E,UAAU,qBAAsB,SAAQ,oBAAoB;IAC1D,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB;AAED,KAAK,gBAAgB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAgBtE;;;;GAIG;AACH,QAAA,MAAM,WAAW,+FAqGhB,CAAC;AAIF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use client";
2
+ import * as v from "react";
3
+ import { cn as A } from "@brightlocal/ui-components/lib/utils";
4
+ import { Fragment as C, jsx as o, jsxs as f } from "react/jsx-runtime";
5
+ import { Spinner as $ } from "@brightlocal/ui-components/spinner";
6
+ function u(l, a) {
7
+ return Object.entries(a).reduce((t, [r, s]) => t.replaceAll(`{{${r}}}`, String(s)).replaceAll(`{${r}}`, String(s)), l);
8
+ }
9
+ var w = v.forwardRef(({ className: l, dataHook: a, count: t, from: r, to: s, total: e, updating: g = !1, label: i, labelOne: x, noTotalLabel: c, noTotalLabelOne: h, rangeLabel: d, rangeLabelOne: y, updatingLabel: N, emptyLabel: R, trackingEl: j, trackingLabel: S, ...b }, k) => {
10
+ const m = typeof r == "number" && typeof s == "number", p = m ? e === 0 : t === 0;
11
+ let n;
12
+ return m ? n = u(e === 1 ? y ?? d ?? "{from} to {to} of {total} result" : d ?? "{from} to {to} of {total} results", {
13
+ from: r,
14
+ to: s,
15
+ total: e ?? 0
16
+ }) : e !== void 0 ? n = u(e === 1 ? x ?? i ?? "{count} of {total} result" : i ?? "{count} of {total} results", {
17
+ count: t ?? 0,
18
+ total: e
19
+ }) : n = u(t === 1 ? h ?? c ?? "{count} result" : c ?? "{count} results", { count: t ?? 0 }), /* @__PURE__ */ o("p", {
20
+ ref: k,
21
+ className: A("text-muted-foreground text-body-sm relative flex items-center gap-2", l),
22
+ "data-hook": a,
23
+ "data-slot": "result-count",
24
+ "data-tracking-el": j ?? "result-count",
25
+ "data-tracking-label": S,
26
+ role: "status",
27
+ ...b,
28
+ children: g ? /* @__PURE__ */ f(C, { children: [!p && /* @__PURE__ */ o("span", {
29
+ "aria-hidden": "true",
30
+ "data-slot": "result-count-text",
31
+ children: n
32
+ }), /* @__PURE__ */ f("span", {
33
+ className: "inline-flex items-center gap-1.5",
34
+ "data-slot": "result-count-updating",
35
+ children: [/* @__PURE__ */ o($, { size: "sm" }), N ?? "Updating results"]
36
+ })] }) : p ? /* @__PURE__ */ o("span", {
37
+ className: "sr-only",
38
+ "data-slot": "result-count-empty",
39
+ children: R ?? "No results"
40
+ }) : /* @__PURE__ */ o("span", {
41
+ "data-slot": "result-count-text",
42
+ children: n
43
+ })
44
+ });
45
+ });
46
+ w.displayName = "ResultCount";
47
+ export {
48
+ w as ResultCount
49
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),A=require("react"),O=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion"),h=require("@brightlocal/ui-components/lib/utils"),m=require("./lib/motion.cjs");function M(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(s,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}return s.default=r,Object.freeze(s)}const c=M(A),P=12,y=90,v=12e3,N="var(--ds-motion-ease-emphasized)",j=m.MOTION_DURATION_FAST_MS,F=50,g=c.forwardRef(({className:r,active:s,dataHook:o,trackingEl:l,trackingLabel:T,navigatingLabel:R="Loading page",style:_,...S},E)=>{const a=O.usePrefersReducedMotion(),[e,u]=c.useState("idle");c.useEffect(()=>{if(s){u(t=>t==="start"||t==="creep"?t:"start");return}const n=setTimeout(()=>u(t=>t==="idle"?"idle":"complete"),j);return()=>clearTimeout(n)},[s]),c.useEffect(()=>{if(e!=="start"||a)return;let n=0;const t=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>u(f=>f==="start"?"creep":f))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(n)}},[e,a]),c.useEffect(()=>{if(e!=="complete")return;const n=setTimeout(()=>u(t=>t==="complete"?"idle":t),a?0:m.MOTION_DURATION_BASE_MS+m.MOTION_DURATION_FAST_MS);return()=>clearTimeout(n)},[e,a]);const p=e==="start"||e==="creep",b=e==="complete"?100:e==="creep"?y:e==="start"&&a?F:P;let d="none";return a||(e==="creep"?d=`clip-path ${v}ms ${N}`:e==="complete"&&(d="clip-path var(--ds-motion-duration-base) ease-out, opacity var(--ds-motion-duration-fast) ease-out var(--ds-motion-duration-base)")),i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:E,"aria-hidden":"true",className:h.cn("pointer-events-none fixed inset-x-0 top-0 z-60 h-0.5 overflow-hidden",r),"data-hook":o,"data-slot":"route-progress","data-state":e,"data-tracking-el":l,"data-tracking-label":T,style:_,...S,children:i.jsx("span",{className:"bg-primary absolute inset-0 dark:bg-[var(--ds-colors-primary-light)]","data-slot":"route-progress-bar",style:{clipPath:`inset(0 ${100-b}% 0 0)`,opacity:p?1:0,transition:d}})}),i.jsx("span",{"aria-atomic":"true","aria-live":"polite",className:"sr-only fixed","data-slot":"route-progress-status",children:p?R:""})]})});g.displayName="RouteProgress";exports.RouteProgress=g;
1
+ "use client";const T=require("./_virtual/_rolldown/runtime.cjs");let r=require("react");r=T.__toESM(r,1);let b=require("@brightlocal/ui-components/lib/utils"),i=require("react/jsx-runtime"),A=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion");var P=12,q=90,x=12e3,S="var(--ds-motion-ease-emphasized)",y=150,F=50,d=r.forwardRef(({className:m,active:l,dataHook:p,trackingEl:_,trackingLabel:f,navigatingLabel:g="Loading page",style:h,...v},E)=>{const a=(0,A.usePrefersReducedMotion)(),[e,o]=r.useState("idle");r.useEffect(()=>{if(l){o(t=>t==="start"||t==="creep"?t:"start");return}const s=setTimeout(()=>o(t=>t==="idle"?"idle":"complete"),y);return()=>clearTimeout(s)},[l]),r.useEffect(()=>{if(e!=="start"||a)return;let s=0;const t=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>o(u=>u==="start"?"creep":u))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(s)}},[e,a]),r.useEffect(()=>{if(e!=="complete")return;const s=setTimeout(()=>o(t=>t==="complete"?"idle":t),a?0:350);return()=>clearTimeout(s)},[e,a]);const c=e==="start"||e==="creep",R=e==="complete"?100:e==="creep"?q:e==="start"&&a?F:P;let n="none";return a||(e==="creep"?n=`clip-path ${x}ms ${S}`:e==="complete"&&(n="clip-path var(--ds-motion-duration-base) ease-out, opacity var(--ds-motion-duration-fast) ease-out var(--ds-motion-duration-base)")),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:E,"aria-hidden":"true",className:(0,b.cn)("pointer-events-none fixed inset-x-0 top-0 z-60 h-0.5 overflow-hidden",m),"data-hook":p,"data-slot":"route-progress","data-state":e,"data-tracking-el":_,"data-tracking-label":f,style:h,...v,children:(0,i.jsx)("span",{className:"bg-primary absolute inset-0 dark:bg-[var(--ds-colors-primary-light)]","data-slot":"route-progress-bar",style:{clipPath:`inset(0 ${100-R}% 0 0)`,opacity:c?1:0,transition:n}})}),(0,i.jsx)("span",{"aria-atomic":"true","aria-live":"polite",className:"sr-only fixed","data-slot":"route-progress-status",children:c?g:""})]})});d.displayName="RouteProgress";exports.RouteProgress=d;