@customafk/lunas-ui 0.2.26 → 0.2.27

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 (150) hide show
  1. package/dist/{alert-Dsq6vAs6.d.cts → alert-Bbooe3K0.d.cts} +7 -7
  2. package/dist/{badge-DwSr25mK.d.mts → badge-BUDQIgSz.d.mts} +3 -3
  3. package/dist/{badge-BluO4Nx_.d.cts → badge-Dxa365-r.d.cts} +5 -5
  4. package/dist/{button-BnV_vesk.d.cts → button-C7IuBgb_.d.cts} +5 -5
  5. package/dist/{button-DYdNy15v.d.mts → button-u7M3BQF5.d.mts} +3 -3
  6. package/dist/{dialog-C0DdEwn5.d.cts → dialog-CvPMWn6Y.d.mts} +12 -12
  7. package/dist/{dialog-enbWwzaM.d.mts → dialog-DE7tIKD6.d.cts} +12 -12
  8. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +24 -24
  9. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
  10. package/dist/features/descriptions/index.d.cts +1 -1
  11. package/dist/features/descriptions/index.d.mts +1 -1
  12. package/dist/features/search-modal/index.d.cts +2 -2
  13. package/dist/features/tables/index.d.cts +1 -1
  14. package/dist/features/tanstack-form/index.cjs +1 -1
  15. package/dist/features/tanstack-form/index.d.cts +1 -1
  16. package/dist/features/tanstack-form/index.d.mts +1 -1
  17. package/dist/features/tanstack-form/index.mjs +1 -1
  18. package/dist/features/text-editor/index.d.mts +1 -1
  19. package/dist/{index-C4PMwFiL.d.mts → index-C3dXDjdR.d.mts} +4 -4
  20. package/dist/{index-CVbUzeOi.d.cts → index-CyBWPhx7.d.cts} +2 -2
  21. package/dist/{index-Cek8sD8Z.d.mts → index-DPnJrJS9.d.mts} +43 -2
  22. package/dist/{index-C35BNdrJ.d.cts → index-UfOfYRNf.d.cts} +43 -2
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +7 -7
  25. package/dist/index.d.mts +5 -5
  26. package/dist/index.mjs +1 -1
  27. package/dist/{input-AU25j62E.d.cts → input-B9XN8dsE.d.cts} +5 -5
  28. package/dist/layouts/flex.d.cts +5 -5
  29. package/dist/layouts/flex.d.mts +5 -5
  30. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  31. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  32. package/dist/pages/FeatureFixing.d.cts +2 -2
  33. package/dist/pages/FeatureFixing.d.mts +2 -2
  34. package/dist/pages/LoginPage.d.cts +2 -2
  35. package/dist/pages/LoginPage.d.mts +2 -2
  36. package/dist/pages/NotAuthorized.d.cts +2 -2
  37. package/dist/pages/NotFound.d.cts +2 -2
  38. package/dist/pages/NotFound.d.mts +2 -2
  39. package/dist/pages/RegisterPage.d.cts +2 -2
  40. package/dist/pages/VerifyEmailPage.d.cts +2 -2
  41. package/dist/pages/VerifyEmailPage.d.mts +2 -2
  42. package/dist/tanstack-form--I4H53bf.cjs +2 -0
  43. package/dist/tanstack-form--I4H53bf.cjs.map +1 -0
  44. package/dist/tanstack-form-DKIudGKP.mjs +2 -0
  45. package/dist/tanstack-form-DKIudGKP.mjs.map +1 -0
  46. package/dist/typography/paragraph.d.cts +4 -4
  47. package/dist/ui/alert-dialog.d.cts +12 -12
  48. package/dist/ui/alert-dialog.d.mts +12 -12
  49. package/dist/ui/alert.d.cts +1 -1
  50. package/dist/ui/aspect-ratio.d.cts +2 -2
  51. package/dist/ui/aspect-ratio.d.mts +2 -2
  52. package/dist/ui/avatar.d.cts +4 -4
  53. package/dist/ui/avatar.d.mts +4 -4
  54. package/dist/ui/badge.d.cts +1 -1
  55. package/dist/ui/badge.d.mts +1 -1
  56. package/dist/ui/breadcrumb.d.cts +8 -8
  57. package/dist/ui/button-group.d.cts +6 -6
  58. package/dist/ui/button-group.d.mts +4 -4
  59. package/dist/ui/button.d.cts +1 -1
  60. package/dist/ui/button.d.mts +1 -1
  61. package/dist/ui/calendar.d.cts +4 -4
  62. package/dist/ui/calendar.d.mts +4 -4
  63. package/dist/ui/card.d.cts +8 -8
  64. package/dist/ui/card.d.mts +8 -8
  65. package/dist/ui/carousel.d.cts +7 -7
  66. package/dist/ui/carousel.d.mts +7 -7
  67. package/dist/ui/checkbox.d.cts +2 -2
  68. package/dist/ui/checkbox.d.mts +2 -2
  69. package/dist/ui/collapsible.d.cts +4 -4
  70. package/dist/ui/collapsible.d.mts +4 -4
  71. package/dist/ui/command.d.cts +11 -11
  72. package/dist/ui/command.d.mts +11 -11
  73. package/dist/ui/context-menu.d.cts +16 -16
  74. package/dist/ui/context-menu.d.mts +16 -16
  75. package/dist/ui/dialog.d.cts +1 -1
  76. package/dist/ui/dialog.d.mts +1 -1
  77. package/dist/ui/drawer.d.cts +11 -11
  78. package/dist/ui/drawer.d.mts +11 -11
  79. package/dist/ui/dropdown-menu.d.cts +16 -16
  80. package/dist/ui/dropdown-menu.d.mts +16 -16
  81. package/dist/ui/empty.d.cts +9 -9
  82. package/dist/ui/empty.d.mts +7 -7
  83. package/dist/ui/field.d.cts +23 -23
  84. package/dist/ui/field.d.mts +21 -21
  85. package/dist/ui/file-uploader.d.cts +2 -2
  86. package/dist/ui/file-uploader.d.mts +2 -2
  87. package/dist/ui/form.d.cts +10 -10
  88. package/dist/ui/form.d.mts +10 -10
  89. package/dist/ui/hover-card.d.cts +4 -4
  90. package/dist/ui/hover-card.d.mts +4 -4
  91. package/dist/ui/input-otp.d.cts +5 -5
  92. package/dist/ui/input-otp.d.mts +5 -5
  93. package/dist/ui/input.d.cts +1 -1
  94. package/dist/ui/inputs/search-input.d.cts +3 -3
  95. package/dist/ui/inputs/search-input.d.mts +2 -2
  96. package/dist/ui/item.d.cts +14 -14
  97. package/dist/ui/item.d.mts +11 -11
  98. package/dist/ui/label.d.cts +2 -2
  99. package/dist/ui/label.d.mts +2 -2
  100. package/dist/ui/menubar.d.cts +17 -17
  101. package/dist/ui/menubar.d.mts +17 -17
  102. package/dist/ui/multi-select.d.cts +2 -2
  103. package/dist/ui/multi-select.d.mts +3 -3
  104. package/dist/ui/navigation-menu.d.cts +11 -11
  105. package/dist/ui/navigation-menu.d.mts +9 -9
  106. package/dist/ui/pagination.d.cts +9 -9
  107. package/dist/ui/pagination.d.mts +9 -9
  108. package/dist/ui/popover.d.cts +6 -6
  109. package/dist/ui/popover.d.mts +6 -6
  110. package/dist/ui/progress.d.cts +2 -2
  111. package/dist/ui/progress.d.mts +2 -2
  112. package/dist/ui/radio-group.d.cts +3 -3
  113. package/dist/ui/radio-group.d.mts +3 -3
  114. package/dist/ui/resizable.d.cts +9 -9
  115. package/dist/ui/resizable.d.mts +9 -9
  116. package/dist/ui/scroll-area.d.cts +5 -5
  117. package/dist/ui/scroll-area.d.mts +5 -5
  118. package/dist/ui/select.d.cts +9 -9
  119. package/dist/ui/select.d.mts +9 -9
  120. package/dist/ui/separator.d.cts +2 -2
  121. package/dist/ui/separator.d.mts +2 -2
  122. package/dist/ui/sheet.d.cts +9 -9
  123. package/dist/ui/sheet.d.mts +9 -9
  124. package/dist/ui/sidebar.d.cts +28 -28
  125. package/dist/ui/sidebar.d.mts +27 -27
  126. package/dist/ui/skeleton.d.cts +2 -2
  127. package/dist/ui/skeleton.d.mts +2 -2
  128. package/dist/ui/slider.d.cts +2 -2
  129. package/dist/ui/slider.d.mts +2 -2
  130. package/dist/ui/sonner.d.cts +2 -2
  131. package/dist/ui/sonner.d.mts +2 -2
  132. package/dist/ui/spinner.d.cts +2 -2
  133. package/dist/ui/spinner.d.mts +2 -2
  134. package/dist/ui/switch.d.cts +2 -2
  135. package/dist/ui/switch.d.mts +2 -2
  136. package/dist/ui/table.d.cts +17 -17
  137. package/dist/ui/table.d.mts +17 -17
  138. package/dist/ui/tabs.d.cts +5 -5
  139. package/dist/ui/tabs.d.mts +5 -5
  140. package/dist/ui/textarea.d.cts +2 -2
  141. package/dist/ui/textarea.d.mts +2 -2
  142. package/dist/ui/toggle-group.d.cts +3 -3
  143. package/dist/ui/toggle.d.cts +4 -4
  144. package/dist/ui/toggle.d.mts +4 -4
  145. package/dist/ui/tooltip.d.cts +5 -5
  146. package/package.json +1 -1
  147. package/dist/tanstack-form-Bi87PL6v.mjs +0 -2
  148. package/dist/tanstack-form-Bi87PL6v.mjs.map +0 -1
  149. package/dist/tanstack-form-CaHoSFUA.cjs +0 -2
  150. package/dist/tanstack-form-CaHoSFUA.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import * as react283 from "react";
1
+ import * as react298 from "react";
2
2
 
3
3
  //#region packages/components/ui/table.d.ts
4
4
 
@@ -29,45 +29,45 @@ import * as react283 from "react";
29
29
  * </Table>
30
30
  * ```
31
31
  */
32
- declare const Table: react283.MemoExoticComponent<({
32
+ declare const Table: react298.MemoExoticComponent<({
33
33
  className,
34
34
  ...props
35
- }: React.ComponentProps<"table">) => react283.JSX.Element>;
35
+ }: React.ComponentProps<"table">) => react298.JSX.Element>;
36
36
  /** The `<thead>` element containing one or more header rows. */
37
- declare const TableHeader: react283.MemoExoticComponent<({
37
+ declare const TableHeader: react298.MemoExoticComponent<({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<"thead">) => react283.JSX.Element>;
40
+ }: React.ComponentProps<"thead">) => react298.JSX.Element>;
41
41
  /** The `<tbody>` element containing data rows with hover and selection styling. */
42
- declare const TableBody: react283.MemoExoticComponent<({
42
+ declare const TableBody: react298.MemoExoticComponent<({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<"tbody">) => react283.JSX.Element>;
45
+ }: React.ComponentProps<"tbody">) => react298.JSX.Element>;
46
46
  /** The `<tfoot>` element for summary or aggregate rows at the bottom of the table. */
47
- declare const TableFooter: react283.MemoExoticComponent<({
47
+ declare const TableFooter: react298.MemoExoticComponent<({
48
48
  className,
49
49
  ...props
50
- }: React.ComponentProps<"tfoot">) => react283.JSX.Element>;
50
+ }: React.ComponentProps<"tfoot">) => react298.JSX.Element>;
51
51
  /** A single `<tr>` row used inside TableHeader, TableBody, or TableFooter. */
52
- declare const TableRow: react283.MemoExoticComponent<({
52
+ declare const TableRow: react298.MemoExoticComponent<({
53
53
  className,
54
54
  ...props
55
- }: React.ComponentProps<"tr">) => react283.JSX.Element>;
55
+ }: React.ComponentProps<"tr">) => react298.JSX.Element>;
56
56
  /** A `<th>` column header cell with medium-weight text and left alignment. */
57
- declare const TableHead: react283.MemoExoticComponent<({
57
+ declare const TableHead: react298.MemoExoticComponent<({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<"th">) => react283.JSX.Element>;
60
+ }: React.ComponentProps<"th">) => react298.JSX.Element>;
61
61
  /** A standard `<td>` data cell used inside a TableRow. */
62
- declare const TableCell: react283.MemoExoticComponent<({
62
+ declare const TableCell: react298.MemoExoticComponent<({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<"td">) => react283.JSX.Element>;
65
+ }: React.ComponentProps<"td">) => react298.JSX.Element>;
66
66
  /** An accessible `<caption>` element displayed below the table. */
67
- declare const TableCaption: react283.MemoExoticComponent<({
67
+ declare const TableCaption: react298.MemoExoticComponent<({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<"caption">) => react283.JSX.Element>;
70
+ }: React.ComponentProps<"caption">) => react298.JSX.Element>;
71
71
  //#endregion
72
72
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
73
73
  //# sourceMappingURL=table.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react276 from "react";
1
+ import * as react299 from "react";
2
2
 
3
3
  //#region packages/components/ui/table.d.ts
4
4
 
@@ -29,45 +29,45 @@ import * as react276 from "react";
29
29
  * </Table>
30
30
  * ```
31
31
  */
32
- declare const Table: react276.MemoExoticComponent<({
32
+ declare const Table: react299.MemoExoticComponent<({
33
33
  className,
34
34
  ...props
35
- }: React.ComponentProps<"table">) => react276.JSX.Element>;
35
+ }: React.ComponentProps<"table">) => react299.JSX.Element>;
36
36
  /** The `<thead>` element containing one or more header rows. */
37
- declare const TableHeader: react276.MemoExoticComponent<({
37
+ declare const TableHeader: react299.MemoExoticComponent<({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<"thead">) => react276.JSX.Element>;
40
+ }: React.ComponentProps<"thead">) => react299.JSX.Element>;
41
41
  /** The `<tbody>` element containing data rows with hover and selection styling. */
42
- declare const TableBody: react276.MemoExoticComponent<({
42
+ declare const TableBody: react299.MemoExoticComponent<({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<"tbody">) => react276.JSX.Element>;
45
+ }: React.ComponentProps<"tbody">) => react299.JSX.Element>;
46
46
  /** The `<tfoot>` element for summary or aggregate rows at the bottom of the table. */
47
- declare const TableFooter: react276.MemoExoticComponent<({
47
+ declare const TableFooter: react299.MemoExoticComponent<({
48
48
  className,
49
49
  ...props
50
- }: React.ComponentProps<"tfoot">) => react276.JSX.Element>;
50
+ }: React.ComponentProps<"tfoot">) => react299.JSX.Element>;
51
51
  /** A single `<tr>` row used inside TableHeader, TableBody, or TableFooter. */
52
- declare const TableRow: react276.MemoExoticComponent<({
52
+ declare const TableRow: react299.MemoExoticComponent<({
53
53
  className,
54
54
  ...props
55
- }: React.ComponentProps<"tr">) => react276.JSX.Element>;
55
+ }: React.ComponentProps<"tr">) => react299.JSX.Element>;
56
56
  /** A `<th>` column header cell with medium-weight text and left alignment. */
57
- declare const TableHead: react276.MemoExoticComponent<({
57
+ declare const TableHead: react299.MemoExoticComponent<({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<"th">) => react276.JSX.Element>;
60
+ }: React.ComponentProps<"th">) => react299.JSX.Element>;
61
61
  /** A standard `<td>` data cell used inside a TableRow. */
62
- declare const TableCell: react276.MemoExoticComponent<({
62
+ declare const TableCell: react299.MemoExoticComponent<({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<"td">) => react276.JSX.Element>;
65
+ }: React.ComponentProps<"td">) => react299.JSX.Element>;
66
66
  /** An accessible `<caption>` element displayed below the table. */
67
- declare const TableCaption: react276.MemoExoticComponent<({
67
+ declare const TableCaption: react299.MemoExoticComponent<({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<"caption">) => react276.JSX.Element>;
70
+ }: React.ComponentProps<"caption">) => react299.JSX.Element>;
71
71
  //#endregion
72
72
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
73
73
  //# sourceMappingURL=table.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react271 from "react";
1
+ import * as react207 from "react";
2
2
  import { Tabs as Tabs$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tabs.d.ts
@@ -23,22 +23,22 @@ import { Tabs as Tabs$1 } from "radix-ui";
23
23
  declare function Tabs({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Tabs$1.Root>): react271.JSX.Element;
26
+ }: React.ComponentProps<typeof Tabs$1.Root>): react207.JSX.Element;
27
27
  /** Container that holds the row of `TabsTrigger` buttons with a muted background pill style. */
28
28
  declare function TabsList({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<typeof Tabs$1.List>): react271.JSX.Element;
31
+ }: React.ComponentProps<typeof Tabs$1.List>): react207.JSX.Element;
32
32
  /** Individual tab button that activates its associated `TabsContent` panel when clicked. */
33
33
  declare function TabsTrigger({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Tabs$1.Trigger>): react271.JSX.Element;
36
+ }: React.ComponentProps<typeof Tabs$1.Trigger>): react207.JSX.Element;
37
37
  /** Panel whose visibility is controlled by the active `TabsTrigger`; each panel must have a matching `value`. */
38
38
  declare function TabsContent({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Tabs$1.Content>): react271.JSX.Element;
41
+ }: React.ComponentProps<typeof Tabs$1.Content>): react207.JSX.Element;
42
42
  //#endregion
43
43
  export { Tabs, TabsContent, TabsList, TabsTrigger };
44
44
  //# sourceMappingURL=tabs.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react292 from "react";
1
+ import * as react315 from "react";
2
2
  import { Tabs as Tabs$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tabs.d.ts
@@ -23,22 +23,22 @@ import { Tabs as Tabs$1 } from "radix-ui";
23
23
  declare function Tabs({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Tabs$1.Root>): react292.JSX.Element;
26
+ }: React.ComponentProps<typeof Tabs$1.Root>): react315.JSX.Element;
27
27
  /** Container that holds the row of `TabsTrigger` buttons with a muted background pill style. */
28
28
  declare function TabsList({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<typeof Tabs$1.List>): react292.JSX.Element;
31
+ }: React.ComponentProps<typeof Tabs$1.List>): react315.JSX.Element;
32
32
  /** Individual tab button that activates its associated `TabsContent` panel when clicked. */
33
33
  declare function TabsTrigger({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Tabs$1.Trigger>): react292.JSX.Element;
36
+ }: React.ComponentProps<typeof Tabs$1.Trigger>): react315.JSX.Element;
37
37
  /** Panel whose visibility is controlled by the active `TabsTrigger`; each panel must have a matching `value`. */
38
38
  declare function TabsContent({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Tabs$1.Content>): react292.JSX.Element;
41
+ }: React.ComponentProps<typeof Tabs$1.Content>): react315.JSX.Element;
42
42
  //#endregion
43
43
  export { Tabs, TabsContent, TabsList, TabsTrigger };
44
44
  //# sourceMappingURL=tabs.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react276 from "react";
1
+ import * as react218 from "react";
2
2
 
3
3
  //#region packages/components/ui/textarea.d.ts
4
4
 
@@ -24,7 +24,7 @@ declare function Textarea({
24
24
  }: React.ComponentProps<'textarea'> & {
25
25
  /** Convenience callback that receives the raw string value on every change, bypassing the synthetic event. */
26
26
  onValueChange?: (value: string) => void;
27
- }): react276.JSX.Element;
27
+ }): react218.JSX.Element;
28
28
  //#endregion
29
29
  export { Textarea };
30
30
  //# sourceMappingURL=textarea.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react275 from "react";
1
+ import * as react319 from "react";
2
2
 
3
3
  //#region packages/components/ui/textarea.d.ts
4
4
 
@@ -24,7 +24,7 @@ declare function Textarea({
24
24
  }: React.ComponentProps<'textarea'> & {
25
25
  /** Convenience callback that receives the raw string value on every change, bypassing the synthetic event. */
26
26
  onValueChange?: (value: string) => void;
27
- }): react275.JSX.Element;
27
+ }): react319.JSX.Element;
28
28
  //#endregion
29
29
  export { Textarea };
30
30
  //# sourceMappingURL=textarea.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { toggleVariants } from "./toggle.cjs";
2
- import * as react279 from "react";
2
+ import * as react221 from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { ToggleGroup as ToggleGroup$1 } from "radix-ui";
5
5
 
@@ -25,7 +25,7 @@ declare function ToggleGroup({
25
25
  size,
26
26
  children,
27
27
  ...props
28
- }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react279.JSX.Element;
28
+ }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react221.JSX.Element;
29
29
  /** A single item/button within a ToggleGroup that inherits the group's variant and size. */
30
30
  declare function ToggleGroupItem({
31
31
  className,
@@ -33,7 +33,7 @@ declare function ToggleGroupItem({
33
33
  variant,
34
34
  size,
35
35
  ...props
36
- }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react279.JSX.Element;
36
+ }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react221.JSX.Element;
37
37
  //#endregion
38
38
  export { ToggleGroup, ToggleGroupItem };
39
39
  //# sourceMappingURL=toggle-group.d.cts.map
@@ -1,5 +1,5 @@
1
- import * as react282 from "react";
2
- import * as class_variance_authority_types11 from "class-variance-authority/types";
1
+ import * as react216 from "react";
2
+ import * as class_variance_authority_types7 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Toggle as Toggle$1 } from "radix-ui";
5
5
 
@@ -7,7 +7,7 @@ import { Toggle as Toggle$1 } from "radix-ui";
7
7
  declare const toggleVariants: (props?: ({
8
8
  variant?: "default" | "outline" | null | undefined;
9
9
  size?: "sm" | "lg" | "default" | null | undefined;
10
- } & class_variance_authority_types11.ClassProp) | undefined) => string;
10
+ } & class_variance_authority_types7.ClassProp) | undefined) => string;
11
11
  /**
12
12
  * A two-state button that switches between pressed (`on`) and unpressed (`off`).
13
13
  *
@@ -26,7 +26,7 @@ declare function Toggle({
26
26
  variant,
27
27
  size,
28
28
  ...props
29
- }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react282.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react216.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.cts.map
@@ -1,13 +1,13 @@
1
- import * as react319 from "react";
1
+ import * as react275 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import { Toggle as Toggle$1 } from "radix-ui";
4
- import * as class_variance_authority_types12 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types11 from "class-variance-authority/types";
5
5
 
6
6
  //#region packages/components/ui/toggle.d.ts
7
7
  declare const toggleVariants: (props?: ({
8
8
  variant?: "default" | "outline" | null | undefined;
9
9
  size?: "sm" | "lg" | "default" | null | undefined;
10
- } & class_variance_authority_types12.ClassProp) | undefined) => string;
10
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
11
11
  /**
12
12
  * A two-state button that switches between pressed (`on`) and unpressed (`off`).
13
13
  *
@@ -26,7 +26,7 @@ declare function Toggle({
26
26
  variant,
27
27
  size,
28
28
  ...props
29
- }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react319.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react275.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react299 from "react";
1
+ import * as react223 from "react";
2
2
  import { Tooltip as Tooltip$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tooltip.d.ts
@@ -19,7 +19,7 @@ import { Tooltip as Tooltip$1 } from "radix-ui";
19
19
  declare function TooltipProvider({
20
20
  delayDuration,
21
21
  ...props
22
- }: React.ComponentProps<typeof Tooltip$1.Provider>): react299.JSX.Element;
22
+ }: React.ComponentProps<typeof Tooltip$1.Provider>): react223.JSX.Element;
23
23
  /**
24
24
  * Floating label that reveals supplementary text when the user hovers or focuses its trigger element.
25
25
  *
@@ -38,18 +38,18 @@ declare function TooltipProvider({
38
38
  */
39
39
  declare function Tooltip({
40
40
  ...props
41
- }: React.ComponentProps<typeof Tooltip$1.Root>): react299.JSX.Element;
41
+ }: React.ComponentProps<typeof Tooltip$1.Root>): react223.JSX.Element;
42
42
  /** Element that opens the tooltip on hover/focus; use `asChild` to forward props to a custom child element. */
43
43
  declare function TooltipTrigger({
44
44
  ...props
45
- }: React.ComponentProps<typeof Tooltip$1.Trigger>): react299.JSX.Element;
45
+ }: React.ComponentProps<typeof Tooltip$1.Trigger>): react223.JSX.Element;
46
46
  /** Floating panel rendered in a portal that displays the tooltip text with a directional arrow. */
47
47
  declare function TooltipContent({
48
48
  className,
49
49
  sideOffset,
50
50
  children,
51
51
  ...props
52
- }: React.ComponentProps<typeof Tooltip$1.Content>): react299.JSX.Element;
52
+ }: React.ComponentProps<typeof Tooltip$1.Content>): react223.JSX.Element;
53
53
  //#endregion
54
54
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
55
55
  //# sourceMappingURL=tooltip.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "UI library for Lunas Enterprise",
5
5
  "type": "module",
6
6
  "author": {
@@ -1,2 +0,0 @@
1
- import{t as e}from"./button-BqxBQ4Kr.mjs";import{i as t,n,t as r}from"./tooltip-BMdzWaaH.mjs";import{t as i}from"./separator-yTKDuMWb.mjs";import{t as a}from"./close-BMhGSmGs.mjs";import{c as o,l as s,r as c,s as l,t as u}from"./dialog-jqiIqxlm.mjs";import{a as d,i as f,o as p,r as m,s as h,t as g}from"./command-Bvauothg.mjs";import{t as _}from"./checkbox-CJsl9OjF.mjs";import{t as v}from"./input-CKFQdvqY.mjs";import{a as y,i as b,t as x}from"./popover-BCzVvfnV.mjs";import{c as S,i as C,n as w,s as T,t as E}from"./select-C2Ro2wmj.mjs";import{t as D}from"./label-CE2m0U_j.mjs";import{t as O}from"./textarea-Cvdq7UAn.mjs";import{t as ee}from"./calendar-CHVujBHK.mjs";import{n as te,t as ne}from"./radio-group-CsmpBZTK.mjs";import{t as re}from"./text-editor-D182J9Y5.mjs";import{ArrowDownToLine as ie,AtSignIcon as ae,BanIcon as k,CalendarDaysIcon as oe,EyeIcon as se,EyeOffIcon as ce,HelpCircleIcon as le,InfoIcon as ue,Loader2Icon as de,PackagePlusIcon as fe,PlusIcon as pe,Trash2Icon as me,XIcon as he}from"lucide-react";import{memo as A,useCallback as j,useEffect as ge,useId as M,useMemo as N,useRef as P,useState as F}from"react";import{cn as I}from"@customafk/react-toolkit/utils";import{cva as _e}from"class-variance-authority";import{jsx as L,jsxs as R}from"react/jsx-runtime";import{endOfToday as z,endOfTomorrow as ve,endOfYesterday as ye,format as be,lastDayOfMonth as xe,startOfMonth as Se,subDays as Ce}from"@customafk/react-toolkit/date-fns";import{Dialog as B,Label as we,Separator as Te,Switch as Ee}from"radix-ui";import{createFormHook as De,createFormHookContexts as Oe,useStore as V}from"@tanstack/react-form";function ke({defaultRow:t,children:n,addLabel:r=`Add row`,className:i}){let a=Q(),o=a.state.value??[],s=j(()=>{a.pushValue({...t})},[a,t]),c=j(e=>{a.removeValue(e)},[a]);return R(`div`,{"data-slot":`simple-array-field`,className:I(`flex flex-col gap-2`,i),children:[o.map((e,t)=>R(`div`,{className:`flex items-start gap-2`,children:[n(t),L(`button`,{type:`button`,title:`Remove row`,className:`mt-auto mb-0.5 flex size-7 shrink-0 items-center justify-center rounded text-muted transition-colors hover:text-danger-strong`,onClick:()=>c(t),children:L(me,{size:14})})]},t)),L(`div`,{children:R(e,{type:`button`,variant:`ghost`,color:`muted`,size:`sm`,className:`gap-1.5`,onClick:s,children:[L(pe,{size:13}),r]})})]})}const Ae=_e([`flex w-fit items-center justify-center rounded-full font-bold text-text-negative-strong`],{variants:{color:{default:`bg-primary-strong`,secondary:`bg-secondary-strong`,success:`bg-success-strong`,info:`bg-info-strong`,warning:`bg-warning-strong`,danger:`border border-danger-strong bg-linear-to-b from-danger-strong/90 via-danger-strong to-danger-strong/90`},size:{xs:`px-1.5 py-0.5 text-xs`,sm:`px-2 py-0.75 text-xs`,md:`px-2.5 py-0.75 text-sm`,lg:`px-3 py-1 text-sm`}},defaultVariants:{color:`default`,size:`sm`}}),je=({label:e,color:t,size:n,className:r,children:i})=>L(`div`,{"data-slot":`required-indicator`,className:Ae({color:t,size:n,className:r}),children:e||i});function Me({className:e,children:t,...n}){return R(we.Root,{"data-slot":`label`,className:I(`text-text-positive`,`flex w-full items-center justify-between`,`select-none font-medium text-sm/6 leading-none`,`group-data-[disabled=true]:pointer-events-none`,`group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed`,`peer-disabled:opacity-50`,`aria-required:*:data-[slot=required-indicator]:inline-block`,e),...n,children:[L(`span`,{className:`flex items-center gap-1`,children:t}),L(je,{label:`Required`,color:`danger`,size:`xs`,className:`hidden shrink-0`})]})}const Ne=_e(`group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:gap-4`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-content]:basis-1/2`,`@md/field-group:*:data-[slot=field-content-main]:basis-1/2`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),Pe=A(({className:e,...t})=>L(`fieldset`,{"data-slot":`field-set`,className:I(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));Pe.displayName=`FieldSet`;const Fe=A(({className:e,variant:t=`legend`,...n})=>L(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:I(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n}));Fe.displayName=`FieldLegend`;const H=A(({className:e,...t})=>L(`div`,{"data-slot":`field-group`,className:I(`group/field-group @container/field-group`,`flex flex-col gap-7 pt-4`,`data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));H.displayName=`FieldGroup`;const U=A(({className:e,orientation:t=`vertical`,...n})=>L(`div`,{"data-slot":`field`,"data-orientation":t,className:I(Ne({orientation:t}),e),...n}));U.displayName=`Field`;const W=A(({className:e,...t})=>L(`div`,{"data-slot":`field-content`,className:I(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));W.displayName=`FieldContent`;const G=A(({className:e,...t})=>L(`div`,{"data-slot":`field-content-main`,className:I(`relative`,e),...t}));G.displayName=`FieldContentMain`;const K=A(({className:e,...t})=>L(Me,{"data-slot":`field-label`,className:I(`group/field-label peer/field-label min-h-6 gap-1 font-medium leading-snug`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`has-[>[data-slot=field]]:border-border`,`has-data-[state=checked]:border-primary`,`*:data-[slot=field]:p-4 group-data-[disabled=true]/field:opacity-50`,e),...t}));K.displayName=`FieldLabel`;const Ie=A(({className:e,...t})=>L(`div`,{"data-slot":`field-label`,className:I(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));Ie.displayName=`FieldTitle`;const q=A(({className:e,...t})=>L(`p`,{"data-slot":`field-description`,className:I(`nth-last-2:-mt-1 font-normal text-text-positive-weak text-xs leading-normal last:mt-0 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-variant=legend]+&]:-mt-1.5`,e),...t}));q.displayName=`FieldDescription`;const J=A(({isShow:e=!0,className:t,children:n,...r})=>e===!1?null:R(`div`,{"data-slot":`field-note`,className:I(`flex items-start gap-1.5 rounded border border-primary-muted/60 bg-primary-bg-subtle/80 px-2.5 py-2 text-text-positive-weak text-xs`,t),...r,children:[L(ue,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),L(`span`,{children:n})]}));J.displayName=`FieldNote`;const Y=A(({tooltip:e})=>R(r,{children:[L(t,{asChild:!0,children:R(`button`,{type:`button`,tabIndex:-1,className:`inline-flex cursor-default items-center text-text-positive-weak/70 hover:text-text-positive focus:outline-none`,children:[L(le,{size:13,"aria-hidden":`true`}),L(`span`,{className:`sr-only`,children:`More information`})]})}),L(n,{side:`top`,className:`max-w-xs text-balance`,children:e})]}));Y.displayName=`FieldTooltip`;const X=A(({children:e,className:t,...n})=>R(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:I(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,t),...n,children:[L(i,{className:`absolute inset-0 top-1/2`}),e&&L(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));X.displayName=`FieldSeparator`;const Z=A(({className:e,children:t,errors:n,...r})=>{let i=N(()=>t||(n?n?.length===1&&n[0]?.message?L(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:L(`p`,{children:n[0]?.code===`invalid_type`?`Invalid format`:n[0].message})}):L(`ul`,{className:`flex list-none flex-col`,children:n.map(e=>typeof e==`string`?L(`li`,{children:e},e):e?.message?L(`li`,{children:e.message},e.message):null)}):null),[t,n]);return i?L(`div`,{role:`alert`,"data-slot":`field-error`,className:I(`w-full font-medium text-danger-strong text-xs`,e),...r,children:i}):null});Z.displayName=`FieldError`;const Le=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=M(),{form:o,name:s,state:c,handleBlur:l,handleChange:u}=Q(),d=V(o.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=j(({target:{value:e}})=>{d||r&&e.length>r||u(e||null)},[d,r,u]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(D,{htmlFor:a,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(`div`,{className:`relative`,children:[L(v,{id:a,name:s,type:`email`,value:c.value??``,"aria-invalid":f,autoComplete:`email`,placeholder:t,disabled:i||d,className:I(`pl-9`),onBlur:l,onChange:p}),L(`div`,{className:`pointer-events-none absolute inset-y-0 left-0 flex size-9 items-center justify-center text-muted`,children:L(ae,{size:14})})]}),f&&L(Z,{errors:c.meta.errors})]})},Re=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,ze=e=>Number(e).toLocaleString(),Be=(e,t,n)=>{if(n===`none`)return e;let r=10**t,i=e*r;switch(n){case`up`:return Math.ceil(i)/r;case`down`:return Math.floor(i)/r;case`nearest`:return i%1<.1?Math.floor(i)/r:i%1>=.59?Math.ceil(i)/r:(Math.floor(i)+.5)/r;default:return e}},Ve=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:i=`none`,value:a=null,unitText:o,decimal:s,placeholder:c,precision:l,wrapperClassName:u,className:d,onChange:f,onValueChange:p,onFocus:m,onBlur:h,...g})=>{let _=P(null),y=P(null),[b,x]=F(a?.toString()??null),S=N(()=>s?.[1]??r,[s,r]),C=N(()=>s&&s[0]-s[1],[s]),w=N(()=>Re(n),[n]),T=j(e=>{if(!S||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=S&&r<=(C??1/0)},[S,C]),E=j(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=Be(parseFloat(e),Math.min(S-1,l||0),i).toString().split(`.`),r=ze(t);return n?`${r}.${n}`:r},[S,l,i]),D=j(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){p?.(0),x(e);return}if(n){x(()=>(p?.(0),e));return}},[p]),O=j(e=>{f?.(e);let{value:t}=e.target;if(t===``||t===void 0){p?.(null),x(null);return}D(t),!(!w.test(t)||!T(t))&&(p?.(parseFloat(t)||0),x(t))},[T,f,p,D,w]),ee=j(e=>{t||(m?.(e),x(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,m]),te=j(e=>{t||(h?.(e),x(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?E(e):null))},[t,E,h]);return ge(()=>{let e=document.activeElement===y.current;if(a==null||!w.test(a.toString())||!T(a.toString())){x(null);return}x(t=>e?t:E(a.toString()))},[E,a,T,w]),ge(()=>{if(!_.current||!y.current||!o)return;let e=_.current.offsetWidth;y.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[o]),R(`div`,{className:I(`relative`,u),children:[L(v,{...g,ref:y,value:b||(t?`0`:``),placeholder:c,disabled:e,readOnly:t,className:I(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,d),onChange:O,onFocus:ee,onBlur:te}),o&&L(`span`,{ref:_,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:o})]})},He=({label:e,placeholder:t,required:n,unit:r,allowNegative:i,disabled:a})=>{let o=M(),{form:s,state:c,handleBlur:l,handleChange:u}=Q(),d=V(s.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=j(e=>{d||u(e)},[d,u]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(D,{htmlFor:o,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(Ve,{id:o,value:c.value,placeholder:t,unitText:r,allowNegative:i,disabled:a||d,onBlur:l,onValueChange:p}),f&&L(Z,{errors:c.meta.errors})]})},Ue=({label:e,placeholder:t,required:n,disabled:r})=>{let i=M(),{form:a,name:o,state:s,handleBlur:c,handleChange:l}=Q(),u=V(a.store,({isSubmitting:e})=>e),[d,f]=F(!1),p=s.meta.isTouched&&!s.meta.isValid,m=j(()=>f(e=>!e),[]),h=j(({target:{value:e}})=>{u||l(e||null)},[u,l]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(D,{htmlFor:i,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(`div`,{className:`relative`,children:[L(v,{id:i,name:o,type:d?`text`:`password`,value:s.value??``,"aria-invalid":p,autoComplete:`current-password`,placeholder:t,disabled:r||u,className:`pr-9`,onBlur:c,onChange:h}),L(`button`,{type:`button`,tabIndex:-1,"aria-label":d?`Hide password`:`Show password`,"aria-pressed":d,"aria-controls":i,className:`absolute inset-y-0 right-0 flex size-9 items-center justify-center text-muted outline-none transition-colors hover:text-text-positive focus-visible:text-text-positive disabled:pointer-events-none disabled:opacity-50`,disabled:r||u,onClick:m,children:L(d?ce:se,{size:16,"aria-hidden":`true`})})]}),p&&L(Z,{errors:s.meta.errors})]})},We=({label:e,placeholder:t,required:n,options:r})=>{let i=M(),{state:a,handleBlur:o,handleChange:s}=Q(),c=a.meta.isTouched&&!a.meta.isValid;return R(`div`,{className:`flex flex-col gap-1.5`,children:[e&&R(D,{htmlFor:i,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(E,{value:a.value??``,onValueChange:s,children:[L(T,{id:i,"aria-invalid":c?`true`:void 0,onBlur:o,children:L(S,{placeholder:t})}),L(w,{children:r.length>0?r.map(e=>L(C,{value:e.value,children:e.label},e.value)):R(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[L(fe,{strokeWidth:1}),`No options available`]})})]}),c&&L(Z,{errors:a.meta.errors})]})},Ge=({label:e,placeholder:t,required:n,maxLength:r,rows:i,disabled:a})=>{let o=M(),{form:s,name:c,state:l,handleBlur:u,handleChange:d}=Q(),f=V(s.store,({isSubmitting:e})=>e),p=l.meta.isTouched&&!l.meta.isValid,m=j(({target:{value:e}})=>{f||r&&e.length>r||d(e||null)},[f,r,d]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(D,{htmlFor:o,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(O,{id:o,name:c,value:l.value??``,"aria-invalid":p,placeholder:t,rows:i,disabled:a||f,onBlur:u,onChange:m}),p&&L(Z,{errors:l.meta.errors})]})},Ke=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=M(),{form:o,name:s,state:c,handleBlur:l,handleChange:u}=Q(),d=V(o.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=j(({target:{value:e}})=>{d||r&&e.length>r||u(e||null)},[d,r,u]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(D,{htmlFor:a,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(v,{id:a,name:s,value:c.value??``,"aria-invalid":f,placeholder:t,autoComplete:`off`,disabled:i||d,onBlur:l,onChange:p}),f&&L(Z,{errors:c.meta.errors})]})},qe=({label:e,description:t,options:n,tooltip:r,helperText:i,orientation:a})=>{let o=Q(),s=V(o.form.store,({isSubmitting:e})=>e);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:a,children:[R(W,{children:[R(K,{children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t}),L(J,{isShow:!!i,children:i})]}),L(G,{children:L(H,{className:`flex flex-col gap-y-2`,children:n.map(e=>R(U,{orientation:`horizontal`,children:[L(_,{id:`${o.name}-${e.value}`,name:o.name,checked:o.state.value?.includes(e.value)??!1,disabled:s,onCheckedChange:t=>{if(t&&o.state.value!==null)o.pushValue(e.value);else if(t&&o.state.value===null)o.setValue([e.value]);else if(!t&&o.state.value!==null){let t=o.state.value.indexOf(e.value);t>-1&&o.removeValue(t)}else o.setValue(null)}}),L(K,{htmlFor:`${o.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),L(X,{})]})},Je=({label:t,description:n,placeholder:r,tooltip:i,orientation:a=`responsive`,options:o})=>{let s=Q(),c=N(()=>s.state.meta.isTouched&&!s.state.meta.isValid,[s.state.meta.isTouched,s.state.meta.isValid]),l=N(()=>s.state.meta.errors,[s.state.meta.errors]),u=o.find(({value:e})=>e===s.state.value)?.label;return R(H,{className:`px-4`,children:[R(U,{orientation:a,"data-invalid":c,children:[R(W,{children:[R(K,{htmlFor:s.name,children:[t,i&&L(Y,{tooltip:i})]}),L(q,{children:n})]}),L(G,{className:`flex justify-end`,children:R(`div`,{className:`flex w-full max-w-60 flex-col`,children:[R(x,{children:[L(y,{asChild:!0,children:L(e,{variant:`outline`,color:`muted`,size:`lg`,className:I(`flex items-center justify-start rounded outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!s.state.value&&`text-text-positive-muted`),children:u?L(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 text-start`,children:u}):L(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})})}),L(b,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,onBlur:s.handleBlur,children:R(g,{className:`border-none`,children:[L(d,{placeholder:r??`Search…`}),L(h,{children:L(f,{className:`max-h-40 overflow-y-auto`,children:o.map(({value:e,label:t})=>L(p,{value:t,onSelect:()=>s.handleChange(e),children:t},e))})}),L(m,{children:`No results found.`})]})})]}),L(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:L(Z,{errors:l})})]})})]}),L(X,{})]})},Ye=({label:t,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,minDate:s,maxDate:c,required:l})=>{let u=Q(),d=N(()=>l?u.state.value===null:!1,[l,u.state.value]),f=N(()=>u.state.meta.isTouched&&!u.state.meta.isValid,[u.state.meta.isTouched,u.state.meta.isValid]);return R(H,{className:`px-4`,children:[R(U,{orientation:i,"data-invalid":f,children:[R(W,{children:[R(K,{htmlFor:u.name,"aria-required":d,children:[t,a&&L(Y,{tooltip:a})]}),L(q,{children:n})]}),R(G,{className:`flex flex-col space-y-1`,children:[L(`div`,{className:`flex w-full flex-col`,children:R(x,{children:[L(y,{asChild:!0,children:R(e,{variant:`outline`,color:`muted`,size:`lg`,className:I(`flex items-center justify-between rounded font-normal outline-border`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,u.state.value===null&&`text-text-positive-muted`),children:[L(`p`,{children:u.state.value===null?r||`Select date`:be(u.state.value,`PPPP`)}),L(oe,{strokeWidth:1})]})}),R(b,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,onBlur:u.handleBlur,children:[R(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(z())},children:`Today`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(ve())},children:`Tomorrow`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(ye())},children:`Yesterday`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(Ce(z(),3))},children:`Last 3 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(Ce(z(),7))},children:`Last 7 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(Ce(z(),30))},children:`Last 30 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(Se(z()))},children:`This Month`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(xe(z()))},children:`Last Month`})]}),L(`div`,{className:`flex flex-1 flex-col`,children:L(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:L(ee,{mode:`single`,selected:u.state.value??void 0,hidden:{before:s??new Date(1900,0,1),after:c??new Date(2100,11,31)},onSelect:e=>{e&&u.handleChange(e)}})})})]})]})}),L(J,{isShow:!!o,children:o})]})]}),L(X,{})]})},Xe=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,required:s=!1,maxLength:c})=>{let{form:l,name:u,state:d,handleBlur:f,handleChange:p}=Q(),m=V(l.store,({isSubmitting:e})=>e),h=d.meta.isDirty&&d.meta.isTouched&&!d.meta.isValid,g=s&&d.value===null,_=!m&&!!d.value,y=j(({target:{value:e}})=>{m||c&&e.length>c||p(e||null)},[m,c,p]),b=j(()=>{m||p(null)},[m,p]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{"data-invalid":h,orientation:a,children:[R(W,{children:[R(K,{htmlFor:u,"aria-required":g,children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t})]}),R(G,{children:[L(v,{id:u,name:u,value:d.value===null?``:d.value,"aria-invalid":h,autoComplete:`email`,placeholder:n,className:I(`pl-9`,_&&`pr-9`,m&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:f,onChange:y}),L(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:L(ae,{size:14})}),_&&L(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-strong`,onClick:b,children:L(he,{size:14,"aria-hidden":`true`})}),L(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&d.meta.isDirty&&L(Z,{errors:d.meta.errors})}),L(J,{isShow:!!i,children:i})]})]}),L(X,{})]})},Ze=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,orientation:a=`responsive`,showErrorMessage:o=!0,rounding:s,decimalPlaces:c,percision:l,unit:u,required:d,allowNegative:f})=>{let p=Q(),m=V(p.form.store,({isSubmitting:e})=>e),h=p.state.meta.errors,g=d?p.state.value===null:!1,_=j(e=>{m||p.handleChange(e)},[m,p.handleChange]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:a,"data-invalid":p.state.meta.isTouched&&!p.state.meta.isValid,children:[R(W,{children:[R(K,{htmlFor:p.name,"aria-required":g,children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t})]}),R(G,{children:[R(`div`,{className:`relative w-full`,children:[L(Ve,{id:p.name,value:p.state.value,"aria-invalid":p.state.meta.isTouched&&!p.state.meta.isValid&&p.state.meta.isDirty,placeholder:n,roundingRule:s,numberAfterDecimalPoint:c,precision:l,unitText:u,allowNegative:f,className:I(m&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:p.handleBlur,onValueChange:_}),m&&L(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.5 text-muted-weak [&>svg]:size-3.5`,children:L(de,{className:`animate-spin text-primary-strong`})}),p.state.meta.isDirty&&o&&!!h.length&&L(`div`,{className:`absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:L(k,{})}),L(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:p.state.meta.isDirty&&o&&L(Z,{errors:h})})]}),L(J,{isShow:!!i,children:i})]})]}),L(X,{})]})},Qe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=M(),{form:c,name:l,state:u,handleBlur:d,handleChange:f}=Q(),p=V(c.store,({isSubmitting:e})=>e),[m,h]=F(!1),g=u.meta.isDirty&&u.meta.isTouched&&!u.meta.isValid,_=j(()=>h(e=>!e),[]),y=j(({target:{value:e}})=>{p||f(e||null)},[p,f]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{"data-invalid":g,orientation:r,children:[R(W,{children:[R(K,{htmlFor:s,children:[e,i&&L(Y,{tooltip:i})]}),L(q,{children:t})]}),R(G,{children:[L(v,{id:s,name:l,type:m?`text`:`password`,placeholder:n,value:u.value??``,"aria-invalid":g,autoComplete:`new-password`,onBlur:d,onChange:y}),L(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:_,"aria-label":m?`Hide password`:`Show password`,"aria-pressed":m,"aria-controls":s,children:L(m?ce:se,{size:16,"aria-hidden":`true`})}),L(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:o&&u.meta.isDirty&&L(Z,{errors:u.meta.errors})}),L(J,{isShow:!!a,children:a})]})]}),L(X,{})]})},$e=({label:e,description:t,orientation:n,options:r,tooltip:i,helperText:a})=>{let o=Q(),s=V(o.form.store,({isSubmitting:e})=>e);return R(H,{className:`px-4`,children:[R(U,{orientation:n,className:`flex-col gap-2`,children:[R(W,{children:[R(K,{children:[e,i&&L(Y,{tooltip:i})]}),L(q,{children:t}),L(J,{isShow:!!a,children:a})]}),L(G,{children:L(ne,{value:o.state.value??``,className:`w-full`,onValueChange:o.handleChange,children:r.map(e=>L(K,{className:I(`h-fit`,o.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,s&&`pointer-events-none bg-muted-muted opacity-60`,o.state.value===e.value&&s&&`border-border-strong!`),children:R(U,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[L(te,{value:e.value,className:`mt-0.5 shrink-0`}),R(W,{className:`gap-0.5!`,children:[L(Ie,{children:e.label}),L(q,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),L(X,{})]})},et=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:a,helperText:o,required:s=!1})=>{let c=Q(),l=c.state.meta.isTouched&&!c.state.meta.isValid,u=s&&c.state.value===null,d=c.state.meta.errors;return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:r,"data-invalid":l,children:[R(W,{children:[R(K,{htmlFor:c.name,"aria-required":u,children:[e,i&&L(Y,{tooltip:i})]}),L(q,{children:t})]}),R(G,{className:`flex flex-col`,children:[R(E,{value:c.state.value??``,onValueChange:c.handleChange,children:[L(T,{"aria-invalid":l?`true`:void 0,onBlur:c.handleBlur,children:L(S,{placeholder:n})}),R(w,{children:[!!a.length&&a.map(e=>L(C,{value:e.value,children:e.label},e.value)),!a.length&&R(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[L(fe,{strokeWidth:1}),`No options available`]})]})]}),L(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:L(Z,{errors:d})}),L(J,{isShow:!!o,children:o})]})]}),L(X,{})]})};function tt({className:e,...t}){return L(Ee.Root,{"data-slot":`switch`,className:I(`peer`,`w-8 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-all`,`inline-flex h-5`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-4`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`-outline-offset-1 inset-shadow-2xs outline-1`,`data-[state=checked]:bg-primary`,`data-[state=checked]:outline-primary-strong`,`data-[state=unchecked]:bg-muted-weak`,`data-[state=unchecked]:outline-border`,`data-[state=unchecked]:[&_span]:size-4`,`data-[state=unchecked]:[&_span]:translate-x-0.5`,`data-[state=unchecked]:[&_span]:rtl:-translate-x-0.5`,e),...t,children:L(Ee.Thumb,{"data-slot":`switch-thumb`,className:I(`block size-4 bg-card shadow-xs`,`pointer-events-none rounded-full ring-0 transition-transform`,`data-[state=checked]:translate-x-[calc(100%-3px)]`,`data-[state=unchecked]:translate-x-0`)})})}const nt=({label:e,description:t,helperText:n})=>{let r=Q();return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[R(W,{children:[L(Ie,{className:`cursor-pointer`,children:L(`label`,{htmlFor:r.name,children:e})}),L(q,{children:t}),L(tt,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),L(J,{isShow:!!n,children:n})]}),L(X,{})]})},rt=({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showClearButton:s=!1,showErrorMessage:c=!0,required:l=!1,maxLength:u})=>{let d=M(),f=P(null),{form:p,name:m,state:h,handleBlur:g,handleChange:_}=Q(),y=V(p.store,({isSubmitting:e})=>e),b=s&&!y&&!!h.value,x=h.value?h.value.length:0,S=N(()=>{if(!a)return``;let e=`character${[0,1].includes(x)?``:`s`}`;return a&&u?`${x} / ${u} character${x?`s`:``}`:`${x} ${e}`},[x,a,u]),C=h.meta.isDirty&&h.meta.isTouched&&!h.meta.isValid,w=l&&h.value===null,T=u&&x>=u*.8,E=u&&x>=u,D=j(({target:{value:e}})=>{y||a&&u&&e.length>u||_(e||null)},[y,a,u,_]),O=j(()=>{y||(_(null),f.current?.focus())},[y,_]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:o,"data-invalid":C,children:[R(W,{children:[R(K,{"aria-required":w,htmlFor:d,children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t})]}),R(G,{children:[L(v,{ref:f,id:d,name:m,value:h.value??``,"aria-invalid":C,autoComplete:`off`,placeholder:n,autoCapitalize:`none`,autoCorrect:`off`,className:I(`pr-6`,y&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:g,onChange:D}),b&&L(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-e-0 inset-y-0 top-3 flex h-fit w-8 cursor-pointer items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:text-text-positive-intense [&>svg]:size-3.5`,onClick:O,children:L(he,{"aria-hidden":`true`})}),y&&L(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:L(de,{size:14,className:`animate-spin text-primary-strong`})}),!b&&h.meta.isDirty&&c&&!!h.meta.errors.length&&L(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:L(k,{"aria-hidden":`true`,size:14})}),R(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[h.meta.isDirty&&c?L(Z,{className:`flex-1`,errors:h.meta.errors}):L(`div`,{}),!!a&&L(`p`,{className:I(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,E?`font-medium text-danger-strong`:T?`text-warning-strong`:`text-text-positive-weak`),children:S})]}),L(J,{isShow:!!i,children:i})]})]}),L(X,{})]})},it=A(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,counter:a=!1,orientation:o=`responsive`,showErrorMessage:s=!0,required:c=!1,maxLength:l})=>{let u=M(),{form:d,state:f,name:p,handleBlur:m,handleChange:h}=Q(),g=V(d.store,({isSubmitting:e})=>e),_=f.value?f.value.length:0,v=N(()=>{if(!a)return``;let e=`character${[0,1].includes(_)?``:`s`}`;return a&&l?`${_} / ${l} character${_?`s`:``}`:`${_} ${e}`},[_,a,l]),y=f.meta.isDirty&&f.meta.isTouched&&!f.meta.isValid,b=c&&f.value===null,x=f.meta.errors,S=l&&_>=l*.8,C=l&&_>=l,w=j(({target:{value:e}})=>{g||a&&l&&e.length>l||h(e||null)},[g,a,l,h]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:o,"data-invalid":y,children:[R(W,{children:[R(K,{"aria-required":b,htmlFor:u,children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t})]}),R(G,{children:[L(O,{id:u,name:p,value:f.value===null?``:f.value,"aria-invalid":y,autoCapitalize:`none`,autoComplete:`off`,placeholder:n,className:I(g&&`pointer-events-none bg-muted-muted opacity-60`),onChange:w,onBlur:m}),g&&L(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:L(de,{size:14,className:`animate-spin text-primary-strong`})}),f.meta.isDirty&&s&&!!x.length&&L(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-danger-strong`,children:L(k,{size:14})}),R(`div`,{className:`my-1 flex w-full items-start justify-between gap-x-2`,children:[f.meta.isDirty&&s?L(Z,{className:`flex-1`,errors:f.meta.errors}):L(`div`,{}),!!a&&L(`p`,{className:I(`h-4 flex-0 text-nowrap text-end text-xs tabular-nums transition-colors`,C?`font-medium text-danger-strong`:S?`text-warning-strong`:`text-text-positive-weak`),children:v})]}),L(J,{isShow:!!i,children:i})]})]}),L(X,{})]})});it.displayName=`TextareaField`;const at=A(({label:e,description:t,placeholder:n,tooltip:r,helperText:i,showErrorMessage:a=!0,required:o=!1})=>{let{form:s,state:c,handleChange:l}=Q(),u=V(s.store,({isSubmitting:e})=>e),d=c.meta.isDirty&&c.meta.isTouched&&!c.meta.isValid,f=o&&c.value===null,p=j(e=>{u||l(e||null)},[u,l]);return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:`vertical`,"data-invalid":d,children:[R(W,{children:[R(K,{"aria-required":f,children:[e,r&&L(Y,{tooltip:r})]}),L(q,{children:t})]}),L(re,{value:c.value??``,placeholder:n,readOnly:u,onChange:p}),c.meta.isDirty&&a&&!!c.meta.errors.length&&L(Z,{errors:c.meta.errors}),L(J,{isShow:!!i,children:i})]}),L(X,{})]})});at.displayName=`TextEditorField`;const ot=({label:t,className:n})=>{let r=$(),i=j(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return L(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:a})=>L(e,{type:`button`,size:`md`,disabled:r,isLoading:a,className:I(`min-h-8 min-w-32`,n),onClick:i,children:t??`Submit`})})},st=({type:t=`create`})=>{let n=$();return R(`div`,{className:`flex h-8 items-center justify-between`,children:[L(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:t})=>L(e,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:t,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Cancel`})}),t===`create`&&L(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:t,isSubmitting:r})=>R(e,{type:`submit`,size:`md`,disabled:t,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[L(pe,{}),`Add New`]})}),t===`update`&&L(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:t,isSubmitting:r})=>R(e,{type:`submit`,size:`md`,disabled:t,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[L(ie,{}),`Update`]})})]})};function ct({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return L(Te.Root,{"data-slot":`separator`,decorative:n,orientation:t,className:I(`shrink-0 bg-border-weak`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...r})}const lt=({title:t,description:n,onDelete:r,children:i})=>R(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-1 ring-border`,children:[R(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-0.5 px-4 py-3`,children:[L(`p`,{className:`font-semibold text-base tracking-tight`,children:t}),!!n&&L(`p`,{className:`text-text-positive-weak text-sm`,children:n})]}),L(ct,{}),L(`div`,{"data-slot":`card-form-main`,className:`flex flex-col py-4`,children:i}),!!r&&R(e,{color:`danger`,variant:`ghost`,size:`sm`,className:`absolute top-2.5 right-3`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[L(me,{}),`Remove`]})]}),ut=({children:e})=>L(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),dt=({disabled:t,className:n,onClick:r,children:i})=>L(e,{type:`button`,variant:`outline`,color:`muted`,disabled:t,className:I(`min-w-40`,n),onClick:r,children:i??`Cancel`}),ft=({isSubmitting:t,submitText:n=`Submit`,disabled:r,className:i,onClick:a})=>L(e,{type:`button`,isLoading:t,disabled:r||t,className:I(`min-w-40`,i),onClick:a,children:n}),pt=({title:e,submitText:t,className:n,open:r,onOpenChange:a,children:d})=>{let f=$(),p=j(e=>{e||f.reset(),a?.(e)},[f.reset,a]);return L(u,{open:r,onOpenChange:p,children:R(o,{"data-slot":`dialog-portal`,children:[L(l,{}),R(c,{className:I(`flex size-full max-h-dvh max-w-dvw flex-col gap-0 overflow-y-auto p-0 shadow-dialog sm:h-auto sm:max-h-[85dvh] sm:max-w-5xl sm:rounded-md`,n),children:[L(`div`,{"data-slot":`dialog-header`,className:`flex items-center justify-center gap-2 px-6 py-5 text-center sm:text-left`,children:L(s,{"data-slot":`dialog-title`,className:`text-lg font-semibold tracking-tight`,children:e})}),L(i,{}),L(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col overflow-y-auto p-0 pt-4 max-sm:flex-1 sm:p-4`,children:d}),L(i,{}),R(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-end gap-2 px-6 py-4 sm:flex-row max-sm:[&>button]:w-full`,children:[L(f.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>L(dt,{disabled:e,onClick:()=>{f.reset(),p(!1)}})}),L(f.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>L(ft,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>f.handleSubmit()})})]})]})]})})},mt=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:r,children:[R(W,{children:[L(K,{children:e}),L(q,{children:t})]}),R(G,{children:[i,L(J,{isShow:!!n,children:n})]})]}),L(X,{})]}),ht=({title:e,open:t,contentClassName:n,onOpenChange:r,children:i})=>{let o=$();return L(B.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,children:R(B.Portal,{"data-slot":`dialog-portal`,children:[L(B.Overlay,{"data-slot":`dialog-overlay`,className:I(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),L(B.Content,{"data-slot":`dialog-content`,className:I(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:R(`section`,{className:`relative flex size-full flex-col`,children:[L(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:L(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:e})}),L(`div`,{className:I(`flex flex-1 flex-col overflow-y-auto py-4`,n),children:i}),R(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[L(o.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>L(ft,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),L(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>L(dt,{disabled:e,className:`w-full`,onClick:()=>{o.reset(),r?.(!1)}})})]}),L(B.Close,{asChild:!0,children:L(a,{className:`absolute top-2.5 right-3`})})]})})]})})},gt=({children:e})=>L(`header`,{"data-slot":`section-header`,className:`flex items-center px-4 py-3 font-semibold text-base text-text-positive tracking-tight`,children:e}),_t=({children:e})=>L(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),vt=({title:e,children:t})=>R(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-1 ring-border`,children:[L(gt,{children:e}),L(ct,{}),L(_t,{children:t})]}),yt=({title:e,description:t,helperText:n})=>R(H,{className:`gap-y-4 px-4`,children:[R(U,{className:`gap-0`,children:[R(W,{children:[L(Fe,{className:`mb-1`,children:e}),L(q,{children:t})]}),L(J,{isShow:!!n,children:n})]}),L(X,{})]}),{fieldContext:bt,formContext:xt,useFieldContext:Q,useFormContext:$}=Oe(),{useAppForm:St,withForm:Ct,withFieldGroup:wt}=De({fieldContext:bt,formContext:xt,fieldComponents:{TextField:rt,TextareaField:it,TextEditorField:at,NumberField:Ze,EmailField:Xe,PasswordField:Qe,SelectField:et,ComboboxField:Je,DateField:Ye,SwitchField:nt,RadioGroupField:$e,CheckboxField:qe,SimpleTextField:Ke,SimpleEmailField:Le,SimplePasswordField:Ue,SimpleTextareaField:Ge,SimpleNumberField:He,SimpleSelectField:We,SimpleArrayField:ke,FieldGroup:H,Field:U,FieldContent:W,FieldLabel:K,FieldContentMain:G,FieldSeparator:X,FieldError:Z},formComponents:{TanStackDialogForm:pt,TanStackPopoverForm:ht,TanStackContainerForm:ut,TanStackSectionForm:vt,TanStackCardForm:lt,TanStackFieldGroup:mt,TanStackTitleField:yt,TanStackActionsForm:st,TanStackActionSubmit:ot}});export{Ct as a,G as c,K as d,X as f,wt as i,Z as l,St as n,U as o,$ as r,W as s,Q as t,H as u};
2
- //# sourceMappingURL=tanstack-form-Bi87PL6v.mjs.map