adminizer 4.1.0-commit.d8a06d3 → 4.2.0-build.44

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 (314) hide show
  1. package/Readme.md +46 -0
  2. package/assets/{VanillaJSONEditor-D-Lx670g.js → VanillaJSONEditor-DfRefswH.js} +104 -104
  3. package/assets/add-DujD3Z0j.js +1 -0
  4. package/assets/add-form-Ch5HOaI3.js +1 -0
  5. package/assets/add-group-form-CzjFRYQe.js +1 -0
  6. package/assets/add-group-xKUhiREd.js +1 -0
  7. package/assets/add-user-DpTQyN0Z.js +1 -0
  8. package/assets/add-user-form-DmgL9A2G.js +1 -0
  9. package/assets/{app-WTooYWC3.css → app-B6cCPfWk.css} +1 -1
  10. package/assets/app-layout-Dn8y3paC.js +1 -0
  11. package/assets/app-shell-C1wDrRCe.js +1 -0
  12. package/assets/app-sidebar-BisOEG_p.js +1 -0
  13. package/assets/app-sidebar-header-CL1OSuV8.js +11 -0
  14. package/assets/app.js +169 -39
  15. package/assets/breadcrumbs-BVZtAG3J.js +1 -0
  16. package/assets/catalog-Cc6Mk9sX.css +1 -0
  17. package/assets/catalog-CvJMAtEd.js +16 -0
  18. package/assets/{chevrons-up-down-kALltqHV.js → chevrons-up-down-D3t3UGV7.js} +2 -2
  19. package/assets/dashboard-Zsh-5yN2.js +3 -0
  20. package/assets/date-picker-DKdT6XTZ.js +6 -0
  21. package/assets/debounce-qdyXyOeG.js +1 -0
  22. package/assets/del-modal-DZ5wZWad.js +11 -0
  23. package/assets/{field-renderer-DVHZF6HS.js → field-renderer-Dgj1S2Vi.js} +137 -137
  24. package/assets/form-Bgv171J2.js +1 -0
  25. package/assets/form-DcfEHbPb.js +1 -0
  26. package/assets/{geo-json-BjiyTtMu.js → geo-json-vodY1YtH.js} +5 -5
  27. package/assets/{handsontable-4mjU_b0n.js → handsontable-C-ThjbaJ.js} +5 -5
  28. package/assets/home-DOm3EaLO.js +2 -0
  29. package/assets/icon-B-D8X0jg.js +1 -0
  30. package/assets/init-user-iMMcIQIW.js +1 -0
  31. package/assets/input-error-F1DL-Fx6.js +1 -0
  32. package/assets/list-B-vY1rhM.js +1 -0
  33. package/assets/list-table-8sDi0ZKa.js +52 -0
  34. package/assets/{check-LAUWAnlX.js → loader-circle-Btx4NYNU.js} +2 -2
  35. package/assets/login-C2J62v4_.js +6 -0
  36. package/assets/manifest.json +197 -965
  37. package/assets/material-icon-DeSoGIhT.js +1 -0
  38. package/assets/module-I4hW5UqT.js +1 -0
  39. package/assets/{monaco-editor-CJs0_GlD.js → monaco-editor-9fDiyfuW.js} +2 -2
  40. package/assets/{move-left-BhKZRPb4.js → move-left-DWHsVHUF.js} +1 -1
  41. package/assets/multi-select-Bu3n-kcV.js +11 -0
  42. package/assets/nav-footer-DQwIyd7c.js +1 -0
  43. package/assets/nav-main-DDQ-_Oed.js +1 -0
  44. package/assets/nav-user-BwBu-VwZ.js +1 -0
  45. package/assets/pagination-render-BoDDo2E1.js +1 -0
  46. package/assets/register-aPC0gjjS.js +1 -0
  47. package/assets/{toast-editor-CMK7QtF1.js → toast-editor-1Pul3oMs.js} +2 -2
  48. package/assets/{trash-2-BoK5Xp2F.js → trash-2-CsxWwHNc.js} +2 -2
  49. package/assets/use-appearance-J8J2w43p.js +1 -0
  50. package/assets/use-window-size-DLSEoR6e.js +1 -0
  51. package/assets/user-info-CnB2lvpg.js +1 -0
  52. package/assets/user-menu-content-BFbaJw6v.js +6 -0
  53. package/assets/welcome-DB_D6KJV.js +1 -0
  54. package/controllers/add.js +8 -8
  55. package/controllers/catalog/Catalog.d.ts +1 -1
  56. package/controllers/catalog/Catalog.js +40 -35
  57. package/controllers/catalog/FrontentCatalogAdapter.d.ts +36 -26
  58. package/controllers/catalog/FrontentCatalogAdapter.js +71 -72
  59. package/controllers/edit.js +8 -11
  60. package/controllers/list.js +2 -2
  61. package/controllers/login.js +16 -7
  62. package/controllers/navigation/edit.js +1 -1
  63. package/controllers/remove.js +1 -1
  64. package/controllers/view.js +1 -1
  65. package/helpers/JsUtils.d.ts +1 -0
  66. package/helpers/JsUtils.js +3 -0
  67. package/helpers/accessRightsHelper.d.ts +3 -0
  68. package/helpers/accessRightsHelper.js +27 -4
  69. package/helpers/controllerHelper.js +39 -18
  70. package/helpers/fieldsHelper.d.ts +3 -2
  71. package/helpers/fieldsHelper.js +5 -1
  72. package/helpers/inertiaAddHelper.d.ts +4 -5
  73. package/helpers/inertiaAddHelper.js +25 -7
  74. package/helpers/inertiaFromHelper.js +1 -1
  75. package/helpers/inertiaMenuHelper.d.ts +1 -1
  76. package/helpers/inertiaMenuHelper.js +1 -1
  77. package/helpers/menuHelper.d.ts +8 -3
  78. package/helpers/menuHelper.js +26 -17
  79. package/index.d.ts +2 -6
  80. package/index.js +5 -6
  81. package/interfaces/adminpanelConfig.d.ts +35 -30
  82. package/interfaces/global.d.ts +5 -2
  83. package/interfaces/types.d.ts +1 -1
  84. package/lib/Adminizer.d.ts +9 -3
  85. package/lib/Adminizer.js +32 -16
  86. package/lib/media-manager/Items.js +0 -3
  87. package/lib/requestProcessor.js +10 -3
  88. package/lib/v4/DataAccessor.d.ts +3 -1
  89. package/lib/v4/DataAccessor.js +43 -18
  90. package/lib/v4/I18n.js +2 -0
  91. package/lib/{catalog → v4/catalog}/AbstractCatalog.d.ts +89 -60
  92. package/lib/{catalog → v4/catalog}/AbstractCatalog.js +59 -54
  93. package/lib/v4/catalog/Navigation.d.ts +43 -0
  94. package/lib/v4/catalog/Navigation.js +457 -0
  95. package/lib/{controls → v4/controls}/AbstractControls.d.ts +1 -1
  96. package/lib/{controls → v4/controls}/codeEditor/MonacoEditor.d.ts +1 -1
  97. package/lib/{controls → v4/controls}/geojsoneditor/GeoEditor.d.ts +1 -1
  98. package/lib/{controls → v4/controls}/jsoneditor/JsonEditor.d.ts +1 -1
  99. package/lib/{controls → v4/controls}/markdown/ToastUiEditor.d.ts +1 -1
  100. package/lib/{controls → v4/controls}/table/Handsontable.d.ts +1 -1
  101. package/lib/{controls → v4/controls}/wysiwyg/CKeditor.d.ts +1 -1
  102. package/lib/{datatable → v4/datatable}/NodeTable.d.ts +3 -3
  103. package/lib/{datatable → v4/datatable}/NodeTable.js +8 -5
  104. package/lib/v4/model/AbstractModel.d.ts +5 -1
  105. package/lib/v4/model/AbstractModel.js +2 -1
  106. package/lib/v4/model/ModelHandler.js +1 -3
  107. package/lib/v4/model/adapter/sequelize.d.ts +8 -0
  108. package/lib/v4/model/adapter/sequelize.js +274 -133
  109. package/lib/v4/model/adapter/waterline.js +5 -2
  110. package/lib/{widgets → v4/widgets}/abstractLink.d.ts +1 -1
  111. package/lib/{widgets → v4/widgets}/abstractWidgetBase.d.ts +1 -1
  112. package/lib/{widgets → v4/widgets}/widgetHandler.d.ts +11 -4
  113. package/lib/{widgets → v4/widgets}/widgetHandler.js +1 -1
  114. package/models/NavigationAP.d.ts +2 -3
  115. package/models/NavigationAP.js +5 -6
  116. package/models/UserAP.d.ts +2 -3
  117. package/package.json +24 -7
  118. package/system/Router.js +8 -11
  119. package/system/bindAccessRights.js +0 -4
  120. package/system/bindControls.js +6 -6
  121. package/system/bindDev.js +1 -0
  122. package/system/bindInertia.js +9 -4
  123. package/system/bindMediaManager.js +0 -1
  124. package/system/bindModels.js +9 -6
  125. package/system/bindNavigation.d.ts +2 -0
  126. package/system/bindNavigation.js +42 -42
  127. package/system/bindReqFunctions.js +0 -1
  128. package/system/defaults.js +13 -6
  129. package/translations/ar.json +70 -1
  130. package/translations/cn.json +70 -1
  131. package/translations/de.json +71 -3
  132. package/translations/en.json +70 -102
  133. package/translations/es.json +70 -1
  134. package/translations/fr.json +70 -1
  135. package/translations/hi.json +70 -1
  136. package/translations/jp.json +70 -1
  137. package/translations/ko.json +70 -1
  138. package/translations/pt.json +70 -1
  139. package/translations/ru.json +71 -103
  140. package/translations/ua.json +70 -1
  141. package/translations/uz.json +72 -0
  142. package/translations/vi.json +70 -1
  143. package/ui/components/ui/avatar.d.ts +6 -0
  144. package/ui/components/ui/avatar.js +13 -0
  145. package/ui/components/ui/badge.d.ts +9 -0
  146. package/ui/components/ui/badge.js +22 -0
  147. package/ui/components/ui/breadcrumb.d.ts +11 -0
  148. package/ui/components/ui/breadcrumb.js +27 -0
  149. package/ui/components/ui/button.d.ts +10 -0
  150. package/ui/components/ui/button.js +33 -0
  151. package/ui/components/ui/calendar.d.ts +4 -0
  152. package/ui/components/ui/calendar.js +38 -0
  153. package/ui/components/ui/card.d.ts +9 -0
  154. package/ui/components/ui/card.js +24 -0
  155. package/ui/components/ui/checkbox.d.ts +4 -0
  156. package/ui/components/ui/checkbox.js +8 -0
  157. package/ui/components/ui/collapsible.d.ts +5 -0
  158. package/ui/components/ui/collapsible.js +12 -0
  159. package/ui/components/ui/command.d.ts +16 -0
  160. package/ui/components/ui/command.js +33 -0
  161. package/ui/components/ui/context-menu.d.ts +25 -0
  162. package/ui/components/ui/context-menu.js +50 -0
  163. package/ui/components/ui/dialog-stack.d.ts +43 -0
  164. package/ui/components/ui/dialog-stack.js +238 -0
  165. package/ui/components/ui/dialog.d.ts +13 -0
  166. package/ui/components/ui/dialog.js +35 -0
  167. package/ui/components/ui/dropdown-menu.d.ts +25 -0
  168. package/ui/components/ui/dropdown-menu.js +50 -0
  169. package/ui/components/ui/input.d.ts +3 -0
  170. package/ui/components/ui/input.js +6 -0
  171. package/ui/components/ui/label.d.ts +4 -0
  172. package/ui/components/ui/label.js +7 -0
  173. package/ui/components/ui/menubar.d.ts +26 -0
  174. package/ui/components/ui/menubar.js +53 -0
  175. package/ui/components/ui/pagination.d.ts +13 -0
  176. package/ui/components/ui/pagination.js +29 -0
  177. package/ui/components/ui/popover.d.ts +7 -0
  178. package/ui/components/ui/popover.js +16 -0
  179. package/ui/components/ui/select.d.ts +15 -0
  180. package/ui/components/ui/select.js +37 -0
  181. package/ui/components/ui/separator.d.ts +4 -0
  182. package/ui/components/ui/separator.js +8 -0
  183. package/ui/components/ui/sheet.d.ts +13 -0
  184. package/ui/components/ui/sheet.js +39 -0
  185. package/ui/components/ui/sidebar.d.ts +69 -0
  186. package/ui/components/ui/sidebar.js +211 -0
  187. package/ui/components/ui/skeleton.d.ts +2 -0
  188. package/ui/components/ui/skeleton.js +6 -0
  189. package/ui/components/ui/slider.d.ts +4 -0
  190. package/ui/components/ui/slider.js +13 -0
  191. package/ui/components/ui/sonner.d.ts +3 -0
  192. package/ui/components/ui/sonner.js +12 -0
  193. package/ui/components/ui/switch.d.ts +4 -0
  194. package/ui/components/ui/switch.js +7 -0
  195. package/ui/components/ui/table.d.ts +10 -0
  196. package/ui/components/ui/table.js +27 -0
  197. package/ui/components/ui/textarea.d.ts +3 -0
  198. package/ui/components/ui/textarea.js +6 -0
  199. package/ui/components/ui/tooltip.d.ts +7 -0
  200. package/ui/components/ui/tooltip.js +17 -0
  201. package/ui/hooks/use-mobile.d.ts +1 -0
  202. package/ui/hooks/use-mobile.js +15 -0
  203. package/ui/lib/utils.d.ts +2 -0
  204. package/ui/lib/utils.js +5 -0
  205. package/assets/add-BP_u3Tjl.js +0 -1
  206. package/assets/add-form-nffmiYTh.js +0 -1
  207. package/assets/add-group-D4vcHlm-.js +0 -1
  208. package/assets/add-group-form-gNJW11-q.js +0 -1
  209. package/assets/add-user-DWh3Nas0.js +0 -1
  210. package/assets/add-user-form-BJ0FsZYJ.js +0 -1
  211. package/assets/app-layout-DYsRFUuP.js +0 -1
  212. package/assets/app-shell-Dd9Eknik.js +0 -1
  213. package/assets/app-sidebar-BOmu6-Sl.js +0 -1
  214. package/assets/app-sidebar-header-CoXSzWxk.js +0 -11
  215. package/assets/breadcrumbs-BmAq4fHT.js +0 -1
  216. package/assets/button-C9B_5Jf_.js +0 -1
  217. package/assets/checkbox-Fg27sL_1.js +0 -1
  218. package/assets/chevron-down-B5XuAFRu.js +0 -6
  219. package/assets/chevron-left-CoMhTMUD.js +0 -6
  220. package/assets/chevron-right-D5q8rF7h.js +0 -6
  221. package/assets/compiler-runtime-hB6dAw2d.js +0 -9
  222. package/assets/createLucideIcon-BFG25zNo.js +0 -21
  223. package/assets/dashboard-BACj996r.js +0 -3
  224. package/assets/date-picker-DI1cCO7K.js +0 -6
  225. package/assets/dropdown-menu-Bhj17ENm.js +0 -1
  226. package/assets/form-BgWdwvz1.js +0 -1
  227. package/assets/form-DgtErfln.js +0 -1
  228. package/assets/home-CHntBHJa.js +0 -2
  229. package/assets/icon-Dt0vBgDO.js +0 -1
  230. package/assets/index-B8BS9wMC.js +0 -1
  231. package/assets/index-BC0yfOHo.js +0 -1
  232. package/assets/index-BKCgnGj_.js +0 -1
  233. package/assets/index-BbXEMx9n.js +0 -1
  234. package/assets/index-BykbU6Ee.js +0 -41
  235. package/assets/index-CaJgc5EZ.js +0 -1
  236. package/assets/index-Cgp8OfuI.js +0 -1
  237. package/assets/index-Cw5o84pO.js +0 -10
  238. package/assets/index-D5ir9iUV.js +0 -1
  239. package/assets/index-DrWfGwtf.js +0 -1
  240. package/assets/index-DwctwfU0.js +0 -1
  241. package/assets/init-user-JfCKJ5Ce.js +0 -1
  242. package/assets/input-CvRbIbk4.js +0 -1
  243. package/assets/input-error-DMK7cAt7.js +0 -1
  244. package/assets/label-CSLFe9Bz.js +0 -1
  245. package/assets/list-B2Oa5O_Q.js +0 -1
  246. package/assets/list-table-DA9MhywL.js +0 -62
  247. package/assets/loader-circle-Utah5tGx.js +0 -6
  248. package/assets/login-DQwGtdis.js +0 -6
  249. package/assets/material-icon-BJg8o_fs.js +0 -1
  250. package/assets/module-DWXp59Vg.js +0 -1
  251. package/assets/multi-select-BvRpAW8r.js +0 -11
  252. package/assets/nav-footer-Bs4dmN1d.js +0 -1
  253. package/assets/nav-main-Bq3IMk4C.js +0 -1
  254. package/assets/nav-user-CbB22J5O.js +0 -1
  255. package/assets/pagination-render-DuXDDbC_.js +0 -1
  256. package/assets/popover-DtoGI2b1.js +0 -1
  257. package/assets/register-BSogVF0h.js +0 -1
  258. package/assets/search-BspystAk.js +0 -6
  259. package/assets/select-BWepUw-9.js +0 -6
  260. package/assets/sidebar-CAHsHdjM.js +0 -6
  261. package/assets/skeleton-COOcAA8f.js +0 -1
  262. package/assets/sonner-BI0IFOQN.js +0 -1
  263. package/assets/tooltip-DHwpLKOI.js +0 -1
  264. package/assets/use-appearance-DRfIqTgw.js +0 -1
  265. package/assets/use-window-size-h0Sh_NvX.js +0 -1
  266. package/assets/user-info-DFrmpJ4y.js +0 -9
  267. package/assets/user-menu-content-DPXQdERj.js +0 -6
  268. package/assets/utils-DjqsqOe8.js +0 -1
  269. package/assets/welcome-B4WCIXKf.js +0 -1
  270. package/controllers/processInstallFinalize.d.ts +0 -1
  271. package/controllers/processInstallFinalize.js +0 -16
  272. package/controllers/processInstallStep.d.ts +0 -0
  273. package/controllers/processInstallStep.js +0 -122
  274. package/lib/catalog/Navigation.d.ts +0 -0
  275. package/lib/catalog/Navigation.js +0 -532
  276. package/lib/installStepper/InstallStepAbstract.d.ts +0 -52
  277. package/lib/installStepper/InstallStepAbstract.js +0 -69
  278. package/lib/installStepper/finalizeStep.d.ts +0 -21
  279. package/lib/installStepper/finalizeStep.js +0 -48
  280. package/lib/installStepper/installStepper.d.ts +0 -40
  281. package/lib/installStepper/installStepper.js +0 -195
  282. package/models/MediaManagerAP.d.ts +0 -62
  283. package/models/MediaManagerAP.js +0 -45
  284. package/models/MediaManagerAssociationsAP.d.ts +0 -38
  285. package/models/MediaManagerAssociationsAP.js +0 -27
  286. package/models/MediaManagerMetaAP.d.ts +0 -30
  287. package/models/MediaManagerMetaAP.js +0 -21
  288. package/system/bindInstallStepper.d.ts +0 -2
  289. package/system/bindInstallStepper.js +0 -23
  290. /package/lib/{catalog → v4/catalog}/CatalogHandler.d.ts +0 -0
  291. /package/lib/{catalog → v4/catalog}/CatalogHandler.js +0 -0
  292. /package/lib/{controls → v4/controls}/AbstractControls.js +0 -0
  293. /package/lib/{controls → v4/controls}/ControlsHandler.d.ts +0 -0
  294. /package/lib/{controls → v4/controls}/ControlsHandler.js +0 -0
  295. /package/lib/{controls → v4/controls}/codeEditor/MonacoEditor.js +0 -0
  296. /package/lib/{controls → v4/controls}/geojsoneditor/GeoEditor.js +0 -0
  297. /package/lib/{controls → v4/controls}/jsoneditor/JsonEditor.js +0 -0
  298. /package/lib/{controls → v4/controls}/markdown/ToastUiEditor.js +0 -0
  299. /package/lib/{controls → v4/controls}/table/Handsontable.js +0 -0
  300. /package/lib/{controls → v4/controls}/wysiwyg/CKeditor.js +0 -0
  301. /package/lib/{inertia → v4/inertia}/flash.d.ts +0 -0
  302. /package/lib/{inertia → v4/inertia}/flash.js +0 -0
  303. /package/lib/{inertia → v4/inertia}/inertiaAdapter.d.ts +0 -0
  304. /package/lib/{inertia → v4/inertia}/inertiaAdapter.js +0 -0
  305. /package/lib/{widgets → v4/widgets}/abstractAction.d.ts +0 -0
  306. /package/lib/{widgets → v4/widgets}/abstractAction.js +0 -0
  307. /package/lib/{widgets → v4/widgets}/abstractCustom.d.ts +0 -0
  308. /package/lib/{widgets → v4/widgets}/abstractCustom.js +0 -0
  309. /package/lib/{widgets → v4/widgets}/abstractInfo.d.ts +0 -0
  310. /package/lib/{widgets → v4/widgets}/abstractInfo.js +0 -0
  311. /package/lib/{widgets → v4/widgets}/abstractLink.js +0 -0
  312. /package/lib/{widgets → v4/widgets}/abstractSwitch.d.ts +0 -0
  313. /package/lib/{widgets → v4/widgets}/abstractSwitch.js +0 -0
  314. /package/lib/{widgets → v4/widgets}/abstractWidgetBase.js +0 -0
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: React.ComponentProps<typeof DayPicker>): import("react/jsx-runtime").JSX.Element;
4
+ export { Calendar };
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ChevronLeft, ChevronRight } from "lucide-react";
3
+ import { DayPicker } from "react-day-picker";
4
+ import { cn } from "@/lib/utils";
5
+ import { buttonVariants } from "@/components/ui/button";
6
+ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
7
+ return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("p-3", className), classNames: {
8
+ months: "flex flex-col sm:flex-row gap-2",
9
+ month: "flex flex-col gap-4",
10
+ caption: "flex justify-center pt-1 relative items-center w-full",
11
+ caption_label: "text-sm font-medium",
12
+ nav: "flex items-center gap-1",
13
+ nav_button: cn(buttonVariants({ variant: "outline" }), "size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
14
+ nav_button_previous: "absolute left-1",
15
+ nav_button_next: "absolute right-1",
16
+ table: "w-full border-collapse space-x-1",
17
+ head_row: "flex",
18
+ head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
19
+ row: "flex w-full mt-2",
20
+ cell: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md", props.mode === "range"
21
+ ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
22
+ : "[&:has([aria-selected])]:rounded-md"),
23
+ day: cn(buttonVariants({ variant: "ghost" }), "size-8 p-0 font-normal aria-selected:opacity-100 cursor-pointer"),
24
+ day_range_start: "day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",
25
+ day_range_end: "day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",
26
+ day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
27
+ day_today: "bg-accent text-accent-foreground",
28
+ day_outside: "day-outside text-muted-foreground aria-selected:text-muted-foreground",
29
+ day_disabled: "text-muted-foreground opacity-50",
30
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
31
+ day_hidden: "invisible",
32
+ ...classNames,
33
+ }, components: {
34
+ IconLeft: ({ className, ...props }) => (_jsx(ChevronLeft, { className: cn("size-4", className), ...props })),
35
+ IconRight: ({ className, ...props }) => (_jsx(ChevronRight, { className: cn("size-4", className), ...props })),
36
+ }, ...props }));
37
+ }
38
+ export { Calendar };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@/lib/utils";
3
+ function Card({ className, ...props }) {
4
+ return (_jsx("div", { "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className), ...props }));
5
+ }
6
+ function CardHeader({ className, ...props }) {
7
+ return (_jsx("div", { "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className), ...props }));
8
+ }
9
+ function CardTitle({ className, ...props }) {
10
+ return (_jsx("div", { "data-slot": "card-title", className: cn("leading-none font-semibold", className), ...props }));
11
+ }
12
+ function CardDescription({ className, ...props }) {
13
+ return (_jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props }));
14
+ }
15
+ function CardAction({ className, ...props }) {
16
+ return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
17
+ }
18
+ function CardContent({ className, ...props }) {
19
+ return (_jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props }));
20
+ }
21
+ function CardFooter({ className, ...props }) {
22
+ return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props }));
23
+ }
24
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ import { CheckIcon } from "lucide-react";
4
+ import { cn } from "@/lib/utils";
5
+ function Checkbox({ className, ...props }) {
6
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
7
+ }
8
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
+ function Collapsible({ ...props }) {
4
+ return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
5
+ }
6
+ function CollapsibleTrigger({ ...props }) {
7
+ return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
8
+ }
9
+ function CollapsibleContent({ ...props }) {
10
+ return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
11
+ }
12
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "@/components/ui/dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
10
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
11
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
16
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { SearchIcon } from "lucide-react";
4
+ import { cn } from "@/lib/utils";
5
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@/components/ui/dialog";
6
+ function Command({ className, ...props }) {
7
+ return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props }));
8
+ }
9
+ function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
10
+ return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: "overflow-hidden p-0", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
11
+ }
12
+ function CommandInput({ className, ...props }) {
13
+ return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
14
+ }
15
+ function CommandList({ className, ...props }) {
16
+ return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
17
+ }
18
+ function CommandEmpty({ ...props }) {
19
+ return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
20
+ }
21
+ function CommandGroup({ className, ...props }) {
22
+ return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className), ...props }));
23
+ }
24
+ function CommandSeparator({ className, ...props }) {
25
+ return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className), ...props }));
26
+ }
27
+ function CommandItem({ className, ...props }) {
28
+ return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
29
+ }
30
+ function CommandShortcut({ className, ...props }) {
31
+ return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
32
+ }
33
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
9
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
10
+ inset?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
13
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
14
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
15
+ inset?: boolean;
16
+ variant?: "default" | "destructive";
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
19
+ declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
20
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
21
+ inset?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
24
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
25
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
4
+ import { cn } from "@/lib/utils";
5
+ function ContextMenu({ ...props }) {
6
+ return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
7
+ }
8
+ function ContextMenuTrigger({ ...props }) {
9
+ return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props }));
10
+ }
11
+ function ContextMenuGroup({ ...props }) {
12
+ return (_jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
13
+ }
14
+ function ContextMenuPortal({ ...props }) {
15
+ return (_jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props }));
16
+ }
17
+ function ContextMenuSub({ ...props }) {
18
+ return _jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
19
+ }
20
+ function ContextMenuRadioGroup({ ...props }) {
21
+ return (_jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props }));
22
+ }
23
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
24
+ return (_jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
25
+ }
26
+ function ContextMenuSubContent({ className, ...props }) {
27
+ return (_jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
28
+ }
29
+ function ContextMenuContent({ className, ...props }) {
30
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
31
+ }
32
+ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
33
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
34
+ }
35
+ function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
36
+ return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
37
+ }
38
+ function ContextMenuRadioItem({ className, children, ...props }) {
39
+ return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none 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-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
40
+ }
41
+ function ContextMenuLabel({ className, inset, ...props }) {
42
+ return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
43
+ }
44
+ function ContextMenuSeparator({ className, ...props }) {
45
+ return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
46
+ }
47
+ function ContextMenuShortcut({ className, ...props }) {
48
+ return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
49
+ }
50
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -0,0 +1,43 @@
1
+ import type { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ import * as React from "react";
3
+ interface DialogStackProps extends HTMLAttributes<HTMLDivElement> {
4
+ open?: boolean;
5
+ clickable?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ children: ReactNode;
8
+ }
9
+ export type DialogStackHandle = {
10
+ open: () => void;
11
+ close: () => void;
12
+ next: () => void;
13
+ prev: () => void;
14
+ closeCurrent: () => void;
15
+ };
16
+ type DialogStackChildProps = {
17
+ index?: number;
18
+ };
19
+ export declare const DialogStack: React.ForwardRefExoticComponent<DialogStackProps & React.RefAttributes<DialogStackHandle>>;
20
+ export declare const DialogStackTrigger: ({ children, className, onClick, asChild, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
21
+ asChild?: boolean;
22
+ }) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const DialogStackOverlay: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element | null;
24
+ export declare const DialogStackBody: ({ children, className, ...props }: HTMLAttributes<HTMLDivElement> & {
25
+ children: ReactElement<DialogStackChildProps>[] | ReactElement<DialogStackChildProps>;
26
+ }) => import("react/jsx-runtime").JSX.Element | null;
27
+ export declare const DialogStackContent: ({ children, className, index, offset, ...props }: HTMLAttributes<HTMLDivElement> & {
28
+ index?: number;
29
+ offset?: number;
30
+ }) => import("react/jsx-runtime").JSX.Element | null;
31
+ export declare const DialogStackTitle: ({ children, className, ...props }: HTMLAttributes<HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const DialogStackDescription: ({ children, className, ...props }: HTMLAttributes<HTMLParagraphElement>) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const DialogStackHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const DialogStackFooter: ({ children, className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
35
+ export declare const DialogStackNext: ({ children, className, asChild, ...props }: {
36
+ asChild?: boolean;
37
+ } & HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
38
+ export declare const DialogStackPrevious: ({ children, className, asChild, ...props }: {
39
+ children?: ReactNode;
40
+ className?: string;
41
+ asChild?: boolean;
42
+ } & HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
43
+ export {};
@@ -0,0 +1,238 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cn } from '@/lib/utils';
4
+ import * as Portal from '@radix-ui/react-portal';
5
+ import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useState, } from 'react';
6
+ import { Button } from "@/components/ui/button";
7
+ import { XIcon } from "lucide-react";
8
+ import * as React from "react";
9
+ const DialogStackContext = createContext({
10
+ activeIndex: 0,
11
+ setActiveIndex: () => {
12
+ },
13
+ totalDialogs: 0,
14
+ setTotalDialogs: () => {
15
+ },
16
+ isOpen: false,
17
+ setIsOpen: () => {
18
+ },
19
+ clickable: false,
20
+ shouldAnimate: false,
21
+ setShouldAnimate: () => {
22
+ },
23
+ closeDialog: () => {
24
+ }, // Добавлено
25
+ });
26
+ export const DialogStack = React.forwardRef(({ children, className, open = false, onOpenChange, clickable = false, ...props }, ref) => {
27
+ const [activeIndex, setActiveIndex] = useState(0);
28
+ const [isOpen, setIsOpen] = useState(open);
29
+ const [shouldAnimate, setShouldAnimate] = useState(false);
30
+ const [totalDialogs, setTotalDialogs] = useState(0);
31
+ const closeDialog = (index) => {
32
+ if (index === activeIndex) {
33
+ if (activeIndex > 0) {
34
+ setActiveIndex(prev => prev - 1);
35
+ }
36
+ else {
37
+ setIsOpen(false);
38
+ }
39
+ }
40
+ };
41
+ // Императивные методы
42
+ React.useImperativeHandle(ref, () => ({
43
+ open: () => {
44
+ setIsOpen(true);
45
+ // setActiveIndex(0);
46
+ // setShouldAnimate(true);
47
+ },
48
+ close: () => {
49
+ setIsOpen(false);
50
+ setActiveIndex(0);
51
+ },
52
+ next: () => {
53
+ setActiveIndex(activeIndex + 1);
54
+ },
55
+ prev: () => {
56
+ if (activeIndex > 0) {
57
+ setActiveIndex(activeIndex - 1);
58
+ }
59
+ },
60
+ goTo: (index) => {
61
+ if (index >= 0 && index < totalDialogs) {
62
+ setActiveIndex(index);
63
+ }
64
+ },
65
+ closeCurrent: () => closeDialog(activeIndex),
66
+ isOpen,
67
+ activeIndex,
68
+ totalDialogs
69
+ }), [activeIndex, totalDialogs, isOpen]);
70
+ useEffect(() => {
71
+ const htmlElement = document.documentElement;
72
+ if (isOpen) {
73
+ htmlElement.style.overflow = 'hidden';
74
+ setShouldAnimate(true);
75
+ }
76
+ else {
77
+ htmlElement.style.overflow = '';
78
+ }
79
+ onOpenChange?.(isOpen);
80
+ return () => {
81
+ htmlElement.style.overflow = '';
82
+ };
83
+ }, [isOpen, onOpenChange]);
84
+ return (_jsx(DialogStackContext.Provider, { value: {
85
+ activeIndex,
86
+ setActiveIndex,
87
+ totalDialogs,
88
+ setTotalDialogs,
89
+ isOpen,
90
+ setIsOpen,
91
+ clickable,
92
+ shouldAnimate,
93
+ setShouldAnimate,
94
+ closeDialog,
95
+ }, children: _jsx("div", { className: className, ...props, children: children }) }));
96
+ });
97
+ DialogStack.displayName = 'DialogStack';
98
+ export const DialogStackTrigger = ({ children, className, onClick, asChild, ...props }) => {
99
+ const context = useContext(DialogStackContext);
100
+ if (!context) {
101
+ throw new Error('DialogStackTrigger must be used within a DialogStack');
102
+ }
103
+ const handleClick = (e) => {
104
+ context.setIsOpen(true);
105
+ onClick?.(e);
106
+ };
107
+ if (asChild && isValidElement(children)) {
108
+ return React.cloneElement(children, {
109
+ onClick: handleClick,
110
+ className: cn(className, children.props.className),
111
+ ...props,
112
+ });
113
+ }
114
+ return (_jsx("button", { onClick: handleClick, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm', 'ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2', 'focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', 'bg-primary text-primary-foreground hover:bg-primary/90', 'h-10 px-4 py-2', className), ...props, children: children }));
115
+ };
116
+ export const DialogStackOverlay = ({ className, ...props }) => {
117
+ const context = useContext(DialogStackContext);
118
+ if (!context) {
119
+ throw new Error('DialogStackOverlay must be used within a DialogStack');
120
+ }
121
+ if (!context.isOpen) {
122
+ return null;
123
+ }
124
+ return (
125
+ // biome-ignore lint/nursery/noStaticElementInteractions: "This is a clickable overlay"
126
+ _jsx("div", { className: cn('fixed inset-0 z-50 bg-black/80 backdrop-blur-sm', 'data-[state=closed]:animate-out data-[state=open]:animate-in', 'data-[state=closed]:fade-out-0 slide-in-from-right-1/2 data-[state=open]:fade-in-0', className), onClick: () => {
127
+ if (context.activeIndex === 0) {
128
+ context.setIsOpen(false);
129
+ }
130
+ else {
131
+ context.setActiveIndex(context.activeIndex - 1);
132
+ }
133
+ }, ...props }));
134
+ };
135
+ export const DialogStackBody = ({ children, className, ...props }) => {
136
+ const context = useContext(DialogStackContext);
137
+ const [totalDialogs, setTotalDialogs] = useState(Children.count(children));
138
+ if (!context) {
139
+ throw new Error('DialogStackBody must be used within a DialogStack');
140
+ }
141
+ if (!context.isOpen) {
142
+ return null;
143
+ }
144
+ return (_jsx(DialogStackContext.Provider, { value: {
145
+ ...context,
146
+ totalDialogs,
147
+ setTotalDialogs,
148
+ }, children: _jsx(Portal.Root, { children: _jsx("div", { className: cn('pointer-events-none fixed z-50 w-full max-w-full md:max-w-[67%] right-0 top-0 md:top-[1vh]', className), ...props, children: Children.map(children, (child, index) => isValidElement(child)
149
+ ? cloneElement(child, { index })
150
+ : child) }) }) }));
151
+ };
152
+ export const DialogStackContent = ({ children, className, index = 0, offset = 20, ...props }) => {
153
+ const context = useContext(DialogStackContext);
154
+ if (!context) {
155
+ throw new Error('DialogStackContent must be used within a DialogStack');
156
+ }
157
+ if (!context.isOpen) {
158
+ return null;
159
+ }
160
+ const handleClose = () => {
161
+ context.closeDialog(index); // Используем новую функцию
162
+ };
163
+ const handleClick = (e) => {
164
+ e.stopPropagation();
165
+ if (context.clickable && context.activeIndex > index) {
166
+ context.setActiveIndex(index ?? 0);
167
+ }
168
+ };
169
+ const distanceFromActive = index - context.activeIndex;
170
+ const translateX = distanceFromActive < 0
171
+ ? `-${Math.abs(distanceFromActive) * offset}px`
172
+ : `0`;
173
+ const showAnimation = index === 0 && context.activeIndex === 0 && context.shouldAnimate;
174
+ useEffect(() => {
175
+ if (showAnimation) {
176
+ const timer = setTimeout(() => {
177
+ context.setShouldAnimate(false);
178
+ }, 200);
179
+ return () => clearTimeout(timer);
180
+ }
181
+ }, [showAnimation]);
182
+ return (_jsxs("div", { onClick: handleClick, className: cn('h-[100vh] md:h-[98vh] w-full md:rounded-l-md border bg-background p-6 shadow-lg md:transition-all duration-200', showAnimation && 'animate-in slide-in-from-right-1/2', distanceFromActive < 0 && 'brightness-75 blur-[2px]', className), style: {
183
+ top: 0,
184
+ marginLeft: `${translateX}`,
185
+ marginTop: `${window.innerWidth > 768 ? Math.abs(distanceFromActive) * 10 : 0}px`,
186
+ width: `calc(100% + ${Math.abs(distanceFromActive) * offset}px)`,
187
+ zIndex: 50 - Math.abs(context.activeIndex - (index ?? 0)),
188
+ position: distanceFromActive ? 'absolute' : 'relative',
189
+ opacity: distanceFromActive > 0 ? 0 : 1,
190
+ pointerEvents: distanceFromActive > 0 ? 'none' : 'auto',
191
+ cursor: context.clickable && context.activeIndex > index
192
+ ? 'pointer'
193
+ : 'default',
194
+ }, ...props, children: [context.activeIndex === index && (_jsx(Button, { asChild: true, variant: "ghost", className: "absolute z-[1005] top-4 right-4 p-1 size-8", onClick: handleClose, "aria-label": "Close", children: _jsx(XIcon, {}) })), _jsx("div", { className: cn('h-full w-full transition-all duration-200', context.activeIndex !== index &&
195
+ 'pointer-events-none select-none'), children: children })] }));
196
+ };
197
+ export const DialogStackTitle = ({ children, className, ...props }) => (_jsx("h2", { className: cn('font-semibold text-lg leading-none tracking-tight', className), ...props, children: children }));
198
+ export const DialogStackDescription = ({ children, className, ...props }) => (_jsx("p", { className: cn('text-muted-foreground text-sm', className), ...props, children: children }));
199
+ export const DialogStackHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
200
+ export const DialogStackFooter = ({ children, className, ...props }) => (_jsx("div", { className: cn('flex items-center justify-end space-x-2 pt-4', className), ...props, children: children }));
201
+ export const DialogStackNext = ({ children, className, asChild, ...props }) => {
202
+ const context = useContext(DialogStackContext);
203
+ if (!context) {
204
+ throw new Error('DialogStackNext must be used within a DialogStack');
205
+ }
206
+ const handleNext = () => {
207
+ if (context.activeIndex < context.totalDialogs - 1) {
208
+ context.setActiveIndex(context.activeIndex + 1);
209
+ }
210
+ };
211
+ if (asChild && isValidElement(children)) {
212
+ return React.cloneElement(children, {
213
+ onClick: handleNext,
214
+ className: cn(className, children.props.className),
215
+ ...props,
216
+ });
217
+ }
218
+ return (_jsx("button", { type: "button", onClick: handleNext, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', className), disabled: context.activeIndex >= context.totalDialogs - 1, ...props, children: children || 'Next' }));
219
+ };
220
+ export const DialogStackPrevious = ({ children, className, asChild, ...props }) => {
221
+ const context = useContext(DialogStackContext);
222
+ if (!context) {
223
+ throw new Error('DialogStackPrevious must be used within a DialogStack');
224
+ }
225
+ const handlePrevious = () => {
226
+ if (context.activeIndex > 0) {
227
+ context.setActiveIndex(context.activeIndex - 1);
228
+ }
229
+ };
230
+ if (asChild && isValidElement(children)) {
231
+ return React.cloneElement(children, {
232
+ onClick: handlePrevious,
233
+ className: cn(className, children.props.className),
234
+ ...props,
235
+ });
236
+ }
237
+ return (_jsx("button", { type: "button", onClick: handlePrevious, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', className), disabled: context.activeIndex <= 0, ...props, children: children || 'Previous' }));
238
+ };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
9
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { XIcon } from "lucide-react";
4
+ import { cn } from "@/lib/utils";
5
+ function Dialog({ ...props }) {
6
+ return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
7
+ }
8
+ function DialogTrigger({ ...props }) {
9
+ return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
10
+ }
11
+ function DialogPortal({ ...props }) {
12
+ return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
13
+ }
14
+ function DialogClose({ ...props }) {
15
+ return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
16
+ }
17
+ function DialogOverlay({ className, ...props }) {
18
+ return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
19
+ }
20
+ function DialogContent({ className, children, ...props }) {
21
+ return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
22
+ }
23
+ function DialogHeader({ className, ...props }) {
24
+ return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
25
+ }
26
+ function DialogFooter({ className, ...props }) {
27
+ return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
28
+ }
29
+ function DialogTitle({ className, ...props }) {
30
+ return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
31
+ }
32
+ function DialogDescription({ className, ...props }) {
33
+ return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
34
+ }
35
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: "default" | "destructive";
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };