@customafk/lunas-ui 0.0.56 → 0.0.57

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 (195) hide show
  1. package/dist/{add-new-NPjDhZh_.js → add-new-B9KK77jE.js} +1 -1
  2. package/dist/{add-new-NPjDhZh_.js.map → add-new-B9KK77jE.js.map} +1 -1
  3. package/dist/{add-new-B_isqDA8.cjs → add-new-B9vW0r69.cjs} +1 -1
  4. package/dist/{add-new-B_isqDA8.cjs.map → add-new-B9vW0r69.cjs.map} +1 -1
  5. package/dist/{button-CbUzKqWI.d.ts → button-ChLnQHG9.d.ts} +5 -5
  6. package/dist/{button-D-rU8Zxi.d.cts → button-QTiWGKzL.d.cts} +5 -5
  7. package/dist/{command-rcA08Vgu.d.ts → command-BkU08119.d.cts} +12 -12
  8. package/dist/{command-BjYoQgjB.d.cts → command-CQ0BKof5.d.ts} +12 -12
  9. package/dist/data-display/empty.d.cts +2 -2
  10. package/dist/data-display/empty.d.ts +2 -2
  11. package/dist/data-display/statistic.d.cts +2 -2
  12. package/dist/data-display/statistic.d.ts +2 -2
  13. package/dist/{dialog-BOjG_Rwt.d.ts → dialog-DBHKJa6T.d.cts} +12 -12
  14. package/dist/{dialog-1Rot05ly.d.cts → dialog-Dt7Z19tQ.d.ts} +12 -12
  15. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +28 -28
  16. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +30 -30
  17. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  18. package/dist/dialogs/detail-dialog/index.js +1 -1
  19. package/dist/dialogs/form-dialog.cjs +1 -1
  20. package/dist/dialogs/form-dialog.cjs.map +1 -1
  21. package/dist/dialogs/form-dialog.d.cts +2 -2
  22. package/dist/dialogs/form-dialog.d.ts +2 -2
  23. package/dist/dialogs/form-dialog.js +1 -1
  24. package/dist/dialogs/form-dialog.js.map +1 -1
  25. package/dist/{dropdown-menu-DSjfaonn.js → dropdown-menu-BF9QbIfo.js} +1 -1
  26. package/dist/{dropdown-menu-DSjfaonn.js.map → dropdown-menu-BF9QbIfo.js.map} +1 -1
  27. package/dist/{dropdown-menu-Dd9uB7ai.cjs → dropdown-menu-CIldv8D7.cjs} +1 -1
  28. package/dist/{dropdown-menu-Dd9uB7ai.cjs.map → dropdown-menu-CIldv8D7.cjs.map} +1 -1
  29. package/dist/forms/combobox-field.d.cts +2 -2
  30. package/dist/forms/combobox-field.d.ts +2 -2
  31. package/dist/forms/date-field.d.cts +2 -2
  32. package/dist/forms/date-field.d.ts +2 -2
  33. package/dist/forms/form-wrapper.d.cts +2 -2
  34. package/dist/forms/form-wrapper.d.ts +2 -2
  35. package/dist/forms/multi-select-field.d.cts +2 -2
  36. package/dist/forms/multi-select-field.d.ts +2 -2
  37. package/dist/forms/number-field.d.cts +2 -2
  38. package/dist/forms/number-field.d.ts +2 -2
  39. package/dist/forms/password-field.d.cts +2 -2
  40. package/dist/forms/password-field.d.ts +2 -2
  41. package/dist/forms/select-field.d.cts +2 -2
  42. package/dist/forms/select-field.d.ts +2 -2
  43. package/dist/forms/switch-field.d.cts +2 -2
  44. package/dist/forms/switch-field.d.ts +2 -2
  45. package/dist/forms/text-field.d.cts +2 -2
  46. package/dist/forms/text-field.d.ts +2 -2
  47. package/dist/forms/textarea-field.d.cts +2 -2
  48. package/dist/forms/textarea-field.d.ts +2 -2
  49. package/dist/{input-C2_xbUlg.d.ts → input-B8FXpdwz.d.ts} +3 -3
  50. package/dist/{input-DylA1RM_.d.cts → input-BQYGZywO.d.cts} +3 -3
  51. package/dist/layouts/app-layout/index.d.cts +26 -26
  52. package/dist/layouts/app-layout/index.d.ts +3 -3
  53. package/dist/layouts/flex.d.cts +2 -2
  54. package/dist/layouts/flex.d.ts +2 -2
  55. package/dist/layouts/main/index.d.cts +4 -4
  56. package/dist/layouts/main/index.d.ts +4 -4
  57. package/dist/{refresh-D7GSuCBj.cjs → refresh-By25Z7zj.cjs} +1 -1
  58. package/dist/{refresh-D7GSuCBj.cjs.map → refresh-By25Z7zj.cjs.map} +1 -1
  59. package/dist/{refresh-DCb5DN8c.js → refresh-CMzmHeMf.js} +1 -1
  60. package/dist/{refresh-DCb5DN8c.js.map → refresh-CMzmHeMf.js.map} +1 -1
  61. package/dist/{scroll-area-DkMARNAo.js → scroll-area-CPQoJKt1.js} +1 -1
  62. package/dist/{scroll-area-DkMARNAo.js.map → scroll-area-CPQoJKt1.js.map} +1 -1
  63. package/dist/{scroll-area-DPdTIzO1.cjs → scroll-area-D7O1NyZn.cjs} +1 -1
  64. package/dist/{scroll-area-DPdTIzO1.cjs.map → scroll-area-D7O1NyZn.cjs.map} +1 -1
  65. package/dist/{search-input-CgsAwGXl.js → search-input-Ba8aUECr.js} +1 -1
  66. package/dist/{search-input-CgsAwGXl.js.map → search-input-Ba8aUECr.js.map} +1 -1
  67. package/dist/{search-input-BoMYvbuv.cjs → search-input-BmAoqcee.cjs} +1 -1
  68. package/dist/{search-input-BoMYvbuv.cjs.map → search-input-BmAoqcee.cjs.map} +1 -1
  69. package/dist/{separator-C4B7TPqd.d.ts → separator-CJHYnmH1.d.ts} +3 -3
  70. package/dist/{separator-Cj69RDvU.d.cts → separator-DJ-8s4B1.d.cts} +3 -3
  71. package/dist/table/index.cjs +1 -1
  72. package/dist/table/index.d.cts +2 -2
  73. package/dist/table/index.d.ts +2 -2
  74. package/dist/table/index.js +1 -1
  75. package/dist/{table-BX0M7vcu.cjs → table-Dgk7z91H.cjs} +2 -2
  76. package/dist/{table-BX0M7vcu.cjs.map → table-Dgk7z91H.cjs.map} +1 -1
  77. package/dist/{table-CBnyucZW.js → table-goPaI3yw.js} +2 -2
  78. package/dist/{table-CBnyucZW.js.map → table-goPaI3yw.js.map} +1 -1
  79. package/dist/{title-j3aTXn_c.cjs → title-DONX1fR6.cjs} +1 -1
  80. package/dist/{title-j3aTXn_c.cjs.map → title-DONX1fR6.cjs.map} +1 -1
  81. package/dist/{title-CYln9_WT.js → title-itXqz0us.js} +1 -1
  82. package/dist/{title-CYln9_WT.js.map → title-itXqz0us.js.map} +1 -1
  83. package/dist/{toggle-B3Tn0fly.d.ts → toggle-D5tumZ8L.d.cts} +4 -4
  84. package/dist/{toggle-BwRoCj2v.d.cts → toggle-Dd0rFKhT.d.ts} +4 -4
  85. package/dist/{tooltip-ChLgwxDy.d.ts → tooltip-BnRE0jV2.d.ts} +6 -6
  86. package/dist/{tooltip-DgrYrDE8.d.cts → tooltip-Dkh_dieJ.d.cts} +6 -6
  87. package/dist/typography/paragraph.d.cts +2 -2
  88. package/dist/typography/paragraph.d.ts +2 -2
  89. package/dist/typography/title.cjs +1 -1
  90. package/dist/typography/title.d.cts +2 -2
  91. package/dist/typography/title.d.ts +2 -2
  92. package/dist/typography/title.js +1 -1
  93. package/dist/ui/alert-dialog.d.cts +12 -12
  94. package/dist/ui/alert-dialog.d.ts +12 -12
  95. package/dist/ui/alert.d.cts +6 -6
  96. package/dist/ui/alert.d.ts +6 -6
  97. package/dist/ui/aspect-ratio.d.cts +2 -2
  98. package/dist/ui/aspect-ratio.d.ts +2 -2
  99. package/dist/ui/avatar.d.cts +4 -4
  100. package/dist/ui/avatar.d.ts +4 -4
  101. package/dist/ui/badge.d.cts +4 -4
  102. package/dist/ui/badge.d.ts +2 -2
  103. package/dist/ui/breadcrumb.d.cts +8 -8
  104. package/dist/ui/breadcrumb.d.ts +8 -8
  105. package/dist/ui/button.d.cts +1 -1
  106. package/dist/ui/button.d.ts +1 -1
  107. package/dist/ui/buttons/add-new.cjs +1 -1
  108. package/dist/ui/buttons/add-new.js +1 -1
  109. package/dist/ui/buttons/refresh.cjs +1 -1
  110. package/dist/ui/buttons/refresh.js +1 -1
  111. package/dist/ui/calendar.d.cts +4 -4
  112. package/dist/ui/calendar.d.ts +4 -4
  113. package/dist/ui/card.d.cts +8 -8
  114. package/dist/ui/card.d.ts +8 -8
  115. package/dist/ui/carousel.d.cts +7 -7
  116. package/dist/ui/carousel.d.ts +7 -7
  117. package/dist/ui/collapsible.d.cts +4 -4
  118. package/dist/ui/collapsible.d.ts +4 -4
  119. package/dist/ui/command.d.cts +2 -2
  120. package/dist/ui/command.d.ts +2 -2
  121. package/dist/ui/context-menu.d.cts +16 -16
  122. package/dist/ui/context-menu.d.ts +16 -16
  123. package/dist/ui/dialog.d.cts +1 -1
  124. package/dist/ui/dialog.d.ts +1 -1
  125. package/dist/ui/dropdown-menu.cjs +1 -1
  126. package/dist/ui/dropdown-menu.d.cts +16 -16
  127. package/dist/ui/dropdown-menu.d.ts +16 -16
  128. package/dist/ui/dropdown-menu.js +1 -1
  129. package/dist/ui/file-uploader.d.cts +2 -2
  130. package/dist/ui/file-uploader.d.ts +2 -2
  131. package/dist/ui/form.d.cts +7 -7
  132. package/dist/ui/form.d.ts +7 -7
  133. package/dist/ui/hover-card.d.cts +4 -4
  134. package/dist/ui/hover-card.d.ts +4 -4
  135. package/dist/ui/input-otp.d.cts +5 -5
  136. package/dist/ui/input-otp.d.ts +5 -5
  137. package/dist/ui/input.d.cts +1 -1
  138. package/dist/ui/input.d.ts +1 -1
  139. package/dist/ui/inputs/search-input.cjs +1 -1
  140. package/dist/ui/inputs/search-input.d.cts +3 -3
  141. package/dist/ui/inputs/search-input.d.ts +3 -3
  142. package/dist/ui/inputs/search-input.js +1 -1
  143. package/dist/ui/label.d.cts +2 -2
  144. package/dist/ui/label.d.ts +2 -2
  145. package/dist/ui/menubar.d.cts +17 -17
  146. package/dist/ui/menubar.d.ts +17 -17
  147. package/dist/ui/multi-select.d.cts +2 -2
  148. package/dist/ui/multi-select.d.ts +2 -2
  149. package/dist/ui/navigation-menu.d.cts +11 -11
  150. package/dist/ui/navigation-menu.d.ts +9 -9
  151. package/dist/ui/pagination.d.cts +9 -9
  152. package/dist/ui/pagination.d.ts +9 -9
  153. package/dist/ui/popover.d.cts +5 -5
  154. package/dist/ui/popover.d.ts +5 -5
  155. package/dist/ui/progress.d.cts +2 -2
  156. package/dist/ui/progress.d.ts +2 -2
  157. package/dist/ui/radio-group.d.cts +3 -3
  158. package/dist/ui/radio-group.d.ts +3 -3
  159. package/dist/ui/resizable.d.cts +4 -4
  160. package/dist/ui/resizable.d.ts +4 -4
  161. package/dist/ui/scroll-area.cjs +1 -1
  162. package/dist/ui/scroll-area.d.cts +3 -3
  163. package/dist/ui/scroll-area.d.ts +3 -3
  164. package/dist/ui/scroll-area.js +1 -1
  165. package/dist/ui/select.d.cts +11 -11
  166. package/dist/ui/select.d.ts +11 -11
  167. package/dist/ui/separator.d.cts +1 -1
  168. package/dist/ui/separator.d.ts +1 -1
  169. package/dist/ui/sheet.d.cts +9 -9
  170. package/dist/ui/sheet.d.ts +9 -9
  171. package/dist/ui/sidebar.d.cts +30 -30
  172. package/dist/ui/sidebar.d.ts +30 -30
  173. package/dist/ui/skeleton.d.cts +2 -2
  174. package/dist/ui/skeleton.d.ts +2 -2
  175. package/dist/ui/slider.d.cts +2 -2
  176. package/dist/ui/slider.d.ts +2 -2
  177. package/dist/ui/sonner.d.cts +2 -2
  178. package/dist/ui/sonner.d.ts +2 -2
  179. package/dist/ui/switch.d.cts +2 -2
  180. package/dist/ui/switch.d.ts +2 -2
  181. package/dist/ui/table.cjs +1 -1
  182. package/dist/ui/table.d.cts +9 -9
  183. package/dist/ui/table.d.ts +9 -9
  184. package/dist/ui/table.js +1 -1
  185. package/dist/ui/tabs.d.cts +5 -5
  186. package/dist/ui/tabs.d.ts +5 -5
  187. package/dist/ui/textarea.d.cts +2 -2
  188. package/dist/ui/textarea.d.ts +2 -2
  189. package/dist/ui/toggle-group.d.cts +4 -4
  190. package/dist/ui/toggle-group.d.ts +4 -4
  191. package/dist/ui/toggle.d.cts +1 -1
  192. package/dist/ui/toggle.d.ts +1 -1
  193. package/dist/ui/tooltip.d.cts +1 -1
  194. package/dist/ui/tooltip.d.ts +1 -1
  195. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { Button } from "../../../button-CbUzKqWI.js";
2
- import { Input } from "../../../input-C2_xbUlg.js";
3
- import { Separator } from "../../../separator-C4B7TPqd.js";
4
- import { TooltipContent } from "../../../tooltip-ChLgwxDy.js";
1
+ import { Button } from "../../../button-ChLnQHG9.js";
2
+ import { Input } from "../../../input-B8FXpdwz.js";
3
+ import { Separator } from "../../../separator-CJHYnmH1.js";
4
+ import { TooltipContent } from "../../../tooltip-BnRE0jV2.js";
5
5
  import React from "react";
6
- import * as react_jsx_runtime205 from "react/jsx-runtime";
6
+ import * as react_jsx_runtime236 from "react/jsx-runtime";
7
7
  import { VariantProps } from "class-variance-authority";
8
- import * as class_variance_authority_types5 from "class-variance-authority/types";
8
+ import * as class_variance_authority_types6 from "class-variance-authority/types";
9
9
 
10
10
  //#region packages/components/dialogs/detail-dialog/component/sidebar.d.ts
11
11
  type SidebarContextProps = {
@@ -30,7 +30,7 @@ declare function SidebarProvider({
30
30
  defaultOpen?: boolean;
31
31
  open?: boolean;
32
32
  onOpenChange?: (open: boolean) => void;
33
- }): react_jsx_runtime205.JSX.Element;
33
+ }): react_jsx_runtime236.JSX.Element;
34
34
  declare function Sidebar({
35
35
  side,
36
36
  variant,
@@ -42,74 +42,74 @@ declare function Sidebar({
42
42
  side?: 'left' | 'right';
43
43
  variant?: 'sidebar' | 'floating' | 'inset';
44
44
  collapsible?: 'offcanvas' | 'icon' | 'none';
45
- }): react_jsx_runtime205.JSX.Element;
45
+ }): react_jsx_runtime236.JSX.Element;
46
46
  declare function DetailDialogSidebarTrigger({
47
47
  className,
48
48
  onClick,
49
49
  ...props
50
- }: React.ComponentProps<typeof Button>): react_jsx_runtime205.JSX.Element;
50
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime236.JSX.Element;
51
51
  declare function DetailDialogSidebarRail({
52
52
  className,
53
53
  ...props
54
- }: React.ComponentProps<'button'>): react_jsx_runtime205.JSX.Element;
54
+ }: React.ComponentProps<'button'>): react_jsx_runtime236.JSX.Element;
55
55
  declare function SidebarInset({
56
56
  className,
57
57
  ...props
58
- }: React.ComponentProps<'main'>): react_jsx_runtime205.JSX.Element;
58
+ }: React.ComponentProps<'main'>): react_jsx_runtime236.JSX.Element;
59
59
  declare function SidebarInput({
60
60
  className,
61
61
  ...props
62
- }: React.ComponentProps<typeof Input>): react_jsx_runtime205.JSX.Element;
62
+ }: React.ComponentProps<typeof Input>): react_jsx_runtime236.JSX.Element;
63
63
  declare function DetailDialogSidebarHeader({
64
64
  className,
65
65
  ...props
66
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
66
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
67
67
  declare function DetailDialogSidebarFooter({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
70
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
71
71
  declare function DetailDialogSidebarSeparator({
72
72
  className,
73
73
  ...props
74
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime205.JSX.Element;
74
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime236.JSX.Element;
75
75
  declare function DetailDialogSidebarContent({
76
76
  className,
77
77
  ...props
78
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
78
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
79
79
  declare function DetailDialogSidebarGroup({
80
80
  className,
81
81
  ...props
82
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
82
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
83
83
  declare function DetailDialogSidebarGroupLabel({
84
84
  className,
85
85
  asChild,
86
86
  ...props
87
87
  }: React.ComponentProps<'div'> & {
88
88
  asChild?: boolean;
89
- }): react_jsx_runtime205.JSX.Element;
89
+ }): react_jsx_runtime236.JSX.Element;
90
90
  declare function DetailDialogSidebarGroupAction({
91
91
  className,
92
92
  asChild,
93
93
  ...props
94
94
  }: React.ComponentProps<'button'> & {
95
95
  asChild?: boolean;
96
- }): react_jsx_runtime205.JSX.Element;
96
+ }): react_jsx_runtime236.JSX.Element;
97
97
  declare function DetailDialogSidebarGroupContent({
98
98
  className,
99
99
  ...props
100
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
100
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
101
101
  declare function DetailDialogSidebarMenu({
102
102
  className,
103
103
  ...props
104
- }: React.ComponentProps<'ul'>): react_jsx_runtime205.JSX.Element;
104
+ }: React.ComponentProps<'ul'>): react_jsx_runtime236.JSX.Element;
105
105
  declare function DetailDialogSidebarMenuItem({
106
106
  className,
107
107
  ...props
108
- }: React.ComponentProps<'li'>): react_jsx_runtime205.JSX.Element;
108
+ }: React.ComponentProps<'li'>): react_jsx_runtime236.JSX.Element;
109
109
  declare const sidebarMenuButtonVariants: (props?: ({
110
110
  variant?: "default" | "outline" | null | undefined;
111
111
  size?: "sm" | "lg" | "default" | null | undefined;
112
- } & class_variance_authority_types5.ClassProp) | undefined) => string;
112
+ } & class_variance_authority_types6.ClassProp) | undefined) => string;
113
113
  declare function DetailDialogSidebarMenuButton({
114
114
  asChild,
115
115
  isActive,
@@ -122,7 +122,7 @@ declare function DetailDialogSidebarMenuButton({
122
122
  asChild?: boolean;
123
123
  isActive?: boolean;
124
124
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
125
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime205.JSX.Element;
125
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime236.JSX.Element;
126
126
  declare function DetailDialogSidebarMenuAction({
127
127
  className,
128
128
  asChild,
@@ -131,26 +131,26 @@ declare function DetailDialogSidebarMenuAction({
131
131
  }: React.ComponentProps<'button'> & {
132
132
  asChild?: boolean;
133
133
  showOnHover?: boolean;
134
- }): react_jsx_runtime205.JSX.Element;
134
+ }): react_jsx_runtime236.JSX.Element;
135
135
  declare function DetailDialogSidebarMenuBadge({
136
136
  className,
137
137
  ...props
138
- }: React.ComponentProps<'div'>): react_jsx_runtime205.JSX.Element;
138
+ }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
139
139
  declare function DetailDialogSidebarMenuSkeleton({
140
140
  className,
141
141
  showIcon,
142
142
  ...props
143
143
  }: React.ComponentProps<'div'> & {
144
144
  showIcon?: boolean;
145
- }): react_jsx_runtime205.JSX.Element;
145
+ }): react_jsx_runtime236.JSX.Element;
146
146
  declare function DetailDialogSidebarMenuSub({
147
147
  className,
148
148
  ...props
149
- }: React.ComponentProps<'ul'>): react_jsx_runtime205.JSX.Element;
149
+ }: React.ComponentProps<'ul'>): react_jsx_runtime236.JSX.Element;
150
150
  declare function DetailDialogSidebarMenuSubItem({
151
151
  className,
152
152
  ...props
153
- }: React.ComponentProps<'li'>): react_jsx_runtime205.JSX.Element;
153
+ }: React.ComponentProps<'li'>): react_jsx_runtime236.JSX.Element;
154
154
  declare function DetailDialogSidebarMenuSubButton({
155
155
  asChild,
156
156
  size,
@@ -161,7 +161,7 @@ declare function DetailDialogSidebarMenuSubButton({
161
161
  asChild?: boolean;
162
162
  size?: 'sm' | 'md';
163
163
  isActive?: boolean;
164
- }): react_jsx_runtime205.JSX.Element;
164
+ }): react_jsx_runtime236.JSX.Element;
165
165
  //#endregion
166
166
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInput, SidebarInset, SidebarProvider, useSidebar };
167
167
  //# sourceMappingURL=sidebar.d.ts.map
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-CUT6urMc.cjs`);require(`../../card-BNMBjSC_.cjs`);const t=require(`../../flex-DHnsdjKn.cjs`),n=require(`../../date-DevNulgp.cjs`);require(`../../tooltip-DRqQqSFW.cjs`),require(`../../button-ChpGfVjG.cjs`);const r=require(`../../dialog-E5OYibMU.cjs`);require(`../../input-B8bT3wuo.cjs`);const i=require(`../../title-j3aTXn_c.cjs`);require(`../../separator-CECnaAdc.cjs`),require(`../../sheet-CvstHEA7.cjs`),require(`../../skeleton-DcRggqJa.cjs`);const a=require(`../../sidebar-C6MoqLW4.cjs`),o=e.__toESM(require(`@customafk/react-toolkit/utils`)),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`lucide-react`)),l=()=>(0,s.jsxs)(r.DialogHeader,{className:`sr-only`,children:[(0,s.jsx)(r.DialogTitle,{className:`sr-only`}),(0,s.jsx)(r.DialogDescription,{className:`sr-only`})]}),u=({children:e})=>(0,s.jsx)(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:(0,s.jsx)(t.Flex,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),d=({title:e,createdAt:r})=>(0,s.jsxs)(`header`,{className:`bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2`,children:[(0,s.jsx)(a.DetailDialogSidebarTrigger,{}),(0,s.jsxs)(t.Flex,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[(0,s.jsx)(i.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),(0,s.jsxs)(t.Flex,{padding:`none`,className:`text-text-positive-weak relative`,children:[(0,s.jsx)(c.CalendarIcon,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&(0,s.jsx)(n.DateDisplay,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),f=({children:e})=>(0,s.jsx)(r.DialogContent,{className:(0,o.cn)(`relative h-full overflow-hidden border-none p-0`,`rounded-none md:rounded-lg`,`max-h-svh max-w-svw`,`md:max-h-[90svh] md:max-w-[90svw]`,`xl:max-h-[90svh] xl:max-w-[90svw]`,`2xl:max-h-[90svh] 2xl:max-w-7xl`),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:e}),p=({title:e,sidebarFooter:t,children:n})=>(0,s.jsxs)(a.Sidebar,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[(0,s.jsx)(a.DetailDialogSidebarHeader,{children:(0,s.jsx)(a.DetailDialogSidebarMenu,{children:(0,s.jsx)(a.DetailDialogSidebarMenuItem,{children:(0,s.jsxs)(a.DetailDialogSidebarMenuButton,{size:`lg`,tabIndex:-1,children:[(0,s.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,s.jsx)(c.CatIcon,{size:16})}),(0,s.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,s.jsx)(`span`,{className:`truncate font-medium`,children:e||`Detail Dialog`}),(0,s.jsx)(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),(0,s.jsx)(a.DetailDialogSidebarContent,{children:(0,s.jsx)(a.DetailDialogSidebarGroup,{children:n})}),t&&(0,s.jsx)(a.DetailDialogSidebarFooter,{children:t})]}),m=({open:e,isLoading:n=!1,sidebarTitle:i,sidebar:o,sidebarFooter:c,title:m,createdAt:h,onOpenChange:g,children:_})=>(0,s.jsx)(r.Dialog,{open:e,onOpenChange:g,children:(0,s.jsxs)(f,{children:[(0,s.jsx)(l,{}),(0,s.jsxs)(a.SidebarProvider,{className:`h-full min-h-[85svh] items-start`,children:[(0,s.jsx)(p,{title:i,sidebarFooter:c,children:o}),(0,s.jsxs)(u,{children:[(0,s.jsx)(d,{title:m,createdAt:h}),n?(0,s.jsx)(t.Flex,{justify:`center`,className:`bg-muted-muted w-full flex-1 inset-shadow-sm`,children:(0,s.jsx)(`div`,{className:`loader`})}):(0,s.jsx)(`section`,{className:`bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm`,children:_})]})]})]})});exports.DetailDialog=m;
1
+ const e=require(`../../chunk-CUT6urMc.cjs`);require(`../../card-BNMBjSC_.cjs`);const t=require(`../../flex-DHnsdjKn.cjs`),n=require(`../../date-DevNulgp.cjs`);require(`../../tooltip-DRqQqSFW.cjs`),require(`../../button-ChpGfVjG.cjs`);const r=require(`../../dialog-E5OYibMU.cjs`);require(`../../input-B8bT3wuo.cjs`);const i=require(`../../title-DONX1fR6.cjs`);require(`../../separator-CECnaAdc.cjs`),require(`../../sheet-CvstHEA7.cjs`),require(`../../skeleton-DcRggqJa.cjs`);const a=require(`../../sidebar-C6MoqLW4.cjs`),o=e.__toESM(require(`@customafk/react-toolkit/utils`)),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`lucide-react`)),l=()=>(0,s.jsxs)(r.DialogHeader,{className:`sr-only`,children:[(0,s.jsx)(r.DialogTitle,{className:`sr-only`}),(0,s.jsx)(r.DialogDescription,{className:`sr-only`})]}),u=({children:e})=>(0,s.jsx)(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:(0,s.jsx)(t.Flex,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),d=({title:e,createdAt:r})=>(0,s.jsxs)(`header`,{className:`bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2`,children:[(0,s.jsx)(a.DetailDialogSidebarTrigger,{}),(0,s.jsxs)(t.Flex,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[(0,s.jsx)(i.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),(0,s.jsxs)(t.Flex,{padding:`none`,className:`text-text-positive-weak relative`,children:[(0,s.jsx)(c.CalendarIcon,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&(0,s.jsx)(n.DateDisplay,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),f=({children:e})=>(0,s.jsx)(r.DialogContent,{className:(0,o.cn)(`relative h-full overflow-hidden border-none p-0`,`rounded-none md:rounded-lg`,`max-h-svh max-w-svw`,`md:max-h-[90svh] md:max-w-[90svw]`,`xl:max-h-[90svh] xl:max-w-[90svw]`,`2xl:max-h-[90svh] 2xl:max-w-7xl`),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:e}),p=({title:e,sidebarFooter:t,children:n})=>(0,s.jsxs)(a.Sidebar,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[(0,s.jsx)(a.DetailDialogSidebarHeader,{children:(0,s.jsx)(a.DetailDialogSidebarMenu,{children:(0,s.jsx)(a.DetailDialogSidebarMenuItem,{children:(0,s.jsxs)(a.DetailDialogSidebarMenuButton,{size:`lg`,tabIndex:-1,children:[(0,s.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,s.jsx)(c.CatIcon,{size:16})}),(0,s.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,s.jsx)(`span`,{className:`truncate font-medium`,children:e||`Detail Dialog`}),(0,s.jsx)(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),(0,s.jsx)(a.DetailDialogSidebarContent,{children:(0,s.jsx)(a.DetailDialogSidebarGroup,{children:n})}),t&&(0,s.jsx)(a.DetailDialogSidebarFooter,{children:t})]}),m=({open:e,isLoading:n=!1,sidebarTitle:i,sidebar:o,sidebarFooter:c,title:m,createdAt:h,onOpenChange:g,children:_})=>(0,s.jsx)(r.Dialog,{open:e,onOpenChange:g,children:(0,s.jsxs)(f,{children:[(0,s.jsx)(l,{}),(0,s.jsxs)(a.SidebarProvider,{className:`h-full min-h-[85svh] items-start`,children:[(0,s.jsx)(p,{title:i,sidebarFooter:c,children:o}),(0,s.jsxs)(u,{children:[(0,s.jsx)(d,{title:m,createdAt:h}),n?(0,s.jsx)(t.Flex,{justify:`center`,className:`bg-muted-muted w-full flex-1 inset-shadow-sm`,children:(0,s.jsx)(`div`,{className:`loader`})}):(0,s.jsx)(`section`,{className:`bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm`,children:_})]})]})]})});exports.DetailDialog=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- import"../../card-jtQVsG4Y.js";import{Flex as e}from"../../flex-uJ4bFSYt.js";import{DateDisplay as t}from"../../date-D7i-nFOS.js";import"../../tooltip-Ba2AdN_7.js";import"../../button-DL_i4AVi.js";import{Dialog as n,DialogContent as r,DialogDescription as i,DialogHeader as a,DialogTitle as o}from"../../dialog-BEJ3krbY.js";import"../../input-OWyLq45f.js";import{Title as s}from"../../title-CYln9_WT.js";import"../../separator-Bp3QE0oo.js";import"../../sheet-B2CNJMzu.js";import"../../skeleton-BSWmwJUf.js";import{DetailDialogSidebarContent as c,DetailDialogSidebarFooter as l,DetailDialogSidebarGroup as u,DetailDialogSidebarHeader as d,DetailDialogSidebarMenu as f,DetailDialogSidebarMenuButton as p,DetailDialogSidebarMenuItem as m,DetailDialogSidebarTrigger as h,Sidebar as g,SidebarProvider as _}from"../../sidebar-CoAMlkou.js";import{cn as v}from"@customafk/react-toolkit/utils";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{CalendarIcon as x,CatIcon as S}from"lucide-react";const C=()=>b(a,{className:`sr-only`,children:[y(o,{className:`sr-only`}),y(i,{className:`sr-only`})]}),w=({children:t})=>y(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:y(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:t})}),T=({title:n,createdAt:r})=>b(`header`,{className:`bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2`,children:[y(h,{}),b(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[y(s,{level:5,className:`line-clamp-1 truncate text-wrap`,children:n||`Detail Dialog`}),b(e,{padding:`none`,className:`text-text-positive-weak relative`,children:[y(x,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&y(t,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),E=({children:e})=>y(r,{className:v(`relative h-full overflow-hidden border-none p-0`,`rounded-none md:rounded-lg`,`max-h-svh max-w-svw`,`md:max-h-[90svh] md:max-w-[90svw]`,`xl:max-h-[90svh] xl:max-w-[90svw]`,`2xl:max-h-[90svh] 2xl:max-w-7xl`),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:e}),D=({title:e,sidebarFooter:t,children:n})=>b(g,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[y(d,{children:y(f,{children:y(m,{children:b(p,{size:`lg`,tabIndex:-1,children:[y(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:y(S,{size:16})}),b(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[y(`span`,{className:`truncate font-medium`,children:e||`Detail Dialog`}),y(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),y(c,{children:y(u,{children:n})}),t&&y(l,{children:t})]}),O=({open:t,isLoading:r=!1,sidebarTitle:i,sidebar:a,sidebarFooter:o,title:s,createdAt:c,onOpenChange:l,children:u})=>y(n,{open:t,onOpenChange:l,children:b(E,{children:[y(C,{}),b(_,{className:`h-full min-h-[85svh] items-start`,children:[y(D,{title:i,sidebarFooter:o,children:a}),b(w,{children:[y(T,{title:s,createdAt:c}),r?y(e,{justify:`center`,className:`bg-muted-muted w-full flex-1 inset-shadow-sm`,children:y(`div`,{className:`loader`})}):y(`section`,{className:`bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm`,children:u})]})]})]})});export{O as DetailDialog};
1
+ import"../../card-jtQVsG4Y.js";import{Flex as e}from"../../flex-uJ4bFSYt.js";import{DateDisplay as t}from"../../date-D7i-nFOS.js";import"../../tooltip-Ba2AdN_7.js";import"../../button-DL_i4AVi.js";import{Dialog as n,DialogContent as r,DialogDescription as i,DialogHeader as a,DialogTitle as o}from"../../dialog-BEJ3krbY.js";import"../../input-OWyLq45f.js";import{Title as s}from"../../title-itXqz0us.js";import"../../separator-Bp3QE0oo.js";import"../../sheet-B2CNJMzu.js";import"../../skeleton-BSWmwJUf.js";import{DetailDialogSidebarContent as c,DetailDialogSidebarFooter as l,DetailDialogSidebarGroup as u,DetailDialogSidebarHeader as d,DetailDialogSidebarMenu as f,DetailDialogSidebarMenuButton as p,DetailDialogSidebarMenuItem as m,DetailDialogSidebarTrigger as h,Sidebar as g,SidebarProvider as _}from"../../sidebar-CoAMlkou.js";import{cn as v}from"@customafk/react-toolkit/utils";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{CalendarIcon as x,CatIcon as S}from"lucide-react";const C=()=>b(a,{className:`sr-only`,children:[y(o,{className:`sr-only`}),y(i,{className:`sr-only`})]}),w=({children:t})=>y(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:y(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:t})}),T=({title:n,createdAt:r})=>b(`header`,{className:`bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2`,children:[y(h,{}),b(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[y(s,{level:5,className:`line-clamp-1 truncate text-wrap`,children:n||`Detail Dialog`}),b(e,{padding:`none`,className:`text-text-positive-weak relative`,children:[y(x,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&y(t,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),E=({children:e})=>y(r,{className:v(`relative h-full overflow-hidden border-none p-0`,`rounded-none md:rounded-lg`,`max-h-svh max-w-svw`,`md:max-h-[90svh] md:max-w-[90svw]`,`xl:max-h-[90svh] xl:max-w-[90svw]`,`2xl:max-h-[90svh] 2xl:max-w-7xl`),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:e}),D=({title:e,sidebarFooter:t,children:n})=>b(g,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[y(d,{children:y(f,{children:y(m,{children:b(p,{size:`lg`,tabIndex:-1,children:[y(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:y(S,{size:16})}),b(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[y(`span`,{className:`truncate font-medium`,children:e||`Detail Dialog`}),y(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),y(c,{children:y(u,{children:n})}),t&&y(l,{children:t})]}),O=({open:t,isLoading:r=!1,sidebarTitle:i,sidebar:a,sidebarFooter:o,title:s,createdAt:c,onOpenChange:l,children:u})=>y(n,{open:t,onOpenChange:l,children:b(E,{children:[y(C,{}),b(_,{className:`h-full min-h-[85svh] items-start`,children:[y(D,{title:i,sidebarFooter:o,children:a}),b(w,{children:[y(T,{title:s,createdAt:c}),r?y(e,{justify:`center`,className:`bg-muted-muted w-full flex-1 inset-shadow-sm`,children:y(`div`,{className:`loader`})}):y(`section`,{className:`bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm`,children:u})]})]})]})});export{O as DetailDialog};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../button-ChpGfVjG.cjs`);require(`../alert-dialog-Bc-61QzL.cjs`),require(`../error-dialog-DvTlwpSn.cjs`),require(`../label-3eYQRRYp.cjs`),require(`../form-CXu8t0VS.cjs`);const n=require(`../form-wrapper-CZKtb1j5.cjs`),r=require(`../dialog-E5OYibMU.cjs`),i=e.__toESM(require(`react`)),a=e.__toESM(require(`@customafk/react-toolkit/utils`)),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`@customafk/react-toolkit/hooks/useMediaQuery`)),c=e.__toESM(require(`vaul`));function l({...e}){return(0,o.jsx)(c.Drawer.Root,{"data-slot":`drawer`,...e})}function u({...e}){return(0,o.jsx)(c.Drawer.Portal,{"data-slot":`drawer-portal`,...e})}function d({className:e,...t}){return(0,o.jsx)(c.Drawer.Overlay,{"data-slot":`drawer-overlay`,className:(0,a.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,e),...t})}function f({className:e,children:t,...n}){return(0,o.jsxs)(u,{"data-slot":`drawer-portal`,children:[(0,o.jsx)(d,{}),(0,o.jsxs)(c.Drawer.Content,{"data-slot":`drawer-content`,className:(0,a.cn)(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...n,children:[(0,o.jsx)(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),t]})]})}function p({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`drawer-header`,className:(0,a.cn)(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,e),...t})}function m({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`drawer-footer`,className:(0,a.cn)(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function h({className:e,...t}){return(0,o.jsx)(c.Drawer.Title,{"data-slot":`drawer-title`,className:(0,a.cn)(`text-text-positive font-semibold`,e),...t})}function g({className:e,...t}){return(0,o.jsx)(c.Drawer.Description,{"data-slot":`drawer-description`,className:(0,a.cn)(`text-text-positive-weak text-sm`,e),...t})}const _=({form:e,open:i,isSubmitting:c=!1,isResetAfterSubmit:u=!0,disableSubmit:d=!1,title:_,description:v,className:y,onOpenChange:b,onSubmit:x,onError:S,onReset:C,children:w})=>{let T=(0,s.useMediaQuery)(`(min-width: 768px)`);return T?(0,o.jsx)(r.Dialog,{open:i,onOpenChange:b,children:(0,o.jsxs)(r.DialogContent,{className:(0,a.cn)(`flex flex-col gap-0 border-none p-0`,y),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,o.jsxs)(r.DialogHeader,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[(0,o.jsx)(r.DialogTitle,{children:_||`Form Dialog`}),(0,o.jsx)(r.DialogDescription,{children:v||`This is a form dialog where you can add your form elements.`})]}),(0,o.jsxs)(n.FormWrapper,{form:e,isResetAfterSubmit:u,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:x,onError:S,children:[(0,o.jsx)(`div`,{className:`bg-muted-muted size-full p-2 inset-shadow-sm`,children:(0,o.jsx)(`main`,{className:`bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4`,children:w})}),(0,o.jsxs)(r.DialogFooter,{className:`border-border-weak border-t p-6 pt-4`,children:[(0,o.jsx)(t.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-30 rounded-full`,onClick:C,children:`Reset`}),(0,o.jsx)(t.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:c,disabled:d,className:`w-30 rounded-full`,children:`Submit`})]})]})]})}):(0,o.jsx)(l,{open:i,onOpenChange:b,children:(0,o.jsxs)(f,{children:[(0,o.jsxs)(p,{className:`text-left`,children:[(0,o.jsx)(h,{children:_||`Form Dialog`}),(0,o.jsx)(g,{children:v||`This is a form dialog where you can add your form elements.`})]}),(0,o.jsxs)(n.FormWrapper,{form:e,isResetAfterSubmit:u,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:x,onError:S,children:[(0,o.jsx)(`main`,{className:`size-full flex-1 overflow-y-auto`,children:w}),(0,o.jsxs)(m,{className:`pt-2`,children:[(0,o.jsx)(t.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:c,disabled:d,className:`w-full rounded-full`,children:`Submit`}),(0,o.jsx)(t.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full`,onClick:C,children:`Reset`})]})]})]})})};exports.FormDialog=_;
1
+ const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../button-ChpGfVjG.cjs`);require(`../alert-dialog-Bc-61QzL.cjs`),require(`../error-dialog-DvTlwpSn.cjs`),require(`../label-3eYQRRYp.cjs`),require(`../form-CXu8t0VS.cjs`);const n=require(`../form-wrapper-CZKtb1j5.cjs`),r=require(`../dialog-E5OYibMU.cjs`),i=e.__toESM(require(`react`)),a=e.__toESM(require(`@customafk/react-toolkit/utils`)),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`@customafk/react-toolkit/hooks/useMediaQuery`)),c=e.__toESM(require(`vaul`));function l({...e}){return(0,o.jsx)(c.Drawer.Root,{"data-slot":`drawer`,...e})}function u({...e}){return(0,o.jsx)(c.Drawer.Portal,{"data-slot":`drawer-portal`,...e})}function d({className:e,...t}){return(0,o.jsx)(c.Drawer.Overlay,{"data-slot":`drawer-overlay`,className:(0,a.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,e),...t})}function f({className:e,children:t,...n}){return(0,o.jsxs)(u,{"data-slot":`drawer-portal`,children:[(0,o.jsx)(d,{}),(0,o.jsxs)(c.Drawer.Content,{"data-slot":`drawer-content`,className:(0,a.cn)(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...n,children:[(0,o.jsx)(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),t]})]})}function p({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`drawer-header`,className:(0,a.cn)(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,e),...t})}function m({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`drawer-footer`,className:(0,a.cn)(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function h({className:e,...t}){return(0,o.jsx)(c.Drawer.Title,{"data-slot":`drawer-title`,className:(0,a.cn)(`text-text-positive font-semibold`,e),...t})}function g({className:e,...t}){return(0,o.jsx)(c.Drawer.Description,{"data-slot":`drawer-description`,className:(0,a.cn)(`text-text-positive-weak text-sm`,e),...t})}const _=({form:e,open:i,isSubmitting:c=!1,isResetAfterSubmit:u=!0,disableSubmit:d=!1,title:_,description:v,className:y,onOpenChange:b,onSubmit:x,onError:S,onReset:C,children:w})=>{let T=(0,s.useMediaQuery)(`(min-width: 768px)`);return T?(0,o.jsx)(r.Dialog,{open:i,onOpenChange:b,children:(0,o.jsxs)(r.DialogContent,{className:(0,a.cn)(`flex flex-col gap-0 border-none p-0`,y),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,o.jsxs)(r.DialogHeader,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[(0,o.jsx)(r.DialogTitle,{children:_||`Form Dialog`}),(0,o.jsx)(r.DialogDescription,{children:v||`This is a form dialog where you can add your form elements.`})]}),(0,o.jsxs)(n.FormWrapper,{form:e,isResetAfterSubmit:u,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:x,onError:S,children:[(0,o.jsx)(`div`,{className:`bg-muted-muted size-full p-2 inset-shadow-sm`,children:(0,o.jsx)(`main`,{className:`bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4`,children:w})}),(0,o.jsxs)(r.DialogFooter,{className:`border-border-weak border-t p-6 pt-4`,children:[(0,o.jsx)(t.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-30 rounded-full`,onClick:C,children:`Reset`}),(0,o.jsx)(t.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:c,disabled:d,className:`w-30 rounded-full`,children:`Submit`})]})]})]})}):(0,o.jsx)(l,{open:i,onOpenChange:b,children:(0,o.jsxs)(f,{children:[(0,o.jsxs)(p,{className:`text-left`,children:[(0,o.jsx)(h,{children:_||`Form Dialog`}),(0,o.jsx)(g,{children:v||`This is a form dialog where you can add your form elements.`})]}),(0,o.jsxs)(n.FormWrapper,{form:e,isResetAfterSubmit:u,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:x,onError:S,children:[(0,o.jsx)(`main`,{className:`size-full flex-1 overflow-y-auto p-2`,children:w}),(0,o.jsxs)(m,{className:`pt-2`,children:[(0,o.jsx)(t.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:c,disabled:d,className:`w-full rounded-full`,children:`Submit`}),(0,o.jsx)(t.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full`,onClick:C,children:`Reset`})]})]})]})})};exports.FormDialog=_;
2
2
  //# sourceMappingURL=form-dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog.cjs","names":["DrawerPrimitive","FormWrapper","Button","Dialog","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter"],"sources":["../../packages/components/ui/drawer.tsx","../../packages/components/dialogs/form-dialog.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription }\n","import type { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from 'react-hook-form'\n\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { useMediaQuery } from '@customafk/react-toolkit/hooks/useMediaQuery'\n\nimport { FormWrapper } from '@/components/forms/form-wrapper'\nimport { Button } from '@/components/ui/button'\nimport { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@/components/ui/drawer'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n\n open: boolean\n isSubmitting?: boolean\n isResetAfterSubmit?: boolean\n disableSubmit?: boolean\n title?: string\n description?: string\n className?: string\n\n onOpenChange: (open: boolean) => void\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onReset?: () => void\n}\nexport const FormDialog = <TFieldValues extends FieldValues = FieldValues>({\n form,\n open,\n isSubmitting = false,\n isResetAfterSubmit = true,\n disableSubmit = false,\n title,\n description,\n className,\n\n onOpenChange,\n onSubmit,\n onError,\n onReset,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const isDesktop = useMediaQuery('(min-width: 768px)')\n\n if (!isDesktop) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader className=\"text-left\">\n <DrawerTitle>{title || 'Form Dialog'}</DrawerTitle>\n <DrawerDescription>{description || 'This is a form dialog where you can add your form elements.'}</DrawerDescription>\n </DrawerHeader>\n <FormWrapper\n form={form}\n isResetAfterSubmit={isResetAfterSubmit}\n className=\"flex flex-1 flex-col overflow-y-auto\"\n onSubmit={onSubmit}\n onError={onError}\n >\n <main className=\"size-full flex-1 overflow-y-auto\">{children}</main>\n <DrawerFooter className=\"pt-2\">\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-full rounded-full\">\n Submit\n </Button>\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-full rounded-full\" onClick={onReset}>\n Reset\n </Button>\n </DrawerFooter>\n </FormWrapper>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className={cn('flex flex-col gap-0 border-none p-0', className)}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <DialogHeader className=\"border-border-weak flex-0 gap-2 border-b p-6 pb-4\">\n <DialogTitle>{title || 'Form Dialog'}</DialogTitle>\n <DialogDescription>{description || 'This is a form dialog where you can add your form elements.'}</DialogDescription>\n </DialogHeader>\n <FormWrapper form={form} isResetAfterSubmit={isResetAfterSubmit} className=\"flex flex-1 flex-col overflow-y-auto\" onSubmit={onSubmit} onError={onError}>\n <div className=\"bg-muted-muted size-full p-2 inset-shadow-sm\">\n <main className=\"bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4\">{children}</main>\n </div>\n <DialogFooter className=\"border-border-weak border-t p-6 pt-4\">\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-30 rounded-full\" onClick={onReset}>\n Reset\n </Button>\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-30 rounded-full\">\n Submit\n </Button>\n </DialogFooter>\n </FormWrapper>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":"mhBAMA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,IAOtD,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,IAO/D,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,WAAA,EAAA,EAAA,IACE,iCACA,+BACA,kCACA,8BACA,iCACA,GAEF,GAAI,IAKV,SAAS,EAAc,CAAE,YAAW,WAAU,GAAG,GAA+D,CAC9G,OACE,EAAA,EAAA,MAAC,EAAA,CAAa,YAAU,2BACtB,EAAA,EAAA,KAAC,EAAA,KACD,EAAA,EAAA,MAACA,EAAAA,OAAgB,QAAA,CACf,Y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AAS"}
1
+ {"version":3,"file":"form-dialog.cjs","names":["DrawerPrimitive","FormWrapper","Button","Dialog","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter"],"sources":["../../packages/components/ui/drawer.tsx","../../packages/components/dialogs/form-dialog.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription }\n","import type { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from 'react-hook-form'\n\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { useMediaQuery } from '@customafk/react-toolkit/hooks/useMediaQuery'\n\nimport { FormWrapper } from '@/components/forms/form-wrapper'\nimport { Button } from '@/components/ui/button'\nimport { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@/components/ui/drawer'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n\n open: boolean\n isSubmitting?: boolean\n isResetAfterSubmit?: boolean\n disableSubmit?: boolean\n title?: string\n description?: string\n className?: string\n\n onOpenChange: (open: boolean) => void\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onReset?: () => void\n}\nexport const FormDialog = <TFieldValues extends FieldValues = FieldValues>({\n form,\n open,\n isSubmitting = false,\n isResetAfterSubmit = true,\n disableSubmit = false,\n title,\n description,\n className,\n\n onOpenChange,\n onSubmit,\n onError,\n onReset,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const isDesktop = useMediaQuery('(min-width: 768px)')\n\n if (!isDesktop) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader className=\"text-left\">\n <DrawerTitle>{title || 'Form Dialog'}</DrawerTitle>\n <DrawerDescription>{description || 'This is a form dialog where you can add your form elements.'}</DrawerDescription>\n </DrawerHeader>\n <FormWrapper\n form={form}\n isResetAfterSubmit={isResetAfterSubmit}\n className=\"flex flex-1 flex-col overflow-y-auto\"\n onSubmit={onSubmit}\n onError={onError}\n >\n <main className=\"size-full flex-1 overflow-y-auto p-2\">{children}</main>\n <DrawerFooter className=\"pt-2\">\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-full rounded-full\">\n Submit\n </Button>\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-full rounded-full\" onClick={onReset}>\n Reset\n </Button>\n </DrawerFooter>\n </FormWrapper>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className={cn('flex flex-col gap-0 border-none p-0', className)}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <DialogHeader className=\"border-border-weak flex-0 gap-2 border-b p-6 pb-4\">\n <DialogTitle>{title || 'Form Dialog'}</DialogTitle>\n <DialogDescription>{description || 'This is a form dialog where you can add your form elements.'}</DialogDescription>\n </DialogHeader>\n <FormWrapper form={form} isResetAfterSubmit={isResetAfterSubmit} className=\"flex flex-1 flex-col overflow-y-auto\" onSubmit={onSubmit} onError={onError}>\n <div className=\"bg-muted-muted size-full p-2 inset-shadow-sm\">\n <main className=\"bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4\">{children}</main>\n </div>\n <DialogFooter className=\"border-border-weak border-t p-6 pt-4\">\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-30 rounded-full\" onClick={onReset}>\n Reset\n </Button>\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-30 rounded-full\">\n Submit\n </Button>\n </DialogFooter>\n </FormWrapper>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":"mhBAMA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EA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,UAAU,uBACtB,EAAA,EAAA,KAAC,EAAA,CAAA,SAAa,GAAS,iBACvB,EAAA,EAAA,KAAC,EAAA,CAAA,SAAmB,GAAe,oEAErC,EAAA,EAAA,MAACD,EAAAA,YAAAA,CACO,OACc,qBACpB,UAAU,uCACA,WACD,qBAET,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,uCAAwC,cACxD,EAAA,EAAA,MAAC,EAAA,CAAa,UAAU,kBACtB,EAAA,EAAA,KAACC,EAAAA,OAAAA,CAAO,UAAA,GAAU,SAAU,EAAG,KAAK,SAAS,UAAW,EAAc,SAAU,EAAe,UAAU,+BAAsB,YAG/H,EAAA,EAAA,KAACA,EAAAA,OAAAA,CAAO,SAAU,GAAI,KAAK,SAAS,QAAQ,UAAU,MAAM,QAAQ,UAAU,sBAAsB,QAAS,WAAS"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime48 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/dialogs/form-dialog.d.ts
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
30
30
  onError,
31
31
  onReset,
32
32
  children
33
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime9.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime48.JSX.Element;
34
34
  //#endregion
35
35
  export { FormDialog };
36
36
  //# sourceMappingURL=form-dialog.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/dialogs/form-dialog.d.ts
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
30
30
  onError,
31
31
  onReset,
32
32
  children
33
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime2.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime3.JSX.Element;
34
34
  //#endregion
35
35
  export { FormDialog };
36
36
  //# sourceMappingURL=form-dialog.d.ts.map
@@ -1,2 +1,2 @@
1
- import{Button as e}from"../button-DL_i4AVi.js";import"../alert-dialog-kpuqvmVo.js";import"../error-dialog-e9mFaOuG.js";import"../label-BQ52Pjw-.js";import"../form-BzvxUv0a.js";import{FormWrapper as t}from"../form-wrapper-Cks4xmCV.js";import{Dialog as n,DialogContent as r,DialogDescription as i,DialogFooter as a,DialogHeader as o,DialogTitle as s}from"../dialog-BEJ3krbY.js";import c from"react";import{cn as l}from"@customafk/react-toolkit/utils";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useMediaQuery as f}from"@customafk/react-toolkit/hooks/useMediaQuery";import{Drawer as p}from"vaul";function m({...e}){return u(p.Root,{"data-slot":`drawer`,...e})}function h({...e}){return u(p.Portal,{"data-slot":`drawer-portal`,...e})}function g({className:e,...t}){return u(p.Overlay,{"data-slot":`drawer-overlay`,className:l(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,e),...t})}function _({className:e,children:t,...n}){return d(h,{"data-slot":`drawer-portal`,children:[u(g,{}),d(p.Content,{"data-slot":`drawer-content`,className:l(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...n,children:[u(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),t]})]})}function v({className:e,...t}){return u(`div`,{"data-slot":`drawer-header`,className:l(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,e),...t})}function y({className:e,...t}){return u(`div`,{"data-slot":`drawer-footer`,className:l(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function b({className:e,...t}){return u(p.Title,{"data-slot":`drawer-title`,className:l(`text-text-positive font-semibold`,e),...t})}function x({className:e,...t}){return u(p.Description,{"data-slot":`drawer-description`,className:l(`text-text-positive-weak text-sm`,e),...t})}const S=({form:c,open:p,isSubmitting:h=!1,isResetAfterSubmit:g=!0,disableSubmit:S=!1,title:C,description:w,className:T,onOpenChange:E,onSubmit:D,onError:O,onReset:k,children:A})=>{let j=f(`(min-width: 768px)`);return j?u(n,{open:p,onOpenChange:E,children:d(r,{className:l(`flex flex-col gap-0 border-none p-0`,T),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[d(o,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[u(s,{children:C||`Form Dialog`}),u(i,{children:w||`This is a form dialog where you can add your form elements.`})]}),d(t,{form:c,isResetAfterSubmit:g,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:D,onError:O,children:[u(`div`,{className:`bg-muted-muted size-full p-2 inset-shadow-sm`,children:u(`main`,{className:`bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4`,children:A})}),d(a,{className:`border-border-weak border-t p-6 pt-4`,children:[u(e,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-30 rounded-full`,onClick:k,children:`Reset`}),u(e,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:h,disabled:S,className:`w-30 rounded-full`,children:`Submit`})]})]})]})}):u(m,{open:p,onOpenChange:E,children:d(_,{children:[d(v,{className:`text-left`,children:[u(b,{children:C||`Form Dialog`}),u(x,{children:w||`This is a form dialog where you can add your form elements.`})]}),d(t,{form:c,isResetAfterSubmit:g,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:D,onError:O,children:[u(`main`,{className:`size-full flex-1 overflow-y-auto`,children:A}),d(y,{className:`pt-2`,children:[u(e,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:h,disabled:S,className:`w-full rounded-full`,children:`Submit`}),u(e,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full`,onClick:k,children:`Reset`})]})]})]})})};export{S as FormDialog};
1
+ import{Button as e}from"../button-DL_i4AVi.js";import"../alert-dialog-kpuqvmVo.js";import"../error-dialog-e9mFaOuG.js";import"../label-BQ52Pjw-.js";import"../form-BzvxUv0a.js";import{FormWrapper as t}from"../form-wrapper-Cks4xmCV.js";import{Dialog as n,DialogContent as r,DialogDescription as i,DialogFooter as a,DialogHeader as o,DialogTitle as s}from"../dialog-BEJ3krbY.js";import c from"react";import{cn as l}from"@customafk/react-toolkit/utils";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useMediaQuery as f}from"@customafk/react-toolkit/hooks/useMediaQuery";import{Drawer as p}from"vaul";function m({...e}){return u(p.Root,{"data-slot":`drawer`,...e})}function h({...e}){return u(p.Portal,{"data-slot":`drawer-portal`,...e})}function g({className:e,...t}){return u(p.Overlay,{"data-slot":`drawer-overlay`,className:l(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,e),...t})}function _({className:e,children:t,...n}){return d(h,{"data-slot":`drawer-portal`,children:[u(g,{}),d(p.Content,{"data-slot":`drawer-content`,className:l(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...n,children:[u(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),t]})]})}function v({className:e,...t}){return u(`div`,{"data-slot":`drawer-header`,className:l(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,e),...t})}function y({className:e,...t}){return u(`div`,{"data-slot":`drawer-footer`,className:l(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function b({className:e,...t}){return u(p.Title,{"data-slot":`drawer-title`,className:l(`text-text-positive font-semibold`,e),...t})}function x({className:e,...t}){return u(p.Description,{"data-slot":`drawer-description`,className:l(`text-text-positive-weak text-sm`,e),...t})}const S=({form:c,open:p,isSubmitting:h=!1,isResetAfterSubmit:g=!0,disableSubmit:S=!1,title:C,description:w,className:T,onOpenChange:E,onSubmit:D,onError:O,onReset:k,children:A})=>{let j=f(`(min-width: 768px)`);return j?u(n,{open:p,onOpenChange:E,children:d(r,{className:l(`flex flex-col gap-0 border-none p-0`,T),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[d(o,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[u(s,{children:C||`Form Dialog`}),u(i,{children:w||`This is a form dialog where you can add your form elements.`})]}),d(t,{form:c,isResetAfterSubmit:g,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:D,onError:O,children:[u(`div`,{className:`bg-muted-muted size-full p-2 inset-shadow-sm`,children:u(`main`,{className:`bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4`,children:A})}),d(a,{className:`border-border-weak border-t p-6 pt-4`,children:[u(e,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-30 rounded-full`,onClick:k,children:`Reset`}),u(e,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:h,disabled:S,className:`w-30 rounded-full`,children:`Submit`})]})]})]})}):u(m,{open:p,onOpenChange:E,children:d(_,{children:[d(v,{className:`text-left`,children:[u(b,{children:C||`Form Dialog`}),u(x,{children:w||`This is a form dialog where you can add your form elements.`})]}),d(t,{form:c,isResetAfterSubmit:g,className:`flex flex-1 flex-col overflow-y-auto`,onSubmit:D,onError:O,children:[u(`main`,{className:`size-full flex-1 overflow-y-auto p-2`,children:A}),d(y,{className:`pt-2`,children:[u(e,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:h,disabled:S,className:`w-full rounded-full`,children:`Submit`}),u(e,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full`,onClick:k,children:`Reset`})]})]})]})})};export{S as FormDialog};
2
2
  //# sourceMappingURL=form-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog.js","names":["Drawer","DrawerPrimitive","Drawer"],"sources":["../../packages/components/ui/drawer.tsx","../../packages/components/dialogs/form-dialog.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription }\n","import type { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from 'react-hook-form'\n\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { useMediaQuery } from '@customafk/react-toolkit/hooks/useMediaQuery'\n\nimport { FormWrapper } from '@/components/forms/form-wrapper'\nimport { Button } from '@/components/ui/button'\nimport { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@/components/ui/drawer'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n\n open: boolean\n isSubmitting?: boolean\n isResetAfterSubmit?: boolean\n disableSubmit?: boolean\n title?: string\n description?: string\n className?: string\n\n onOpenChange: (open: boolean) => void\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onReset?: () => void\n}\nexport const FormDialog = <TFieldValues extends FieldValues = FieldValues>({\n form,\n open,\n isSubmitting = false,\n isResetAfterSubmit = true,\n disableSubmit = false,\n title,\n description,\n className,\n\n onOpenChange,\n onSubmit,\n onError,\n onReset,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const isDesktop = useMediaQuery('(min-width: 768px)')\n\n if (!isDesktop) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader className=\"text-left\">\n <DrawerTitle>{title || 'Form Dialog'}</DrawerTitle>\n <DrawerDescription>{description || 'This is a form dialog where you can add your form elements.'}</DrawerDescription>\n </DrawerHeader>\n <FormWrapper\n form={form}\n isResetAfterSubmit={isResetAfterSubmit}\n className=\"flex flex-1 flex-col overflow-y-auto\"\n onSubmit={onSubmit}\n onError={onError}\n >\n <main className=\"size-full flex-1 overflow-y-auto\">{children}</main>\n <DrawerFooter className=\"pt-2\">\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-full rounded-full\">\n Submit\n </Button>\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-full rounded-full\" onClick={onReset}>\n Reset\n </Button>\n </DrawerFooter>\n </FormWrapper>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className={cn('flex flex-col gap-0 border-none p-0', className)}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <DialogHeader className=\"border-border-weak flex-0 gap-2 border-b p-6 pb-4\">\n <DialogTitle>{title || 'Form Dialog'}</DialogTitle>\n <DialogDescription>{description || 'This is a form dialog where you can add your form elements.'}</DialogDescription>\n </DialogHeader>\n <FormWrapper form={form} isResetAfterSubmit={isResetAfterSubmit} className=\"flex flex-1 flex-col overflow-y-auto\" onSubmit={onSubmit} onError={onError}>\n <div className=\"bg-muted-muted size-full p-2 inset-shadow-sm\">\n <main className=\"bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4\">{children}</main>\n </div>\n <DialogFooter className=\"border-border-weak border-t p-6 pt-4\">\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-30 rounded-full\" onClick={onReset}>\n Reset\n </Button>\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-30 rounded-full\">\n Submit\n </Button>\n </DialogFooter>\n </FormWrapper>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":"8lBAMA,SAASE,EAAO,CAAE,GAAG,GAA4D,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tsx","../../packages/components/dialogs/form-dialog.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription }\n","import type { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from 'react-hook-form'\n\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { useMediaQuery } from '@customafk/react-toolkit/hooks/useMediaQuery'\n\nimport { FormWrapper } from '@/components/forms/form-wrapper'\nimport { Button } from '@/components/ui/button'\nimport { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@/components/ui/drawer'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n\n open: boolean\n isSubmitting?: boolean\n isResetAfterSubmit?: boolean\n disableSubmit?: boolean\n title?: string\n description?: string\n className?: string\n\n onOpenChange: (open: boolean) => void\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onReset?: () => void\n}\nexport const FormDialog = <TFieldValues extends FieldValues = FieldValues>({\n form,\n open,\n isSubmitting = false,\n isResetAfterSubmit = true,\n disableSubmit = false,\n title,\n description,\n className,\n\n onOpenChange,\n onSubmit,\n onError,\n onReset,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const isDesktop = useMediaQuery('(min-width: 768px)')\n\n if (!isDesktop) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader className=\"text-left\">\n <DrawerTitle>{title || 'Form Dialog'}</DrawerTitle>\n <DrawerDescription>{description || 'This is a form dialog where you can add your form elements.'}</DrawerDescription>\n </DrawerHeader>\n <FormWrapper\n form={form}\n isResetAfterSubmit={isResetAfterSubmit}\n className=\"flex flex-1 flex-col overflow-y-auto\"\n onSubmit={onSubmit}\n onError={onError}\n >\n <main className=\"size-full flex-1 overflow-y-auto p-2\">{children}</main>\n <DrawerFooter className=\"pt-2\">\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-full rounded-full\">\n Submit\n </Button>\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-full rounded-full\" onClick={onReset}>\n Reset\n </Button>\n </DrawerFooter>\n </FormWrapper>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className={cn('flex flex-col gap-0 border-none p-0', className)}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <DialogHeader className=\"border-border-weak flex-0 gap-2 border-b p-6 pb-4\">\n <DialogTitle>{title || 'Form Dialog'}</DialogTitle>\n <DialogDescription>{description || 'This is a form dialog where you can add your form elements.'}</DialogDescription>\n </DialogHeader>\n <FormWrapper form={form} isResetAfterSubmit={isResetAfterSubmit} className=\"flex flex-1 flex-col overflow-y-auto\" onSubmit={onSubmit} onError={onError}>\n <div className=\"bg-muted-muted size-full p-2 inset-shadow-sm\">\n <main className=\"bg-card shadow-card size-full flex-1 overflow-y-auto rounded-md p-4\">{children}</main>\n </div>\n <DialogFooter className=\"border-border-weak border-t p-6 pt-4\">\n <Button tabIndex={-1} type=\"button\" variant=\"outline\" color=\"muted\" className=\"w-30 rounded-full\" onClick={onReset}>\n Reset\n </Button>\n <Button autoFocus tabIndex={0} type=\"submit\" isLoading={isSubmitting} disabled={disableSubmit} className=\"w-30 rounded-full\">\n Submit\n </Button>\n </DialogFooter>\n </FormWrapper>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":"8lBAMA,SAASE,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACD,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,IAOtD,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,IAO/D,SAAS,EA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BACF,EAAE,6BAGJ,EAAC,EAAA,CAAa,UAAU,8DACtB,EAAC,EAAA,CAAA,SAAa,GAAS,gBACvB,EAAC,EAAA,CAAA,SAAmB,GAAe,mEAErC,EAAC,EAAA,CAAkB,OAA0B,qBAAoB,UAAU,uCAAiD,WAAmB,oBAC7I,EAAC,MAAA,CAAI,UAAU,wDACb,EAAC,OAAA,CAAK,UAAU,sEAAuE,eAEzF,EAAC,EAAA,CAAa,UAAU,iDACtB,EAAC,EAAA,CAAO,SAAU,GAAI,KAAK,SAAS,QAAQ,UAAU,MAAM,QAAQ,UAAU,oBAAoB,QAAS,WAAS,UAGpH,EAAC,EAAA,CAAO,UAAA,GAAU,SAAU,EAAG,KAAK,SAAS,UAAW,EAAc,SAAU,EAAe,UAAU,6BAAoB,sBAjDnI,EAACC,EAAAA,CAAa,OAAoB,wBAChC,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAa,UAAU,sBACtB,EAAC,EAAA,CAAA,SAAa,GAAS,gBACvB,EAAC,EAAA,CAAA,SAAmB,GAAe,mEAErC,EAAC,EAAA,CACO,OACc,qBACpB,UAAU,uCACA,WACD,oBAET,EAAC,OAAA,CAAK,UAAU,uCAAwC,aACxD,EAAC,EAAA,CAAa,UAAU,iBACtB,EAAC,EAAA,CAAO,UAAA,GAAU,SAAU,EAAG,KAAK,SAAS,UAAW,EAAc,SAAU,EAAe,UAAU,+BAAsB,WAG/H,EAAC,EAAA,CAAO,SAAU,GAAI,KAAK,SAAS,QAAQ,UAAU,MAAM,QAAQ,UAAU,sBAAsB,QAAS,WAAS"}
@@ -1,2 +1,2 @@
1
1
  import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{DropdownMenu as r}from"radix-ui";import{CheckIcon as i,ChevronRightIcon as a,CircleIcon as o}from"lucide-react";function s({...e}){return t(r.Root,{"data-slot":`dropdown-menu`,...e})}function c({...e}){return t(r.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function l({...e}){return t(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function u({className:n,sideOffset:i=4,align:a=`start`,...o}){return t(r.Portal,{children:t(r.Content,{"data-slot":`dropdown-menu-content`,sideOffset:i,className:e(`bg-popover text-text-positive`,`z-50`,`min-w-32`,`overflow-x-hidden overflow-y-auto`,`shadow-dropdown rounded-md p-1.5`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n),...o,align:a})})}function d({...e}){return t(r.Group,{"data-slot":`dropdown-menu-group`,...e})}function f({className:n,inset:i,variant:a=`default`,...o}){return t(r.Item,{"data-slot":`dropdown-menu-item`,"data-inset":i,"data-variant":a,className:e(`relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-[inset]:pl-8`,`data-[disabled]:pointer-events-none`,`data-[disabled]:opacity-50`,`data-[variant=destructive]:text-danger`,`data-[variant=destructive]:focus:bg-danger-muted`,`data-[variant=destructive]:focus:text-danger-strong`,`data-[variant=destructive]:*:[svg]:!text-danger`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-muted`,n),...o})}function p({className:a,children:o,checked:s,...c}){return n(r.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-[disabled]:opacity-50`,`data-[disabled]:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,a),checked:s,...c,children:[t(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:t(r.ItemIndicator,{children:t(i,{size:16})})}),o]})}function m({...e}){return t(r.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function h({className:i,children:a,...s}){return n(r.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[disabled]:pointer-events-none`,`data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,i),...s,children:[t(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:t(r.ItemIndicator,{children:t(o,{className:`size-2 fill-current`})})}),a]})}function g({className:n,inset:i,...a}){return t(r.Label,{"data-slot":`dropdown-menu-label`,"data-inset":i,className:e(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,n),...a})}function _({className:n,...i}){return t(r.Separator,{"data-slot":`dropdown-menu-separator`,className:e(`bg-border-weak -mx-1 my-1 h-px`,n),...i})}function v({className:n,...r}){return t(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`text-text-positive-muted ml-auto text-xs tracking-widest`,n),...r})}function y({...e}){return t(r.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function b({className:i,inset:o,children:s,...c}){return n(r.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":o,className:e(`flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[state=open]:bg-muted-muted`,`data-[state=open]:text-text-positive-strong`,`data-[inset]:pl-8`,i),...c,children:[s,t(a,{className:`ml-auto size-4`})]})}function x({className:n,...i}){return t(r.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`bg-popover text-text-positive`,`shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:zoom-out-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n),...i})}export{s as DropdownMenu,p as DropdownMenuCheckboxItem,u as DropdownMenuContent,d as DropdownMenuGroup,f as DropdownMenuItem,g as DropdownMenuLabel,c as DropdownMenuPortal,m as DropdownMenuRadioGroup,h as DropdownMenuRadioItem,_ as DropdownMenuSeparator,v as DropdownMenuShortcut,y as DropdownMenuSub,x as DropdownMenuSubContent,b as DropdownMenuSubTrigger,l as DropdownMenuTrigger};
2
- //# sourceMappingURL=dropdown-menu-DSjfaonn.js.map
2
+ //# sourceMappingURL=dropdown-menu-BF9QbIfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu-DSjfaonn.js","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-x-hidden overflow-y-auto',\n 'shadow-dropdown rounded-md p-1.5',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[inset]:pl-8',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:!text-danger',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-muted\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('bg-border-weak -mx-1 my-1 h-px', className)} {...props} />\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('text-text-positive-muted ml-auto text-xs tracking-widest', className)} {...props} />\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n}\n"],"mappings":"6NAMA,SAASA,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAACC,EAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,IAGnE,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAsB,OAAA,CAAO,YAAU,uBAAuB,GAAI,IAG5E,SAAS,EAAoB,CAAE,GAAG,GAAqE,CACr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AAC,OAAA,CAAK,UAAU,yFACd,EAACA,EAAsB,cAAA,CAAA,SACrB,EAAC,EAAA,CAAW,UAAU,4BAGzB,KAKP,SAAS,EAAkB,CACzB,YACA,QACA,GAAG,GAGF,CACD,OACE,EAACA,EAAsB,MAAA,CACrB,YAAU,sBACV,aAAY,EACZ,UAAW,EAAG,oDAAqD,GACnE,GAAI,IAKV,SAAS,EAAsB,CAAE,YAAW,GAAG,GAAuE,CACpH,OAAO,EAACA,EAAsB,UAAA,CAAU,YAAU,0BAA0B,UAAW,EAAG,iCAAkC,GAAY,GAAI,IAG9I,SAAS,EAAqB,CAAE,YAAW,GAAG,GAAuC,CACnF,OAAO,EAAC,OAAA,CAAK,YAAU,yBAAyB,UAAW,EAAG,2DAA4D,GAAY,GAAI,IAG5I,SAAS,EAAgB,CAAE,GAAG,GAAiE,CAC7F,OAAO,EAACA,EAAsB,IAAA,CAAI,YAAU,oBAAoB,GAAI,IAGtE,SAAS,EAAuB,CAC9B,YACA,QACA,WACA,GAAG,GAGF,CACD,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,aAAY,EACZ,UAAW,EACT,6FACA,wBACA,kCACA,mCACA,8CACA,oBACA,GAEF,GAAI,YAEH,EACD,EAAC,EAAA,CAAiB,UAAU,sBAKlC,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,UAAW,EACT,gCACA,uHACA,+BACA,8BACA,+BACA,kCACA,kCACA,iCACA,yCACA,yCACA,yCACA,yCACA,GAEF,GAAI"}
1
+ {"version":3,"file":"dropdown-menu-BF9QbIfo.js","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-x-hidden overflow-y-auto',\n 'shadow-dropdown rounded-md p-1.5',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[inset]:pl-8',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:!text-danger',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-muted\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('bg-border-weak -mx-1 my-1 h-px', className)} {...props} />\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('text-text-positive-muted ml-auto text-xs tracking-widest', className)} {...props} />\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n}\n"],"mappings":"6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2 @@
1
1
  const e=require(`./chunk-CUT6urMc.cjs`),t=e.__toESM(require(`@customafk/react-toolkit/utils`)),n=e.__toESM(require(`react/jsx-runtime`)),r=e.__toESM(require(`radix-ui`)),i=e.__toESM(require(`lucide-react`));function a({...e}){return(0,n.jsx)(r.DropdownMenu.Root,{"data-slot":`dropdown-menu`,...e})}function o({...e}){return(0,n.jsx)(r.DropdownMenu.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function s({...e}){return(0,n.jsx)(r.DropdownMenu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function c({className:e,sideOffset:i=4,align:a=`start`,...o}){return(0,n.jsx)(r.DropdownMenu.Portal,{children:(0,n.jsx)(r.DropdownMenu.Content,{"data-slot":`dropdown-menu-content`,sideOffset:i,className:(0,t.cn)(`bg-popover text-text-positive`,`z-50`,`min-w-32`,`overflow-x-hidden overflow-y-auto`,`shadow-dropdown rounded-md p-1.5`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-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`,e),...o,align:a})})}function l({...e}){return(0,n.jsx)(r.DropdownMenu.Group,{"data-slot":`dropdown-menu-group`,...e})}function u({className:e,inset:i,variant:a=`default`,...o}){return(0,n.jsx)(r.DropdownMenu.Item,{"data-slot":`dropdown-menu-item`,"data-inset":i,"data-variant":a,className:(0,t.cn)(`relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-[inset]:pl-8`,`data-[disabled]:pointer-events-none`,`data-[disabled]:opacity-50`,`data-[variant=destructive]:text-danger`,`data-[variant=destructive]:focus:bg-danger-muted`,`data-[variant=destructive]:focus:text-danger-strong`,`data-[variant=destructive]:*:[svg]:!text-danger`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-muted`,e),...o})}function d({className:e,children:a,checked:o,...s}){return(0,n.jsxs)(r.DropdownMenu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:(0,t.cn)(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-[disabled]:opacity-50`,`data-[disabled]:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),checked:o,...s,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(r.DropdownMenu.ItemIndicator,{children:(0,n.jsx)(i.CheckIcon,{size:16})})}),a]})}function f({...e}){return(0,n.jsx)(r.DropdownMenu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function p({className:e,children:a,...o}){return(0,n.jsxs)(r.DropdownMenu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:(0,t.cn)(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[disabled]:pointer-events-none`,`data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),...o,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(r.DropdownMenu.ItemIndicator,{children:(0,n.jsx)(i.CircleIcon,{className:`size-2 fill-current`})})}),a]})}function m({className:e,inset:i,...a}){return(0,n.jsx)(r.DropdownMenu.Label,{"data-slot":`dropdown-menu-label`,"data-inset":i,className:(0,t.cn)(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...a})}function h({className:e,...i}){return(0,n.jsx)(r.DropdownMenu.Separator,{"data-slot":`dropdown-menu-separator`,className:(0,t.cn)(`bg-border-weak -mx-1 my-1 h-px`,e),...i})}function g({className:e,...r}){return(0,n.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:(0,t.cn)(`text-text-positive-muted ml-auto text-xs tracking-widest`,e),...r})}function _({...e}){return(0,n.jsx)(r.DropdownMenu.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function v({className:e,inset:a,children:o,...s}){return(0,n.jsxs)(r.DropdownMenu.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:(0,t.cn)(`flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[state=open]:bg-muted-muted`,`data-[state=open]:text-text-positive-strong`,`data-[inset]:pl-8`,e),...s,children:[o,(0,n.jsx)(i.ChevronRightIcon,{className:`ml-auto size-4`})]})}function y({className:e,...i}){return(0,n.jsx)(r.DropdownMenu.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:(0,t.cn)(`bg-popover text-text-positive`,`shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:zoom-out-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`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`,e),...i})}Object.defineProperty(exports,`DropdownMenu`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`DropdownMenuCheckboxItem`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`DropdownMenuContent`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`DropdownMenuGroup`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`DropdownMenuItem`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`DropdownMenuLabel`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`DropdownMenuPortal`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`DropdownMenuRadioGroup`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`DropdownMenuRadioItem`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`DropdownMenuSeparator`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`DropdownMenuShortcut`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`DropdownMenuSub`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`DropdownMenuSubContent`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`DropdownMenuSubTrigger`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`DropdownMenuTrigger`,{enumerable:!0,get:function(){return s}});
2
- //# sourceMappingURL=dropdown-menu-Dd9uB7ai.cjs.map
2
+ //# sourceMappingURL=dropdown-menu-CIldv8D7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu-Dd9uB7ai.cjs","names":["DropdownMenuPrimitive","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-x-hidden overflow-y-auto',\n 'shadow-dropdown rounded-md p-1.5',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[inset]:pl-8',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:!text-danger',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-muted\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('bg-border-weak -mx-1 my-1 h-px', className)} {...props} />\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('text-text-positive-muted ml-auto text-xs tracking-widest', className)} {...props} />\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n}\n"],"mappings":"+MAMA,SAAS,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,IAGnE,SAAS,EAAmB,CAAE,GAAG,GAA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BACV,aAAY,EACZ,WAAA,EAAA,EAAA,IACE,6FACA,wBACA,kCACA,mCACA,8CACA,oBACA,GAEF,GAAI,YAEH,GACD,EAAA,EAAA,KAACG,EAAAA,iBAAAA,CAAiB,UAAU,sBAKlC,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAAA,EAAA,KAACH,EAAAA,aAAsB,WAAA,CACrB,YAAU,4BACV,WAAA,EAAA,EAAA,IACE,gCACA,uHACA,+BACA,8BACA,+BACA,kCACA,kCACA,iCACA,yCACA,yCACA,yCACA,yCACA,GAEF,GAAI"}
1
+ {"version":3,"file":"dropdown-menu-CIldv8D7.cjs","names":["DropdownMenuPrimitive","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\n\nimport { cn } from '@customafk/react-toolkit/utils'\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-x-hidden overflow-y-auto',\n 'shadow-dropdown rounded-md p-1.5',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[inset]:pl-8',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:!text-danger',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-muted\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('bg-border-weak -mx-1 my-1 h-px', className)} {...props} />\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('text-text-positive-muted ml-auto text-xs tracking-widest', className)} {...props} />\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'shadow-dropdown z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n}\n"],"mappings":"+MAMA,SAAS,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,IAGnE,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,OAAA,CAAO,YAAU,uBAAuB,GAAI,IAG5E,SAAS,EAAoB,CAAE,GAAG,GAAqE,CACrG,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,QAAA,CAAQ,YAAU,wBAAwB,GAAI,IAG9E,SAAS,EAAoB,CAAE,YAAW,aAAa,EAAG,QAAQ,QAAS,GAAG,GAAqE,CACjJ,OACE,EAAA,EAAA,KAACA,EAAAA,aAAsB,OAAA,CAAA,UACrB,EAAA,EAAA,KAACA,EAAAA,aAAsB,QAAA,CACrB,YAAU,wBACE,aACZ,WAAA,EAAA,EAAA,IACE,gCACA,OACA,WACA,oCACA,m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runtime2 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/combobox-field.d.ts
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  description,
23
23
  options,
24
24
  onAddNewItem
25
- }: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime2.JSX.Element;
26
26
  //#endregion
27
27
  export { ComboboxField };
28
28
  //# sourceMappingURL=combobox-field.d.cts.map