@ttt-productions/ui-core 0.11.32 → 0.11.34

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 (218) hide show
  1. package/dist/browser/index.d.ts +2 -2
  2. package/dist/browser/index.js +1 -1
  3. package/dist/browser/index.js.map +1 -1
  4. package/dist/browser/reload-recovery-watch.d.ts +2 -2
  5. package/dist/browser/reload-recovery-watch.d.ts.map +1 -1
  6. package/dist/browser/reload-recovery-watch.js +5 -5
  7. package/dist/browser/reload-recovery-watch.js.map +1 -1
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +3 -3
  10. package/dist/index.js.map +1 -1
  11. package/dist/lib/format-numbers.js +2 -2
  12. package/dist/lib/format-numbers.js.map +1 -1
  13. package/dist/lib/reload-recovery.js +13 -13
  14. package/dist/lib/reload-recovery.js.map +1 -1
  15. package/dist/lib/utils.js.map +1 -1
  16. package/dist/react/components/accordion.d.ts +2 -2
  17. package/dist/react/components/accordion.d.ts.map +1 -1
  18. package/dist/react/components/accordion.js +8 -8
  19. package/dist/react/components/accordion.js.map +1 -1
  20. package/dist/react/components/action-row.d.ts +32 -0
  21. package/dist/react/components/action-row.d.ts.map +1 -0
  22. package/dist/react/components/action-row.js +16 -0
  23. package/dist/react/components/action-row.js.map +1 -0
  24. package/dist/react/components/alert-dialog.d.ts +2 -2
  25. package/dist/react/components/alert-dialog.d.ts.map +1 -1
  26. package/dist/react/components/alert-dialog.js +15 -15
  27. package/dist/react/components/alert-dialog.js.map +1 -1
  28. package/dist/react/components/alert.d.ts +2 -2
  29. package/dist/react/components/alert.d.ts.map +1 -1
  30. package/dist/react/components/alert.js +12 -12
  31. package/dist/react/components/alert.js.map +1 -1
  32. package/dist/react/components/avatar.d.ts +2 -2
  33. package/dist/react/components/avatar.d.ts.map +1 -1
  34. package/dist/react/components/avatar.js +7 -7
  35. package/dist/react/components/avatar.js.map +1 -1
  36. package/dist/react/components/badge.d.ts +2 -2
  37. package/dist/react/components/badge.d.ts.map +1 -1
  38. package/dist/react/components/badge.js +9 -9
  39. package/dist/react/components/badge.js.map +1 -1
  40. package/dist/react/components/button.d.ts +2 -2
  41. package/dist/react/components/button.d.ts.map +1 -1
  42. package/dist/react/components/button.js +28 -28
  43. package/dist/react/components/button.js.map +1 -1
  44. package/dist/react/components/card.d.ts +1 -1
  45. package/dist/react/components/card.d.ts.map +1 -1
  46. package/dist/react/components/card.js +15 -15
  47. package/dist/react/components/card.js.map +1 -1
  48. package/dist/react/components/checkbox.d.ts +2 -2
  49. package/dist/react/components/checkbox.d.ts.map +1 -1
  50. package/dist/react/components/checkbox.js +6 -6
  51. package/dist/react/components/checkbox.js.map +1 -1
  52. package/dist/react/components/collapsible.d.ts +1 -1
  53. package/dist/react/components/collapsible.d.ts.map +1 -1
  54. package/dist/react/components/collapsible.js +2 -2
  55. package/dist/react/components/collapsible.js.map +1 -1
  56. package/dist/react/components/consequence-dialog.d.ts.map +1 -1
  57. package/dist/react/components/consequence-dialog.js +4 -2
  58. package/dist/react/components/consequence-dialog.js.map +1 -1
  59. package/dist/react/components/date-picker.d.ts +1 -1
  60. package/dist/react/components/date-picker.d.ts.map +1 -1
  61. package/dist/react/components/date-picker.js +102 -66
  62. package/dist/react/components/date-picker.js.map +1 -1
  63. package/dist/react/components/date-time-picker.d.ts +1 -1
  64. package/dist/react/components/date-time-picker.d.ts.map +1 -1
  65. package/dist/react/components/date-time-picker.js +20 -18
  66. package/dist/react/components/date-time-picker.js.map +1 -1
  67. package/dist/react/components/dialog.d.ts +2 -2
  68. package/dist/react/components/dialog.d.ts.map +1 -1
  69. package/dist/react/components/dialog.js +14 -14
  70. package/dist/react/components/dialog.js.map +1 -1
  71. package/dist/react/components/dropdown-menu.d.ts +2 -2
  72. package/dist/react/components/dropdown-menu.d.ts.map +1 -1
  73. package/dist/react/components/dropdown-menu.js +23 -18
  74. package/dist/react/components/dropdown-menu.js.map +1 -1
  75. package/dist/react/components/end-of-list-indicator.d.ts +1 -1
  76. package/dist/react/components/end-of-list-indicator.js +3 -3
  77. package/dist/react/components/end-of-list-indicator.js.map +1 -1
  78. package/dist/react/components/form.d.ts +3 -3
  79. package/dist/react/components/form.d.ts.map +1 -1
  80. package/dist/react/components/form.js +17 -17
  81. package/dist/react/components/form.js.map +1 -1
  82. package/dist/react/components/format-control.d.ts +12 -5
  83. package/dist/react/components/format-control.d.ts.map +1 -1
  84. package/dist/react/components/format-control.js +23 -7
  85. package/dist/react/components/format-control.js.map +1 -1
  86. package/dist/react/components/input.d.ts +10 -10
  87. package/dist/react/components/input.d.ts.map +1 -1
  88. package/dist/react/components/input.js +11 -7
  89. package/dist/react/components/input.js.map +1 -1
  90. package/dist/react/components/label.d.ts +3 -3
  91. package/dist/react/components/label.d.ts.map +1 -1
  92. package/dist/react/components/label.js +6 -6
  93. package/dist/react/components/label.js.map +1 -1
  94. package/dist/react/components/layout/screen-adaptive-view.d.ts +2 -2
  95. package/dist/react/components/layout/screen-adaptive-view.d.ts.map +1 -1
  96. package/dist/react/components/layout/screen-adaptive-view.js +39 -35
  97. package/dist/react/components/layout/screen-adaptive-view.js.map +1 -1
  98. package/dist/react/components/list-pagination.d.ts +1 -1
  99. package/dist/react/components/list-pagination.js +10 -10
  100. package/dist/react/components/list-pagination.js.map +1 -1
  101. package/dist/react/components/menubar.d.ts +2 -2
  102. package/dist/react/components/menubar.d.ts.map +1 -1
  103. package/dist/react/components/menubar.js +17 -17
  104. package/dist/react/components/menubar.js.map +1 -1
  105. package/dist/react/components/opener-focus.d.ts +1 -1
  106. package/dist/react/components/opener-focus.d.ts.map +1 -1
  107. package/dist/react/components/opener-focus.js +3 -3
  108. package/dist/react/components/opener-focus.js.map +1 -1
  109. package/dist/react/components/pending-guard.d.ts +1 -1
  110. package/dist/react/components/pending-guard.d.ts.map +1 -1
  111. package/dist/react/components/pending-guard.js +1 -1
  112. package/dist/react/components/pending-guard.js.map +1 -1
  113. package/dist/react/components/popover.d.ts +2 -2
  114. package/dist/react/components/popover.d.ts.map +1 -1
  115. package/dist/react/components/popover.js +5 -5
  116. package/dist/react/components/popover.js.map +1 -1
  117. package/dist/react/components/progress.d.ts +2 -2
  118. package/dist/react/components/progress.d.ts.map +1 -1
  119. package/dist/react/components/progress.js +5 -5
  120. package/dist/react/components/progress.js.map +1 -1
  121. package/dist/react/components/radio-group.d.ts +2 -2
  122. package/dist/react/components/radio-group.d.ts.map +1 -1
  123. package/dist/react/components/radio-group.js +7 -7
  124. package/dist/react/components/radio-group.js.map +1 -1
  125. package/dist/react/components/relative-time.d.ts +1 -1
  126. package/dist/react/components/relative-time.d.ts.map +1 -1
  127. package/dist/react/components/relative-time.js +8 -7
  128. package/dist/react/components/relative-time.js.map +1 -1
  129. package/dist/react/components/reload-recovery-notice.d.ts +3 -3
  130. package/dist/react/components/reload-recovery-notice.js +7 -7
  131. package/dist/react/components/reload-recovery-notice.js.map +1 -1
  132. package/dist/react/components/scroll-area.d.ts +2 -2
  133. package/dist/react/components/scroll-area.d.ts.map +1 -1
  134. package/dist/react/components/scroll-area.js +6 -8
  135. package/dist/react/components/scroll-area.js.map +1 -1
  136. package/dist/react/components/scroll-to-top-button.d.ts +5 -5
  137. package/dist/react/components/scroll-to-top-button.js +9 -9
  138. package/dist/react/components/scroll-to-top-button.js.map +1 -1
  139. package/dist/react/components/search-dropdown.d.ts.map +1 -1
  140. package/dist/react/components/search-dropdown.js +8 -3
  141. package/dist/react/components/search-dropdown.js.map +1 -1
  142. package/dist/react/components/select.d.ts +2 -2
  143. package/dist/react/components/select.d.ts.map +1 -1
  144. package/dist/react/components/select.js +19 -19
  145. package/dist/react/components/select.js.map +1 -1
  146. package/dist/react/components/separator.d.ts +2 -2
  147. package/dist/react/components/separator.d.ts.map +1 -1
  148. package/dist/react/components/separator.js +5 -5
  149. package/dist/react/components/separator.js.map +1 -1
  150. package/dist/react/components/sheet.d.ts +3 -3
  151. package/dist/react/components/sheet.d.ts.map +1 -1
  152. package/dist/react/components/sheet.js +21 -21
  153. package/dist/react/components/sheet.js.map +1 -1
  154. package/dist/react/components/show-more-toggle.d.ts +2 -2
  155. package/dist/react/components/show-more-toggle.d.ts.map +1 -1
  156. package/dist/react/components/show-more-toggle.js +6 -6
  157. package/dist/react/components/show-more-toggle.js.map +1 -1
  158. package/dist/react/components/skeleton.d.ts +1 -1
  159. package/dist/react/components/skeleton.d.ts.map +1 -1
  160. package/dist/react/components/skeleton.js +3 -3
  161. package/dist/react/components/skeleton.js.map +1 -1
  162. package/dist/react/components/slider.d.ts +2 -2
  163. package/dist/react/components/slider.d.ts.map +1 -1
  164. package/dist/react/components/slider.js +5 -5
  165. package/dist/react/components/slider.js.map +1 -1
  166. package/dist/react/components/spinner.d.ts +1 -1
  167. package/dist/react/components/spinner.d.ts.map +1 -1
  168. package/dist/react/components/spinner.js +10 -10
  169. package/dist/react/components/spinner.js.map +1 -1
  170. package/dist/react/components/switch.d.ts +2 -2
  171. package/dist/react/components/switch.d.ts.map +1 -1
  172. package/dist/react/components/switch.js +13 -8
  173. package/dist/react/components/switch.js.map +1 -1
  174. package/dist/react/components/table.d.ts +2 -2
  175. package/dist/react/components/table.d.ts.map +1 -1
  176. package/dist/react/components/table.js +24 -24
  177. package/dist/react/components/table.js.map +1 -1
  178. package/dist/react/components/tabs.d.ts +2 -2
  179. package/dist/react/components/tabs.d.ts.map +1 -1
  180. package/dist/react/components/tabs.js +7 -7
  181. package/dist/react/components/tabs.js.map +1 -1
  182. package/dist/react/components/textarea.d.ts +5 -5
  183. package/dist/react/components/textarea.d.ts.map +1 -1
  184. package/dist/react/components/textarea.js +11 -7
  185. package/dist/react/components/textarea.js.map +1 -1
  186. package/dist/react/components/toast.d.ts +4 -4
  187. package/dist/react/components/toast.d.ts.map +1 -1
  188. package/dist/react/components/toast.js +25 -25
  189. package/dist/react/components/toast.js.map +1 -1
  190. package/dist/react/components/toaster.d.ts.map +1 -1
  191. package/dist/react/components/toaster.js +5 -5
  192. package/dist/react/components/toaster.js.map +1 -1
  193. package/dist/react/components/tooltip.d.ts +2 -2
  194. package/dist/react/components/tooltip.d.ts.map +1 -1
  195. package/dist/react/components/tooltip.js +5 -5
  196. package/dist/react/components/tooltip.js.map +1 -1
  197. package/dist/react/hooks/use-async-action.js +2 -2
  198. package/dist/react/hooks/use-async-action.js.map +1 -1
  199. package/dist/react/hooks/use-cursor-page.d.ts +1 -1
  200. package/dist/react/hooks/use-cursor-page.js +2 -2
  201. package/dist/react/hooks/use-cursor-page.js.map +1 -1
  202. package/dist/react/hooks/use-media-query.js +5 -5
  203. package/dist/react/hooks/use-media-query.js.map +1 -1
  204. package/dist/react/hooks/use-paged-list.js +2 -2
  205. package/dist/react/hooks/use-paged-list.js.map +1 -1
  206. package/dist/react/hooks/use-return-scroll.d.ts +1 -1
  207. package/dist/react/hooks/use-return-scroll.d.ts.map +1 -1
  208. package/dist/react/hooks/use-return-scroll.js +11 -11
  209. package/dist/react/hooks/use-return-scroll.js.map +1 -1
  210. package/dist/react/hooks/use-toast.d.ts +3 -3
  211. package/dist/react/hooks/use-toast.d.ts.map +1 -1
  212. package/dist/react/hooks/use-toast.js +17 -17
  213. package/dist/react/hooks/use-toast.js.map +1 -1
  214. package/dist/react/index.d.ts +74 -72
  215. package/dist/react/index.d.ts.map +1 -1
  216. package/dist/react/index.js +51 -50
  217. package/dist/react/index.js.map +1 -1
  218. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"list-pagination.js","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAoBxC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,U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AO,EAAE,eAAe,EACxB,IAAI,EAAE,KAAC,WAAW,IAAC,SAAS,EAAC,SAAS,GAAG,EACzC,SAAS,EAAC,eAAe,yBAGlB,EACT,eAAM,SAAS,EAAC,cAAc,EAAC,IAAI,EAAC,QAAQ,YACzC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,OAAO,UAAU,EAAE,GAChF,EACP,MAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,eAAe;wBAAE,OAAO;oBAC5B,UAAU,CAAC,MAAM,CAAC,CAAC;oBACnB,YAAY,EAAE,CAAC;gBACjB,CAAC,mBACc,eAAe,IAAI,SAAS,EAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,eAAe,qBAGxB,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,SAAS,EAAC,SAAS,GAAG,IACnD,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport type { ListPaginationState } from \"../hooks/use-paged-list.js\";\n\nexport interface ListPaginationProps {\n /**\n * Page state from `usePagedList` (known total),\n * `useCursorPage().paginationFor(hasMore)` (unknown total), or any\n * caller-owned state of the same shape.\n */\n pagination: ListPaginationState;\n /**\n * Makes BOTH controls unavailable while the next page is in flight, without hiding\n * the row. Server-paged surfaces pass their query's `isFetching`; a slice-paged\n * list has nothing to wait for and omits it.\n */\n busy?: boolean;\n /** Optional extra classes. Merged with the component's own classes. */\n className?: string;\n}\n\n/**\n * The ONE Previous / counter / Next control for paginated lists, in both\n * flavors. Pair it with the hook that owns the page state (`usePagedList` for a\n * client-side slice, `useCursorPage` — or the caller's own query state — for a\n * cursor feed; a cursor feed passes `pager.paginationFor(hasMore)`, which binds\n * the query's answer to these controls); this component owns only the controls,\n * so every paginated list reads and behaves the same (ENG-002, FRONTEND-001).\n *\n * The counter follows the flavor: a known `totalPages` reads \"2 of 5\", an\n * omitted one reads \"Page 2\". Everything else is identical in both flavors —\n * which is exactly why there is one component and not two.\n *\n * It renders NOTHING when neither direction is available, so no call site\n * repeats a `totalPages > 1` / `page > 1 || hasMore` guard. An unavailable control\n * — an edge, or either control while a page loads — is `aria-disabled` and ignores\n * activation (announced, and inert), but is never natively disabled: the control the\n * user just pressed keeps focus when it becomes unavailable (FRONTEND-203). The\n * counter is a `status` live region so a page change is announced to screen readers.\n */\nexport function ListPagination({ pagination, busy = false, className }: ListPaginationProps) {\n const { currentPage, totalPages, canPreviousPage, canNextPage, goToPreviousPage, goToNextPage } =\n pagination;\n\n // The control that started the in-flight page shows the spinner. Cleared when `busy`\n // ends — a render-phase adjustment, so there is no effect and no stale frame.\n const [clicked, setClicked] = useState<\"previous\" | \"next\" | null>(null);\n const [wasBusy, setWasBusy] = useState(busy);\n if (busy !== wasBusy) {\n setWasBusy(busy);\n if (!busy) setClicked(null);\n }\n const previousPending = busy && clicked === \"previous\";\n const nextPending = busy && clicked === \"next\";\n const previousUnavailable = busy || !canPreviousPage;\n const nextUnavailable = busy || !canNextPage;\n\n // One visibility rule for both flavors. For a known total this is exactly\n // `totalPages > 1`: page state is clamped into `1..totalPages`, so a\n // single-page list has no reachable neighbour in either direction, and a\n // multi-page list always has one. For a cursor feed it is the hand-rolled\n // `page > 1 || hasMore`. `busy` deliberately does not hide the row — the\n // controls grey out in place instead of vanishing mid-fetch.\n if (!canPreviousPage && !canNextPage) return null;\n\n return (\n <div className={cn(\"flex w-full items-center justify-between gap-4 mt-4\", className)}>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (previousUnavailable) return;\n setClicked(\"previous\");\n goToPreviousPage();\n }}\n aria-disabled={previousUnavailable || undefined}\n pending={previousPending}\n icon={<ChevronLeft className=\"icon-xs\" />}\n className=\"h-11 min-w-11\"\n >\n Previous\n </Button>\n <span className=\"text-counter\" role=\"status\">\n {totalPages === undefined ? `Page ${currentPage}` : `${currentPage} of ${totalPages}`}\n </span>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (nextUnavailable) return;\n setClicked(\"next\");\n goToNextPage();\n }}\n aria-disabled={nextUnavailable || undefined}\n pending={nextPending}\n className=\"h-11 min-w-11\"\n >\n Next\n {nextPending ? null : <ChevronRight className=\"icon-xs\" />}\n </Button>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"list-pagination.js","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAoBxC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,UAAU,EAAE,IAAI,GAAG,KAAK,EAAE,SAAS,EAAuB;IACzF,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAC7F,UAAU,CAAC;IAEb,qFAAqF;IACrF,8EAA8E;IAC9E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA6B,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,UAAU,CAAC,IAAI,CAAC,CAAC;Q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C5B,UAAU,CAAC,MAAM,CAAC,CAAC;oBACnB,YAAY,EAAE,CAAC;gBACjB,CAAC,mBACc,eAAe,IAAI,SAAS,EAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,eAAe,qBAGxB,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,SAAS,EAAC,SAAS,GAAG,IACnD,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from './button.js';\nimport { cn } from '../../lib/utils.js';\nimport type { ListPaginationState } from '../hooks/use-paged-list.js';\n\nexport interface ListPaginationProps {\n /**\n * Page state from `usePagedList` (known total),\n * `useCursorPage().paginationFor(hasMore)` (unknown total), or any\n * caller-owned state of the same shape.\n */\n pagination: ListPaginationState;\n /**\n * Makes BOTH controls unavailable while the next page is in flight, without hiding\n * the row. Server-paged surfaces pass their query's `isFetching`; a slice-paged\n * list has nothing to wait for and omits it.\n */\n busy?: boolean;\n /** Optional extra classes. Merged with the component's own classes. */\n className?: string;\n}\n\n/**\n * The ONE Previous / counter / Next control for paginated lists, in both\n * flavors. Pair it with the hook that owns the page state (`usePagedList` for a\n * client-side slice, `useCursorPage` — or the caller's own query state — for a\n * cursor feed; a cursor feed passes `pager.paginationFor(hasMore)`, which binds\n * the query's answer to these controls); this component owns only the controls,\n * so every paginated list reads and behaves the same (ENG-002, FRONTEND-001).\n *\n * The counter follows the flavor: a known `totalPages` reads \"2 of 5\", an\n * omitted one reads \"Page 2\". Everything else is identical in both flavors —\n * which is exactly why there is one component and not two.\n *\n * It renders NOTHING when neither direction is available, so no call site\n * repeats a `totalPages > 1` / `page > 1 || hasMore` guard. An unavailable control\n * — an edge, or either control while a page loads — is `aria-disabled` and ignores\n * activation (announced, and inert), but is never natively disabled: the control the\n * user just pressed keeps focus when it becomes unavailable (FRONTEND-203). The\n * counter is a `status` live region so a page change is announced to screen readers.\n */\nexport function ListPagination({ pagination, busy = false, className }: ListPaginationProps) {\n const { currentPage, totalPages, canPreviousPage, canNextPage, goToPreviousPage, goToNextPage } =\n pagination;\n\n // The control that started the in-flight page shows the spinner. Cleared when `busy`\n // ends — a render-phase adjustment, so there is no effect and no stale frame.\n const [clicked, setClicked] = useState<'previous' | 'next' | null>(null);\n const [wasBusy, setWasBusy] = useState(busy);\n if (busy !== wasBusy) {\n setWasBusy(busy);\n if (!busy) setClicked(null);\n }\n const previousPending = busy && clicked === 'previous';\n const nextPending = busy && clicked === 'next';\n const previousUnavailable = busy || !canPreviousPage;\n const nextUnavailable = busy || !canNextPage;\n\n // One visibility rule for both flavors. For a known total this is exactly\n // `totalPages > 1`: page state is clamped into `1..totalPages`, so a\n // single-page list has no reachable neighbour in either direction, and a\n // multi-page list always has one. For a cursor feed it is the hand-rolled\n // `page > 1 || hasMore`. `busy` deliberately does not hide the row — the\n // controls grey out in place instead of vanishing mid-fetch.\n if (!canPreviousPage && !canNextPage) return null;\n\n return (\n <div className={cn('flex w-full items-center justify-between gap-4 mt-4', className)}>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (previousUnavailable) return;\n setClicked('previous');\n goToPreviousPage();\n }}\n aria-disabled={previousUnavailable || undefined}\n pending={previousPending}\n icon={<ChevronLeft className=\"icon-xs\" />}\n className=\"h-11 min-w-11\"\n >\n Previous\n </Button>\n <span className=\"text-counter\" role=\"status\">\n {totalPages === undefined ? `Page ${currentPage}` : `${currentPage} of ${totalPages}`}\n </span>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (nextUnavailable) return;\n setClicked('next');\n goToNextPage();\n }}\n aria-disabled={nextUnavailable || undefined}\n pending={nextPending}\n className=\"h-11 min-w-11\"\n >\n Next\n {nextPending ? null : <ChevronRight className=\"icon-xs\" />}\n </Button>\n </div>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
1
+ import * as React from 'react';
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
3
  declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
4
4
  declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
5
5
  declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAK3D,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAEpF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAEtF;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,qBAExF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,qBAEhG;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,qBAElF;AAED,QAAA,MAAM,OAAO,yJASX,CAAA;AAGF,QAAA,MAAM,cAAc,sKAYlB,CAAA;AAGF,QAAA,MAAM,iBAAiB;YAE0D,OAAO;wCActF,CAAA;AAGF,QAAA,MAAM,iBAAiB,m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hG;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,qBAElF;AAED,QAAA,MAAM,OAAO,yJAYX,CAAC;AAGH,QAAA,MAAM,cAAc,sKAYlB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAE0D,OAAO;wCActF,CAAC;AAGH,QAAA,MAAM,iBAAiB,mKAYrB,CAAC;AAGH,QAAA,MAAM,cAAc,gKAiBlB,CAAC;AAGH,QAAA,MAAM,WAAW;YAE0D,OAAO;wCAWhF,CAAC;AAGH,QAAA,MAAM,mBAAmB,qKAoBvB,CAAC;AAGH,QAAA,MAAM,gBAAgB,kKAmBpB,CAAC;AAGH,QAAA,MAAM,YAAY;YAE0D,OAAO;wCAOjF,CAAC;AAGH,QAAA,MAAM,gBAAgB,kKASpB,CAAC;AAGH,QAAA,MAAM,eAAe;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAKtF,CAAC;AAGF,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAC"}
@@ -1,9 +1,9 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
5
- import { Check, ChevronRight, Circle } from "lucide-react";
6
- import { cn } from "../../lib/utils.js";
3
+ import * as React from 'react';
4
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
5
+ import { Check, ChevronRight, Circle } from 'lucide-react';
6
+ import { cn } from '../../lib/utils.js';
7
7
  function MenubarMenu({ ...props }) {
8
8
  return _jsx(MenubarPrimitive.Menu, { ...props });
9
9
  }
@@ -19,27 +19,27 @@ function MenubarRadioGroup({ ...props }) {
19
19
  function MenubarSub({ ...props }) {
20
20
  return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
21
21
  }
22
- const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className), ...props })));
22
+ const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn('flex h-10 items-center space-x-1 rounded-md border bg-background p-1', className), ...props })));
23
23
  Menubar.displayName = MenubarPrimitive.Root.displayName;
24
- const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Trigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props })));
24
+ const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Trigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', className), ...props })));
25
25
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
26
- const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(MenubarPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
26
+ const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(MenubarPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
27
27
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
28
- const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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", className), ...props })));
28
+ const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] 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', className), ...props })));
29
29
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
30
- const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover data-[state=open]:animate-in 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", className), ...props }) })));
30
+ const MenubarContent = React.forwardRef(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn('z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in 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', className), ...props }) })));
31
31
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
32
- const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
32
+ const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
33
33
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
34
- const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(MenubarPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
34
+ const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(MenubarPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
35
35
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
36
- const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(MenubarPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
36
+ const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(MenubarPrimitive.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
37
37
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
38
- const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
38
+ const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
39
39
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
40
- const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
40
+ const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
41
41
  MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
42
- const MenubarShortcut = ({ className, ...props }) => (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
43
- MenubarShortcut.displayname = "MenubarShortcut";
42
+ const MenubarShortcut = ({ className, ...props }) => (_jsx("span", { className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className), ...props }));
43
+ MenubarShortcut.displayname = 'MenubarShortcut';
44
44
  export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
45
45
  //# sourceMappingURL=menubar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],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AG,gBAAgB,CAAC,SAAS,CAAC,WAAW,CAAA;AAErE,MAAM,eAAe,GAAG,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EAC8B,EAAE,EAAE,CAAC,CAC3C,eAAM,SAAS,EAAE,EAAE,CAAC,uDAAuD,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACvG,CAAA;AACD,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\", className)}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover data-[state=open]:animate-in 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\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n))\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\n)\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
1
+ {"version":3,"file":"menubar.js","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,SAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAsD;IACnF,OAAO,KAAC,gBAAgB,CAAC,IAAI,OAAK,KAAK,GAAI,CAAC;AAC9C,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAuD;IACrF,OAAO,KAAC,gBAAgB,CAAC,KAAK,OAAK,KAAK,GAAI,CAAC;AAC/C,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAwD;IACvF,OAAO,KAAC,gBAAgB,CAAC,MAAM,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,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzC,KAAC,gBAAgB,CAAC,KAAK,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,CAAC,KAC1E,KAAK,GACT,CACH,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,GAAG,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC;AAE9D,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,gBAAgB,CAAC,SAAS,IACzB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,gBAAgB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEtE,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyC,EAAE,EAAE,CAAC,CAC1F,eACE,SAAS,EAAE,EAAE,CAAC,uDAAuD,EAAE,SAAS,CAAC,KAC7E,KAAK,GACT,CACH,CAAC;AACF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />;\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />;\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />;\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />;\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-10 items-center space-x-1 rounded-md border bg-background p-1',\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] 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',\n className,\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in 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',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}\n {...props}\n />\n);\nMenubarShortcut.displayname = 'MenubarShortcut';\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"]}
@@ -9,6 +9,6 @@ interface OpenerFocusHandlers {
9
9
  * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`
10
10
  * it has chosen the destination, and when the opener has left the page Radix's own return runs.
11
11
  */
12
- export declare function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }: OpenerFocusHandlers): Required<OpenerFocusHandlers>;
12
+ export declare function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus, }: OpenerFocusHandlers): Required<OpenerFocusHandlers>;
13
13
  export {};
14
14
  //# sourceMappingURL=opener-focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opener-focus.d.ts","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACxC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAC1C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,EAAE,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAiBxH"}
1
+ {"version":3,"file":"opener-focus.d.ts","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,eAAe,EACf,gBAAgB,GACjB,EAAE,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAiBrD"}
@@ -1,5 +1,5 @@
1
- "use client";
2
- import * as React from "react";
1
+ 'use client';
2
+ import * as React from 'react';
3
3
  /**
4
4
  * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's
5
5
  * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —
@@ -7,7 +7,7 @@ import * as React from "react";
7
7
  * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`
8
8
  * it has chosen the destination, and when the opener has left the page Radix's own return runs.
9
9
  */
10
- export function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }) {
10
+ export function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus, }) {
11
11
  const opener = React.useRef(null);
12
12
  return {
13
13
  onOpenAutoFocus: (event) => {
@@ -1 +1 @@
1
- {"version":3,"file":"opener-focus.js","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAuB;IACvF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAqB,IAAI,CAAC,CAAA;IACrD,OAAO;QACL,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAA;YACrC,MAAM,CAAC,OAAO,GAAG,MAAM,YAAY,WAAW,IAAI,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;YAC1F,eAAe,EAAE,CAAC,KAAK,CAAC,CAAA;QAC1B,CAAC;QACD,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE;YAC1B,gBAAgB,EAAE,CAAC,KAAK,CAAC,CAAA;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAA;YAC7B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;YACrB,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,WAAW;gBAAE,OAAM;YAC1D,KAAK,CAAC,cAAc,EAAE,CAAA;YACtB,MAAM,CAAC,KAAK,EAAE,CAAA;QAChB,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\ninterface OpenerFocusHandlers {\n onOpenAutoFocus?: (event: Event) => void\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's\n * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —\n * would leave focus on the page. The opener is recorded as Radix starts its open focus, before focus\n * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`\n * it has chosen the destination, and when the opener has left the page Radix's own return runs.\n */\nexport function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }: OpenerFocusHandlers): Required<OpenerFocusHandlers> {\n const opener = React.useRef<HTMLElement | null>(null)\n return {\n onOpenAutoFocus: (event) => {\n const active = document.activeElement\n opener.current = active instanceof HTMLElement && active !== document.body ? active : null\n onOpenAutoFocus?.(event)\n },\n onCloseAutoFocus: (event) => {\n onCloseAutoFocus?.(event)\n const target = opener.current\n opener.current = null\n if (event.defaultPrevented || !target?.isConnected) return\n event.preventDefault()\n target.focus()\n },\n }\n}\n"]}
1
+ {"version":3,"file":"opener-focus.js","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,eAAe,EACf,gBAAgB,GACI;IACpB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAqB,IAAI,CAAC,CAAC;IACtD,OAAO;QACL,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;YACtC,MAAM,CAAC,OAAO,GAAG,MAAM,YAAY,WAAW,IAAI,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAC3F,eAAe,EAAE,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE;YAC1B,gBAAgB,EAAE,CAAC,KAAK,CAAC,CAAC;YAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;YAC9B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YACtB,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,WAAW;gBAAE,OAAO;YAC3D,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\ninterface OpenerFocusHandlers {\n onOpenAutoFocus?: (event: Event) => void;\n onCloseAutoFocus?: (event: Event) => void;\n}\n\n/**\n * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's\n * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —\n * would leave focus on the page. The opener is recorded as Radix starts its open focus, before focus\n * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`\n * it has chosen the destination, and when the opener has left the page Radix's own return runs.\n */\nexport function useOpenerFocus({\n onOpenAutoFocus,\n onCloseAutoFocus,\n}: OpenerFocusHandlers): Required<OpenerFocusHandlers> {\n const opener = React.useRef<HTMLElement | null>(null);\n return {\n onOpenAutoFocus: (event) => {\n const active = document.activeElement;\n opener.current = active instanceof HTMLElement && active !== document.body ? active : null;\n onOpenAutoFocus?.(event);\n },\n onCloseAutoFocus: (event) => {\n onCloseAutoFocus?.(event);\n const target = opener.current;\n opener.current = null;\n if (event.defaultPrevented || !target?.isConnected) return;\n event.preventDefault();\n target.focus();\n },\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type * as React from "react";
1
+ import type * as React from 'react';
2
2
  /** Cancels an event and stops it in the capture phase, before any handler on the control runs. */
3
3
  export declare function blockEvent(event: React.SyntheticEvent): void;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pending-guard.d.ts","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,QAGrD;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,QAG5D"}
1
+ {"version":3,"file":"pending-guard.d.ts","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,QAGrD;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,QAG5D"}
@@ -3,7 +3,7 @@ export function blockEvent(event) {
3
3
  event.preventDefault();
4
4
  event.stopPropagation();
5
5
  }
6
- const ACTIVATION_KEYS = new Set([" ", "Enter", "ArrowUp", "ArrowDown"]);
6
+ const ACTIVATION_KEYS = new Set([' ', 'Enter', 'ArrowUp', 'ArrowDown']);
7
7
  /**
8
8
  * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a
9
9
  * trigger) and a single printable character (a trigger's typeahead) — and lets every other key
@@ -1 +1 @@
1
- {"version":3,"file":"pending-guard.js","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAEA,kGAAkG;AAClG,MAAM,UAAU,UAAU,CAAC,KAA2B;IACpD,KAAK,CAAC,cAAc,EAAE,CAAA;IACtB,KAAK,CAAC,eAAe,EAAE,CAAA;AACzB,CAAC;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAEvE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM;QAAE,OAAM;IAC1D,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,UAAU,CAAC,KAAK,CAAC,CAAA;AACjF,CAAC","sourcesContent":["import type * as React from \"react\"\n\n/** Cancels an event and stops it in the capture phase, before any handler on the control runs. */\nexport function blockEvent(event: React.SyntheticEvent) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst ACTIVATION_KEYS = new Set([\" \", \"Enter\", \"ArrowUp\", \"ArrowDown\"])\n\n/**\n * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a\n * trigger) and a single printable character (a trigger's typeahead) — and lets every other key\n * through, so Tab, Escape, function keys, and shortcuts behave as usual.\n */\nexport function blockActivationKey(event: React.KeyboardEvent) {\n if (event.ctrlKey || event.metaKey || event.altKey) return\n if (ACTIVATION_KEYS.has(event.key) || event.key.length === 1) blockEvent(event)\n}\n"]}
1
+ {"version":3,"file":"pending-guard.js","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAEA,kGAAkG;AAClG,MAAM,UAAU,UAAU,CAAC,KAA2B;IACpD,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO;IAC3D,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,UAAU,CAAC,KAAK,CAAC,CAAC;AAClF,CAAC","sourcesContent":["import type * as React from 'react';\n\n/** Cancels an event and stops it in the capture phase, before any handler on the control runs. */\nexport function blockEvent(event: React.SyntheticEvent) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst ACTIVATION_KEYS = new Set([' ', 'Enter', 'ArrowUp', 'ArrowDown']);\n\n/**\n * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a\n * trigger) and a single printable character (a trigger's typeahead) — and lets every other key\n * through, so Tab, Escape, function keys, and shortcuts behave as usual.\n */\nexport function blockActivationKey(event: React.KeyboardEvent) {\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n if (ACTIVATION_KEYS.has(event.key) || event.key.length === 1) blockEvent(event);\n}\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as PopoverPrimitive from "@radix-ui/react-popover";
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
4
  declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,QAAA,MAAM,OAAO,yCAAwB,CAAA;AACrC,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAC/C,QAAA,MAAM,aAAa,4GAA0B,CAAA;AAE7C,QAAA,MAAM,cAAc,gKAgBlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,OAAO,yCAAwB,CAAC;AACtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAChD,QAAA,MAAM,aAAa,4GAA0B,CAAC;AAE9C,QAAA,MAAM,cAAc,gKAgBlB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
@@ -1,12 +1,12 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- import { cn } from "../../lib/utils.js";
3
+ import * as React from 'react';
4
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
5
+ import { cn } from '../../lib/utils.js';
6
6
  const Popover = PopoverPrimitive.Root;
7
7
  const PopoverTrigger = PopoverPrimitive.Trigger;
8
8
  const PopoverAnchor = PopoverPrimitive.Anchor;
9
- const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden 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", className), ...props }) })));
9
+ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn('z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] 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', className), ...props }) })));
10
10
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
11
11
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
12
12
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAA;AACrC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAA;AAC/C,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAA;AAE7C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,obAAob,EACpb,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAA;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAA;AAEjE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nconst Popover = PopoverPrimitive.Root\nconst PopoverTrigger = PopoverPrimitive.Trigger\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden 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\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"]}
1
+ {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAChD,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAE9C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,4eAA4e,EAC5e,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '../../lib/utils.js';\n\nconst Popover = PopoverPrimitive.Root;\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] 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',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as ProgressPrimitive from "@radix-ui/react-progress";
1
+ import * as React from 'react';
2
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
3
3
  interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {
4
4
  indicatorClassName?: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAG7D,UAAU,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAC3F,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,QAAA,MAAM,QAAQ,sFAab,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAG9D,UAAU,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAC3F,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,QAAQ,sFAgBb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,9 +1,9 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as ProgressPrimitive from "@radix-ui/react-progress";
5
- import { cn } from "../../lib/utils.js";
6
- const Progress = React.forwardRef(({ className, value, indicatorClassName, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn("h-full w-full flex-1 bg-primary transition-all", indicatorClassName), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
3
+ import * as React from 'react';
4
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
5
+ import { cn } from '../../lib/utils.js';
6
+ const Progress = React.forwardRef(({ className, value, indicatorClassName, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn('h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]', indicatorClassName), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
7
7
  Progress.displayName = ProgressPrimitive.Root.displayName;
8
8
  export { Progress };
9
9
  //# sourceMappingURL=progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAMvC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3D,KAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,KACrF,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,IAC1B,SAAS,EAAE,EAAE,CAAC,gDAAgD,EAAE,kBAAkB,CAAC,EACnF,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC3D,GACqB,CAC1B,CACF,CAAA;AACD,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../lib/utils.js\"\n\ninterface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n indicatorClassName?: string\n}\n\nconst Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value, indicatorClassName, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\"h-full w-full flex-1 bg-primary transition-all\", indicatorClassName)}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n)\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"]}
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAMxC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3D,KAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,KACrF,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,IAC1B,SAAS,EAAE,EAAE,CACX,8GAA8G,EAC9G,kBAAkB,CACnB,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC3D,GACqB,CAC1B,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '../../lib/utils.js';\n\ninterface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n indicatorClassName?: string;\n}\n\nconst Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value, indicatorClassName, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\n 'h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]',\n indicatorClassName,\n )}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n ),\n);\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
3
  declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
5
  export { RadioGroup, RadioGroupItem };
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAKlE,QAAA,MAAM,UAAU,+JAKd,CAAA;AAGF,QAAA,MAAM,cAAc,yKAgBlB,CAAA;AAGF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAKnE,QAAA,MAAM,UAAU,+JAKd,CAAC;AAGH,QAAA,MAAM,cAAc,yKAgBlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -1,12 +1,12 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
- import { Circle } from "lucide-react";
6
- import { cn } from "../../lib/utils.js";
7
- const RadioGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref })));
3
+ import * as React from 'react';
4
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
+ import { Circle } from 'lucide-react';
6
+ import { cn } from '../../lib/utils.js';
7
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Root, { className: cn('grid gap-2', className), ...props, ref: ref })));
8
8
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
9
- const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) }) })));
9
+ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn('aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) }) })));
10
10
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
11
11
  export { RadioGroup, RadioGroupItem };
12
12
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAC1F,CAAC,CAAA;AACF,UAAU,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAA;AAE7D,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,4OAA4O,EAC5O,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,IAAC,SAAS,EAAC,kCAAkC,YACzE,KAAC,MAAM,IAAC,SAAS,EAAC,uCAAuC,GAAG,GAC9B,GACP,CAC5B,CAAC,CAAA;AACF,cAAc,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n))\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"]}
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAC1F,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE9D,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,4OAA4O,EAC5O,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,IAAC,SAAS,EAAC,kCAAkC,YACzE,KAAC,MAAM,IAAC,SAAS,EAAC,uCAAuC,GAAG,GAC9B,GACP,CAC5B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n));\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"]}
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  export interface RelativeTimeProps {
3
3
  /** Number (ms or seconds), ISO string, Firestore Timestamp, or Date. */
4
4
  timestamp: number | string | Date | undefined | null;
@@ -1 +1 @@
1
- {"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../../src/react/components/relative-time.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACrD,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAmB,EACnB,QAAwB,EACxB,iBAA0B,GAC3B,EAAE,iBAAiB,qBA8BnB"}
1
+ {"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../../src/react/components/relative-time.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACrD,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAmB,EACnB,QAAwB,EACxB,iBAA0B,GAC3B,EAAE,iBAAiB,qBA8BnB"}
@@ -1,25 +1,26 @@
1
- "use client";
1
+ 'use client';
2
2
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { formatDistanceToNowStrict, toDate } from "@ttt-productions/firebase-helpers";
3
+ import * as React from 'react';
4
+ import { formatDistanceToNowStrict } from 'date-fns';
5
+ import { toDate } from '@ttt-productions/firebase-helpers';
5
6
  /**
6
7
  * SSR-safe relative-time component.
7
8
  * Renders `placeholder` on the server and pre-mount, then the live value.
8
9
  */
9
- export function RelativeTime({ timestamp, placeholder = "...", fallback = "a while ago", refreshIntervalMs = 60_000, }) {
10
+ export function RelativeTime({ timestamp, placeholder = '...', fallback = 'a while ago', refreshIntervalMs = 60_000, }) {
10
11
  const [value, setValue] = React.useState(placeholder);
11
12
  React.useEffect(() => {
12
13
  let date = null;
13
14
  if (timestamp instanceof Date) {
14
15
  date = timestamp;
15
16
  }
16
- else if (typeof timestamp === "number") {
17
+ else if (typeof timestamp === 'number') {
17
18
  date = toDate(timestamp);
18
19
  }
19
- else if (typeof timestamp === "string") {
20
+ else if (typeof timestamp === 'string') {
20
21
  date = new Date(timestamp);
21
22
  }
22
- else if (timestamp && typeof timestamp === "object" && "toDate" in timestamp) {
23
+ else if (timestamp && typeof timestamp === 'object' && 'toDate' in timestamp) {
23
24
  date = toDate(timestamp);
24
25
  }
25
26
  if (!date || isNaN(date.getTime())) {
@@ -1 +1 @@
1
- {"version":3,"file":"relative-time.js","sourceRoot":"","sources":["../../../src/react/components/relative-time.tsx"],"names":[],"mappings":"AAAA,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QAAQ,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACtB,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE7C,OAAO,4BAAG,KAAK,GAAI,CAAC;AACtB,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { formatDistanceToNowStrict, toDate } from \"@ttt-productions/firebase-helpers\";\n\nexport interface RelativeTimeProps {\n /** Number (ms or seconds), ISO string, Firestore Timestamp, or Date. */\n timestamp: number | string | Date | undefined | null;\n /** Fallback rendered before client hydration completes. Defaults to \"...\". */\n placeholder?: string;\n /** Fallback rendered when the timestamp can't be parsed. Defaults to \"a while ago\". */\n fallback?: string;\n /** Auto-refresh interval in ms. Defaults to 60000. Set to 0 to disable. */\n refreshIntervalMs?: number;\n}\n\n/**\n * SSR-safe relative-time component.\n * Renders `placeholder` on the server and pre-mount, then the live value.\n */\nexport function RelativeTime({\n timestamp,\n placeholder = \"...\",\n fallback = \"a while ago\",\n refreshIntervalMs = 60_000,\n}: RelativeTimeProps) {\n const [value, setValue] = React.useState<string>(placeholder);\n\n React.useEffect(() => {\n let date: Date | null = null;\n if (timestamp instanceof Date) {\n date = timestamp;\n } else if (typeof timestamp === \"number\") {\n date = toDate(timestamp);\n } else if (typeof timestamp === \"string\") {\n date = new Date(timestamp);\n } else if (timestamp && typeof timestamp === \"object\" && \"toDate\" in timestamp) {\n date = toDate(timestamp);\n }\n\n if (!date || isNaN(date.getTime())) {\n setValue(fallback);\n return;\n }\n\n setValue(formatDistanceToNowStrict(date, { addSuffix: true }));\n\n if (refreshIntervalMs <= 0) return;\n const interval = setInterval(() => {\n setValue(formatDistanceToNowStrict(date, { addSuffix: true }));\n }, refreshIntervalMs);\n return () => clearInterval(interval);\n }, [timestamp, fallback, refreshIntervalMs]);\n\n return <>{value}</>;\n}\n"]}
1
+ {"version":3,"file":"relative-time.js","sourceRoot":"","sources":["../../../src/react/components/relative-time.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAa3D;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,EACT,WAAW,GAAG,KAAK,EACnB,QAAQ,GAAG,aAAa,EACxB,iBAAiB,GAAG,MAAM,GACR;IAClB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,WAAW,CAAC,CAAC;IAE9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,IAAI,GAAgB,IAAI,CAAC;QAC7B,IAAI,SAAS,YAAY,IAAI,EAAE,CAAC;YAC9B,IAAI,GAAG,SAAS,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YACzC,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;aAAM,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YACzC,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;YAC/E,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACnC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/D,IAAI,iBAAiB,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,QAAQ,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACtB,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE7C,OAAO,4BAAG,KAAK,GAAI,CAAC;AACtB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { formatDistanceToNowStrict } from 'date-fns';\nimport { toDate } from '@ttt-productions/firebase-helpers';\n\nexport interface RelativeTimeProps {\n /** Number (ms or seconds), ISO string, Firestore Timestamp, or Date. */\n timestamp: number | string | Date | undefined | null;\n /** Fallback rendered before client hydration completes. Defaults to \"...\". */\n placeholder?: string;\n /** Fallback rendered when the timestamp can't be parsed. Defaults to \"a while ago\". */\n fallback?: string;\n /** Auto-refresh interval in ms. Defaults to 60000. Set to 0 to disable. */\n refreshIntervalMs?: number;\n}\n\n/**\n * SSR-safe relative-time component.\n * Renders `placeholder` on the server and pre-mount, then the live value.\n */\nexport function RelativeTime({\n timestamp,\n placeholder = '...',\n fallback = 'a while ago',\n refreshIntervalMs = 60_000,\n}: RelativeTimeProps) {\n const [value, setValue] = React.useState<string>(placeholder);\n\n React.useEffect(() => {\n let date: Date | null = null;\n if (timestamp instanceof Date) {\n date = timestamp;\n } else if (typeof timestamp === 'number') {\n date = toDate(timestamp);\n } else if (typeof timestamp === 'string') {\n date = new Date(timestamp);\n } else if (timestamp && typeof timestamp === 'object' && 'toDate' in timestamp) {\n date = toDate(timestamp);\n }\n\n if (!date || isNaN(date.getTime())) {\n setValue(fallback);\n return;\n }\n\n setValue(formatDistanceToNowStrict(date, { addSuffix: true }));\n\n if (refreshIntervalMs <= 0) return;\n const interval = setInterval(() => {\n setValue(formatDistanceToNowStrict(date, { addSuffix: true }));\n }, refreshIntervalMs);\n return () => clearInterval(interval);\n }, [timestamp, fallback, refreshIntervalMs]);\n\n return <>{value}</>;\n}\n"]}
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import type { ReloadRecoveryWatch } from "../../browser/reload-recovery-watch.js";
3
- import type { ReloadRecoveryKind } from "../../lib/reload-recovery.js";
1
+ import * as React from 'react';
2
+ import type { ReloadRecoveryWatch } from '../../browser/reload-recovery-watch.js';
3
+ import type { ReloadRecoveryKind } from '../../lib/reload-recovery.js';
4
4
  export interface ReloadRecoveryNoticeProps {
5
5
  /** The watch the app's client entry started. */
6
6
  watch: ReloadRecoveryWatch;
@@ -1,10 +1,10 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../../lib/utils.js";
5
- import { useAsyncAction } from "../hooks/use-async-action.js";
6
- import { Alert, AlertDescription } from "./alert.js";
7
- import { Button } from "./button.js";
3
+ import * as React from 'react';
4
+ import { cn } from '../../lib/utils.js';
5
+ import { useAsyncAction } from '../hooks/use-async-action.js';
6
+ import { Alert, AlertDescription } from './alert.js';
7
+ import { Button } from './button.js';
8
8
  const noFailureOnServer = () => null;
9
9
  /**
10
10
  * One notice pinned to the top of the screen once the page hits a failure only a reload repairs.
@@ -16,6 +16,6 @@ export function ReloadRecoveryNotice({ watch, messages, refreshLabel, onRefresh,
16
16
  const refresh = useAsyncAction(onRefresh, { onError: onRefreshError });
17
17
  if (kind === null)
18
18
  return null;
19
- return (_jsxs(Alert, { className: cn("ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0", className), children: [_jsx(AlertDescription, { children: messages[kind] }), _jsx(Button, { type: "button", size: "sm", pending: refresh.pending, onClick: () => void refresh.run(), children: refreshLabel })] }));
19
+ return (_jsxs(Alert, { className: cn('ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0', className), children: [_jsx(AlertDescription, { children: messages[kind] }), _jsx(Button, { type: "button", size: "sm", pending: refresh.pending, onClick: () => void refresh.run(), children: refreshLabel })] }));
20
20
  }
21
21
  //# sourceMappingURL=reload-recovery-notice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reload-recovery-notice.js","sourceRoot":"","sources":["../../../src/react/components/reload-recovery-notice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAoBrC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,GACiB;IAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC3F,MAAM,OAAO,GAAG,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;IACvE,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,CACL,MAAC,KAAK,IACJ,SAAS,EAAE,EAAE,CACX,iIAAiI,EACjI,SAAS,CACV,aAED,KAAC,gBAAgB,cAAE,QAAQ,CAAC,IAAI,CAAC,GAAoB,EACrD,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,EAAE,YACxF,YAAY,GACN,IACH,CACT,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type { ReloadRecoveryWatch } from \"../../browser/reload-recovery-watch.js\";\nimport type { ReloadRecoveryKind } from \"../../lib/reload-recovery.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport { useAsyncAction } from \"../hooks/use-async-action.js\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\n\nexport interface ReloadRecoveryNoticeProps {\n /** The watch the app's client entry started. */\n watch: ReloadRecoveryWatch;\n /** The app's sentence for each failure. */\n messages: Readonly<Record<ReloadRecoveryKind, React.ReactNode>>;\n /** The app's label for the refresh control. */\n refreshLabel: React.ReactNode;\n /**\n * The app's own reload, which runs its unsaved-work guard first. Refresh is pending until it\n * settles: a reload that proceeds keeps it pending until the page unloads, and a cancelled guard\n * settles it with the page, its input, and the notice as they were.\n */\n onRefresh: () => Promise<unknown>;\n /** Receives anything `onRefresh` throws. */\n onRefreshError: (error: unknown) => void;\n className?: string;\n}\n\nconst noFailureOnServer = () => null;\n\n/**\n * One notice pinned to the top of the screen once the page hits a failure only a reload repairs.\n * It cannot be dismissed and never reloads by itself: the page and every editor beneath it stay\n * mounted and usable until the person presses Refresh. A repeat of the failure changes nothing.\n */\nexport function ReloadRecoveryNotice({\n watch,\n messages,\n refreshLabel,\n onRefresh,\n onRefreshError,\n className,\n}: ReloadRecoveryNoticeProps) {\n const kind = React.useSyncExternalStore(watch.subscribe, watch.current, noFailureOnServer);\n const refresh = useAsyncAction(onRefresh, { onError: onRefreshError });\n if (kind === null) return null;\n return (\n <Alert\n className={cn(\n \"ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0\",\n className,\n )}\n >\n <AlertDescription>{messages[kind]}</AlertDescription>\n <Button type=\"button\" size=\"sm\" pending={refresh.pending} onClick={() => void refresh.run()}>\n {refreshLabel}\n </Button>\n </Alert>\n );\n}\n"]}
1
+ {"version":3,"file":"reload-recovery-notice.js","sourceRoot":"","sources":["../../../src/react/components/reload-recovery-notice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAoBrC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,GACiB;IAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC3F,MAAM,OAAO,GAAG,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;IACvE,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,CACL,MAAC,KAAK,IACJ,SAAS,EAAE,EAAE,CACX,iIAAiI,EACjI,SAAS,CACV,aAED,KAAC,gBAAgB,cAAE,QAAQ,CAAC,IAAI,CAAC,GAAoB,EACrD,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,EAAE,YACxF,YAAY,GACN,IACH,CACT,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ReloadRecoveryWatch } from '../../browser/reload-recovery-watch.js';\nimport type { ReloadRecoveryKind } from '../../lib/reload-recovery.js';\nimport { cn } from '../../lib/utils.js';\nimport { useAsyncAction } from '../hooks/use-async-action.js';\nimport { Alert, AlertDescription } from './alert.js';\nimport { Button } from './button.js';\n\nexport interface ReloadRecoveryNoticeProps {\n /** The watch the app's client entry started. */\n watch: ReloadRecoveryWatch;\n /** The app's sentence for each failure. */\n messages: Readonly<Record<ReloadRecoveryKind, React.ReactNode>>;\n /** The app's label for the refresh control. */\n refreshLabel: React.ReactNode;\n /**\n * The app's own reload, which runs its unsaved-work guard first. Refresh is pending until it\n * settles: a reload that proceeds keeps it pending until the page unloads, and a cancelled guard\n * settles it with the page, its input, and the notice as they were.\n */\n onRefresh: () => Promise<unknown>;\n /** Receives anything `onRefresh` throws. */\n onRefreshError: (error: unknown) => void;\n className?: string;\n}\n\nconst noFailureOnServer = () => null;\n\n/**\n * One notice pinned to the top of the screen once the page hits a failure only a reload repairs.\n * It cannot be dismissed and never reloads by itself: the page and every editor beneath it stay\n * mounted and usable until the person presses Refresh. A repeat of the failure changes nothing.\n */\nexport function ReloadRecoveryNotice({\n watch,\n messages,\n refreshLabel,\n onRefresh,\n onRefreshError,\n className,\n}: ReloadRecoveryNoticeProps) {\n const kind = React.useSyncExternalStore(watch.subscribe, watch.current, noFailureOnServer);\n const refresh = useAsyncAction(onRefresh, { onError: onRefreshError });\n if (kind === null) return null;\n return (\n <Alert\n className={cn(\n 'ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0',\n className,\n )}\n >\n <AlertDescription>{messages[kind]}</AlertDescription>\n <Button type=\"button\" size=\"sm\" pending={refresh.pending} onClick={() => void refresh.run()}>\n {refreshLabel}\n </Button>\n </Alert>\n );\n}\n"]}