@customafk/lunas-ui 0.2.31 → 0.2.32

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 (174) hide show
  1. package/dist/{alert-BKRyykI5.d.mts → alert-CqRM6LFa.d.cts} +7 -7
  2. package/dist/{alert-CfoYnzYT.d.cts → alert-hSQjkSHn.d.mts} +6 -6
  3. package/dist/{badge-C-TqojsV.d.cts → badge-BNlMwt54.d.mts} +6 -6
  4. package/dist/{badge-Fh-imaPO.d.mts → badge-BXCkfLW0.d.cts} +6 -6
  5. package/dist/{button-CTv_kWgp.d.mts → button-DhUjRe5e.d.mts} +7 -7
  6. package/dist/{button-pXrQPrMJ.d.cts → button-xc_1ixgJ.d.cts} +5 -5
  7. package/dist/data-display/statistic.d.cts +3 -3
  8. package/dist/{dialog-s-gvSnQT.d.cts → dialog-KxgG7gFA.d.mts} +12 -12
  9. package/dist/{dialog-Cq-YQhmY.d.mts → dialog-gZTogunf.d.cts} +12 -12
  10. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +26 -26
  11. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
  12. package/dist/features/descriptions/index.d.cts +1 -1
  13. package/dist/features/descriptions/index.d.mts +6 -6
  14. package/dist/features/search-modal/index.d.cts +2 -2
  15. package/dist/features/tables/index.d.cts +1 -1
  16. package/dist/features/tables/index.d.mts +2 -2
  17. package/dist/features/tanstack-form/index.cjs +1 -1
  18. package/dist/features/tanstack-form/index.d.cts +1 -1
  19. package/dist/features/tanstack-form/index.d.mts +1 -1
  20. package/dist/features/tanstack-form/index.mjs +1 -1
  21. package/dist/features/text-editor/index.d.mts +1 -1
  22. package/dist/{index-utmg5trk.d.cts → index-22flsTNt.d.cts} +2 -2
  23. package/dist/{index-D3hB1UbV.d.cts → index-DDPBbVVt.d.cts} +365 -365
  24. package/dist/{index-D9FfDlcA.d.mts → index-DdqgMofm.d.mts} +2 -2
  25. package/dist/{index-U8LjVt0l.d.mts → index-WCk8mTXV.d.mts} +367 -367
  26. package/dist/{index-DMV3Z1bC.d.mts → index-cSJtvD9W.d.mts} +4 -4
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.cts +7 -7
  29. package/dist/index.d.mts +8 -8
  30. package/dist/index.mjs +1 -1
  31. package/dist/{input-CafwzEO-.d.mts → input-BILuHVfC.d.mts} +3 -3
  32. package/dist/{input-CbP10SLj.d.cts → input-CEYWz7lS.d.cts} +5 -5
  33. package/dist/layouts/flex.d.cts +5 -5
  34. package/dist/layouts/flex.d.mts +5 -5
  35. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  36. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  37. package/dist/pages/FeatureFixing.d.cts +2 -2
  38. package/dist/pages/FeatureFixing.d.mts +2 -2
  39. package/dist/pages/LoginPage.cjs +1 -1
  40. package/dist/pages/LoginPage.cjs.map +1 -1
  41. package/dist/pages/LoginPage.d.cts +2 -2
  42. package/dist/pages/LoginPage.d.mts +2 -2
  43. package/dist/pages/LoginPage.mjs +1 -1
  44. package/dist/pages/LoginPage.mjs.map +1 -1
  45. package/dist/pages/NotAuthorized.d.cts +2 -2
  46. package/dist/pages/NotAuthorized.d.mts +2 -2
  47. package/dist/pages/NotFound.d.cts +2 -2
  48. package/dist/pages/NotFound.d.mts +2 -2
  49. package/dist/pages/RegisterPage.cjs +1 -1
  50. package/dist/pages/RegisterPage.cjs.map +1 -1
  51. package/dist/pages/RegisterPage.d.cts +2 -2
  52. package/dist/pages/RegisterPage.d.mts +2 -2
  53. package/dist/pages/RegisterPage.mjs +1 -1
  54. package/dist/pages/RegisterPage.mjs.map +1 -1
  55. package/dist/pages/VerifyEmailPage.cjs +1 -1
  56. package/dist/pages/VerifyEmailPage.cjs.map +1 -1
  57. package/dist/pages/VerifyEmailPage.d.cts +2 -2
  58. package/dist/pages/VerifyEmailPage.d.mts +2 -2
  59. package/dist/pages/VerifyEmailPage.mjs +1 -1
  60. package/dist/pages/VerifyEmailPage.mjs.map +1 -1
  61. package/dist/tanstack-form-Be6aIYAW.mjs +2 -0
  62. package/dist/tanstack-form-Be6aIYAW.mjs.map +1 -0
  63. package/dist/tanstack-form-CDgTokmf.cjs +2 -0
  64. package/dist/tanstack-form-CDgTokmf.cjs.map +1 -0
  65. package/dist/typography/paragraph.d.cts +5 -5
  66. package/dist/typography/paragraph.d.mts +5 -5
  67. package/dist/ui/alert-dialog.d.cts +12 -12
  68. package/dist/ui/alert-dialog.d.mts +12 -12
  69. package/dist/ui/alert.d.cts +1 -1
  70. package/dist/ui/alert.d.mts +1 -1
  71. package/dist/ui/aspect-ratio.d.cts +2 -2
  72. package/dist/ui/aspect-ratio.d.mts +2 -2
  73. package/dist/ui/avatar.d.cts +4 -4
  74. package/dist/ui/avatar.d.mts +4 -4
  75. package/dist/ui/badge.d.cts +1 -1
  76. package/dist/ui/badge.d.mts +1 -1
  77. package/dist/ui/breadcrumb.d.cts +8 -8
  78. package/dist/ui/breadcrumb.d.mts +8 -8
  79. package/dist/ui/button-group.d.cts +4 -4
  80. package/dist/ui/button-group.d.mts +6 -6
  81. package/dist/ui/button.d.cts +1 -1
  82. package/dist/ui/button.d.mts +1 -1
  83. package/dist/ui/calendar.d.cts +4 -4
  84. package/dist/ui/calendar.d.mts +4 -4
  85. package/dist/ui/card.d.cts +8 -8
  86. package/dist/ui/card.d.mts +8 -8
  87. package/dist/ui/carousel.d.cts +7 -7
  88. package/dist/ui/carousel.d.mts +7 -7
  89. package/dist/ui/checkbox.d.cts +2 -2
  90. package/dist/ui/checkbox.d.mts +2 -2
  91. package/dist/ui/collapsible.d.cts +4 -4
  92. package/dist/ui/collapsible.d.mts +4 -4
  93. package/dist/ui/command.d.cts +11 -11
  94. package/dist/ui/command.d.mts +11 -11
  95. package/dist/ui/context-menu.d.cts +16 -16
  96. package/dist/ui/context-menu.d.mts +16 -16
  97. package/dist/ui/dialog.d.cts +1 -1
  98. package/dist/ui/dialog.d.mts +1 -1
  99. package/dist/ui/drawer.d.cts +11 -11
  100. package/dist/ui/drawer.d.mts +11 -11
  101. package/dist/ui/dropdown-menu.d.cts +16 -16
  102. package/dist/ui/dropdown-menu.d.mts +16 -16
  103. package/dist/ui/empty.d.cts +9 -9
  104. package/dist/ui/empty.d.mts +9 -9
  105. package/dist/ui/field.d.cts +21 -21
  106. package/dist/ui/field.d.mts +23 -23
  107. package/dist/ui/file-uploader.d.cts +2 -2
  108. package/dist/ui/file-uploader.d.mts +2 -2
  109. package/dist/ui/form.d.cts +10 -10
  110. package/dist/ui/form.d.mts +10 -10
  111. package/dist/ui/hover-card.d.cts +4 -4
  112. package/dist/ui/hover-card.d.mts +4 -4
  113. package/dist/ui/input-otp.d.cts +5 -5
  114. package/dist/ui/input-otp.d.mts +5 -5
  115. package/dist/ui/input.d.cts +1 -1
  116. package/dist/ui/input.d.mts +1 -1
  117. package/dist/ui/inputs/search-input.d.cts +3 -3
  118. package/dist/ui/inputs/search-input.d.mts +3 -3
  119. package/dist/ui/item.d.cts +11 -11
  120. package/dist/ui/item.d.mts +14 -14
  121. package/dist/ui/label.d.cts +2 -2
  122. package/dist/ui/label.d.mts +2 -2
  123. package/dist/ui/menubar.d.cts +17 -17
  124. package/dist/ui/menubar.d.mts +17 -17
  125. package/dist/ui/multi-select.d.cts +2 -2
  126. package/dist/ui/multi-select.d.mts +3 -3
  127. package/dist/ui/navigation-menu.d.cts +11 -11
  128. package/dist/ui/navigation-menu.d.mts +11 -11
  129. package/dist/ui/pagination.d.cts +9 -9
  130. package/dist/ui/pagination.d.mts +9 -9
  131. package/dist/ui/popover.d.cts +6 -6
  132. package/dist/ui/popover.d.mts +6 -6
  133. package/dist/ui/progress.d.cts +2 -2
  134. package/dist/ui/progress.d.mts +2 -2
  135. package/dist/ui/radio-group.d.cts +3 -3
  136. package/dist/ui/radio-group.d.mts +3 -3
  137. package/dist/ui/resizable.d.cts +9 -9
  138. package/dist/ui/resizable.d.mts +9 -9
  139. package/dist/ui/scroll-area.d.cts +5 -5
  140. package/dist/ui/scroll-area.d.mts +5 -5
  141. package/dist/ui/select.d.cts +9 -9
  142. package/dist/ui/select.d.mts +9 -9
  143. package/dist/ui/separator.d.cts +2 -2
  144. package/dist/ui/separator.d.mts +2 -2
  145. package/dist/ui/sheet.d.cts +9 -9
  146. package/dist/ui/sheet.d.mts +9 -9
  147. package/dist/ui/sidebar.d.cts +26 -26
  148. package/dist/ui/sidebar.d.mts +2 -2
  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/textarea.d.cts +2 -2
  163. package/dist/ui/textarea.d.mts +2 -2
  164. package/dist/ui/toggle-group.d.cts +3 -3
  165. package/dist/ui/toggle-group.d.mts +3 -3
  166. package/dist/ui/toggle.d.cts +2 -2
  167. package/dist/ui/toggle.d.mts +2 -2
  168. package/dist/ui/tooltip.d.cts +5 -5
  169. package/dist/ui/tooltip.d.mts +5 -5
  170. package/package.json +1 -1
  171. package/dist/tanstack-form-BZAJHNCZ.mjs +0 -2
  172. package/dist/tanstack-form-BZAJHNCZ.mjs.map +0 -1
  173. package/dist/tanstack-form-BgRAJ1Zn.cjs +0 -2
  174. package/dist/tanstack-form-BgRAJ1Zn.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import * as react184 from "react";
1
+ import * as react170 from "react";
2
2
 
3
3
  //#region packages/components/ui/table.d.ts
4
4
 
@@ -29,45 +29,45 @@ import * as react184 from "react";
29
29
  * </Table>
30
30
  * ```
31
31
  */
32
- declare const Table: react184.MemoExoticComponent<({
32
+ declare const Table: react170.MemoExoticComponent<({
33
33
  className,
34
34
  ...props
35
- }: React.ComponentProps<"table">) => react184.JSX.Element>;
35
+ }: React.ComponentProps<"table">) => react170.JSX.Element>;
36
36
  /** The `<thead>` element containing one or more header rows. */
37
- declare const TableHeader: react184.MemoExoticComponent<({
37
+ declare const TableHeader: react170.MemoExoticComponent<({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<"thead">) => react184.JSX.Element>;
40
+ }: React.ComponentProps<"thead">) => react170.JSX.Element>;
41
41
  /** The `<tbody>` element containing data rows with hover and selection styling. */
42
- declare const TableBody: react184.MemoExoticComponent<({
42
+ declare const TableBody: react170.MemoExoticComponent<({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<"tbody">) => react184.JSX.Element>;
45
+ }: React.ComponentProps<"tbody">) => react170.JSX.Element>;
46
46
  /** The `<tfoot>` element for summary or aggregate rows at the bottom of the table. */
47
- declare const TableFooter: react184.MemoExoticComponent<({
47
+ declare const TableFooter: react170.MemoExoticComponent<({
48
48
  className,
49
49
  ...props
50
- }: React.ComponentProps<"tfoot">) => react184.JSX.Element>;
50
+ }: React.ComponentProps<"tfoot">) => react170.JSX.Element>;
51
51
  /** A single `<tr>` row used inside TableHeader, TableBody, or TableFooter. */
52
- declare const TableRow: react184.MemoExoticComponent<({
52
+ declare const TableRow: react170.MemoExoticComponent<({
53
53
  className,
54
54
  ...props
55
- }: React.ComponentProps<"tr">) => react184.JSX.Element>;
55
+ }: React.ComponentProps<"tr">) => react170.JSX.Element>;
56
56
  /** A `<th>` column header cell with medium-weight text and left alignment. */
57
- declare const TableHead: react184.MemoExoticComponent<({
57
+ declare const TableHead: react170.MemoExoticComponent<({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<"th">) => react184.JSX.Element>;
60
+ }: React.ComponentProps<"th">) => react170.JSX.Element>;
61
61
  /** A standard `<td>` data cell used inside a TableRow. */
62
- declare const TableCell: react184.MemoExoticComponent<({
62
+ declare const TableCell: react170.MemoExoticComponent<({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<"td">) => react184.JSX.Element>;
65
+ }: React.ComponentProps<"td">) => react170.JSX.Element>;
66
66
  /** An accessible `<caption>` element displayed below the table. */
67
- declare const TableCaption: react184.MemoExoticComponent<({
67
+ declare const TableCaption: react170.MemoExoticComponent<({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<"caption">) => react184.JSX.Element>;
70
+ }: React.ComponentProps<"caption">) => react170.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 react283 from "react";
1
+ import * as react265 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: react265.MemoExoticComponent<({
33
33
  className,
34
34
  ...props
35
- }: React.ComponentProps<"table">) => react283.JSX.Element>;
35
+ }: React.ComponentProps<"table">) => react265.JSX.Element>;
36
36
  /** The `<thead>` element containing one or more header rows. */
37
- declare const TableHeader: react283.MemoExoticComponent<({
37
+ declare const TableHeader: react265.MemoExoticComponent<({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<"thead">) => react283.JSX.Element>;
40
+ }: React.ComponentProps<"thead">) => react265.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: react265.MemoExoticComponent<({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<"tbody">) => react283.JSX.Element>;
45
+ }: React.ComponentProps<"tbody">) => react265.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: react265.MemoExoticComponent<({
48
48
  className,
49
49
  ...props
50
- }: React.ComponentProps<"tfoot">) => react283.JSX.Element>;
50
+ }: React.ComponentProps<"tfoot">) => react265.JSX.Element>;
51
51
  /** A single `<tr>` row used inside TableHeader, TableBody, or TableFooter. */
52
- declare const TableRow: react283.MemoExoticComponent<({
52
+ declare const TableRow: react265.MemoExoticComponent<({
53
53
  className,
54
54
  ...props
55
- }: React.ComponentProps<"tr">) => react283.JSX.Element>;
55
+ }: React.ComponentProps<"tr">) => react265.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: react265.MemoExoticComponent<({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<"th">) => react283.JSX.Element>;
60
+ }: React.ComponentProps<"th">) => react265.JSX.Element>;
61
61
  /** A standard `<td>` data cell used inside a TableRow. */
62
- declare const TableCell: react283.MemoExoticComponent<({
62
+ declare const TableCell: react265.MemoExoticComponent<({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<"td">) => react283.JSX.Element>;
65
+ }: React.ComponentProps<"td">) => react265.JSX.Element>;
66
66
  /** An accessible `<caption>` element displayed below the table. */
67
- declare const TableCaption: react283.MemoExoticComponent<({
67
+ declare const TableCaption: react265.MemoExoticComponent<({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<"caption">) => react283.JSX.Element>;
70
+ }: React.ComponentProps<"caption">) => react265.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 react159 from "react";
1
+ import * as react213 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>): react159.JSX.Element;
26
+ }: React.ComponentProps<typeof Tabs$1.Root>): react213.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>): react159.JSX.Element;
31
+ }: React.ComponentProps<typeof Tabs$1.List>): react213.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>): react159.JSX.Element;
36
+ }: React.ComponentProps<typeof Tabs$1.Trigger>): react213.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>): react159.JSX.Element;
41
+ }: React.ComponentProps<typeof Tabs$1.Content>): react213.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 react311 from "react";
1
+ import * as react169 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
- }): react311.JSX.Element;
27
+ }): react169.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 react291 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
+ }): react291.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 react202 from "react";
2
+ import * as react274 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>): react202.JSX.Element;
28
+ }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react274.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>): react202.JSX.Element;
36
+ }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react274.JSX.Element;
37
37
  //#endregion
38
38
  export { ToggleGroup, ToggleGroupItem };
39
39
  //# sourceMappingURL=toggle-group.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import { toggleVariants } from "./toggle.mjs";
2
- import * as react280 from "react";
2
+ import * as react292 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>): react280.JSX.Element;
28
+ }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react292.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>): react280.JSX.Element;
36
+ }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react292.JSX.Element;
37
37
  //#endregion
38
38
  export { ToggleGroup, ToggleGroupItem };
39
39
  //# sourceMappingURL=toggle-group.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react215 from "react";
1
+ import * as react276 from "react";
2
2
  import * as class_variance_authority_types11 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Toggle as Toggle$1 } from "radix-ui";
@@ -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>): react215.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react276.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react274 from "react";
1
+ import * as react290 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import { Toggle as Toggle$1 } from "radix-ui";
4
4
  import * as class_variance_authority_types11 from "class-variance-authority/types";
@@ -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>): react274.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react290.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react281 from "react";
1
+ import * as react187 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>): react281.JSX.Element;
22
+ }: React.ComponentProps<typeof Tooltip$1.Provider>): react187.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>): react281.JSX.Element;
41
+ }: React.ComponentProps<typeof Tooltip$1.Root>): react187.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>): react281.JSX.Element;
45
+ }: React.ComponentProps<typeof Tooltip$1.Trigger>): react187.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>): react281.JSX.Element;
52
+ }: React.ComponentProps<typeof Tooltip$1.Content>): react187.JSX.Element;
53
53
  //#endregion
54
54
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
55
55
  //# sourceMappingURL=tooltip.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react276 from "react";
1
+ import * as react295 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>): react276.JSX.Element;
22
+ }: React.ComponentProps<typeof Tooltip$1.Provider>): react295.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>): react276.JSX.Element;
41
+ }: React.ComponentProps<typeof Tooltip$1.Root>): react295.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>): react276.JSX.Element;
45
+ }: React.ComponentProps<typeof Tooltip$1.Trigger>): react295.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>): react276.JSX.Element;
52
+ }: React.ComponentProps<typeof Tooltip$1.Content>): react295.JSX.Element;
53
53
  //#endregion
54
54
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
55
55
  //# sourceMappingURL=tooltip.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
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"./switch-DHsjxnFP.mjs";import{l as k,n as A,o as ee,r as te,t as ne}from"./drawer-j9wcVE50.mjs";import{t as re}from"./calendar-D8aRFw_F.mjs";import{n as ie,t as ae}from"./radio-group-KR6Ck-B9.mjs";import{t as oe}from"./textarea-D0-Gltw6.mjs";import{t as se}from"./text-editor-CqC44BkO.mjs";import{ArrowDownToLine as ce,AtSignIcon as le,BanIcon as ue,CalendarDaysIcon as de,ChevronDownIcon as fe,EyeIcon as pe,EyeOffIcon as me,HelpCircleIcon as he,InfoIcon as ge,Loader2Icon as _e,PackagePlusIcon as ve,PlusIcon as ye,Trash2Icon as be,XIcon as xe}from"lucide-react";import{memo as j,useCallback as M,useEffect as Se,useId as N,useMemo as P,useRef as Ce,useState as F}from"react";import{cn as I}from"@customafk/react-toolkit/utils";import{cva as we}from"class-variance-authority";import{Fragment as Te,jsx as L,jsxs as R}from"react/jsx-runtime";import{endOfToday as z,endOfTomorrow as Ee,endOfYesterday as De,format as Oe,lastDayOfMonth as ke,startOfMonth as Ae,subDays as je}from"@customafk/react-toolkit/date-fns";import{Dialog as B,Label as Me,Separator as Ne,Switch as Pe}from"radix-ui";import{useIsMobile as Fe}from"@customafk/react-toolkit/hooks/useMobile";import{createFormHook as Ie,createFormHookContexts as Le,useStore as V}from"@tanstack/react-form";function Re({width:e,className:t,children:n}){let r=e?{width:typeof e==`number`?`${e}px`:e,flexShrink:0}:{flex:1,minWidth:0};return L(`div`,{"data-slot":`array-col`,style:r,className:t,children:n})}function ze({className:e,children:t}){return R(`div`,{"data-slot":`array-header-row`,className:I(`mb-1 flex items-center gap-2 px-1 text-xs font-medium text-text-positive-weak`,e),children:[t,L(`div`,{className:`min-w-8 w-8 shrink-0`})]})}function Be({defaultRow:t,children:n,addLabel:r=`Add row`,className:i}){let a=Q(),o=a.state.value??[],s=M(()=>{a.pushValue({...t})},[a,t]),c=M(e=>{a.removeValue(e)},[a]);return R(`div`,{"data-slot":`simple-array-field`,className:I(`flex flex-col gap-2`,i),children:[o.map((t,r)=>R(`div`,{className:`flex items-start gap-2`,children:[n(r),L(e,{type:`button`,size:`icon`,variant:`ghost`,color:`danger`,className:`min-w-8`,onClick:()=>c(r),children:L(be,{size:14})})]},r)),L(`div`,{children:R(e,{type:`button`,variant:`outline`,color:`muted`,size:`xs`,onClick:s,children:[L(ye,{size:13}),r]})})]})}const Ve=we([`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`}}),He=({label:e,color:t,size:n,className:r,children:i})=>L(`div`,{"data-slot":`required-indicator`,className:Ve({color:t,size:n,className:r}),children:e||i});function Ue({className:e,children:t,...n}){return R(Me.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(He,{label:`Required`,color:`danger`,size:`xs`,className:`hidden shrink-0`})]})}const We=we(`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`}}),Ge=j(({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}));Ge.displayName=`FieldSet`;const Ke=j(({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}));Ke.displayName=`FieldLegend`;const H=j(({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=j(({className:e,orientation:t=`vertical`,...n})=>L(`div`,{"data-slot":`field`,"data-orientation":t,className:I(We({orientation:t}),e),...n}));U.displayName=`Field`;const W=j(({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=j(({className:e,...t})=>L(`div`,{"data-slot":`field-content-main`,className:I(`relative`,e),...t}));G.displayName=`FieldContentMain`;const K=j(({className:e,...t})=>L(Ue,{"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 qe=j(({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}));qe.displayName=`FieldTitle`;const q=j(({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=j(({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(ge,{size:12,className:`mt-0.5 shrink-0 text-primary/70`}),L(`span`,{children:n})]}));J.displayName=`FieldNote`;const Y=j(({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(he,{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=j(({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=j(({className:e,children:t,errors:n,...r})=>{let i=P(()=>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 Je=({label:e,required:t,disabled:n,variant:r=`checkbox`})=>{let i=N(),{form:a,name:o,state:s,handleBlur:c,handleChange:l}=Q(),u=V(a.store,({isSubmitting:e})=>e),d=s.meta.isTouched&&!s.meta.isValid,f=s.value??!1,p=n||u,m=M(e=>{u||l(e)},[u,l]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[R(`div`,{className:`flex items-center gap-2 h-9`,children:[L(r===`switch`?O:_,{id:i,name:o,checked:f,disabled:p,"aria-invalid":d,onBlur:c,onCheckedChange:m}),e&&R(D,{htmlFor:i,className:`cursor-pointer`,children:[e,t&&L(`span`,{className:`text-danger-strong`,children:`*`})]})]}),d&&L(Z,{errors:s.meta.errors})]})},Ye=({label:t,placeholder:n,required:r,disabled:i,options:a})=>{let o=N(),{form:s,name:c,state:l,handleBlur:u,handleChange:_}=Q(),v=V(s.store,({isSubmitting:e})=>e),S=Fe(),[C,w]=F(!1),T=l.meta.isTouched&&!l.meta.isValid,E=i||v,O=a.find(({value:e})=>e===l.value)?.label,A=R(g,{children:[L(d,{placeholder:n??`Search…`}),R(h,{children:[L(m,{children:`No results found.`}),L(f,{children:a.map(e=>L(p,{value:e.label,onSelect:()=>{_(e.value===l.value?null:e.value),w(!1)},children:e.label},e.value))})]})]});return S?R(`div`,{className:`flex flex-col gap-1.5`,children:[t&&R(D,{htmlFor:o,children:[t,r&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(e,{id:o,type:`button`,variant:`outline`,color:`muted`,disabled:E,"aria-invalid":T,className:I(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!l.value&&`text-text-positive-muted`,T&&`outline-danger bg-danger-bg-subtle`),onBlur:u,onClick:()=>w(!0),children:O??L(`span`,{className:`text-text-positive-muted`,children:n})}),L(ne,{open:C,onOpenChange:w,direction:`bottom`,children:R(te,{children:[L(ee,{children:L(k,{children:t??n??`Search…`})}),L(`div`,{className:`overflow-y-auto pb-safe-bottom`,children:A})]})}),T&&L(Z,{errors:l.meta.errors})]}):R(`div`,{className:`flex flex-col gap-1.5`,children:[t&&R(D,{htmlFor:o,children:[t,r&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(x,{children:[L(y,{asChild:!0,children:L(e,{id:o,variant:`outline`,color:`muted`,size:`lg`,disabled:E,"aria-invalid":T,className:I(`flex w-full items-center justify-start rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,!l.value&&`text-text-positive-muted`),children:O??L(`span`,{className:`text-text-positive-muted`,children:n})})}),L(b,{align:`start`,side:`bottom`,className:`w-[--radix-popover-trigger-width] p-0 rounded`,onBlur:u,children:A})]}),T&&L(Z,{errors:l.meta.errors})]})},Xe=({label:t,placeholder:n,required:r,disabled:i,minDate:a,maxDate:o})=>{let s=N(),{form:c,name:l,state:u,handleBlur:d,handleChange:f}=Q(),p=V(c.store,({isSubmitting:e})=>e),m=u.meta.isTouched&&!u.meta.isValid;return R(`div`,{className:`flex flex-col gap-1.5`,children:[t&&R(D,{htmlFor:s,children:[t,r&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(x,{children:[L(y,{asChild:!0,children:R(e,{id:s,variant:`outline`,color:`muted`,size:`lg`,disabled:i||p,"aria-invalid":m,className:I(`flex w-full items-center justify-between rounded outline-border font-normal`,`hover:bg-transparent`,`focus:outline-1 focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`data-[state=open]:outline-1 data-[state=open]:outline-primary-strong data-[state=open]:ring-4 data-[state=open]:ring-primary-weak`,u.value===null&&`text-text-positive-muted`),children:[L(`span`,{children:u.value?Oe(u.value,`PPP`):n??`Select date`}),L(de,{strokeWidth:1})]})}),L(b,{align:`start`,side:`bottom`,className:`w-fit p-0 rounded`,onBlur:d,children:L(re,{mode:`single`,selected:u.value??void 0,hidden:{before:a??new Date(1900,0,1),after:o??new Date(2100,11,31)},onSelect:e=>{e&&f(e)}})})]}),m&&L(Z,{errors:u.meta.errors})]})},Ze=({label:e,required:t,disabled:n,options:r,orientation:i=`vertical`})=>{let{form:a,name:o,state:s,handleBlur:c,handleChange:l}=Q(),u=V(a.store,({isSubmitting:e})=>e),d=s.meta.isTouched&&!s.meta.isValid,f=n||u;return R(`div`,{className:`flex flex-col gap-1.5`,children:[e&&R(D,{children:[e,t&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(ae,{name:o,value:s.value??``,disabled:f,"aria-invalid":d,className:i===`horizontal`?`flex flex-row flex-wrap gap-x-4 gap-y-2`:`flex flex-col gap-2`,onValueChange:l,onBlur:c,children:r.map(e=>R(`div`,{className:`flex items-center gap-2`,children:[L(ie,{id:`${o}-${e.value}`,value:e.value}),L(D,{htmlFor:`${o}-${e.value}`,className:`cursor-pointer font-normal`,children:e.label})]},e.value))}),d&&L(Z,{errors:s.meta.errors})]})},Qe=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=N(),{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=M(({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:[e&&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(le,{size:14})})]}),f&&L(Z,{errors:c.meta.errors})]})},$e=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,et=e=>Number(e).toLocaleString(),tt=(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}},nt=({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 _=Ce(null),y=Ce(null),[b,x]=F(a?.toString()??null),S=P(()=>s?.[1]??r,[s,r]),C=P(()=>s&&s[0]-s[1],[s]),w=P(()=>$e(n),[n]),T=M(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=M(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=tt(parseFloat(e),Math.min(S-1,l||0),i).toString().split(`.`),r=et(t);return n?`${r}.${n}`:r},[S,l,i]),D=M(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=M(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]),k=M(e=>{t||(m?.(e),x(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,m]),A=M(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 Se(()=>{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]),Se(()=>{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:k,onBlur:A}),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})]})},rt=({label:e,placeholder:t,required:n,unit:r,allowNegative:i,disabled:a})=>{let o=N(),{form:s,state:c,handleBlur:l,handleChange:u}=Q(),d=V(s.store,({isSubmitting:e})=>e),f=c.meta.isTouched&&!c.meta.isValid,p=M(e=>{d||u(e)},[d,u]);return R(`div`,{className:`flex flex-col gap-1.5`,children:[e&&R(D,{htmlFor:o,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(nt,{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})]})},it=({label:e,placeholder:t,required:n,disabled:r})=>{let i=N(),{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=M(()=>f(e=>!e),[]),h=M(({target:{value:e}})=>{u||l(e||null)},[u,l]);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(`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?me:pe,{size:16,"aria-hidden":`true`})})]}),p&&L(Z,{errors:s.meta.errors})]})},at=({label:t,placeholder:n,required:r,options:i})=>{let a=N(),{state:o,handleBlur:s,handleChange:c}=Q(),l=Fe(),[u,d]=F(!1),f=o.meta.isTouched&&!o.meta.isValid,p=i.find(e=>e.value===o.value)?.label;return l?R(`div`,{className:`flex flex-col gap-1.5`,children:[t&&R(D,{htmlFor:a,children:[t,r&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(e,{id:a,type:`button`,variant:`outline`,color:`muted`,className:I(`w-full justify-start font-normal outline-1 outline-border -outline-offset-1`,!o.value&&`text-text-positive-muted`,f&&`outline-danger bg-danger-bg-subtle`),"aria-invalid":f,onBlur:s,onClick:()=>d(!0),children:p??L(`span`,{className:`text-text-positive-muted`,children:n})}),L(ne,{open:u,onOpenChange:d,direction:`bottom`,children:R(te,{children:[L(ee,{children:L(k,{children:t??n??`Select an option`})}),L(`div`,{className:`flex flex-col overflow-y-auto pb-safe-bottom`,children:i.length>0?i.map(e=>L(A,{asChild:!0,children:L(`button`,{type:`button`,className:I(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,o.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{c(e.value),d(!1)},children:e.label})},e.value)):R(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[L(ve,{strokeWidth:1}),`No options available`]})})]})}),f&&L(Z,{errors:o.meta.errors})]}):R(`div`,{className:`flex flex-col gap-1.5`,children:[t&&R(D,{htmlFor:a,children:[t,r&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),R(E,{value:o.value??``,onValueChange:c,children:[L(T,{id:a,"aria-invalid":f?`true`:void 0,onBlur:s,children:L(S,{placeholder:n})}),L(w,{children:i.length>0?i.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(ve,{strokeWidth:1}),`No options available`]})})]}),f&&L(Z,{errors:o.meta.errors})]})},ot=({label:e,placeholder:t,required:n,maxLength:r,rows:i,disabled:a})=>{let o=N(),{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=M(({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:[e&&R(D,{htmlFor:o,children:[e,n&&L(`span`,{className:`text-danger-strong`,children:`*`})]}),L(oe,{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})]})},st=({label:e,placeholder:t,required:n,maxLength:r,disabled:i})=>{let a=N(),{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=M(({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:[e&&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})]})},ct=({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,{})]})},lt=({label:t,description:n,placeholder:r,tooltip:i,orientation:a=`responsive`,options:o})=>{let s=Q(),c=Fe(),[l,u]=F(!1),_=P(()=>s.state.meta.isTouched&&!s.state.meta.isValid,[s.state.meta.isTouched,s.state.meta.isValid]),v=P(()=>s.state.meta.errors,[s.state.meta.errors]),S=o.find(({value:e})=>e===s.state.value)?.label,C=t=>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`),onClick:t,children:S?L(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 text-start`,children:S}):L(`p`,{className:`flex-1 text-start text-text-positive-muted`,children:r})}),w=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),u(!1)},children:t},e))})}),L(m,{children:`No results found.`})]});return R(H,{className:`px-4`,children:[R(U,{orientation:a,"data-invalid":_,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:[c?R(Te,{children:[C(()=>u(!0)),L(ne,{open:l,onOpenChange:u,direction:`bottom`,children:R(te,{children:[L(ee,{children:L(k,{children:t})}),L(`div`,{className:`overflow-y-auto pb-safe-bottom`,children:w})]})})]}):R(x,{children:[L(y,{asChild:!0,children:C()}),L(b,{align:`end`,side:`bottom`,className:`flex w-fit rounded p-0`,onBlur:s.handleBlur,children:w})]}),L(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:L(Z,{errors:v})})]})})]}),L(X,{})]})},ut=({label:t,description:n,placeholder:r,orientation:i=`responsive`,tooltip:a,helperText:o,minDate:s,maxDate:c,required:l})=>{let u=Q(),d=P(()=>l?u.state.value===null:!1,[l,u.state.value]),f=P(()=>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`:Oe(u.state.value,`PPPP`)}),L(de,{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(Ee())},children:`Tomorrow`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(De())},children:`Yesterday`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(je(z(),3))},children:`Last 3 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(je(z(),7))},children:`Last 7 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(je(z(),30))},children:`Last 30 Days`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(Ae(z()))},children:`This Month`}),L(e,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{u.handleChange(ke(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(re,{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,{})]})},dt=({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=M(({target:{value:e}})=>{m||c&&e.length>c||p(e||null)},[m,c,p]),b=M(()=>{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(le,{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(xe,{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,{})]})},ft=({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,_=M(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(nt,{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(_e,{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(ue,{})}),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,{})]})},pt=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,helperText:a,showErrorMessage:o=!0})=>{let s=N(),{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,_=M(()=>h(e=>!e),[]),y=M(({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?me:pe,{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,{})]})},mt=({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(ae,{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(ie,{value:e.value,className:`mt-0.5 shrink-0`}),R(W,{className:`gap-0.5!`,children:[L(qe,{children:e.label}),L(q,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),L(X,{})]})},ht=({label:e,description:t,placeholder:n,orientation:r=`responsive`,tooltip:i,options:a,helperText:o,required:s=!1})=>{let c=Q(),l=Fe(),[u,d]=F(!1),f=c.state.meta.isTouched&&!c.state.meta.isValid,p=s&&c.state.value===null,m=c.state.meta.errors,h=a.find(e=>e.value===c.state.value)?.label;return R(H,{className:`gap-y-4 px-4`,children:[R(U,{orientation:r,"data-invalid":f,children:[R(W,{children:[R(K,{htmlFor:c.name,"aria-required":p,children:[e,i&&L(Y,{tooltip:i})]}),L(q,{children:t})]}),R(G,{className:`flex flex-col`,children:[l?R(Te,{children:[R(`button`,{id:c.name,type:`button`,"aria-invalid":f?`true`:void 0,onBlur:c.handleBlur,onClick:()=>d(!0),className:I(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`rounded shadow-input transition-all cursor-pointer whitespace-nowrap text-sm`,`focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,f&&`outline-danger bg-danger-bg-subtle ring-danger-weak`,!c.state.value&&`text-text-positive-muted`),children:[L(`span`,{className:`line-clamp-1`,children:h??n}),L(fe,{size:16,className:`shrink-0 opacity-50`})]}),L(ne,{open:u,onOpenChange:d,direction:`bottom`,children:R(te,{children:[L(ee,{children:L(k,{children:e??n??`Select an option`})}),L(`div`,{className:`flex flex-col overflow-y-auto pb-safe-bottom`,children:a.length>0?a.map(e=>L(A,{asChild:!0,children:L(`button`,{type:`button`,className:I(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,c.state.value===e.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{c.handleChange(e.value),d(!1)},children:e.label})},e.value)):R(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[L(ve,{strokeWidth:1}),`No options available`]})})]})})]}):R(E,{value:c.state.value??``,onValueChange:c.handleChange,children:[L(T,{"aria-invalid":f?`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(ve,{strokeWidth:1}),`No options available`]})]})]}),L(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:L(Z,{errors:m})}),L(J,{isShow:!!o,children:o})]})]}),L(X,{})]})};function gt({className:e,...t}){return L(Pe.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(Pe.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 _t=({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(qe,{className:`cursor-pointer`,children:L(`label`,{htmlFor:r.name,children:e})}),L(q,{children:t}),L(gt,{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,{})]})},vt=({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=N(),f=Ce(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=P(()=>{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=M(({target:{value:e}})=>{y||a&&u&&e.length>u||_(e||null)},[y,a,u,_]),O=M(()=>{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(xe,{"aria-hidden":`true`})}),y&&L(`div`,{className:`absolute inset-e-2 inset-y-0 top-2.5 text-muted-weak`,children:L(_e,{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(ue,{"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,{})]})},yt=j(({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=N(),{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=P(()=>{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=M(({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(oe,{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(_e,{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(ue,{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,{})]})});yt.displayName=`TextareaField`;const bt=j(({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=M(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(se,{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,{})]})});bt.displayName=`TextEditorField`;const xt=({label:t,className:n})=>{let r=$(),i=M(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(ye,{}),`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(ce,{}),`Update`]})})]})};function Ct({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return L(Ne.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 wt=({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(be,{}),`Remove`]})]}),Tt=({children:e})=>L(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),Et=({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`}),Dt=({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}),Ot=({title:e,submitText:t,width:n,maxWidth:r,className:a,open:d,onOpenChange:f,children:p})=>{let m=$(),h=M(e=>{e||m.reset(),f?.(e)},[m.reset,f]);return L(u,{open:d,onOpenChange:h,children:R(o,{"data-slot":`dialog-portal`,children:[L(l,{}),R(c,{style:{"--width":n,"--max-width":r},className:I(`flex rounded-none 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&&`sm:w-(--width)`,r&&`sm:max-w-(--max-width)`,a),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:p}),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(m.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>L(Et,{disabled:e,onClick:()=>{m.reset(),h(!1)}})}),L(m.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>L(Dt,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>m.handleSubmit()})})]})]})]})})},kt=({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,{})]}),At=({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(Dt,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>o.handleSubmit()})}),L(o.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>L(Et,{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`})})]})})]})})},jt=({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}),Mt=({children:e})=>L(`main`,{"data-slot":`section-main`,className:`relative flex flex-col py-4`,children:e}),Nt=({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(jt,{children:e}),L(Ct,{}),L(Mt,{children:t})]}),Pt=({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(Ke,{className:`mb-1`,children:e}),L(q,{children:t})]}),L(J,{isShow:!!n,children:n})]}),L(X,{})]}),{fieldContext:Ft,formContext:It,useFieldContext:Q,useFormContext:$}=Le(),{useAppForm:Lt,withForm:Rt,withFieldGroup:zt}=Ie({fieldContext:Ft,formContext:It,fieldComponents:{TextField:vt,TextareaField:yt,TextEditorField:bt,NumberField:ft,EmailField:dt,PasswordField:pt,SelectField:ht,ComboboxField:lt,DateField:ut,SwitchField:_t,RadioGroupField:mt,CheckboxField:ct,SimpleTextField:st,SimpleEmailField:Qe,SimplePasswordField:it,SimpleTextareaField:ot,SimpleNumberField:rt,SimpleSelectField:at,SimpleArrayField:Be,SimpleBooleanField:Je,SimpleComboboxField:Ye,SimpleDateField:Xe,SimpleRadioGroupField:Ze,FieldGroup:H,Field:U,FieldContent:W,FieldLabel:K,FieldContentMain:G,FieldSeparator:X,FieldError:Z},formComponents:{TanStackDialogForm:Ot,TanStackPopoverForm:At,TanStackContainerForm:Tt,TanStackSectionForm:Nt,TanStackCardForm:wt,TanStackFieldGroup:kt,TanStackTitleField:Pt,TanStackActionsForm:St,TanStackActionSubmit:xt,ArrayCol:Re,ArrayHeaderRow:ze}});export{Rt as a,G as c,K as d,X as f,zt as i,Z as l,Lt as n,U as o,$ as r,W as s,Q as t,H as u};
2
- //# sourceMappingURL=tanstack-form-BZAJHNCZ.mjs.map