@voyantjs/ui 0.6.7

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 (262) hide show
  1. package/README.md +30 -0
  2. package/dist/components/accordion.d.ts +7 -0
  3. package/dist/components/accordion.d.ts.map +1 -0
  4. package/dist/components/accordion.js +17 -0
  5. package/dist/components/alert-dialog.d.ts +19 -0
  6. package/dist/components/alert-dialog.d.ts.map +1 -0
  7. package/dist/components/alert-dialog.js +42 -0
  8. package/dist/components/alert.d.ts +11 -0
  9. package/dist/components/alert.d.ts.map +1 -0
  10. package/dist/components/alert.js +27 -0
  11. package/dist/components/aspect-ratio.d.ts +5 -0
  12. package/dist/components/aspect-ratio.d.ts.map +1 -0
  13. package/dist/components/aspect-ratio.js +8 -0
  14. package/dist/components/avatar.d.ts +12 -0
  15. package/dist/components/avatar.d.ts.map +1 -0
  16. package/dist/components/avatar.js +22 -0
  17. package/dist/components/badge.d.ts +8 -0
  18. package/dist/components/badge.d.ts.map +1 -0
  19. package/dist/components/badge.js +33 -0
  20. package/dist/components/breadcrumb.d.ts +11 -0
  21. package/dist/components/breadcrumb.d.ts.map +1 -0
  22. package/dist/components/breadcrumb.js +36 -0
  23. package/dist/components/button-group.d.ts +11 -0
  24. package/dist/components/button-group.d.ts.map +1 -0
  25. package/dist/components/button-group.js +36 -0
  26. package/dist/components/button.d.ts +9 -0
  27. package/dist/components/button.d.ts.map +1 -0
  28. package/dist/components/button.js +34 -0
  29. package/dist/components/calendar.d.ts +11 -0
  30. package/dist/components/calendar.d.ts.map +1 -0
  31. package/dist/components/calendar.js +76 -0
  32. package/dist/components/card.d.ts +12 -0
  33. package/dist/components/card.d.ts.map +1 -0
  34. package/dist/components/card.js +24 -0
  35. package/dist/components/carousel.d.ts +29 -0
  36. package/dist/components/carousel.d.ts.map +1 -0
  37. package/dist/components/carousel.js +91 -0
  38. package/dist/components/chart.d.ts +45 -0
  39. package/dist/components/chart.d.ts.map +1 -0
  40. package/dist/components/chart.js +121 -0
  41. package/dist/components/checkbox.d.ts +4 -0
  42. package/dist/components/checkbox.d.ts.map +1 -0
  43. package/dist/components/checkbox.js +8 -0
  44. package/dist/components/collapsible.d.ts +6 -0
  45. package/dist/components/collapsible.d.ts.map +1 -0
  46. package/dist/components/collapsible.js +12 -0
  47. package/dist/components/combobox.d.ts +25 -0
  48. package/dist/components/combobox.d.ts.map +1 -0
  49. package/dist/components/combobox.js +57 -0
  50. package/dist/components/command.d.ts +20 -0
  51. package/dist/components/command.d.ts.map +1 -0
  52. package/dist/components/command.js +35 -0
  53. package/dist/components/confirm-action-button.d.ts +14 -0
  54. package/dist/components/confirm-action-button.d.ts.map +1 -0
  55. package/dist/components/confirm-action-button.js +21 -0
  56. package/dist/components/context-menu.d.ts +30 -0
  57. package/dist/components/context-menu.d.ts.map +1 -0
  58. package/dist/components/context-menu.js +50 -0
  59. package/dist/components/contract-template-authoring-help.d.ts +32 -0
  60. package/dist/components/contract-template-authoring-help.d.ts.map +1 -0
  61. package/dist/components/contract-template-authoring-help.js +37 -0
  62. package/dist/components/country-combobox.d.ts +9 -0
  63. package/dist/components/country-combobox.d.ts.map +1 -0
  64. package/dist/components/country-combobox.js +47 -0
  65. package/dist/components/currency-combobox.d.ts +14 -0
  66. package/dist/components/currency-combobox.d.ts.map +1 -0
  67. package/dist/components/currency-combobox.js +53 -0
  68. package/dist/components/dashboard-widgets.d.ts +66 -0
  69. package/dist/components/dashboard-widgets.d.ts.map +1 -0
  70. package/dist/components/dashboard-widgets.js +64 -0
  71. package/dist/components/data-table-column-header.d.ts +9 -0
  72. package/dist/components/data-table-column-header.d.ts.map +1 -0
  73. package/dist/components/data-table-column-header.js +12 -0
  74. package/dist/components/data-table-pagination.d.ts +7 -0
  75. package/dist/components/data-table-pagination.d.ts.map +1 -0
  76. package/dist/components/data-table-pagination.js +11 -0
  77. package/dist/components/data-table.d.ts +22 -0
  78. package/dist/components/data-table.d.ts.map +1 -0
  79. package/dist/components/data-table.js +55 -0
  80. package/dist/components/date-picker.d.ts +38 -0
  81. package/dist/components/date-picker.d.ts.map +1 -0
  82. package/dist/components/date-picker.js +120 -0
  83. package/dist/components/date-time-picker.d.ts +30 -0
  84. package/dist/components/date-time-picker.d.ts.map +1 -0
  85. package/dist/components/date-time-picker.js +75 -0
  86. package/dist/components/dialog.d.ts +18 -0
  87. package/dist/components/dialog.d.ts.map +1 -0
  88. package/dist/components/dialog.js +37 -0
  89. package/dist/components/direction.d.ts +2 -0
  90. package/dist/components/direction.d.ts.map +1 -0
  91. package/dist/components/direction.js +1 -0
  92. package/dist/components/drawer.d.ts +14 -0
  93. package/dist/components/drawer.d.ts.map +1 -0
  94. package/dist/components/drawer.js +34 -0
  95. package/dist/components/dropdown-menu.d.ts +30 -0
  96. package/dist/components/dropdown-menu.d.ts.map +1 -0
  97. package/dist/components/dropdown-menu.js +50 -0
  98. package/dist/components/empty.d.ts +12 -0
  99. package/dist/components/empty.d.ts.map +1 -0
  100. package/dist/components/empty.js +33 -0
  101. package/dist/components/field.d.ts +25 -0
  102. package/dist/components/field.d.ts.map +1 -0
  103. package/dist/components/field.js +65 -0
  104. package/dist/components/hover-card.d.ts +6 -0
  105. package/dist/components/hover-card.d.ts.map +1 -0
  106. package/dist/components/hover-card.js +13 -0
  107. package/dist/components/index.d.ts +86 -0
  108. package/dist/components/index.d.ts.map +1 -0
  109. package/dist/components/index.js +85 -0
  110. package/dist/components/input-group.d.ts +19 -0
  111. package/dist/components/input-group.d.ts.map +1 -0
  112. package/dist/components/input-group.js +73 -0
  113. package/dist/components/input-otp.d.ts +12 -0
  114. package/dist/components/input-otp.d.ts.map +1 -0
  115. package/dist/components/input-otp.js +20 -0
  116. package/dist/components/input.d.ts +4 -0
  117. package/dist/components/input.d.ts.map +1 -0
  118. package/dist/components/input.js +7 -0
  119. package/dist/components/item.d.ts +23 -0
  120. package/dist/components/item.d.ts.map +1 -0
  121. package/dist/components/item.js +78 -0
  122. package/dist/components/kbd.d.ts +4 -0
  123. package/dist/components/kbd.d.ts.map +1 -0
  124. package/dist/components/kbd.js +9 -0
  125. package/dist/components/label.d.ts +4 -0
  126. package/dist/components/label.d.ts.map +1 -0
  127. package/dist/components/label.js +8 -0
  128. package/dist/components/menubar.d.ts +30 -0
  129. package/dist/components/menubar.d.ts.map +1 -0
  130. package/dist/components/menubar.js +56 -0
  131. package/dist/components/native-select.d.ts +9 -0
  132. package/dist/components/native-select.d.ts.map +1 -0
  133. package/dist/components/native-select.js +13 -0
  134. package/dist/components/navigation-menu.d.ts +12 -0
  135. package/dist/components/navigation-menu.d.ts.map +1 -0
  136. package/dist/components/navigation-menu.js +31 -0
  137. package/dist/components/notification-deliveries-page.d.ts +2 -0
  138. package/dist/components/notification-deliveries-page.d.ts.map +1 -0
  139. package/dist/components/notification-deliveries-page.js +22 -0
  140. package/dist/components/notification-delivery-detail-dialog.d.ts +8 -0
  141. package/dist/components/notification-delivery-detail-dialog.d.ts.map +1 -0
  142. package/dist/components/notification-delivery-detail-dialog.js +29 -0
  143. package/dist/components/notification-reminder-rule-dialog.d.ts +10 -0
  144. package/dist/components/notification-reminder-rule-dialog.d.ts.map +1 -0
  145. package/dist/components/notification-reminder-rule-dialog.js +123 -0
  146. package/dist/components/notification-reminder-rules-page.d.ts +2 -0
  147. package/dist/components/notification-reminder-rules-page.d.ts.map +1 -0
  148. package/dist/components/notification-reminder-rules-page.js +35 -0
  149. package/dist/components/notification-reminder-runs-page.d.ts +2 -0
  150. package/dist/components/notification-reminder-runs-page.d.ts.map +1 -0
  151. package/dist/components/notification-reminder-runs-page.js +20 -0
  152. package/dist/components/notification-template-authoring-help.d.ts +11 -0
  153. package/dist/components/notification-template-authoring-help.d.ts.map +1 -0
  154. package/dist/components/notification-template-authoring-help.js +6 -0
  155. package/dist/components/notification-template-detail-page.d.ts +6 -0
  156. package/dist/components/notification-template-detail-page.d.ts.map +1 -0
  157. package/dist/components/notification-template-detail-page.js +145 -0
  158. package/dist/components/notification-template-dialog.d.ts +10 -0
  159. package/dist/components/notification-template-dialog.d.ts.map +1 -0
  160. package/dist/components/notification-template-dialog.js +296 -0
  161. package/dist/components/notification-templates-page.d.ts +2 -0
  162. package/dist/components/notification-templates-page.d.ts.map +1 -0
  163. package/dist/components/notification-templates-page.js +33 -0
  164. package/dist/components/overview-metric.d.ts +12 -0
  165. package/dist/components/overview-metric.d.ts.map +1 -0
  166. package/dist/components/overview-metric.js +6 -0
  167. package/dist/components/pagination.d.ts +18 -0
  168. package/dist/components/pagination.d.ts.map +1 -0
  169. package/dist/components/pagination.js +26 -0
  170. package/dist/components/popover.d.ts +10 -0
  171. package/dist/components/popover.d.ts.map +1 -0
  172. package/dist/components/popover.js +22 -0
  173. package/dist/components/progress.d.ts +8 -0
  174. package/dist/components/progress.d.ts.map +1 -0
  175. package/dist/components/progress.js +19 -0
  176. package/dist/components/radio-group.d.ts +6 -0
  177. package/dist/components/radio-group.d.ts.map +1 -0
  178. package/dist/components/radio-group.js +11 -0
  179. package/dist/components/resizable.d.ts +8 -0
  180. package/dist/components/resizable.d.ts.map +1 -0
  181. package/dist/components/resizable.js +13 -0
  182. package/dist/components/rich-text-editor.d.ts +13 -0
  183. package/dist/components/rich-text-editor.d.ts.map +1 -0
  184. package/dist/components/rich-text-editor.js +71 -0
  185. package/dist/components/rich-text-variable-extension.d.ts +6 -0
  186. package/dist/components/rich-text-variable-extension.d.ts.map +1 -0
  187. package/dist/components/rich-text-variable-extension.js +117 -0
  188. package/dist/components/scroll-area.d.ts +5 -0
  189. package/dist/components/scroll-area.d.ts.map +1 -0
  190. package/dist/components/scroll-area.js +10 -0
  191. package/dist/components/select.d.ts +16 -0
  192. package/dist/components/select.d.ts.map +1 -0
  193. package/dist/components/select.js +33 -0
  194. package/dist/components/selection-action-bar.d.ts +8 -0
  195. package/dist/components/selection-action-bar.d.ts.map +1 -0
  196. package/dist/components/selection-action-bar.js +7 -0
  197. package/dist/components/separator.d.ts +4 -0
  198. package/dist/components/separator.d.ts.map +1 -0
  199. package/dist/components/separator.js +7 -0
  200. package/dist/components/sheet.d.ts +15 -0
  201. package/dist/components/sheet.d.ts.map +1 -0
  202. package/dist/components/sheet.js +37 -0
  203. package/dist/components/sidebar-core.d.ts +34 -0
  204. package/dist/components/sidebar-core.d.ts.map +1 -0
  205. package/dist/components/sidebar-core.js +112 -0
  206. package/dist/components/sidebar-menu.d.ts +33 -0
  207. package/dist/components/sidebar-menu.d.ts.map +1 -0
  208. package/dist/components/sidebar-menu.js +128 -0
  209. package/dist/components/sidebar.d.ts +3 -0
  210. package/dist/components/sidebar.d.ts.map +1 -0
  211. package/dist/components/sidebar.js +2 -0
  212. package/dist/components/skeleton.d.ts +7 -0
  213. package/dist/components/skeleton.d.ts.map +1 -0
  214. package/dist/components/skeleton.js +6 -0
  215. package/dist/components/slider.d.ts +4 -0
  216. package/dist/components/slider.d.ts.map +1 -0
  217. package/dist/components/slider.js +9 -0
  218. package/dist/components/sonner.d.ts +4 -0
  219. package/dist/components/sonner.d.ts.map +1 -0
  220. package/dist/components/sonner.js +24 -0
  221. package/dist/components/spinner.d.ts +3 -0
  222. package/dist/components/spinner.d.ts.map +1 -0
  223. package/dist/components/spinner.js +7 -0
  224. package/dist/components/switch.d.ts +6 -0
  225. package/dist/components/switch.d.ts.map +1 -0
  226. package/dist/components/switch.js +7 -0
  227. package/dist/components/table.d.ts +11 -0
  228. package/dist/components/table.d.ts.map +1 -0
  229. package/dist/components/table.js +27 -0
  230. package/dist/components/tabs.d.ts +11 -0
  231. package/dist/components/tabs.d.ts.map +1 -0
  232. package/dist/components/tabs.js +28 -0
  233. package/dist/components/textarea.d.ts +4 -0
  234. package/dist/components/textarea.d.ts.map +1 -0
  235. package/dist/components/textarea.js +6 -0
  236. package/dist/components/toggle-group.d.ts +11 -0
  237. package/dist/components/toggle-group.d.ts.map +1 -0
  238. package/dist/components/toggle-group.js +24 -0
  239. package/dist/components/toggle.d.ts +9 -0
  240. package/dist/components/toggle.d.ts.map +1 -0
  241. package/dist/components/toggle.js +25 -0
  242. package/dist/components/tooltip.d.ts +7 -0
  243. package/dist/components/tooltip.d.ts.map +1 -0
  244. package/dist/components/tooltip.js +16 -0
  245. package/dist/components/typography.d.ts +18 -0
  246. package/dist/components/typography.d.ts.map +1 -0
  247. package/dist/components/typography.js +48 -0
  248. package/dist/hooks/use-mobile.d.ts +2 -0
  249. package/dist/hooks/use-mobile.d.ts.map +1 -0
  250. package/dist/hooks/use-mobile.js +15 -0
  251. package/dist/lib/crop-image.d.ts +4 -0
  252. package/dist/lib/crop-image.d.ts.map +1 -0
  253. package/dist/lib/crop-image.js +30 -0
  254. package/dist/lib/utils.d.ts +3 -0
  255. package/dist/lib/utils.d.ts.map +1 -0
  256. package/dist/lib/utils.js +5 -0
  257. package/dist/lib/zod-resolver.d.ts +4 -0
  258. package/dist/lib/zod-resolver.d.ts.map +1 -0
  259. package/dist/lib/zod-resolver.js +39 -0
  260. package/package.json +108 -0
  261. package/postcss.config.mjs +6 -0
  262. package/src/styles/globals.css +157 -0
@@ -0,0 +1,30 @@
1
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
2
+ import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
3
+ import type * as React from "react";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu";
5
+ declare function Menubar({ className, ...props }: MenubarPrimitive.Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>): import("react/jsx-runtime").JSX.Element;
7
+ declare function MenubarGroup({ ...props }: React.ComponentProps<typeof DropdownMenuGroup>): import("react/jsx-runtime").JSX.Element;
8
+ declare function MenubarPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPortal>): import("react/jsx-runtime").JSX.Element;
9
+ declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof DropdownMenuTrigger>): import("react/jsx-runtime").JSX.Element;
10
+ declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuContent>): import("react/jsx-runtime").JSX.Element;
11
+ declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuItem>): import("react/jsx-runtime").JSX.Element;
12
+ declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
13
+ inset?: boolean;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuRadioGroup>): import("react/jsx-runtime").JSX.Element;
16
+ declare function MenubarRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
17
+ inset?: boolean;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuLabel> & {
20
+ inset?: boolean;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuSeparator>): import("react/jsx-runtime").JSX.Element;
23
+ declare function MenubarShortcut({ className, ...props }: React.ComponentProps<typeof DropdownMenuShortcut>): import("react/jsx-runtime").JSX.Element;
24
+ declare function MenubarSub({ ...props }: React.ComponentProps<typeof DropdownMenuSub>): import("react/jsx-runtime").JSX.Element;
25
+ declare function MenubarSubTrigger({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
26
+ inset?: boolean;
27
+ }): import("react/jsx-runtime").JSX.Element;
28
+ declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuSubContent>): import("react/jsx-runtime").JSX.Element;
29
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
30
+ //# sourceMappingURL=menubar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AAExB,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,CAAC,KAAK,2CAQ/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,2CAE3E;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,2CAEjF;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,2CAEnF;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,2CAWhG;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAe,EACf,WAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,2CAclD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAa/C;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,GAAG;IACpC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAoBA;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,2CAE3F;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG;IACjC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAmBA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CASA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,2CAQpD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,2CAWnD;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,2CAE7E;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAYA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,2CAWrD;AAED,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,CAAA"}
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
4
+ import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
5
+ import { CheckIcon } from "lucide-react";
6
+ import { cn } from "../lib/utils";
7
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./dropdown-menu";
8
+ function Menubar({ className, ...props }) {
9
+ return (_jsx(MenubarPrimitive, { "data-slot": "menubar", className: cn("flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs", className), ...props }));
10
+ }
11
+ function MenubarMenu({ ...props }) {
12
+ return _jsx(DropdownMenu, { "data-slot": "menubar-menu", ...props });
13
+ }
14
+ function MenubarGroup({ ...props }) {
15
+ return _jsx(DropdownMenuGroup, { "data-slot": "menubar-group", ...props });
16
+ }
17
+ function MenubarPortal({ ...props }) {
18
+ return _jsx(DropdownMenuPortal, { "data-slot": "menubar-portal", ...props });
19
+ }
20
+ function MenubarTrigger({ className, ...props }) {
21
+ return (_jsx(DropdownMenuTrigger, { "data-slot": "menubar-trigger", className: cn("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className), ...props }));
22
+ }
23
+ function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
24
+ return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 rounded-md 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", className), ...props }));
25
+ }
26
+ function MenubarItem({ className, inset, variant = "default", ...props }) {
27
+ return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 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), ...props }));
28
+ }
29
+ function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
30
+ return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
31
+ }
32
+ function MenubarRadioGroup({ ...props }) {
33
+ return _jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
34
+ }
35
+ function MenubarRadioItem({ className, children, inset, ...props }) {
36
+ return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "menubar-radio-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
37
+ }
38
+ function MenubarLabel({ className, inset, ...props }) {
39
+ return (_jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-inset:pl-8", className), ...props }));
40
+ }
41
+ function MenubarSeparator({ className, ...props }) {
42
+ return (_jsx(DropdownMenuSeparator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
43
+ }
44
+ function MenubarShortcut({ className, ...props }) {
45
+ return (_jsx(DropdownMenuShortcut, { "data-slot": "menubar-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className), ...props }));
46
+ }
47
+ function MenubarSub({ ...props }) {
48
+ return _jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
49
+ }
50
+ function MenubarSubTrigger({ className, inset, ...props }) {
51
+ return (_jsx(DropdownMenuSubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className), ...props }));
52
+ }
53
+ function MenubarSubContent({ className, ...props }) {
54
+ return (_jsx(DropdownMenuSubContent, { "data-slot": "menubar-sub-content", className: cn("min-w-32 rounded-md 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", className), ...props }));
55
+ }
56
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
@@ -0,0 +1,9 @@
1
+ import type * as React from "react";
2
+ type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
3
+ size?: "sm" | "default";
4
+ };
5
+ declare function NativeSelect({ className, size, ...props }: NativeSelectProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function NativeSelectOption({ ...props }: React.ComponentProps<"option">): import("react/jsx-runtime").JSX.Element;
7
+ declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): import("react/jsx-runtime").JSX.Element;
8
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
9
+ //# sourceMappingURL=native-select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAGnC,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB,CAAA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAuBjF;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,2CAEvE;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAEtF;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDownIcon } from "lucide-react";
3
+ import { cn } from "../lib/utils";
4
+ function NativeSelect({ className, size = "default", ...props }) {
5
+ return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-slot": "native-select-wrapper", "data-size": size, children: [_jsx("select", { "data-slot": "native-select", "data-size": size, className: "h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] 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-8 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", ...props }), _jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
6
+ }
7
+ function NativeSelectOption({ ...props }) {
8
+ return _jsx("option", { "data-slot": "native-select-option", ...props });
9
+ }
10
+ function NativeSelectOptGroup({ className, ...props }) {
11
+ return _jsx("optgroup", { "data-slot": "native-select-optgroup", className: cn(className), ...props });
12
+ }
13
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -0,0 +1,12 @@
1
+ import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
2
+ declare function NavigationMenu({ align, className, children, ...props }: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, "align">): import("react/jsx-runtime").JSX.Element;
3
+ declare function NavigationMenuList({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>): import("react/jsx-runtime").JSX.Element;
4
+ declare function NavigationMenuItem({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
7
+ declare function NavigationMenuContent({ className, ...props }: NavigationMenuPrimitive.Content.Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function NavigationMenuPositioner({ className, side, sideOffset, align, alignOffset, ...props }: NavigationMenuPrimitive.Positioner.Props): import("react/jsx-runtime").JSX.Element;
9
+ declare function NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props): import("react/jsx-runtime").JSX.Element;
10
+ declare function NavigationMenuIndicator({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>): import("react/jsx-runtime").JSX.Element;
11
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle, };
12
+ //# sourceMappingURL=navigation-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../src/components/navigation-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAK1F,iBAAS,cAAc,CAAC,EACtB,KAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,2CAc9F;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,2CAQlE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,2CAQlE;AAED,QAAA,MAAM,0BAA0B,oFAE/B,CAAA;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,OAAO,CAAC,KAAK,2CAcvC;AAED,iBAAS,qBAAqB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,CAAC,OAAO,CAAC,KAAK,2CAW5F;AAED,iBAAS,wBAAwB,CAAC,EAChC,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAe,EACf,WAAe,EACf,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,UAAU,CAAC,KAAK,2CAoB1C;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,CAAC,IAAI,CAAC,KAAK,2CAWtF;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,2CAalE;AAED,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,GAC3B,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
3
+ import { cva } from "class-variance-authority";
4
+ import { ChevronDownIcon } from "lucide-react";
5
+ import { cn } from "../lib/utils";
6
+ function NavigationMenu({ align = "start", className, children, ...props }) {
7
+ return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuPositioner, { align: align })] }));
8
+ }
9
+ function NavigationMenuList({ className, ...props }) {
10
+ return (_jsx(NavigationMenuPrimitive.List, { "data-slot": "navigation-menu-list", className: cn("group flex flex-1 list-none items-center justify-center gap-0", className), ...props }));
11
+ }
12
+ function NavigationMenuItem({ className, ...props }) {
13
+ return (_jsx(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", className: cn("relative", className), ...props }));
14
+ }
15
+ const navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-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");
16
+ function NavigationMenuTrigger({ className, children, ...props }) {
17
+ return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })] }));
18
+ }
19
+ function NavigationMenuContent({ className, ...props }) {
20
+ return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("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-2 pr-2.5 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md 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), ...props }));
21
+ }
22
+ function NavigationMenuPositioner({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) {
23
+ return (_jsx(NavigationMenuPrimitive.Portal, { children: _jsx(NavigationMenuPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, 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)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className), ...props, children: _jsx(NavigationMenuPrimitive.Popup, { 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 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", children: _jsx(NavigationMenuPrimitive.Viewport, { className: "relative size-full overflow-hidden" }) }) }) }));
24
+ }
25
+ function NavigationMenuLink({ className, ...props }) {
26
+ return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("flex items-center gap-1.5 rounded-md p-2 text-sm transition-all outline-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-sm data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className), ...props }));
27
+ }
28
+ function NavigationMenuIndicator({ className, ...props }) {
29
+ return (_jsx(NavigationMenuPrimitive.Icon, { "data-slot": "navigation-menu-indicator", className: cn("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), ...props, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) }));
30
+ }
31
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle, };
@@ -0,0 +1,2 @@
1
+ export declare function NotificationDeliveriesPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=notification-deliveries-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-deliveries-page.d.ts","sourceRoot":"","sources":["../../src/components/notification-deliveries-page.tsx"],"names":[],"mappings":"AAYA,wBAAgB,0BAA0B,4CA2GzC"}
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useNotificationDeliveries, } from "@voyantjs/notifications-react";
4
+ import { Loader2 } from "lucide-react";
5
+ import { useState } from "react";
6
+ import { Badge } from "./badge";
7
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select";
8
+ export function NotificationDeliveriesPage() {
9
+ const [channel, setChannel] = useState("all");
10
+ const [status, setStatus] = useState("all");
11
+ const { data, isPending } = useNotificationDeliveries({
12
+ channel: channel === "all" ? undefined : channel,
13
+ status: status === "all" ? undefined : status,
14
+ limit: 50,
15
+ offset: 0,
16
+ });
17
+ return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: "Deliveries" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Review notification delivery attempts, rendered payloads, and provider-level outcomes." })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsxs(Select, { value: channel, onValueChange: (value) => setChannel(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[140px]", children: _jsx(SelectValue, { placeholder: "Channel" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All channels" }), _jsx(SelectItem, { value: "email", children: "Email" }), _jsx(SelectItem, { value: "sms", children: "SMS" })] })] }), _jsxs(Select, { value: status, onValueChange: (value) => setStatus(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[140px]", children: _jsx(SelectValue, { placeholder: "Status" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All statuses" }), _jsx(SelectItem, { value: "pending", children: "Pending" }), _jsx(SelectItem, { value: "sent", children: "Sent" }), _jsx(SelectItem, { value: "failed", children: "Failed" }), _jsx(SelectItem, { value: "cancelled", children: "Cancelled" })] })] })] }), isPending ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, !isPending && (!data?.data || data.data.length === 0) ? (_jsx("div", { className: "rounded-md border border-dashed p-8 text-center", children: _jsx("p", { className: "text-sm text-muted-foreground", children: "No deliveries yet." }) })) : null, !isPending && data?.data && data.data.length > 0 ? (_jsx("div", { className: "rounded-md border", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "bg-muted/40 text-left text-xs uppercase tracking-wide text-muted-foreground", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-3", children: "To" }), _jsx("th", { className: "px-4 py-3", children: "Template" }), _jsx("th", { className: "px-4 py-3", children: "Channel" }), _jsx("th", { className: "px-4 py-3", children: "Provider" }), _jsx("th", { className: "px-4 py-3", children: "Status" }), _jsx("th", { className: "px-4 py-3", children: "Created" })] }) }), _jsx("tbody", { children: data.data.map((delivery) => (_jsxs("tr", { className: "border-t", children: [_jsxs("td", { className: "px-4 py-3", children: [_jsx("div", { children: delivery.toAddress }), delivery.subject ? (_jsx("div", { className: "text-xs text-muted-foreground", children: delivery.subject })) : null] }), _jsx("td", { className: "px-4 py-3 font-mono text-xs", children: delivery.templateSlug ?? "direct" }), _jsx("td", { className: "px-4 py-3", children: _jsx(Badge, { variant: "outline", children: delivery.channel }) }), _jsx("td", { className: "px-4 py-3", children: delivery.provider }), _jsx("td", { className: "px-4 py-3", children: _jsx(Badge, { variant: delivery.status === "sent"
18
+ ? "default"
19
+ : delivery.status === "failed"
20
+ ? "destructive"
21
+ : "secondary", children: delivery.status }) }), _jsx("td", { className: "px-4 py-3", children: new Date(delivery.createdAt).toLocaleString() })] }, delivery.id))) })] }) })) : null] }));
22
+ }
@@ -0,0 +1,8 @@
1
+ type NotificationDeliveryDetailDialogProps = {
2
+ deliveryId: string | null;
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ };
6
+ export declare function NotificationDeliveryDetailDialog({ deliveryId, open, onOpenChange, }: NotificationDeliveryDetailDialogProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=notification-delivery-detail-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-delivery-detail-dialog.d.ts","sourceRoot":"","sources":["../../src/components/notification-delivery-detail-dialog.tsx"],"names":[],"mappings":"AASA,KAAK,qCAAqC,GAAG;IAC3C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACV,IAAI,EACJ,YAAY,GACb,EAAE,qCAAqC,2CAsHvC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useNotificationDelivery } from "@voyantjs/notifications-react";
4
+ import { Loader2 } from "lucide-react";
5
+ import { Badge } from "./badge";
6
+ import { Button } from "./button";
7
+ import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "./dialog";
8
+ export function NotificationDeliveryDetailDialog({ deliveryId, open, onOpenChange, }) {
9
+ const { data, isPending, error } = useNotificationDelivery(deliveryId ?? "", {
10
+ enabled: open && Boolean(deliveryId),
11
+ });
12
+ const delivery = data ?? null;
13
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-4xl", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: "Delivery details" }) }), _jsxs("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto py-4 pr-1", children: [isPending ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, !isPending && error ? (_jsx("div", { className: "rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: error instanceof Error ? error.message : "Failed to load delivery." })) : null, !isPending && delivery ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4", children: [_jsx(InfoCard, { label: "To", value: delivery.toAddress }), _jsx(InfoCard, { label: "Template", value: delivery.templateSlug ?? "direct", mono: true }), _jsx(InfoCard, { label: "Provider", value: delivery.provider }), _jsxs("div", { className: "rounded-md border p-3", children: [_jsx("div", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: "Status" }), _jsx("div", { className: "mt-2", children: _jsx(Badge, { variant: delivery.status === "sent"
14
+ ? "default"
15
+ : delivery.status === "failed"
16
+ ? "destructive"
17
+ : "secondary", children: delivery.status }) })] })] }), _jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [_jsxs(Section, { title: "Metadata", children: [_jsx(KeyValue, { label: "Channel", value: delivery.channel }), _jsx(KeyValue, { label: "From", value: delivery.fromAddress ?? "—" }), _jsx(KeyValue, { label: "Target type", value: delivery.targetType }), _jsx(KeyValue, { label: "Target id", value: delivery.targetId ?? "—", mono: true }), _jsx(KeyValue, { label: "Provider message id", value: delivery.providerMessageId ?? "—", mono: true }), _jsx(KeyValue, { label: "Created", value: new Date(delivery.createdAt).toLocaleString() }), _jsx(KeyValue, { label: "Sent", value: delivery.sentAt ? new Date(delivery.sentAt).toLocaleString() : "—" }), _jsx(KeyValue, { label: "Failed", value: delivery.failedAt ? new Date(delivery.failedAt).toLocaleString() : "—" })] }), _jsxs(Section, { title: "Rendered payload", children: [_jsx(KeyValue, { label: "Subject", value: delivery.subject ?? "—" }), _jsx(KeyValue, { label: "Error", value: delivery.errorMessage ?? "—" }), _jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: "Text" }), _jsx("pre", { className: "whitespace-pre-wrap rounded-md border bg-muted/20 px-3 py-3 text-xs", children: delivery.textBody ?? "—" })] })] })] }), _jsx(Section, { title: "HTML body", children: delivery.htmlBody ? (_jsx("div", { className: "prose prose-sm max-w-none rounded-md border bg-background px-4 py-4 dark:prose-invert",
18
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: Notification HTML body is stored template output rendered for preview.
19
+ dangerouslySetInnerHTML: { __html: delivery.htmlBody } })) : (_jsx("div", { className: "rounded-md border bg-muted/20 px-4 py-3 text-sm text-muted-foreground", children: "No HTML body stored for this delivery." })) }), _jsx(Section, { title: "Payload data", children: _jsx("pre", { className: "overflow-x-auto whitespace-pre-wrap rounded-md border bg-muted/20 px-3 py-3 text-xs", children: JSON.stringify(delivery.payloadData ?? {}, null, 2) }) })] })) : null] }), _jsx(DialogFooter, { children: _jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: "Close" }) })] }) }));
20
+ }
21
+ function Section({ title, children }) {
22
+ return (_jsxs("section", { className: "space-y-3 rounded-md border p-4", children: [_jsx("h3", { className: "text-sm font-medium", children: title }), children] }));
23
+ }
24
+ function InfoCard({ label, value, mono = false, }) {
25
+ return (_jsxs("div", { className: "rounded-md border p-3", children: [_jsx("div", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: label }), _jsx("div", { className: `mt-2 break-words text-sm ${mono ? "font-mono text-xs" : ""}`, children: value })] }));
26
+ }
27
+ function KeyValue({ label, value, mono = false, }) {
28
+ return (_jsxs("div", { className: "grid gap-1", children: [_jsx("div", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: label }), _jsx("div", { className: `break-words text-sm ${mono ? "font-mono text-xs" : ""}`, children: value })] }));
29
+ }
@@ -0,0 +1,10 @@
1
+ import { type NotificationReminderRuleRecord } from "@voyantjs/notifications-react";
2
+ type NotificationReminderRuleDialogProps = {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ rule?: NotificationReminderRuleRecord;
6
+ onSuccess: () => void;
7
+ };
8
+ export declare function NotificationReminderRuleDialog({ open, onOpenChange, rule, onSuccess, }: NotificationReminderRuleDialogProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=notification-reminder-rule-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-reminder-rule-dialog.d.ts","sourceRoot":"","sources":["../../src/components/notification-reminder-rule-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,+BAA+B,CAAA;AA6BtC,KAAK,mCAAmC,GAAG;IACzC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,IAAI,CAAC,EAAE,8BAA8B,CAAA;IACrC,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,SAAS,GACV,EAAE,mCAAmC,2CA8NrC"}
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useNotificationReminderRuleMutation, useNotificationTemplates, } from "@voyantjs/notifications-react";
4
+ import { Loader2 } from "lucide-react";
5
+ import { useEffect } from "react";
6
+ import { useForm } from "react-hook-form";
7
+ import { z } from "zod/v4";
8
+ import { zodResolver } from "../lib/zod-resolver";
9
+ import { Button } from "./button";
10
+ import { Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "./index";
11
+ import { Input } from "./input";
12
+ import { Label } from "./label";
13
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select";
14
+ const reminderRuleFormSchema = z.object({
15
+ name: z.string().min(1, "Name is required"),
16
+ slug: z
17
+ .string()
18
+ .min(1, "Slug is required")
19
+ .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Must be kebab-case"),
20
+ status: z.enum(["draft", "active", "archived"]).default("draft"),
21
+ targetType: z.enum(["booking_payment_schedule", "invoice"]),
22
+ channel: z.enum(["email", "sms"]),
23
+ templateId: z.string().min(1, "Template is required"),
24
+ relativeDaysFromDueDate: z.number().int().min(-365).max(365),
25
+ });
26
+ export function NotificationReminderRuleDialog({ open, onOpenChange, rule, onSuccess, }) {
27
+ const isEditing = Boolean(rule);
28
+ const { create, update } = useNotificationReminderRuleMutation();
29
+ const form = useForm({
30
+ resolver: zodResolver(reminderRuleFormSchema),
31
+ defaultValues: {
32
+ name: "",
33
+ slug: "",
34
+ status: "draft",
35
+ targetType: "booking_payment_schedule",
36
+ channel: "email",
37
+ templateId: "",
38
+ relativeDaysFromDueDate: 0,
39
+ },
40
+ });
41
+ const channel = form.watch("channel");
42
+ const { data: templates } = useNotificationTemplates({
43
+ channel,
44
+ status: "active",
45
+ limit: 100,
46
+ offset: 0,
47
+ });
48
+ useEffect(() => {
49
+ if (open && rule) {
50
+ const resolvedTemplateId = rule.templateId ??
51
+ (rule.templateSlug
52
+ ? ((templates?.data ?? []).find((template) => template.slug === rule.templateSlug)?.id ??
53
+ "")
54
+ : "");
55
+ form.reset({
56
+ name: rule.name,
57
+ slug: rule.slug,
58
+ status: rule.status,
59
+ targetType: rule.targetType,
60
+ channel: rule.channel,
61
+ templateId: resolvedTemplateId,
62
+ relativeDaysFromDueDate: rule.relativeDaysFromDueDate,
63
+ });
64
+ return;
65
+ }
66
+ if (open) {
67
+ form.reset();
68
+ }
69
+ }, [open, rule, form, templates?.data]);
70
+ const onSubmit = async (values) => {
71
+ const payload = {
72
+ name: values.name,
73
+ slug: values.slug,
74
+ status: values.status,
75
+ targetType: values.targetType,
76
+ channel: values.channel,
77
+ provider: null,
78
+ templateId: values.templateId,
79
+ templateSlug: null,
80
+ relativeDaysFromDueDate: values.relativeDaysFromDueDate,
81
+ isSystem: rule?.isSystem ?? false,
82
+ metadata: rule?.metadata ?? null,
83
+ };
84
+ if (isEditing && rule) {
85
+ await update.mutateAsync({ id: rule.id, input: payload });
86
+ }
87
+ else {
88
+ await create.mutateAsync(payload);
89
+ }
90
+ onSuccess();
91
+ };
92
+ const isPending = create.isPending || update.isPending;
93
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ? "Edit Reminder Rule" : "New Reminder Rule" }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { ...form.register("name"), placeholder: "Invoice due in 3 days" })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Slug" }), _jsx(Input, { ...form.register("slug"), placeholder: "invoice-due-minus-3" })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Target" }), _jsxs(Select, { items: [
94
+ { label: "Booking payment schedule", value: "booking_payment_schedule" },
95
+ { label: "Invoice", value: "invoice" },
96
+ ], value: form.watch("targetType"), onValueChange: (value) => {
97
+ if (!value)
98
+ return;
99
+ form.setValue("targetType", value);
100
+ }, children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "booking_payment_schedule", children: "Booking payment schedule" }), _jsx(SelectItem, { value: "invoice", children: "Invoice" })] })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Status" }), _jsxs(Select, { items: [
101
+ { label: "Draft", value: "draft" },
102
+ { label: "Active", value: "active" },
103
+ { label: "Archived", value: "archived" },
104
+ ], value: form.watch("status"), onValueChange: (value) => {
105
+ if (!value)
106
+ return;
107
+ form.setValue("status", value);
108
+ }, children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "draft", children: "Draft" }), _jsx(SelectItem, { value: "active", children: "Active" }), _jsx(SelectItem, { value: "archived", children: "Archived" })] })] })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Channel" }), _jsxs(Select, { items: [
109
+ { label: "Email", value: "email" },
110
+ { label: "SMS", value: "sms" },
111
+ ], value: form.watch("channel"), onValueChange: (value) => {
112
+ if (!value)
113
+ return;
114
+ form.setValue("channel", value);
115
+ }, children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "email", children: "Email" }), _jsx(SelectItem, { value: "sms", children: "SMS" })] })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Offset days" }), _jsx(Input, { type: "number", value: form.watch("relativeDaysFromDueDate"), onChange: (event) => form.setValue("relativeDaysFromDueDate", Number.parseInt(event.target.value || "0", 10)) })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Template" }), _jsxs(Select, { items: (templates?.data ?? []).map((template) => ({
116
+ label: `${template.name} (${template.slug})`,
117
+ value: template.id,
118
+ })), value: form.watch("templateId"), onValueChange: (value) => {
119
+ if (!value)
120
+ return;
121
+ form.setValue("templateId", value);
122
+ }, children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, { placeholder: "Select template" }) }), _jsx(SelectContent, { children: (templates?.data ?? []).map((template) => (_jsxs(SelectItem, { value: template.id, children: [template.name, " (", template.slug, ")"] }, template.id))) })] })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }), _jsxs(Button, { type: "submit", disabled: isPending, children: [isPending ? _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : null, isEditing ? "Save Changes" : "Create Rule"] })] })] })] }) }));
123
+ }
@@ -0,0 +1,2 @@
1
+ export declare function NotificationReminderRulesPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=notification-reminder-rules-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-reminder-rules-page.d.ts","sourceRoot":"","sources":["../../src/components/notification-reminder-rules-page.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,6BAA6B,4CA0J5C"}
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useNotificationReminderRules, } from "@voyantjs/notifications-react";
4
+ import { Loader2, Pencil, Plus, Search } from "lucide-react";
5
+ import { useState } from "react";
6
+ import { Badge } from "./badge";
7
+ import { Button } from "./button";
8
+ import { Input } from "./input";
9
+ import { NotificationReminderRuleDialog } from "./notification-reminder-rule-dialog";
10
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select";
11
+ export function NotificationReminderRulesPage() {
12
+ const [search, setSearch] = useState("");
13
+ const [channel, setChannel] = useState("all");
14
+ const [status, setStatus] = useState("all");
15
+ const [targetType, setTargetType] = useState("all");
16
+ const [dialogOpen, setDialogOpen] = useState(false);
17
+ const [editing, setEditing] = useState();
18
+ const { data, isPending, refetch } = useNotificationReminderRules({
19
+ search,
20
+ channel: channel === "all" ? undefined : channel,
21
+ status: status === "all" ? undefined : status,
22
+ targetType: targetType === "all" ? undefined : targetType,
23
+ });
24
+ return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: "Reminder Rules" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Schedule invoice and payment reminders against templates and channels." })] }), _jsxs(Button, { onClick: () => {
25
+ setEditing(undefined);
26
+ setDialogOpen(true);
27
+ }, children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), "New Rule"] })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "relative max-w-sm flex-1", children: [_jsx(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { placeholder: "Search rules...", value: search, onChange: (event) => setSearch(event.target.value), className: "pl-9" })] }), _jsxs(Select, { value: targetType, onValueChange: (value) => setTargetType(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[190px]", children: _jsx(SelectValue, { placeholder: "Target" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All targets" }), _jsx(SelectItem, { value: "booking_payment_schedule", children: "Booking payment schedule" }), _jsx(SelectItem, { value: "invoice", children: "Invoice" })] })] }), _jsxs(Select, { value: channel, onValueChange: (value) => setChannel(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[140px]", children: _jsx(SelectValue, { placeholder: "Channel" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All channels" }), _jsx(SelectItem, { value: "email", children: "Email" }), _jsx(SelectItem, { value: "sms", children: "SMS" })] })] }), _jsxs(Select, { value: status, onValueChange: (value) => setStatus(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[140px]", children: _jsx(SelectValue, { placeholder: "Status" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All statuses" }), _jsx(SelectItem, { value: "draft", children: "Draft" }), _jsx(SelectItem, { value: "active", children: "Active" }), _jsx(SelectItem, { value: "archived", children: "Archived" })] })] })] }), isPending ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, !isPending && (!data?.data || data.data.length === 0) ? (_jsx("div", { className: "rounded-md border border-dashed p-8 text-center", children: _jsx("p", { className: "text-sm text-muted-foreground", children: "No reminder rules yet." }) })) : null, !isPending && data?.data && data.data.length > 0 ? (_jsx("div", { className: "rounded-md border", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "bg-muted/40 text-left text-xs uppercase tracking-wide text-muted-foreground", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-3", children: "Rule" }), _jsx("th", { className: "px-4 py-3", children: "Target" }), _jsx("th", { className: "px-4 py-3", children: "Channel" }), _jsx("th", { className: "px-4 py-3", children: "Offset" }), _jsx("th", { className: "px-4 py-3", children: "Status" }), _jsx("th", { className: "px-4 py-3 text-right", children: "Actions" })] }) }), _jsx("tbody", { children: data.data.map((rule) => (_jsxs("tr", { className: "border-t", children: [_jsxs("td", { className: "px-4 py-3", children: [_jsx("div", { className: "font-medium", children: rule.name }), _jsx("div", { className: "font-mono text-xs text-muted-foreground", children: rule.slug })] }), _jsx("td", { className: "px-4 py-3", children: rule.targetType }), _jsx("td", { className: "px-4 py-3", children: _jsx(Badge, { variant: "outline", children: rule.channel }) }), _jsxs("td", { className: "px-4 py-3", children: [rule.relativeDaysFromDueDate, " days"] }), _jsx("td", { className: "px-4 py-3", children: _jsx(Badge, { variant: rule.status === "active" ? "default" : "secondary", children: rule.status }) }), _jsx("td", { className: "px-4 py-3 text-right", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => {
28
+ setEditing(rule);
29
+ setDialogOpen(true);
30
+ }, children: _jsx(Pencil, { className: "h-4 w-4" }) }) })] }, rule.id))) })] }) })) : null, _jsx(NotificationReminderRuleDialog, { open: dialogOpen, onOpenChange: setDialogOpen, rule: editing, onSuccess: () => {
31
+ setDialogOpen(false);
32
+ setEditing(undefined);
33
+ void refetch();
34
+ } })] }));
35
+ }
@@ -0,0 +1,2 @@
1
+ export declare function NotificationReminderRunsPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=notification-reminder-runs-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-reminder-runs-page.d.ts","sourceRoot":"","sources":["../../src/components/notification-reminder-runs-page.tsx"],"names":[],"mappings":"AAYA,wBAAgB,4BAA4B,4CA6F3C"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useNotificationReminderRuns, } from "@voyantjs/notifications-react";
4
+ import { Loader2 } from "lucide-react";
5
+ import { useState } from "react";
6
+ import { Badge } from "./badge";
7
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select";
8
+ export function NotificationReminderRunsPage() {
9
+ const [status, setStatus] = useState("all");
10
+ const { data, isPending } = useNotificationReminderRuns({
11
+ status: status === "all" ? undefined : status,
12
+ limit: 50,
13
+ offset: 0,
14
+ });
15
+ return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: "Reminder Runs" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Inspect queued and processed reminder executions, linked deliveries, and failure reasons." })] }), _jsx("div", { className: "flex items-center gap-3", children: _jsxs(Select, { value: status, onValueChange: (value) => setStatus(value ?? "all"), children: [_jsx(SelectTrigger, { className: "w-[160px]", children: _jsx(SelectValue, { placeholder: "Status" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All statuses" }), _jsx(SelectItem, { value: "queued", children: "Queued" }), _jsx(SelectItem, { value: "processing", children: "Processing" }), _jsx(SelectItem, { value: "sent", children: "Sent" }), _jsx(SelectItem, { value: "skipped", children: "Skipped" }), _jsx(SelectItem, { value: "failed", children: "Failed" })] })] }) }), isPending ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, !isPending && (!data?.data || data.data.length === 0) ? (_jsx("div", { className: "rounded-md border border-dashed p-8 text-center", children: _jsx("p", { className: "text-sm text-muted-foreground", children: "No reminder runs yet." }) })) : null, !isPending && data?.data && data.data.length > 0 ? (_jsx("div", { className: "rounded-md border", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "bg-muted/40 text-left text-xs uppercase tracking-wide text-muted-foreground", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-3", children: "Rule" }), _jsx("th", { className: "px-4 py-3", children: "Target" }), _jsx("th", { className: "px-4 py-3", children: "Recipient" }), _jsx("th", { className: "px-4 py-3", children: "Status" }), _jsx("th", { className: "px-4 py-3", children: "Processed" })] }) }), _jsx("tbody", { children: data.data.map((run) => (_jsxs("tr", { className: "border-t", children: [_jsxs("td", { className: "px-4 py-3", children: [_jsx("div", { className: "font-medium", children: run.reminderRule.name }), _jsx("div", { className: "font-mono text-xs text-muted-foreground", children: run.reminderRule.slug })] }), _jsxs("td", { className: "px-4 py-3", children: [_jsx("div", { children: run.targetType }), _jsx("div", { className: "font-mono text-xs text-muted-foreground", children: run.targetId })] }), _jsx("td", { className: "px-4 py-3", children: run.recipient ?? "—" }), _jsx("td", { className: "px-4 py-3", children: _jsx(Badge, { variant: run.status === "sent"
16
+ ? "default"
17
+ : run.status === "failed"
18
+ ? "destructive"
19
+ : "secondary", children: run.status }) }), _jsx("td", { className: "px-4 py-3", children: new Date(run.processedAt).toLocaleString() })] }, run.id))) })] }) })) : null] }));
20
+ }
@@ -0,0 +1,11 @@
1
+ import type { NotificationLiquidSnippet, NotificationTemplateVariableCategory, NotificationTemplateVariableDefinition } from "@voyantjs/notifications";
2
+ type NotificationTemplateAuthoringHelpProps = {
3
+ variableGroups: NotificationTemplateVariableCategory[];
4
+ snippets?: NotificationLiquidSnippet[];
5
+ onInsertVariable?: (variable: NotificationTemplateVariableDefinition) => void;
6
+ onInsertSnippet?: (snippet: NotificationLiquidSnippet) => void;
7
+ className?: string;
8
+ };
9
+ export declare function NotificationTemplateAuthoringHelp({ variableGroups, snippets, onInsertVariable, onInsertSnippet, className, }: NotificationTemplateAuthoringHelpProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=notification-template-authoring-help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-template-authoring-help.d.ts","sourceRoot":"","sources":["../../src/components/notification-template-authoring-help.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACpC,sCAAsC,EACvC,MAAM,yBAAyB,CAAA;AAShC,KAAK,sCAAsC,GAAG;IAC5C,cAAc,EAAE,oCAAoC,EAAE,CAAA;IACtD,QAAQ,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACtC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,sCAAsC,KAAK,IAAI,CAAA;IAC7E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,iCAAiC,CAAC,EAChD,cAAc,EACd,QAAa,EACb,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,EAAE,sCAAsC,2CAcxC"}
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ContractTemplateAuthoringHelp, } from "./contract-template-authoring-help";
4
+ export function NotificationTemplateAuthoringHelp({ variableGroups, snippets = [], onInsertVariable, onInsertSnippet, className, }) {
5
+ return (_jsx(ContractTemplateAuthoringHelp, { className: className, title: "Notification variables", description: "Notifications render with Liquid. Use variables for subject/body content and control tags for conditionals or loops.", variableGroups: variableGroups, snippets: snippets, onInsertVariable: onInsertVariable, onInsertSnippet: onInsertSnippet }));
6
+ }
@@ -0,0 +1,6 @@
1
+ type NotificationTemplateDetailPageProps = {
2
+ id: string;
3
+ };
4
+ export declare function NotificationTemplateDetailPage({ id }: NotificationTemplateDetailPageProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=notification-template-detail-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-template-detail-page.d.ts","sourceRoot":"","sources":["../../src/components/notification-template-detail-page.tsx"],"names":[],"mappings":"AA8EA,KAAK,mCAAmC,GAAG;IACzC,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAAE,EAAE,EAAE,EAAE,mCAAmC,2CA6UzF"}