@exsto/ds 0.0.1-rc.2 → 0.0.1-rc.21

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 (342) hide show
  1. package/README.md +163 -28
  2. package/dist/date-picker.js +2 -0
  3. package/dist/ds/src/date-picker.d.ts +9 -0
  4. package/dist/ds/src/file-input.d.ts +9 -0
  5. package/dist/ds/src/index.d.ts +2 -3
  6. package/dist/ds/src/rich-text-editor.d.ts +8 -0
  7. package/dist/ds/src/time-field.d.ts +9 -0
  8. package/dist/file-input.js +2 -0
  9. package/dist/index.js +79 -2
  10. package/dist/rich-text-editor.js +4 -0
  11. package/dist/source-hash.txt +1 -0
  12. package/dist/styles.css +1185 -403
  13. package/dist/theme.css +122 -7
  14. package/dist/time-field.js +2 -0
  15. package/dist/ui/src/components/edyn/animated-number/animated-number.d.ts +30 -0
  16. package/dist/ui/src/components/edyn/animated-number/animated-number.js +108 -0
  17. package/dist/ui/src/components/edyn/animated-number/animated-number.js.map +1 -0
  18. package/dist/ui/src/components/edyn/animated-number/animated-number.test.d.ts +9 -0
  19. package/dist/ui/src/components/edyn/animated-number/index.d.ts +1 -0
  20. package/dist/ui/src/components/edyn/audio-player/audio-player.d.ts +3 -2
  21. package/dist/ui/src/components/edyn/audio-player/audio-player.js +86 -0
  22. package/dist/ui/src/components/edyn/audio-player/audio-player.js.map +1 -0
  23. package/dist/ui/src/components/edyn/date-picker/date-picker.d.ts +86 -0
  24. package/dist/ui/src/components/edyn/date-picker/date-picker.js +302 -0
  25. package/dist/ui/src/components/edyn/date-picker/date-picker.js.map +1 -0
  26. package/dist/ui/src/components/edyn/date-picker/date-picker.state.test.d.ts +9 -0
  27. package/dist/ui/src/components/edyn/date-picker/date-text.d.ts +40 -0
  28. package/dist/ui/src/components/edyn/date-picker/date-text.js +105 -0
  29. package/dist/ui/src/components/edyn/date-picker/date-text.js.map +1 -0
  30. package/dist/ui/src/components/edyn/date-picker/index.d.ts +2 -0
  31. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.d.ts +28 -0
  32. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js +70 -0
  33. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js.map +1 -0
  34. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.test.d.ts +9 -0
  35. package/dist/ui/src/components/edyn/date-range-picker/index.d.ts +1 -0
  36. package/dist/ui/src/components/edyn/file-input/file-input.d.ts +90 -0
  37. package/dist/ui/src/components/edyn/file-input/file-input.js +261 -0
  38. package/dist/ui/src/components/edyn/file-input/file-input.js.map +1 -0
  39. package/dist/ui/src/components/edyn/file-input/file-input.test.d.ts +8 -0
  40. package/dist/ui/src/components/edyn/file-input/index.d.ts +1 -0
  41. package/dist/ui/src/components/edyn/initials-avatar/index.d.ts +1 -0
  42. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.d.ts +54 -0
  43. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js +86 -0
  44. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js.map +1 -0
  45. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.test.d.ts +10 -0
  46. package/dist/ui/src/components/edyn/multi-select/index.d.ts +1 -0
  47. package/dist/ui/src/components/edyn/multi-select/multi-select.d.ts +117 -0
  48. package/dist/ui/src/components/edyn/multi-select/multi-select.js +342 -0
  49. package/dist/ui/src/components/edyn/multi-select/multi-select.js.map +1 -0
  50. package/dist/ui/src/components/edyn/multi-select/multi-select.test.d.ts +9 -0
  51. package/dist/ui/src/components/edyn/presence/index.d.ts +1 -0
  52. package/dist/ui/src/components/edyn/presence/presence.d.ts +15 -0
  53. package/dist/ui/src/components/edyn/presence/presence.js +58 -0
  54. package/dist/ui/src/components/edyn/presence/presence.js.map +1 -0
  55. package/dist/ui/src/components/edyn/presence/presence.test.d.ts +8 -0
  56. package/dist/ui/src/components/edyn/progress-line/index.d.ts +1 -0
  57. package/dist/ui/src/components/edyn/progress-line/progress-line.d.ts +23 -0
  58. package/dist/ui/src/components/edyn/progress-line/progress-line.js +100 -0
  59. package/dist/ui/src/components/edyn/progress-line/progress-line.js.map +1 -0
  60. package/dist/ui/src/components/edyn/progress-line/progress-line.test.d.ts +9 -0
  61. package/dist/ui/src/components/edyn/rich-text-content/allow-list.d.ts +11 -0
  62. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js +37 -0
  63. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js.map +1 -0
  64. package/dist/ui/src/components/edyn/rich-text-content/index.d.ts +2 -0
  65. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.d.ts +22 -0
  66. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js +124 -0
  67. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js.map +1 -0
  68. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.test.d.ts +8 -0
  69. package/dist/ui/src/components/edyn/rich-text-editor/extensions.d.ts +18 -0
  70. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js +124 -0
  71. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js.map +1 -0
  72. package/dist/ui/src/components/edyn/rich-text-editor/index.d.ts +3 -0
  73. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.d.ts +17 -0
  74. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js +232 -0
  75. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js.map +1 -0
  76. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.d.ts +53 -0
  77. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js +244 -0
  78. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js.map +1 -0
  79. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.test.d.ts +6 -0
  80. package/dist/ui/src/components/edyn/rich-text-editor/serialize.d.ts +13 -0
  81. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js +55 -0
  82. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js.map +1 -0
  83. package/dist/ui/src/components/edyn/rich-text-editor/sync.d.ts +19 -0
  84. package/dist/ui/src/components/edyn/rich-text-editor/sync.js +34 -0
  85. package/dist/ui/src/components/edyn/rich-text-editor/sync.js.map +1 -0
  86. package/dist/ui/src/components/edyn/rich-text-editor/sync.test.d.ts +11 -0
  87. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.d.ts +20 -0
  88. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js +235 -0
  89. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js.map +1 -0
  90. package/dist/ui/src/components/edyn/rich-text-editor/types.d.ts +68 -0
  91. package/dist/ui/src/components/edyn/rich-text-editor/types.js +26 -0
  92. package/dist/ui/src/components/edyn/rich-text-editor/types.js.map +1 -0
  93. package/dist/ui/src/components/edyn/time-field/index.d.ts +1 -0
  94. package/dist/ui/src/components/edyn/time-field/time-field.d.ts +85 -0
  95. package/dist/ui/src/components/edyn/time-field/time-field.js +337 -0
  96. package/dist/ui/src/components/edyn/time-field/time-field.js.map +1 -0
  97. package/dist/ui/src/components/edyn/time-field/time-field.test.d.ts +8 -0
  98. package/dist/ui/src/components/edyn/video-player/video-player.d.ts +2 -2
  99. package/dist/ui/src/components/edyn/video-player/video-player.js +132 -0
  100. package/dist/ui/src/components/edyn/video-player/video-player.js.map +1 -0
  101. package/dist/ui/src/components/forwarded-props.test.d.ts +8 -0
  102. package/dist/ui/src/components/ui/accordion/accordion.d.ts +9 -8
  103. package/dist/ui/src/components/ui/accordion/accordion.js +83 -0
  104. package/dist/ui/src/components/ui/accordion/accordion.js.map +1 -0
  105. package/dist/ui/src/components/ui/alert/alert.js +47 -0
  106. package/dist/ui/src/components/ui/alert/alert.js.map +1 -0
  107. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js +97 -0
  108. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js.map +1 -0
  109. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js +15 -0
  110. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js.map +1 -0
  111. package/dist/ui/src/components/ui/attachment/attachment.d.ts +1 -1
  112. package/dist/ui/src/components/ui/attachment/attachment.js +105 -0
  113. package/dist/ui/src/components/ui/attachment/attachment.js.map +1 -0
  114. package/dist/ui/src/components/ui/avatar/avatar.js +51 -0
  115. package/dist/ui/src/components/ui/avatar/avatar.js.map +1 -0
  116. package/dist/ui/src/components/ui/badge/badge.d.ts +1 -1
  117. package/dist/ui/src/components/ui/badge/badge.js +47 -0
  118. package/dist/ui/src/components/ui/badge/badge.js.map +1 -0
  119. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js +73 -0
  120. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js.map +1 -0
  121. package/dist/ui/src/components/ui/bubble/bubble.js +74 -0
  122. package/dist/ui/src/components/ui/bubble/bubble.js.map +1 -0
  123. package/dist/ui/src/components/ui/button/button.behavior.test.d.ts +8 -0
  124. package/dist/ui/src/components/ui/button/button.d.ts +1 -1
  125. package/dist/ui/src/components/ui/button/button.js +93 -0
  126. package/dist/ui/src/components/ui/button/button.js.map +1 -0
  127. package/dist/ui/src/components/ui/button-group/button-group.js +37 -0
  128. package/dist/ui/src/components/ui/button-group/button-group.js.map +1 -0
  129. package/dist/ui/src/components/ui/calendar/calendar.behavior.test.d.ts +9 -0
  130. package/dist/ui/src/components/ui/calendar/calendar.d.ts +1 -1
  131. package/dist/ui/src/components/ui/calendar/calendar.js +141 -0
  132. package/dist/ui/src/components/ui/calendar/calendar.js.map +1 -0
  133. package/dist/ui/src/components/ui/card/card.js +57 -0
  134. package/dist/ui/src/components/ui/card/card.js.map +1 -0
  135. package/dist/ui/src/components/ui/carousel/carousel.js +136 -0
  136. package/dist/ui/src/components/ui/carousel/carousel.js.map +1 -0
  137. package/dist/ui/src/components/ui/chart/chart.js +168 -0
  138. package/dist/ui/src/components/ui/chart/chart.js.map +1 -0
  139. package/dist/ui/src/components/ui/checkbox/checkbox.js +21 -0
  140. package/dist/ui/src/components/ui/checkbox/checkbox.js.map +1 -0
  141. package/dist/ui/src/components/ui/collapsible/collapsible.js +26 -0
  142. package/dist/ui/src/components/ui/collapsible/collapsible.js.map +1 -0
  143. package/dist/ui/src/components/ui/combobox/combobox.d.ts +15 -1
  144. package/dist/ui/src/components/ui/combobox/combobox.js +111 -0
  145. package/dist/ui/src/components/ui/combobox/combobox.js.map +1 -0
  146. package/dist/ui/src/components/ui/command/command.d.ts +17 -1
  147. package/dist/ui/src/components/ui/command/command.js +118 -0
  148. package/dist/ui/src/components/ui/command/command.js.map +1 -0
  149. package/dist/ui/src/components/ui/context-menu/context-menu.d.ts +1 -1
  150. package/dist/ui/src/components/ui/context-menu/context-menu.js +145 -0
  151. package/dist/ui/src/components/ui/context-menu/context-menu.js.map +1 -0
  152. package/dist/ui/src/components/ui/dialog/dialog.js +94 -0
  153. package/dist/ui/src/components/ui/dialog/dialog.js.map +1 -0
  154. package/dist/ui/src/components/ui/direction/direction.js +2 -0
  155. package/dist/ui/src/components/ui/drawer/drawer.js +88 -0
  156. package/dist/ui/src/components/ui/drawer/drawer.js.map +1 -0
  157. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.d.ts +12 -1
  158. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js +159 -0
  159. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
  160. package/dist/ui/src/components/ui/empty/empty.js +61 -0
  161. package/dist/ui/src/components/ui/empty/empty.js.map +1 -0
  162. package/dist/ui/src/components/ui/field/field.js +36 -0
  163. package/dist/ui/src/components/ui/field/field.js.map +1 -0
  164. package/dist/ui/src/components/ui/hover-card/hover-card.js +39 -0
  165. package/dist/ui/src/components/ui/hover-card/hover-card.js.map +1 -0
  166. package/dist/ui/src/components/ui/indicator/indicator.js +79 -0
  167. package/dist/ui/src/components/ui/indicator/indicator.js.map +1 -0
  168. package/dist/ui/src/components/ui/input/input.js +16 -0
  169. package/dist/ui/src/components/ui/input/input.js.map +1 -0
  170. package/dist/ui/src/components/ui/input-group/input-group.d.ts +1 -1
  171. package/dist/ui/src/components/ui/input-group/input-group.js +77 -0
  172. package/dist/ui/src/components/ui/input-group/input-group.js.map +1 -0
  173. package/dist/ui/src/components/ui/input-otp/input-otp.js +48 -0
  174. package/dist/ui/src/components/ui/input-otp/input-otp.js.map +1 -0
  175. package/dist/ui/src/components/ui/item/item.d.ts +1 -1
  176. package/dist/ui/src/components/ui/item/item.js +122 -0
  177. package/dist/ui/src/components/ui/item/item.js.map +1 -0
  178. package/dist/ui/src/components/ui/kbd/kbd.js +21 -0
  179. package/dist/ui/src/components/ui/kbd/kbd.js.map +1 -0
  180. package/dist/ui/src/components/ui/label/label.js +14 -0
  181. package/dist/ui/src/components/ui/label/label.js.map +1 -0
  182. package/dist/ui/src/components/ui/marker/marker.js +44 -0
  183. package/dist/ui/src/components/ui/marker/marker.js.map +1 -0
  184. package/dist/ui/src/components/ui/menubar/menubar.js +140 -0
  185. package/dist/ui/src/components/ui/menubar/menubar.js.map +1 -0
  186. package/dist/ui/src/components/ui/message/message.js +50 -0
  187. package/dist/ui/src/components/ui/message/message.js.map +1 -0
  188. package/dist/ui/src/components/ui/message-scroller/message-scroller.js +61 -0
  189. package/dist/ui/src/components/ui/message-scroller/message-scroller.js.map +1 -0
  190. package/dist/ui/src/components/ui/native-select/native-select.js +39 -0
  191. package/dist/ui/src/components/ui/native-select/native-select.js.map +1 -0
  192. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js +87 -0
  193. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js.map +1 -0
  194. package/dist/ui/src/components/ui/pagination/pagination.d.ts +3 -2
  195. package/dist/ui/src/components/ui/pagination/pagination.js +104 -0
  196. package/dist/ui/src/components/ui/pagination/pagination.js.map +1 -0
  197. package/dist/ui/src/components/ui/popover/popover.d.ts +1 -1
  198. package/dist/ui/src/components/ui/popover/popover.js +59 -0
  199. package/dist/ui/src/components/ui/popover/popover.js.map +1 -0
  200. package/dist/ui/src/components/ui/progress/progress.behavior.test.d.ts +8 -0
  201. package/dist/ui/src/components/ui/progress/progress.d.ts +43 -1
  202. package/dist/ui/src/components/ui/progress/progress.js +70 -0
  203. package/dist/ui/src/components/ui/progress/progress.js.map +1 -0
  204. package/dist/ui/src/components/ui/questionnaire/questionnaire.js +171 -0
  205. package/dist/ui/src/components/ui/questionnaire/questionnaire.js.map +1 -0
  206. package/dist/ui/src/components/ui/radio-group/radio-group.js +29 -0
  207. package/dist/ui/src/components/ui/radio-group/radio-group.js.map +1 -0
  208. package/dist/ui/src/components/ui/resizable/resizable.js +29 -0
  209. package/dist/ui/src/components/ui/resizable/resizable.js.map +1 -0
  210. package/dist/ui/src/components/ui/scroll-area/index.d.ts +1 -0
  211. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.d.ts +13 -0
  212. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.js +69 -0
  213. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.js.map +1 -0
  214. package/dist/ui/src/components/ui/scroll-area/scroll-area.behavior.test.d.ts +12 -0
  215. package/dist/ui/src/components/ui/scroll-area/scroll-area.d.ts +57 -6
  216. package/dist/ui/src/components/ui/scroll-area/scroll-area.js +155 -0
  217. package/dist/ui/src/components/ui/scroll-area/scroll-area.js.map +1 -0
  218. package/dist/ui/src/components/ui/select/select.js +97 -0
  219. package/dist/ui/src/components/ui/select/select.js.map +1 -0
  220. package/dist/ui/src/components/ui/separator/separator.behavior.test.d.ts +14 -0
  221. package/dist/ui/src/components/ui/separator/separator.d.ts +14 -0
  222. package/dist/ui/src/components/ui/separator/separator.js +30 -0
  223. package/dist/ui/src/components/ui/separator/separator.js.map +1 -0
  224. package/dist/ui/src/components/ui/sheet/sheet.d.ts +8 -0
  225. package/dist/ui/src/components/ui/sheet/sheet.js +99 -0
  226. package/dist/ui/src/components/ui/sheet/sheet.js.map +1 -0
  227. package/dist/ui/src/components/ui/sidebar/sidebar.js +383 -0
  228. package/dist/ui/src/components/ui/sidebar/sidebar.js.map +1 -0
  229. package/dist/ui/src/components/ui/skeleton/skeleton.js +14 -0
  230. package/dist/ui/src/components/ui/skeleton/skeleton.js.map +1 -0
  231. package/dist/ui/src/components/ui/slider/slider.js +49 -0
  232. package/dist/ui/src/components/ui/slider/slider.js.map +1 -0
  233. package/dist/ui/src/components/ui/spinner/spinner.js +28 -0
  234. package/dist/ui/src/components/ui/spinner/spinner.js.map +1 -0
  235. package/dist/ui/src/components/ui/switch/switch.js +20 -0
  236. package/dist/ui/src/components/ui/switch/switch.js.map +1 -0
  237. package/dist/ui/src/components/ui/table/table.behavior.test.d.ts +4 -5
  238. package/dist/ui/src/components/ui/table/table.d.ts +15 -1
  239. package/dist/ui/src/components/ui/table/table.js +81 -0
  240. package/dist/ui/src/components/ui/table/table.js.map +1 -0
  241. package/dist/ui/src/components/ui/tabs/tabs.d.ts +9 -8
  242. package/dist/ui/src/components/ui/tabs/tabs.js +50 -0
  243. package/dist/ui/src/components/ui/tabs/tabs.js.map +1 -0
  244. package/dist/ui/src/components/ui/textarea/textarea.js +14 -0
  245. package/dist/ui/src/components/ui/textarea/textarea.js.map +1 -0
  246. package/dist/ui/src/components/ui/toast/toast.js +124 -0
  247. package/dist/ui/src/components/ui/toast/toast.js.map +1 -0
  248. package/dist/ui/src/components/ui/toggle/toggle.js +37 -0
  249. package/dist/ui/src/components/ui/toggle/toggle.js.map +1 -0
  250. package/dist/ui/src/components/ui/toggle-group/toggle-group.js +56 -0
  251. package/dist/ui/src/components/ui/toggle-group/toggle-group.js.map +1 -0
  252. package/dist/ui/src/components/ui/tooltip/tooltip.js +43 -0
  253. package/dist/ui/src/components/ui/tooltip/tooltip.js.map +1 -0
  254. package/dist/ui/src/hooks/use-media-player.js +140 -0
  255. package/dist/ui/src/hooks/use-media-player.js.map +1 -0
  256. package/dist/ui/src/hooks/use-merged-refs.js +18 -0
  257. package/dist/ui/src/hooks/use-merged-refs.js.map +1 -0
  258. package/dist/ui/src/hooks/use-mobile.js +20 -0
  259. package/dist/ui/src/hooks/use-mobile.js.map +1 -0
  260. package/dist/ui/src/index.d.ts +8 -0
  261. package/dist/ui/src/lib/first-weekday.d.ts +6 -0
  262. package/dist/ui/src/lib/first-weekday.js +34 -0
  263. package/dist/ui/src/lib/first-weekday.js.map +1 -0
  264. package/dist/ui/src/lib/focus-guards.d.ts +2 -0
  265. package/dist/ui/src/lib/focus-guards.js +52 -0
  266. package/dist/ui/src/lib/focus-guards.js.map +1 -0
  267. package/dist/ui/src/lib/focus-ring.test.d.ts +8 -0
  268. package/dist/ui/src/lib/popup-list.d.ts +75 -0
  269. package/dist/ui/src/lib/popup-list.js +48 -0
  270. package/dist/ui/src/lib/popup-list.js.map +1 -0
  271. package/dist/ui/src/lib/popup-list.test.d.ts +10 -0
  272. package/dist/ui/src/lib/utils.js +21 -0
  273. package/dist/ui/src/lib/utils.js.map +1 -0
  274. package/package.json +36 -8
  275. package/dist/chunks/toggle-group-ByNq8g7H.js +0 -4263
  276. package/dist/chunks/toggle-group-ByNq8g7H.js.map +0 -1
  277. package/dist/dom/src/context.d.ts +0 -34
  278. package/dist/dom/src/define-element.d.ts +0 -11
  279. package/dist/dom/src/field-control.d.ts +0 -5
  280. package/dist/dom/src/index.d.ts +0 -6
  281. package/dist/dom/src/mode.d.ts +0 -8
  282. package/dist/dom/src/styles.d.ts +0 -6
  283. package/dist/dom/src/theme-state.d.ts +0 -1
  284. package/dist/dom/src/types.d.ts +0 -65
  285. package/dist/ds/src/elements.d.ts +0 -12
  286. package/dist/elements/src/edx-accordion.d.ts +0 -14
  287. package/dist/elements/src/edx-accordion.test.d.ts +0 -1
  288. package/dist/elements/src/edx-alert.d.ts +0 -14
  289. package/dist/elements/src/edx-audio-player.d.ts +0 -11
  290. package/dist/elements/src/edx-avatar.d.ts +0 -10
  291. package/dist/elements/src/edx-badge.d.ts +0 -12
  292. package/dist/elements/src/edx-breadcrumb.d.ts +0 -11
  293. package/dist/elements/src/edx-button-group.d.ts +0 -7
  294. package/dist/elements/src/edx-button.d.ts +0 -20
  295. package/dist/elements/src/edx-calendar.d.ts +0 -21
  296. package/dist/elements/src/edx-card.d.ts +0 -8
  297. package/dist/elements/src/edx-checkbox.d.ts +0 -18
  298. package/dist/elements/src/edx-combobox.d.ts +0 -28
  299. package/dist/elements/src/edx-content-components.d.ts +0 -2
  300. package/dist/elements/src/edx-dialog.d.ts +0 -20
  301. package/dist/elements/src/edx-drawer.d.ts +0 -21
  302. package/dist/elements/src/edx-dropdown-menu.d.ts +0 -29
  303. package/dist/elements/src/edx-field.d.ts +0 -9
  304. package/dist/elements/src/edx-field.test.d.ts +0 -1
  305. package/dist/elements/src/edx-indicator.d.ts +0 -14
  306. package/dist/elements/src/edx-input-group.d.ts +0 -32
  307. package/dist/elements/src/edx-input-otp.d.ts +0 -19
  308. package/dist/elements/src/edx-input.d.ts +0 -31
  309. package/dist/elements/src/edx-interactive-components.d.ts +0 -2
  310. package/dist/elements/src/edx-label.d.ts +0 -6
  311. package/dist/elements/src/edx-pagination.d.ts +0 -8
  312. package/dist/elements/src/edx-popover.d.ts +0 -24
  313. package/dist/elements/src/edx-progress.d.ts +0 -10
  314. package/dist/elements/src/edx-radio-group.d.ts +0 -22
  315. package/dist/elements/src/edx-radio-group.test.d.ts +0 -1
  316. package/dist/elements/src/edx-scroll-area.d.ts +0 -15
  317. package/dist/elements/src/edx-scroll-area.test.d.ts +0 -1
  318. package/dist/elements/src/edx-select.d.ts +0 -34
  319. package/dist/elements/src/edx-separator.d.ts +0 -10
  320. package/dist/elements/src/edx-skeleton.d.ts +0 -8
  321. package/dist/elements/src/edx-slider.d.ts +0 -17
  322. package/dist/elements/src/edx-slider.test.d.ts +0 -1
  323. package/dist/elements/src/edx-switch.d.ts +0 -18
  324. package/dist/elements/src/edx-table.d.ts +0 -13
  325. package/dist/elements/src/edx-table.test.d.ts +0 -1
  326. package/dist/elements/src/edx-tabs.d.ts +0 -15
  327. package/dist/elements/src/edx-tabs.test.d.ts +0 -1
  328. package/dist/elements/src/edx-textarea.d.ts +0 -25
  329. package/dist/elements/src/edx-toggle-group.d.ts +0 -27
  330. package/dist/elements/src/edx-toggle-group.test.d.ts +0 -1
  331. package/dist/elements/src/edx-toggle.d.ts +0 -18
  332. package/dist/elements/src/edx-tooltip.d.ts +0 -28
  333. package/dist/elements/src/edx-video-player.d.ts +0 -16
  334. package/dist/elements/src/field-control-bridge.d.ts +0 -7
  335. package/dist/elements/src/index.d.ts +0 -14
  336. package/dist/elements/src/projected-content.test.d.ts +0 -1
  337. package/dist/elements/src/registry.d.ts +0 -39
  338. package/dist/elements/src/registry.test.d.ts +0 -1
  339. package/dist/elements.js +0 -4020
  340. package/dist/elements.js.map +0 -1
  341. /package/dist/{dom/src/define-element.test.d.ts → ui/src/components/edyn/date-picker/date-text.test.d.ts} +0 -0
  342. /package/dist/{dom/src/native-slot.test.d.ts → ui/src/lib/first-weekday.test.d.ts} +0 -0
@@ -1,4263 +0,0 @@
1
- import { Button } from "@base-ui/react/button";
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- import { cva } from "class-variance-authority";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { Slider } from "@base-ui/react/slider";
7
- import * as React from "react";
8
- import { createContext, useCallback, useContext, useEffect, useRef } from "react";
9
- import { IconAlertOctagon, IconAlertTriangle, IconArrowDown, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconCircleCheck, IconDots, IconInfoCircle, IconLayoutSidebar, IconLoader, IconMaximize, IconMinus, IconPlayerPauseFilled, IconPlayerPlayFilled, IconSearch, IconSelector, IconVolume, IconVolumeOff, IconX } from "@tabler/icons-react";
10
- import { Accordion } from "@base-ui/react/accordion";
11
- import { AlertDialog } from "@base-ui/react/alert-dialog";
12
- import { mergeProps } from "@base-ui/react/merge-props";
13
- import { useRender } from "@base-ui/react/use-render";
14
- import { Avatar } from "@base-ui/react/avatar";
15
- import { DayPicker, getDefaultClassNames } from "react-day-picker";
16
- import useEmblaCarousel from "embla-carousel-react";
17
- import * as RechartsPrimitive from "recharts";
18
- import { Checkbox } from "@base-ui/react/checkbox";
19
- import { Collapsible } from "@base-ui/react/collapsible";
20
- import { Combobox } from "@base-ui/react/combobox";
21
- import { Command } from "cmdk";
22
- import { Dialog } from "@base-ui/react/dialog";
23
- import { Input } from "@base-ui/react/input";
24
- import { ContextMenu } from "@base-ui/react/context-menu";
25
- import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
26
- import { Menu } from "@base-ui/react/menu";
27
- import { Field } from "@base-ui/react/field";
28
- import { PreviewCard } from "@base-ui/react/preview-card";
29
- import { OTPInput, OTPInputContext } from "input-otp";
30
- import { Separator } from "@base-ui/react/separator";
31
- import { Menubar } from "@base-ui/react/menubar";
32
- import { MessageScroller, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
33
- import { NavigationMenu } from "@base-ui/react/navigation-menu";
34
- import { Popover } from "@base-ui/react/popover";
35
- import { Progress } from "@base-ui/react/progress";
36
- import { Questionnaire } from "@shadcn/react/questionnaire";
37
- import { Radio } from "@base-ui/react/radio";
38
- import { RadioGroup } from "@base-ui/react/radio-group";
39
- import * as ResizablePrimitive from "react-resizable-panels";
40
- import { ScrollArea } from "@base-ui/react/scroll-area";
41
- import { Select } from "@base-ui/react/select";
42
- import { Tooltip } from "@base-ui/react/tooltip";
43
- import { Switch } from "@base-ui/react/switch";
44
- import { Tabs } from "@base-ui/react/tabs";
45
- import { Toast } from "@base-ui/react/toast";
46
- import { Toggle } from "@base-ui/react/toggle";
47
- import { ToggleGroup } from "@base-ui/react/toggle-group";
48
- //#region ../ui/src/lib/utils.ts
49
- var cn = (...inputs) => twMerge(clsx(inputs));
50
- /**
51
- * Normalise a size prop to a CSS length.
52
- *
53
- * Bare numbers become px, which is also what a bare numeric *string* means: an
54
- * element attribute arrives as a string, so `width="480"` and `width={480}` have
55
- * to land on the same value. Anything with a unit, a percentage or a keyword
56
- * passes through untouched.
57
- */
58
- var cssLength = (value) => {
59
- if (value == null || value === "") return;
60
- if (typeof value === "number") return Number.isFinite(value) ? `${value}px` : void 0;
61
- return /^-?\d*\.?\d+$/.test(value.trim()) ? `${value.trim()}px` : value;
62
- };
63
- //#endregion
64
- //#region ../ui/src/components/ui/button/button.tsx
65
- var buttonVariants = cva("group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all motion-reduce:transition-none motion-reduce:transform-none outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
66
- variants: {
67
- variant: {
68
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
69
- outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
70
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
71
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
72
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/15 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/15 dark:hover:bg-destructive/20 dark:focus-visible:ring-destructive/40",
73
- link: "text-primary underline-offset-4 hover:underline"
74
- },
75
- size: {
76
- default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
77
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
78
- sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
79
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
80
- icon: "size-8",
81
- "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
82
- "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
83
- "icon-lg": "size-9"
84
- }
85
- },
86
- defaultVariants: {
87
- variant: "default",
88
- size: "default"
89
- }
90
- });
91
- var Button$1 = ({ className, variant = "default", size = "default", ...props }) => {
92
- return /* @__PURE__ */ jsx(Button, {
93
- "data-slot": "button",
94
- className: cn(buttonVariants({
95
- variant,
96
- size,
97
- className
98
- }), "in-data-[edx-button-group-position=horizontal-first]:rounded-r-none", "in-data-[edx-button-group-position=horizontal-middle]:rounded-none", "in-data-[edx-button-group-position=horizontal-last]:rounded-l-none", "in-data-[edx-button-group-position=vertical-first]:rounded-b-none", "in-data-[edx-button-group-position=vertical-middle]:rounded-none", "in-data-[edx-button-group-position=vertical-last]:rounded-t-none"),
99
- ...props
100
- });
101
- };
102
- //#endregion
103
- //#region ../ui/src/components/ui/slider/slider.tsx
104
- var Slider$1 = ({ className, value, defaultValue, min, max, step, disabled, onValueChange, onValueCommitted, name, minStepsBetweenValues, "aria-label": ariaLabel, ...props }) => {
105
- const thumbValues = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [value ?? defaultValue ?? min ?? 0];
106
- const thumbs = Array.from({ length: thumbValues.length }, (_, index) => ({
107
- id: `thumb-${index}`,
108
- index
109
- }));
110
- return /* @__PURE__ */ jsx(Slider.Root, {
111
- "data-slot": "slider",
112
- className: cn("relative flex w-full touch-none items-center", className),
113
- value,
114
- defaultValue,
115
- min,
116
- max,
117
- step,
118
- disabled,
119
- onValueChange,
120
- onValueCommitted,
121
- name,
122
- minStepsBetweenValues,
123
- thumbAlignment: "edge",
124
- "aria-label": ariaLabel,
125
- ...props,
126
- children: /* @__PURE__ */ jsxs(Slider.Control, {
127
- "data-slot": "slider-control",
128
- className: "relative flex w-full cursor-pointer touch-none items-center py-3 data-disabled:cursor-not-allowed data-disabled:opacity-50",
129
- children: [/* @__PURE__ */ jsx(Slider.Track, {
130
- "data-slot": "slider-track",
131
- className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted",
132
- children: /* @__PURE__ */ jsx(Slider.Indicator, {
133
- "data-slot": "slider-indicator",
134
- className: "absolute h-full bg-primary"
135
- })
136
- }), thumbs.map((thumb) => /* @__PURE__ */ jsx(Slider.Thumb, {
137
- index: thumb.index,
138
- getAriaLabel: ariaLabel ? () => thumbValues.length > 1 ? `${ariaLabel} ${thumb.index + 1}` : ariaLabel : void 0,
139
- "data-slot": "slider-thumb",
140
- className: "relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow-sm outline-none transition-colors after:absolute after:-inset-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50"
141
- }, thumb.id))]
142
- })
143
- });
144
- };
145
- //#endregion
146
- //#region ../ui/src/hooks/use-media-player.ts
147
- /** `0:00` for anything that is not a finite, non-negative number, so a loading or errored source still renders. */
148
- var formatMediaTime = (seconds) => {
149
- if (!Number.isFinite(seconds) || seconds < 0) return "0:00";
150
- const whole = Math.floor(seconds);
151
- const hours = Math.floor(whole / 3600);
152
- const minutes = Math.floor(whole % 3600 / 60);
153
- const rest = whole % 60;
154
- const padded = `${String(rest).padStart(2, "0")}`;
155
- if (hours > 0) return `${hours}:${String(minutes).padStart(2, "0")}:${padded}`;
156
- return `${minutes}:${padded}`;
157
- };
158
- /**
159
- * Shared playback engine for the Audio and Video players. Both wrap the same
160
- * HTMLMediaElement API, so the state machine lives here once and each component
161
- * owns only its own layout and controls.
162
- */
163
- var useMediaPlayer = (options = {}) => {
164
- const { onPlay, onPause, onEnded, onTimeUpdate } = options;
165
- const refMedia = React.useRef(null);
166
- const [state, setState] = React.useState({
167
- playing: false,
168
- currentTime: 0,
169
- duration: 0,
170
- volume: 1,
171
- muted: false
172
- });
173
- React.useEffect(() => {
174
- const media = refMedia.current;
175
- if (!media) return;
176
- const syncMeta = () => {
177
- setState((previous) => ({
178
- ...previous,
179
- duration: Number.isFinite(media.duration) ? media.duration : 0,
180
- volume: media.volume,
181
- muted: media.muted
182
- }));
183
- };
184
- const handlePlay = () => {
185
- setState((previous) => ({
186
- ...previous,
187
- playing: true
188
- }));
189
- onPlay?.();
190
- };
191
- const handlePause = () => {
192
- setState((previous) => ({
193
- ...previous,
194
- playing: false
195
- }));
196
- onPause?.();
197
- };
198
- const handleEnded = () => {
199
- setState((previous) => ({
200
- ...previous,
201
- playing: false
202
- }));
203
- onEnded?.();
204
- };
205
- const handleTimeUpdate = () => {
206
- setState((previous) => ({
207
- ...previous,
208
- currentTime: media.currentTime
209
- }));
210
- onTimeUpdate?.(media.currentTime, Number.isFinite(media.duration) ? media.duration : 0);
211
- };
212
- const handleVolumeChange = () => {
213
- setState((previous) => ({
214
- ...previous,
215
- volume: media.volume,
216
- muted: media.muted
217
- }));
218
- };
219
- syncMeta();
220
- media.addEventListener("loadedmetadata", syncMeta);
221
- media.addEventListener("durationchange", syncMeta);
222
- media.addEventListener("play", handlePlay);
223
- media.addEventListener("pause", handlePause);
224
- media.addEventListener("ended", handleEnded);
225
- media.addEventListener("timeupdate", handleTimeUpdate);
226
- media.addEventListener("volumechange", handleVolumeChange);
227
- return () => {
228
- media.removeEventListener("loadedmetadata", syncMeta);
229
- media.removeEventListener("durationchange", syncMeta);
230
- media.removeEventListener("play", handlePlay);
231
- media.removeEventListener("pause", handlePause);
232
- media.removeEventListener("ended", handleEnded);
233
- media.removeEventListener("timeupdate", handleTimeUpdate);
234
- media.removeEventListener("volumechange", handleVolumeChange);
235
- };
236
- }, [
237
- onPlay,
238
- onPause,
239
- onEnded,
240
- onTimeUpdate
241
- ]);
242
- const toggle = React.useCallback(() => {
243
- const media = refMedia.current;
244
- if (!media) return;
245
- if (media.paused) {
246
- media.play().catch(() => void 0);
247
- return;
248
- }
249
- media.pause();
250
- }, []);
251
- const seek = React.useCallback((seconds) => {
252
- const media = refMedia.current;
253
- if (!media || !Number.isFinite(seconds)) return;
254
- media.currentTime = seconds;
255
- setState((previous) => ({
256
- ...previous,
257
- currentTime: seconds
258
- }));
259
- }, []);
260
- const changeVolume = React.useCallback((volume) => {
261
- const media = refMedia.current;
262
- if (!media || !Number.isFinite(volume)) return;
263
- const next = Math.min(1, Math.max(0, volume));
264
- media.volume = next;
265
- media.muted = next === 0;
266
- }, []);
267
- const toggleMute = React.useCallback(() => {
268
- const media = refMedia.current;
269
- if (!media) return;
270
- media.muted = !media.muted;
271
- }, []);
272
- return {
273
- ...state,
274
- refMedia,
275
- toggle,
276
- seek,
277
- changeVolume,
278
- toggleMute
279
- };
280
- };
281
- //#endregion
282
- //#region ../ui/src/components/edyn/audio-player/audio-player.tsx
283
- /**
284
- * Compact inline media control for audio content: play/pause, elapsed and total
285
- * time, a seekable timeline, and volume. Four elements in one rounded row, per
286
- * the design-system anatomy.
287
- */
288
- var AudioPlayer = ({ src, muted = false, loop = false, disabled = false, width, className, "aria-label": ariaLabel = "Audio player", onPlay, onPause, onEnded, onTimeUpdate }) => {
289
- const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
290
- onPlay,
291
- onPause,
292
- onEnded,
293
- onTimeUpdate
294
- });
295
- const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
296
- const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
297
- return /* @__PURE__ */ jsxs("div", {
298
- "data-slot": "audio-player",
299
- "data-playing": playing || void 0,
300
- role: "group",
301
- "aria-label": ariaLabel,
302
- style: { width: cssLength(width) },
303
- className: cn("flex h-12 w-full items-center gap-2 rounded-lg bg-muted px-3 py-1.5", className),
304
- children: [
305
- /* @__PURE__ */ jsx(Button$1, {
306
- type: "button",
307
- variant: "ghost",
308
- size: "icon",
309
- disabled,
310
- "aria-label": playing ? "Pause" : "Play",
311
- onClick: toggle,
312
- children: /* @__PURE__ */ jsx(PlaybackIcon, {})
313
- }),
314
- /* @__PURE__ */ jsxs("span", {
315
- "data-slot": "audio-player-time",
316
- className: "shrink-0 text-xs tabular-nums text-foreground/70",
317
- children: [
318
- formatMediaTime(currentTime),
319
- " / ",
320
- formatMediaTime(duration)
321
- ]
322
- }),
323
- /* @__PURE__ */ jsx(Slider$1, {
324
- className: "flex-1 [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1 [&_[data-slot=slider-track]]:bg-foreground/15",
325
- value: Math.min(currentTime, duration || 0),
326
- min: 0,
327
- max: duration || 0,
328
- step: 1,
329
- disabled: disabled || duration === 0,
330
- "aria-label": "Seek",
331
- onValueChange: (next) => {
332
- seek(next);
333
- }
334
- }),
335
- /* @__PURE__ */ jsx(Button$1, {
336
- type: "button",
337
- variant: "ghost",
338
- size: "icon",
339
- disabled,
340
- "aria-label": isMuted ? "Unmute" : "Mute",
341
- onClick: toggleMute,
342
- children: /* @__PURE__ */ jsx(VolumeIcon, {})
343
- }),
344
- /* @__PURE__ */ jsx("audio", {
345
- ref: refMedia,
346
- src,
347
- muted,
348
- loop,
349
- preload: "metadata"
350
- })
351
- ]
352
- });
353
- };
354
- //#endregion
355
- //#region ../ui/src/components/edyn/video-player/video-player.tsx
356
- /**
357
- * Media surface with an overlaid control bar: title and description, elapsed and
358
- * total time, a seekable scrubber, play/pause, volume, and fullscreen.
359
- *
360
- * The root carries the `dark` class so its tokens resolve to the dark palette in
361
- * both themes. Video is dark, so the letterbox and controls must stay dark and
362
- * light-on-dark; this re-scopes existing tokens rather than hardcoding a colour.
363
- */
364
- var VideoPlayer = ({ src, poster, title, description, muted = false, loop = false, disabled = false, width, height, ratio = "auto", className, "aria-label": ariaLabel = "Video player", onPlay, onPause, onEnded, onTimeUpdate }) => {
365
- const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
366
- onPlay,
367
- onPause,
368
- onEnded,
369
- onTimeUpdate
370
- });
371
- const refContainer = React.useRef(null);
372
- const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
373
- const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
374
- const isSizedBox = height != null || ratio !== "auto";
375
- const requestFullscreen = () => {
376
- const container = refContainer.current;
377
- if (!container) return;
378
- if (document.fullscreenElement) {
379
- document.exitFullscreen().catch(() => void 0);
380
- return;
381
- }
382
- container.requestFullscreen?.().catch(() => void 0);
383
- };
384
- return /* @__PURE__ */ jsxs("div", {
385
- ref: refContainer,
386
- "data-slot": "video-player",
387
- "data-playing": playing || void 0,
388
- style: {
389
- width: cssLength(width),
390
- height: cssLength(height),
391
- aspectRatio: height == null && ratio !== "auto" ? ratio : void 0
392
- },
393
- className: cn("dark relative isolate w-full overflow-hidden rounded-lg bg-background", className),
394
- children: [/* @__PURE__ */ jsx("video", {
395
- ref: refMedia,
396
- src,
397
- poster,
398
- muted,
399
- loop,
400
- playsInline: true,
401
- preload: "metadata",
402
- "aria-label": ariaLabel,
403
- className: cn("w-full bg-background", isSizedBox ? "h-full object-contain" : "h-auto")
404
- }), /* @__PURE__ */ jsxs("div", {
405
- className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-0.5 bg-gradient-to-t from-background via-background/75 to-transparent px-3 pt-12 pb-2 text-foreground",
406
- children: [
407
- /* @__PURE__ */ jsxs("div", {
408
- className: "pointer-events-auto flex items-end justify-between gap-4",
409
- children: [/* @__PURE__ */ jsxs("div", {
410
- className: "min-w-0",
411
- children: [title ? /* @__PURE__ */ jsx("p", {
412
- className: "truncate text-sm font-medium text-foreground",
413
- children: title
414
- }) : null, description ? /* @__PURE__ */ jsx("p", {
415
- className: "truncate text-xs text-foreground/70",
416
- children: description
417
- }) : null]
418
- }), /* @__PURE__ */ jsxs("span", {
419
- className: "shrink-0 text-xs tabular-nums text-foreground/70",
420
- children: [
421
- formatMediaTime(currentTime),
422
- " / ",
423
- formatMediaTime(duration)
424
- ]
425
- })]
426
- }),
427
- /* @__PURE__ */ jsx(Slider$1, {
428
- className: "pointer-events-auto [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1",
429
- value: Math.min(currentTime, duration || 0),
430
- min: 0,
431
- max: duration || 0,
432
- step: 1,
433
- disabled: disabled || duration === 0,
434
- "aria-label": "Seek",
435
- onValueChange: (next) => {
436
- seek(next);
437
- }
438
- }),
439
- /* @__PURE__ */ jsxs("div", {
440
- className: "pointer-events-auto flex items-center justify-between",
441
- children: [/* @__PURE__ */ jsxs("div", {
442
- className: "flex items-center gap-1",
443
- children: [/* @__PURE__ */ jsx(Button$1, {
444
- type: "button",
445
- variant: "ghost",
446
- size: "icon",
447
- disabled,
448
- "aria-label": playing ? "Pause" : "Play",
449
- onClick: toggle,
450
- children: /* @__PURE__ */ jsx(PlaybackIcon, {})
451
- }), /* @__PURE__ */ jsx(Button$1, {
452
- type: "button",
453
- variant: "ghost",
454
- size: "icon",
455
- disabled,
456
- "aria-label": isMuted ? "Unmute" : "Mute",
457
- onClick: toggleMute,
458
- children: /* @__PURE__ */ jsx(VolumeIcon, {})
459
- })]
460
- }), /* @__PURE__ */ jsx(Button$1, {
461
- type: "button",
462
- variant: "ghost",
463
- size: "icon",
464
- disabled,
465
- "aria-label": "Fullscreen",
466
- onClick: requestFullscreen,
467
- children: /* @__PURE__ */ jsx(IconMaximize, {})
468
- })]
469
- })
470
- ]
471
- })]
472
- });
473
- };
474
- //#endregion
475
- //#region ../ui/src/components/ui/accordion/accordion.tsx
476
- var Accordion$1 = ({ value, defaultValue, onValueChange, multiple = false, className, children }) => /* @__PURE__ */ jsx(Accordion.Root, {
477
- "data-slot": "accordion",
478
- value,
479
- defaultValue,
480
- onValueChange: (next) => {
481
- onValueChange?.(next);
482
- },
483
- multiple,
484
- className: cn("w-full", className),
485
- children
486
- });
487
- var AccordionItem = ({ value, disabled, className, children }) => /* @__PURE__ */ jsx(Accordion.Item, {
488
- "data-slot": "accordion-item",
489
- value,
490
- disabled,
491
- className: cn("border-b border-border", className),
492
- children
493
- });
494
- var focusSiblingTrigger = (event) => {
495
- if (![
496
- "ArrowDown",
497
- "ArrowUp",
498
- "Home",
499
- "End"
500
- ].includes(event.key)) return;
501
- const root = event.currentTarget.closest("[data-slot=\"accordion\"]");
502
- const triggers = Array.from(root?.querySelectorAll("[data-slot=\"accordion-trigger\"]:not(:disabled)") ?? []);
503
- const currentIndex = triggers.indexOf(event.currentTarget);
504
- if (currentIndex < 0 || triggers.length === 0) return;
505
- event.preventDefault();
506
- let nextIndex = currentIndex;
507
- if (event.key === "Home") nextIndex = 0;
508
- else if (event.key === "End") nextIndex = triggers.length - 1;
509
- else if (event.key === "ArrowDown") nextIndex = (currentIndex + 1) % triggers.length;
510
- else if (event.key === "ArrowUp") nextIndex = (currentIndex - 1 + triggers.length) % triggers.length;
511
- triggers[nextIndex]?.focus();
512
- };
513
- var AccordionTrigger = ({ className, children }) => /* @__PURE__ */ jsx(Accordion.Header, {
514
- "data-slot": "accordion-header",
515
- className: "flex",
516
- children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
517
- "data-slot": "accordion-trigger",
518
- onKeyDown: focusSiblingTrigger,
519
- className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "[&[data-panel-open]>svg]:rotate-180", className),
520
- children: [children, /* @__PURE__ */ jsx("svg", {
521
- xmlns: "http://www.w3.org/2000/svg",
522
- width: "24",
523
- height: "24",
524
- viewBox: "0 0 24 24",
525
- fill: "none",
526
- stroke: "currentColor",
527
- strokeWidth: "2",
528
- strokeLinecap: "round",
529
- strokeLinejoin: "round",
530
- className: "size-4 shrink-0 text-muted-foreground transition-transform duration-200",
531
- "aria-hidden": "true",
532
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
533
- })]
534
- })
535
- });
536
- var AccordionContent = ({ className, children }) => /* @__PURE__ */ jsx(Accordion.Panel, {
537
- keepMounted: true,
538
- className: cn("h-[var(--accordion-panel-height)] overflow-hidden text-sm transition-[height] duration-200 ease-out motion-reduce:transition-none", "data-starting-style:h-0 data-ending-style:h-0", className),
539
- children: /* @__PURE__ */ jsx("div", {
540
- className: "pb-4 pt-0",
541
- children
542
- })
543
- });
544
- //#endregion
545
- //#region ../ui/src/components/ui/alert/alert.tsx
546
- var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
547
- variants: { variant: {
548
- default: "bg-card text-card-foreground",
549
- destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive *:[svg]:text-current",
550
- success: "bg-card text-success *:data-[slot=alert-description]:text-success *:[svg]:text-current",
551
- warning: "bg-card text-warning *:data-[slot=alert-description]:text-warning *:[svg]:text-current",
552
- info: "bg-card text-info *:data-[slot=alert-description]:text-info *:[svg]:text-current"
553
- } },
554
- defaultVariants: { variant: "default" }
555
- });
556
- var Alert = ({ className, variant, ...props }) => {
557
- return /* @__PURE__ */ jsx("div", {
558
- "data-slot": "alert",
559
- role: "alert",
560
- className: cn(alertVariants({ variant }), className),
561
- ...props
562
- });
563
- };
564
- var AlertTitle = ({ className, ...props }) => {
565
- return /* @__PURE__ */ jsx("div", {
566
- "data-slot": "alert-title",
567
- className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
568
- ...props
569
- });
570
- };
571
- var AlertDescription = ({ className, ...props }) => {
572
- return /* @__PURE__ */ jsx("div", {
573
- "data-slot": "alert-description",
574
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
575
- ...props
576
- });
577
- };
578
- var AlertAction = ({ className, ...props }) => {
579
- return /* @__PURE__ */ jsx("div", {
580
- "data-slot": "alert-action",
581
- className: cn("absolute top-2.5 right-2", className),
582
- ...props
583
- });
584
- };
585
- //#endregion
586
- //#region ../ui/src/components/ui/alert-dialog/alert-dialog.tsx
587
- var AlertDialog$1 = ({ ...props }) => {
588
- return /* @__PURE__ */ jsx(AlertDialog.Root, {
589
- "data-slot": "alert-dialog",
590
- ...props
591
- });
592
- };
593
- var AlertDialogTrigger = ({ ...props }) => {
594
- return /* @__PURE__ */ jsx(AlertDialog.Trigger, {
595
- "data-slot": "alert-dialog-trigger",
596
- ...props
597
- });
598
- };
599
- var AlertDialogPortal = ({ ...props }) => {
600
- return /* @__PURE__ */ jsx(AlertDialog.Portal, {
601
- "data-slot": "alert-dialog-portal",
602
- ...props
603
- });
604
- };
605
- var AlertDialogOverlay = ({ className, ...props }) => {
606
- return /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
607
- "data-slot": "alert-dialog-overlay",
608
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
609
- ...props
610
- });
611
- };
612
- var AlertDialogContent = ({ className, size = "default", ...props }) => {
613
- return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog.Popup, {
614
- "data-slot": "alert-dialog-content",
615
- "data-size": size,
616
- className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
617
- ...props
618
- })] });
619
- };
620
- var AlertDialogHeader = ({ className, ...props }) => {
621
- return /* @__PURE__ */ jsx("div", {
622
- "data-slot": "alert-dialog-header",
623
- className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
624
- ...props
625
- });
626
- };
627
- var AlertDialogFooter = ({ className, ...props }) => {
628
- return /* @__PURE__ */ jsx("div", {
629
- "data-slot": "alert-dialog-footer",
630
- className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
631
- ...props
632
- });
633
- };
634
- var AlertDialogMedia = ({ className, ...props }) => {
635
- return /* @__PURE__ */ jsx("div", {
636
- "data-slot": "alert-dialog-media",
637
- className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
638
- ...props
639
- });
640
- };
641
- var AlertDialogTitle = ({ className, ...props }) => {
642
- return /* @__PURE__ */ jsx(AlertDialog.Title, {
643
- "data-slot": "alert-dialog-title",
644
- className: cn("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
645
- ...props
646
- });
647
- };
648
- var AlertDialogDescription = ({ className, ...props }) => {
649
- return /* @__PURE__ */ jsx(AlertDialog.Description, {
650
- "data-slot": "alert-dialog-description",
651
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
652
- ...props
653
- });
654
- };
655
- var AlertDialogAction = ({ className, ...props }) => {
656
- return /* @__PURE__ */ jsx(Button$1, {
657
- "data-slot": "alert-dialog-action",
658
- className: cn(className),
659
- ...props
660
- });
661
- };
662
- var AlertDialogCancel = ({ className, variant = "outline", size = "default", ...props }) => {
663
- return /* @__PURE__ */ jsx(AlertDialog.Close, {
664
- "data-slot": "alert-dialog-cancel",
665
- className: cn(className),
666
- render: /* @__PURE__ */ jsx(Button$1, {
667
- variant,
668
- size
669
- }),
670
- ...props
671
- });
672
- };
673
- //#endregion
674
- //#region ../ui/src/components/ui/aspect-ratio/aspect-ratio.tsx
675
- var AspectRatio = ({ ratio, className, ...props }) => {
676
- return /* @__PURE__ */ jsx("div", {
677
- "data-slot": "aspect-ratio",
678
- style: { "--ratio": ratio },
679
- className: cn("relative aspect-(--ratio)", className),
680
- ...props
681
- });
682
- };
683
- //#endregion
684
- //#region ../ui/src/components/ui/attachment/attachment.tsx
685
- var attachmentVariants = cva("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", { variants: {
686
- size: {
687
- default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
688
- sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
689
- xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
690
- },
691
- orientation: {
692
- horizontal: "min-w-40 items-center",
693
- vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
694
- }
695
- } });
696
- var Attachment = ({ className, state = "done", size = "default", orientation = "horizontal", ...props }) => {
697
- return /* @__PURE__ */ jsx("div", {
698
- "data-slot": "attachment",
699
- "data-state": state,
700
- "data-size": size,
701
- "data-orientation": orientation,
702
- className: cn(attachmentVariants({
703
- size,
704
- orientation
705
- }), className),
706
- ...props
707
- });
708
- };
709
- var attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
710
- variants: { variant: {
711
- icon: "",
712
- image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
713
- } },
714
- defaultVariants: { variant: "icon" }
715
- });
716
- var AttachmentMedia = ({ className, variant = "icon", ...props }) => {
717
- return /* @__PURE__ */ jsx("div", {
718
- "data-slot": "attachment-media",
719
- "data-variant": variant,
720
- className: cn(attachmentMediaVariants({ variant }), className),
721
- ...props
722
- });
723
- };
724
- var AttachmentContent = ({ className, ...props }) => {
725
- return /* @__PURE__ */ jsx("div", {
726
- "data-slot": "attachment-content",
727
- className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
728
- ...props
729
- });
730
- };
731
- var AttachmentTitle = ({ className, ...props }) => {
732
- return /* @__PURE__ */ jsx("span", {
733
- "data-slot": "attachment-title",
734
- className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
735
- ...props
736
- });
737
- };
738
- var AttachmentDescription = ({ className, ...props }) => {
739
- return /* @__PURE__ */ jsx("span", {
740
- "data-slot": "attachment-description",
741
- className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive", "max-w-full", className),
742
- ...props
743
- });
744
- };
745
- var AttachmentActions = ({ className, ...props }) => {
746
- return /* @__PURE__ */ jsx("div", {
747
- "data-slot": "attachment-actions",
748
- className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
749
- ...props
750
- });
751
- };
752
- var AttachmentAction = ({ className, variant, size = "icon-xs", ...props }) => {
753
- return /* @__PURE__ */ jsx(Button$1, {
754
- "data-slot": "attachment-action",
755
- variant: variant ?? "ghost",
756
- size,
757
- className: cn(className),
758
- ...props
759
- });
760
- };
761
- var AttachmentTrigger = ({ className, render, type, ...props }) => {
762
- return useRender({
763
- defaultTagName: "button",
764
- props: mergeProps({
765
- type: render ? type : type ?? "button",
766
- className: cn("absolute inset-0 z-10 outline-none", className)
767
- }, props),
768
- render,
769
- state: { slot: "attachment-trigger" }
770
- });
771
- };
772
- var AttachmentGroup = ({ className, ...props }) => {
773
- return /* @__PURE__ */ jsx("div", {
774
- "data-slot": "attachment-group",
775
- className: cn("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
776
- ...props
777
- });
778
- };
779
- //#endregion
780
- //#region ../ui/src/components/ui/avatar/avatar.tsx
781
- var Avatar$1 = ({ className, size = "default", ...props }) => {
782
- return /* @__PURE__ */ jsx(Avatar.Root, {
783
- "data-slot": "avatar",
784
- "data-size": size,
785
- className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", className),
786
- ...props
787
- });
788
- };
789
- var AvatarImage = ({ className, ...props }) => {
790
- return /* @__PURE__ */ jsx(Avatar.Image, {
791
- "data-slot": "avatar-image",
792
- className: cn("aspect-square size-full rounded-full object-cover", className),
793
- ...props
794
- });
795
- };
796
- var AvatarFallback = ({ className, ...props }) => {
797
- return /* @__PURE__ */ jsx(Avatar.Fallback, {
798
- "data-slot": "avatar-fallback",
799
- className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-foreground/70 group-data-[size=sm]/avatar:text-xs", className),
800
- ...props
801
- });
802
- };
803
- var AvatarBadge = ({ className, ...props }) => {
804
- return /* @__PURE__ */ jsx("span", {
805
- "data-slot": "avatar-badge",
806
- className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
807
- ...props
808
- });
809
- };
810
- var AvatarGroup = ({ className, ...props }) => {
811
- return /* @__PURE__ */ jsx("div", {
812
- "data-slot": "avatar-group",
813
- className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
814
- ...props
815
- });
816
- };
817
- var AvatarGroupCount = ({ className, ...props }) => {
818
- return /* @__PURE__ */ jsx("div", {
819
- "data-slot": "avatar-group-count",
820
- className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-foreground/70 ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
821
- ...props
822
- });
823
- };
824
- //#endregion
825
- //#region ../ui/src/components/ui/badge/badge.tsx
826
- var badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden border border-transparent text-xs font-medium whitespace-nowrap transition-all motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
827
- variants: {
828
- variant: {
829
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
830
- secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
831
- destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
832
- success: "bg-success-ring/40 text-success focus-visible:ring-success/20 [a]:hover:bg-success-ring/60 dark:bg-success-ring/30",
833
- warning: "bg-warning-ring/40 text-warning focus-visible:ring-warning/20 [a]:hover:bg-warning-ring/60 dark:bg-warning-ring/30",
834
- info: "bg-info-ring/40 text-info focus-visible:ring-info/20 [a]:hover:bg-info-ring/60 dark:bg-info-ring/30",
835
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
836
- ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
837
- link: "text-primary underline-offset-4 hover:underline"
838
- },
839
- size: {
840
- default: "h-5 rounded-4xl px-2 py-0.5",
841
- lg: "h-7 rounded-md px-2 py-1"
842
- }
843
- },
844
- defaultVariants: {
845
- variant: "default",
846
- size: "default"
847
- }
848
- });
849
- var Badge = ({ className, variant = "default", size = "default", render, ...props }) => {
850
- return useRender({
851
- defaultTagName: "span",
852
- props: mergeProps({ className: cn(badgeVariants({
853
- variant,
854
- size
855
- }), className) }, props),
856
- render,
857
- state: {
858
- slot: "badge",
859
- variant,
860
- size
861
- }
862
- });
863
- };
864
- //#endregion
865
- //#region ../ui/src/components/ui/breadcrumb/breadcrumb.tsx
866
- var Breadcrumb = ({ className, ...props }) => {
867
- return /* @__PURE__ */ jsx("nav", {
868
- "aria-label": "breadcrumb",
869
- "data-slot": "breadcrumb",
870
- className: cn(className),
871
- ...props
872
- });
873
- };
874
- var BreadcrumbList = ({ className, ...props }) => {
875
- return /* @__PURE__ */ jsx("ol", {
876
- "data-slot": "breadcrumb-list",
877
- className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", className),
878
- ...props
879
- });
880
- };
881
- var BreadcrumbItem = ({ className, ...props }) => {
882
- return /* @__PURE__ */ jsx("li", {
883
- "data-slot": "breadcrumb-item",
884
- className: cn("inline-flex items-center gap-1", className),
885
- ...props
886
- });
887
- };
888
- var BreadcrumbLink = ({ className, render, ...props }) => {
889
- return useRender({
890
- defaultTagName: "a",
891
- props: mergeProps({ className: cn("transition-colors hover:text-foreground", className) }, props),
892
- render,
893
- state: { slot: "breadcrumb-link" }
894
- });
895
- };
896
- var BreadcrumbPage = ({ className, ...props }) => {
897
- return /* @__PURE__ */ jsx("span", {
898
- "data-slot": "breadcrumb-page",
899
- role: "link",
900
- "aria-disabled": "true",
901
- "aria-current": "page",
902
- className: cn("font-normal text-foreground", className),
903
- ...props
904
- });
905
- };
906
- var BreadcrumbSeparator = ({ children, className, ...props }) => {
907
- return /* @__PURE__ */ jsx("li", {
908
- "data-slot": "breadcrumb-separator",
909
- role: "presentation",
910
- "aria-hidden": "true",
911
- className: cn("[&>svg]:size-3.5", className),
912
- ...props,
913
- children: children ?? /* @__PURE__ */ jsx(IconChevronRight, {})
914
- });
915
- };
916
- var BreadcrumbEllipsis = ({ className, ...props }) => {
917
- return /* @__PURE__ */ jsxs("span", {
918
- "data-slot": "breadcrumb-ellipsis",
919
- role: "presentation",
920
- "aria-hidden": "true",
921
- className: cn("flex size-5 items-center justify-center [&>svg]:size-4", className),
922
- ...props,
923
- children: [/* @__PURE__ */ jsx(IconDots, {}), /* @__PURE__ */ jsx("span", {
924
- className: "sr-only",
925
- children: "More"
926
- })]
927
- });
928
- };
929
- //#endregion
930
- //#region ../ui/src/components/ui/bubble/bubble.tsx
931
- var BubbleGroup = ({ className, ...props }) => {
932
- return /* @__PURE__ */ jsx("div", {
933
- "data-slot": "bubble-group",
934
- className: cn("flex min-w-0 flex-col gap-2", className),
935
- ...props
936
- });
937
- };
938
- var bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
939
- variants: { variant: {
940
- default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
941
- secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
942
- muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
943
- tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
944
- outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
945
- ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
946
- destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
947
- } },
948
- defaultVariants: { variant: "default" }
949
- });
950
- var Bubble = ({ variant = "default", align = "start", className, ...props }) => {
951
- return /* @__PURE__ */ jsx("div", {
952
- "data-slot": "bubble",
953
- "data-variant": variant,
954
- "data-align": align,
955
- className: cn(bubbleVariants({ variant }), className),
956
- ...props
957
- });
958
- };
959
- var BubbleContent = ({ className, render, ...props }) => {
960
- return useRender({
961
- defaultTagName: "div",
962
- props: mergeProps({ className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className) }, props),
963
- render,
964
- state: { slot: "bubble-content" }
965
- });
966
- };
967
- var bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
968
- variants: {
969
- side: {
970
- top: "top-0 -translate-y-3/4",
971
- bottom: "bottom-0 translate-y-3/4"
972
- },
973
- align: {
974
- start: "left-3",
975
- end: "right-3"
976
- }
977
- },
978
- defaultVariants: {
979
- side: "bottom",
980
- align: "end"
981
- }
982
- });
983
- var BubbleReactions = ({ side = "bottom", align = "end", className, ...props }) => {
984
- return /* @__PURE__ */ jsx("div", {
985
- "data-slot": "bubble-reactions",
986
- "data-align": align,
987
- "data-side": side,
988
- className: cn(bubbleReactionsVariants({
989
- side,
990
- align
991
- }), className),
992
- ...props
993
- });
994
- };
995
- //#endregion
996
- //#region ../ui/src/components/ui/button-group/button-group.tsx
997
- var ButtonGroupContext = React.createContext("horizontal");
998
- var ButtonGroup = ({ className, orientation = "horizontal", ...props }) => {
999
- return /* @__PURE__ */ jsx(ButtonGroupContext.Provider, {
1000
- value: orientation,
1001
- children: /* @__PURE__ */ jsx("div", {
1002
- "data-slot": "button-group",
1003
- "data-orientation": orientation,
1004
- className: cn("inline-flex items-center", "[&>*:not(:first-child):not(:last-child)]:rounded-none", "data-[orientation=horizontal]:[&>*:first-child]:rounded-r-none", "data-[orientation=horizontal]:[&>*:last-child]:rounded-l-none", "data-[orientation=horizontal]:[&>*:not(:first-child)]:-ml-px", "data-[orientation=vertical]:flex-col", "data-[orientation=vertical]:[&>*:first-child]:rounded-b-none", "data-[orientation=vertical]:[&>*:last-child]:rounded-t-none", "data-[orientation=vertical]:[&>*:not(:first-child)]:-mt-px", "[&>*]:relative [&>*]:z-0 [&>*:focus-visible]:z-10 [&>*:hover]:z-10", className),
1005
- ...props
1006
- })
1007
- });
1008
- };
1009
- var ButtonGroupSeparator = ({ className, ...props }) => {
1010
- const orientation = React.useContext(ButtonGroupContext);
1011
- return /* @__PURE__ */ jsx("span", {
1012
- "data-slot": "button-group-separator",
1013
- role: "separator",
1014
- "aria-orientation": orientation === "horizontal" ? "vertical" : "horizontal",
1015
- className: cn("inline-flex shrink-0 self-stretch bg-border", "in-data-[orientation=horizontal]:w-px", "in-data-[orientation=vertical]:h-px in-data-[orientation=vertical]:self-auto in-data-[orientation=vertical]:w-full", className),
1016
- ...props
1017
- });
1018
- };
1019
- var ButtonGroupText = ({ className, ...props }) => {
1020
- return /* @__PURE__ */ jsx("span", {
1021
- "data-slot": "button-group-text",
1022
- className: cn("inline-flex shrink-0 items-center justify-center rounded-none border border-border bg-muted px-2.5 text-sm text-muted-foreground select-none", className),
1023
- ...props
1024
- });
1025
- };
1026
- //#endregion
1027
- //#region ../ui/src/components/ui/calendar/calendar.tsx
1028
- var Calendar = ({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) => {
1029
- const defaultClassNames = getDefaultClassNames();
1030
- return /* @__PURE__ */ jsx(DayPicker, {
1031
- showOutsideDays,
1032
- className: cn("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
1033
- captionLayout,
1034
- locale,
1035
- formatters: {
1036
- formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
1037
- ...formatters
1038
- },
1039
- classNames: {
1040
- root: cn("w-fit", defaultClassNames.root),
1041
- months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
1042
- month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
1043
- nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
1044
- button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
1045
- button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
1046
- month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
1047
- dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
1048
- dropdown_root: cn("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
1049
- dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
1050
- caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
1051
- month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
1052
- weekdays: cn("flex", defaultClassNames.weekdays),
1053
- weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
1054
- week: cn("mt-2 flex w-full", defaultClassNames.week),
1055
- week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
1056
- week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
1057
- day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day),
1058
- range_start: cn("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
1059
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
1060
- range_end: cn("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
1061
- today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
1062
- outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
1063
- disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
1064
- hidden: cn("invisible", defaultClassNames.hidden),
1065
- ...classNames
1066
- },
1067
- components: {
1068
- Root: ({ className, rootRef, ...props }) => {
1069
- return /* @__PURE__ */ jsx("div", {
1070
- "data-slot": "calendar",
1071
- ref: rootRef,
1072
- className: cn(className),
1073
- ...props
1074
- });
1075
- },
1076
- Chevron: ({ className, orientation, ...props }) => {
1077
- if (orientation === "left") return /* @__PURE__ */ jsx(IconChevronLeft, {
1078
- className: cn("size-4", className),
1079
- ...props
1080
- });
1081
- if (orientation === "right") return /* @__PURE__ */ jsx(IconChevronRight, {
1082
- className: cn("size-4", className),
1083
- ...props
1084
- });
1085
- return /* @__PURE__ */ jsx(IconChevronDown, {
1086
- className: cn("size-4", className),
1087
- ...props
1088
- });
1089
- },
1090
- DayButton: ({ ...props }) => /* @__PURE__ */ jsx(CalendarDayButton, {
1091
- locale,
1092
- ...props
1093
- }),
1094
- WeekNumber: ({ children, ...props }) => {
1095
- return /* @__PURE__ */ jsx("td", {
1096
- ...props,
1097
- children: /* @__PURE__ */ jsx("div", {
1098
- className: "flex size-(--cell-size) items-center justify-center text-center",
1099
- children
1100
- })
1101
- });
1102
- },
1103
- ...components
1104
- },
1105
- ...props
1106
- });
1107
- };
1108
- var CalendarDayButton = ({ className, day, modifiers, locale, ...props }) => {
1109
- const defaultClassNames = getDefaultClassNames();
1110
- const refButton = React.useRef(null);
1111
- React.useEffect(() => {
1112
- if (modifiers.focused) refButton.current?.focus();
1113
- }, [modifiers.focused]);
1114
- return /* @__PURE__ */ jsx(Button$1, {
1115
- ref: refButton,
1116
- variant: "ghost",
1117
- size: "icon",
1118
- "data-day": day.date.toLocaleDateString(locale?.code),
1119
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1120
- "data-range-start": modifiers.range_start,
1121
- "data-range-end": modifiers.range_end,
1122
- "data-range-middle": modifiers.range_middle,
1123
- className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
1124
- ...props
1125
- });
1126
- };
1127
- //#endregion
1128
- //#region ../ui/src/components/ui/card/card.tsx
1129
- var Card = ({ className, size = "default", ...props }) => {
1130
- return /* @__PURE__ */ jsx("div", {
1131
- "data-slot": "card",
1132
- "data-size": size,
1133
- className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
1134
- ...props
1135
- });
1136
- };
1137
- var CardHeader = ({ className, ...props }) => {
1138
- return /* @__PURE__ */ jsx("div", {
1139
- "data-slot": "card-header",
1140
- className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
1141
- ...props
1142
- });
1143
- };
1144
- var CardTitle = ({ className, ...props }) => {
1145
- return /* @__PURE__ */ jsx("div", {
1146
- "data-slot": "card-title",
1147
- className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
1148
- ...props
1149
- });
1150
- };
1151
- var CardDescription = ({ className, ...props }) => {
1152
- return /* @__PURE__ */ jsx("div", {
1153
- "data-slot": "card-description",
1154
- className: cn("text-sm text-muted-foreground", className),
1155
- ...props
1156
- });
1157
- };
1158
- var CardAction = ({ className, ...props }) => {
1159
- return /* @__PURE__ */ jsx("div", {
1160
- "data-slot": "card-action",
1161
- className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
1162
- ...props
1163
- });
1164
- };
1165
- var CardContent = ({ className, ...props }) => {
1166
- return /* @__PURE__ */ jsx("div", {
1167
- "data-slot": "card-content",
1168
- className: cn("px-4 group-data-[size=sm]/card:px-3", className),
1169
- ...props
1170
- });
1171
- };
1172
- var CardFooter = ({ className, ...props }) => {
1173
- return /* @__PURE__ */ jsx("div", {
1174
- "data-slot": "card-footer",
1175
- className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
1176
- ...props
1177
- });
1178
- };
1179
- //#endregion
1180
- //#region ../ui/src/components/ui/carousel/carousel.tsx
1181
- var CarouselContext = React.createContext(null);
1182
- var useCarousel = () => {
1183
- const context = React.useContext(CarouselContext);
1184
- if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1185
- return context;
1186
- };
1187
- var Carousel = ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) => {
1188
- const [carouselRef, api] = useEmblaCarousel({
1189
- ...opts,
1190
- axis: orientation === "horizontal" ? "x" : "y"
1191
- }, plugins);
1192
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1193
- const [canScrollNext, setCanScrollNext] = React.useState(false);
1194
- const onSelect = React.useCallback((api) => {
1195
- if (!api) return;
1196
- setCanScrollPrev(api.canScrollPrev());
1197
- setCanScrollNext(api.canScrollNext());
1198
- }, []);
1199
- const scrollPrev = React.useCallback(() => {
1200
- api?.scrollPrev();
1201
- }, [api]);
1202
- const scrollNext = React.useCallback(() => {
1203
- api?.scrollNext();
1204
- }, [api]);
1205
- const handleKeyDown = React.useCallback((event) => {
1206
- if (event.key === "ArrowLeft") {
1207
- event.preventDefault();
1208
- scrollPrev();
1209
- } else if (event.key === "ArrowRight") {
1210
- event.preventDefault();
1211
- scrollNext();
1212
- }
1213
- }, [scrollPrev, scrollNext]);
1214
- React.useEffect(() => {
1215
- if (!api || !setApi) return;
1216
- setApi(api);
1217
- }, [api, setApi]);
1218
- React.useEffect(() => {
1219
- if (!api) return;
1220
- onSelect(api);
1221
- api.on("reInit", onSelect);
1222
- api.on("select", onSelect);
1223
- return () => {
1224
- api.off("reInit", onSelect);
1225
- api.off("select", onSelect);
1226
- };
1227
- }, [api, onSelect]);
1228
- return /* @__PURE__ */ jsx(CarouselContext.Provider, {
1229
- value: {
1230
- carouselRef,
1231
- api,
1232
- opts,
1233
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
1234
- scrollPrev,
1235
- scrollNext,
1236
- canScrollPrev,
1237
- canScrollNext
1238
- },
1239
- children: /* @__PURE__ */ jsx("div", {
1240
- onKeyDownCapture: handleKeyDown,
1241
- className: cn("relative", className),
1242
- role: "region",
1243
- "aria-roledescription": "carousel",
1244
- "data-slot": "carousel",
1245
- ...props,
1246
- children
1247
- })
1248
- });
1249
- };
1250
- var CarouselContent = ({ className, ...props }) => {
1251
- const { carouselRef, orientation } = useCarousel();
1252
- return /* @__PURE__ */ jsx("div", {
1253
- ref: carouselRef,
1254
- className: "overflow-hidden",
1255
- "data-slot": "carousel-content",
1256
- children: /* @__PURE__ */ jsx("div", {
1257
- className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
1258
- ...props
1259
- })
1260
- });
1261
- };
1262
- var CarouselItem = ({ className, ...props }) => {
1263
- const { orientation } = useCarousel();
1264
- return /* @__PURE__ */ jsx("div", {
1265
- role: "group",
1266
- "aria-roledescription": "slide",
1267
- "data-slot": "carousel-item",
1268
- className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
1269
- ...props
1270
- });
1271
- };
1272
- var CarouselPrevious = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1273
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
1274
- return /* @__PURE__ */ jsxs(Button$1, {
1275
- "data-slot": "carousel-previous",
1276
- variant,
1277
- size,
1278
- className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
1279
- disabled: !canScrollPrev,
1280
- onClick: scrollPrev,
1281
- ...props,
1282
- children: [/* @__PURE__ */ jsx(IconChevronLeft, {}), /* @__PURE__ */ jsx("span", {
1283
- className: "sr-only",
1284
- children: "Previous slide"
1285
- })]
1286
- });
1287
- };
1288
- var CarouselNext = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1289
- const { orientation, scrollNext, canScrollNext } = useCarousel();
1290
- return /* @__PURE__ */ jsxs(Button$1, {
1291
- "data-slot": "carousel-next",
1292
- variant,
1293
- size,
1294
- className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
1295
- disabled: !canScrollNext,
1296
- onClick: scrollNext,
1297
- ...props,
1298
- children: [/* @__PURE__ */ jsx(IconChevronRight, {}), /* @__PURE__ */ jsx("span", {
1299
- className: "sr-only",
1300
- children: "Next slide"
1301
- })]
1302
- });
1303
- };
1304
- //#endregion
1305
- //#region ../ui/src/components/ui/chart/chart.tsx
1306
- var THEMES = {
1307
- light: "",
1308
- dark: ".dark"
1309
- };
1310
- var INITIAL_DIMENSION = {
1311
- width: 320,
1312
- height: 200
1313
- };
1314
- var ChartContext = React.createContext(null);
1315
- var useChart = () => {
1316
- const context = React.useContext(ChartContext);
1317
- if (!context) throw new Error("useChart must be used within a <ChartContainer />");
1318
- return context;
1319
- };
1320
- var ChartContainer = ({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) => {
1321
- const uniqueId = React.useId();
1322
- const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
1323
- const refContainer = React.useRef(null);
1324
- const [hasSize, setHasSize] = React.useState(false);
1325
- React.useLayoutEffect(() => {
1326
- const element = refContainer.current;
1327
- if (!element) return;
1328
- const update = () => {
1329
- const { width, height } = element.getBoundingClientRect();
1330
- setHasSize(width > 0 && height > 0);
1331
- };
1332
- update();
1333
- const observer = new ResizeObserver(update);
1334
- observer.observe(element);
1335
- return () => observer.disconnect();
1336
- }, []);
1337
- return /* @__PURE__ */ jsx(ChartContext.Provider, {
1338
- value: { config },
1339
- children: /* @__PURE__ */ jsxs("div", {
1340
- ref: refContainer,
1341
- "data-slot": "chart",
1342
- "data-chart": chartId,
1343
- className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
1344
- ...props,
1345
- children: [/* @__PURE__ */ jsx(ChartStyle, {
1346
- id: chartId,
1347
- config
1348
- }), hasSize && /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
1349
- initialDimension,
1350
- children
1351
- })]
1352
- })
1353
- });
1354
- };
1355
- var ChartStyle = ({ id, config }) => {
1356
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
1357
- if (!colorConfig.length) return null;
1358
- const css = Object.entries(THEMES).map(([theme, prefix]) => `
1359
- ${prefix} [data-chart=${id}] {
1360
- ${colorConfig.map(([key, itemConfig]) => {
1361
- const color = itemConfig.theme?.[theme] ?? itemConfig.color;
1362
- return color ? ` --color-${key}: ${color};` : null;
1363
- }).join("\n")}
1364
- }
1365
- `).join("\n");
1366
- return /* @__PURE__ */ jsx("style", { children: css });
1367
- };
1368
- var ChartTooltip = RechartsPrimitive.Tooltip;
1369
- var ChartTooltipContent = ({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) => {
1370
- const { config } = useChart();
1371
- const tooltipLabel = React.useMemo(() => {
1372
- if (hideLabel || !payload?.length) return null;
1373
- const [item] = payload;
1374
- const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
1375
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1376
- const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
1377
- if (labelFormatter) return /* @__PURE__ */ jsx("div", {
1378
- className: cn("font-medium", labelClassName),
1379
- children: labelFormatter(value, payload)
1380
- });
1381
- if (!value) return null;
1382
- return /* @__PURE__ */ jsx("div", {
1383
- className: cn("font-medium", labelClassName),
1384
- children: value
1385
- });
1386
- }, [
1387
- label,
1388
- labelFormatter,
1389
- payload,
1390
- hideLabel,
1391
- labelClassName,
1392
- config,
1393
- labelKey
1394
- ]);
1395
- if (!active || !payload?.length) return null;
1396
- const nestLabel = payload.length === 1 && indicator !== "dot";
1397
- return /* @__PURE__ */ jsxs("div", {
1398
- className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
1399
- children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
1400
- className: "grid gap-1.5",
1401
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
1402
- const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
1403
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1404
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
1405
- return /* @__PURE__ */ jsx("div", {
1406
- className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
1407
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
1408
- className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
1409
- "h-2.5 w-2.5": indicator === "dot",
1410
- "w-1": indicator === "line",
1411
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
1412
- "my-0.5": nestLabel && indicator === "dashed"
1413
- }),
1414
- style: {
1415
- "--color-bg": indicatorColor,
1416
- "--color-border": indicatorColor
1417
- }
1418
- }), /* @__PURE__ */ jsxs("div", {
1419
- className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
1420
- children: [/* @__PURE__ */ jsxs("div", {
1421
- className: "grid gap-1.5",
1422
- children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
1423
- className: "text-muted-foreground",
1424
- children: itemConfig?.label ?? item.name
1425
- })]
1426
- }), item.value != null && /* @__PURE__ */ jsx("span", {
1427
- className: "font-mono font-medium text-foreground tabular-nums",
1428
- children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
1429
- })]
1430
- })] })
1431
- }, `${key}-${String(item.value ?? "")}`);
1432
- })
1433
- })]
1434
- });
1435
- };
1436
- var ChartLegend = RechartsPrimitive.Legend;
1437
- var ChartLegendContent = ({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) => {
1438
- const { config } = useChart();
1439
- if (!payload?.length) return null;
1440
- return /* @__PURE__ */ jsx("div", {
1441
- className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
1442
- children: payload.filter((item) => item.type !== "none").map((item) => {
1443
- const key = `${nameKey ?? item.dataKey ?? "value"}`;
1444
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1445
- return /* @__PURE__ */ jsxs("div", {
1446
- className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
1447
- children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
1448
- className: "h-2 w-2 shrink-0 rounded-[2px]",
1449
- style: { backgroundColor: item.color }
1450
- }), itemConfig?.label]
1451
- }, `${key}-${String(item.value ?? "")}`);
1452
- })
1453
- });
1454
- };
1455
- var getPayloadConfigFromPayload = (config, payload, key) => {
1456
- if (typeof payload !== "object" || payload === null) return;
1457
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
1458
- let configLabelKey = key;
1459
- if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
1460
- else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
1461
- return configLabelKey in config ? config[configLabelKey] : config[key];
1462
- };
1463
- //#endregion
1464
- //#region ../ui/src/components/ui/checkbox/checkbox.tsx
1465
- var Checkbox$1 = ({ className, ...props }) => {
1466
- return /* @__PURE__ */ jsx(Checkbox.Root, {
1467
- "data-slot": "checkbox",
1468
- className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
1469
- ...props,
1470
- children: /* @__PURE__ */ jsxs(Checkbox.Indicator, {
1471
- "data-slot": "checkbox-indicator",
1472
- className: "group/checkbox-indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
1473
- children: [/* @__PURE__ */ jsx(IconCheck, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), /* @__PURE__ */ jsx(IconMinus, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })]
1474
- })
1475
- });
1476
- };
1477
- //#endregion
1478
- //#region ../ui/src/components/ui/collapsible/collapsible.tsx
1479
- var Collapsible$1 = ({ ...props }) => {
1480
- return /* @__PURE__ */ jsx(Collapsible.Root, {
1481
- "data-slot": "collapsible",
1482
- ...props
1483
- });
1484
- };
1485
- var CollapsibleTrigger = ({ ...props }) => {
1486
- return /* @__PURE__ */ jsx(Collapsible.Trigger, {
1487
- "data-slot": "collapsible-trigger",
1488
- ...props
1489
- });
1490
- };
1491
- var CollapsibleContent = ({ ...props }) => {
1492
- return /* @__PURE__ */ jsx(Collapsible.Panel, {
1493
- "data-slot": "collapsible-content",
1494
- ...props
1495
- });
1496
- };
1497
- //#endregion
1498
- //#region ../ui/src/components/ui/combobox/combobox.tsx
1499
- var Combobox$1 = ({ ...props }) => {
1500
- return /* @__PURE__ */ jsx(Combobox.Root, {
1501
- "data-slot": "combobox",
1502
- ...props
1503
- });
1504
- };
1505
- var ComboboxInput = ({ className, ...props }) => {
1506
- return /* @__PURE__ */ jsxs(Combobox.InputGroup, {
1507
- "data-slot": "combobox-input-group",
1508
- className: "relative flex w-full items-center",
1509
- children: [/* @__PURE__ */ jsx(Combobox.Input, {
1510
- "data-slot": "combobox-input",
1511
- className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
1512
- ...props
1513
- }), /* @__PURE__ */ jsx(Combobox.Trigger, {
1514
- "data-slot": "combobox-trigger",
1515
- className: "absolute right-2 flex items-center text-muted-foreground disabled:pointer-events-none disabled:opacity-50",
1516
- tabIndex: -1,
1517
- "aria-hidden": true,
1518
- children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
1519
- })]
1520
- });
1521
- };
1522
- var ComboboxContent = ({ className, children, empty, portalContainer, ...props }) => {
1523
- return /* @__PURE__ */ jsx(Combobox.Portal, {
1524
- "data-slot": "combobox-portal",
1525
- container: portalContainer,
1526
- children: /* @__PURE__ */ jsx(Combobox.Positioner, {
1527
- "data-slot": "combobox-positioner",
1528
- sideOffset: 4,
1529
- className: "z-50",
1530
- children: /* @__PURE__ */ jsxs(Combobox.Popup, {
1531
- "data-slot": "combobox-content",
1532
- className: cn("min-w-[var(--anchor-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md outline-none motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
1533
- ...props,
1534
- children: [/* @__PURE__ */ jsx(ComboboxEmpty, { children: empty }), /* @__PURE__ */ jsx(Combobox.List, {
1535
- "data-slot": "combobox-list",
1536
- className: "max-h-60 overflow-y-auto p-1",
1537
- children
1538
- })]
1539
- })
1540
- })
1541
- });
1542
- };
1543
- var ComboboxItem = ({ className, children, ...props }) => {
1544
- return /* @__PURE__ */ jsxs(Combobox.Item, {
1545
- "data-slot": "combobox-item",
1546
- className: cn("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[selected]:font-medium data-disabled:pointer-events-none data-disabled:opacity-50", className),
1547
- ...props,
1548
- children: [/* @__PURE__ */ jsx(Combobox.ItemIndicator, {
1549
- "data-slot": "combobox-item-indicator",
1550
- className: "flex size-4 items-center justify-center",
1551
- children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
1552
- }), /* @__PURE__ */ jsx("span", {
1553
- className: "flex-1",
1554
- children
1555
- })]
1556
- });
1557
- };
1558
- var ComboboxEmpty = ({ className, children, ...props }) => {
1559
- return /* @__PURE__ */ jsx(Combobox.Empty, {
1560
- "data-slot": "combobox-empty",
1561
- className: cn("py-4 text-center text-sm text-muted-foreground empty:py-0", className),
1562
- ...props,
1563
- children: children ?? "No results found."
1564
- });
1565
- };
1566
- //#endregion
1567
- //#region ../ui/src/components/ui/dialog/dialog.tsx
1568
- var Dialog$1 = ({ ...props }) => {
1569
- return /* @__PURE__ */ jsx(Dialog.Root, {
1570
- "data-slot": "dialog",
1571
- ...props
1572
- });
1573
- };
1574
- var DialogTrigger = ({ ...props }) => {
1575
- return /* @__PURE__ */ jsx(Dialog.Trigger, {
1576
- "data-slot": "dialog-trigger",
1577
- ...props
1578
- });
1579
- };
1580
- var DialogPortal = ({ ...props }) => {
1581
- return /* @__PURE__ */ jsx(Dialog.Portal, {
1582
- "data-slot": "dialog-portal",
1583
- ...props
1584
- });
1585
- };
1586
- var DialogClose = ({ ...props }) => {
1587
- return /* @__PURE__ */ jsx(Dialog.Close, {
1588
- "data-slot": "dialog-close",
1589
- ...props
1590
- });
1591
- };
1592
- var DialogOverlay = ({ className, ...props }) => {
1593
- return /* @__PURE__ */ jsx(Dialog.Backdrop, {
1594
- "data-slot": "dialog-overlay",
1595
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
1596
- ...props
1597
- });
1598
- };
1599
- var DialogContent = ({ className, children, showCloseButton = true, ...props }) => {
1600
- return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
1601
- "data-slot": "dialog-content",
1602
- className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
1603
- ...props,
1604
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
1605
- "data-slot": "dialog-close",
1606
- render: /* @__PURE__ */ jsx(Button$1, {
1607
- variant: "ghost",
1608
- className: "absolute top-2 right-2",
1609
- size: "icon-sm"
1610
- }),
1611
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
1612
- className: "sr-only",
1613
- children: "Close"
1614
- })]
1615
- })]
1616
- })] });
1617
- };
1618
- var DialogHeader = ({ className, ...props }) => {
1619
- return /* @__PURE__ */ jsx("div", {
1620
- "data-slot": "dialog-header",
1621
- className: cn("flex flex-col gap-2", className),
1622
- ...props
1623
- });
1624
- };
1625
- var DialogFooter = ({ className, showCloseButton = false, children, ...props }) => {
1626
- return /* @__PURE__ */ jsxs("div", {
1627
- "data-slot": "dialog-footer",
1628
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
1629
- ...props,
1630
- children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
1631
- render: /* @__PURE__ */ jsx(Button$1, { variant: "outline" }),
1632
- children: "Close"
1633
- })]
1634
- });
1635
- };
1636
- var DialogTitle = ({ className, ...props }) => {
1637
- return /* @__PURE__ */ jsx(Dialog.Title, {
1638
- "data-slot": "dialog-title",
1639
- className: cn("text-base leading-none font-medium", className),
1640
- ...props
1641
- });
1642
- };
1643
- var DialogDescription = ({ className, ...props }) => {
1644
- return /* @__PURE__ */ jsx(Dialog.Description, {
1645
- "data-slot": "dialog-description",
1646
- className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
1647
- ...props
1648
- });
1649
- };
1650
- //#endregion
1651
- //#region ../ui/src/components/ui/input/input.tsx
1652
- var Input$1 = ({ className, type, ...props }) => {
1653
- return /* @__PURE__ */ jsx(Input, {
1654
- type,
1655
- "data-slot": "input",
1656
- className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
1657
- ...props
1658
- });
1659
- };
1660
- //#endregion
1661
- //#region ../ui/src/components/ui/textarea/textarea.tsx
1662
- var Textarea = ({ className, ...props }) => {
1663
- return /* @__PURE__ */ jsx("textarea", {
1664
- "data-slot": "textarea",
1665
- className: cn("block min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1.5 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 field-sizing-content resize-y md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
1666
- ...props
1667
- });
1668
- };
1669
- //#endregion
1670
- //#region ../ui/src/components/ui/input-group/input-group.tsx
1671
- var InputGroup = ({ className, ...props }) => {
1672
- return /* @__PURE__ */ jsx("div", {
1673
- "data-slot": "input-group",
1674
- className: cn("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none", "has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto", "has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
1675
- ...props
1676
- });
1677
- };
1678
- var inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-foreground/70 select-none [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
1679
- variants: { align: {
1680
- "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
1681
- "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
1682
- "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
1683
- "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
1684
- } },
1685
- defaultVariants: { align: "inline-start" }
1686
- });
1687
- var InputGroupAddon = ({ className, align = "inline-start", ...props }) => {
1688
- return /* @__PURE__ */ jsx("div", {
1689
- "data-slot": "input-group-addon",
1690
- "data-align": align,
1691
- className: cn(inputGroupAddonVariants({ align }), className),
1692
- onPointerDown: (event) => {
1693
- if (event.target.closest("button")) return;
1694
- event.currentTarget.parentElement?.querySelector("input")?.focus();
1695
- },
1696
- ...props
1697
- });
1698
- };
1699
- var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
1700
- variants: { size: {
1701
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
1702
- sm: "",
1703
- "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
1704
- "icon-sm": "size-8 p-0 has-[>svg]:p-0"
1705
- } },
1706
- defaultVariants: { size: "xs" }
1707
- });
1708
- var InputGroupButton = ({ className, type = "button", variant = "ghost", size = "xs", ...props }) => {
1709
- return /* @__PURE__ */ jsx(Button$1, {
1710
- type,
1711
- "data-size": size,
1712
- variant,
1713
- className: cn(inputGroupButtonVariants({ size }), className),
1714
- ...props
1715
- });
1716
- };
1717
- var InputGroupText = ({ className, ...props }) => {
1718
- return /* @__PURE__ */ jsx("span", {
1719
- className: cn("flex items-center gap-2 text-sm text-foreground/70 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
1720
- ...props
1721
- });
1722
- };
1723
- var InputGroupInput = ({ className, ...props }) => {
1724
- return /* @__PURE__ */ jsx(Input$1, {
1725
- "data-slot": "input-group-control",
1726
- className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
1727
- ...props
1728
- });
1729
- };
1730
- var InputGroupTextarea = ({ className, ...props }) => {
1731
- return /* @__PURE__ */ jsx(Textarea, {
1732
- "data-slot": "input-group-control",
1733
- className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
1734
- ...props
1735
- });
1736
- };
1737
- //#endregion
1738
- //#region ../ui/src/components/ui/command/command.tsx
1739
- var Command$1 = ({ className, ...props }) => {
1740
- return /* @__PURE__ */ jsx(Command, {
1741
- "data-slot": "command",
1742
- className: cn("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", className),
1743
- ...props
1744
- });
1745
- };
1746
- var CommandDialog = ({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) => {
1747
- return /* @__PURE__ */ jsxs(Dialog$1, {
1748
- ...props,
1749
- children: [/* @__PURE__ */ jsxs(DialogHeader, {
1750
- className: "sr-only",
1751
- children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
1752
- }), /* @__PURE__ */ jsx(DialogContent, {
1753
- className: cn("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", className),
1754
- showCloseButton,
1755
- children
1756
- })]
1757
- });
1758
- };
1759
- var CommandInput = ({ className, ...props }) => {
1760
- return /* @__PURE__ */ jsx("div", {
1761
- "data-slot": "command-input-wrapper",
1762
- className: "p-1 pb-0",
1763
- children: /* @__PURE__ */ jsxs(InputGroup, {
1764
- className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
1765
- children: [/* @__PURE__ */ jsx(Command.Input, {
1766
- "data-slot": "command-input",
1767
- className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
1768
- ...props
1769
- }), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(IconSearch, { className: "size-4 shrink-0 opacity-50" }) })]
1770
- })
1771
- });
1772
- };
1773
- var CommandList = ({ className, ...props }) => {
1774
- return /* @__PURE__ */ jsx(Command.List, {
1775
- "data-slot": "command-list",
1776
- className: cn("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
1777
- ...props
1778
- });
1779
- };
1780
- var CommandEmpty = ({ className, ...props }) => {
1781
- return /* @__PURE__ */ jsx(Command.Empty, {
1782
- "data-slot": "command-empty",
1783
- className: cn("py-6 text-center text-sm", className),
1784
- ...props
1785
- });
1786
- };
1787
- var CommandGroup = ({ className, ...props }) => {
1788
- return /* @__PURE__ */ jsx(Command.Group, {
1789
- "data-slot": "command-group",
1790
- className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
1791
- ...props
1792
- });
1793
- };
1794
- var CommandSeparator = ({ className, ...props }) => {
1795
- return /* @__PURE__ */ jsx(Command.Separator, {
1796
- "data-slot": "command-separator",
1797
- className: cn("-mx-1 h-px bg-border", className),
1798
- ...props
1799
- });
1800
- };
1801
- var CommandItem = ({ className, children, ...props }) => {
1802
- return /* @__PURE__ */ jsxs(Command.Item, {
1803
- "data-slot": "command-item",
1804
- className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", className),
1805
- ...props,
1806
- children: [children, /* @__PURE__ */ jsx(IconCheck, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
1807
- });
1808
- };
1809
- var CommandShortcut = ({ className, ...props }) => {
1810
- return /* @__PURE__ */ jsx("span", {
1811
- "data-slot": "command-shortcut",
1812
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
1813
- ...props
1814
- });
1815
- };
1816
- //#endregion
1817
- //#region ../ui/src/components/ui/context-menu/context-menu.tsx
1818
- var ContextMenu$1 = ({ ...props }) => {
1819
- return /* @__PURE__ */ jsx(ContextMenu.Root, {
1820
- "data-slot": "context-menu",
1821
- ...props
1822
- });
1823
- };
1824
- var ContextMenuPortal = ({ ...props }) => {
1825
- return /* @__PURE__ */ jsx(ContextMenu.Portal, {
1826
- "data-slot": "context-menu-portal",
1827
- ...props
1828
- });
1829
- };
1830
- var ContextMenuTrigger = ({ className, ...props }) => {
1831
- return /* @__PURE__ */ jsx(ContextMenu.Trigger, {
1832
- "data-slot": "context-menu-trigger",
1833
- className: cn("select-none", className),
1834
- ...props
1835
- });
1836
- };
1837
- var ContextMenuContent = ({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) => {
1838
- return /* @__PURE__ */ jsx(ContextMenu.Portal, { children: /* @__PURE__ */ jsx(ContextMenu.Positioner, {
1839
- className: "isolate z-50 outline-none",
1840
- align,
1841
- alignOffset,
1842
- side,
1843
- sideOffset,
1844
- children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
1845
- "data-slot": "context-menu-content",
1846
- className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
1847
- ...props
1848
- })
1849
- }) });
1850
- };
1851
- var ContextMenuGroup = ({ ...props }) => {
1852
- return /* @__PURE__ */ jsx(ContextMenu.Group, {
1853
- "data-slot": "context-menu-group",
1854
- ...props
1855
- });
1856
- };
1857
- var ContextMenuLabel = ({ className, inset, ...props }) => {
1858
- return /* @__PURE__ */ jsx(ContextMenu.GroupLabel, {
1859
- "data-slot": "context-menu-label",
1860
- "data-inset": inset,
1861
- className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset=true]:pl-7", className),
1862
- ...props
1863
- });
1864
- };
1865
- var ContextMenuItem = ({ className, inset, variant = "default", ...props }) => {
1866
- return /* @__PURE__ */ jsx(ContextMenu.Item, {
1867
- "data-slot": "context-menu-item",
1868
- "data-inset": inset,
1869
- "data-variant": variant,
1870
- className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
1871
- ...props
1872
- });
1873
- };
1874
- var ContextMenuSub = ({ ...props }) => {
1875
- return /* @__PURE__ */ jsx(ContextMenu.SubmenuRoot, {
1876
- "data-slot": "context-menu-sub",
1877
- ...props
1878
- });
1879
- };
1880
- var ContextMenuSubTrigger = ({ className, inset, children, ...props }) => {
1881
- return /* @__PURE__ */ jsxs(ContextMenu.SubmenuTrigger, {
1882
- "data-slot": "context-menu-sub-trigger",
1883
- "data-inset": inset,
1884
- className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
1885
- ...props,
1886
- children: [children, /* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto" })]
1887
- });
1888
- };
1889
- var ContextMenuSubContent = ({ ...props }) => {
1890
- return /* @__PURE__ */ jsx(ContextMenuContent, {
1891
- "data-slot": "context-menu-sub-content",
1892
- className: "shadow-lg",
1893
- side: "right",
1894
- ...props
1895
- });
1896
- };
1897
- var ContextMenuCheckboxItem = ({ className, children, checked, inset, ...props }) => {
1898
- return /* @__PURE__ */ jsxs(ContextMenu.CheckboxItem, {
1899
- "data-slot": "context-menu-checkbox-item",
1900
- "data-inset": inset,
1901
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
1902
- checked,
1903
- ...props,
1904
- children: [/* @__PURE__ */ jsx("span", {
1905
- className: "pointer-events-none absolute right-2",
1906
- children: /* @__PURE__ */ jsx(ContextMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
1907
- }), children]
1908
- });
1909
- };
1910
- var ContextMenuRadioGroup = ({ ...props }) => {
1911
- return /* @__PURE__ */ jsx(ContextMenu.RadioGroup, {
1912
- "data-slot": "context-menu-radio-group",
1913
- ...props
1914
- });
1915
- };
1916
- var ContextMenuRadioItem = ({ className, children, inset, ...props }) => {
1917
- return /* @__PURE__ */ jsxs(ContextMenu.RadioItem, {
1918
- "data-slot": "context-menu-radio-item",
1919
- "data-inset": inset,
1920
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
1921
- ...props,
1922
- children: [/* @__PURE__ */ jsx("span", {
1923
- className: "pointer-events-none absolute right-2",
1924
- children: /* @__PURE__ */ jsx(ContextMenu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
1925
- }), children]
1926
- });
1927
- };
1928
- var ContextMenuSeparator = ({ className, ...props }) => {
1929
- return /* @__PURE__ */ jsx(ContextMenu.Separator, {
1930
- "data-slot": "context-menu-separator",
1931
- className: cn("-mx-1 my-1 h-px bg-border", className),
1932
- ...props
1933
- });
1934
- };
1935
- var ContextMenuShortcut = ({ className, ...props }) => {
1936
- return /* @__PURE__ */ jsx("span", {
1937
- "data-slot": "context-menu-shortcut",
1938
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
1939
- ...props
1940
- });
1941
- };
1942
- //#endregion
1943
- //#region ../ui/src/components/ui/drawer/drawer.tsx
1944
- var Drawer = ({ ...props }) => {
1945
- return /* @__PURE__ */ jsx(Dialog.Root, {
1946
- "data-slot": "drawer",
1947
- ...props
1948
- });
1949
- };
1950
- var DrawerTrigger = ({ ...props }) => {
1951
- return /* @__PURE__ */ jsx(Dialog.Trigger, {
1952
- "data-slot": "drawer-trigger",
1953
- ...props
1954
- });
1955
- };
1956
- var DrawerClose = ({ ...props }) => {
1957
- return /* @__PURE__ */ jsx(Dialog.Close, {
1958
- "data-slot": "drawer-close",
1959
- ...props
1960
- });
1961
- };
1962
- var DrawerOverlay = ({ className, ...props }) => {
1963
- return /* @__PURE__ */ jsx(Dialog.Backdrop, {
1964
- "data-slot": "drawer-overlay",
1965
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
1966
- ...props
1967
- });
1968
- };
1969
- var DrawerContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
1970
- return /* @__PURE__ */ jsxs(Dialog.Portal, {
1971
- "data-slot": "drawer-portal",
1972
- children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
1973
- "data-slot": "drawer-content",
1974
- "data-side": side,
1975
- className: cn("fixed z-50 flex flex-col gap-4 border-border bg-popover p-4 text-sm text-popover-foreground shadow-lg outline-none duration-100 motion-reduce:animate-none data-open:animate-in data-closed:animate-out", side === "right" && "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-open:slide-in-from-right data-closed:slide-out-to-right", side === "left" && "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-open:slide-in-from-left data-closed:slide-out-to-left", side === "top" && "inset-x-0 top-0 h-auto border-b data-open:slide-in-from-top data-closed:slide-out-to-top", side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-open:slide-in-from-bottom data-closed:slide-out-to-bottom", className),
1976
- ...props,
1977
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
1978
- "data-slot": "drawer-close",
1979
- render: /* @__PURE__ */ jsx(Button$1, {
1980
- variant: "ghost",
1981
- className: "absolute top-2 right-2",
1982
- size: "icon-sm"
1983
- }),
1984
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
1985
- className: "sr-only",
1986
- children: "Close"
1987
- })]
1988
- })]
1989
- })]
1990
- });
1991
- };
1992
- var DrawerHeader = ({ className, ...props }) => {
1993
- return /* @__PURE__ */ jsx("div", {
1994
- "data-slot": "drawer-header",
1995
- className: cn("flex flex-col gap-2", className),
1996
- ...props
1997
- });
1998
- };
1999
- var DrawerFooter = ({ className, ...props }) => {
2000
- return /* @__PURE__ */ jsx("div", {
2001
- "data-slot": "drawer-footer",
2002
- className: cn("mt-auto flex flex-col gap-2", className),
2003
- ...props
2004
- });
2005
- };
2006
- var DrawerTitle = ({ className, ...props }) => {
2007
- return /* @__PURE__ */ jsx(Dialog.Title, {
2008
- "data-slot": "drawer-title",
2009
- className: cn("text-base leading-none font-medium", className),
2010
- ...props
2011
- });
2012
- };
2013
- var DrawerDescription = ({ className, ...props }) => {
2014
- return /* @__PURE__ */ jsx(Dialog.Description, {
2015
- "data-slot": "drawer-description",
2016
- className: cn("text-sm text-muted-foreground", className),
2017
- ...props
2018
- });
2019
- };
2020
- //#endregion
2021
- //#region ../ui/src/components/ui/dropdown-menu/dropdown-menu.tsx
2022
- var DropdownMenu = ({ ...props }) => {
2023
- return /* @__PURE__ */ jsx(Menu.Root, {
2024
- "data-slot": "dropdown-menu",
2025
- ...props
2026
- });
2027
- };
2028
- var DropdownMenuPortal = ({ ...props }) => {
2029
- return /* @__PURE__ */ jsx(Menu.Portal, {
2030
- "data-slot": "dropdown-menu-portal",
2031
- ...props
2032
- });
2033
- };
2034
- var DropdownMenuTrigger = ({ ...props }) => {
2035
- return /* @__PURE__ */ jsx(Menu.Trigger, {
2036
- "data-slot": "dropdown-menu-trigger",
2037
- ...props
2038
- });
2039
- };
2040
- var DropdownMenuContent = ({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) => {
2041
- return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
2042
- className: "isolate z-50 outline-none",
2043
- align,
2044
- alignOffset,
2045
- side,
2046
- sideOffset,
2047
- children: /* @__PURE__ */ jsx(Menu.Popup, {
2048
- "data-slot": "dropdown-menu-content",
2049
- className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
2050
- ...props
2051
- })
2052
- }) });
2053
- };
2054
- var DropdownMenuGroup = ({ ...props }) => {
2055
- return /* @__PURE__ */ jsx(Menu.Group, {
2056
- "data-slot": "dropdown-menu-group",
2057
- ...props
2058
- });
2059
- };
2060
- var DropdownMenuLabel = ({ className, inset, ...props }) => {
2061
- return /* @__PURE__ */ jsx(Menu.GroupLabel, {
2062
- "data-slot": "dropdown-menu-label",
2063
- "data-inset": inset,
2064
- className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset=true]:pl-7", className),
2065
- ...props
2066
- });
2067
- };
2068
- var DropdownMenuItem = ({ className, inset, variant = "default", ...props }) => {
2069
- return /* @__PURE__ */ jsx(Menu.Item, {
2070
- "data-slot": "dropdown-menu-item",
2071
- "data-inset": inset,
2072
- "data-variant": variant,
2073
- className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
2074
- ...props
2075
- });
2076
- };
2077
- var DropdownMenuSub = ({ ...props }) => {
2078
- return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
2079
- "data-slot": "dropdown-menu-sub",
2080
- ...props
2081
- });
2082
- };
2083
- var DropdownMenuSubTrigger = ({ className, inset, children, ...props }) => {
2084
- return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
2085
- "data-slot": "dropdown-menu-sub-trigger",
2086
- "data-inset": inset,
2087
- className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset=true]:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2088
- ...props,
2089
- children: [children, /* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto" })]
2090
- });
2091
- };
2092
- var DropdownMenuSubContent = ({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) => {
2093
- return /* @__PURE__ */ jsx(DropdownMenuContent, {
2094
- "data-slot": "dropdown-menu-sub-content",
2095
- className: cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
2096
- align,
2097
- alignOffset,
2098
- side,
2099
- sideOffset,
2100
- ...props
2101
- });
2102
- };
2103
- var DropdownMenuCheckboxItem = ({ className, children, checked, inset, ...props }) => {
2104
- return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
2105
- "data-slot": "dropdown-menu-checkbox-item",
2106
- "data-inset": inset,
2107
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2108
- checked,
2109
- ...props,
2110
- children: [/* @__PURE__ */ jsx("span", {
2111
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
2112
- "data-slot": "dropdown-menu-checkbox-item-indicator",
2113
- children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2114
- }), children]
2115
- });
2116
- };
2117
- var DropdownMenuRadioGroup = ({ ...props }) => {
2118
- return /* @__PURE__ */ jsx(Menu.RadioGroup, {
2119
- "data-slot": "dropdown-menu-radio-group",
2120
- ...props
2121
- });
2122
- };
2123
- var DropdownMenuRadioItem = ({ className, children, inset, ...props }) => {
2124
- return /* @__PURE__ */ jsxs(Menu.RadioItem, {
2125
- "data-slot": "dropdown-menu-radio-item",
2126
- "data-inset": inset,
2127
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2128
- ...props,
2129
- children: [/* @__PURE__ */ jsx("span", {
2130
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
2131
- "data-slot": "dropdown-menu-radio-item-indicator",
2132
- children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2133
- }), children]
2134
- });
2135
- };
2136
- var DropdownMenuSeparator = ({ className, ...props }) => {
2137
- return /* @__PURE__ */ jsx(Menu.Separator, {
2138
- "data-slot": "dropdown-menu-separator",
2139
- className: cn("-mx-1 my-1 h-px bg-border", className),
2140
- ...props
2141
- });
2142
- };
2143
- var DropdownMenuShortcut = ({ className, ...props }) => {
2144
- return /* @__PURE__ */ jsx("span", {
2145
- "data-slot": "dropdown-menu-shortcut",
2146
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
2147
- ...props
2148
- });
2149
- };
2150
- //#endregion
2151
- //#region ../ui/src/components/ui/empty/empty.tsx
2152
- var Empty = ({ className, ...props }) => {
2153
- return /* @__PURE__ */ jsx("div", {
2154
- "data-slot": "empty",
2155
- className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
2156
- ...props
2157
- });
2158
- };
2159
- var EmptyHeader = ({ className, ...props }) => {
2160
- return /* @__PURE__ */ jsx("div", {
2161
- "data-slot": "empty-header",
2162
- className: cn("flex max-w-sm flex-col items-center gap-2", className),
2163
- ...props
2164
- });
2165
- };
2166
- var emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
2167
- variants: { variant: {
2168
- default: "bg-transparent",
2169
- icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
2170
- } },
2171
- defaultVariants: { variant: "default" }
2172
- });
2173
- var EmptyMedia = ({ className, variant = "default", ...props }) => {
2174
- return /* @__PURE__ */ jsx("div", {
2175
- "data-slot": "empty-icon",
2176
- "data-variant": variant,
2177
- className: cn(emptyMediaVariants({
2178
- variant,
2179
- className
2180
- })),
2181
- ...props
2182
- });
2183
- };
2184
- var EmptyTitle = ({ className, ...props }) => {
2185
- return /* @__PURE__ */ jsx("div", {
2186
- "data-slot": "empty-title",
2187
- className: cn("font-heading text-sm font-medium tracking-tight", className),
2188
- ...props
2189
- });
2190
- };
2191
- var EmptyDescription = ({ className, ...props }) => {
2192
- return /* @__PURE__ */ jsx("div", {
2193
- "data-slot": "empty-description",
2194
- className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2195
- ...props
2196
- });
2197
- };
2198
- var EmptyContent = ({ className, ...props }) => {
2199
- return /* @__PURE__ */ jsx("div", {
2200
- "data-slot": "empty-content",
2201
- className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className),
2202
- ...props
2203
- });
2204
- };
2205
- //#endregion
2206
- //#region ../ui/src/components/ui/field/field.tsx
2207
- var Field$1 = ({ className, ...props }) => {
2208
- return /* @__PURE__ */ jsx(Field.Root, {
2209
- "data-slot": "field",
2210
- className: cn("group/field flex flex-col gap-1.5", className),
2211
- ...props
2212
- });
2213
- };
2214
- var FieldLabel = ({ className, ...props }) => {
2215
- return /* @__PURE__ */ jsx(Field.Label, {
2216
- "data-slot": "field-label",
2217
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-has-disabled/field:pointer-events-none group-has-disabled/field:opacity-50", className),
2218
- ...props
2219
- });
2220
- };
2221
- var FieldDescription = ({ className, ...props }) => {
2222
- return /* @__PURE__ */ jsx(Field.Description, {
2223
- "data-slot": "field-description",
2224
- className: cn("text-sm text-muted-foreground", className),
2225
- ...props
2226
- });
2227
- };
2228
- var FieldError = ({ className, ...props }) => {
2229
- return /* @__PURE__ */ jsx(Field.Error, {
2230
- "data-slot": "field-error",
2231
- className: cn("text-sm text-destructive", className),
2232
- ...props
2233
- });
2234
- };
2235
- //#endregion
2236
- //#region ../ui/src/components/ui/hover-card/hover-card.tsx
2237
- var HoverCard = ({ ...props }) => {
2238
- return /* @__PURE__ */ jsx(PreviewCard.Root, {
2239
- "data-slot": "hover-card",
2240
- ...props
2241
- });
2242
- };
2243
- var HoverCardTrigger = ({ ...props }) => {
2244
- return /* @__PURE__ */ jsx(PreviewCard.Trigger, {
2245
- "data-slot": "hover-card-trigger",
2246
- ...props
2247
- });
2248
- };
2249
- var HoverCardContent = ({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) => {
2250
- return /* @__PURE__ */ jsx(PreviewCard.Portal, {
2251
- "data-slot": "hover-card-portal",
2252
- children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
2253
- align,
2254
- alignOffset,
2255
- side,
2256
- sideOffset,
2257
- className: "isolate z-50",
2258
- children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
2259
- "data-slot": "hover-card-content",
2260
- className: cn("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2261
- ...props
2262
- })
2263
- })
2264
- });
2265
- };
2266
- //#endregion
2267
- //#region ../ui/src/components/ui/indicator/indicator.tsx
2268
- /**
2269
- * Indicator: notification count-bubble or status-dot that attaches to a corner
2270
- * of another element (the Material/Angular "badge" concept; our Badge is the
2271
- * label chip). The parent element must be position-relative (e.g. `relative`).
2272
- *
2273
- * Legacy mapping: `edynBadge` directive -> `Indicator` default/destructive;
2274
- * `edyn-dot` -> `Indicator` dot variant.
2275
- * Positioning uses Radix vocabulary: side (top|bottom) + align (start|end).
2276
- */
2277
- var indicatorVariants = cva("absolute z-10 inline-flex shrink-0 items-center justify-center font-medium leading-none ring-2 ring-background", {
2278
- variants: {
2279
- variant: {
2280
- /** Count bubble: primary colors, shows children as the count/text. */
2281
- default: "h-4 min-w-4 rounded-full bg-primary px-1 text-xs tabular-nums text-primary-foreground",
2282
- /** Status dot: solid circle, no children rendered. */
2283
- dot: "size-2 rounded-full bg-primary",
2284
- /** Count bubble in destructive (error/alert) colors. */
2285
- destructive: "h-4 min-w-4 rounded-full bg-destructive px-1 text-xs text-destructive-foreground tabular-nums dark:text-background"
2286
- },
2287
- side: {
2288
- top: "top-0",
2289
- bottom: "bottom-0"
2290
- },
2291
- align: {
2292
- start: "left-0",
2293
- end: "right-0"
2294
- }
2295
- },
2296
- compoundVariants: [
2297
- {
2298
- side: "top",
2299
- align: "start",
2300
- class: "-translate-x-1/2 -translate-y-1/2"
2301
- },
2302
- {
2303
- side: "top",
2304
- align: "end",
2305
- class: "translate-x-1/2 -translate-y-1/2"
2306
- },
2307
- {
2308
- side: "bottom",
2309
- align: "start",
2310
- class: "-translate-x-1/2 translate-y-1/2"
2311
- },
2312
- {
2313
- side: "bottom",
2314
- align: "end",
2315
- class: "translate-x-1/2 translate-y-1/2"
2316
- }
2317
- ],
2318
- defaultVariants: {
2319
- variant: "default",
2320
- side: "top",
2321
- align: "end"
2322
- }
2323
- });
2324
- var Indicator = ({ className, variant = "default", side = "top", align = "end", children, ...props }) => {
2325
- return /* @__PURE__ */ jsx("span", {
2326
- "data-slot": "indicator",
2327
- "data-variant": variant,
2328
- "data-side": side,
2329
- "data-align": align,
2330
- className: cn(indicatorVariants({
2331
- variant,
2332
- side,
2333
- align
2334
- }), className),
2335
- ...props,
2336
- children: variant !== "dot" ? children : null
2337
- });
2338
- };
2339
- //#endregion
2340
- //#region ../ui/src/components/ui/input-otp/input-otp.tsx
2341
- var InputOTP = ({ className, containerClassName, ...props }) => {
2342
- return /* @__PURE__ */ jsx(OTPInput, {
2343
- "data-slot": "input-otp",
2344
- containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
2345
- spellCheck: false,
2346
- className: cn("disabled:cursor-not-allowed", className),
2347
- ...props
2348
- });
2349
- };
2350
- var InputOTPGroup = ({ className, ...props }) => {
2351
- return /* @__PURE__ */ jsx("div", {
2352
- "data-slot": "input-otp-group",
2353
- className: cn("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
2354
- ...props
2355
- });
2356
- };
2357
- var InputOTPSlot = ({ index, className, ...props }) => {
2358
- const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
2359
- return /* @__PURE__ */ jsxs("div", {
2360
- "data-slot": "input-otp-slot",
2361
- "data-active": isActive,
2362
- className: cn("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
2363
- ...props,
2364
- children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
2365
- className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2366
- children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000 motion-reduce:animate-none" })
2367
- })]
2368
- });
2369
- };
2370
- var InputOTPSeparator = ({ ...props }) => {
2371
- return /* @__PURE__ */ jsx("div", {
2372
- "data-slot": "input-otp-separator",
2373
- className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
2374
- "aria-hidden": "true",
2375
- ...props,
2376
- children: /* @__PURE__ */ jsx(IconMinus, {})
2377
- });
2378
- };
2379
- //#endregion
2380
- //#region ../ui/src/components/ui/separator/separator.tsx
2381
- var Separator$1 = ({ className, orientation = "horizontal", ...props }) => {
2382
- return /* @__PURE__ */ jsx(Separator, {
2383
- "data-slot": "separator",
2384
- orientation,
2385
- className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className),
2386
- ...props
2387
- });
2388
- };
2389
- //#endregion
2390
- //#region ../ui/src/components/ui/item/item.tsx
2391
- var ItemGroup = ({ className, ...props }) => {
2392
- return /* @__PURE__ */ jsx("div", {
2393
- role: "list",
2394
- "data-slot": "item-group",
2395
- className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
2396
- ...props
2397
- });
2398
- };
2399
- var ItemSeparator = ({ className, ...props }) => {
2400
- return /* @__PURE__ */ jsx(Separator$1, {
2401
- "data-slot": "item-separator",
2402
- orientation: "horizontal",
2403
- className: cn("my-2", className),
2404
- ...props
2405
- });
2406
- };
2407
- var itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
2408
- variants: {
2409
- variant: {
2410
- default: "border-transparent",
2411
- outline: "border-border",
2412
- muted: "border-transparent bg-muted/50"
2413
- },
2414
- size: {
2415
- default: "gap-2.5 px-3 py-2.5",
2416
- sm: "gap-2.5 px-3 py-2.5",
2417
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
2418
- }
2419
- },
2420
- defaultVariants: {
2421
- variant: "default",
2422
- size: "default"
2423
- }
2424
- });
2425
- var Item = ({ className, variant = "default", size = "default", render, ...props }) => {
2426
- return useRender({
2427
- defaultTagName: "div",
2428
- props: mergeProps({ className: cn(itemVariants({
2429
- variant,
2430
- size,
2431
- className
2432
- })) }, props),
2433
- render,
2434
- state: {
2435
- slot: "item",
2436
- variant,
2437
- size
2438
- }
2439
- });
2440
- };
2441
- var itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
2442
- variants: { variant: {
2443
- default: "bg-transparent",
2444
- icon: "[&_svg:not([class*='size-'])]:size-4",
2445
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
2446
- } },
2447
- defaultVariants: { variant: "default" }
2448
- });
2449
- var ItemMedia = ({ className, variant = "default", ...props }) => {
2450
- return /* @__PURE__ */ jsx("div", {
2451
- "data-slot": "item-media",
2452
- "data-variant": variant,
2453
- className: cn(itemMediaVariants({
2454
- variant,
2455
- className
2456
- })),
2457
- ...props
2458
- });
2459
- };
2460
- var ItemContent = ({ className, ...props }) => {
2461
- return /* @__PURE__ */ jsx("div", {
2462
- "data-slot": "item-content",
2463
- className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
2464
- ...props
2465
- });
2466
- };
2467
- var ItemTitle = ({ className, ...props }) => {
2468
- return /* @__PURE__ */ jsx("div", {
2469
- "data-slot": "item-title",
2470
- className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
2471
- ...props
2472
- });
2473
- };
2474
- var ItemDescription = ({ className, ...props }) => {
2475
- return /* @__PURE__ */ jsx("p", {
2476
- "data-slot": "item-description",
2477
- className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2478
- ...props
2479
- });
2480
- };
2481
- var ItemActions = ({ className, ...props }) => {
2482
- return /* @__PURE__ */ jsx("div", {
2483
- "data-slot": "item-actions",
2484
- className: cn("flex items-center gap-2", className),
2485
- ...props
2486
- });
2487
- };
2488
- var ItemHeader = ({ className, ...props }) => {
2489
- return /* @__PURE__ */ jsx("div", {
2490
- "data-slot": "item-header",
2491
- className: cn("flex basis-full items-center justify-between gap-2", className),
2492
- ...props
2493
- });
2494
- };
2495
- var ItemFooter = ({ className, ...props }) => {
2496
- return /* @__PURE__ */ jsx("div", {
2497
- "data-slot": "item-footer",
2498
- className: cn("flex basis-full items-center justify-between gap-2", className),
2499
- ...props
2500
- });
2501
- };
2502
- //#endregion
2503
- //#region ../ui/src/components/ui/kbd/kbd.tsx
2504
- var Kbd = ({ className, ...props }) => {
2505
- return /* @__PURE__ */ jsx("kbd", {
2506
- "data-slot": "kbd",
2507
- className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
2508
- ...props
2509
- });
2510
- };
2511
- var KbdGroup = ({ className, ...props }) => {
2512
- return /* @__PURE__ */ jsx("kbd", {
2513
- "data-slot": "kbd-group",
2514
- className: cn("inline-flex items-center gap-1", className),
2515
- ...props
2516
- });
2517
- };
2518
- //#endregion
2519
- //#region ../ui/src/components/ui/label/label.tsx
2520
- var Label = ({ className, ...props }) => {
2521
- return /* @__PURE__ */ jsx("label", {
2522
- "data-slot": "label",
2523
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
2524
- ...props
2525
- });
2526
- };
2527
- //#endregion
2528
- //#region ../ui/src/components/ui/marker/marker.tsx
2529
- var markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
2530
- default: "",
2531
- separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
2532
- border: "border-b border-border pb-2"
2533
- } } });
2534
- var Marker = ({ className, variant = "default", render, ...props }) => {
2535
- return useRender({
2536
- defaultTagName: "div",
2537
- props: mergeProps({ className: cn(markerVariants({
2538
- variant,
2539
- className
2540
- })) }, props),
2541
- render,
2542
- state: {
2543
- slot: "marker",
2544
- variant
2545
- }
2546
- });
2547
- };
2548
- var MarkerIcon = ({ className, ...props }) => {
2549
- return /* @__PURE__ */ jsx("span", {
2550
- "data-slot": "marker-icon",
2551
- "aria-hidden": "true",
2552
- className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2553
- ...props
2554
- });
2555
- };
2556
- var MarkerContent = ({ className, ...props }) => {
2557
- return /* @__PURE__ */ jsx("span", {
2558
- "data-slot": "marker-content",
2559
- className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
2560
- ...props
2561
- });
2562
- };
2563
- //#endregion
2564
- //#region ../ui/src/components/ui/menubar/menubar.tsx
2565
- var Menubar$1 = ({ className, ...props }) => {
2566
- return /* @__PURE__ */ jsx(Menubar, {
2567
- "data-slot": "menubar",
2568
- className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className),
2569
- ...props
2570
- });
2571
- };
2572
- var MenubarMenu = ({ ...props }) => {
2573
- return /* @__PURE__ */ jsx(DropdownMenu, {
2574
- "data-slot": "menubar-menu",
2575
- ...props
2576
- });
2577
- };
2578
- var MenubarGroup = ({ ...props }) => {
2579
- return /* @__PURE__ */ jsx(DropdownMenuGroup, {
2580
- "data-slot": "menubar-group",
2581
- ...props
2582
- });
2583
- };
2584
- var MenubarPortal = ({ ...props }) => {
2585
- return /* @__PURE__ */ jsx(DropdownMenuPortal, {
2586
- "data-slot": "menubar-portal",
2587
- ...props
2588
- });
2589
- };
2590
- var MenubarTrigger = ({ className, ...props }) => {
2591
- return /* @__PURE__ */ jsx(DropdownMenuTrigger, {
2592
- "data-slot": "menubar-trigger",
2593
- className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
2594
- ...props
2595
- });
2596
- };
2597
- var MenubarContent = ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) => {
2598
- return /* @__PURE__ */ jsx(DropdownMenuContent, {
2599
- "data-slot": "menubar-content",
2600
- align,
2601
- alignOffset,
2602
- sideOffset,
2603
- className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "motion-reduce:animate-none", className),
2604
- ...props
2605
- });
2606
- };
2607
- var MenubarItem = ({ className, inset, variant = "default", ...props }) => {
2608
- return /* @__PURE__ */ jsx(DropdownMenuItem, {
2609
- "data-slot": "menubar-item",
2610
- "data-inset": inset,
2611
- "data-variant": variant,
2612
- className: cn("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
2613
- ...props
2614
- });
2615
- };
2616
- var MenubarCheckboxItem = ({ className, children, checked, inset, ...props }) => {
2617
- return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
2618
- "data-slot": "menubar-checkbox-item",
2619
- "data-inset": inset,
2620
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
2621
- checked,
2622
- ...props,
2623
- children: [/* @__PURE__ */ jsx("span", {
2624
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
2625
- children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2626
- }), children]
2627
- });
2628
- };
2629
- var MenubarRadioGroup = ({ ...props }) => {
2630
- return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
2631
- "data-slot": "menubar-radio-group",
2632
- ...props
2633
- });
2634
- };
2635
- var MenubarRadioItem = ({ className, children, inset, ...props }) => {
2636
- return /* @__PURE__ */ jsxs(Menu.RadioItem, {
2637
- "data-slot": "menubar-radio-item",
2638
- "data-inset": inset,
2639
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2640
- ...props,
2641
- children: [/* @__PURE__ */ jsx("span", {
2642
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
2643
- children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2644
- }), children]
2645
- });
2646
- };
2647
- var MenubarLabel = ({ className, inset, ...props }) => {
2648
- return /* @__PURE__ */ jsx(DropdownMenuLabel, {
2649
- "data-slot": "menubar-label",
2650
- "data-inset": inset,
2651
- className: cn("px-1.5 py-1 text-sm font-medium data-[inset=true]:pl-7", className),
2652
- ...props
2653
- });
2654
- };
2655
- var MenubarSeparator = ({ className, ...props }) => {
2656
- return /* @__PURE__ */ jsx(DropdownMenuSeparator, {
2657
- "data-slot": "menubar-separator",
2658
- className: cn("-mx-1 my-1 h-px bg-border", className),
2659
- ...props
2660
- });
2661
- };
2662
- var MenubarShortcut = ({ className, ...props }) => {
2663
- return /* @__PURE__ */ jsx(DropdownMenuShortcut, {
2664
- "data-slot": "menubar-shortcut",
2665
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
2666
- ...props
2667
- });
2668
- };
2669
- var MenubarSub = ({ ...props }) => {
2670
- return /* @__PURE__ */ jsx(DropdownMenuSub, {
2671
- "data-slot": "menubar-sub",
2672
- ...props
2673
- });
2674
- };
2675
- var MenubarSubTrigger = ({ className, inset, ...props }) => {
2676
- return /* @__PURE__ */ jsx(DropdownMenuSubTrigger, {
2677
- "data-slot": "menubar-sub-trigger",
2678
- "data-inset": inset,
2679
- className: cn("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
2680
- ...props
2681
- });
2682
- };
2683
- var MenubarSubContent = ({ className, ...props }) => {
2684
- return /* @__PURE__ */ jsx(DropdownMenuSubContent, {
2685
- "data-slot": "menubar-sub-content",
2686
- className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
2687
- ...props
2688
- });
2689
- };
2690
- //#endregion
2691
- //#region ../ui/src/components/ui/message/message.tsx
2692
- var MessageGroup = ({ className, ...props }) => {
2693
- return /* @__PURE__ */ jsx("div", {
2694
- "data-slot": "message-group",
2695
- className: cn("flex min-w-0 flex-col gap-2", className),
2696
- ...props
2697
- });
2698
- };
2699
- var Message = ({ className, align = "start", ...props }) => {
2700
- return /* @__PURE__ */ jsx("div", {
2701
- "data-slot": "message",
2702
- "data-align": align,
2703
- className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
2704
- ...props
2705
- });
2706
- };
2707
- var MessageAvatar = ({ className, ...props }) => {
2708
- return /* @__PURE__ */ jsx("div", {
2709
- "data-slot": "message-avatar",
2710
- className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
2711
- ...props
2712
- });
2713
- };
2714
- var MessageContent = ({ className, ...props }) => {
2715
- return /* @__PURE__ */ jsx("div", {
2716
- "data-slot": "message-content",
2717
- className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
2718
- ...props
2719
- });
2720
- };
2721
- var MessageHeader = ({ className, ...props }) => {
2722
- return /* @__PURE__ */ jsx("div", {
2723
- "data-slot": "message-header",
2724
- className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
2725
- ...props
2726
- });
2727
- };
2728
- var MessageFooter = ({ className, ...props }) => {
2729
- return /* @__PURE__ */ jsx("div", {
2730
- "data-slot": "message-footer",
2731
- className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className),
2732
- ...props
2733
- });
2734
- };
2735
- //#endregion
2736
- //#region ../ui/src/components/ui/message-scroller/message-scroller.tsx
2737
- var MessageScrollerProvider = (props) => {
2738
- return /* @__PURE__ */ jsx(MessageScroller.Provider, { ...props });
2739
- };
2740
- var MessageScroller$1 = ({ className, ...props }) => {
2741
- return /* @__PURE__ */ jsx(MessageScroller.Root, {
2742
- "data-slot": "message-scroller",
2743
- className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
2744
- ...props
2745
- });
2746
- };
2747
- var MessageScrollerViewport = ({ className, ...props }) => {
2748
- return /* @__PURE__ */ jsx(MessageScroller.Viewport, {
2749
- "data-slot": "message-scroller-viewport",
2750
- className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
2751
- ...props
2752
- });
2753
- };
2754
- var MessageScrollerContent = ({ className, ...props }) => {
2755
- return /* @__PURE__ */ jsx(MessageScroller.Content, {
2756
- "data-slot": "message-scroller-content",
2757
- className: cn("flex h-max min-h-full flex-col gap-6", className),
2758
- ...props
2759
- });
2760
- };
2761
- var MessageScrollerItem = ({ className, scrollAnchor = false, ...props }) => {
2762
- return /* @__PURE__ */ jsx(MessageScroller.Item, {
2763
- "data-slot": "message-scroller-item",
2764
- scrollAnchor,
2765
- className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
2766
- ...props
2767
- });
2768
- };
2769
- var MessageScrollerButton = ({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) => {
2770
- return /* @__PURE__ */ jsx(MessageScroller.Button, {
2771
- "data-slot": "message-scroller-button",
2772
- "data-direction": direction,
2773
- "data-variant": variant,
2774
- "data-size": size,
2775
- direction,
2776
- className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 motion-reduce:transition-none hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
2777
- render: render ?? /* @__PURE__ */ jsx(Button$1, {
2778
- variant,
2779
- size
2780
- }),
2781
- ...props,
2782
- children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconArrowDown, {}), /* @__PURE__ */ jsx("span", {
2783
- className: "sr-only",
2784
- children: direction === "end" ? "Scroll to end" : "Scroll to start"
2785
- })] })
2786
- });
2787
- };
2788
- //#endregion
2789
- //#region ../ui/src/components/ui/native-select/native-select.tsx
2790
- var NativeSelect = ({ className, size = "default", ...props }) => {
2791
- return /* @__PURE__ */ jsxs("div", {
2792
- className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
2793
- "data-slot": "native-select-wrapper",
2794
- "data-size": size,
2795
- children: [/* @__PURE__ */ jsx("select", {
2796
- "data-slot": "native-select",
2797
- "data-size": size,
2798
- className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
2799
- ...props
2800
- }), /* @__PURE__ */ jsx(IconSelector, {
2801
- className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
2802
- "aria-hidden": "true",
2803
- "data-slot": "native-select-icon"
2804
- })]
2805
- });
2806
- };
2807
- var NativeSelectOption = ({ className, ...props }) => {
2808
- return /* @__PURE__ */ jsx("option", {
2809
- "data-slot": "native-select-option",
2810
- className: cn("bg-[Canvas] text-[CanvasText]", className),
2811
- ...props
2812
- });
2813
- };
2814
- var NativeSelectOptGroup = ({ className, ...props }) => {
2815
- return /* @__PURE__ */ jsx("optgroup", {
2816
- "data-slot": "native-select-optgroup",
2817
- className: cn("bg-[Canvas] text-[CanvasText]", className),
2818
- ...props
2819
- });
2820
- };
2821
- //#endregion
2822
- //#region ../ui/src/components/ui/navigation-menu/navigation-menu.tsx
2823
- var NavigationMenu$1 = ({ align = "start", className, children, ...props }) => {
2824
- return /* @__PURE__ */ jsxs(NavigationMenu.Root, {
2825
- "data-slot": "navigation-menu",
2826
- className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
2827
- ...props,
2828
- children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
2829
- });
2830
- };
2831
- var NavigationMenuList = ({ className, ...props }) => {
2832
- return /* @__PURE__ */ jsx(NavigationMenu.List, {
2833
- "data-slot": "navigation-menu-list",
2834
- className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
2835
- ...props
2836
- });
2837
- };
2838
- var NavigationMenuItem = ({ className, ...props }) => {
2839
- return /* @__PURE__ */ jsx(NavigationMenu.Item, {
2840
- "data-slot": "navigation-menu-item",
2841
- className: cn("relative", className),
2842
- ...props
2843
- });
2844
- };
2845
- var navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
2846
- var NavigationMenuTrigger = ({ className, children, ...props }) => {
2847
- return /* @__PURE__ */ jsxs(NavigationMenu.Trigger, {
2848
- "data-slot": "navigation-menu-trigger",
2849
- className: cn(navigationMenuTriggerStyle(), "group", className),
2850
- ...props,
2851
- children: [
2852
- children,
2853
- " ",
2854
- /* @__PURE__ */ jsx(IconChevronDown, {
2855
- className: "relative top-px ml-1 size-3 transition duration-300 motion-reduce:transition-none group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
2856
- "aria-hidden": "true"
2857
- })
2858
- ]
2859
- });
2860
- };
2861
- var NavigationMenuContent = ({ className, ...props }) => {
2862
- return /* @__PURE__ */ jsx(NavigationMenu.Content, {
2863
- "data-slot": "navigation-menu-content",
2864
- className: cn("motion-reduce:animate-none motion-reduce:transition-none", "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
2865
- ...props
2866
- });
2867
- };
2868
- var NavigationMenuPositioner = ({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) => {
2869
- return /* @__PURE__ */ jsx(NavigationMenu.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
2870
- side,
2871
- sideOffset,
2872
- align,
2873
- alignOffset,
2874
- className: cn("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
2875
- ...props,
2876
- children: /* @__PURE__ */ jsx(NavigationMenu.Popup, {
2877
- className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none motion-reduce:transition-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
2878
- children: /* @__PURE__ */ jsx(NavigationMenu.Viewport, { className: "relative size-full overflow-hidden" })
2879
- })
2880
- }) });
2881
- };
2882
- var NavigationMenuLink = ({ className, ...props }) => {
2883
- return /* @__PURE__ */ jsx(NavigationMenu.Link, {
2884
- "data-slot": "navigation-menu-link",
2885
- className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className),
2886
- ...props
2887
- });
2888
- };
2889
- var NavigationMenuIndicator = ({ className, ...props }) => {
2890
- return /* @__PURE__ */ jsx(NavigationMenu.Icon, {
2891
- "data-slot": "navigation-menu-indicator",
2892
- className: cn("motion-reduce:animate-none", "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
2893
- ...props,
2894
- children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
2895
- });
2896
- };
2897
- //#endregion
2898
- //#region ../ui/src/components/ui/pagination/pagination.tsx
2899
- /**
2900
- * Compute the ordered list of page numbers and ellipsis markers to render.
2901
- * First and last pages are always included. `siblingCount` controls how many
2902
- * page numbers appear on each side of the current page.
2903
- */
2904
- var getPaginationRange = (page, count, siblingCount = 1) => {
2905
- if (count <= 0) return [];
2906
- const currentPage = Math.min(Math.max(page, 1), count);
2907
- if (count <= 2 * siblingCount + 5) return Array.from({ length: count }, (_, i) => i + 1);
2908
- const leftSiblingStart = Math.max(currentPage - siblingCount, 2);
2909
- const rightSiblingEnd = Math.min(currentPage + siblingCount, count - 1);
2910
- const showLeftEllipsis = leftSiblingStart > 2;
2911
- const showRightEllipsis = rightSiblingEnd < count - 1;
2912
- const range = [1];
2913
- if (showLeftEllipsis) range.push("ellipsis");
2914
- else for (let i = 2; i < leftSiblingStart; i++) range.push(i);
2915
- for (let i = leftSiblingStart; i <= rightSiblingEnd; i++) range.push(i);
2916
- if (showRightEllipsis) range.push("ellipsis");
2917
- else for (let i = rightSiblingEnd + 1; i < count; i++) range.push(i);
2918
- range.push(count);
2919
- return range;
2920
- };
2921
- /** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
2922
- var clampPage = (page, count) => Math.min(Math.max(page, 1), Math.max(count, 1));
2923
- var Pagination = ({ page, count, onPageChange, siblingCount = 1, className }) => {
2924
- const currentPage = clampPage(page, count);
2925
- const range = getPaginationRange(currentPage, count, siblingCount);
2926
- let ellipsisCount = 0;
2927
- const handlePrev = () => {
2928
- if (currentPage > 1) onPageChange(currentPage - 1);
2929
- };
2930
- const handleNext = () => {
2931
- if (currentPage < count) onPageChange(currentPage + 1);
2932
- };
2933
- return /* @__PURE__ */ jsx("nav", {
2934
- "aria-label": "pagination",
2935
- className: cn("mx-auto flex w-full justify-center", className),
2936
- children: /* @__PURE__ */ jsxs("ul", {
2937
- className: "flex flex-row items-center gap-1",
2938
- children: [
2939
- /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
2940
- type: "button",
2941
- "aria-label": "Go to previous page",
2942
- disabled: currentPage <= 1,
2943
- onClick: handlePrev,
2944
- className: cn(buttonVariants({
2945
- variant: "ghost",
2946
- size: "icon"
2947
- }), "size-8"),
2948
- children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16 })
2949
- }) }),
2950
- range.map((item) => {
2951
- if (item === "ellipsis") {
2952
- ellipsisCount += 1;
2953
- const ellipsisKey = `ellipsis-${ellipsisCount}`;
2954
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", {
2955
- "aria-hidden": "true",
2956
- className: cn(buttonVariants({
2957
- variant: "ghost",
2958
- size: "icon"
2959
- }), "size-8 cursor-default pointer-events-none"),
2960
- children: /* @__PURE__ */ jsx(IconDots, { size: 16 })
2961
- }) }, ellipsisKey);
2962
- }
2963
- const isActive = item === currentPage;
2964
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
2965
- type: "button",
2966
- "aria-label": `Go to page ${item}`,
2967
- "aria-current": isActive ? "page" : void 0,
2968
- onClick: () => {
2969
- if (!isActive) onPageChange(item);
2970
- },
2971
- className: cn(buttonVariants({
2972
- variant: isActive ? "outline" : "ghost",
2973
- size: "icon"
2974
- }), "size-8", isActive && "pointer-events-none font-semibold"),
2975
- children: item
2976
- }) }, item);
2977
- }),
2978
- /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
2979
- type: "button",
2980
- "aria-label": "Go to next page",
2981
- disabled: currentPage >= count,
2982
- onClick: handleNext,
2983
- className: cn(buttonVariants({
2984
- variant: "ghost",
2985
- size: "icon"
2986
- }), "size-8"),
2987
- children: /* @__PURE__ */ jsx(IconChevronRight, { size: 16 })
2988
- }) })
2989
- ]
2990
- })
2991
- });
2992
- };
2993
- //#endregion
2994
- //#region ../ui/src/components/ui/popover/popover.tsx
2995
- var Popover$1 = ({ ...props }) => {
2996
- return /* @__PURE__ */ jsx(Popover.Root, {
2997
- "data-slot": "popover",
2998
- ...props
2999
- });
3000
- };
3001
- var PopoverTrigger = ({ ...props }) => {
3002
- return /* @__PURE__ */ jsx(Popover.Trigger, {
3003
- "data-slot": "popover-trigger",
3004
- ...props
3005
- });
3006
- };
3007
- var PopoverContent = ({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) => {
3008
- return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
3009
- align,
3010
- alignOffset,
3011
- side,
3012
- sideOffset,
3013
- className: "isolate z-50",
3014
- children: /* @__PURE__ */ jsx(Popover.Popup, {
3015
- "data-slot": "popover-content",
3016
- className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3017
- ...props
3018
- })
3019
- }) });
3020
- };
3021
- var PopoverHeader = ({ className, ...props }) => {
3022
- return /* @__PURE__ */ jsx("div", {
3023
- "data-slot": "popover-header",
3024
- className: cn("flex flex-col gap-0.5 text-sm", className),
3025
- ...props
3026
- });
3027
- };
3028
- var PopoverTitle = ({ className, ...props }) => {
3029
- return /* @__PURE__ */ jsx(Popover.Title, {
3030
- "data-slot": "popover-title",
3031
- className: cn("font-medium", className),
3032
- ...props
3033
- });
3034
- };
3035
- var PopoverDescription = ({ className, ...props }) => {
3036
- return /* @__PURE__ */ jsx(Popover.Description, {
3037
- "data-slot": "popover-description",
3038
- className: cn("text-muted-foreground", className),
3039
- ...props
3040
- });
3041
- };
3042
- //#endregion
3043
- //#region ../ui/src/components/ui/progress/progress.tsx
3044
- var Progress$1 = ({ value = null, className, ...props }) => {
3045
- return /* @__PURE__ */ jsx(Progress.Root, {
3046
- "data-slot": "progress",
3047
- value: value ?? null,
3048
- className: cn("w-full", className),
3049
- ...props,
3050
- children: /* @__PURE__ */ jsx(Progress.Track, {
3051
- "data-slot": "progress-track",
3052
- className: "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
3053
- children: /* @__PURE__ */ jsx(Progress.Indicator, {
3054
- "data-slot": "progress-indicator",
3055
- className: "h-full rounded-full bg-primary transition-[width] duration-300 ease-in-out motion-reduce:transition-none motion-reduce:animate-none data-indeterminate:w-1/3 data-indeterminate:animate-[progress-indeterminate_1.5s_ease-in-out_infinite]",
3056
- style: value != null ? { width: `${value}%` } : void 0
3057
- })
3058
- })
3059
- });
3060
- };
3061
- //#endregion
3062
- //#region ../ui/src/components/ui/questionnaire/questionnaire.tsx
3063
- var Questionnaire$1 = ({ className, ...props }) => {
3064
- return /* @__PURE__ */ jsx(Questionnaire.Root, {
3065
- "data-slot": "questionnaire",
3066
- className: cn("flex w-full min-w-0 flex-col gap-4", className),
3067
- ...props
3068
- });
3069
- };
3070
- var QuestionnaireProgress = ({ className, ...props }) => {
3071
- return /* @__PURE__ */ jsx(Questionnaire.Progress, {
3072
- "data-slot": "questionnaire-progress",
3073
- className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
3074
- ...props
3075
- });
3076
- };
3077
- var QuestionnaireItem = ({ className, ...props }) => {
3078
- return /* @__PURE__ */ jsx(Questionnaire.Item, {
3079
- "data-slot": "questionnaire-item",
3080
- className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
3081
- ...props
3082
- });
3083
- };
3084
- var QuestionnaireTitle = ({ className, ...props }) => {
3085
- return /* @__PURE__ */ jsx(Questionnaire.Title, {
3086
- "data-slot": "questionnaire-title",
3087
- className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
3088
- ...props
3089
- });
3090
- };
3091
- var QuestionnaireDescription = ({ className, ...props }) => {
3092
- return /* @__PURE__ */ jsx(Questionnaire.Description, {
3093
- "data-slot": "questionnaire-description",
3094
- className: cn("text-sm text-pretty text-muted-foreground", className),
3095
- ...props
3096
- });
3097
- };
3098
- var QuestionnaireChoices = ({ className, ...props }) => {
3099
- return /* @__PURE__ */ jsx(Questionnaire.Choices, {
3100
- "data-slot": "questionnaire-choices",
3101
- className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
3102
- ...props
3103
- });
3104
- };
3105
- var QuestionnaireChoice = ({ children, className, ...props }) => {
3106
- return /* @__PURE__ */ jsxs(Questionnaire.Choice, {
3107
- "data-slot": "questionnaire-choice",
3108
- className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
3109
- ...props,
3110
- children: [
3111
- /* @__PURE__ */ jsx(Questionnaire.ChoiceInput, {
3112
- "data-slot": "questionnaire-choice-input",
3113
- className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
3114
- }),
3115
- /* @__PURE__ */ jsxs("span", {
3116
- "aria-hidden": "true",
3117
- "data-slot": "questionnaire-choice-indicator",
3118
- className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
3119
- children: [/* @__PURE__ */ jsx("span", {
3120
- "data-slot": "questionnaire-choice-indicator-dot",
3121
- className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3122
- }), /* @__PURE__ */ jsx(IconCheck, {
3123
- "data-slot": "questionnaire-choice-indicator-check",
3124
- className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3125
- })]
3126
- }),
3127
- /* @__PURE__ */ jsx(Questionnaire.ChoiceLabel, {
3128
- "data-slot": "questionnaire-choice-label",
3129
- className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
3130
- children
3131
- }),
3132
- /* @__PURE__ */ jsx(Questionnaire.ChoiceShortcut, {
3133
- "data-slot": "questionnaire-choice-shortcut",
3134
- className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
3135
- })
3136
- ]
3137
- });
3138
- };
3139
- var QuestionnaireChoiceDescription = ({ className, ...props }) => {
3140
- return /* @__PURE__ */ jsx("span", {
3141
- "data-slot": "questionnaire-choice-description",
3142
- className: cn("text-muted-foreground", className),
3143
- ...props
3144
- });
3145
- };
3146
- var QuestionnaireInput = ({ className, ...props }) => {
3147
- return /* @__PURE__ */ jsx("div", {
3148
- "data-slot": "questionnaire-input-wrapper",
3149
- className: "group/questionnaire-input relative w-full min-w-0",
3150
- children: /* @__PURE__ */ jsx(Questionnaire.Input, {
3151
- "data-slot": "questionnaire-input",
3152
- className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
3153
- ...props
3154
- })
3155
- });
3156
- };
3157
- var QuestionnaireError = ({ className, ...props }) => {
3158
- return /* @__PURE__ */ jsx(Questionnaire.Error, {
3159
- "data-slot": "questionnaire-error",
3160
- className: cn("mt-2 text-sm text-destructive", className),
3161
- ...props
3162
- });
3163
- };
3164
- var QuestionnaireActions = ({ className, ...props }) => {
3165
- return /* @__PURE__ */ jsx("div", {
3166
- "data-slot": "questionnaire-actions",
3167
- className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
3168
- ...props
3169
- });
3170
- };
3171
- var QuestionnairePrevious = ({ children, className, size = "default", variant = "outline", ...props }) => {
3172
- return /* @__PURE__ */ jsx(Questionnaire.Previous, {
3173
- "data-slot": "questionnaire-previous",
3174
- "data-size": size,
3175
- "data-variant": variant,
3176
- className: cn(buttonVariants({
3177
- size,
3178
- variant
3179
- }), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
3180
- ...props,
3181
- children: children ?? "Previous"
3182
- });
3183
- };
3184
- var QuestionnaireSkip = ({ children, className, size = "default", variant = "outline", ...props }) => {
3185
- return /* @__PURE__ */ jsx(Questionnaire.Skip, {
3186
- "data-slot": "questionnaire-skip",
3187
- "data-size": size,
3188
- "data-variant": variant,
3189
- className: cn(buttonVariants({
3190
- size,
3191
- variant
3192
- }), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3193
- ...props,
3194
- children: children ?? "Skip"
3195
- });
3196
- };
3197
- var QuestionnaireNext = ({ children, className, size = "default", variant = "default", ...props }) => {
3198
- return /* @__PURE__ */ jsx(Questionnaire.Next, {
3199
- "data-slot": "questionnaire-next",
3200
- "data-size": size,
3201
- "data-variant": variant,
3202
- className: cn(buttonVariants({
3203
- size,
3204
- variant
3205
- }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3206
- ...props,
3207
- children: children ?? "Next"
3208
- });
3209
- };
3210
- var QuestionnaireSubmit = ({ children, className, size = "default", variant = "default", ...props }) => {
3211
- return /* @__PURE__ */ jsx(Questionnaire.Submit, {
3212
- "data-slot": "questionnaire-submit",
3213
- "data-size": size,
3214
- "data-variant": variant,
3215
- className: cn(buttonVariants({
3216
- size,
3217
- variant
3218
- }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3219
- ...props,
3220
- children: children ?? "Submit"
3221
- });
3222
- };
3223
- //#endregion
3224
- //#region ../ui/src/components/ui/radio-group/radio-group.tsx
3225
- var RadioGroup$1 = ({ className, orientation = "vertical", ...props }) => {
3226
- return /* @__PURE__ */ jsx(RadioGroup, {
3227
- "data-slot": "radio-group",
3228
- "data-orientation": orientation,
3229
- "aria-orientation": orientation,
3230
- className: cn("grid w-full gap-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center", className),
3231
- ...props
3232
- });
3233
- };
3234
- var RadioGroupItem = ({ className, ...props }) => {
3235
- return /* @__PURE__ */ jsx(Radio.Root, {
3236
- "data-slot": "radio-group-item",
3237
- className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-full border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className),
3238
- ...props,
3239
- children: /* @__PURE__ */ jsx(Radio.Indicator, {
3240
- "data-slot": "radio-group-item-indicator",
3241
- className: "flex size-2 shrink-0 rounded-full bg-primary transition-none"
3242
- })
3243
- });
3244
- };
3245
- //#endregion
3246
- //#region ../ui/src/components/ui/resizable/resizable.tsx
3247
- var ResizablePanelGroup = ({ className, ...props }) => {
3248
- return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
3249
- "data-slot": "resizable-panel-group",
3250
- className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
3251
- ...props
3252
- });
3253
- };
3254
- var ResizablePanel = ({ ...props }) => {
3255
- return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
3256
- "data-slot": "resizable-panel",
3257
- ...props
3258
- });
3259
- };
3260
- var ResizableHandle = ({ withHandle, className, ...props }) => {
3261
- return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
3262
- "data-slot": "resizable-handle",
3263
- className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
3264
- ...props,
3265
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
3266
- });
3267
- };
3268
- //#endregion
3269
- //#region ../ui/src/hooks/use-merged-refs.ts
3270
- var assignRef = (ref, value) => {
3271
- if (typeof ref === "function") ref(value);
3272
- else if (ref !== null) ref.current = value;
3273
- };
3274
- var mergeRefs = (...refs) => {
3275
- return (node) => {
3276
- for (const ref of refs) if (ref) assignRef(ref, node);
3277
- };
3278
- };
3279
- var useMergedRefs = (...refs) => {
3280
- return useCallback(mergeRefs(...refs), [...refs]);
3281
- };
3282
- //#endregion
3283
- //#region ../ui/src/components/ui/scroll-area/scroll-area.tsx
3284
- var ScrollBar = ({ className, orientation = "vertical", visibility = "hover", ...props }) => {
3285
- return /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
3286
- "data-slot": "scroll-area-scrollbar",
3287
- orientation,
3288
- className: cn("peer/scrollbar z-100 flex touch-none select-none motion-safe:transition-opacity motion-safe:duration-150", orientation === "vertical" && "h-full w-2 border-l border-l-transparent p-px", orientation === "horizontal" && "h-2 flex-col border-t border-t-transparent p-px", visibility !== "always" && "opacity-0 data-scrolling:opacity-100", visibility === "hover" && "data-hovering:opacity-100 group-hover/scroll-area:opacity-100", className),
3289
- ...props,
3290
- children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-muted-foreground/50 transition-colors hover:bg-muted-foreground/70 data-scrolling:bg-muted-foreground/70" })
3291
- });
3292
- };
3293
- /**
3294
- * Themed scroll container (Base UI): overflowing content scrolls INSIDE the component
3295
- * with a slim overlay scrollbar instead of exposing a native browser scrollbar. House
3296
- * rule: wide/tall content (tables, lists, code) always goes through this, never a bare
3297
- * overflow-* utility.
3298
- *
3299
- * The viewport publishes its size as --scroll-area-width/--scroll-area-height CSS vars
3300
- * so children can size against the visible area. Edge fades are NOT built in; apply
3301
- * the faded-* utilities from @edyn/theme/utilities.css on the ScrollArea (it is the
3302
- * positioning root) where a fade is wanted.
3303
- */
3304
- var ScrollArea$1 = ({ className, children, orientation = "vertical", type = "hover", viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }) => {
3305
- const refInner = useRef(null);
3306
- const refsViewport = useMergedRefs(refInner, viewPortRef);
3307
- useEffect(() => {
3308
- const el = refInner.current;
3309
- if (!el) return;
3310
- const observer = new ResizeObserver(() => {
3311
- el.style.setProperty("--scroll-area-width", `${el.clientWidth}px`);
3312
- el.style.setProperty("--scroll-area-height", `${el.clientHeight}px`);
3313
- });
3314
- observer.observe(el);
3315
- return () => {
3316
- observer.disconnect();
3317
- };
3318
- }, []);
3319
- return /* @__PURE__ */ jsxs(ScrollArea.Root, {
3320
- "data-slot": "scroll-area",
3321
- className: cn("group/scroll-area relative overflow-hidden", className),
3322
- ...props,
3323
- children: [
3324
- (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, {
3325
- orientation: "vertical",
3326
- visibility: type,
3327
- className: scrollVerticalClassName
3328
- }),
3329
- (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, {
3330
- orientation: "horizontal",
3331
- visibility: type,
3332
- className: scrollHorizontalClassName
3333
- }),
3334
- /* @__PURE__ */ jsx(ScrollArea.Corner, {}),
3335
- /* @__PURE__ */ jsx(ScrollArea.Viewport, {
3336
- "data-slot": "scroll-area-viewport",
3337
- id: viewPortId,
3338
- ref: refsViewport,
3339
- className: cn("h-full w-full rounded-[inherit]", orientation === "vertical" && "overflow-x-hidden", viewPortClassName),
3340
- children: /* @__PURE__ */ jsx(ScrollArea.Content, { children })
3341
- })
3342
- ]
3343
- });
3344
- };
3345
- //#endregion
3346
- //#region ../ui/src/components/ui/select/select.tsx
3347
- var Select$1 = ({ ...props }) => {
3348
- return /* @__PURE__ */ jsx(Select.Root, {
3349
- "data-slot": "select",
3350
- ...props
3351
- });
3352
- };
3353
- var SelectTrigger = ({ className, size = "default", children, ...props }) => {
3354
- return /* @__PURE__ */ jsxs(Select.Trigger, {
3355
- "data-slot": "select-trigger",
3356
- className: cn("flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-transparent text-sm text-foreground transition-colors outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20", "data-popup-open:border-ring data-popup-open:ring-3 data-popup-open:ring-ring/50", "dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", size === "sm" ? "h-7 px-2.5 text-[0.8rem]" : "h-8 px-2.5", className),
3357
- ...props,
3358
- children: [children, /* @__PURE__ */ jsx(Select.Icon, {
3359
- "data-slot": "select-icon",
3360
- className: "shrink-0 text-muted-foreground",
3361
- children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
3362
- })]
3363
- });
3364
- };
3365
- var SelectValue = ({ className, ...props }) => {
3366
- return /* @__PURE__ */ jsx(Select.Value, {
3367
- "data-slot": "select-value",
3368
- className: cn("truncate data-placeholder:text-muted-foreground", className),
3369
- ...props
3370
- });
3371
- };
3372
- var SelectContent = ({ className, children, portalContainer, ...props }) => {
3373
- return /* @__PURE__ */ jsx(Select.Portal, {
3374
- container: portalContainer,
3375
- children: /* @__PURE__ */ jsx(Select.Positioner, {
3376
- "data-slot": "select-positioner",
3377
- sideOffset: 4,
3378
- alignItemWithTrigger: false,
3379
- children: /* @__PURE__ */ jsx(Select.Popup, {
3380
- "data-slot": "select-content",
3381
- className: cn("z-50 min-w-[var(--anchor-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] motion-reduce:animate-none motion-reduce:transition-none data-open:scale-100 data-open:opacity-100 data-closed:scale-95 data-closed:opacity-0 data-open:animate-in data-closed:animate-out data-open:fade-in-0 data-closed:fade-out-0", className),
3382
- ...props,
3383
- children
3384
- })
3385
- })
3386
- });
3387
- };
3388
- var SelectGroup = ({ className, ...props }) => {
3389
- return /* @__PURE__ */ jsx(Select.Group, {
3390
- "data-slot": "select-group",
3391
- className: cn("flex flex-col gap-0.5", className),
3392
- ...props
3393
- });
3394
- };
3395
- var SelectLabel = ({ className, ...props }) => {
3396
- return /* @__PURE__ */ jsx(Select.GroupLabel, {
3397
- "data-slot": "select-label",
3398
- className: cn("px-2 py-1 text-xs font-semibold text-muted-foreground", className),
3399
- ...props
3400
- });
3401
- };
3402
- var SelectItem = ({ className, children, ...props }) => {
3403
- return /* @__PURE__ */ jsxs(Select.Item, {
3404
- "data-slot": "select-item",
3405
- className: cn("relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm text-foreground outline-none select-none", "transition-colors", "data-highlighted:bg-accent data-highlighted:text-accent-foreground", "data-[selected]:font-medium", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
3406
- ...props,
3407
- children: [/* @__PURE__ */ jsx(Select.ItemIndicator, {
3408
- "data-slot": "select-item-indicator",
3409
- className: "absolute left-2 flex size-4 items-center justify-center text-foreground",
3410
- children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
3411
- }), /* @__PURE__ */ jsx(Select.ItemText, {
3412
- "data-slot": "select-item-text",
3413
- children
3414
- })]
3415
- });
3416
- };
3417
- var SelectSeparator = ({ className, ...props }) => {
3418
- return /* @__PURE__ */ jsx("div", {
3419
- "data-slot": "select-separator",
3420
- className: cn("-mx-1 my-1 h-px bg-border", className),
3421
- "aria-hidden": "true",
3422
- ...props
3423
- });
3424
- };
3425
- //#endregion
3426
- //#region ../ui/src/components/ui/sheet/sheet.tsx
3427
- var Sheet = ({ ...props }) => {
3428
- return /* @__PURE__ */ jsx(Dialog.Root, {
3429
- "data-slot": "sheet",
3430
- ...props
3431
- });
3432
- };
3433
- var SheetTrigger = ({ ...props }) => {
3434
- return /* @__PURE__ */ jsx(Dialog.Trigger, {
3435
- "data-slot": "sheet-trigger",
3436
- ...props
3437
- });
3438
- };
3439
- var SheetClose = ({ ...props }) => {
3440
- return /* @__PURE__ */ jsx(Dialog.Close, {
3441
- "data-slot": "sheet-close",
3442
- ...props
3443
- });
3444
- };
3445
- var SheetPortal = ({ ...props }) => {
3446
- return /* @__PURE__ */ jsx(Dialog.Portal, {
3447
- "data-slot": "sheet-portal",
3448
- ...props
3449
- });
3450
- };
3451
- var SheetOverlay = ({ className, ...props }) => {
3452
- return /* @__PURE__ */ jsx(Dialog.Backdrop, {
3453
- "data-slot": "sheet-overlay",
3454
- className: cn("fixed inset-0 z-50 bg-overlay transition-opacity duration-150 motion-reduce:transition-none data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
3455
- ...props
3456
- });
3457
- };
3458
- var SheetContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
3459
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
3460
- "data-slot": "sheet-content",
3461
- "data-side": side,
3462
- className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 motion-reduce:transition-none ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
3463
- ...props,
3464
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
3465
- "data-slot": "sheet-close",
3466
- render: /* @__PURE__ */ jsx(Button$1, {
3467
- variant: "ghost",
3468
- className: "absolute top-3 right-3",
3469
- size: "icon-sm"
3470
- }),
3471
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
3472
- className: "sr-only",
3473
- children: "Close"
3474
- })]
3475
- })]
3476
- })] });
3477
- };
3478
- var SheetHeader = ({ className, ...props }) => {
3479
- return /* @__PURE__ */ jsx("div", {
3480
- "data-slot": "sheet-header",
3481
- className: cn("flex flex-col gap-0.5 p-4", className),
3482
- ...props
3483
- });
3484
- };
3485
- var SheetFooter = ({ className, ...props }) => {
3486
- return /* @__PURE__ */ jsx("div", {
3487
- "data-slot": "sheet-footer",
3488
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
3489
- ...props
3490
- });
3491
- };
3492
- var SheetTitle = ({ className, ...props }) => {
3493
- return /* @__PURE__ */ jsx(Dialog.Title, {
3494
- "data-slot": "sheet-title",
3495
- className: cn("font-heading text-base font-medium text-foreground", className),
3496
- ...props
3497
- });
3498
- };
3499
- var SheetDescription = ({ className, ...props }) => {
3500
- return /* @__PURE__ */ jsx(Dialog.Description, {
3501
- "data-slot": "sheet-description",
3502
- className: cn("text-sm text-muted-foreground", className),
3503
- ...props
3504
- });
3505
- };
3506
- //#endregion
3507
- //#region ../ui/src/hooks/use-mobile.ts
3508
- var MOBILE_BREAKPOINT = 768;
3509
- var useIsMobile = () => {
3510
- const [isMobile, setIsMobile] = React.useState(void 0);
3511
- React.useEffect(() => {
3512
- const mql = window.matchMedia(`(max-width: 767px)`);
3513
- const onChange = () => {
3514
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
3515
- };
3516
- mql.addEventListener("change", onChange);
3517
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
3518
- return () => mql.removeEventListener("change", onChange);
3519
- }, []);
3520
- return !!isMobile;
3521
- };
3522
- //#endregion
3523
- //#region ../ui/src/components/ui/skeleton/skeleton.tsx
3524
- var Skeleton = ({ className, ...props }) => {
3525
- return /* @__PURE__ */ jsx("div", {
3526
- "data-slot": "skeleton",
3527
- className: cn("animate-pulse rounded-md bg-muted motion-reduce:animate-none", className),
3528
- ...props
3529
- });
3530
- };
3531
- //#endregion
3532
- //#region ../ui/src/components/ui/tooltip/tooltip.tsx
3533
- var TooltipProvider = ({ delay = 0, ...props }) => {
3534
- return /* @__PURE__ */ jsx(Tooltip.Provider, {
3535
- "data-slot": "tooltip-provider",
3536
- delay,
3537
- ...props
3538
- });
3539
- };
3540
- var Tooltip$1 = ({ ...props }) => {
3541
- return /* @__PURE__ */ jsx(Tooltip.Root, {
3542
- "data-slot": "tooltip",
3543
- ...props
3544
- });
3545
- };
3546
- var TooltipTrigger = ({ ...props }) => {
3547
- return /* @__PURE__ */ jsx(Tooltip.Trigger, {
3548
- "data-slot": "tooltip-trigger",
3549
- ...props
3550
- });
3551
- };
3552
- var TooltipContent = ({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) => {
3553
- return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
3554
- align,
3555
- alignOffset,
3556
- side,
3557
- sideOffset,
3558
- className: "isolate z-50",
3559
- children: /* @__PURE__ */ jsxs(Tooltip.Popup, {
3560
- "data-slot": "tooltip-content",
3561
- className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
3562
- ...props,
3563
- children: [children, /* @__PURE__ */ jsx(Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
3564
- })
3565
- }) });
3566
- };
3567
- //#endregion
3568
- //#region ../ui/src/components/ui/sidebar/sidebar.tsx
3569
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
3570
- var SIDEBAR_COOKIE_MAX_AGE = 604800;
3571
- var SIDEBAR_WIDTH = "16rem";
3572
- var SIDEBAR_WIDTH_MOBILE = "18rem";
3573
- var SIDEBAR_WIDTH_ICON = "3rem";
3574
- var SIDEBAR_KEYBOARD_SHORTCUT = "b";
3575
- var SidebarContext = React.createContext(null);
3576
- var useSidebar = () => {
3577
- const context = React.useContext(SidebarContext);
3578
- if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
3579
- return context;
3580
- };
3581
- var SidebarProvider = ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) => {
3582
- const isMobile = useIsMobile();
3583
- const [openMobile, setOpenMobile] = React.useState(false);
3584
- const [_open, _setOpen] = React.useState(defaultOpen);
3585
- const open = openProp ?? _open;
3586
- const setOpen = React.useCallback((value) => {
3587
- const openState = typeof value === "function" ? value(open) : value;
3588
- if (setOpenProp) setOpenProp(openState);
3589
- else _setOpen(openState);
3590
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
3591
- }, [setOpenProp, open]);
3592
- const toggleSidebar = React.useCallback(() => {
3593
- return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
3594
- }, [isMobile, setOpen]);
3595
- React.useEffect(() => {
3596
- const handleKeyDown = (event) => {
3597
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
3598
- event.preventDefault();
3599
- toggleSidebar();
3600
- }
3601
- };
3602
- window.addEventListener("keydown", handleKeyDown);
3603
- return () => window.removeEventListener("keydown", handleKeyDown);
3604
- }, [toggleSidebar]);
3605
- const state = open ? "expanded" : "collapsed";
3606
- const contextValue = React.useMemo(() => ({
3607
- state,
3608
- open,
3609
- setOpen,
3610
- isMobile,
3611
- openMobile,
3612
- setOpenMobile,
3613
- toggleSidebar
3614
- }), [
3615
- state,
3616
- open,
3617
- setOpen,
3618
- isMobile,
3619
- openMobile,
3620
- toggleSidebar
3621
- ]);
3622
- return /* @__PURE__ */ jsx(SidebarContext.Provider, {
3623
- value: contextValue,
3624
- children: /* @__PURE__ */ jsx("div", {
3625
- "data-slot": "sidebar-wrapper",
3626
- style: {
3627
- "--sidebar-width": SIDEBAR_WIDTH,
3628
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
3629
- ...style
3630
- },
3631
- className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
3632
- ...props,
3633
- children
3634
- })
3635
- });
3636
- };
3637
- var Sidebar = ({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) => {
3638
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
3639
- if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
3640
- "data-slot": "sidebar",
3641
- className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
3642
- ...props,
3643
- children
3644
- });
3645
- if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
3646
- open: openMobile,
3647
- onOpenChange: setOpenMobile,
3648
- ...props,
3649
- children: /* @__PURE__ */ jsxs(SheetContent, {
3650
- dir,
3651
- "data-sidebar": "sidebar",
3652
- "data-slot": "sidebar",
3653
- "data-mobile": "true",
3654
- className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
3655
- style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
3656
- side,
3657
- children: [/* @__PURE__ */ jsxs(SheetHeader, {
3658
- className: "sr-only",
3659
- children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
3660
- }), /* @__PURE__ */ jsx("div", {
3661
- className: "flex h-full w-full flex-col",
3662
- children
3663
- })]
3664
- })
3665
- });
3666
- return /* @__PURE__ */ jsxs("div", {
3667
- className: "group peer hidden text-sidebar-foreground md:block",
3668
- "data-state": state,
3669
- "data-collapsible": state === "collapsed" ? collapsible : "",
3670
- "data-variant": variant,
3671
- "data-side": side,
3672
- "data-slot": "sidebar",
3673
- children: [/* @__PURE__ */ jsx("div", {
3674
- "data-slot": "sidebar-gap",
3675
- className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 motion-reduce:transition-none ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
3676
- }), /* @__PURE__ */ jsx("div", {
3677
- "data-slot": "sidebar-container",
3678
- "data-side": side,
3679
- className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 motion-reduce:transition-none ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
3680
- ...props,
3681
- children: /* @__PURE__ */ jsx("div", {
3682
- "data-sidebar": "sidebar",
3683
- "data-slot": "sidebar-inner",
3684
- className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
3685
- children
3686
- })
3687
- })]
3688
- });
3689
- };
3690
- var SidebarTrigger = ({ className, onClick, ...props }) => {
3691
- const { toggleSidebar } = useSidebar();
3692
- return /* @__PURE__ */ jsxs(Button$1, {
3693
- "data-sidebar": "trigger",
3694
- "data-slot": "sidebar-trigger",
3695
- variant: "ghost",
3696
- size: "icon-sm",
3697
- className: cn(className),
3698
- onClick: (event) => {
3699
- onClick?.(event);
3700
- toggleSidebar();
3701
- },
3702
- ...props,
3703
- children: [/* @__PURE__ */ jsx(IconLayoutSidebar, {}), /* @__PURE__ */ jsx("span", {
3704
- className: "sr-only",
3705
- children: "Toggle Sidebar"
3706
- })]
3707
- });
3708
- };
3709
- var SidebarRail = ({ className, ...props }) => {
3710
- const { toggleSidebar } = useSidebar();
3711
- return /* @__PURE__ */ jsx("button", {
3712
- "data-sidebar": "rail",
3713
- "data-slot": "sidebar-rail",
3714
- "aria-label": "Toggle Sidebar",
3715
- tabIndex: -1,
3716
- onClick: toggleSidebar,
3717
- title: "Toggle Sidebar",
3718
- className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all motion-reduce:transition-none ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
3719
- ...props
3720
- });
3721
- };
3722
- var SidebarInset = ({ className, ...props }) => {
3723
- return /* @__PURE__ */ jsx("main", {
3724
- "data-slot": "sidebar-inset",
3725
- className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
3726
- ...props
3727
- });
3728
- };
3729
- var SidebarInput = ({ className, ...props }) => {
3730
- return /* @__PURE__ */ jsx(Input$1, {
3731
- "data-slot": "sidebar-input",
3732
- "data-sidebar": "input",
3733
- className: cn("h-8 w-full bg-background shadow-none", className),
3734
- ...props
3735
- });
3736
- };
3737
- var SidebarHeader = ({ className, ...props }) => {
3738
- return /* @__PURE__ */ jsx("div", {
3739
- "data-slot": "sidebar-header",
3740
- "data-sidebar": "header",
3741
- className: cn("flex flex-col gap-2 p-2", className),
3742
- ...props
3743
- });
3744
- };
3745
- var SidebarFooter = ({ className, ...props }) => {
3746
- return /* @__PURE__ */ jsx("div", {
3747
- "data-slot": "sidebar-footer",
3748
- "data-sidebar": "footer",
3749
- className: cn("flex flex-col gap-2 p-2", className),
3750
- ...props
3751
- });
3752
- };
3753
- var SidebarSeparator = ({ className, ...props }) => {
3754
- return /* @__PURE__ */ jsx(Separator$1, {
3755
- "data-slot": "sidebar-separator",
3756
- "data-sidebar": "separator",
3757
- className: cn("mx-2 w-auto bg-sidebar-border", className),
3758
- ...props
3759
- });
3760
- };
3761
- var SidebarContent = ({ className, ...props }) => {
3762
- return /* @__PURE__ */ jsx("div", {
3763
- "data-slot": "sidebar-content",
3764
- "data-sidebar": "content",
3765
- className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
3766
- ...props
3767
- });
3768
- };
3769
- var SidebarGroup = ({ className, ...props }) => {
3770
- return /* @__PURE__ */ jsx("div", {
3771
- "data-slot": "sidebar-group",
3772
- "data-sidebar": "group",
3773
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
3774
- ...props
3775
- });
3776
- };
3777
- var SidebarGroupLabel = ({ className, render, ...props }) => {
3778
- return useRender({
3779
- defaultTagName: "div",
3780
- props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 motion-reduce:transition-none ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
3781
- render,
3782
- state: {
3783
- slot: "sidebar-group-label",
3784
- sidebar: "group-label"
3785
- }
3786
- });
3787
- };
3788
- var SidebarGroupAction = ({ className, render, ...props }) => {
3789
- return useRender({
3790
- defaultTagName: "button",
3791
- props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
3792
- render,
3793
- state: {
3794
- slot: "sidebar-group-action",
3795
- sidebar: "group-action"
3796
- }
3797
- });
3798
- };
3799
- var SidebarGroupContent = ({ className, ...props }) => {
3800
- return /* @__PURE__ */ jsx("div", {
3801
- "data-slot": "sidebar-group-content",
3802
- "data-sidebar": "group-content",
3803
- className: cn("w-full text-sm", className),
3804
- ...props
3805
- });
3806
- };
3807
- var SidebarMenu = ({ className, ...props }) => {
3808
- return /* @__PURE__ */ jsx("ul", {
3809
- "data-slot": "sidebar-menu",
3810
- "data-sidebar": "menu",
3811
- className: cn("flex w-full min-w-0 flex-col gap-0", className),
3812
- ...props
3813
- });
3814
- };
3815
- var SidebarMenuItem = ({ className, ...props }) => {
3816
- return /* @__PURE__ */ jsx("li", {
3817
- "data-slot": "sidebar-menu-item",
3818
- "data-sidebar": "menu-item",
3819
- className: cn("group/menu-item relative", className),
3820
- ...props
3821
- });
3822
- };
3823
- var sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
3824
- variants: {
3825
- variant: {
3826
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
3827
- outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
3828
- },
3829
- size: {
3830
- default: "h-8 text-sm",
3831
- sm: "h-7 text-xs",
3832
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
3833
- }
3834
- },
3835
- defaultVariants: {
3836
- variant: "default",
3837
- size: "default"
3838
- }
3839
- });
3840
- var SidebarMenuButton = ({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) => {
3841
- const { isMobile, state } = useSidebar();
3842
- const comp = useRender({
3843
- defaultTagName: "button",
3844
- props: mergeProps({ className: cn(sidebarMenuButtonVariants({
3845
- variant,
3846
- size
3847
- }), className) }, props),
3848
- render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
3849
- state: {
3850
- slot: "sidebar-menu-button",
3851
- sidebar: "menu-button",
3852
- size,
3853
- active: isActive
3854
- }
3855
- });
3856
- if (!tooltip) return comp;
3857
- if (typeof tooltip === "string") tooltip = { children: tooltip };
3858
- return /* @__PURE__ */ jsxs(Tooltip$1, { children: [comp, /* @__PURE__ */ jsx(TooltipContent, {
3859
- side: "right",
3860
- align: "center",
3861
- hidden: state !== "collapsed" || isMobile,
3862
- ...tooltip
3863
- })] });
3864
- };
3865
- var SidebarMenuAction = ({ className, render, showOnHover = false, ...props }) => {
3866
- return useRender({
3867
- defaultTagName: "button",
3868
- props: mergeProps({ className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className) }, props),
3869
- render,
3870
- state: {
3871
- slot: "sidebar-menu-action",
3872
- sidebar: "menu-action"
3873
- }
3874
- });
3875
- };
3876
- var SidebarMenuBadge = ({ className, ...props }) => {
3877
- return /* @__PURE__ */ jsx("div", {
3878
- "data-slot": "sidebar-menu-badge",
3879
- "data-sidebar": "menu-badge",
3880
- className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
3881
- ...props
3882
- });
3883
- };
3884
- var SidebarMenuSkeleton = ({ className, showIcon = false, ...props }) => {
3885
- const [width] = React.useState(() => {
3886
- return `${Math.floor(Math.random() * 40) + 50}%`;
3887
- });
3888
- return /* @__PURE__ */ jsxs("div", {
3889
- "data-slot": "sidebar-menu-skeleton",
3890
- "data-sidebar": "menu-skeleton",
3891
- className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
3892
- ...props,
3893
- children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
3894
- className: "size-4 rounded-md",
3895
- "data-sidebar": "menu-skeleton-icon"
3896
- }), /* @__PURE__ */ jsx(Skeleton, {
3897
- className: "h-4 max-w-(--skeleton-width) flex-1",
3898
- "data-sidebar": "menu-skeleton-text",
3899
- style: { "--skeleton-width": width }
3900
- })]
3901
- });
3902
- };
3903
- var SidebarMenuSub = ({ className, ...props }) => {
3904
- return /* @__PURE__ */ jsx("ul", {
3905
- "data-slot": "sidebar-menu-sub",
3906
- "data-sidebar": "menu-sub",
3907
- className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
3908
- ...props
3909
- });
3910
- };
3911
- var SidebarMenuSubItem = ({ className, ...props }) => {
3912
- return /* @__PURE__ */ jsx("li", {
3913
- "data-slot": "sidebar-menu-sub-item",
3914
- "data-sidebar": "menu-sub-item",
3915
- className: cn("group/menu-sub-item relative", className),
3916
- ...props
3917
- });
3918
- };
3919
- var SidebarMenuSubButton = ({ render, size = "md", isActive = false, className, ...props }) => {
3920
- return useRender({
3921
- defaultTagName: "a",
3922
- props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
3923
- render,
3924
- state: {
3925
- slot: "sidebar-menu-sub-button",
3926
- sidebar: "menu-sub-button",
3927
- size,
3928
- active: isActive
3929
- }
3930
- });
3931
- };
3932
- //#endregion
3933
- //#region ../ui/src/components/ui/spinner/spinner.tsx
3934
- var spinnerVariants = cva("animate-spin motion-reduce:animate-none", {
3935
- variants: { size: {
3936
- xs: "size-3",
3937
- sm: "size-4",
3938
- default: "size-5",
3939
- lg: "size-6",
3940
- xl: "size-8"
3941
- } },
3942
- defaultVariants: { size: "default" }
3943
- });
3944
- var Spinner = ({ className, size = "default", ...props }) => {
3945
- return /* @__PURE__ */ jsx(IconLoader, {
3946
- "data-slot": "spinner",
3947
- role: "status",
3948
- "aria-label": "Loading",
3949
- className: cn(spinnerVariants({ size }), className),
3950
- ...props
3951
- });
3952
- };
3953
- //#endregion
3954
- //#region ../ui/src/components/ui/switch/switch.tsx
3955
- var Switch$1 = ({ className, size = "default", ...props }) => {
3956
- return /* @__PURE__ */ jsx(Switch.Root, {
3957
- "data-slot": "switch",
3958
- "data-size": size,
3959
- className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all motion-reduce:transition-none outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
3960
- ...props,
3961
- children: /* @__PURE__ */ jsx(Switch.Thumb, {
3962
- "data-slot": "switch-thumb",
3963
- className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform motion-reduce:transition-none group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
3964
- })
3965
- });
3966
- };
3967
- //#endregion
3968
- //#region ../ui/src/components/ui/table/table.tsx
3969
- var Table = ({ className, ...props }) => {
3970
- return /* @__PURE__ */ jsx("div", {
3971
- "data-slot": "table-container",
3972
- className: "relative w-full overflow-x-auto",
3973
- children: /* @__PURE__ */ jsx("table", {
3974
- "data-slot": "table",
3975
- className: cn("w-full caption-bottom text-sm", className),
3976
- ...props
3977
- })
3978
- });
3979
- };
3980
- var TableHeader = ({ className, ...props }) => {
3981
- return /* @__PURE__ */ jsx("thead", {
3982
- "data-slot": "table-header",
3983
- className: cn("[&_tr]:border-b", className),
3984
- ...props
3985
- });
3986
- };
3987
- var TableBody = ({ className, ...props }) => {
3988
- return /* @__PURE__ */ jsx("tbody", {
3989
- "data-slot": "table-body",
3990
- className: cn("[&_tr:last-child]:border-0", className),
3991
- ...props
3992
- });
3993
- };
3994
- var TableFooter = ({ className, ...props }) => {
3995
- return /* @__PURE__ */ jsx("tfoot", {
3996
- "data-slot": "table-footer",
3997
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
3998
- ...props
3999
- });
4000
- };
4001
- var TableRow = ({ className, ...props }) => {
4002
- return /* @__PURE__ */ jsx("tr", {
4003
- "data-slot": "table-row",
4004
- className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
4005
- ...props
4006
- });
4007
- };
4008
- var TableHead = ({ className, ...props }) => {
4009
- return /* @__PURE__ */ jsx("th", {
4010
- "data-slot": "table-head",
4011
- className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
4012
- ...props
4013
- });
4014
- };
4015
- var TableCell = ({ className, ...props }) => {
4016
- return /* @__PURE__ */ jsx("td", {
4017
- "data-slot": "table-cell",
4018
- className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
4019
- ...props
4020
- });
4021
- };
4022
- var TableCaption = ({ className, ...props }) => {
4023
- return /* @__PURE__ */ jsx("caption", {
4024
- "data-slot": "table-caption",
4025
- className: cn("mt-4 text-sm text-muted-foreground", className),
4026
- ...props
4027
- });
4028
- };
4029
- //#endregion
4030
- //#region ../ui/src/components/ui/tabs/tabs.tsx
4031
- var Tabs$1 = ({ value, defaultValue, onValueChange, className, orientation = "horizontal", children }) => /* @__PURE__ */ jsx(Tabs.Root, {
4032
- "data-slot": "tabs",
4033
- "data-orientation": orientation,
4034
- value,
4035
- defaultValue,
4036
- orientation,
4037
- onValueChange: (next) => {
4038
- onValueChange?.(String(next));
4039
- },
4040
- className: cn("group/tabs flex w-full gap-2 data-horizontal:flex-col", className),
4041
- children
4042
- });
4043
- var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
4044
- variants: { variant: {
4045
- default: "bg-muted",
4046
- line: "gap-1 bg-transparent"
4047
- } },
4048
- defaultVariants: { variant: "default" }
4049
- });
4050
- var TabsList = ({ className, variant = "default", children }) => /* @__PURE__ */ jsx(Tabs.List, {
4051
- "data-slot": "tabs-list",
4052
- "data-variant": variant,
4053
- className: cn(tabsListVariants({ variant }), className),
4054
- children
4055
- });
4056
- var TabsTrigger = ({ value, disabled, className, children }) => /* @__PURE__ */ jsx(Tabs.Tab, {
4057
- value,
4058
- disabled,
4059
- className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
4060
- children
4061
- });
4062
- var TabsContent = ({ value, keepMounted = false, className, children }) => /* @__PURE__ */ jsx(Tabs.Panel, {
4063
- value,
4064
- keepMounted,
4065
- className: cn("flex-1 text-sm outline-none", className),
4066
- children
4067
- });
4068
- //#endregion
4069
- //#region ../ui/src/components/ui/toast/toast.tsx
4070
- var toast = Toast.createToastManager();
4071
- var ToastProvider = ({ ...props }) => {
4072
- return /* @__PURE__ */ jsx(Toast.Provider, { ...props });
4073
- };
4074
- var ToastPortal = ({ ...props }) => {
4075
- return /* @__PURE__ */ jsx(Toast.Portal, {
4076
- "data-slot": "toast-portal",
4077
- ...props
4078
- });
4079
- };
4080
- var ToastViewport = ({ className, ...props }) => {
4081
- return /* @__PURE__ */ jsx(Toast.Viewport, {
4082
- "data-slot": "toast-viewport",
4083
- className: cn("pointer-events-none fixed inset-x-4 bottom-4 z-50 mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full", className),
4084
- ...props
4085
- });
4086
- };
4087
- var Toast$1 = ({ className, ...props }) => {
4088
- return /* @__PURE__ */ jsx(Toast.Root, {
4089
- "data-slot": "toast",
4090
- className: cn("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]", "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms] motion-reduce:transition-none", "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']", "data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]", "data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", "data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", className),
4091
- ...props
4092
- });
4093
- };
4094
- var ToastContent = ({ className, ...props }) => {
4095
- return /* @__PURE__ */ jsx(Toast.Content, {
4096
- "data-slot": "toast-content",
4097
- className: cn("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-behind:opacity-0 data-expanded:opacity-100", className),
4098
- ...props
4099
- });
4100
- };
4101
- var ToastTitle = ({ className, ...props }) => {
4102
- return /* @__PURE__ */ jsx(Toast.Title, {
4103
- "data-slot": "toast-title",
4104
- className: cn("text-sm font-medium", className),
4105
- ...props
4106
- });
4107
- };
4108
- var ToastDescription = ({ className, ...props }) => {
4109
- return /* @__PURE__ */ jsx(Toast.Description, {
4110
- "data-slot": "toast-description",
4111
- className: cn("text-sm text-muted-foreground", className),
4112
- ...props
4113
- });
4114
- };
4115
- var ToastAction = ({ className, render = /* @__PURE__ */ jsx(Button$1, {
4116
- variant: "outline",
4117
- size: "sm"
4118
- }), ...props }) => {
4119
- return /* @__PURE__ */ jsx(Toast.Action, {
4120
- "data-slot": "toast-action",
4121
- render,
4122
- className: cn("shrink-0", className),
4123
- ...props
4124
- });
4125
- };
4126
- var ToastClose = ({ className, children, render = /* @__PURE__ */ jsx(Button$1, {
4127
- variant: "ghost",
4128
- size: "icon-sm"
4129
- }), ...props }) => {
4130
- return /* @__PURE__ */ jsx(Toast.Close, {
4131
- "data-slot": "toast-close",
4132
- "aria-label": "Close toast",
4133
- render,
4134
- className: cn("relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground", className),
4135
- ...props,
4136
- children: children ?? /* @__PURE__ */ jsx(IconX, { "aria-hidden": "true" })
4137
- });
4138
- };
4139
- var ToastIcon = ({ type }) => {
4140
- let icon = null;
4141
- if (type === "success") icon = /* @__PURE__ */ jsx(IconCircleCheck, { "aria-hidden": "true" });
4142
- if (type === "info") icon = /* @__PURE__ */ jsx(IconInfoCircle, { "aria-hidden": "true" });
4143
- if (type === "warning") icon = /* @__PURE__ */ jsx(IconAlertTriangle, { "aria-hidden": "true" });
4144
- if (type === "error") icon = /* @__PURE__ */ jsx(IconAlertOctagon, {
4145
- className: "text-destructive",
4146
- "aria-hidden": "true"
4147
- });
4148
- if (type === "loading") icon = /* @__PURE__ */ jsx(IconLoader, {
4149
- className: "animate-spin motion-reduce:animate-none",
4150
- "aria-hidden": "true"
4151
- });
4152
- if (!icon) return null;
4153
- return /* @__PURE__ */ jsx("span", {
4154
- "data-slot": "toast-icon",
4155
- className: "shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
4156
- children: icon
4157
- });
4158
- };
4159
- var ToastList = () => {
4160
- const { toasts } = Toast.useToastManager();
4161
- return toasts.map((toastItem) => /* @__PURE__ */ jsx(Toast$1, {
4162
- toast: toastItem,
4163
- children: /* @__PURE__ */ jsxs(ToastContent, { children: [
4164
- /* @__PURE__ */ jsx(ToastIcon, { type: toastItem.type }),
4165
- /* @__PURE__ */ jsxs("div", {
4166
- className: "flex min-w-0 flex-1 flex-col gap-1",
4167
- children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
4168
- }),
4169
- /* @__PURE__ */ jsx(ToastAction, {}),
4170
- /* @__PURE__ */ jsx(ToastClose, {})
4171
- ] })
4172
- }, toastItem.id));
4173
- };
4174
- var Toaster = ({ children, toastManager = toast, ...props }) => {
4175
- return /* @__PURE__ */ jsxs(ToastProvider, {
4176
- toastManager,
4177
- ...props,
4178
- children: [children, /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(ToastViewport, { children: /* @__PURE__ */ jsx(ToastList, {}) }) })]
4179
- });
4180
- };
4181
- var createToastManager = Toast.createToastManager;
4182
- var useToastManager = Toast.useToastManager;
4183
- //#endregion
4184
- //#region ../ui/src/components/ui/toggle/toggle.tsx
4185
- var toggleVariants = cva("inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-transparent text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", {
4186
- variants: {
4187
- variant: {
4188
- default: "bg-transparent hover:bg-muted hover:text-foreground data-pressed:bg-muted",
4189
- outline: "border-border bg-background hover:bg-muted hover:text-foreground data-pressed:bg-muted dark:border-input dark:bg-input/30 dark:hover:bg-input/50"
4190
- },
4191
- size: {
4192
- sm: "h-7 px-2.5 text-[0.8rem]",
4193
- default: "h-8 px-2.5",
4194
- lg: "h-9 px-3"
4195
- }
4196
- },
4197
- defaultVariants: {
4198
- variant: "default",
4199
- size: "default"
4200
- }
4201
- });
4202
- var Toggle$1 = ({ className, variant = "default", size = "default", ...props }) => {
4203
- return /* @__PURE__ */ jsx(Toggle, {
4204
- "data-slot": "toggle",
4205
- className: cn(toggleVariants({
4206
- variant,
4207
- size,
4208
- className
4209
- })),
4210
- ...props
4211
- });
4212
- };
4213
- //#endregion
4214
- //#region ../ui/src/components/ui/toggle-group/toggle-group.tsx
4215
- var ToggleGroupContext = createContext({
4216
- variant: "default",
4217
- size: "default",
4218
- spacing: 2,
4219
- orientation: "horizontal"
4220
- });
4221
- var ToggleGroup$1 = ({ className, variant = "default", size = "default", spacing = 2, orientation = "horizontal", children, ...props }) => {
4222
- return /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
4223
- value: {
4224
- variant,
4225
- size,
4226
- spacing,
4227
- orientation
4228
- },
4229
- children: /* @__PURE__ */ jsx(ToggleGroup, {
4230
- "data-slot": "toggle-group",
4231
- "data-variant": variant,
4232
- "data-size": size,
4233
- "data-spacing": spacing,
4234
- "data-orientation": orientation,
4235
- orientation,
4236
- "aria-orientation": void 0,
4237
- style: { gap: `calc(var(--spacing) * ${spacing})` },
4238
- className: cn("group/toggle-group flex w-fit flex-row items-center rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", className),
4239
- ...props,
4240
- children
4241
- })
4242
- });
4243
- };
4244
- var ToggleGroupItem = ({ className, variant, size, ...props }) => {
4245
- const ctx = useContext(ToggleGroupContext);
4246
- const resolvedVariant = variant ?? ctx.variant ?? "default";
4247
- const resolvedSize = size ?? ctx.size ?? "default";
4248
- return /* @__PURE__ */ jsx(Toggle, {
4249
- "data-slot": "toggle-group-item",
4250
- "data-variant": resolvedVariant,
4251
- "data-size": resolvedSize,
4252
- "data-spacing": ctx.spacing,
4253
- className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
4254
- variant: resolvedVariant,
4255
- size: resolvedSize
4256
- }), className),
4257
- ...props
4258
- });
4259
- };
4260
- //#endregion
4261
- export { SidebarProvider as $, AlertDialogAction as $a, ChartContainer as $i, Kbd as $n, DrawerTrigger as $r, PopoverHeader as $t, TableRow as A, BreadcrumbLink as Aa, InputGroupText as Ai, MessageGroup as An, EmptyTitle as Ar, ResizablePanel as At, SidebarGroupLabel as B, AvatarGroupCount as Ba, DialogOverlay as Bi, MenubarRadioGroup as Bn, DropdownMenuSeparator as Br, QuestionnaireError as Bt, Table as C, Bubble as Ca, CommandList as Ci, useMessageScroller as Cn, Button$1 as Co, FieldError as Cr, SelectSeparator as Ct, TableFooter as D, Breadcrumb as Da, InputGroupAddon as Di, MessageAvatar as Dn, EmptyDescription as Dr, ScrollBar as Dt, TableCell as E, BubbleReactions as Ea, InputGroup as Ei, Message as En, EmptyContent as Er, ScrollArea$1 as Et, SidebarContent as F, badgeVariants as Fa, DialogClose as Fi, MenubarGroup as Fn, DropdownMenuItem as Fr, QuestionnaireActions as Ft, SidebarMenuAction as G, AttachmentContent as Ga, ComboboxContent as Gi, MenubarSubContent as Gn, DropdownMenuTrigger as Gr, QuestionnaireProgress as Gt, SidebarInput as H, Attachment as Ha, DialogTitle as Hi, MenubarSeparator as Hn, DropdownMenuSub as Hr, QuestionnaireItem as Ht, SidebarFooter as I, Avatar$1 as Ia, DialogContent as Ii, MenubarItem as In, DropdownMenuLabel as Ir, QuestionnaireChoice as It, SidebarMenuItem as J, AttachmentMedia as Ja, ComboboxItem as Ji, Marker as Jn, DrawerContent as Jr, QuestionnaireTitle as Jt, SidebarMenuBadge as K, AttachmentDescription as Ka, ComboboxEmpty as Ki, MenubarSubTrigger as Kn, Drawer as Kr, QuestionnaireSkip as Kt, SidebarGroup as L, AvatarBadge as La, DialogDescription as Li, MenubarLabel as Ln, DropdownMenuPortal as Lr, QuestionnaireChoiceDescription as Lt, Spinner as M, BreadcrumbPage as Ma, Textarea as Mi, Menubar$1 as Mn, DropdownMenuCheckboxItem as Mr, RadioGroup$1 as Mt, spinnerVariants as N, BreadcrumbSeparator as Na, Input$1 as Ni, MenubarCheckboxItem as Nn, DropdownMenuContent as Nr, RadioGroupItem as Nt, TableHead as O, BreadcrumbEllipsis as Oa, InputGroupButton as Oi, MessageContent as On, EmptyHeader as Or, useMergedRefs as Ot, Sidebar as P, Badge as Pa, Dialog$1 as Pi, MenubarContent as Pn, DropdownMenuGroup as Pr, Questionnaire$1 as Pt, SidebarMenuSubItem as Q, AlertDialog$1 as Qa, Checkbox$1 as Qi, Label as Qn, DrawerTitle as Qr, PopoverDescription as Qt, SidebarGroupAction as R, AvatarFallback as Ra, DialogFooter as Ri, MenubarMenu as Rn, DropdownMenuRadioGroup as Rr, QuestionnaireChoices as Rt, tabsListVariants as S, ButtonGroupText as Sa, CommandItem as Si, MessageScrollerViewport as Sn, Slider$1 as So, FieldDescription as Sr, SelectLabel as St, TableCaption as T, BubbleGroup as Ta, CommandShortcut as Ti, useMessageScrollerVisibility as Tn, cn as To, Empty as Tr, SelectValue as Tt, SidebarInset as U, AttachmentAction as Ua, DialogTrigger as Ui, MenubarShortcut as Un, DropdownMenuSubContent as Ur, QuestionnaireNext as Ut, SidebarHeader as V, AvatarImage as Va, DialogPortal as Vi, MenubarRadioItem as Vn, DropdownMenuShortcut as Vr, QuestionnaireInput as Vt, SidebarMenu as W, AttachmentActions as Wa, Combobox$1 as Wi, MenubarSub as Wn, DropdownMenuSubTrigger as Wr, QuestionnairePrevious as Wt, SidebarMenuSub as X, AttachmentTrigger as Xa, CollapsibleContent as Xi, MarkerIcon as Xn, DrawerFooter as Xr, Popover$1 as Xt, SidebarMenuSkeleton as Y, AttachmentTitle as Ya, Collapsible$1 as Yi, MarkerContent as Yn, DrawerDescription as Yr, Progress$1 as Yt, SidebarMenuSubButton as Z, AspectRatio as Za, CollapsibleTrigger as Zi, markerVariants as Zn, DrawerHeader as Zr, PopoverContent as Zt, useToastManager as _, CardTitle as _a, Command$1 as _i, MessageScroller$1 as _n, AccordionTrigger as _o, indicatorVariants as _r, SheetTrigger as _t, Toast$1 as a, Carousel as aa, ContextMenuGroup as ai, NavigationMenu$1 as an, AlertDialogMedia as ao, ItemFooter as ar, TooltipContent as at, TabsList as b, ButtonGroup as ba, CommandGroup as bi, MessageScrollerItem as bn, formatMediaTime as bo, HoverCardTrigger as br, SelectGroup as bt, ToastContent as c, CarouselNext as ca, ContextMenuPortal as ci, NavigationMenuItem as cn, AlertDialogTitle as co, ItemMedia as cr, Skeleton as ct, ToastProvider as d, Card as da, ContextMenuSeparator as di, NavigationMenuPositioner as dn, AlertAction as do, Separator$1 as dr, SheetClose as dt, ChartLegend as ea, DirectionProvider as ei, PopoverTitle as en, AlertDialogCancel as eo, KbdGroup as er, SidebarRail as et, ToastTitle as f, CardAction as fa, ContextMenuShortcut as fi, NavigationMenuTrigger as fn, AlertDescription as fo, InputOTP as fr, SheetContent as ft, toast as g, CardHeader as ga, ContextMenuTrigger as gi, NativeSelectOption as gn, AccordionItem as go, Indicator as gr, SheetTitle as gt, createToastManager as h, CardFooter as ha, ContextMenuSubTrigger as hi, NativeSelectOptGroup as hn, AccordionContent as ho, InputOTPSlot as hr, SheetHeader as ht, toggleVariants as i, ChartTooltipContent as ia, ContextMenuContent as ii, getPaginationRange as in, AlertDialogHeader as io, ItemDescription as ir, Tooltip$1 as it, Switch$1 as j, BreadcrumbList as ja, InputGroupTextarea as ji, MessageHeader as jn, DropdownMenu as jr, ResizablePanelGroup as jt, TableHeader as k, BreadcrumbItem as ka, InputGroupInput as ki, MessageFooter as kn, EmptyMedia as kr, ResizableHandle as kt, ToastDescription as l, CarouselPrevious as la, ContextMenuRadioGroup as li, NavigationMenuLink as ln, AlertDialogTrigger as lo, ItemSeparator as lr, useIsMobile as lt, Toaster as m, CardDescription as ma, ContextMenuSubContent as mi, NativeSelect as mn, Accordion$1 as mo, InputOTPSeparator as mr, SheetFooter as mt, ToggleGroupItem as n, ChartStyle as na, ContextMenu$1 as ni, Pagination as nn, AlertDialogDescription as no, ItemActions as nr, SidebarTrigger as nt, ToastAction as o, CarouselContent as oa, ContextMenuItem as oi, NavigationMenuContent as on, AlertDialogOverlay as oo, ItemGroup as or, TooltipProvider as ot, ToastViewport as p, CardContent as pa, ContextMenuSub as pi, navigationMenuTriggerStyle as pn, AlertTitle as po, InputOTPGroup as pr, SheetDescription as pt, SidebarMenuButton as q, AttachmentGroup as qa, ComboboxInput as qi, MenubarTrigger as qn, DrawerClose as qr, QuestionnaireSubmit as qt, Toggle$1 as r, ChartTooltip as ra, ContextMenuCheckboxItem as ri, clampPage as rn, AlertDialogFooter as ro, ItemContent as rr, useSidebar as rt, ToastClose as s, CarouselItem as sa, ContextMenuLabel as si, NavigationMenuIndicator as sn, AlertDialogPortal as so, ItemHeader as sr, TooltipTrigger as st, ToggleGroup$1 as t, ChartLegendContent as ta, useDirection as ti, PopoverTrigger as tn, AlertDialogContent as to, Item as tr, SidebarSeparator as tt, ToastPortal as u, useCarousel as ua, ContextMenuRadioItem as ui, NavigationMenuList as un, Alert as uo, ItemTitle as ur, Sheet as ut, Tabs$1 as v, Calendar as va, CommandDialog as vi, MessageScrollerButton as vn, VideoPlayer as vo, HoverCard as vr, Select$1 as vt, TableBody as w, BubbleContent as wa, CommandSeparator as wi, useMessageScrollerScrollable as wn, buttonVariants as wo, FieldLabel as wr, SelectTrigger as wt, TabsTrigger as x, ButtonGroupSeparator as xa, CommandInput as xi, MessageScrollerProvider as xn, useMediaPlayer as xo, Field$1 as xr, SelectItem as xt, TabsContent as y, CalendarDayButton as ya, CommandEmpty as yi, MessageScrollerContent as yn, AudioPlayer as yo, HoverCardContent as yr, SelectContent as yt, SidebarGroupContent as z, AvatarGroup as za, DialogHeader as zi, MenubarPortal as zn, DropdownMenuRadioItem as zr, QuestionnaireDescription as zt };
4262
-
4263
- //# sourceMappingURL=toggle-group-ByNq8g7H.js.map