@customafk/lunas-ui 0.0.45 → 0.0.46

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 (208) hide show
  1. package/dist/{alert-dialog-Dp-m0Xsj.cjs → alert-dialog-CJX47wcM.cjs} +1 -1
  2. package/dist/{alert-dialog-Dp-m0Xsj.cjs.map → alert-dialog-CJX47wcM.cjs.map} +1 -1
  3. package/dist/{alert-dialog-Cj5WqA7x.js → alert-dialog-_dDOoFxZ.js} +1 -1
  4. package/dist/{alert-dialog-Cj5WqA7x.js.map → alert-dialog-_dDOoFxZ.js.map} +1 -1
  5. package/dist/{button-CTgIEMGS.d.ts → button-Bw-QYTzS.d.ts} +3 -3
  6. package/dist/{button-B7EgZzPl.d.cts → button-D64Qg3GM.d.cts} +5 -5
  7. package/dist/{calendar-4R0xSc0m.js → calendar-Cr3n8mYW.js} +1 -1
  8. package/dist/{calendar-4R0xSc0m.js.map → calendar-Cr3n8mYW.js.map} +1 -1
  9. package/dist/{calendar-DB7j4ZPb.cjs → calendar-PLvqq6GF.cjs} +1 -1
  10. package/dist/{calendar-DB7j4ZPb.cjs.map → calendar-PLvqq6GF.cjs.map} +1 -1
  11. package/dist/{command-CtsfU8-n.d.cts → command-B-3PfUaK.d.cts} +12 -12
  12. package/dist/{command-BRV_7Zs4.d.ts → command-C0dqCCR4.d.ts} +12 -12
  13. package/dist/{command-DqzKYyH-.js → command-D7JezZyr.js} +2 -2
  14. package/dist/{command-DqzKYyH-.js.map → command-D7JezZyr.js.map} +1 -1
  15. package/dist/{command-DsSF4IZ7.cjs → command-j1hqtKVa.cjs} +2 -2
  16. package/dist/{command-DsSF4IZ7.cjs.map → command-j1hqtKVa.cjs.map} +1 -1
  17. package/dist/data-display/statistic.d.cts +2 -2
  18. package/dist/data-display/statistic.d.ts +2 -2
  19. package/dist/{dialog-YTzM43YA.js → dialog-BZ9YutoX.js} +1 -1
  20. package/dist/{dialog-YTzM43YA.js.map → dialog-BZ9YutoX.js.map} +1 -1
  21. package/dist/{dialog-C7RUCZNu.d.cts → dialog-DRWITPUY.d.ts} +12 -12
  22. package/dist/{dialog-76EA0O7Y.d.ts → dialog-O9IK0Rac.d.cts} +12 -12
  23. package/dist/{dialog-CguMVyyd.cjs → dialog-jE-xu7CZ.cjs} +1 -1
  24. package/dist/{dialog-CguMVyyd.cjs.map → dialog-jE-xu7CZ.cjs.map} +1 -1
  25. package/dist/dialogs/confirm-dialog.cjs +1 -1
  26. package/dist/dialogs/confirm-dialog.js +1 -1
  27. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +28 -28
  28. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +4 -4
  29. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  30. package/dist/dialogs/detail-dialog/index.js +1 -1
  31. package/dist/dialogs/error-dialog.cjs +1 -1
  32. package/dist/dialogs/error-dialog.js +1 -1
  33. package/dist/dialogs/form-dialog.cjs +1 -1
  34. package/dist/dialogs/form-dialog.d.cts +2 -2
  35. package/dist/dialogs/form-dialog.d.ts +2 -2
  36. package/dist/dialogs/form-dialog.js +1 -1
  37. package/dist/dialogs/loading-dialog.cjs +1 -1
  38. package/dist/dialogs/loading-dialog.js +1 -1
  39. package/dist/{error-dialog-D7FS_tBU.cjs → error-dialog-BRHA447Y.cjs} +2 -2
  40. package/dist/{error-dialog-D7FS_tBU.cjs.map → error-dialog-BRHA447Y.cjs.map} +1 -1
  41. package/dist/{error-dialog-CTPWuLNO.js → error-dialog-CSIFb0WO.js} +2 -2
  42. package/dist/{error-dialog-CTPWuLNO.js.map → error-dialog-CSIFb0WO.js.map} +1 -1
  43. package/dist/{form-wrapper-pnkjBZnM.js → form-wrapper-CvfYqjqa.js} +2 -2
  44. package/dist/{form-wrapper-pnkjBZnM.js.map → form-wrapper-CvfYqjqa.js.map} +1 -1
  45. package/dist/{form-wrapper-CVkfJN7q.cjs → form-wrapper-Dw_9b-2Z.cjs} +2 -2
  46. package/dist/{form-wrapper-CVkfJN7q.cjs.map → form-wrapper-Dw_9b-2Z.cjs.map} +1 -1
  47. package/dist/forms/combobox-field.cjs +1 -1
  48. package/dist/forms/combobox-field.d.cts +2 -2
  49. package/dist/forms/combobox-field.d.ts +2 -2
  50. package/dist/forms/combobox-field.js +1 -1
  51. package/dist/forms/date-field.cjs +1 -1
  52. package/dist/forms/date-field.d.cts +2 -2
  53. package/dist/forms/date-field.js +1 -1
  54. package/dist/forms/form-wrapper.cjs +1 -1
  55. package/dist/forms/form-wrapper.d.cts +2 -2
  56. package/dist/forms/form-wrapper.d.ts +2 -2
  57. package/dist/forms/form-wrapper.js +1 -1
  58. package/dist/forms/multi-select-field.cjs +1 -1
  59. package/dist/forms/multi-select-field.cjs.map +1 -1
  60. package/dist/forms/multi-select-field.d.cts +2 -2
  61. package/dist/forms/multi-select-field.d.ts +2 -2
  62. package/dist/forms/multi-select-field.js +1 -1
  63. package/dist/forms/number-field.d.cts +2 -2
  64. package/dist/forms/number-field.d.ts +2 -2
  65. package/dist/forms/password-field.d.cts +2 -2
  66. package/dist/forms/password-field.d.ts +2 -2
  67. package/dist/forms/select-field.d.cts +2 -2
  68. package/dist/forms/select-field.d.ts +2 -2
  69. package/dist/forms/switch-field.d.cts +2 -2
  70. package/dist/forms/switch-field.d.ts +2 -2
  71. package/dist/forms/text-field.d.ts +2 -2
  72. package/dist/forms/textarea-field.d.cts +2 -2
  73. package/dist/forms/textarea-field.d.ts +2 -2
  74. package/dist/{input-DfaMHsQo.d.ts → input-BP6Ebk4T.d.cts} +3 -3
  75. package/dist/{input-Cng3uFxw.d.cts → input-DNCeWMaR.d.ts} +3 -3
  76. package/dist/layouts/app-layout/index.d.cts +26 -26
  77. package/dist/layouts/app-layout/index.d.ts +3 -3
  78. package/dist/layouts/flex.d.cts +5 -5
  79. package/dist/layouts/flex.d.ts +1 -1
  80. package/dist/layouts/grid.cjs +1 -1
  81. package/dist/layouts/grid.cjs.map +1 -1
  82. package/dist/layouts/grid.js +1 -1
  83. package/dist/layouts/grid.js.map +1 -1
  84. package/dist/layouts/main/index.d.cts +4 -4
  85. package/dist/layouts/main/index.d.ts +4 -4
  86. package/dist/{multi-select-BKG1a_gU.cjs → multi-select-BAHCzBBU.cjs} +2 -2
  87. package/dist/{multi-select-BKG1a_gU.cjs.map → multi-select-BAHCzBBU.cjs.map} +1 -1
  88. package/dist/{multi-select-CnW03mrY.js → multi-select-DQwVOhBm.js} +2 -2
  89. package/dist/{multi-select-CnW03mrY.js.map → multi-select-DQwVOhBm.js.map} +1 -1
  90. package/dist/{popover-CTFp7ZXi.js → popover-CqAD7HNo.js} +1 -1
  91. package/dist/{popover-CTFp7ZXi.js.map → popover-CqAD7HNo.js.map} +1 -1
  92. package/dist/{popover-DCcPvdz2.cjs → popover-Dd0acCEk.cjs} +1 -1
  93. package/dist/{popover-DCcPvdz2.cjs.map → popover-Dd0acCEk.cjs.map} +1 -1
  94. package/dist/{separator-WBRIEOFh.d.ts → separator-BssDmBsX.d.ts} +3 -3
  95. package/dist/{separator-D36UkGvg.d.cts → separator-mZ8r56s2.d.cts} +3 -3
  96. package/dist/table/index.d.cts +2 -2
  97. package/dist/table/index.d.ts +2 -2
  98. package/dist/{toggle-D2aRhQ67.d.ts → toggle-BUBVhdVO.d.cts} +4 -4
  99. package/dist/{toggle-DfC247hI.d.cts → toggle-DH9IssyE.d.ts} +4 -4
  100. package/dist/{tooltip-ClcR7d6G.d.cts → tooltip-DE_eohyj.d.cts} +6 -6
  101. package/dist/{tooltip-WPrK6Am9.d.ts → tooltip-xF7cFAUR.d.ts} +6 -6
  102. package/dist/typography/paragraph.d.cts +2 -2
  103. package/dist/typography/paragraph.d.ts +2 -2
  104. package/dist/typography/title.d.cts +2 -2
  105. package/dist/typography/title.d.ts +2 -2
  106. package/dist/ui/alert-dialog.cjs +1 -1
  107. package/dist/ui/alert-dialog.d.cts +12 -12
  108. package/dist/ui/alert-dialog.d.ts +12 -12
  109. package/dist/ui/alert-dialog.js +1 -1
  110. package/dist/ui/alert.d.cts +6 -6
  111. package/dist/ui/alert.d.ts +4 -4
  112. package/dist/ui/aspect-ratio.d.cts +2 -2
  113. package/dist/ui/aspect-ratio.d.ts +2 -2
  114. package/dist/ui/avatar.d.cts +4 -4
  115. package/dist/ui/avatar.d.ts +4 -4
  116. package/dist/ui/badge.d.cts +5 -5
  117. package/dist/ui/badge.d.ts +3 -3
  118. package/dist/ui/breadcrumb.d.cts +8 -8
  119. package/dist/ui/breadcrumb.d.ts +8 -8
  120. package/dist/ui/button.d.cts +1 -1
  121. package/dist/ui/button.d.ts +1 -1
  122. package/dist/ui/calendar.cjs +1 -1
  123. package/dist/ui/calendar.d.cts +4 -4
  124. package/dist/ui/calendar.d.ts +4 -4
  125. package/dist/ui/calendar.js +1 -1
  126. package/dist/ui/card.d.cts +8 -8
  127. package/dist/ui/card.d.ts +8 -8
  128. package/dist/ui/carousel.d.cts +7 -7
  129. package/dist/ui/carousel.d.ts +7 -7
  130. package/dist/ui/collapsible.d.cts +4 -4
  131. package/dist/ui/collapsible.d.ts +4 -4
  132. package/dist/ui/command.cjs +1 -1
  133. package/dist/ui/command.d.cts +2 -2
  134. package/dist/ui/command.d.ts +2 -2
  135. package/dist/ui/command.js +1 -1
  136. package/dist/ui/context-menu.d.cts +16 -16
  137. package/dist/ui/context-menu.d.ts +16 -16
  138. package/dist/ui/dialog.cjs +1 -1
  139. package/dist/ui/dialog.d.cts +1 -1
  140. package/dist/ui/dialog.d.ts +1 -1
  141. package/dist/ui/dialog.js +1 -1
  142. package/dist/ui/dropdown-menu.d.cts +16 -16
  143. package/dist/ui/dropdown-menu.d.ts +16 -16
  144. package/dist/ui/file-uploader.d.cts +2 -2
  145. package/dist/ui/file-uploader.d.ts +2 -2
  146. package/dist/ui/form.d.cts +7 -7
  147. package/dist/ui/form.d.ts +7 -7
  148. package/dist/ui/hover-card.d.cts +4 -4
  149. package/dist/ui/hover-card.d.ts +4 -4
  150. package/dist/ui/input-otp.d.cts +5 -5
  151. package/dist/ui/input-otp.d.ts +5 -5
  152. package/dist/ui/input.d.cts +1 -1
  153. package/dist/ui/input.d.ts +1 -1
  154. package/dist/ui/inputs/search-input.d.cts +3 -3
  155. package/dist/ui/inputs/search-input.d.ts +3 -3
  156. package/dist/ui/label.d.cts +2 -2
  157. package/dist/ui/label.d.ts +2 -2
  158. package/dist/ui/menubar.d.cts +17 -17
  159. package/dist/ui/menubar.d.ts +17 -17
  160. package/dist/ui/multi-select.cjs +1 -1
  161. package/dist/ui/multi-select.d.cts +2 -2
  162. package/dist/ui/multi-select.d.ts +2 -2
  163. package/dist/ui/multi-select.js +1 -1
  164. package/dist/ui/navigation-menu.d.cts +9 -9
  165. package/dist/ui/navigation-menu.d.ts +9 -9
  166. package/dist/ui/pagination.d.cts +9 -9
  167. package/dist/ui/pagination.d.ts +9 -9
  168. package/dist/ui/popover.cjs +1 -1
  169. package/dist/ui/popover.d.cts +5 -5
  170. package/dist/ui/popover.d.ts +5 -5
  171. package/dist/ui/popover.js +1 -1
  172. package/dist/ui/progress.d.cts +2 -2
  173. package/dist/ui/progress.d.ts +2 -2
  174. package/dist/ui/radio-group.d.cts +3 -3
  175. package/dist/ui/radio-group.d.ts +3 -3
  176. package/dist/ui/resizable.d.cts +4 -4
  177. package/dist/ui/resizable.d.ts +4 -4
  178. package/dist/ui/scroll-area.d.cts +3 -3
  179. package/dist/ui/scroll-area.d.ts +3 -3
  180. package/dist/ui/select.d.cts +11 -11
  181. package/dist/ui/select.d.ts +11 -11
  182. package/dist/ui/separator.d.cts +1 -1
  183. package/dist/ui/separator.d.ts +1 -1
  184. package/dist/ui/sheet.d.cts +9 -9
  185. package/dist/ui/sheet.d.ts +9 -9
  186. package/dist/ui/sidebar.d.cts +30 -30
  187. package/dist/ui/sidebar.d.ts +30 -30
  188. package/dist/ui/skeleton.d.cts +2 -2
  189. package/dist/ui/skeleton.d.ts +2 -2
  190. package/dist/ui/slider.d.cts +2 -2
  191. package/dist/ui/slider.d.ts +2 -2
  192. package/dist/ui/sonner.d.cts +2 -2
  193. package/dist/ui/sonner.d.ts +2 -2
  194. package/dist/ui/switch.d.cts +2 -2
  195. package/dist/ui/switch.d.ts +2 -2
  196. package/dist/ui/table.d.cts +9 -9
  197. package/dist/ui/table.d.ts +9 -9
  198. package/dist/ui/tabs.d.cts +5 -5
  199. package/dist/ui/tabs.d.ts +5 -5
  200. package/dist/ui/textarea.d.cts +2 -2
  201. package/dist/ui/textarea.d.ts +2 -2
  202. package/dist/ui/toggle-group.d.cts +4 -4
  203. package/dist/ui/toggle-group.d.ts +4 -4
  204. package/dist/ui/toggle.d.cts +1 -1
  205. package/dist/ui/toggle.d.ts +1 -1
  206. package/dist/ui/tooltip.d.cts +1 -1
  207. package/dist/ui/tooltip.d.ts +1 -1
  208. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime98 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime60 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime98.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime60.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime98.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime60.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime98.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime60.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime98.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime60.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime98.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime60.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime98.JSX.Element;
28
+ }): react_jsx_runtime60.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime60.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime60.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime98.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime60.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime98.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime60.JSX.Element;
45
45
  //#endregion
46
46
  export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
47
- //# sourceMappingURL=dialog-C7RUCZNu.d.cts.map
47
+ //# sourceMappingURL=dialog-DRWITPUY.d.ts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime144 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime67 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime144.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime67.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime144.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime67.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime144.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime67.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime144.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime67.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime144.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime67.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime144.JSX.Element;
28
+ }): react_jsx_runtime67.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime144.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime67.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime144.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime67.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime144.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime67.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime144.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime67.JSX.Element;
45
45
  //#endregion
46
46
  export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
47
- //# sourceMappingURL=dialog-76EA0O7Y.d.ts.map
47
+ //# sourceMappingURL=dialog-O9IK0Rac.d.cts.map
@@ -1,2 +1,2 @@
1
1
  const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./utils-BsjVK5EW.cjs`),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.Dialog.Root,{"data-slot":`dialog`,...e})}function o({...e}){return(0,n.jsx)(r.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function s({...e}){return(0,n.jsx)(r.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function c({...e}){return(0,n.jsx)(r.Dialog.Close,{"data-slot":`dialog-close`,...e})}function l({className:e,...i}){return(0,n.jsx)(r.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:t.cn(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,e),...i})}function u({className:e,children:a,showCloseButton:o=!0,...c}){return(0,n.jsxs)(s,{"data-slot":`dialog-portal`,children:[(0,n.jsx)(l,{}),(0,n.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:(0,n.jsxs)(r.Dialog.Content,{"data-slot":`dialog-content`,className:t.cn(`bg-background relative z-50 grid`,`shadow-dialog gap-4 p-6 outline-none`,`max-h-[85svh] w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`rounded-2xl duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-80`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-80`,e),...c,children:[a,o&&(0,n.jsxs)(r.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,className:t.cn(`btnClose`,`absolute top-3 right-3 rounded-full p-2 opacity-70`,`cursor-pointer transition-all`,`outline-0`,`disabled:pointer-events-none`,`focus:ring-2`,`focus:ring-border-weak`,`hover:opacity-100`,`hover:bg-border-muted`,`data-[state=open]:bg-accent-weak`,`data-[state=open]:text-text-positive-muted`,`[&_svg]:text-accent-foreground/60`,`[&_svg]:hover:text-text-positive-strong`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-5`),children:[(0,n.jsx)(i.XIcon,{}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})})]})}function d({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`dialog-header`,className:t.cn(`flex flex-col gap-2 text-center sm:text-left`,e),...r})}function f({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`dialog-footer`,className:t.cn(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r})}function p({className:e,...i}){return(0,n.jsx)(r.Dialog.Title,{"data-slot":`dialog-title`,className:t.cn(`text-text-positive-strong text-lg leading-none font-semibold`,e),...i})}function m({className:e,...i}){return(0,n.jsx)(r.Dialog.Description,{"data-slot":`dialog-description`,className:t.cn(`text-text-positive-weak text-sm`,e),...i})}Object.defineProperty(exports,`Dialog`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`DialogClose`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`DialogContent`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`DialogDescription`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`DialogFooter`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`DialogHeader`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`DialogOverlay`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`DialogPortal`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`DialogTitle`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`DialogTrigger`,{enumerable:!0,get:function(){return o}});
2
- //# sourceMappingURL=dialog-CguMVyyd.cjs.map
2
+ //# sourceMappingURL=dialog-jE-xu7CZ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-CguMVyyd.cjs","names":["DialogPrimitive","cn","XIcon"],"sources":["../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport { XIcon } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background relative z-50 grid',\n 'shadow-dialog gap-4 p-6 outline-none',\n 'max-h-[85svh] w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'rounded-2xl duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-80',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-80',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n tabIndex={-1}\n className={cn(\n 'btnClose',\n 'absolute top-3 right-3 rounded-full p-2 opacity-70',\n 'cursor-pointer transition-all',\n 'outline-0',\n 'disabled:pointer-events-none',\n 'focus:ring-2',\n 'focus:ring-border-weak',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'data-[state=open]:bg-accent-weak',\n 'data-[state=open]:text-text-positive-muted',\n '[&_svg]:text-accent-foreground/60',\n '[&_svg]:hover:text-text-positive-strong',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-5\",\n )}\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </div>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn('text-text-positive-strong text-lg leading-none font-semibold', className)} {...props} />\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot=\"dialog-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger }\n"],"mappings":"0LAMA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,IAGtD,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,IAGjE,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,IAG/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,IAG7D,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAWC,EAAAA,GACT,iCACA,+BACA,8BACA,kCACA,iCACA,GAEF,GAAI,IAKV,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,CAAa,YAAU,2BACtB,EAAA,EAAA,KAAC,EAAA,KACD,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,gEACb,EAAA,EAAA,MAACD,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAWC,EAAAA,GACT,mCACA,uCACA,2DACA,2BACA,+BACA,8BACA,+BACA,kCACA,iCACA,kCACA,GAEF,GAAI,YAEH,EACA,IACC,EAAA,EAAA,MAACD,EAAAA,OAAgB,MAAA,CACf,YAAU,eACV,SAAU,GACV,UAAWC,EAAAA,GACT,WACA,qDACA,gCACA,YACA,+BACA,eACA,yBACA,oBACA,wBACA,mCACA,6CACA,oCACA,0CACA,8BACA,mBACA,mDAGF,EAAA,EAAA,KAACC,EAAAA,MAAAA,KACD,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,qBASxC,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,gBAAgB,UAAWD,EAAAA,GAAG,+CAAgD,GAAY,GAAI,IAGtH,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,gBAAgB,UAAWA,EAAAA,GAAG,yDAA0D,GAAY,GAAI,IAGhI,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAACD,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,UAAWC,EAAAA,GAAG,+DAAgE,GAAY,GAAI,IAGvJ,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAAA,EAAA,KAACD,EAAAA,OAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAWC,EAAAA,GAAG,kCAAmC,GAAY,GAAI"}
1
+ {"version":3,"file":"dialog-jE-xu7CZ.cjs","names":["DialogPrimitive","cn","XIcon"],"sources":["../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport { XIcon } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background relative z-50 grid',\n 'shadow-dialog gap-4 p-6 outline-none',\n 'max-h-[85svh] w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'rounded-2xl duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-80',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-80',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n tabIndex={-1}\n className={cn(\n 'btnClose',\n 'absolute top-3 right-3 rounded-full p-2 opacity-70',\n 'cursor-pointer transition-all',\n 'outline-0',\n 'disabled:pointer-events-none',\n 'focus:ring-2',\n 'focus:ring-border-weak',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'data-[state=open]:bg-accent-weak',\n 'data-[state=open]:text-text-positive-muted',\n '[&_svg]:text-accent-foreground/60',\n '[&_svg]:hover:text-text-positive-strong',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-5\",\n )}\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </div>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn('text-text-positive-strong text-lg leading-none font-semibold', className)} {...props} />\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot=\"dialog-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger }\n"],"mappings":"0LAMA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,IAGtD,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,IAGjE,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,IAG/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,IAG7D,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAWC,EAAAA,GACT,iCACA,+BACA,8BACA,kCACA,iCACA,GAEF,GAAI,IAKV,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,CAAa,YAAU,2BACtB,EAAA,EAAA,KAAC,EAAA,KACD,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,gEACb,EAAA,EAAA,MAACD,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAWC,EAAAA,GACT,mCACA,uCACA,2DACA,2BACA,+BACA,8BACA,+BACA,kCACA,iCACA,kCACA,GAEF,GAAI,YAEH,EACA,IACC,EAAA,EAAA,MAACD,EAAAA,OAAgB,MAAA,CACf,YAAU,eACV,SAAU,GACV,UAAWC,EAAAA,GACT,WACA,qDACA,gCACA,YACA,+BACA,eACA,yBACA,oBACA,wBACA,mCACA,6CACA,oCACA,0CACA,8BACA,mBACA,mDAGF,EAAA,EAAA,KAACC,EAAAA,MAAAA,KACD,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,qBASxC,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,gBAAgB,UAAWD,EAAAA,GAAG,+CAAgD,GAAY,GAAI,IAGtH,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,gBAAgB,UAAWA,EAAAA,GAAG,yDAA0D,GAAY,GAAI,IAGhI,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAACD,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,UAAWC,EAAAA,GAAG,+DAAgE,GAAY,GAAI,IAGvJ,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAAA,EAAA,KAACD,EAAAA,OAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAWC,EAAAA,GAAG,kCAAmC,GAAY,GAAI"}
@@ -1,2 +1,2 @@
1
- const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`),require(`../button-Cg9ZsZ68.cjs`);const t=require(`../alert-dialog-Dp-m0Xsj.cjs`),n=e.__toESM(require(`react/jsx-runtime`)),r=({open:e,isLoading:r=!1,title:i,description:a,onOpenChange:o,onConfirm:s})=>(0,n.jsx)(t.AlertDialog,{open:e,onOpenChange:o,children:(0,n.jsxs)(t.AlertDialogContent,{children:[(0,n.jsxs)(t.AlertDialogHeader,{className:`gap-0`,children:[(0,n.jsx)(t.AlertDialogTitle,{children:i}),(0,n.jsx)(t.AlertDialogDescription,{children:a})]}),(0,n.jsxs)(t.AlertDialogFooter,{children:[(0,n.jsx)(t.AlertDialogCancel,{children:`Cancel`}),(0,n.jsx)(t.AlertDialogAction,{className:`min-h-9 w-full md:w-24`,onClick:s,children:r?(0,n.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,n.jsx)(`div`,{className:`loader-spinner text-muted-foreground`})}):`Confirm`})]})]})});exports.ConfirmDialog=r;
1
+ const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`),require(`../button-Cg9ZsZ68.cjs`);const t=require(`../alert-dialog-CJX47wcM.cjs`),n=e.__toESM(require(`react/jsx-runtime`)),r=({open:e,isLoading:r=!1,title:i,description:a,onOpenChange:o,onConfirm:s})=>(0,n.jsx)(t.AlertDialog,{open:e,onOpenChange:o,children:(0,n.jsxs)(t.AlertDialogContent,{children:[(0,n.jsxs)(t.AlertDialogHeader,{className:`gap-0`,children:[(0,n.jsx)(t.AlertDialogTitle,{children:i}),(0,n.jsx)(t.AlertDialogDescription,{children:a})]}),(0,n.jsxs)(t.AlertDialogFooter,{children:[(0,n.jsx)(t.AlertDialogCancel,{children:`Cancel`}),(0,n.jsx)(t.AlertDialogAction,{className:`min-h-9 w-full md:w-24`,onClick:s,children:r?(0,n.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,n.jsx)(`div`,{className:`loader-spinner text-muted-foreground`})}):`Confirm`})]})]})});exports.ConfirmDialog=r;
2
2
  //# sourceMappingURL=confirm-dialog.cjs.map
@@ -1,2 +1,2 @@
1
- import"../utils-D9AH0PUV.js";import"../button-tXV0dTFU.js";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogFooter as a,AlertDialogHeader as o,AlertDialogTitle as s}from"../alert-dialog-Cj5WqA7x.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({open:u,isLoading:d=!1,title:f,description:p,onOpenChange:m,onConfirm:h})=>c(e,{open:u,onOpenChange:m,children:l(r,{children:[l(o,{className:`gap-0`,children:[c(s,{children:f}),c(i,{children:p})]}),l(a,{children:[c(n,{children:`Cancel`}),c(t,{className:`min-h-9 w-full md:w-24`,onClick:h,children:d?c(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:c(`div`,{className:`loader-spinner text-muted-foreground`})}):`Confirm`})]})]})});export{u as ConfirmDialog};
1
+ import"../utils-D9AH0PUV.js";import"../button-tXV0dTFU.js";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogFooter as a,AlertDialogHeader as o,AlertDialogTitle as s}from"../alert-dialog-_dDOoFxZ.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({open:u,isLoading:d=!1,title:f,description:p,onOpenChange:m,onConfirm:h})=>c(e,{open:u,onOpenChange:m,children:l(r,{children:[l(o,{className:`gap-0`,children:[c(s,{children:f}),c(i,{children:p})]}),l(a,{children:[c(n,{children:`Cancel`}),c(t,{className:`min-h-9 w-full md:w-24`,onClick:h,children:d?c(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:c(`div`,{className:`loader-spinner text-muted-foreground`})}):`Confirm`})]})]})});export{u as ConfirmDialog};
2
2
  //# sourceMappingURL=confirm-dialog.js.map
@@ -1,8 +1,8 @@
1
- import { Button } from "../../../button-B7EgZzPl.cjs";
2
- import { Input } from "../../../input-Cng3uFxw.cjs";
3
- import { Separator } from "../../../separator-D36UkGvg.cjs";
4
- import { TooltipContent } from "../../../tooltip-ClcR7d6G.cjs";
5
- import * as react_jsx_runtime235 from "react/jsx-runtime";
1
+ import { Button } from "../../../button-D64Qg3GM.cjs";
2
+ import { Input } from "../../../input-BP6Ebk4T.cjs";
3
+ import { Separator } from "../../../separator-mZ8r56s2.cjs";
4
+ import { TooltipContent } from "../../../tooltip-DE_eohyj.cjs";
5
+ import * as react_jsx_runtime236 from "react/jsx-runtime";
6
6
  import React from "react";
7
7
  import * as class_variance_authority_types6 from "class-variance-authority/types";
8
8
  import { VariantProps } from "class-variance-authority";
@@ -30,7 +30,7 @@ declare function SidebarProvider({
30
30
  defaultOpen?: boolean;
31
31
  open?: boolean;
32
32
  onOpenChange?: (open: boolean) => void;
33
- }): react_jsx_runtime235.JSX.Element;
33
+ }): react_jsx_runtime236.JSX.Element;
34
34
  declare function Sidebar({
35
35
  side,
36
36
  variant,
@@ -42,70 +42,70 @@ declare function Sidebar({
42
42
  side?: 'left' | 'right';
43
43
  variant?: 'sidebar' | 'floating' | 'inset';
44
44
  collapsible?: 'offcanvas' | 'icon' | 'none';
45
- }): react_jsx_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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;
@@ -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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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_runtime235.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.cts.map
@@ -1,7 +1,7 @@
1
- import { Button } from "../../../button-CTgIEMGS.js";
2
- import { Input } from "../../../input-DfaMHsQo.js";
3
- import { Separator } from "../../../separator-WBRIEOFh.js";
4
- import { TooltipContent } from "../../../tooltip-WPrK6Am9.js";
1
+ import { Button } from "../../../button-Bw-QYTzS.js";
2
+ import { Input } from "../../../input-DNCeWMaR.js";
3
+ import { Separator } from "../../../separator-BssDmBsX.js";
4
+ import { TooltipContent } from "../../../tooltip-xF7cFAUR.js";
5
5
  import React from "react";
6
6
  import * as react_jsx_runtime236 from "react/jsx-runtime";
7
7
  import { VariantProps } from "class-variance-authority";
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-CUT6urMc.cjs`),t=require(`../../utils-BsjVK5EW.cjs`);require(`../../card-BDtW5n7z.cjs`);const n=require(`../../flex-DnFMe9kC.cjs`),r=require(`../../date-nd8WkPlx.cjs`);require(`../../tooltip-D7xs4Hao.cjs`),require(`../../button-Cg9ZsZ68.cjs`);const i=require(`../../dialog-CguMVyyd.cjs`);require(`../../input-C2xQcVZP.cjs`);const a=require(`../../title-6Uosk2b4.cjs`);require(`../../separator-Cigaqna1.cjs`),require(`../../sheet-CX3PajAc.cjs`),require(`../../skeleton-tNlCAW9R.cjs`),require(`../../use-mobile-DD7ESbjU.cjs`);const o=require(`../../sidebar-B8vyPsEX.cjs`),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`lucide-react`)),l=()=>(0,s.jsxs)(i.DialogHeader,{className:`sr-only`,children:[(0,s.jsx)(i.DialogTitle,{className:`sr-only`}),(0,s.jsx)(i.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)(n.Flex,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),d=({title:e,createdAt:t})=>(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)(o.DetailDialogSidebarTrigger,{}),(0,s.jsxs)(n.Flex,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[(0,s.jsx)(a.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),(0,s.jsxs)(n.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`}),!!t&&(0,s.jsx)(r.DateDisplay,{showTime:!0,showHoliday:!0,date:t,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),f=({children:e})=>(0,s.jsx)(i.DialogContent,{className:t.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)(o.Sidebar,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[(0,s.jsx)(o.DetailDialogSidebarHeader,{children:(0,s.jsx)(o.DetailDialogSidebarMenu,{children:(0,s.jsx)(o.DetailDialogSidebarMenuItem,{children:(0,s.jsxs)(o.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)(o.DetailDialogSidebarContent,{children:(0,s.jsx)(o.DetailDialogSidebarGroup,{children:n})}),t&&(0,s.jsx)(o.DetailDialogSidebarFooter,{children:t})]}),m=({open:e,isLoading:t=!1,sidebarTitle:r,sidebar:a,sidebarFooter:c,title:m,createdAt:h,onOpenChange:g,children:_})=>(0,s.jsx)(i.Dialog,{open:e,onOpenChange:g,children:(0,s.jsxs)(f,{children:[(0,s.jsx)(l,{}),(0,s.jsxs)(o.SidebarProvider,{className:`h-full min-h-[85svh] items-start`,children:[(0,s.jsx)(p,{title:r,sidebarFooter:c,children:a}),(0,s.jsxs)(u,{children:[(0,s.jsx)(d,{title:m,createdAt:h}),t?(0,s.jsx)(n.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`),t=require(`../../utils-BsjVK5EW.cjs`);require(`../../card-BDtW5n7z.cjs`);const n=require(`../../flex-DnFMe9kC.cjs`),r=require(`../../date-nd8WkPlx.cjs`);require(`../../tooltip-D7xs4Hao.cjs`),require(`../../button-Cg9ZsZ68.cjs`);const i=require(`../../dialog-jE-xu7CZ.cjs`);require(`../../input-C2xQcVZP.cjs`);const a=require(`../../title-6Uosk2b4.cjs`);require(`../../separator-Cigaqna1.cjs`),require(`../../sheet-CX3PajAc.cjs`),require(`../../skeleton-tNlCAW9R.cjs`),require(`../../use-mobile-DD7ESbjU.cjs`);const o=require(`../../sidebar-B8vyPsEX.cjs`),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`lucide-react`)),l=()=>(0,s.jsxs)(i.DialogHeader,{className:`sr-only`,children:[(0,s.jsx)(i.DialogTitle,{className:`sr-only`}),(0,s.jsx)(i.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)(n.Flex,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),d=({title:e,createdAt:t})=>(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)(o.DetailDialogSidebarTrigger,{}),(0,s.jsxs)(n.Flex,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[(0,s.jsx)(a.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),(0,s.jsxs)(n.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`}),!!t&&(0,s.jsx)(r.DateDisplay,{showTime:!0,showHoliday:!0,date:t,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),f=({children:e})=>(0,s.jsx)(i.DialogContent,{className:t.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)(o.Sidebar,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[(0,s.jsx)(o.DetailDialogSidebarHeader,{children:(0,s.jsx)(o.DetailDialogSidebarMenu,{children:(0,s.jsx)(o.DetailDialogSidebarMenuItem,{children:(0,s.jsxs)(o.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)(o.DetailDialogSidebarContent,{children:(0,s.jsx)(o.DetailDialogSidebarGroup,{children:n})}),t&&(0,s.jsx)(o.DetailDialogSidebarFooter,{children:t})]}),m=({open:e,isLoading:t=!1,sidebarTitle:r,sidebar:a,sidebarFooter:c,title:m,createdAt:h,onOpenChange:g,children:_})=>(0,s.jsx)(i.Dialog,{open:e,onOpenChange:g,children:(0,s.jsxs)(f,{children:[(0,s.jsx)(l,{}),(0,s.jsxs)(o.SidebarProvider,{className:`h-full min-h-[85svh] items-start`,children:[(0,s.jsx)(p,{title:r,sidebarFooter:c,children:a}),(0,s.jsxs)(u,{children:[(0,s.jsx)(d,{title:m,createdAt:h}),t?(0,s.jsx)(n.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{cn as e}from"../../utils-D9AH0PUV.js";import"../../card-C17NWErE.js";import{Flex as t}from"../../flex-CbkTJwcD.js";import{DateDisplay as n}from"../../date-BMq_DNsv.js";import"../../tooltip-CaqA5ydI.js";import"../../button-tXV0dTFU.js";import{Dialog as r,DialogContent as i,DialogDescription as a,DialogHeader as o,DialogTitle as s}from"../../dialog-YTzM43YA.js";import"../../input-DgJVc3kt.js";import{Title as c}from"../../title-CxIwADiB.js";import"../../separator-aLdI4FQe.js";import"../../sheet-DqPtcv9H.js";import"../../skeleton-BSi1n1L2.js";import"../../use-mobile-CNVZwItd.js";import{DetailDialogSidebarContent as l,DetailDialogSidebarFooter as u,DetailDialogSidebarGroup as d,DetailDialogSidebarHeader as f,DetailDialogSidebarMenu as p,DetailDialogSidebarMenuButton as m,DetailDialogSidebarMenuItem as h,DetailDialogSidebarTrigger as g,Sidebar as _,SidebarProvider as v}from"../../sidebar-CUDxSzag.js";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{CalendarIcon as x,CatIcon as S}from"lucide-react";const C=()=>b(o,{className:`sr-only`,children:[y(s,{className:`sr-only`}),y(a,{className:`sr-only`})]}),w=({children:e})=>y(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:y(t,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),T=({title:e,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(g,{}),b(t,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[y(c,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),b(t,{padding:`none`,className:`text-text-positive-weak relative`,children:[y(x,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&y(n,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),E=({children:t})=>y(i,{className:e(`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:t}),D=({title:e,sidebarFooter:t,children:n})=>b(_,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[y(f,{children:y(p,{children:y(h,{children:b(m,{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(l,{children:y(d,{children:n})}),t&&y(u,{children:t})]}),O=({open:e,isLoading:n=!1,sidebarTitle:i,sidebar:a,sidebarFooter:o,title:s,createdAt:c,onOpenChange:l,children:u})=>y(r,{open:e,onOpenChange:l,children:b(E,{children:[y(C,{}),b(v,{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}),n?y(t,{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{cn as e}from"../../utils-D9AH0PUV.js";import"../../card-C17NWErE.js";import{Flex as t}from"../../flex-CbkTJwcD.js";import{DateDisplay as n}from"../../date-BMq_DNsv.js";import"../../tooltip-CaqA5ydI.js";import"../../button-tXV0dTFU.js";import{Dialog as r,DialogContent as i,DialogDescription as a,DialogHeader as o,DialogTitle as s}from"../../dialog-BZ9YutoX.js";import"../../input-DgJVc3kt.js";import{Title as c}from"../../title-CxIwADiB.js";import"../../separator-aLdI4FQe.js";import"../../sheet-DqPtcv9H.js";import"../../skeleton-BSi1n1L2.js";import"../../use-mobile-CNVZwItd.js";import{DetailDialogSidebarContent as l,DetailDialogSidebarFooter as u,DetailDialogSidebarGroup as d,DetailDialogSidebarHeader as f,DetailDialogSidebarMenu as p,DetailDialogSidebarMenuButton as m,DetailDialogSidebarMenuItem as h,DetailDialogSidebarTrigger as g,Sidebar as _,SidebarProvider as v}from"../../sidebar-CUDxSzag.js";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{CalendarIcon as x,CatIcon as S}from"lucide-react";const C=()=>b(o,{className:`sr-only`,children:[y(s,{className:`sr-only`}),y(a,{className:`sr-only`})]}),w=({children:e})=>y(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:y(t,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),T=({title:e,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(g,{}),b(t,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[y(c,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),b(t,{padding:`none`,className:`text-text-positive-weak relative`,children:[y(x,{size:12,className:`absolute top-0.5 md:top-1`}),!!r&&y(n,{showTime:!0,showHoliday:!0,date:r,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),E=({children:t})=>y(i,{className:e(`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:t}),D=({title:e,sidebarFooter:t,children:n})=>b(_,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[y(f,{children:y(p,{children:y(h,{children:b(m,{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(l,{children:y(d,{children:n})}),t&&y(u,{children:t})]}),O=({open:e,isLoading:n=!1,sidebarTitle:i,sidebar:a,sidebarFooter:o,title:s,createdAt:c,onOpenChange:l,children:u})=>y(r,{open:e,onOpenChange:l,children:b(E,{children:[y(C,{}),b(v,{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}),n?y(t,{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 +1 @@
1
- require(`../utils-BsjVK5EW.cjs`),require(`../button-Cg9ZsZ68.cjs`),require(`../alert-dialog-Dp-m0Xsj.cjs`);const e=require(`../error-dialog-D7FS_tBU.cjs`);exports.ErrorDialog=e.ErrorDialog;
1
+ require(`../utils-BsjVK5EW.cjs`),require(`../button-Cg9ZsZ68.cjs`),require(`../alert-dialog-CJX47wcM.cjs`);const e=require(`../error-dialog-BRHA447Y.cjs`);exports.ErrorDialog=e.ErrorDialog;
@@ -1 +1 @@
1
- import"../utils-D9AH0PUV.js";import"../button-tXV0dTFU.js";import"../alert-dialog-Cj5WqA7x.js";import{ErrorDialog as e}from"../error-dialog-CTPWuLNO.js";export{e as ErrorDialog};
1
+ import"../utils-D9AH0PUV.js";import"../button-tXV0dTFU.js";import"../alert-dialog-_dDOoFxZ.js";import{ErrorDialog as e}from"../error-dialog-CSIFb0WO.js";export{e as ErrorDialog};
@@ -1,2 +1,2 @@
1
- const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Cg9ZsZ68.cjs`);require(`../alert-dialog-Dp-m0Xsj.cjs`),require(`../error-dialog-D7FS_tBU.cjs`),require(`../label-B_2ZQn0X.cjs`),require(`../form-CU-tlomS.cjs`);const r=require(`../form-wrapper-CVkfJN7q.cjs`),i=require(`../dialog-CguMVyyd.cjs`),a=e.__toESM(require(`react/jsx-runtime`)),o=({form:e,open:o,isSubmitting:s=!1,isResetAfterSubmit:c=!0,disableSubmit:l=!1,title:u,description:d,className:f,onOpenChange:p,onSubmit:m,onError:h,onReset:g,children:_})=>(0,a.jsx)(i.Dialog,{open:o,onOpenChange:p,children:(0,a.jsxs)(i.DialogContent,{className:t.cn(`flex flex-col gap-0 border-none p-0`,f),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,a.jsxs)(i.DialogHeader,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[(0,a.jsx)(i.DialogTitle,{children:u||`Form Dialog`}),(0,a.jsx)(i.DialogDescription,{children:d||`This is a form dialog where you can add your form elements.`})]}),(0,a.jsxs)(r.FormWrapper,{form:e,isResetAfterSubmit:c,className:`flex flex-1 flex-col overflow-y-auto pt-4`,onSubmit:m,onError:h,children:[(0,a.jsx)(`main`,{className:`flex-1 overflow-y-auto px-6`,children:_}),(0,a.jsxs)(i.DialogFooter,{className:`border-border-weak border-t p-6 pt-4`,children:[(0,a.jsx)(n.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full sm:w-30`,onClick:g,children:`Reset`}),(0,a.jsx)(n.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:s,disabled:l,className:`w-full rounded-full sm:w-30`,children:`Submit`})]})]})]})});exports.FormDialog=o;
1
+ const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Cg9ZsZ68.cjs`),r=require(`../dialog-jE-xu7CZ.cjs`);require(`../label-B_2ZQn0X.cjs`),require(`../form-CU-tlomS.cjs`),require(`../alert-dialog-CJX47wcM.cjs`),require(`../error-dialog-BRHA447Y.cjs`);const i=require(`../form-wrapper-Dw_9b-2Z.cjs`),a=e.__toESM(require(`react/jsx-runtime`)),o=({form:e,open:o,isSubmitting:s=!1,isResetAfterSubmit:c=!0,disableSubmit:l=!1,title:u,description:d,className:f,onOpenChange:p,onSubmit:m,onError:h,onReset:g,children:_})=>(0,a.jsx)(r.Dialog,{open:o,onOpenChange:p,children:(0,a.jsxs)(r.DialogContent,{className:t.cn(`flex flex-col gap-0 border-none p-0`,f),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,a.jsxs)(r.DialogHeader,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[(0,a.jsx)(r.DialogTitle,{children:u||`Form Dialog`}),(0,a.jsx)(r.DialogDescription,{children:d||`This is a form dialog where you can add your form elements.`})]}),(0,a.jsxs)(i.FormWrapper,{form:e,isResetAfterSubmit:c,className:`flex flex-1 flex-col overflow-y-auto pt-4`,onSubmit:m,onError:h,children:[(0,a.jsx)(`main`,{className:`flex-1 overflow-y-auto px-6`,children:_}),(0,a.jsxs)(r.DialogFooter,{className:`border-border-weak border-t p-6 pt-4`,children:[(0,a.jsx)(n.Button,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full sm:w-30`,onClick:g,children:`Reset`}),(0,a.jsx)(n.Button,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:s,disabled:l,className:`w-full rounded-full sm:w-30`,children:`Submit`})]})]})]})});exports.FormDialog=o;
2
2
  //# sourceMappingURL=form-dialog.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 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_runtime3.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime11.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_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime40 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_runtime5.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime40.JSX.Element;
34
34
  //#endregion
35
35
  export { FormDialog };
36
36
  //# sourceMappingURL=form-dialog.d.ts.map
@@ -1,2 +1,2 @@
1
- import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-tXV0dTFU.js";import"../alert-dialog-Cj5WqA7x.js";import"../error-dialog-CTPWuLNO.js";import"../label-D1XmKlc3.js";import"../form-63w5ez51.js";import{FormWrapper as n}from"../form-wrapper-pnkjBZnM.js";import{Dialog as r,DialogContent as i,DialogDescription as a,DialogFooter as o,DialogHeader as s,DialogTitle as c}from"../dialog-YTzM43YA.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=({form:d,open:f,isSubmitting:p=!1,isResetAfterSubmit:m=!0,disableSubmit:h=!1,title:g,description:_,className:v,onOpenChange:y,onSubmit:b,onError:x,onReset:S,children:C})=>l(r,{open:f,onOpenChange:y,children:u(i,{className:e(`flex flex-col gap-0 border-none p-0`,v),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[u(s,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[l(c,{children:g||`Form Dialog`}),l(a,{children:_||`This is a form dialog where you can add your form elements.`})]}),u(n,{form:d,isResetAfterSubmit:m,className:`flex flex-1 flex-col overflow-y-auto pt-4`,onSubmit:b,onError:x,children:[l(`main`,{className:`flex-1 overflow-y-auto px-6`,children:C}),u(o,{className:`border-border-weak border-t p-6 pt-4`,children:[l(t,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full sm:w-30`,onClick:S,children:`Reset`}),l(t,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:p,disabled:h,className:`w-full rounded-full sm:w-30`,children:`Submit`})]})]})]})});export{d as FormDialog};
1
+ import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-tXV0dTFU.js";import{Dialog as n,DialogContent as r,DialogDescription as i,DialogFooter as a,DialogHeader as o,DialogTitle as s}from"../dialog-BZ9YutoX.js";import"../label-D1XmKlc3.js";import"../form-63w5ez51.js";import"../alert-dialog-_dDOoFxZ.js";import"../error-dialog-CSIFb0WO.js";import{FormWrapper as c}from"../form-wrapper-CvfYqjqa.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=({form:d,open:f,isSubmitting:p=!1,isResetAfterSubmit:m=!0,disableSubmit:h=!1,title:g,description:_,className:v,onOpenChange:y,onSubmit:b,onError:x,onReset:S,children:C})=>l(n,{open:f,onOpenChange:y,children:u(r,{className:e(`flex flex-col gap-0 border-none p-0`,v),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[u(o,{className:`border-border-weak flex-0 gap-2 border-b p-6 pb-4`,children:[l(s,{children:g||`Form Dialog`}),l(i,{children:_||`This is a form dialog where you can add your form elements.`})]}),u(c,{form:d,isResetAfterSubmit:m,className:`flex flex-1 flex-col overflow-y-auto pt-4`,onSubmit:b,onError:x,children:[l(`main`,{className:`flex-1 overflow-y-auto px-6`,children:C}),u(a,{className:`border-border-weak border-t p-6 pt-4`,children:[l(t,{tabIndex:-1,type:`button`,variant:`outline`,color:`muted`,className:`w-full rounded-full sm:w-30`,onClick:S,children:`Reset`}),l(t,{autoFocus:!0,tabIndex:0,type:`submit`,isLoading:p,disabled:h,className:`w-full rounded-full sm:w-30`,children:`Submit`})]})]})]})});export{d as FormDialog};
2
2
  //# sourceMappingURL=form-dialog.js.map
@@ -1,2 +1,2 @@
1
- const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`);const t=require(`../dialog-CguMVyyd.cjs`),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`)),i=({open:e,onOpenChange:n})=>(0,r.jsx)(t.Dialog,{open:e,onOpenChange:n,children:(0,r.jsxs)(t.DialogContent,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[(0,r.jsx)(t.DialogTitle,{}),(0,r.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,r.jsx)(`div`,{className:`loader opacity-60`})})]})});exports.LoadingDialog=i;
1
+ const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`);const t=require(`../dialog-jE-xu7CZ.cjs`),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`)),i=({open:e,onOpenChange:n})=>(0,r.jsx)(t.Dialog,{open:e,onOpenChange:n,children:(0,r.jsxs)(t.DialogContent,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[(0,r.jsx)(t.DialogTitle,{}),(0,r.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,r.jsx)(`div`,{className:`loader opacity-60`})})]})});exports.LoadingDialog=i;
2
2
  //# sourceMappingURL=loading-dialog.cjs.map
@@ -1,2 +1,2 @@
1
- import"../utils-D9AH0PUV.js";import{Dialog as e,DialogContent as t,DialogTitle as n}from"../dialog-YTzM43YA.js";import r from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({open:r,onOpenChange:o})=>i(e,{open:r,onOpenChange:o,children:a(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[i(n,{}),i(`div`,{className:`flex items-center justify-center`,children:i(`div`,{className:`loader opacity-60`})})]})});export{o as LoadingDialog};
1
+ import"../utils-D9AH0PUV.js";import{Dialog as e,DialogContent as t,DialogTitle as n}from"../dialog-BZ9YutoX.js";import r from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({open:r,onOpenChange:o})=>i(e,{open:r,onOpenChange:o,children:a(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[i(n,{}),i(`div`,{className:`flex items-center justify-center`,children:i(`div`,{className:`loader opacity-60`})})]})});export{o as LoadingDialog};
2
2
  //# sourceMappingURL=loading-dialog.js.map
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./alert-dialog-Dp-m0Xsj.cjs`),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`lucide-react`)),a=({open:e,title:a,children:o,onOpenChange:s})=>{let c=n.default.useCallback(()=>{s?.(!1)},[s]);return(0,r.jsx)(t.AlertDialog,{open:e,onOpenChange:s,children:(0,r.jsxs)(t.AlertDialogContent,{className:`gap-8 p-4 sm:max-w-md`,children:[(0,r.jsx)(t.AlertDialogHeader,{children:(0,r.jsxs)(`div`,{className:`text-destructive flex flex-col items-center`,children:[(0,r.jsx)(i.AlertTriangleIcon,{size:42}),(0,r.jsx)(t.AlertDialogTitle,{className:`text-xl font-medium`,children:a||`An error occurred`})]})}),o,(0,r.jsx)(t.AlertDialogFooter,{children:(0,r.jsx)(t.AlertDialogAction,{className:`w-full sm:w-28`,onClick:c,children:`Close`})})]})})};Object.defineProperty(exports,`ErrorDialog`,{enumerable:!0,get:function(){return a}});
2
- //# sourceMappingURL=error-dialog-D7FS_tBU.cjs.map
1
+ const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./alert-dialog-CJX47wcM.cjs`),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`lucide-react`)),a=({open:e,title:a,children:o,onOpenChange:s})=>{let c=n.default.useCallback(()=>{s?.(!1)},[s]);return(0,r.jsx)(t.AlertDialog,{open:e,onOpenChange:s,children:(0,r.jsxs)(t.AlertDialogContent,{className:`gap-8 p-4 sm:max-w-md`,children:[(0,r.jsx)(t.AlertDialogHeader,{children:(0,r.jsxs)(`div`,{className:`text-destructive flex flex-col items-center`,children:[(0,r.jsx)(i.AlertTriangleIcon,{size:42}),(0,r.jsx)(t.AlertDialogTitle,{className:`text-xl font-medium`,children:a||`An error occurred`})]})}),o,(0,r.jsx)(t.AlertDialogFooter,{children:(0,r.jsx)(t.AlertDialogAction,{className:`w-full sm:w-28`,onClick:c,children:`Close`})})]})})};Object.defineProperty(exports,`ErrorDialog`,{enumerable:!0,get:function(){return a}});
2
+ //# sourceMappingURL=error-dialog-BRHA447Y.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-dialog-D7FS_tBU.cjs","names":["ErrorDialog: React.FC<React.PropsWithChildren<Props>>","React","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertTriangleIcon","AlertDialogTitle","AlertDialogFooter","AlertDialogAction"],"sources":["../packages/components/dialogs/error-dialog.tsx"],"sourcesContent":["import React from 'react'\nimport { AlertTriangleIcon } from 'lucide-react'\n\nimport { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../ui/alert-dialog'\n\ntype Props = {\n open?: boolean\n title?: string\n description?: string\n onOpenChange?: (open: boolean) => void\n}\nexport const ErrorDialog: React.FC<React.PropsWithChildren<Props>> = ({ open, title, children, onOpenChange }) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false)\n }, [onOpenChange])\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"gap-8 p-4 sm:max-w-md\">\n <AlertDialogHeader>\n <div className=\"text-destructive flex flex-col items-center\">\n <AlertTriangleIcon size={42} />\n <AlertDialogTitle className=\"text-xl font-medium\">{title || 'An error occurred'}</AlertDialogTitle>\n </div>\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogAction className=\"w-full sm:w-28\" onClick={handleClose}>\n Close\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )\n}\n"],"mappings":"8LAWaA,GAAyD,CAAE,OAAM,QAAO,WAAU,kBAAmB,CAChH,IAAM,EAAcC,EAAAA,QAAM,gBAAkB,CAC1C,IAAe,KACd,CAAC,IACJ,OACE,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAkB,OAAoB,yBACrC,EAAA,EAAA,MAACC,EAAAA,mBAAAA,CAAmB,UAAU,mCAC5B,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,UACC,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,yDACb,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,KAAM,MACzB,EAAA,EAAA,KAACC,EAAAA,iBAAAA,CAAiB,UAAU,+BAAuB,GAAS,2BAG/D,GACD,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,UAAU,iBAAiB,QAAS,WAAa"}
1
+ {"version":3,"file":"error-dialog-BRHA447Y.cjs","names":["ErrorDialog: React.FC<React.PropsWithChildren<Props>>","React","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertTriangleIcon","AlertDialogTitle","AlertDialogFooter","AlertDialogAction"],"sources":["../packages/components/dialogs/error-dialog.tsx"],"sourcesContent":["import React from 'react'\nimport { AlertTriangleIcon } from 'lucide-react'\n\nimport { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../ui/alert-dialog'\n\ntype Props = {\n open?: boolean\n title?: string\n description?: string\n onOpenChange?: (open: boolean) => void\n}\nexport const ErrorDialog: React.FC<React.PropsWithChildren<Props>> = ({ open, title, children, onOpenChange }) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false)\n }, [onOpenChange])\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"gap-8 p-4 sm:max-w-md\">\n <AlertDialogHeader>\n <div className=\"text-destructive flex flex-col items-center\">\n <AlertTriangleIcon size={42} />\n <AlertDialogTitle className=\"text-xl font-medium\">{title || 'An error occurred'}</AlertDialogTitle>\n </div>\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogAction className=\"w-full sm:w-28\" onClick={handleClose}>\n Close\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )\n}\n"],"mappings":"8LAWaA,GAAyD,CAAE,OAAM,QAAO,WAAU,kBAAmB,CAChH,IAAM,EAAcC,EAAAA,QAAM,gBAAkB,CAC1C,IAAe,KACd,CAAC,IACJ,OACE,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAkB,OAAoB,yBACrC,EAAA,EAAA,MAACC,EAAAA,mBAAAA,CAAmB,UAAU,mCAC5B,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,UACC,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,yDACb,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,KAAM,MACzB,EAAA,EAAA,KAACC,EAAAA,iBAAAA,CAAiB,UAAU,+BAAuB,GAAS,2BAG/D,GACD,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,UAAU,iBAAiB,QAAS,WAAa"}
@@ -1,2 +1,2 @@
1
- import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogFooter as r,AlertDialogHeader as i,AlertDialogTitle as a}from"./alert-dialog-Cj5WqA7x.js";import o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{AlertTriangleIcon as l}from"lucide-react";const u=({open:u,title:d,children:f,onOpenChange:p})=>{let m=o.useCallback(()=>{p?.(!1)},[p]);return s(e,{open:u,onOpenChange:p,children:c(n,{className:`gap-8 p-4 sm:max-w-md`,children:[s(i,{children:c(`div`,{className:`text-destructive flex flex-col items-center`,children:[s(l,{size:42}),s(a,{className:`text-xl font-medium`,children:d||`An error occurred`})]})}),f,s(r,{children:s(t,{className:`w-full sm:w-28`,onClick:m,children:`Close`})})]})})};export{u as ErrorDialog};
2
- //# sourceMappingURL=error-dialog-CTPWuLNO.js.map
1
+ import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogFooter as r,AlertDialogHeader as i,AlertDialogTitle as a}from"./alert-dialog-_dDOoFxZ.js";import o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{AlertTriangleIcon as l}from"lucide-react";const u=({open:u,title:d,children:f,onOpenChange:p})=>{let m=o.useCallback(()=>{p?.(!1)},[p]);return s(e,{open:u,onOpenChange:p,children:c(n,{className:`gap-8 p-4 sm:max-w-md`,children:[s(i,{children:c(`div`,{className:`text-destructive flex flex-col items-center`,children:[s(l,{size:42}),s(a,{className:`text-xl font-medium`,children:d||`An error occurred`})]})}),f,s(r,{children:s(t,{className:`w-full sm:w-28`,onClick:m,children:`Close`})})]})})};export{u as ErrorDialog};
2
+ //# sourceMappingURL=error-dialog-CSIFb0WO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-dialog-CTPWuLNO.js","names":["ErrorDialog: React.FC<React.PropsWithChildren<Props>>"],"sources":["../packages/components/dialogs/error-dialog.tsx"],"sourcesContent":["import React from 'react'\nimport { AlertTriangleIcon } from 'lucide-react'\n\nimport { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../ui/alert-dialog'\n\ntype Props = {\n open?: boolean\n title?: string\n description?: string\n onOpenChange?: (open: boolean) => void\n}\nexport const ErrorDialog: React.FC<React.PropsWithChildren<Props>> = ({ open, title, children, onOpenChange }) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false)\n }, [onOpenChange])\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"gap-8 p-4 sm:max-w-md\">\n <AlertDialogHeader>\n <div className=\"text-destructive flex flex-col items-center\">\n <AlertTriangleIcon size={42} />\n <AlertDialogTitle className=\"text-xl font-medium\">{title || 'An error occurred'}</AlertDialogTitle>\n </div>\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogAction className=\"w-full sm:w-28\" onClick={handleClose}>\n Close\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )\n}\n"],"mappings":"oSAWA,MAAaA,GAAyD,CAAE,OAAM,QAAO,WAAU,kBAAmB,CAChH,IAAM,EAAc,EAAM,gBAAkB,CAC1C,IAAe,KACd,CAAC,IACJ,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,kCAC5B,EAAC,EAAA,CAAA,SACC,EAAC,MAAA,CAAI,UAAU,wDACb,EAAC,EAAA,CAAkB,KAAM,KACzB,EAAC,EAAA,CAAiB,UAAU,+BAAuB,GAAS,2BAG/D,EACD,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAkB,UAAU,iBAAiB,QAAS,WAAa"}
1
+ {"version":3,"file":"error-dialog-CSIFb0WO.js","names":["ErrorDialog: React.FC<React.PropsWithChildren<Props>>"],"sources":["../packages/components/dialogs/error-dialog.tsx"],"sourcesContent":["import React from 'react'\nimport { AlertTriangleIcon } from 'lucide-react'\n\nimport { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../ui/alert-dialog'\n\ntype Props = {\n open?: boolean\n title?: string\n description?: string\n onOpenChange?: (open: boolean) => void\n}\nexport const ErrorDialog: React.FC<React.PropsWithChildren<Props>> = ({ open, title, children, onOpenChange }) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false)\n }, [onOpenChange])\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"gap-8 p-4 sm:max-w-md\">\n <AlertDialogHeader>\n <div className=\"text-destructive flex flex-col items-center\">\n <AlertTriangleIcon size={42} />\n <AlertDialogTitle className=\"text-xl font-medium\">{title || 'An error occurred'}</AlertDialogTitle>\n </div>\n </AlertDialogHeader>\n {children}\n <AlertDialogFooter>\n <AlertDialogAction className=\"w-full sm:w-28\" onClick={handleClose}>\n Close\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )\n}\n"],"mappings":"oSAWA,MAAaA,GAAyD,CAAE,OAAM,QAAO,WAAU,kBAAmB,CAChH,IAAM,EAAc,EAAM,gBAAkB,CAC1C,IAAe,KACd,CAAC,IACJ,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,kCAC5B,EAAC,EAAA,CAAA,SACC,EAAC,MAAA,CAAI,UAAU,wDACb,EAAC,EAAA,CAAkB,KAAM,KACzB,EAAC,EAAA,CAAiB,UAAU,+BAAuB,GAAS,2BAG/D,EACD,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAkB,UAAU,iBAAiB,QAAS,WAAa"}
@@ -1,2 +1,2 @@
1
- import{ErrorDialog as e}from"./error-dialog-CTPWuLNO.js";import{Form as t}from"./form-63w5ez51.js";import n from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{AlertCircleIcon as o}from"lucide-react";import{useForm as s}from"react-hook-form";import{ErrorMessage as c}from"@hookform/error-message";const l=({form:l,isResetAfterSubmit:u=!0,className:d,onSubmit:f,onError:p,onSubcribe:m,children:h})=>{let g=s({...l,criteriaMode:`all`}),{formState:_,reset:v,handleSubmit:y,subscribe:b}=g,{dirtyFields:x}=_,[S,C]=n.useState(!1),w=n.useCallback(e=>{f(e,_,x),u&&v()},[x,_,u,f,v]),T=n.useCallback(e=>{let t=Object.keys(e);t.length!==0&&(p?.(e),C(!0))},[p]);return n.useEffect(()=>{if(!m)return;let e=b({formState:{values:!0},callback:({values:e})=>{m(e)}});return()=>e()},[m,b]),a(t,{...g,children:[i(`form`,{className:d,onSubmit:y(w,T),children:h}),i(e,{open:S,title:`Lỗi nhập dữ liệu`,description:`An unexpected error has occurred. Please check the errors below and try again.`,onOpenChange:C,children:S&&i(r,{children:Object.keys(_.errors).length>0?a(`div`,{className:`flex max-w-100 flex-col gap-2 px-4`,children:[i(`p`,{className:`text-muted-foreground text-sm font-semibold`,children:`Cảnh báo: Vui lòng kiểm tra các lỗi sau:`}),i(`div`,{className:`flex flex-col space-y-1`,children:Object.entries(_.errors).map(([e])=>i(c,{errors:_.errors,name:e,render:({messages:e})=>i(r,{children:e?Object.entries(e).map(([e,t])=>a(`div`,{className:`text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal`,children:[i(o,{size:16,className:`text-destructive mt-0.5 min-w-4 flex-0`}),i(`p`,{className:`line-clamp-2 flex-1 text-wrap`,children:t})]},e)):null})},e))})]}):i(`p`,{className:`text-muted-foreground text-sm`,children:`No errors found.`})})})]})};export{l as FormWrapper};
2
- //# sourceMappingURL=form-wrapper-pnkjBZnM.js.map
1
+ import{Form as e}from"./form-63w5ez51.js";import{ErrorDialog as t}from"./error-dialog-CSIFb0WO.js";import n from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{AlertCircleIcon as o}from"lucide-react";import{useForm as s}from"react-hook-form";import{ErrorMessage as c}from"@hookform/error-message";const l=({form:l,isResetAfterSubmit:u=!0,className:d,onSubmit:f,onError:p,onSubcribe:m,children:h})=>{let g=s({...l,criteriaMode:`all`}),{formState:_,reset:v,handleSubmit:y,subscribe:b}=g,{dirtyFields:x}=_,[S,C]=n.useState(!1),w=n.useCallback(e=>{f(e,_,x),u&&v()},[x,_,u,f,v]),T=n.useCallback(e=>{let t=Object.keys(e);t.length!==0&&(p?.(e),C(!0))},[p]);return n.useEffect(()=>{if(!m)return;let e=b({formState:{values:!0},callback:({values:e})=>{m(e)}});return()=>e()},[m,b]),a(e,{...g,children:[i(`form`,{className:d,onSubmit:y(w,T),children:h}),i(t,{open:S,title:`Lỗi nhập dữ liệu`,description:`An unexpected error has occurred. Please check the errors below and try again.`,onOpenChange:C,children:S&&i(r,{children:Object.keys(_.errors).length>0?a(`div`,{className:`flex max-w-100 flex-col gap-2 px-4`,children:[i(`p`,{className:`text-muted-foreground text-sm font-semibold`,children:`Cảnh báo: Vui lòng kiểm tra các lỗi sau:`}),i(`div`,{className:`flex flex-col space-y-1`,children:Object.entries(_.errors).map(([e])=>i(c,{errors:_.errors,name:e,render:({messages:e})=>i(r,{children:e?Object.entries(e).map(([e,t])=>a(`div`,{className:`text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal`,children:[i(o,{size:16,className:`text-destructive mt-0.5 min-w-4 flex-0`}),i(`p`,{className:`line-clamp-2 flex-1 text-wrap`,children:t})]},e)):null})},e))})]}):i(`p`,{className:`text-muted-foreground text-sm`,children:`No errors found.`})})})]})};export{l as FormWrapper};
2
+ //# sourceMappingURL=form-wrapper-CvfYqjqa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-wrapper-pnkjBZnM.js","names":[],"sources":["../packages/components/forms/form-wrapper.tsx"],"sourcesContent":["import React from 'react'\nimport { type FieldValues, type FormState, type SubmitErrorHandler, type SubmitHandler, useForm, type UseFormProps } from 'react-hook-form'\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport type { AnyEntity } from '@/types'\nimport { ErrorMessage } from '@hookform/error-message'\n\nimport { ErrorDialog } from '../dialogs/error-dialog'\nimport { Form } from '../ui/form'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n isResetAfterSubmit?: boolean\n className?: string\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onSubcribe?: (values: TFieldValues) => void\n}\n\nexport const FormWrapper = <TFieldValues extends FieldValues = FieldValues>({\n form: FormConfig,\n isResetAfterSubmit = true,\n className,\n onSubmit,\n onError,\n onSubcribe,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const form = useForm({\n ...FormConfig,\n criteriaMode: 'all',\n })\n\n const { formState, reset, handleSubmit, subscribe } = form\n const { dirtyFields } = formState\n\n const [errorOpen, setErrorOpen] = React.useState<boolean>(false)\n\n const handleFormSubmit = React.useCallback<SubmitHandler<TFieldValues>>(\n (data) => {\n onSubmit(data, formState, dirtyFields)\n if (isResetAfterSubmit) {\n reset()\n }\n },\n [dirtyFields, formState, isResetAfterSubmit, onSubmit, reset],\n )\n\n const handleFormError = React.useCallback<SubmitErrorHandler<TFieldValues>>(\n (errors) => {\n const errorKeys = Object.keys(errors)\n if (errorKeys.length === 0) return\n onError?.(errors)\n setErrorOpen(true)\n },\n [onError],\n )\n\n React.useEffect(() => {\n if (!onSubcribe) return\n const callback = subscribe({\n formState: { values: true },\n callback: ({ values }) => {\n onSubcribe(values)\n },\n })\n return () => callback()\n }, [onSubcribe, subscribe])\n\n return (\n <Form {...form}>\n <form className={className} onSubmit={handleSubmit(handleFormSubmit, handleFormError)}>\n {children}\n </form>\n <ErrorDialog\n open={errorOpen}\n title=\"Lỗi nhập dữ liệu\"\n description=\"An unexpected error has occurred. Please check the errors below and try again.\"\n onOpenChange={setErrorOpen}\n >\n {errorOpen && (\n <>\n {Object.keys(formState.errors).length > 0 ? (\n <div className=\"flex max-w-100 flex-col gap-2 px-4\">\n <p className=\"text-muted-foreground text-sm font-semibold\">Cảnh báo: Vui lòng kiểm tra các lỗi sau:</p>\n <div className=\"flex flex-col space-y-1\">\n {Object.entries(formState.errors).map(([key]) => (\n <ErrorMessage\n key={key}\n errors={formState.errors}\n name={key as AnyEntity}\n render={({ messages }) => {\n return (\n <>\n {messages\n ? Object.entries(messages).map(([type, message]) => {\n return (\n <div key={type} className=\"text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal\">\n <AlertCircleIcon size={16} className=\"text-destructive mt-0.5 min-w-4 flex-0\" />\n <p className=\"line-clamp-2 flex-1 text-wrap\">{message}</p>\n </div>\n )\n })\n : null}\n </>\n )\n }}\n />\n ))}\n </div>\n </div>\n ) : (\n <p className=\"text-muted-foreground text-sm\">No errors found.</p>\n )}\n </>\n )}\n </ErrorDialog>\n </Form>\n )\n}\n"],"mappings":"wUAmBA,MAAa,GAA+D,CAC1E,KAAM,EACN,qBAAqB,GACrB,YACA,WACA,UACA,aACA,cACkD,CAClD,IAAM,EAAO,EAAQ,CACnB,GAAG,EACH,aAAc,QAGV,CAAE,YAAW,QAAO,eAAc,aAAc,EAChD,CAAE,eAAgB,EAElB,CAAC,EAAW,GAAgB,EAAM,SAAkB,IAEpD,EAAmB,EAAM,YAC5B,GAAS,CACR,EAAS,EAAM,EAAW,GACtB,GACF,KAGJ,CAAC,EAAa,EAAW,EAAoB,EAAU,IAGnD,EAAkB,EAAM,YAC3B,GAAW,CACV,IAAM,EAAY,OAAO,KAAK,GAC1B,EAAU,SAAW,IACzB,IAAU,GACV,EAAa,MAEf,CAAC,IAcH,OAXA,EAAM,cAAgB,CACpB,GAAI,CAAC,EAAY,OACjB,IAAM,EAAW,EAAU,CACzB,UAAW,CAAE,OAAQ,IACrB,UAAW,CAAE,YAAa,CACxB,EAAW,MAGf,UAAa,KACZ,CAAC,EAAY,IAGd,EAAC,EAAA,CAAK,GAAI,YACR,EAAC,OAAA,CAAgB,YAAW,SAAU,EAAa,EAAkB,GAClE,aAEH,EAAC,EAAA,CACC,KAAM,EACN,MAAM,mBACN,YAAY,iFACZ,aAAc,WAEb,GACC,EAAA,EAAA,CAAA,SACG,OAAO,KAAK,EAAU,QAAQ,OAAS,EACtC,EAAC,MAAA,CAAI,UAAU,+CACb,EAAC,IAAA,CAAE,UAAU,uDAA8C,6CAC3D,EAAC,MAAA,CAAI,UAAU,mCACZ,OAAO,QAAQ,EAAU,QAAQ,KAAK,CAAC,KACtC,EAAC,EAAA,CAEC,OAAQ,EAAU,OAClB,KAAM,EACN,QAAS,CAAE,cAEP,EAAA,EAAA,CAAA,SACG,EACG,OAAO,QAAQ,GAAU,KAAK,CAAC,EAAM,KAEjC,EAAC,MAAA,CAAe,UAAU,yFACxB,EAAC,EAAA,CAAgB,KAAM,GAAI,UAAU,2CACrC,EAAC,IAAA,CAAE,UAAU,yCAAiC,MAFtC,IAMd,QAfL,SAwBb,EAAC,IAAA,CAAE,UAAU,yCAAgC"}
1
+ {"version":3,"file":"form-wrapper-CvfYqjqa.js","names":[],"sources":["../packages/components/forms/form-wrapper.tsx"],"sourcesContent":["import React from 'react'\nimport { type FieldValues, type FormState, type SubmitErrorHandler, type SubmitHandler, useForm, type UseFormProps } from 'react-hook-form'\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport type { AnyEntity } from '@/types'\nimport { ErrorMessage } from '@hookform/error-message'\n\nimport { ErrorDialog } from '../dialogs/error-dialog'\nimport { Form } from '../ui/form'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n form: UseFormProps<TFieldValues>\n isResetAfterSubmit?: boolean\n className?: string\n onSubmit: (data: TFieldValues, formState: FormState<FieldValues>, dirtyFields: FormState<FieldValues>['dirtyFields']) => void | Promise<void>\n onError?: SubmitErrorHandler<TFieldValues>\n onSubcribe?: (values: TFieldValues) => void\n}\n\nexport const FormWrapper = <TFieldValues extends FieldValues = FieldValues>({\n form: FormConfig,\n isResetAfterSubmit = true,\n className,\n onSubmit,\n onError,\n onSubcribe,\n children,\n}: React.PropsWithChildren<Props<TFieldValues>>) => {\n const form = useForm({\n ...FormConfig,\n criteriaMode: 'all',\n })\n\n const { formState, reset, handleSubmit, subscribe } = form\n const { dirtyFields } = formState\n\n const [errorOpen, setErrorOpen] = React.useState<boolean>(false)\n\n const handleFormSubmit = React.useCallback<SubmitHandler<TFieldValues>>(\n (data) => {\n onSubmit(data, formState, dirtyFields)\n if (isResetAfterSubmit) {\n reset()\n }\n },\n [dirtyFields, formState, isResetAfterSubmit, onSubmit, reset],\n )\n\n const handleFormError = React.useCallback<SubmitErrorHandler<TFieldValues>>(\n (errors) => {\n const errorKeys = Object.keys(errors)\n if (errorKeys.length === 0) return\n onError?.(errors)\n setErrorOpen(true)\n },\n [onError],\n )\n\n React.useEffect(() => {\n if (!onSubcribe) return\n const callback = subscribe({\n formState: { values: true },\n callback: ({ values }) => {\n onSubcribe(values)\n },\n })\n return () => callback()\n }, [onSubcribe, subscribe])\n\n return (\n <Form {...form}>\n <form className={className} onSubmit={handleSubmit(handleFormSubmit, handleFormError)}>\n {children}\n </form>\n <ErrorDialog\n open={errorOpen}\n title=\"Lỗi nhập dữ liệu\"\n description=\"An unexpected error has occurred. Please check the errors below and try again.\"\n onOpenChange={setErrorOpen}\n >\n {errorOpen && (\n <>\n {Object.keys(formState.errors).length > 0 ? (\n <div className=\"flex max-w-100 flex-col gap-2 px-4\">\n <p className=\"text-muted-foreground text-sm font-semibold\">Cảnh báo: Vui lòng kiểm tra các lỗi sau:</p>\n <div className=\"flex flex-col space-y-1\">\n {Object.entries(formState.errors).map(([key]) => (\n <ErrorMessage\n key={key}\n errors={formState.errors}\n name={key as AnyEntity}\n render={({ messages }) => {\n return (\n <>\n {messages\n ? Object.entries(messages).map(([type, message]) => {\n return (\n <div key={type} className=\"text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal\">\n <AlertCircleIcon size={16} className=\"text-destructive mt-0.5 min-w-4 flex-0\" />\n <p className=\"line-clamp-2 flex-1 text-wrap\">{message}</p>\n </div>\n )\n })\n : null}\n </>\n )\n }}\n />\n ))}\n </div>\n </div>\n ) : (\n <p className=\"text-muted-foreground text-sm\">No errors found.</p>\n )}\n </>\n )}\n </ErrorDialog>\n </Form>\n )\n}\n"],"mappings":"wUAmBA,MAAa,GAA+D,CAC1E,KAAM,EACN,qBAAqB,GACrB,YACA,WACA,UACA,aACA,cACkD,CAClD,IAAM,EAAO,EAAQ,CACnB,GAAG,EACH,aAAc,QAGV,CAAE,YAAW,QAAO,eAAc,aAAc,EAChD,CAAE,eAAgB,EAElB,CAAC,EAAW,GAAgB,EAAM,SAAkB,IAEpD,EAAmB,EAAM,YAC5B,GAAS,CACR,EAAS,EAAM,EAAW,GACtB,GACF,KAGJ,CAAC,EAAa,EAAW,EAAoB,EAAU,IAGnD,EAAkB,EAAM,YAC3B,GAAW,CACV,IAAM,EAAY,OAAO,KAAK,GAC1B,EAAU,SAAW,IACzB,IAAU,GACV,EAAa,MAEf,CAAC,IAcH,OAXA,EAAM,cAAgB,CACpB,GAAI,CAAC,EAAY,OACjB,IAAM,EAAW,EAAU,CACzB,UAAW,CAAE,OAAQ,IACrB,UAAW,CAAE,YAAa,CACxB,EAAW,MAGf,UAAa,KACZ,CAAC,EAAY,IAGd,EAAC,EAAA,CAAK,GAAI,YACR,EAAC,OAAA,CAAgB,YAAW,SAAU,EAAa,EAAkB,GAClE,aAEH,EAAC,EAAA,CACC,KAAM,EACN,MAAM,mBACN,YAAY,iFACZ,aAAc,WAEb,GACC,EAAA,EAAA,CAAA,SACG,OAAO,KAAK,EAAU,QAAQ,OAAS,EACtC,EAAC,MAAA,CAAI,UAAU,+CACb,EAAC,IAAA,CAAE,UAAU,uDAA8C,6CAC3D,EAAC,MAAA,CAAI,UAAU,mCACZ,OAAO,QAAQ,EAAU,QAAQ,KAAK,CAAC,KACtC,EAAC,EAAA,CAEC,OAAQ,EAAU,OAClB,KAAM,EACN,QAAS,CAAE,cAEP,EAAA,EAAA,CAAA,SACG,EACG,OAAO,QAAQ,GAAU,KAAK,CAAC,EAAM,KAEjC,EAAC,MAAA,CAAe,UAAU,yFACxB,EAAC,EAAA,CAAgB,KAAM,GAAI,UAAU,2CACrC,EAAC,IAAA,CAAE,UAAU,yCAAiC,MAFtC,IAMd,QAfL,SAwBb,EAAC,IAAA,CAAE,UAAU,yCAAgC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./error-dialog-D7FS_tBU.cjs`),n=require(`./form-CU-tlomS.cjs`),r=e.__toESM(require(`react`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`lucide-react`)),o=e.__toESM(require(`react-hook-form`)),s=e.__toESM(require(`@hookform/error-message`)),c=({form:e,isResetAfterSubmit:c=!0,className:l,onSubmit:u,onError:d,onSubcribe:f,children:p})=>{let m=(0,o.useForm)({...e,criteriaMode:`all`}),{formState:h,reset:g,handleSubmit:_,subscribe:v}=m,{dirtyFields:y}=h,[b,x]=r.default.useState(!1),S=r.default.useCallback(e=>{u(e,h,y),c&&g()},[y,h,c,u,g]),C=r.default.useCallback(e=>{let t=Object.keys(e);t.length!==0&&(d?.(e),x(!0))},[d]);return r.default.useEffect(()=>{if(!f)return;let e=v({formState:{values:!0},callback:({values:e})=>{f(e)}});return()=>e()},[f,v]),(0,i.jsxs)(n.Form,{...m,children:[(0,i.jsx)(`form`,{className:l,onSubmit:_(S,C),children:p}),(0,i.jsx)(t.ErrorDialog,{open:b,title:`Lỗi nhập dữ liệu`,description:`An unexpected error has occurred. Please check the errors below and try again.`,onOpenChange:x,children:b&&(0,i.jsx)(i.Fragment,{children:Object.keys(h.errors).length>0?(0,i.jsxs)(`div`,{className:`flex max-w-100 flex-col gap-2 px-4`,children:[(0,i.jsx)(`p`,{className:`text-muted-foreground text-sm font-semibold`,children:`Cảnh báo: Vui lòng kiểm tra các lỗi sau:`}),(0,i.jsx)(`div`,{className:`flex flex-col space-y-1`,children:Object.entries(h.errors).map(([e])=>(0,i.jsx)(s.ErrorMessage,{errors:h.errors,name:e,render:({messages:e})=>(0,i.jsx)(i.Fragment,{children:e?Object.entries(e).map(([e,t])=>(0,i.jsxs)(`div`,{className:`text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal`,children:[(0,i.jsx)(a.AlertCircleIcon,{size:16,className:`text-destructive mt-0.5 min-w-4 flex-0`}),(0,i.jsx)(`p`,{className:`line-clamp-2 flex-1 text-wrap`,children:t})]},e)):null})},e))})]}):(0,i.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No errors found.`})})})]})};Object.defineProperty(exports,`FormWrapper`,{enumerable:!0,get:function(){return c}});
2
- //# sourceMappingURL=form-wrapper-CVkfJN7q.cjs.map
1
+ const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./form-CU-tlomS.cjs`),n=require(`./error-dialog-BRHA447Y.cjs`),r=e.__toESM(require(`react`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`lucide-react`)),o=e.__toESM(require(`react-hook-form`)),s=e.__toESM(require(`@hookform/error-message`)),c=({form:e,isResetAfterSubmit:c=!0,className:l,onSubmit:u,onError:d,onSubcribe:f,children:p})=>{let m=(0,o.useForm)({...e,criteriaMode:`all`}),{formState:h,reset:g,handleSubmit:_,subscribe:v}=m,{dirtyFields:y}=h,[b,x]=r.default.useState(!1),S=r.default.useCallback(e=>{u(e,h,y),c&&g()},[y,h,c,u,g]),C=r.default.useCallback(e=>{let t=Object.keys(e);t.length!==0&&(d?.(e),x(!0))},[d]);return r.default.useEffect(()=>{if(!f)return;let e=v({formState:{values:!0},callback:({values:e})=>{f(e)}});return()=>e()},[f,v]),(0,i.jsxs)(t.Form,{...m,children:[(0,i.jsx)(`form`,{className:l,onSubmit:_(S,C),children:p}),(0,i.jsx)(n.ErrorDialog,{open:b,title:`Lỗi nhập dữ liệu`,description:`An unexpected error has occurred. Please check the errors below and try again.`,onOpenChange:x,children:b&&(0,i.jsx)(i.Fragment,{children:Object.keys(h.errors).length>0?(0,i.jsxs)(`div`,{className:`flex max-w-100 flex-col gap-2 px-4`,children:[(0,i.jsx)(`p`,{className:`text-muted-foreground text-sm font-semibold`,children:`Cảnh báo: Vui lòng kiểm tra các lỗi sau:`}),(0,i.jsx)(`div`,{className:`flex flex-col space-y-1`,children:Object.entries(h.errors).map(([e])=>(0,i.jsx)(s.ErrorMessage,{errors:h.errors,name:e,render:({messages:e})=>(0,i.jsx)(i.Fragment,{children:e?Object.entries(e).map(([e,t])=>(0,i.jsxs)(`div`,{className:`text-accent-foreground flex items-start gap-x-1 truncate text-sm font-normal`,children:[(0,i.jsx)(a.AlertCircleIcon,{size:16,className:`text-destructive mt-0.5 min-w-4 flex-0`}),(0,i.jsx)(`p`,{className:`line-clamp-2 flex-1 text-wrap`,children:t})]},e)):null})},e))})]}):(0,i.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No errors found.`})})})]})};Object.defineProperty(exports,`FormWrapper`,{enumerable:!0,get:function(){return c}});
2
+ //# sourceMappingURL=form-wrapper-Dw_9b-2Z.cjs.map