@customafk/lunas-ui 0.2.35 → 0.2.37

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 (177) hide show
  1. package/dist/{alert-DGoFdiDI.d.cts → alert-CT7oAzCC.d.mts} +7 -7
  2. package/dist/{alert-DZlPX4MK.d.mts → alert-lqPNRRvJ.d.cts} +7 -7
  3. package/dist/{badge-LtLg87DN.d.mts → badge-C4nTfJGX.d.mts} +7 -7
  4. package/dist/{badge-D1Un985K.d.cts → badge-Dq-Yyus_.d.cts} +7 -7
  5. package/dist/{button-CdjZ5QJ8.d.mts → button-CYLxBCfa.d.cts} +7 -7
  6. package/dist/{button-8OKxyueU.d.cts → button-DlFsSFmT.d.mts} +6 -6
  7. package/dist/cards/simple-card.d.cts +2 -2
  8. package/dist/cards/simple-card.d.mts +2 -2
  9. package/dist/data-display/statistic.d.cts +3 -3
  10. package/dist/data-display/statistic.d.mts +3 -3
  11. package/dist/{dialog-DolY0CYG.d.mts → dialog-1ArhWB8r.d.cts} +12 -12
  12. package/dist/{dialog-aguemTG1.d.cts → dialog-_zfOGo8B.d.mts} +12 -12
  13. package/dist/dialogs/confirm-dialog.cjs.map +1 -1
  14. package/dist/dialogs/confirm-dialog.mjs.map +1 -1
  15. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +1 -1
  16. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
  17. package/dist/features/descriptions/index.d.cts +4 -4
  18. package/dist/features/descriptions/index.d.mts +6 -6
  19. package/dist/features/search-modal/index.d.cts +2 -2
  20. package/dist/features/search-modal/index.d.mts +2 -2
  21. package/dist/features/tables/index.d.cts +1 -1
  22. package/dist/features/tables/index.d.mts +2 -2
  23. package/dist/features/tanstack-form/index.cjs +1 -1
  24. package/dist/features/tanstack-form/index.d.cts +1 -1
  25. package/dist/features/tanstack-form/index.d.mts +1 -1
  26. package/dist/features/tanstack-form/index.mjs +1 -1
  27. package/dist/features/text-editor/index.cjs +1 -1
  28. package/dist/features/text-editor/index.d.cts +2 -2
  29. package/dist/features/text-editor/index.d.mts +2 -2
  30. package/dist/features/text-editor/index.mjs +1 -1
  31. package/dist/{index-CgEghb4N.d.cts → index-9dZXIJo5.d.mts} +405 -405
  32. package/dist/{index-BhnqroF7.d.cts → index-C6nrbQ-E.d.cts} +30 -30
  33. package/dist/{index-C45OSg1W.d.mts → index-CJoz7sMc.d.mts} +30 -30
  34. package/dist/{index-DfvBLw2O.d.mts → index-CQkuntSj.d.cts} +405 -405
  35. package/dist/{index-BqGaIQNn.d.mts → index-DiW-62hY.d.mts} +41 -4
  36. package/dist/index-Du_HLRsN.d.cts +85 -0
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.cts +8 -8
  39. package/dist/index.d.mts +8 -8
  40. package/dist/index.mjs +1 -1
  41. package/dist/{input-CZrWdm_Y.d.cts → input-BAr0l-oA.d.cts} +6 -6
  42. package/dist/{input-DcbOSbQr.d.mts → input-DXO2mTgG.d.mts} +4 -4
  43. package/dist/layouts/flex.d.mts +5 -5
  44. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  45. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  46. package/dist/pages/FeatureFixing.d.cts +2 -2
  47. package/dist/pages/FeatureFixing.d.mts +2 -2
  48. package/dist/pages/LoginPage.d.cts +2 -2
  49. package/dist/pages/LoginPage.d.mts +2 -2
  50. package/dist/pages/NotAuthorized.d.mts +2 -2
  51. package/dist/pages/NotFound.d.cts +2 -2
  52. package/dist/pages/NotFound.d.mts +2 -2
  53. package/dist/pages/RegisterPage.d.cts +2 -2
  54. package/dist/pages/RegisterPage.d.mts +2 -2
  55. package/dist/pages/VerifyEmailPage.d.cts +2 -2
  56. package/dist/pages/VerifyEmailPage.d.mts +2 -2
  57. package/dist/tables-B3Ald6An.cjs.map +1 -1
  58. package/dist/tables-C3asiSD4.mjs.map +1 -1
  59. package/dist/{tanstack-form-dHOZ76Jw.cjs → tanstack-form-Byb7E1m9.cjs} +2 -2
  60. package/dist/{tanstack-form-dHOZ76Jw.cjs.map → tanstack-form-Byb7E1m9.cjs.map} +1 -1
  61. package/dist/{tanstack-form-BFX2-Tlo.mjs → tanstack-form-Dg_0hFwX.mjs} +2 -2
  62. package/dist/{tanstack-form-BFX2-Tlo.mjs.map → tanstack-form-Dg_0hFwX.mjs.map} +1 -1
  63. package/dist/text-editor-Bg0Wtnt3.mjs +2 -0
  64. package/dist/text-editor-Bg0Wtnt3.mjs.map +1 -0
  65. package/dist/text-editor-DtLcsiR7.cjs +2 -0
  66. package/dist/text-editor-DtLcsiR7.cjs.map +1 -0
  67. package/dist/typography/paragraph.d.cts +3 -3
  68. package/dist/typography/paragraph.d.mts +5 -5
  69. package/dist/ui/alert-dialog.d.cts +12 -12
  70. package/dist/ui/alert-dialog.d.mts +12 -12
  71. package/dist/ui/alert.d.cts +1 -1
  72. package/dist/ui/alert.d.mts +1 -1
  73. package/dist/ui/aspect-ratio.d.cts +2 -2
  74. package/dist/ui/aspect-ratio.d.mts +2 -2
  75. package/dist/ui/avatar.d.cts +4 -4
  76. package/dist/ui/avatar.d.mts +4 -4
  77. package/dist/ui/badge.d.cts +1 -1
  78. package/dist/ui/badge.d.mts +1 -1
  79. package/dist/ui/breadcrumb.d.cts +8 -8
  80. package/dist/ui/breadcrumb.d.mts +8 -8
  81. package/dist/ui/button-group.d.cts +7 -7
  82. package/dist/ui/button-group.d.mts +7 -7
  83. package/dist/ui/button.d.cts +1 -1
  84. package/dist/ui/button.d.mts +1 -1
  85. package/dist/ui/calendar.d.cts +4 -4
  86. package/dist/ui/calendar.d.mts +4 -4
  87. package/dist/ui/card.d.cts +8 -8
  88. package/dist/ui/card.d.mts +8 -8
  89. package/dist/ui/carousel.d.cts +7 -7
  90. package/dist/ui/carousel.d.mts +7 -7
  91. package/dist/ui/checkbox.d.cts +2 -2
  92. package/dist/ui/checkbox.d.mts +2 -2
  93. package/dist/ui/collapsible.d.cts +4 -4
  94. package/dist/ui/collapsible.d.mts +4 -4
  95. package/dist/ui/command.d.cts +11 -11
  96. package/dist/ui/command.d.mts +11 -11
  97. package/dist/ui/context-menu.d.cts +16 -16
  98. package/dist/ui/context-menu.d.mts +16 -16
  99. package/dist/ui/dialog.d.cts +1 -1
  100. package/dist/ui/dialog.d.mts +1 -1
  101. package/dist/ui/drawer.d.cts +11 -11
  102. package/dist/ui/drawer.d.mts +11 -11
  103. package/dist/ui/dropdown-menu.d.cts +16 -16
  104. package/dist/ui/dropdown-menu.d.mts +16 -16
  105. package/dist/ui/empty.d.cts +9 -9
  106. package/dist/ui/empty.d.mts +9 -9
  107. package/dist/ui/field.d.cts +24 -24
  108. package/dist/ui/field.d.mts +22 -22
  109. package/dist/ui/file-uploader.d.cts +2 -2
  110. package/dist/ui/file-uploader.d.mts +2 -2
  111. package/dist/ui/form.d.cts +10 -10
  112. package/dist/ui/form.d.mts +10 -10
  113. package/dist/ui/hover-card.d.cts +4 -4
  114. package/dist/ui/hover-card.d.mts +4 -4
  115. package/dist/ui/input-otp.d.cts +5 -5
  116. package/dist/ui/input-otp.d.mts +5 -5
  117. package/dist/ui/input.d.cts +1 -1
  118. package/dist/ui/input.d.mts +1 -1
  119. package/dist/ui/inputs/search-input.d.cts +3 -3
  120. package/dist/ui/inputs/search-input.d.mts +3 -3
  121. package/dist/ui/item.d.cts +14 -14
  122. package/dist/ui/item.d.mts +14 -14
  123. package/dist/ui/label.d.cts +2 -2
  124. package/dist/ui/label.d.mts +2 -2
  125. package/dist/ui/menubar.d.cts +17 -17
  126. package/dist/ui/menubar.d.mts +17 -17
  127. package/dist/ui/multi-select.d.cts +2 -2
  128. package/dist/ui/multi-select.d.mts +3 -3
  129. package/dist/ui/navigation-menu.d.cts +11 -11
  130. package/dist/ui/navigation-menu.d.mts +11 -11
  131. package/dist/ui/pagination.d.cts +9 -9
  132. package/dist/ui/pagination.d.mts +9 -9
  133. package/dist/ui/popover.d.cts +6 -6
  134. package/dist/ui/popover.d.mts +6 -6
  135. package/dist/ui/progress.d.cts +2 -2
  136. package/dist/ui/progress.d.mts +2 -2
  137. package/dist/ui/radio-group.d.cts +3 -3
  138. package/dist/ui/radio-group.d.mts +3 -3
  139. package/dist/ui/resizable.d.cts +9 -9
  140. package/dist/ui/resizable.d.mts +9 -9
  141. package/dist/ui/scroll-area.d.cts +5 -5
  142. package/dist/ui/scroll-area.d.mts +5 -5
  143. package/dist/ui/select.d.cts +9 -9
  144. package/dist/ui/select.d.mts +9 -9
  145. package/dist/ui/separator.d.cts +2 -2
  146. package/dist/ui/separator.d.mts +2 -2
  147. package/dist/ui/sheet.d.cts +9 -9
  148. package/dist/ui/sheet.d.mts +9 -9
  149. package/dist/ui/skeleton.d.cts +2 -2
  150. package/dist/ui/skeleton.d.mts +2 -2
  151. package/dist/ui/slider.d.cts +2 -2
  152. package/dist/ui/slider.d.mts +2 -2
  153. package/dist/ui/sonner.d.cts +2 -2
  154. package/dist/ui/sonner.d.mts +2 -2
  155. package/dist/ui/spinner.d.cts +2 -2
  156. package/dist/ui/spinner.d.mts +2 -2
  157. package/dist/ui/switch.d.cts +2 -2
  158. package/dist/ui/switch.d.mts +2 -2
  159. package/dist/ui/table.d.cts +17 -17
  160. package/dist/ui/table.d.mts +17 -17
  161. package/dist/ui/tabs.d.cts +5 -5
  162. package/dist/ui/tabs.d.mts +5 -5
  163. package/dist/ui/textarea.d.cts +2 -2
  164. package/dist/ui/textarea.d.mts +2 -2
  165. package/dist/ui/toggle-group.d.cts +3 -3
  166. package/dist/ui/toggle-group.d.mts +3 -3
  167. package/dist/ui/toggle.d.cts +4 -4
  168. package/dist/ui/toggle.d.mts +4 -4
  169. package/dist/ui/tooltip.d.cts +5 -5
  170. package/dist/ui/tooltip.d.mts +5 -5
  171. package/package.json +16 -6
  172. package/styles/text-editor.css +56 -0
  173. package/dist/index-DwS7a4RL.d.cts +0 -48
  174. package/dist/text-editor-BJBM0T1y.cjs +0 -2
  175. package/dist/text-editor-BJBM0T1y.cjs.map +0 -1
  176. package/dist/text-editor-CbBJNn-4.mjs +0 -2
  177. package/dist/text-editor-CbBJNn-4.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import * as react66 from "react";
2
- import * as class_variance_authority_types18 from "class-variance-authority/types";
1
+ import * as react155 from "react";
3
2
  import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types12 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/alert-variants.d.ts
6
6
  /**
@@ -8,7 +8,7 @@ import { VariantProps } from "class-variance-authority";
8
8
  */
9
9
  declare const alertVariants: (props?: ({
10
10
  variant?: "default" | "info" | "success" | "warning" | "destructive" | null | undefined;
11
- } & class_variance_authority_types18.ClassProp) | undefined) => string;
11
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
12
12
  type AlertVariantProps = VariantProps<typeof alertVariants>;
13
13
  //#endregion
14
14
  //#region packages/components/ui/alert.d.ts
@@ -50,7 +50,7 @@ declare function Alert({
50
50
  dismissible,
51
51
  onDismiss,
52
52
  ...props
53
- }: AlertProps): react66.JSX.Element;
53
+ }: AlertProps): react155.JSX.Element;
54
54
  /**
55
55
  * Props for the AlertTitle component.
56
56
  */
@@ -66,7 +66,7 @@ interface AlertTitleProps extends React.HTMLAttributes<HTMLDivElement> {
66
66
  declare function AlertTitle({
67
67
  className,
68
68
  ...props
69
- }: AlertTitleProps): react66.JSX.Element;
69
+ }: AlertTitleProps): react155.JSX.Element;
70
70
  /**
71
71
  * Props for the AlertDescription component.
72
72
  */
@@ -82,7 +82,7 @@ interface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
82
82
  declare function AlertDescription({
83
83
  className,
84
84
  ...props
85
- }: AlertDescriptionProps): react66.JSX.Element;
85
+ }: AlertDescriptionProps): react155.JSX.Element;
86
86
  //#endregion
87
87
  export { AlertTitle as a, AlertProps as i, AlertDescription as n, AlertTitleProps as o, AlertDescriptionProps as r, Alert as t };
88
- //# sourceMappingURL=alert-DGoFdiDI.d.cts.map
88
+ //# sourceMappingURL=alert-CT7oAzCC.d.mts.map
@@ -1,6 +1,6 @@
1
- import * as react37 from "react";
1
+ import * as react104 from "react";
2
+ import * as class_variance_authority_types12 from "class-variance-authority/types";
2
3
  import { VariantProps } from "class-variance-authority";
3
- import * as class_variance_authority_types14 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/alert-variants.d.ts
6
6
  /**
@@ -8,7 +8,7 @@ import * as class_variance_authority_types14 from "class-variance-authority/type
8
8
  */
9
9
  declare const alertVariants: (props?: ({
10
10
  variant?: "default" | "info" | "success" | "warning" | "destructive" | null | undefined;
11
- } & class_variance_authority_types14.ClassProp) | undefined) => string;
11
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
12
12
  type AlertVariantProps = VariantProps<typeof alertVariants>;
13
13
  //#endregion
14
14
  //#region packages/components/ui/alert.d.ts
@@ -50,7 +50,7 @@ declare function Alert({
50
50
  dismissible,
51
51
  onDismiss,
52
52
  ...props
53
- }: AlertProps): react37.JSX.Element;
53
+ }: AlertProps): react104.JSX.Element;
54
54
  /**
55
55
  * Props for the AlertTitle component.
56
56
  */
@@ -66,7 +66,7 @@ interface AlertTitleProps extends React.HTMLAttributes<HTMLDivElement> {
66
66
  declare function AlertTitle({
67
67
  className,
68
68
  ...props
69
- }: AlertTitleProps): react37.JSX.Element;
69
+ }: AlertTitleProps): react104.JSX.Element;
70
70
  /**
71
71
  * Props for the AlertDescription component.
72
72
  */
@@ -82,7 +82,7 @@ interface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
82
82
  declare function AlertDescription({
83
83
  className,
84
84
  ...props
85
- }: AlertDescriptionProps): react37.JSX.Element;
85
+ }: AlertDescriptionProps): react104.JSX.Element;
86
86
  //#endregion
87
87
  export { AlertTitle as a, AlertProps as i, AlertDescription as n, AlertTitleProps as o, AlertDescriptionProps as r, Alert as t };
88
- //# sourceMappingURL=alert-DZlPX4MK.d.mts.map
88
+ //# sourceMappingURL=alert-lqPNRRvJ.d.cts.map
@@ -1,14 +1,14 @@
1
- import * as react65 from "react";
1
+ import * as react26 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
- import * as class_variance_authority_types4 from "class-variance-authority/types";
3
+ import * as class_variance_authority_types1 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/badge.d.ts
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "outline" | "soft" | "solid" | null | undefined;
8
- color?: "muted" | "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
7
+ variant?: "outline" | "solid" | "soft" | null | undefined;
8
+ color?: "primary" | "secondary" | "muted" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
9
9
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  pill?: boolean | null | undefined;
11
- } & class_variance_authority_types4.ClassProp) | undefined) => string;
11
+ } & class_variance_authority_types1.ClassProp) | undefined) => string;
12
12
  /**
13
13
  * Props for the `Badge` component.
14
14
  *
@@ -36,7 +36,7 @@ declare function Badge({
36
36
  size,
37
37
  pill,
38
38
  ...props
39
- }: BadgeProps): react65.JSX.Element;
39
+ }: BadgeProps): react26.JSX.Element;
40
40
  //#endregion
41
41
  export { BadgeProps as n, badgeVariants as r, Badge as t };
42
- //# sourceMappingURL=badge-LtLg87DN.d.mts.map
42
+ //# sourceMappingURL=badge-C4nTfJGX.d.mts.map
@@ -1,14 +1,14 @@
1
- import * as react144 from "react";
2
- import * as class_variance_authority_types6 from "class-variance-authority/types";
1
+ import * as react57 from "react";
2
+ import * as class_variance_authority_types3 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
 
5
5
  //#region packages/components/ui/badge.d.ts
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "outline" | "soft" | "solid" | null | undefined;
8
- color?: "muted" | "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
7
+ variant?: "outline" | "solid" | "soft" | null | undefined;
8
+ color?: "primary" | "secondary" | "muted" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
9
9
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  pill?: boolean | null | undefined;
11
- } & class_variance_authority_types6.ClassProp) | undefined) => string;
11
+ } & class_variance_authority_types3.ClassProp) | undefined) => string;
12
12
  /**
13
13
  * Props for the `Badge` component.
14
14
  *
@@ -36,7 +36,7 @@ declare function Badge({
36
36
  size,
37
37
  pill,
38
38
  ...props
39
- }: BadgeProps): react144.JSX.Element;
39
+ }: BadgeProps): react57.JSX.Element;
40
40
  //#endregion
41
41
  export { BadgeProps as n, badgeVariants as r, Badge as t };
42
- //# sourceMappingURL=badge-D1Un985K.d.cts.map
42
+ //# sourceMappingURL=badge-Dq-Yyus_.d.cts.map
@@ -1,6 +1,6 @@
1
- import * as react57 from "react";
1
+ import * as react69 from "react";
2
+ import * as class_variance_authority_types13 from "class-variance-authority/types";
2
3
  import { VariantProps } from "class-variance-authority";
3
- import * as class_variance_authority_types12 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/button.variants.d.ts
6
6
 
@@ -8,10 +8,10 @@ import * as class_variance_authority_types12 from "class-variance-authority/type
8
8
  * Button variants definition for styling using class-variance-authority
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
- variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "primary" | "secondary" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
11
+ variant?: "default" | "outline" | "soft" | "link" | "ghost" | "subtle" | null | undefined;
12
+ color?: "primary" | "secondary" | "muted" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
- } & class_variance_authority_types12.ClassProp) | undefined) => string;
14
+ } & class_variance_authority_types13.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
16
16
  //#endregion
17
17
  //#region packages/components/ui/button.d.ts
@@ -168,7 +168,7 @@ declare function Button({
168
168
  type,
169
169
  innerClassName,
170
170
  ...props
171
- }: ButtonProps): react57.JSX.Element;
171
+ }: ButtonProps): react69.JSX.Element;
172
172
  //#endregion
173
173
  export { ButtonProps as n, Button as t };
174
- //# sourceMappingURL=button-CdjZ5QJ8.d.mts.map
174
+ //# sourceMappingURL=button-CYLxBCfa.d.cts.map
@@ -1,6 +1,6 @@
1
- import * as react187 from "react";
2
- import * as class_variance_authority_types19 from "class-variance-authority/types";
1
+ import * as react25 from "react";
3
2
  import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types19 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/button.variants.d.ts
6
6
 
@@ -8,8 +8,8 @@ import { VariantProps } from "class-variance-authority";
8
8
  * Button variants definition for styling using class-variance-authority
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
- variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "primary" | "secondary" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
11
+ variant?: "default" | "outline" | "soft" | "link" | "ghost" | "subtle" | null | undefined;
12
+ color?: "primary" | "secondary" | "muted" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
14
  } & class_variance_authority_types19.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
@@ -168,7 +168,7 @@ declare function Button({
168
168
  type,
169
169
  innerClassName,
170
170
  ...props
171
- }: ButtonProps): react187.JSX.Element;
171
+ }: ButtonProps): react25.JSX.Element;
172
172
  //#endregion
173
173
  export { ButtonProps as n, Button as t };
174
- //# sourceMappingURL=button-8OKxyueU.d.cts.map
174
+ //# sourceMappingURL=button-DlFsSFmT.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react1 from "react";
1
+ import * as react0 from "react";
2
2
 
3
3
  //#region packages/components/cards/simple-card.d.ts
4
4
  type Props = {
@@ -29,7 +29,7 @@ declare const SimpleCard: ({
29
29
  action,
30
30
  footer,
31
31
  children
32
- }: React.PropsWithChildren<Props>) => react1.JSX.Element;
32
+ }: React.PropsWithChildren<Props>) => react0.JSX.Element;
33
33
  //#endregion
34
34
  export { SimpleCard };
35
35
  //# sourceMappingURL=simple-card.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react16 from "react";
2
2
 
3
3
  //#region packages/components/cards/simple-card.d.ts
4
4
  type Props = {
@@ -29,7 +29,7 @@ declare const SimpleCard: ({
29
29
  action,
30
30
  footer,
31
31
  children
32
- }: React.PropsWithChildren<Props>) => react0.JSX.Element;
32
+ }: React.PropsWithChildren<Props>) => react16.JSX.Element;
33
33
  //#endregion
34
34
  export { SimpleCard };
35
35
  //# sourceMappingURL=simple-card.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react1 from "react";
2
2
  import * as class_variance_authority_types0 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
 
@@ -39,7 +39,7 @@ type StatisticProps = VariantProps<typeof statisticVariants> & {
39
39
  * <Statistic value={1234567.89} precision={2} prefix="$" trend="up" size="lg" />
40
40
  * ```
41
41
  */
42
- declare const Statistic: react0.MemoExoticComponent<({
42
+ declare const Statistic: react1.MemoExoticComponent<({
43
43
  decimalSeparator,
44
44
  groupSeparator,
45
45
  prefix: Prefix,
@@ -51,7 +51,7 @@ declare const Statistic: react0.MemoExoticComponent<({
51
51
  trend,
52
52
  value,
53
53
  className
54
- }: StatisticProps) => react0.JSX.Element>;
54
+ }: StatisticProps) => react1.JSX.Element>;
55
55
  //#endregion
56
56
  export { Statistic, StatisticProps };
57
57
  //# sourceMappingURL=statistic.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react18 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import * as class_variance_authority_types0 from "class-variance-authority/types";
4
4
 
@@ -39,7 +39,7 @@ type StatisticProps = VariantProps<typeof statisticVariants> & {
39
39
  * <Statistic value={1234567.89} precision={2} prefix="$" trend="up" size="lg" />
40
40
  * ```
41
41
  */
42
- declare const Statistic: react0.MemoExoticComponent<({
42
+ declare const Statistic: react18.MemoExoticComponent<({
43
43
  decimalSeparator,
44
44
  groupSeparator,
45
45
  prefix: Prefix,
@@ -51,7 +51,7 @@ declare const Statistic: react0.MemoExoticComponent<({
51
51
  trend,
52
52
  value,
53
53
  className
54
- }: StatisticProps) => react0.JSX.Element>;
54
+ }: StatisticProps) => react18.JSX.Element>;
55
55
  //#endregion
56
56
  export { Statistic, StatisticProps };
57
57
  //# sourceMappingURL=statistic.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react94 from "react";
1
+ import * as react72 from "react";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
@@ -33,24 +33,24 @@ import { Dialog } from "radix-ui";
33
33
  */
34
34
  declare function Dialog$1({
35
35
  ...props
36
- }: React.ComponentProps<typeof Dialog.Root>): react94.JSX.Element;
36
+ }: React.ComponentProps<typeof Dialog.Root>): react72.JSX.Element;
37
37
  /** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */
38
38
  declare function DialogTrigger({
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Trigger>): react94.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Trigger>): react72.JSX.Element;
41
41
  /** Renders dialog overlay and content into a portal outside the normal React tree. */
42
42
  declare function DialogPortal({
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Portal>): react94.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Portal>): react72.JSX.Element;
45
45
  /** Button that closes the dialog; can be composed with `asChild` to use a custom element. */
46
46
  declare function DialogClose({
47
47
  ...props
48
- }: React.ComponentProps<typeof Dialog.Close>): react94.JSX.Element;
48
+ }: React.ComponentProps<typeof Dialog.Close>): react72.JSX.Element;
49
49
  /** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */
50
50
  declare function DialogOverlay({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<typeof Dialog.Overlay>): react94.JSX.Element;
53
+ }: React.ComponentProps<typeof Dialog.Overlay>): react72.JSX.Element;
54
54
  /**
55
55
  * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.
56
56
  *
@@ -64,27 +64,27 @@ declare function DialogContent({
64
64
  }: React.ComponentProps<typeof Dialog.Content> & {
65
65
  /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */
66
66
  showCloseButton?: boolean;
67
- }): react94.JSX.Element;
67
+ }): react72.JSX.Element;
68
68
  /** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */
69
69
  declare function DialogHeader({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react94.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react72.JSX.Element;
73
73
  /** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */
74
74
  declare function DialogFooter({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react94.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react72.JSX.Element;
78
78
  /** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */
79
79
  declare function DialogTitle({
80
80
  className,
81
81
  ...props
82
- }: React.ComponentProps<typeof Dialog.Title>): react94.JSX.Element;
82
+ }: React.ComponentProps<typeof Dialog.Title>): react72.JSX.Element;
83
83
  /** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */
84
84
  declare function DialogDescription({
85
85
  className,
86
86
  ...props
87
- }: React.ComponentProps<typeof Dialog.Description>): react94.JSX.Element;
87
+ }: React.ComponentProps<typeof Dialog.Description>): react72.JSX.Element;
88
88
  //#endregion
89
89
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
90
- //# sourceMappingURL=dialog-DolY0CYG.d.mts.map
90
+ //# sourceMappingURL=dialog-1ArhWB8r.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react36 from "react";
1
+ import * as react169 from "react";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
@@ -33,24 +33,24 @@ import { Dialog } from "radix-ui";
33
33
  */
34
34
  declare function Dialog$1({
35
35
  ...props
36
- }: React.ComponentProps<typeof Dialog.Root>): react36.JSX.Element;
36
+ }: React.ComponentProps<typeof Dialog.Root>): react169.JSX.Element;
37
37
  /** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */
38
38
  declare function DialogTrigger({
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Trigger>): react36.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Trigger>): react169.JSX.Element;
41
41
  /** Renders dialog overlay and content into a portal outside the normal React tree. */
42
42
  declare function DialogPortal({
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Portal>): react36.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Portal>): react169.JSX.Element;
45
45
  /** Button that closes the dialog; can be composed with `asChild` to use a custom element. */
46
46
  declare function DialogClose({
47
47
  ...props
48
- }: React.ComponentProps<typeof Dialog.Close>): react36.JSX.Element;
48
+ }: React.ComponentProps<typeof Dialog.Close>): react169.JSX.Element;
49
49
  /** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */
50
50
  declare function DialogOverlay({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<typeof Dialog.Overlay>): react36.JSX.Element;
53
+ }: React.ComponentProps<typeof Dialog.Overlay>): react169.JSX.Element;
54
54
  /**
55
55
  * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.
56
56
  *
@@ -64,27 +64,27 @@ declare function DialogContent({
64
64
  }: React.ComponentProps<typeof Dialog.Content> & {
65
65
  /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */
66
66
  showCloseButton?: boolean;
67
- }): react36.JSX.Element;
67
+ }): react169.JSX.Element;
68
68
  /** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */
69
69
  declare function DialogHeader({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react36.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react169.JSX.Element;
73
73
  /** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */
74
74
  declare function DialogFooter({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react36.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react169.JSX.Element;
78
78
  /** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */
79
79
  declare function DialogTitle({
80
80
  className,
81
81
  ...props
82
- }: React.ComponentProps<typeof Dialog.Title>): react36.JSX.Element;
82
+ }: React.ComponentProps<typeof Dialog.Title>): react169.JSX.Element;
83
83
  /** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */
84
84
  declare function DialogDescription({
85
85
  className,
86
86
  ...props
87
- }: React.ComponentProps<typeof Dialog.Description>): react36.JSX.Element;
87
+ }: React.ComponentProps<typeof Dialog.Description>): react169.JSX.Element;
88
88
  //#endregion
89
89
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
90
- //# sourceMappingURL=dialog-aguemTG1.d.cts.map
90
+ //# sourceMappingURL=dialog-_zfOGo8B.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.cjs","names":["ConfirmDialog: React.FC<ConfirmDialogProps>","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","TriangleAlert","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"sources":["../../packages/components/dialogs/confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\nimport { TriangleAlert } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '../ui/alert-dialog';\n\n/**\n * Props for the {@link ConfirmDialog} component.\n */\nexport type ConfirmDialogProps = {\n /**\n * Controls whether the dialog is currently open.\n * This is a **controlled** prop — pair it with `onOpenChange` to manage state.\n */\n open?: boolean;\n\n /**\n * When `true`, shows an animated spinner inside the confirm button and\n * prevents double-submission. Typically bound to a mutation's pending state.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The dialog heading text. Keep it short and action-oriented,\n * e.g. `\"Delete user?\"` or `\"Unsaved changes\"`.\n */\n title: string;\n\n /**\n * Body copy explaining what will happen if the user confirms.\n * For irreversible actions, state explicitly that the action cannot be undone.\n */\n description: string;\n\n /**\n * Label for the cancel / dismiss button.\n *\n * @default \"Cancel\"\n */\n cancelText?: string;\n\n /**\n * Label for the confirm / submit button.\n *\n * @default \"Confirm\"\n */\n submitText?: string;\n\n /**\n * Additional class names applied to the `AlertDialogDescription` element.\n * Useful for overriding text color or font size for specific contexts.\n */\n descriptionClassName?: string;\n\n /**\n * Callback fired when the dialog open state changes.\n * Required to implement controlled open / close behavior.\n *\n * @param open - `true` when opening, `false` when closing.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * Async-safe callback fired when the user clicks the confirm button.\n * Supports both synchronous and `Promise`-returning functions.\n *\n * The dialog does **not** auto-close after `onConfirm` resolves — the caller\n * is responsible for setting `open` to `false` once the operation completes.\n *\n * @example\n * ```tsx\n * onConfirm={async () => {\n * await deleteUser(userId);\n * setOpen(false);\n * }}\n * ```\n */\n onConfirm?: () => Promise<void> | void;\n};\n\n/**\n * A controlled confirmation dialog for destructive or irreversible actions.\n *\n * Built on Radix UI's `AlertDialog` primitive. Renders a warning icon, title,\n * description, and Cancel / Confirm buttons. The confirm button supports an\n * async loading state to prevent double-submission.\n *\n * **Import:** `import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog'`\n *\n * @example Delete confirmation with React state\n * ```tsx\n * import { useState } from 'react';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n *\n * export function DeleteUserButton({ userId }: { userId: string }) {\n * const [open, setOpen] = useState(false);\n * const [isPending, setIsPending] = useState(false);\n *\n * const handleDelete = async () => {\n * setIsPending(true);\n * try {\n * await deleteUser(userId);\n * setOpen(false);\n * } finally {\n * setIsPending(false);\n * }\n * };\n *\n * return (\n * <>\n * <Button variant=\"outline\" color=\"danger\" onClick={() => setOpen(true)}>\n * Delete user\n * </Button>\n * <ConfirmDialog\n * open={open}\n * title=\"Delete user?\"\n * description=\"This action is permanent and cannot be undone.\"\n * submitText=\"Yes, delete\"\n * isLoading={isPending}\n * onOpenChange={setOpen}\n * onConfirm={handleDelete}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @example With TanStack Query mutation\n * ```tsx\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n * import { useMutation } from '@tanstack/react-query';\n *\n * export function ArchiveDialog({ open, onOpenChange, id }: Props) {\n * const { mutateAsync, isPending } = useMutation({ mutationFn: archiveItem });\n *\n * return (\n * <ConfirmDialog\n * open={open}\n * title=\"Archive item?\"\n * description=\"The item will be hidden but can be restored later.\"\n * submitText=\"Archive\"\n * isLoading={isPending}\n * onOpenChange={onOpenChange}\n * onConfirm={() => mutateAsync(id).then(() => onOpenChange(false))}\n * />\n * );\n * }\n * ```\n */\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n open,\n isLoading = false,\n title,\n description,\n cancelText = 'Cancel',\n submitText = 'Confirm',\n descriptionClassName,\n onOpenChange,\n onConfirm,\n}) => {\n const handleConfirm = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onConfirm?.();\n },\n [onConfirm]\n );\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"p-4 pb-5\">\n <AlertDialogHeader className=\"gap-2\">\n <AlertDialogTitle className=\"inline-flex items-center gap-x-1\">\n <TriangleAlert size={20} />\n <p>{title}</p>\n </AlertDialogTitle>\n <AlertDialogDescription className={descriptionClassName}>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{cancelText}</AlertDialogCancel>\n <AlertDialogAction type=\"button\" className=\"min-h-9 w-full md:w-24\" onClick={handleConfirm}>\n {isLoading ? (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"loader-spinner text-text-positive-weak\" />\n </div>\n ) : (\n submitText\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"mSAiKA,MAAaA,GAA+C,CAC1D,OACA,YAAY,GACZ,QACA,cACA,aAAa,SACb,aAAa,UACb,uBACA,eACA,eACI,CACJ,IAAM,GAAA,EAAA,EAAA,aACH,GAAwB,CACvB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,CACnB,KAAa,EAEf,CAAC,EAAU,CACZ,CAED,OACE,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAkB,OAAoB,yBACrC,EAAA,EAAA,MAACC,EAAAA,mBAAAA,CAAmB,UAAU,sBAC5B,EAAA,EAAA,MAACC,EAAAA,kBAAAA,CAAkB,UAAU,mBAC3B,EAAA,EAAA,MAACC,EAAAA,iBAAAA,CAAiB,UAAU,8CAC1B,EAAA,EAAA,KAACC,EAAAA,cAAAA,CAAc,KAAM,GAAA,CAAM,EAC3B,EAAA,EAAA,KAAC,IAAA,CAAA,SAAG,EAAA,CAAU,CAAA,EACG,EACnB,EAAA,EAAA,KAACC,EAAAA,uBAAAA,CAAuB,UAAW,WAAuB,GAAqC,CAAA,EAC7E,EACpB,EAAA,EAAA,MAACC,EAAAA,kBAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,SAAmB,EAAA,CAA+B,EACnD,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,KAAK,SAAS,UAAU,yBAAyB,QAAS,WAC1E,GACC,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,8DACb,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,yCAAA,CAA2C,EACtD,CAEN,GAEgB,CAAA,CAAA,CACF,CAAA,EACD,EACT"}
1
+ {"version":3,"file":"confirm-dialog.cjs","names":["ConfirmDialog: React.FC<ConfirmDialogProps>","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","TriangleAlert","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"sources":["../../packages/components/dialogs/confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { TriangleAlert } from 'lucide-react';\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '../ui/alert-dialog';\n\n/**\n * Props for the {@link ConfirmDialog} component.\n */\nexport type ConfirmDialogProps = {\n /**\n * Controls whether the dialog is currently open.\n * This is a **controlled** prop — pair it with `onOpenChange` to manage state.\n */\n open?: boolean;\n\n /**\n * When `true`, shows an animated spinner inside the confirm button and\n * prevents double-submission. Typically bound to a mutation's pending state.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The dialog heading text. Keep it short and action-oriented,\n * e.g. `\"Delete user?\"` or `\"Unsaved changes\"`.\n */\n title: string;\n\n /**\n * Body copy explaining what will happen if the user confirms.\n * For irreversible actions, state explicitly that the action cannot be undone.\n */\n description: string;\n\n /**\n * Label for the cancel / dismiss button.\n *\n * @default \"Cancel\"\n */\n cancelText?: string;\n\n /**\n * Label for the confirm / submit button.\n *\n * @default \"Confirm\"\n */\n submitText?: string;\n\n /**\n * Additional class names applied to the `AlertDialogDescription` element.\n * Useful for overriding text color or font size for specific contexts.\n */\n descriptionClassName?: string;\n\n /**\n * Callback fired when the dialog open state changes.\n * Required to implement controlled open / close behavior.\n *\n * @param open - `true` when opening, `false` when closing.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * Async-safe callback fired when the user clicks the confirm button.\n * Supports both synchronous and `Promise`-returning functions.\n *\n * The dialog does **not** auto-close after `onConfirm` resolves — the caller\n * is responsible for setting `open` to `false` once the operation completes.\n *\n * @example\n * ```tsx\n * onConfirm={async () => {\n * await deleteUser(userId);\n * setOpen(false);\n * }}\n * ```\n */\n onConfirm?: () => Promise<void> | void;\n};\n\n/**\n * A controlled confirmation dialog for destructive or irreversible actions.\n *\n * Built on Radix UI's `AlertDialog` primitive. Renders a warning icon, title,\n * description, and Cancel / Confirm buttons. The confirm button supports an\n * async loading state to prevent double-submission.\n *\n * **Import:** `import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog'`\n *\n * @example Delete confirmation with React state\n * ```tsx\n * import { useState } from 'react';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n *\n * export function DeleteUserButton({ userId }: { userId: string }) {\n * const [open, setOpen] = useState(false);\n * const [isPending, setIsPending] = useState(false);\n *\n * const handleDelete = async () => {\n * setIsPending(true);\n * try {\n * await deleteUser(userId);\n * setOpen(false);\n * } finally {\n * setIsPending(false);\n * }\n * };\n *\n * return (\n * <>\n * <Button variant=\"outline\" color=\"danger\" onClick={() => setOpen(true)}>\n * Delete user\n * </Button>\n * <ConfirmDialog\n * open={open}\n * title=\"Delete user?\"\n * description=\"This action is permanent and cannot be undone.\"\n * submitText=\"Yes, delete\"\n * isLoading={isPending}\n * onOpenChange={setOpen}\n * onConfirm={handleDelete}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @example With TanStack Query mutation\n * ```tsx\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n * import { useMutation } from '@tanstack/react-query';\n *\n * export function ArchiveDialog({ open, onOpenChange, id }: Props) {\n * const { mutateAsync, isPending } = useMutation({ mutationFn: archiveItem });\n *\n * return (\n * <ConfirmDialog\n * open={open}\n * title=\"Archive item?\"\n * description=\"The item will be hidden but can be restored later.\"\n * submitText=\"Archive\"\n * isLoading={isPending}\n * onOpenChange={onOpenChange}\n * onConfirm={() => mutateAsync(id).then(() => onOpenChange(false))}\n * />\n * );\n * }\n * ```\n */\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n open,\n isLoading = false,\n title,\n description,\n cancelText = 'Cancel',\n submitText = 'Confirm',\n descriptionClassName,\n onOpenChange,\n onConfirm,\n}) => {\n const handleConfirm = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onConfirm?.();\n },\n [onConfirm]\n );\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"p-4 pb-5\">\n <AlertDialogHeader className=\"gap-2\">\n <AlertDialogTitle className=\"inline-flex items-center gap-x-1\">\n <TriangleAlert size={20} />\n <p>{title}</p>\n </AlertDialogTitle>\n <AlertDialogDescription className={descriptionClassName}>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{cancelText}</AlertDialogCancel>\n <AlertDialogAction type=\"button\" className=\"min-h-9 w-full md:w-24\" onClick={handleConfirm}>\n {isLoading ? (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"loader-spinner text-text-positive-weak\" />\n </div>\n ) : (\n submitText\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"mSAmKA,MAAaA,GAA+C,CAC1D,OACA,YAAY,GACZ,QACA,cACA,aAAa,SACb,aAAa,UACb,uBACA,eACA,eACI,CACJ,IAAM,GAAA,EAAA,EAAA,aACH,GAAwB,CACvB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,CACnB,KAAa,EAEf,CAAC,EAAU,CACZ,CAED,OACE,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAkB,OAAoB,yBACrC,EAAA,EAAA,MAACC,EAAAA,mBAAAA,CAAmB,UAAU,sBAC5B,EAAA,EAAA,MAACC,EAAAA,kBAAAA,CAAkB,UAAU,mBAC3B,EAAA,EAAA,MAACC,EAAAA,iBAAAA,CAAiB,UAAU,8CAC1B,EAAA,EAAA,KAACC,EAAAA,cAAAA,CAAc,KAAM,GAAA,CAAM,EAC3B,EAAA,EAAA,KAAC,IAAA,CAAA,SAAG,EAAA,CAAU,CAAA,EACG,EACnB,EAAA,EAAA,KAACC,EAAAA,uBAAAA,CAAuB,UAAW,WAAuB,GAAqC,CAAA,EAC7E,EACpB,EAAA,EAAA,MAACC,EAAAA,kBAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAAA,SAAmB,EAAA,CAA+B,EACnD,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,KAAK,SAAS,UAAU,yBAAyB,QAAS,WAC1E,GACC,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,8DACb,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,yCAAA,CAA2C,EACtD,CAEN,GAEgB,CAAA,CAAA,CACF,CAAA,EACD,EACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.mjs","names":["ConfirmDialog: React.FC<ConfirmDialogProps>"],"sources":["../../packages/components/dialogs/confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\nimport { TriangleAlert } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '../ui/alert-dialog';\n\n/**\n * Props for the {@link ConfirmDialog} component.\n */\nexport type ConfirmDialogProps = {\n /**\n * Controls whether the dialog is currently open.\n * This is a **controlled** prop — pair it with `onOpenChange` to manage state.\n */\n open?: boolean;\n\n /**\n * When `true`, shows an animated spinner inside the confirm button and\n * prevents double-submission. Typically bound to a mutation's pending state.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The dialog heading text. Keep it short and action-oriented,\n * e.g. `\"Delete user?\"` or `\"Unsaved changes\"`.\n */\n title: string;\n\n /**\n * Body copy explaining what will happen if the user confirms.\n * For irreversible actions, state explicitly that the action cannot be undone.\n */\n description: string;\n\n /**\n * Label for the cancel / dismiss button.\n *\n * @default \"Cancel\"\n */\n cancelText?: string;\n\n /**\n * Label for the confirm / submit button.\n *\n * @default \"Confirm\"\n */\n submitText?: string;\n\n /**\n * Additional class names applied to the `AlertDialogDescription` element.\n * Useful for overriding text color or font size for specific contexts.\n */\n descriptionClassName?: string;\n\n /**\n * Callback fired when the dialog open state changes.\n * Required to implement controlled open / close behavior.\n *\n * @param open - `true` when opening, `false` when closing.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * Async-safe callback fired when the user clicks the confirm button.\n * Supports both synchronous and `Promise`-returning functions.\n *\n * The dialog does **not** auto-close after `onConfirm` resolves — the caller\n * is responsible for setting `open` to `false` once the operation completes.\n *\n * @example\n * ```tsx\n * onConfirm={async () => {\n * await deleteUser(userId);\n * setOpen(false);\n * }}\n * ```\n */\n onConfirm?: () => Promise<void> | void;\n};\n\n/**\n * A controlled confirmation dialog for destructive or irreversible actions.\n *\n * Built on Radix UI's `AlertDialog` primitive. Renders a warning icon, title,\n * description, and Cancel / Confirm buttons. The confirm button supports an\n * async loading state to prevent double-submission.\n *\n * **Import:** `import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog'`\n *\n * @example Delete confirmation with React state\n * ```tsx\n * import { useState } from 'react';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n *\n * export function DeleteUserButton({ userId }: { userId: string }) {\n * const [open, setOpen] = useState(false);\n * const [isPending, setIsPending] = useState(false);\n *\n * const handleDelete = async () => {\n * setIsPending(true);\n * try {\n * await deleteUser(userId);\n * setOpen(false);\n * } finally {\n * setIsPending(false);\n * }\n * };\n *\n * return (\n * <>\n * <Button variant=\"outline\" color=\"danger\" onClick={() => setOpen(true)}>\n * Delete user\n * </Button>\n * <ConfirmDialog\n * open={open}\n * title=\"Delete user?\"\n * description=\"This action is permanent and cannot be undone.\"\n * submitText=\"Yes, delete\"\n * isLoading={isPending}\n * onOpenChange={setOpen}\n * onConfirm={handleDelete}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @example With TanStack Query mutation\n * ```tsx\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n * import { useMutation } from '@tanstack/react-query';\n *\n * export function ArchiveDialog({ open, onOpenChange, id }: Props) {\n * const { mutateAsync, isPending } = useMutation({ mutationFn: archiveItem });\n *\n * return (\n * <ConfirmDialog\n * open={open}\n * title=\"Archive item?\"\n * description=\"The item will be hidden but can be restored later.\"\n * submitText=\"Archive\"\n * isLoading={isPending}\n * onOpenChange={onOpenChange}\n * onConfirm={() => mutateAsync(id).then(() => onOpenChange(false))}\n * />\n * );\n * }\n * ```\n */\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n open,\n isLoading = false,\n title,\n description,\n cancelText = 'Cancel',\n submitText = 'Confirm',\n descriptionClassName,\n onOpenChange,\n onConfirm,\n}) => {\n const handleConfirm = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onConfirm?.();\n },\n [onConfirm]\n );\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"p-4 pb-5\">\n <AlertDialogHeader className=\"gap-2\">\n <AlertDialogTitle className=\"inline-flex items-center gap-x-1\">\n <TriangleAlert size={20} />\n <p>{title}</p>\n </AlertDialogTitle>\n <AlertDialogDescription className={descriptionClassName}>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{cancelText}</AlertDialogCancel>\n <AlertDialogAction type=\"button\" className=\"min-h-9 w-full md:w-24\" onClick={handleConfirm}>\n {isLoading ? (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"loader-spinner text-text-positive-weak\" />\n </div>\n ) : (\n submitText\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"qdAiKA,MAAaA,GAA+C,CAC1D,OACA,YAAY,GACZ,QACA,cACA,aAAa,SACb,aAAa,UACb,uBACA,eACA,eACI,CACJ,IAAM,EAAgB,EACnB,GAAwB,CACvB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,CACnB,KAAa,EAEf,CAAC,EAAU,CACZ,CAED,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,qBAC5B,EAAC,EAAA,CAAkB,UAAU,kBAC3B,EAAC,EAAA,CAAiB,UAAU,6CAC1B,EAAC,EAAA,CAAc,KAAM,GAAA,CAAM,CAC3B,EAAC,IAAA,CAAA,SAAG,EAAA,CAAU,CAAA,EACG,CACnB,EAAC,EAAA,CAAuB,UAAW,WAAuB,GAAqC,CAAA,EAC7E,CACpB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAmB,EAAA,CAA+B,CACnD,EAAC,EAAA,CAAkB,KAAK,SAAS,UAAU,yBAAyB,QAAS,WAC1E,EACC,EAAC,MAAA,CAAI,UAAU,6DACb,EAAC,MAAA,CAAI,UAAU,yCAAA,CAA2C,EACtD,CAEN,GAEgB,CAAA,CAAA,CACF,CAAA,EACD,EACT"}
1
+ {"version":3,"file":"confirm-dialog.mjs","names":["ConfirmDialog: React.FC<ConfirmDialogProps>"],"sources":["../../packages/components/dialogs/confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { TriangleAlert } from 'lucide-react';\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '../ui/alert-dialog';\n\n/**\n * Props for the {@link ConfirmDialog} component.\n */\nexport type ConfirmDialogProps = {\n /**\n * Controls whether the dialog is currently open.\n * This is a **controlled** prop — pair it with `onOpenChange` to manage state.\n */\n open?: boolean;\n\n /**\n * When `true`, shows an animated spinner inside the confirm button and\n * prevents double-submission. Typically bound to a mutation's pending state.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The dialog heading text. Keep it short and action-oriented,\n * e.g. `\"Delete user?\"` or `\"Unsaved changes\"`.\n */\n title: string;\n\n /**\n * Body copy explaining what will happen if the user confirms.\n * For irreversible actions, state explicitly that the action cannot be undone.\n */\n description: string;\n\n /**\n * Label for the cancel / dismiss button.\n *\n * @default \"Cancel\"\n */\n cancelText?: string;\n\n /**\n * Label for the confirm / submit button.\n *\n * @default \"Confirm\"\n */\n submitText?: string;\n\n /**\n * Additional class names applied to the `AlertDialogDescription` element.\n * Useful for overriding text color or font size for specific contexts.\n */\n descriptionClassName?: string;\n\n /**\n * Callback fired when the dialog open state changes.\n * Required to implement controlled open / close behavior.\n *\n * @param open - `true` when opening, `false` when closing.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * Async-safe callback fired when the user clicks the confirm button.\n * Supports both synchronous and `Promise`-returning functions.\n *\n * The dialog does **not** auto-close after `onConfirm` resolves — the caller\n * is responsible for setting `open` to `false` once the operation completes.\n *\n * @example\n * ```tsx\n * onConfirm={async () => {\n * await deleteUser(userId);\n * setOpen(false);\n * }}\n * ```\n */\n onConfirm?: () => Promise<void> | void;\n};\n\n/**\n * A controlled confirmation dialog for destructive or irreversible actions.\n *\n * Built on Radix UI's `AlertDialog` primitive. Renders a warning icon, title,\n * description, and Cancel / Confirm buttons. The confirm button supports an\n * async loading state to prevent double-submission.\n *\n * **Import:** `import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog'`\n *\n * @example Delete confirmation with React state\n * ```tsx\n * import { useState } from 'react';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n *\n * export function DeleteUserButton({ userId }: { userId: string }) {\n * const [open, setOpen] = useState(false);\n * const [isPending, setIsPending] = useState(false);\n *\n * const handleDelete = async () => {\n * setIsPending(true);\n * try {\n * await deleteUser(userId);\n * setOpen(false);\n * } finally {\n * setIsPending(false);\n * }\n * };\n *\n * return (\n * <>\n * <Button variant=\"outline\" color=\"danger\" onClick={() => setOpen(true)}>\n * Delete user\n * </Button>\n * <ConfirmDialog\n * open={open}\n * title=\"Delete user?\"\n * description=\"This action is permanent and cannot be undone.\"\n * submitText=\"Yes, delete\"\n * isLoading={isPending}\n * onOpenChange={setOpen}\n * onConfirm={handleDelete}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @example With TanStack Query mutation\n * ```tsx\n * import { ConfirmDialog } from '@customafk/lunas-ui/dialogs/confirm-dialog';\n * import { useMutation } from '@tanstack/react-query';\n *\n * export function ArchiveDialog({ open, onOpenChange, id }: Props) {\n * const { mutateAsync, isPending } = useMutation({ mutationFn: archiveItem });\n *\n * return (\n * <ConfirmDialog\n * open={open}\n * title=\"Archive item?\"\n * description=\"The item will be hidden but can be restored later.\"\n * submitText=\"Archive\"\n * isLoading={isPending}\n * onOpenChange={onOpenChange}\n * onConfirm={() => mutateAsync(id).then(() => onOpenChange(false))}\n * />\n * );\n * }\n * ```\n */\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n open,\n isLoading = false,\n title,\n description,\n cancelText = 'Cancel',\n submitText = 'Confirm',\n descriptionClassName,\n onOpenChange,\n onConfirm,\n}) => {\n const handleConfirm = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onConfirm?.();\n },\n [onConfirm]\n );\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"p-4 pb-5\">\n <AlertDialogHeader className=\"gap-2\">\n <AlertDialogTitle className=\"inline-flex items-center gap-x-1\">\n <TriangleAlert size={20} />\n <p>{title}</p>\n </AlertDialogTitle>\n <AlertDialogDescription className={descriptionClassName}>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{cancelText}</AlertDialogCancel>\n <AlertDialogAction type=\"button\" className=\"min-h-9 w-full md:w-24\" onClick={handleConfirm}>\n {isLoading ? (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"loader-spinner text-text-positive-weak\" />\n </div>\n ) : (\n submitText\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"mappings":"qdAmKA,MAAaA,GAA+C,CAC1D,OACA,YAAY,GACZ,QACA,cACA,aAAa,SACb,aAAa,UACb,uBACA,eACA,eACI,CACJ,IAAM,EAAgB,EACnB,GAAwB,CACvB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,CACnB,KAAa,EAEf,CAAC,EAAU,CACZ,CAED,OACE,EAAC,EAAA,CAAkB,OAAoB,wBACrC,EAAC,EAAA,CAAmB,UAAU,qBAC5B,EAAC,EAAA,CAAkB,UAAU,kBAC3B,EAAC,EAAA,CAAiB,UAAU,6CAC1B,EAAC,EAAA,CAAc,KAAM,GAAA,CAAM,CAC3B,EAAC,IAAA,CAAA,SAAG,EAAA,CAAU,CAAA,EACG,CACnB,EAAC,EAAA,CAAuB,UAAW,WAAuB,GAAqC,CAAA,EAC7E,CACpB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAmB,EAAA,CAA+B,CACnD,EAAC,EAAA,CAAkB,KAAK,SAAS,UAAU,yBAAyB,QAAS,WAC1E,EACC,EAAC,MAAA,CAAI,UAAU,6DACb,EAAC,MAAA,CAAI,UAAU,yCAAA,CAA2C,EACtD,CAEN,GAEgB,CAAA,CAAA,CACF,CAAA,EACD,EACT"}
@@ -1,4 +1,4 @@
1
- import { t as Button } from "../../../button-8OKxyueU.cjs";
1
+ import { t as Button } from "../../../button-CYLxBCfa.cjs";
2
2
  import { Separator } from "../../../ui/separator.cjs";
3
3
  import { TooltipContent } from "../../../ui/tooltip.cjs";
4
4
  import * as react3 from "react";