@customafk/lunas-ui 0.1.87 → 0.1.89

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 (146) hide show
  1. package/dist/{button-70p_rB81.d.cts → button-CiLsnjev.d.mts} +7 -7
  2. package/dist/{button-BMzPKC0-.d.mts → button-Dphc1TZp.d.cts} +7 -7
  3. package/dist/cards/simple-card.d.cts +2 -2
  4. package/dist/cards/simple-card.d.mts +2 -2
  5. package/dist/data-display/empty.d.cts +2 -2
  6. package/dist/data-display/empty.d.mts +2 -2
  7. package/dist/data-display/statistic.d.mts +2 -2
  8. package/dist/{dialog-IGmKIrTb.d.mts → dialog-CwGD6AJw.d.cts} +12 -12
  9. package/dist/{dialog-B5NbVD73.d.cts → dialog-DwkejzpS.d.mts} +12 -12
  10. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +2 -2
  11. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +2 -2
  12. package/dist/features/search-modal/index.d.cts +2 -2
  13. package/dist/features/search-modal/index.d.mts +2 -2
  14. package/dist/features/tables/index.cjs +1 -1
  15. package/dist/features/tables/index.cjs.map +1 -1
  16. package/dist/features/tables/index.d.cts +1 -1
  17. package/dist/features/tables/index.d.mts +1 -1
  18. package/dist/features/tables/index.mjs +1 -1
  19. package/dist/features/tables/index.mjs.map +1 -1
  20. package/dist/features/tanstack-form/index.cjs +1 -1
  21. package/dist/features/tanstack-form/index.cjs.map +1 -1
  22. package/dist/features/tanstack-form/index.d.cts +48 -48
  23. package/dist/features/tanstack-form/index.d.mts +48 -48
  24. package/dist/features/tanstack-form/index.mjs +1 -1
  25. package/dist/features/tanstack-form/index.mjs.map +1 -1
  26. package/dist/{input-RNF3AtQx.d.mts → input-DqCWojD4.d.cts} +6 -6
  27. package/dist/{input-C4zZ2I8W.d.cts → input-mq2wP0OC.d.mts} +5 -5
  28. package/dist/layouts/flex.d.cts +5 -5
  29. package/dist/layouts/flex.d.mts +7 -7
  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/NotAuthorized.d.cts +2 -2
  35. package/dist/pages/NotAuthorized.d.mts +2 -2
  36. package/dist/pages/NotFound.d.cts +2 -2
  37. package/dist/pages/NotFound.d.mts +2 -2
  38. package/dist/typography/paragraph.d.cts +2 -2
  39. package/dist/typography/paragraph.d.mts +2 -2
  40. package/dist/typography/title.d.cts +2 -2
  41. package/dist/typography/title.d.mts +2 -2
  42. package/dist/ui/alert-dialog.d.cts +12 -12
  43. package/dist/ui/alert-dialog.d.mts +12 -12
  44. package/dist/ui/alert.d.cts +7 -7
  45. package/dist/ui/alert.d.mts +7 -7
  46. package/dist/ui/aspect-ratio.d.cts +2 -2
  47. package/dist/ui/aspect-ratio.d.mts +2 -2
  48. package/dist/ui/avatar.d.cts +4 -4
  49. package/dist/ui/avatar.d.mts +4 -4
  50. package/dist/ui/badge.d.cts +5 -5
  51. package/dist/ui/badge.d.mts +5 -5
  52. package/dist/ui/breadcrumb.d.cts +8 -8
  53. package/dist/ui/breadcrumb.d.mts +8 -8
  54. package/dist/ui/button-group.d.cts +6 -6
  55. package/dist/ui/button-group.d.mts +6 -6
  56. package/dist/ui/button.d.cts +1 -1
  57. package/dist/ui/button.d.mts +1 -1
  58. package/dist/ui/calendar.d.cts +4 -4
  59. package/dist/ui/calendar.d.mts +4 -4
  60. package/dist/ui/card.d.cts +8 -8
  61. package/dist/ui/card.d.mts +8 -8
  62. package/dist/ui/carousel.d.cts +7 -7
  63. package/dist/ui/carousel.d.mts +7 -7
  64. package/dist/ui/checkbox.d.cts +2 -2
  65. package/dist/ui/checkbox.d.mts +2 -2
  66. package/dist/ui/collapsible.d.cts +4 -4
  67. package/dist/ui/collapsible.d.mts +4 -4
  68. package/dist/ui/command.d.cts +11 -11
  69. package/dist/ui/command.d.mts +11 -11
  70. package/dist/ui/context-menu.d.cts +16 -16
  71. package/dist/ui/context-menu.d.mts +16 -16
  72. package/dist/ui/dialog.d.cts +1 -1
  73. package/dist/ui/dialog.d.mts +1 -1
  74. package/dist/ui/drawer.d.cts +11 -11
  75. package/dist/ui/drawer.d.mts +11 -11
  76. package/dist/ui/dropdown-menu.d.cts +16 -16
  77. package/dist/ui/dropdown-menu.d.mts +16 -16
  78. package/dist/ui/empty.d.cts +9 -9
  79. package/dist/ui/empty.d.mts +9 -9
  80. package/dist/ui/field.d.cts +24 -24
  81. package/dist/ui/field.d.mts +24 -24
  82. package/dist/ui/file-uploader.d.cts +2 -2
  83. package/dist/ui/file-uploader.d.mts +2 -2
  84. package/dist/ui/form.d.cts +11 -11
  85. package/dist/ui/form.d.mts +11 -11
  86. package/dist/ui/hover-card.d.cts +4 -4
  87. package/dist/ui/hover-card.d.mts +4 -4
  88. package/dist/ui/input-otp.d.cts +5 -5
  89. package/dist/ui/input-otp.d.mts +5 -5
  90. package/dist/ui/input.d.cts +1 -1
  91. package/dist/ui/input.d.mts +1 -1
  92. package/dist/ui/inputs/search-input.d.cts +3 -3
  93. package/dist/ui/inputs/search-input.d.mts +3 -3
  94. package/dist/ui/item.d.cts +15 -15
  95. package/dist/ui/item.d.mts +15 -15
  96. package/dist/ui/label.d.cts +2 -2
  97. package/dist/ui/label.d.mts +2 -2
  98. package/dist/ui/menubar.d.cts +17 -17
  99. package/dist/ui/menubar.d.mts +17 -17
  100. package/dist/ui/multi-select.d.cts +2 -2
  101. package/dist/ui/multi-select.d.mts +3 -3
  102. package/dist/ui/navigation-menu.d.cts +11 -11
  103. package/dist/ui/navigation-menu.d.mts +11 -11
  104. package/dist/ui/pagination.d.cts +9 -9
  105. package/dist/ui/pagination.d.mts +9 -9
  106. package/dist/ui/popover.d.cts +5 -5
  107. package/dist/ui/popover.d.mts +5 -5
  108. package/dist/ui/progress.d.cts +2 -2
  109. package/dist/ui/progress.d.mts +2 -2
  110. package/dist/ui/radio-group.d.cts +3 -3
  111. package/dist/ui/radio-group.d.mts +3 -3
  112. package/dist/ui/resizable.d.cts +4 -4
  113. package/dist/ui/resizable.d.mts +4 -4
  114. package/dist/ui/scroll-area.d.cts +3 -3
  115. package/dist/ui/scroll-area.d.mts +6 -6
  116. package/dist/ui/select.d.cts +11 -11
  117. package/dist/ui/select.d.mts +11 -11
  118. package/dist/ui/separator.d.cts +2 -2
  119. package/dist/ui/separator.d.mts +2 -2
  120. package/dist/ui/sheet.d.cts +9 -9
  121. package/dist/ui/sheet.d.mts +9 -9
  122. package/dist/ui/sidebar.d.cts +29 -29
  123. package/dist/ui/sidebar.d.mts +29 -29
  124. package/dist/ui/skeleton.d.cts +2 -2
  125. package/dist/ui/skeleton.d.mts +2 -2
  126. package/dist/ui/slider.d.cts +2 -2
  127. package/dist/ui/slider.d.mts +2 -2
  128. package/dist/ui/sonner.d.cts +2 -2
  129. package/dist/ui/sonner.d.mts +2 -2
  130. package/dist/ui/spinner.d.cts +2 -2
  131. package/dist/ui/spinner.d.mts +2 -2
  132. package/dist/ui/switch.d.cts +2 -2
  133. package/dist/ui/switch.d.mts +2 -2
  134. package/dist/ui/table.d.cts +18 -18
  135. package/dist/ui/table.d.mts +18 -18
  136. package/dist/ui/tabs.d.cts +5 -5
  137. package/dist/ui/tabs.d.mts +5 -5
  138. package/dist/ui/textarea.d.cts +2 -2
  139. package/dist/ui/textarea.d.mts +2 -2
  140. package/dist/ui/toggle-group.d.cts +3 -3
  141. package/dist/ui/toggle-group.d.mts +3 -3
  142. package/dist/ui/toggle.d.cts +5 -5
  143. package/dist/ui/toggle.d.mts +5 -5
  144. package/dist/ui/tooltip.d.cts +5 -5
  145. package/dist/ui/tooltip.d.mts +5 -5
  146. package/package.json +6 -6
@@ -31,7 +31,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
31
31
  showClearButton?: boolean | undefined;
32
32
  description?: string | undefined;
33
33
  placeholder?: string | undefined;
34
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
34
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
35
35
  required?: boolean;
36
36
  maxLength?: number;
37
37
  }>;
@@ -59,7 +59,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
59
59
  counter?: boolean | undefined;
60
60
  description?: string | undefined;
61
61
  placeholder?: string | undefined;
62
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
62
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
63
63
  required?: boolean;
64
64
  maxLength?: number;
65
65
  }>;
@@ -99,7 +99,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
99
99
  unit?: string | undefined;
100
100
  description?: string | undefined;
101
101
  placeholder?: string | undefined;
102
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
102
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
103
103
  required?: boolean;
104
104
  allowNegative?: boolean;
105
105
  }>;
@@ -119,15 +119,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
119
119
  showErrorMessage?: boolean | undefined;
120
120
  description?: string | undefined;
121
121
  placeholder?: string | undefined;
122
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
122
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
123
123
  maxLength?: number;
124
124
  }>;
125
125
  readonly PasswordField: react26.FC<{
126
126
  description?: string | undefined;
127
127
  label: string;
128
- placeholder?: string | undefined;
129
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
130
128
  tooltip?: string | undefined;
129
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
130
+ placeholder?: string | undefined;
131
131
  helperText?: string | undefined;
132
132
  showErrorMessage?: boolean | undefined;
133
133
  }>;
@@ -156,7 +156,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
156
156
  defaultValue?: string | undefined;
157
157
  description?: string | undefined;
158
158
  placeholder?: string | undefined;
159
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
159
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
160
160
  required?: boolean;
161
161
  }>;
162
162
  readonly DateField: react26.FC<Pick<{
@@ -177,7 +177,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
177
177
  defaultValue?: string | undefined;
178
178
  description?: string | undefined;
179
179
  placeholder?: string | undefined;
180
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
180
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
181
181
  required?: boolean;
182
182
  minDate?: Date;
183
183
  maxDate?: Date;
@@ -279,7 +279,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
279
279
  showClearButton?: boolean | undefined;
280
280
  description?: string | undefined;
281
281
  placeholder?: string | undefined;
282
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
282
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
283
283
  required?: boolean;
284
284
  maxLength?: number;
285
285
  }>;
@@ -307,7 +307,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
307
307
  counter?: boolean | undefined;
308
308
  description?: string | undefined;
309
309
  placeholder?: string | undefined;
310
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
310
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
311
311
  required?: boolean;
312
312
  maxLength?: number;
313
313
  }>;
@@ -347,7 +347,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
347
347
  unit?: string | undefined;
348
348
  description?: string | undefined;
349
349
  placeholder?: string | undefined;
350
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
350
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
351
351
  required?: boolean;
352
352
  allowNegative?: boolean;
353
353
  }>;
@@ -367,15 +367,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
367
367
  showErrorMessage?: boolean | undefined;
368
368
  description?: string | undefined;
369
369
  placeholder?: string | undefined;
370
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
370
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
371
371
  maxLength?: number;
372
372
  }>;
373
373
  readonly PasswordField: react26.FC<{
374
374
  description?: string | undefined;
375
375
  label: string;
376
- placeholder?: string | undefined;
377
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
378
376
  tooltip?: string | undefined;
377
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
378
+ placeholder?: string | undefined;
379
379
  helperText?: string | undefined;
380
380
  showErrorMessage?: boolean | undefined;
381
381
  }>;
@@ -404,7 +404,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
404
404
  defaultValue?: string | undefined;
405
405
  description?: string | undefined;
406
406
  placeholder?: string | undefined;
407
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
407
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
408
408
  required?: boolean;
409
409
  }>;
410
410
  readonly DateField: react26.FC<Pick<{
@@ -425,7 +425,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
425
425
  defaultValue?: string | undefined;
426
426
  description?: string | undefined;
427
427
  placeholder?: string | undefined;
428
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
428
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
429
429
  required?: boolean;
430
430
  minDate?: Date;
431
431
  maxDate?: Date;
@@ -525,7 +525,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
525
525
  showClearButton?: boolean | undefined;
526
526
  description?: string | undefined;
527
527
  placeholder?: string | undefined;
528
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
528
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
529
529
  required?: boolean;
530
530
  maxLength?: number;
531
531
  }>;
@@ -553,7 +553,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
553
553
  counter?: boolean | undefined;
554
554
  description?: string | undefined;
555
555
  placeholder?: string | undefined;
556
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
556
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
557
557
  required?: boolean;
558
558
  maxLength?: number;
559
559
  }>;
@@ -593,7 +593,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
593
593
  unit?: string | undefined;
594
594
  description?: string | undefined;
595
595
  placeholder?: string | undefined;
596
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
596
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
597
597
  required?: boolean;
598
598
  allowNegative?: boolean;
599
599
  }>;
@@ -613,15 +613,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
613
613
  showErrorMessage?: boolean | undefined;
614
614
  description?: string | undefined;
615
615
  placeholder?: string | undefined;
616
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
616
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
617
617
  maxLength?: number;
618
618
  }>;
619
619
  readonly PasswordField: react26.FC<{
620
620
  description?: string | undefined;
621
621
  label: string;
622
- placeholder?: string | undefined;
623
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
624
622
  tooltip?: string | undefined;
623
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
624
+ placeholder?: string | undefined;
625
625
  helperText?: string | undefined;
626
626
  showErrorMessage?: boolean | undefined;
627
627
  }>;
@@ -650,7 +650,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
650
650
  defaultValue?: string | undefined;
651
651
  description?: string | undefined;
652
652
  placeholder?: string | undefined;
653
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
653
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
654
654
  required?: boolean;
655
655
  }>;
656
656
  readonly DateField: react26.FC<Pick<{
@@ -671,7 +671,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
671
671
  defaultValue?: string | undefined;
672
672
  description?: string | undefined;
673
673
  placeholder?: string | undefined;
674
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
674
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
675
675
  required?: boolean;
676
676
  minDate?: Date;
677
677
  maxDate?: Date;
@@ -775,7 +775,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
775
775
  showClearButton?: boolean | undefined;
776
776
  description?: string | undefined;
777
777
  placeholder?: string | undefined;
778
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
778
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
779
779
  required?: boolean;
780
780
  maxLength?: number;
781
781
  }>;
@@ -803,7 +803,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
803
803
  counter?: boolean | undefined;
804
804
  description?: string | undefined;
805
805
  placeholder?: string | undefined;
806
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
806
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
807
807
  required?: boolean;
808
808
  maxLength?: number;
809
809
  }>;
@@ -843,7 +843,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
843
843
  unit?: string | undefined;
844
844
  description?: string | undefined;
845
845
  placeholder?: string | undefined;
846
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
846
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
847
847
  required?: boolean;
848
848
  allowNegative?: boolean;
849
849
  }>;
@@ -863,15 +863,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
863
863
  showErrorMessage?: boolean | undefined;
864
864
  description?: string | undefined;
865
865
  placeholder?: string | undefined;
866
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
866
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
867
867
  maxLength?: number;
868
868
  }>;
869
869
  readonly PasswordField: react26.FC<{
870
870
  description?: string | undefined;
871
871
  label: string;
872
- placeholder?: string | undefined;
873
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
874
872
  tooltip?: string | undefined;
873
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
874
+ placeholder?: string | undefined;
875
875
  helperText?: string | undefined;
876
876
  showErrorMessage?: boolean | undefined;
877
877
  }>;
@@ -900,7 +900,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
900
900
  defaultValue?: string | undefined;
901
901
  description?: string | undefined;
902
902
  placeholder?: string | undefined;
903
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
903
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
904
904
  required?: boolean;
905
905
  }>;
906
906
  readonly DateField: react26.FC<Pick<{
@@ -921,7 +921,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
921
921
  defaultValue?: string | undefined;
922
922
  description?: string | undefined;
923
923
  placeholder?: string | undefined;
924
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
924
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
925
925
  required?: boolean;
926
926
  minDate?: Date;
927
927
  maxDate?: Date;
@@ -1021,7 +1021,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1021
1021
  showClearButton?: boolean | undefined;
1022
1022
  description?: string | undefined;
1023
1023
  placeholder?: string | undefined;
1024
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1024
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1025
1025
  required?: boolean;
1026
1026
  maxLength?: number;
1027
1027
  }>;
@@ -1049,7 +1049,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1049
1049
  counter?: boolean | undefined;
1050
1050
  description?: string | undefined;
1051
1051
  placeholder?: string | undefined;
1052
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
1052
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
1053
1053
  required?: boolean;
1054
1054
  maxLength?: number;
1055
1055
  }>;
@@ -1089,7 +1089,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1089
1089
  unit?: string | undefined;
1090
1090
  description?: string | undefined;
1091
1091
  placeholder?: string | undefined;
1092
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1092
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1093
1093
  required?: boolean;
1094
1094
  allowNegative?: boolean;
1095
1095
  }>;
@@ -1109,15 +1109,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1109
1109
  showErrorMessage?: boolean | undefined;
1110
1110
  description?: string | undefined;
1111
1111
  placeholder?: string | undefined;
1112
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1112
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
1113
1113
  maxLength?: number;
1114
1114
  }>;
1115
1115
  readonly PasswordField: react26.FC<{
1116
1116
  description?: string | undefined;
1117
1117
  label: string;
1118
- placeholder?: string | undefined;
1119
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1120
1118
  tooltip?: string | undefined;
1119
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1120
+ placeholder?: string | undefined;
1121
1121
  helperText?: string | undefined;
1122
1122
  showErrorMessage?: boolean | undefined;
1123
1123
  }>;
@@ -1146,7 +1146,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1146
1146
  defaultValue?: string | undefined;
1147
1147
  description?: string | undefined;
1148
1148
  placeholder?: string | undefined;
1149
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
1149
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
1150
1150
  required?: boolean;
1151
1151
  }>;
1152
1152
  readonly DateField: react26.FC<Pick<{
@@ -1167,7 +1167,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1167
1167
  defaultValue?: string | undefined;
1168
1168
  description?: string | undefined;
1169
1169
  placeholder?: string | undefined;
1170
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1170
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
1171
1171
  required?: boolean;
1172
1172
  minDate?: Date;
1173
1173
  maxDate?: Date;
@@ -1266,7 +1266,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1266
1266
  showClearButton?: boolean | undefined;
1267
1267
  description?: string | undefined;
1268
1268
  placeholder?: string | undefined;
1269
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1269
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1270
1270
  required?: boolean;
1271
1271
  maxLength?: number;
1272
1272
  }>;
@@ -1294,7 +1294,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1294
1294
  counter?: boolean | undefined;
1295
1295
  description?: string | undefined;
1296
1296
  placeholder?: string | undefined;
1297
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
1297
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
1298
1298
  required?: boolean;
1299
1299
  maxLength?: number;
1300
1300
  }>;
@@ -1334,7 +1334,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1334
1334
  unit?: string | undefined;
1335
1335
  description?: string | undefined;
1336
1336
  placeholder?: string | undefined;
1337
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1337
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1338
1338
  required?: boolean;
1339
1339
  allowNegative?: boolean;
1340
1340
  }>;
@@ -1354,15 +1354,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1354
1354
  showErrorMessage?: boolean | undefined;
1355
1355
  description?: string | undefined;
1356
1356
  placeholder?: string | undefined;
1357
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1357
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
1358
1358
  maxLength?: number;
1359
1359
  }>;
1360
1360
  readonly PasswordField: react26.FC<{
1361
1361
  description?: string | undefined;
1362
1362
  label: string;
1363
- placeholder?: string | undefined;
1364
- orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1365
1363
  tooltip?: string | undefined;
1364
+ orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1365
+ placeholder?: string | undefined;
1366
1366
  helperText?: string | undefined;
1367
1367
  showErrorMessage?: boolean | undefined;
1368
1368
  }>;
@@ -1391,7 +1391,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1391
1391
  defaultValue?: string | undefined;
1392
1392
  description?: string | undefined;
1393
1393
  placeholder?: string | undefined;
1394
- }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
1394
+ }, "defaultValue" | "description" | "label" | "tooltip" | "orientation" | "options" | "placeholder" | "helperText" | "clearable"> & {
1395
1395
  required?: boolean;
1396
1396
  }>;
1397
1397
  readonly DateField: react26.FC<Pick<{
@@ -1412,7 +1412,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1412
1412
  defaultValue?: string | undefined;
1413
1413
  description?: string | undefined;
1414
1414
  placeholder?: string | undefined;
1415
- }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1415
+ }, "description" | "label" | "tooltip" | "orientation" | "placeholder" | "helperText" | "showErrorMessage"> & {
1416
1416
  required?: boolean;
1417
1417
  minDate?: Date;
1418
1418
  maxDate?: Date;
@@ -1,2 +1,2 @@
1
- import{n as e}from"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import{t as n}from"../../separator-CWar33xc.mjs";import{t as r}from"../../close-BSZehrQx.mjs";import{cn as i}from"@customafk/react-toolkit/utils";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{ArrowDownToLine as s,AtSignIcon as c,BanIcon as l,CalendarDaysIcon as u,CheckIcon as d,ChevronDownIcon as f,ChevronLeftIcon as p,ChevronRightIcon as m,ChevronUpIcon as h,CircleIcon as g,EyeIcon as _,EyeOffIcon as v,Loader2 as y,Loader2Icon as b,PackagePlusIcon as x,PlusIcon as S,Trash2Icon as C,XIcon as w}from"lucide-react";import{memo as T,useCallback as E,useEffect as D,useMemo as O,useRef as k,useState as A}from"react";import{cva as j}from"class-variance-authority";import{endOfToday as M,endOfTomorrow as N,endOfYesterday as P,format as ee,lastDayOfMonth as te,startOfMonth as ne,subDays as F}from"@customafk/react-toolkit/date-fns";import{Checkbox as re,Dialog as I,Label as ie,Popover as L,RadioGroup as R,Select as z,Separator as ae,Switch as oe}from"radix-ui";import{createFormHook as se,createFormHookContexts as ce,useStore as B}from"@tanstack/react-form";import{DayPicker as le,getDefaultClassNames as ue}from"react-day-picker";function de({className:e,...t}){return a(re.Root,{"data-slot":`checkbox`,className:i(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-primary-strong`,`focus-visible:ring-3`,`focus-visible:ring-primary-weak`,`aria-invalid:border-danger aria-invalid:ring-danger-weak`,`aria-readonly:bg-muted-muted`,`aria-readonly:pointer-events-none`,`data-[state=checked]:aria-readonly:bg-muted-muted`,`data-[state=checked]:aria-readonly:border-border`,`data-[state=checked]:aria-readonly:text-text-positive-strong`,`data-[state=checked]:bg-primary`,`data-[state=checked]:border-primary-strong`,`data-[state=checked]:text-text-negative-strong`,e),...t,children:a(re.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:a(d,{size:14})})})}const fe=j([`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`}}),pe=({label:e,color:t,size:n,className:r,children:i})=>a(`div`,{"data-slot":`required-indicator`,className:fe({color:t,size:n,className:r}),children:e||i});function me({className:e,children:t,...n}){return o(ie.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:[t,a(pe,{label:`Required`,color:`danger`,size:`sm`,className:`hidden`})]})}const he=j(`group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0 @md/field-group:*:data-[slot=field-content]:gap-2`,{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=T(({className:e,...t})=>a(`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 _e=T(({className:e,variant:t=`legend`,...n})=>a(`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}));_e.displayName=`FieldLegend`;const V=T(({className:e,...t})=>a(`div`,{"data-slot":`field-group`,className:i(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));V.displayName=`FieldGroup`;const H=T(({className:e,orientation:t=`vertical`,...n})=>a(`div`,{"data-slot":`field`,"data-orientation":t,className:i(he({orientation:t}),e),...n}));H.displayName=`Field`;const U=T(({className:e,...t})=>a(`div`,{"data-slot":`field-content`,className:i(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));U.displayName=`FieldContent`;const W=T(({className:e,...t})=>a(`div`,{"data-slot":`field-content-main`,className:i(`relative`,e),...t})),G=T(({className:e,...t})=>a(me,{"data-slot":`field-label`,className:i(`group/field-label peer/field-label flex 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}));G.displayName=`FieldLabel`;const K=T(({className:e,...t})=>a(`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}));K.displayName=`FieldTitle`;const q=T(({className:e,...t})=>a(`p`,{"data-slot":`field-description`,className:i(`nth-last-2:-mt-1 font-normal text-sm text-text-positive-weak 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=T(({isShow:e=!0,className:t,...n})=>e===!1?null:a(`div`,{"data-slot":`field-note`,className:i(`text-wrap rounded border border-primary-muted bg-primary-bg-subtle p-2 text-text-positive-weak text-xs`,t),...n}));J.displayName=`FieldNote`;const Y=T(({children:e,className:t,...r})=>o(`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),...r,children:[a(n,{className:`absolute inset-0 top-1/2`}),e&&a(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));Y.displayName=`FieldSeparator`;const X=T(({className:e,children:t,errors:n,...r})=>{let o=O(()=>t||(n?n?.length===1&&n[0]?.message?a(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:a(`p`,{children:n[0].message})}):a(`ul`,{className:`flex list-none flex-col`,children:n.map(e=>typeof e==`string`?a(`li`,{children:e},e):e?.message?a(`li`,{children:e.message},e.message):null)}):null),[t,n]);return o?a(`div`,{role:`alert`,"data-slot":`field-error`,className:i(`w-full font-semibold text-danger-strong text-xs`,e),...r,children:o}):null});X.displayName=`FieldError`;const ve=({label:e,description:t,options:n,helperText:r,orientation:i})=>{let s=Q(),c=B(s.form.store,({isSubmitting:e})=>e);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:i,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t}),a(J,{isShow:!!r,children:r})]}),a(W,{children:a(V,{className:`flex flex-col gap-y-2`,children:n.map(e=>o(H,{orientation:`horizontal`,children:[a(de,{id:`${s.name}-${e.value}`,name:s.name,checked:s.state.value?.includes(e.value)??!1,disabled:c,onCheckedChange:t=>{if(t&&s.state.value!==null)s.pushValue(e.value);else if(t&&s.state.value===null)s.setValue([e.value]);else if(!t&&s.state.value!==null){let t=s.state.value.indexOf(e.value);t>-1&&s.removeValue(t)}else !t&&s.state.value===null&&s.setValue(null)}}),a(G,{htmlFor:`${s.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),a(Y,{})]})},ye=({rootRef:e,className:t,...n})=>a(`div`,{"data-slot":`calendar`,ref:e,className:i(t),...n}),be=e=>e.orientation===`left`?a(p,{size:16,className:e.className,...e}):e.orientation===`right`?a(m,{size:16,className:e.className,...e}):a(f,{size:16,className:e.className,...e}),xe=({className:e,day:n,modifiers:r,color:o,...s})=>{let c=ue(),l=k(null);return D(()=>{r.focused&&l.current?.focus()},[r.focused]),a(t,{ref:l,variant:`ghost`,color:`muted`,"data-day":n.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:i(`flex aspect-square size-9 flex-col rounded font-normal text-sm tabular-nums leading-none`,`data-[selected-single=true]:bg-primary`,`data-[selected-single=true]:text-white`,`data-[range-middle=true]:bg-muted-muted`,`data-[range-middle=true]:text-text-positive`,`data-[range-start=true]:bg-primary-muted`,`data-[range-start=true]:text-text-positive-strong`,`data-[range-end=true]:bg-primary`,`data-[range-end=true]:text-text-positive-strong`,`group-data-[focused=true]/day:border-primary-strong`,`group-data-[focused=true]/day:relative`,`group-data-[focused=true]/day:z-10`,`data-[range-end=true]:rounded`,`data-[range-end=true]:rounded-r`,`data-[range-middle=true]:rounded-none`,`data-[range-start=true]:rounded`,`data-[range-start=true]:rounded-l`,`[&>span]:text-xs [&>span]:opacity-70`,c.day,e),...s})},Se=({children:e,...t})=>a(`td`,{...t,children:a(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})});function Ce({className:t,classNames:n,showOutsideDays:r=!0,captionLayout:o=`label`,buttonVariant:s=`ghost`,formatters:c,components:l,...u}){let d=ue();return a(le,{showOutsideDays:r,className:i(`group/calendar bg-background p-3`,`[--cell-size:--spacing(8)]`,`in-data-[slot=card-content]:bg-transparent`,`in-data-[slot=popover-content]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,t),captionLayout:o,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...c},classNames:{root:i(d.root),months:i(`flex gap-4 flex-col md:flex-row relative`,d.months),month:i(`flex flex-col w-full gap-4`,d.month),nav:i(`flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between`,d.nav),button_previous:i(e({variant:`outline`,color:`muted`}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,d.button_previous),button_next:i(e({variant:`outline`,color:`muted`}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,d.button_next),month_caption:i(`flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)`,d.month_caption),dropdowns:i(`w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5`,d.dropdowns),dropdown_root:i(`relative has-focus:border-primary-strong border border-border-weak shadow-xs has-focus:ring-primary-weak has-focus:ring-[3px] rounded`,d.dropdown_root),dropdown:i(`absolute inset-0 opacity-0`,d.dropdown),caption_label:i(`select-none font-medium`,o===`label`&&`text-sm`,o!==`label`&&`rounded shadow-xs px-2 flex items-center gap-0.5 text-sm h-8 [&>svg]:text-text-positive [&>svg]:size-3.5`,d.caption_label),table:`w-full border-collapse`,weekdays:i(`flex`,d.weekdays),weekday:i(`text-text-positive rounded flex-1 font-normal text-[0.8rem] select-none`,d.weekday),week:i(`flex w-full mt-2`,d.week),week_number_header:i(`select-none w-(--cell-size)`,d.week_number_header),week_number:i(`text-[0.8rem] select-none text-text-positive`,d.week_number),day:i(`relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l [&:last-child[data-selected=true]_button]:rounded-r group/day aspect-square select-none`,d.day),range_start:i(`rounded-l bg-muted-muted`,d.range_start),range_middle:i(`rounded-none`,d.range_middle),range_end:i(`rounded-r bg-muted-muted`,d.range_end),today:i(`bg-muted-muted text-text-positive rounded data-[selected=true]:rounded-none`,d.today),outside:i(`[&>button]:text-text-positive-muted aria-selected:text-text-positive`),disabled:i(`bg-muted-muted text-text-positive opacity-50`,d.disabled),hidden:i(`invisible`,d.hidden),...n},components:{Root:ye,Chevron:be,DayButton:xe,WeekNumber:Se,...l},...u})}function we({...e}){return a(L.Root,{"data-slot":`popover`,...e})}function Te({...e}){return a(L.Trigger,{"data-slot":`popover-trigger`,...e})}function Ee({className:e,align:t=`start`,sideOffset:n=4,children:r,...s}){return a(L.Portal,{children:o(L.Content,{"data-slot":`popover-content`,align:t,sideOffset:n,className:i(`relative bg-popover`,`text-text-positive`,`z-50`,`min-w-(--radix-popover-trigger-width)`,`max-h-(--radix-popover-content-available-height)`,`origin-(--radix-popover-content-transform-origin)`,`rounded-md p-4 shadow-dropdown outline-none`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=top]:slide-in-from-bottom-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,e),...s,children:[r,a(L.Arrow,{className:`fill-popover`})]})})}const De=({label:e,description:n,placeholder:r,orientation:s=`responsive`,helperText:c,minDate:l,maxDate:d,required:f})=>{let p=Q(),m=O(()=>f?p.state.value===null:!1,[f,p.state.value]),h=O(()=>p.state.meta.isTouched&&!p.state.meta.isValid,[p.state.meta.isTouched,p.state.meta.isValid]);return o(V,{className:`px-4`,children:[o(H,{orientation:s,"data-invalid":h,children:[o(U,{children:[a(G,{htmlFor:p.name,"aria-required":m,children:e}),a(q,{children:n})]}),o(W,{className:`flex flex-col space-y-1`,children:[a(`div`,{className:`flex w-full flex-col`,children:o(we,{children:[a(Te,{asChild:!0,children:o(t,{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`,p.state.value===null&&`text-text-positive-muted`),children:[a(`p`,{children:p.state.value===null?r||`Select date`:ee(p.state.value,`PPPP`)}),a(u,{strokeWidth:1})]})}),o(Ee,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,onBlur:p.handleBlur,children:[o(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(M())},children:`Today`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(N())},children:`Tomorrow`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(P())},children:`Yesterday`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(M(),3))},children:`Last 3 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(M(),7))},children:`Last 7 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(M(),30))},children:`Last 30 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(ne(M()))},children:`This Month`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(te(M()))},children:`Last Month`})]}),a(`div`,{className:`flex flex-1 flex-col`,children:a(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:a(Ce,{mode:`single`,selected:p.state.value??void 0,hidden:{before:l??new Date(1900,0,1),after:d??new Date(2100,11,31)},onSelect:e=>{e&&p.handleChange(e)}})})})]})]})}),a(J,{isShow:!!c,children:c})]})]}),a(Y,{})]})},Z=({className:e,onChange:t,onValueChange:n,...r})=>{let o=E(e=>{t?.(e),n?.(e.target.value)},[t,n]);return a(`input`,{"data-slot":`input`,className:i(`w-full min-w-0 bg-transparent px-2.5 py-2 transition-[color,box-shadow]`,`rounded text-sm text-text-positive-weak tabular-nums leading-5 shadow-input placeholder:text-text-positive-muted`,`-outline-offset-1 outline-1 outline-border`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50`,`read-only:pointer-events-none read-only:bg-muted-muted read-only:placeholder:text-text-positive-weak`,`focus:text-text-positive focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`aria-invalid:bg-danger-bg-subtle aria-invalid:outline-danger aria-invalid:ring-danger-weak aria-invalid:focus:outline-danger-strong aria-invalid:focus:ring-4 aria-invalid:placeholder:text-text-positive-weak`,e),...r,onChange:o})},Oe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,helperText:s,showErrorMessage:l=!0,maxLength:u})=>{let{form:d,name:f,state:p,handleBlur:m,handleChange:h}=Q(),g=B(d.store,({isSubmitting:e})=>e),_=O(()=>p.meta.isTouched&&!p.meta.isValid,[p.meta.isTouched,p.meta.isValid]),v=E(({target:{value:e}})=>{g||u&&e.length>u||h(e||null)},[g,u,h]),y=E(()=>{g||h(null)},[g,h]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{"data-invalid":_,orientation:r,children:[o(U,{children:[a(G,{htmlFor:f,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:f,name:f,value:p.value===null?``:p.value,"aria-invalid":_,autoComplete:`email`,placeholder:n,className:i(`pl-9`,g&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:m,onChange:v}),a(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:a(c,{size:14})}),a(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-y-0 end-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:y,children:a(w,{size:14,"aria-hidden":`true`})}),a(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:l&&a(X,{errors:p.meta.errors})}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})},ke=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,Ae=e=>Number(e).toLocaleString(),je=(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}},Me=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:s=`none`,value:c=null,unitText:l,decimal:u,placeholder:d,precision:f,wrapperClassName:p,className:m,onChange:h,onValueChange:g,onFocus:_,onBlur:v,...y})=>{let b=k(null),x=k(null),[S,C]=A(c?.toString()??null),w=O(()=>u?.[1]??r,[u,r]),T=O(()=>u&&u[0]-u[1],[u]),j=O(()=>ke(n),[n]),M=E(e=>{if(!w||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=w&&r<=(T??1/0)},[w,T]),N=E(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=je(parseFloat(e),Math.min(w-1,f||0),s).toString().split(`.`),r=Ae(t);return n?`${r}.${n}`:r},[w,f,s]),P=E(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){g?.(0),C(e);return}if(n){C(()=>(g?.(0),e));return}},[g]),ee=E(e=>{h?.(e);let{value:t}=e.target;if(t===``||t===void 0){g?.(null),C(null);return}P(t),!(!j.test(t)||!M(t))&&(g?.(parseFloat(t)||0),C(t))},[M,h,g,P,j]),te=E(e=>{t||(_?.(e),C(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,_]),ne=E(e=>{t||(v?.(e),C(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?N(e):null))},[t,N,v]);return D(()=>{let e=document.activeElement===x.current;if(c==null||!j.test(c.toString())||!M(c.toString())){C(null);return}C(t=>e?t:N(c.toString()))},[N,c,M,j]),D(()=>{if(!b.current||!x.current||!l)return;let e=b.current.offsetWidth;x.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[l]),o(`div`,{className:i(`relative`,p),children:[a(Z,{...y,ref:x,value:S||(t?`0`:``),placeholder:d,disabled:e,readOnly:t,className:i(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,m),onChange:ee,onFocus:te,onBlur:ne}),l&&a(`span`,{ref:b,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:l})]})},Ne=({label:e,description:t,placeholder:n,helperText:r,orientation:s=`responsive`,showErrorMessage:c=!0,rounding:u,decimalPlaces:d,percision:f,unit:p,required:m,allowNegative:h})=>{let g=Q(),_=B(g.form.store,({isSubmitting:e})=>e),v=O(()=>g.state.meta.errors,[g.state.meta.errors]),y=O(()=>m?g.state.value===null:!1,[m,g.state.value]),x=E(e=>{_||g.handleChange(e)},[_,g.handleChange]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:s,"data-invalid":g.state.meta.isTouched&&!g.state.meta.isValid,children:[o(U,{children:[a(G,{htmlFor:g.name,"aria-required":y,children:e}),a(q,{children:t})]}),o(W,{children:[o(`div`,{className:`relative w-full`,children:[a(Me,{id:g.name,value:g.state.value,"aria-invalid":g.state.meta.isTouched&&!g.state.meta.isValid,placeholder:n,roundingRule:u,numberAfterDecimalPoint:d,precision:f,unitText:p,allowNegative:h,className:i(_&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:g.handleBlur,onValueChange:x}),_&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.5 text-muted-weak [&>svg]:size-3.5`,children:a(b,{className:`animate-spin text-primary-strong`})}),c&&!!v.length&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:a(l,{})}),a(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:c&&a(X,{errors:v})})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})},Pe=({label:e,description:t,placeholder:n,orientation:r=`responsive`,helperText:i,showErrorMessage:s=!0})=>{let{form:c,name:l,state:u,handleBlur:d,handleChange:f}=Q(),p=B(c.store,({isSubmitting:e})=>e),[m,h]=A(!1),g=O(()=>u.meta.isTouched&&!u.meta.isValid,[u.meta.isTouched,u.meta.isValid]),y=E(()=>h(e=>!e),[]),b=E(({target:{value:e}})=>{p||f(e||null)},[p,f]);return a(V,{className:`gap-y-4 px-4`,children:o(H,{"data-invalid":g,orientation:r,children:[o(U,{children:[a(G,{htmlFor:l,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:l,type:m?`text`:`password`,placeholder:n,value:u.value??``,"aria-invalid":g,autoComplete:`new-password`,onBlur:d,onChange:b}),a(`button`,{className:`absolute inset-y-0 end-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:y,"aria-label":m?`Hide password`:`Show password`,"aria-pressed":m,"aria-controls":`password`,children:a(m?v:_,{size:16,"aria-hidden":`true`})}),a(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:s&&a(X,{errors:u.meta.errors})}),a(J,{isShow:!!i,children:i})]})]})})};function Fe({className:e,...t}){return a(R.Root,{"data-slot":`radio-group`,className:i(`grid gap-3`,e),...t})}function Ie({className:e,...t}){return a(R.Item,{"data-slot":`radio-group-item`,className:i(`aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus:border-border focus:ring-4 focus:ring-primary-weak`,`aria-invalid:border-danger-strong aria-invalid:ring-danger-weak`,`aria-readonly:pointer-events-none`,`aria-readonly:[&_div]:bg-muted`,`aria-readonly:[&_svg]:fill-muted-weak`,`aria-readonly:[&_svg]:text-muted-weak`,e),...t,children:o(R.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center bg-primary`,children:[a(`div`,{className:`absolute size-4 rounded-full bg-primary`}),a(g,{className:`-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative`})]})})}const Le=({label:e,description:t,orientation:n,options:r,helperText:s})=>{let c=Q(),l=B(c.form.store,({isSubmitting:e})=>e);return o(V,{className:`px-4`,children:[o(H,{orientation:n,className:`flex-col gap-2`,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t}),a(J,{isShow:!!s,children:s})]}),a(W,{children:a(Fe,{defaultValue:c.state.value??void 0,className:`w-full`,onValueChange:c.handleChange,children:r.map(e=>a(G,{className:i(`h-fit`,c.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,l&&`pointer-events-none bg-muted-muted opacity-60`,c.state.value===e.value&&l&&`border-border-strong!`),children:o(H,{orientation:`horizontal`,className:`justify-between rounded p-2!`,children:[o(U,{className:`gap-1!`,children:[a(K,{children:e.label}),a(q,{className:`text-xs`,children:e.description})]}),a(Ie,{value:e.value})]})},e.value))})})]}),a(Y,{})]})};function Re({...e}){return a(z.Root,{"data-slot":`select`,...e})}function ze({...e}){return a(z.Value,{"data-slot":`select-value`,...e})}function Be({className:e,children:t,...n}){return o(z.Trigger,{"data-slot":`select-trigger`,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:text-text-positive-strong`,`focus-visible:outline-primary-strong`,`focus-visible:ring-4`,`focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`aria-invalid:data-[state=open]:outline-danger-strong`,`aria-invalid:data-[state=open]:ring-danger-weak`,`data-placeholder:text-text-positive-muted`,`*:data-[slot=select-value]:line-clamp-1`,`*:data-[slot=select-value]:flex`,`*:data-[slot=select-value]:items-center`,`*:data-[slot=select-value]:gap-2`,`aria-readonly:bg-muted-muted`,`aria-readonly:cursor-default`,`aria-readonly:focus:outline-none`,`aria-readonly:ring-0`,`aria-readonly:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,e),...n,children:[t,a(z.Icon,{asChild:!0,children:a(f,{size:16,opacity:50})})]})}function Ve({className:e,children:t,position:n=`popper`,...r}){return a(z.Portal,{"data-slot":`select-portal`,children:o(z.Content,{"data-slot":`select-content`,className:i(`relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=top]:slide-in-from-bottom-8`,n===`popper`&&`data-[side=bottom]:translate-y-1`,n===`popper`&&`data-[side=left]:-translate-x-1`,n===`popper`&&`data-[side=right]:translate-x-1`,n===`popper`&&`data-[side=top]:-translate-y-1`,e),position:n,...r,children:[a(Ue,{}),a(z.Viewport,{className:i(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1`),children:t}),a(We,{})]})})}function He({className:e,children:t,...n}){return o(z.Item,{"data-slot":`select-item`,className:i(`relative flex select-none items-center`,`gap-2 rounded py-2.5 pr-8 pl-2`,`w-full`,`cursor-pointer outline-none transition-colors`,`font-medium text-sm text-text-positive-weak`,`focus:shadow-xs`,`focus:bg-muted-muted`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,`*:[span]:last:flex`,`*:[span]:last:items-center`,`*:[span]:last:gap-2`,e),...n,children:[a(z.ItemText,{children:t}),a(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:a(z.ItemIndicator,{children:a(d,{size:16})})})]})}function Ue({className:e,...t}){return a(z.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:i(`flex cursor-default items-center justify-center py-1`,e),...t,children:a(h,{size:16})})}function We({className:e,...t}){return a(z.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:i(`flex cursor-default items-center justify-center py-1`,e),...t,children:a(f,{size:16})})}const Ge=({label:e,description:t,placeholder:n,orientation:r=`responsive`,options:i,helperText:s,required:c=!1})=>{let l=Q(),u=O(()=>l.state.meta.isTouched&&!l.state.meta.isValid,[l.state.meta.isTouched,l.state.meta.isValid]),d=O(()=>c?l.state.value===null:!1,[c,l.state.value]),f=O(()=>l.state.meta.errors,[l.state.meta.errors]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:r,"data-invalid":l.state.meta.isTouched&&!l.state.meta.isValid,children:[o(U,{children:[a(G,{htmlFor:l.name,"aria-required":d,children:e}),a(q,{children:t})]}),o(W,{className:`flex flex-col`,children:[o(Re,{defaultValue:l.state.value||void 0,onValueChange:l.handleChange,children:[a(Be,{"aria-invalid":u?`true`:void 0,onBlur:l.handleBlur,children:a(ze,{placeholder:n})}),o(Ve,{children:[!!i.length&&i.map(e=>a(He,{value:e.value,children:e.label},e.value)),!i.length&&o(`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:[a(x,{strokeWidth:1}),`No options available`]})]})]}),a(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:a(X,{errors:f})}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})};function Ke({className:e,...t}){return a(oe.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:a(oe.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 qe=({label:e,description:t,helperText:n})=>{let r=Q();return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[o(U,{children:[a(K,{className:`cursor-pointer`,children:a(`label`,{htmlFor:r.name,children:e})}),a(q,{children:t}),a(Ke,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),a(J,{isShow:!!n,children:n})]}),a(Y,{})]})},Je=({label:e,description:t,placeholder:n,helperText:r,counter:s=!1,orientation:c=`responsive`,showClearButton:u=!1,showErrorMessage:d=!0,required:f=!1,maxLength:p})=>{let{form:m,name:h,state:g,handleBlur:_,handleChange:v}=Q(),y=B(m.store,({isSubmitting:e})=>e),x=O(()=>u&&!y,[u,y]),S=O(()=>g.value?g.value.length:0,[g.value]),C=O(()=>{if(!s)return``;let e=`character${[0,1].includes(S)?``:`s`}`;return s&&p?`${S} / ${p} ${e}`:`${S} ${e}`},[S,s,p]),T=O(()=>g.meta.isTouched&&!g.meta.isValid,[g.meta.isTouched,g.meta.isValid]),D=O(()=>f?g.value===null:!1,[f,g.value]),k=E(({target:{value:e}})=>{y||s&&p&&e.length>p||v(e||null)},[y,s,p,v]),A=E(()=>{y||v(``)},[y,v]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:c,"data-invalid":T,children:[o(U,{children:[a(G,{"aria-required":D,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:h,name:h,value:g.value===null?``:g.value,"aria-invalid":T,autoComplete:`off`,placeholder:n,className:i(`pr-6`,y&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:_,onChange:k}),x&&!g.meta.errors.length&&a(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-y-0 end-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:A,children:a(w,{"aria-hidden":`true`})}),y&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-muted-weak`,children:a(b,{size:14,className:`animate-spin text-primary-strong`})}),d&&!!g.meta.errors.length&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-danger-strong`,children:a(l,{size:14})}),o(`div`,{className:`mt-1 flex w-full items-start gap-x-2`,children:[d&&a(X,{className:`flex-1`,errors:g.meta.errors}),!!s&&a(`p`,{className:`h-4 flex-0 text-nowrap text-end text-text-positive-weak text-xs tabular-nums`,children:C})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})};function Ye({className:e,onChange:t,onValueChange:n,...r}){let o=E(e=>{t?.(e),n?.(e.target.value)},[t,n]);return a(`textarea`,{"data-slot":`textarea`,className:i(`flex min-h-24 w-full bg-transparent px-3 py-2`,`rounded shadow-input transition-[color,box-shadow] duration-200`,`resize-y text-sm text-text-positive-weak tabular-nums caret-primary`,`-outline-offset-1 outline-1 outline-border`,`placeholder:text-text-positive-muted`,`focus:text-text-positive focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`read-only:pointer-events-none read-only:bg-muted-muted read-only:placeholder:text-text-positive-weak`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`disabled:cursor-not-allowed disabled:opacity-50`,`disabled:pointer-events-none`,`disabled:border-border-weak/50 disabled:bg-secondary-muted/10`,e),...r,onChange:o})}const Xe=({label:e,description:t,placeholder:n,helperText:r,counter:s=!1,orientation:c=`responsive`,showErrorMessage:u=!0,required:d=!1,maxLength:f})=>{let{form:p,state:m,name:h,handleBlur:g,handleChange:_}=Q(),v=B(p.store,({isSubmitting:e})=>e),y=O(()=>m.value?m.value.length:0,[m.value]),x=O(()=>{if(!s)return``;let e=`character${[0,1].includes(y)?``:`s`}`;return s&&f?`${y} / ${f} ${e}`:`${y} ${e}`},[y,s,f]),S=O(()=>m.meta.isTouched&&!m.meta.isValid,[m.meta.isTouched,m.meta.isValid]),C=O(()=>m.meta.errors,[m.meta.errors]),w=O(()=>d?m.value===null:!1,[d,m.value]),T=E(({target:{value:e}})=>{v||s&&f&&e.length>f||_(e||null)},[v,s,f,_]);return o(V,{className:`px-4`,children:[o(H,{orientation:c,"data-invalid":S,children:[o(U,{children:[a(G,{"aria-required":w,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Ye,{id:h,name:h,value:m.value===null?``:m.value,"aria-invalid":S,autoComplete:`off`,placeholder:n,className:i(v&&`pointer-events-none bg-muted-muted opacity-60`),onChange:T,onBlur:g}),v&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-muted-weak`,children:a(b,{size:14,className:`animate-spin text-primary-strong`})}),u&&!!C.length&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-danger-strong`,children:a(l,{size:14})}),o(`div`,{className:`mt-1 flex w-full items-start gap-x-2`,children:[u&&a(X,{className:`flex-1`,errors:C}),!!s&&a(`p`,{className:`h-4 flex-0 text-nowrap text-end text-text-positive-weak text-xs tabular-nums`,children:x})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})},Ze=({label:e,className:n})=>{let r=$(),o=E(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return a(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:s})=>a(t,{type:`button`,size:`md`,disabled:r,isLoading:s,className:i(`min-h-8 min-w-32`,n),onClick:o,children:e??`Submit`})})},Qe=({type:e=`create`})=>{let n=$();return o(`div`,{className:`flex h-8 items-center justify-between`,children:[a(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(t,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:e,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Cancel`})}),e===`create`&&a(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>o(t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[a(S,{}),`Add New`]})}),e===`update`&&a(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>o(t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[a(s,{}),`Update`]})})]})};function $e({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return a(ae.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 et=({title:e,description:n,onDelete:r,children:i})=>o(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-3 ring-border-muted`,children:[o(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-1 p-4`,children:[a(`p`,{className:`font-semibold text-lg`,children:e}),!!n&&a(`p`,{className:`text-muted text-sm`,children:n})]}),a($e,{}),a(`div`,{"data-slot":`card-form-main`,className:`flex flex-col space-y-4 py-4`,children:i}),!!r&&o(t,{color:`danger`,variant:`outline`,size:`sm`,className:`absolute top-2 right-2`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[a(C,{}),`Remove`]})]}),tt=({children:e})=>a(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),nt=({...e})=>a(`button`,{...e,type:`button`,className:`min-w-40 cursor-pointer rounded-sm border border-border bg-card px-4 py-2 font-semibold text-sm text-text-positive shadow-xs outline-none transition-all hover:opacity-90 focus:border-border focus:ring-3 focus:ring-border/80 focus:ring-offset-2 focus:drop-shadow-none disabled:pointer-events-none disabled:opacity-60 disabled:drop-shadow-none`,children:`Cancel`}),rt=({isSubmitting:e,submitText:t=`Submit`,...n})=>a(`button`,{...n,type:`button`,"data-loading":e?`true`:void 0,className:`relative min-h-9.5 min-w-40 cursor-pointer rounded-sm border border-primary-strong bg-primary px-4 py-2 font-semibold text-sm text-text-negative shadow-card outline-none transition-all hover:opacity-90 focus:border-transparent focus:ring-3 focus:ring-primary/80 focus:ring-offset-2 focus:drop-shadow-none disabled:pointer-events-none disabled:opacity-60 disabled:drop-shadow-none data-[loading=true]:pointer-events-none data-[loading=true]:opacity-80`,children:e?a(y,{size:16,strokeWidth:3,className:`absolute top-1/2 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2 animate-spin`}):t}),it=({title:e,submitText:t,open:r,onOpenChange:i,children:s})=>{let c=$(),l=E(e=>{e||c.reset(),i?.(e)},[c.reset,i]);return a(I.Root,{open:r,onOpenChange:l,children:o(I.DialogPortal,{"data-slot":`dialog-portal`,children:[a(I.DialogOverlay,{"data-slot":`dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in`}),o(I.Content,{className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 fixed top-1/2 left-1/2 z-50 flex size-full max-h-dvh max-w-dvw -translate-x-1/2 -translate-y-1/2 flex-col gap-0 overflow-y-auto bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:h-auto sm:max-h-[85dvh] sm:max-w-2xl sm:rounded-sm`,children:[a(`div`,{"data-slot":`dialog-header`,className:`flex flex-col items-center justify-center gap-2 px-4 py-6 text-center shadow-sm sm:text-left`,children:a(I.Title,{"data-slot":`dialog-title`,className:`font-medium text-lg text-text-positive-strong leading-none`,children:e})}),a(n,{}),a(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col space-y-4 overflow-y-auto p-0 pt-6 max-sm:flex-1 sm:p-4`,children:s}),a(n,{}),o(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-between gap-2 px-6 py-4 shadow-sm sm:flex-row sm:justify-end max-sm:[&>button]:w-full`,children:[a(c.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>a(nt,{disabled:e,onClick:()=>{c.reset(),l(!1)}})}),a(c.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>a(rt,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>c.handleSubmit()})})]})]})]})})},at=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:r,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t})]}),o(W,{children:[i,a(J,{isShow:!!n,children:n})]})]}),a(Y,{})]}),ot=({title:e,open:t,onOpenChange:n,children:s})=>{let c=$();return a(I.Root,{"data-slot":`dialog`,open:t,onOpenChange:n,children:o(I.Portal,{"data-slot":`dialog-portal`,children:[a(I.Overlay,{"data-slot":`dialog-overlay`,className:i(`fixed inset-0 z-40 bg-black/50 backdrop-blur-sm`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`)}),a(I.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 drop-shadow-lg`,`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:o(`section`,{className:`relative flex size-full flex-col`,children:[a(`header`,{className:`flex h-14 items-center border-border border-b px-4`,children:a(`h2`,{className:`font-semibold text-lg text-primary-strong`,children:e})}),a(`div`,{className:`flex-1 overflow-y-auto py-4`,children:s}),o(`div`,{className:`flex flex-col space-y-4 border-border border-t px-4 py-2`,children:[a(c.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(rt,{isSubmitting:e,disabled:t,className:`w-full`})}),a(c.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(nt,{disabled:e,className:`w-full`,onClick:()=>{c.reset(),n?.(!1)}})})]}),a(I.Close,{asChild:!0,children:a(r,{className:`absolute top-2 right-2`})})]})})]})})},st=({children:e})=>a(`header`,{"data-slot":`section-header`,className:`px-4 pt-2.5 pb-2 font-medium text-base text-primary-strong`,children:e}),ct=({children:e})=>a(`main`,{"data-slot":`section-main`,className:`relative flex flex-col space-y-4 py-4`,children:e}),lt=({title:e,children:t})=>o(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-3 ring-border-muted`,children:[a(st,{children:e}),a($e,{}),a(ct,{children:t})]}),ut=({title:e,description:t,helperText:n})=>o(V,{className:`gap-y-4 px-4`,children:[o(H,{className:`gap-0`,children:[o(U,{children:[a(_e,{className:`mb-1`,children:e}),a(q,{children:t})]}),a(J,{isShow:!!n,children:n})]}),a(Y,{})]}),{fieldContext:dt,formContext:ft,useFieldContext:Q,useFormContext:$}=ce(),{useAppForm:pt,withForm:mt,withFieldGroup:ht}=se({fieldContext:dt,formContext:ft,fieldComponents:{TextField:Je,TextareaField:Xe,NumberField:Ne,EmailField:Oe,PasswordField:Pe,SelectField:Ge,DateField:De,SwitchField:qe,RadioGroupField:Le,CheckboxField:ve},formComponents:{TanStackDialogForm:it,TanStackPopoverForm:ot,TanStackContainerForm:tt,TanStackSectionForm:lt,TanStackCardForm:et,TanStackFieldGroup:at,TanStackTitleField:ut,TanStackActionsForm:Qe,TanStackActionSubmit:Ze}});export{Q as useTanStackFieldContext,pt as useTanStackForm,$ as useTanStackFormContext,ht as withTanStackFieldGroup,mt as withTanStackForm};
1
+ import{n as e}from"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import{t as n}from"../../separator-CWar33xc.mjs";import{t as r}from"../../close-BSZehrQx.mjs";import{cn as i}from"@customafk/react-toolkit/utils";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{ArrowDownToLine as s,AtSignIcon as c,BanIcon as l,CalendarDaysIcon as u,CheckIcon as d,ChevronDownIcon as f,ChevronLeftIcon as p,ChevronRightIcon as m,CircleIcon as h,EyeIcon as g,EyeOffIcon as _,Loader2 as v,Loader2Icon as y,PackagePlusIcon as b,PlusIcon as x,Trash2Icon as S,XIcon as C}from"lucide-react";import{memo as w,useCallback as T,useEffect as E,useMemo as D,useRef as O,useState as k}from"react";import{cva as A}from"class-variance-authority";import{endOfToday as j,endOfTomorrow as M,endOfYesterday as N,format as P,lastDayOfMonth as ee,startOfMonth as te,subDays as F}from"@customafk/react-toolkit/date-fns";import{Checkbox as ne,Dialog as I,Label as re,Popover as L,RadioGroup as R,Select as z,Separator as ie,Switch as ae}from"radix-ui";import{createFormHook as oe,createFormHookContexts as se,useStore as B}from"@tanstack/react-form";import{DayPicker as ce,getDefaultClassNames as le}from"react-day-picker";function ue({className:e,...t}){return a(ne.Root,{"data-slot":`checkbox`,className:i(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-primary-strong`,`focus-visible:ring-3`,`focus-visible:ring-primary-weak`,`aria-invalid:border-danger aria-invalid:ring-danger-weak`,`aria-readonly:bg-muted-muted`,`aria-readonly:pointer-events-none`,`data-[state=checked]:aria-readonly:bg-muted-muted`,`data-[state=checked]:aria-readonly:border-border`,`data-[state=checked]:aria-readonly:text-text-positive-strong`,`data-[state=checked]:bg-primary`,`data-[state=checked]:border-primary-strong`,`data-[state=checked]:text-text-negative-strong`,e),...t,children:a(ne.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:a(d,{size:14})})})}const de=A([`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`}}),fe=({label:e,color:t,size:n,className:r,children:i})=>a(`div`,{"data-slot":`required-indicator`,className:de({color:t,size:n,className:r}),children:e||i});function pe({className:e,children:t,...n}){return o(re.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:[t,a(fe,{label:`Required`,color:`danger`,size:`sm`,className:`hidden`})]})}const me=A(`group/field flex w-full gap-2 data-[invalid=true]:text-danger *:data-[slot=field-content]:gap-0 @md/field-group:*:data-[slot=field-content]:gap-2`,{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`}}),he=w(({className:e,...t})=>a(`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}));he.displayName=`FieldSet`;const ge=w(({className:e,variant:t=`legend`,...n})=>a(`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}));ge.displayName=`FieldLegend`;const V=w(({className:e,...t})=>a(`div`,{"data-slot":`field-group`,className:i(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));V.displayName=`FieldGroup`;const H=w(({className:e,orientation:t=`vertical`,...n})=>a(`div`,{"data-slot":`field`,"data-orientation":t,className:i(me({orientation:t}),e),...n}));H.displayName=`Field`;const U=w(({className:e,...t})=>a(`div`,{"data-slot":`field-content`,className:i(`group/field-content flex flex-col gap-1.5 leading-snug`,e),...t}));U.displayName=`FieldContent`;const W=w(({className:e,...t})=>a(`div`,{"data-slot":`field-content-main`,className:i(`relative`,e),...t})),G=w(({className:e,...t})=>a(pe,{"data-slot":`field-label`,className:i(`group/field-label peer/field-label flex 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}));G.displayName=`FieldLabel`;const K=w(({className:e,...t})=>a(`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}));K.displayName=`FieldTitle`;const q=w(({className:e,...t})=>a(`p`,{"data-slot":`field-description`,className:i(`nth-last-2:-mt-1 font-normal text-sm text-text-positive-weak 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=w(({isShow:e=!0,className:t,...n})=>e===!1?null:a(`div`,{"data-slot":`field-note`,className:i(`text-wrap rounded border border-primary-muted bg-primary-bg-subtle p-2 text-text-positive-weak text-xs`,t),...n}));J.displayName=`FieldNote`;const Y=w(({children:e,className:t,...r})=>o(`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),...r,children:[a(n,{className:`absolute inset-0 top-1/2`}),e&&a(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));Y.displayName=`FieldSeparator`;const X=w(({className:e,children:t,errors:n,...r})=>{let o=D(()=>t||(n?n?.length===1&&n[0]?.message?a(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:a(`p`,{children:n[0].message})}):a(`ul`,{className:`flex list-none flex-col`,children:n.map(e=>typeof e==`string`?a(`li`,{children:e},e):e?.message?a(`li`,{children:e.message},e.message):null)}):null),[t,n]);return o?a(`div`,{role:`alert`,"data-slot":`field-error`,className:i(`w-full font-semibold text-danger-strong text-xs`,e),...r,children:o}):null});X.displayName=`FieldError`;const _e=({label:e,description:t,options:n,helperText:r,orientation:i})=>{let s=Q(),c=B(s.form.store,({isSubmitting:e})=>e);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:i,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t}),a(J,{isShow:!!r,children:r})]}),a(W,{children:a(V,{className:`flex flex-col gap-y-2`,children:n.map(e=>o(H,{orientation:`horizontal`,children:[a(ue,{id:`${s.name}-${e.value}`,name:s.name,checked:s.state.value?.includes(e.value)??!1,disabled:c,onCheckedChange:t=>{if(t&&s.state.value!==null)s.pushValue(e.value);else if(t&&s.state.value===null)s.setValue([e.value]);else if(!t&&s.state.value!==null){let t=s.state.value.indexOf(e.value);t>-1&&s.removeValue(t)}else !t&&s.state.value===null&&s.setValue(null)}}),a(G,{htmlFor:`${s.name}-${e.value}`,className:`text-text-positive`,children:e.label})]},e.value))})})]}),a(Y,{})]})},ve=({rootRef:e,className:t,...n})=>a(`div`,{"data-slot":`calendar`,ref:e,className:i(t),...n}),ye=e=>e.orientation===`left`?a(p,{size:16,className:e.className,...e}):e.orientation===`right`?a(m,{size:16,className:e.className,...e}):a(f,{size:16,className:e.className,...e}),be=({className:e,day:n,modifiers:r,color:o,...s})=>{let c=le(),l=O(null);return E(()=>{r.focused&&l.current?.focus()},[r.focused]),a(t,{ref:l,variant:`ghost`,color:`muted`,"data-day":n.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:i(`flex aspect-square size-9 flex-col rounded font-normal text-sm tabular-nums leading-none`,`data-[selected-single=true]:bg-primary`,`data-[selected-single=true]:text-white`,`data-[range-middle=true]:bg-muted-muted`,`data-[range-middle=true]:text-text-positive`,`data-[range-start=true]:bg-primary-muted`,`data-[range-start=true]:text-text-positive-strong`,`data-[range-end=true]:bg-primary`,`data-[range-end=true]:text-text-positive-strong`,`group-data-[focused=true]/day:border-primary-strong`,`group-data-[focused=true]/day:relative`,`group-data-[focused=true]/day:z-10`,`data-[range-end=true]:rounded`,`data-[range-end=true]:rounded-r`,`data-[range-middle=true]:rounded-none`,`data-[range-start=true]:rounded`,`data-[range-start=true]:rounded-l`,`[&>span]:text-xs [&>span]:opacity-70`,c.day,e),...s})},xe=({children:e,...t})=>a(`td`,{...t,children:a(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})});function Se({className:t,classNames:n,showOutsideDays:r=!0,captionLayout:o=`label`,buttonVariant:s=`ghost`,formatters:c,components:l,...u}){let d=le();return a(ce,{showOutsideDays:r,className:i(`group/calendar bg-background p-3`,`[--cell-size:--spacing(8)]`,`in-data-[slot=card-content]:bg-transparent`,`in-data-[slot=popover-content]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,t),captionLayout:o,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...c},classNames:{root:i(d.root),months:i(`flex gap-4 flex-col md:flex-row relative`,d.months),month:i(`flex flex-col w-full gap-4`,d.month),nav:i(`flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between`,d.nav),button_previous:i(e({variant:`outline`,color:`muted`}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,d.button_previous),button_next:i(e({variant:`outline`,color:`muted`}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,d.button_next),month_caption:i(`flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)`,d.month_caption),dropdowns:i(`w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5`,d.dropdowns),dropdown_root:i(`relative has-focus:border-primary-strong border border-border-weak shadow-xs has-focus:ring-primary-weak has-focus:ring-[3px] rounded`,d.dropdown_root),dropdown:i(`absolute inset-0 opacity-0`,d.dropdown),caption_label:i(`select-none font-medium`,o===`label`&&`text-sm`,o!==`label`&&`rounded shadow-xs px-2 flex items-center gap-0.5 text-sm h-8 [&>svg]:text-text-positive [&>svg]:size-3.5`,d.caption_label),table:`w-full border-collapse`,weekdays:i(`flex`,d.weekdays),weekday:i(`text-text-positive rounded flex-1 font-normal text-[0.8rem] select-none`,d.weekday),week:i(`flex w-full mt-2`,d.week),week_number_header:i(`select-none w-(--cell-size)`,d.week_number_header),week_number:i(`text-[0.8rem] select-none text-text-positive`,d.week_number),day:i(`relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l [&:last-child[data-selected=true]_button]:rounded-r group/day aspect-square select-none`,d.day),range_start:i(`rounded-l bg-muted-muted`,d.range_start),range_middle:i(`rounded-none`,d.range_middle),range_end:i(`rounded-r bg-muted-muted`,d.range_end),today:i(`bg-muted-muted text-text-positive rounded data-[selected=true]:rounded-none`,d.today),outside:i(`[&>button]:text-text-positive-muted aria-selected:text-text-positive`),disabled:i(`bg-muted-muted text-text-positive opacity-50`,d.disabled),hidden:i(`invisible`,d.hidden),...n},components:{Root:ve,Chevron:ye,DayButton:be,WeekNumber:xe,...l},...u})}function Ce({...e}){return a(L.Root,{"data-slot":`popover`,...e})}function we({...e}){return a(L.Trigger,{"data-slot":`popover-trigger`,...e})}function Te({className:e,align:t=`start`,sideOffset:n=4,children:r,...s}){return a(L.Portal,{children:o(L.Content,{"data-slot":`popover-content`,align:t,sideOffset:n,className:i(`relative bg-popover`,`text-text-positive`,`z-50`,`min-w-(--radix-popover-trigger-width)`,`max-h-(--radix-popover-content-available-height)`,`origin-(--radix-popover-content-transform-origin)`,`rounded-md p-4 shadow-dropdown outline-none`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=top]:slide-in-from-bottom-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,e),...s,children:[r,a(L.Arrow,{className:`fill-popover`})]})})}const Ee=({label:e,description:n,placeholder:r,orientation:s=`responsive`,helperText:c,minDate:l,maxDate:d,required:f})=>{let p=Q(),m=D(()=>f?p.state.value===null:!1,[f,p.state.value]),h=D(()=>p.state.meta.isTouched&&!p.state.meta.isValid,[p.state.meta.isTouched,p.state.meta.isValid]);return o(V,{className:`px-4`,children:[o(H,{orientation:s,"data-invalid":h,children:[o(U,{children:[a(G,{htmlFor:p.name,"aria-required":m,children:e}),a(q,{children:n})]}),o(W,{className:`flex flex-col space-y-1`,children:[a(`div`,{className:`flex w-full flex-col`,children:o(Ce,{children:[a(we,{asChild:!0,children:o(t,{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`,p.state.value===null&&`text-text-positive-muted`),children:[a(`p`,{children:p.state.value===null?r||`Select date`:P(p.state.value,`PPPP`)}),a(u,{strokeWidth:1})]})}),o(Te,{align:`start`,side:`bottom`,className:`flex w-fit min-w-0 overflow-y-auto rounded p-0`,onBlur:p.handleBlur,children:[o(`div`,{className:`flex h-full flex-col space-y-2 border-r border-r-border p-2 [&>button]:justify-start [&>button]:text-sm`,children:[a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(j())},children:`Today`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(M())},children:`Tomorrow`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(N())},children:`Yesterday`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(j(),3))},children:`Last 3 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(j(),7))},children:`Last 7 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(F(j(),30))},children:`Last 30 Days`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(te(j()))},children:`This Month`}),a(t,{variant:`ghost`,color:`muted`,className:`w-32`,onClick:()=>{p.handleChange(ee(j()))},children:`Last Month`})]}),a(`div`,{className:`flex flex-1 flex-col`,children:a(`div`,{className:`min-w-73 border-b border-b-border p-2`,children:a(Se,{mode:`single`,selected:p.state.value??void 0,hidden:{before:l??new Date(1900,0,1),after:d??new Date(2100,11,31)},onSelect:e=>{e&&p.handleChange(e)}})})})]})]})}),a(J,{isShow:!!c,children:c})]})]}),a(Y,{})]})},Z=({className:e,onChange:t,onValueChange:n,...r})=>{let o=T(e=>{t?.(e),n?.(e.target.value)},[t,n]);return a(`input`,{"data-slot":`input`,className:i(`w-full min-w-0 bg-transparent px-2.5 py-2 transition-[color,box-shadow]`,`rounded text-sm text-text-positive-weak tabular-nums leading-5 shadow-input placeholder:text-text-positive-muted`,`-outline-offset-1 outline-1 outline-border`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50`,`read-only:pointer-events-none read-only:bg-muted-muted read-only:placeholder:text-text-positive-weak`,`focus:text-text-positive focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`aria-invalid:bg-danger-bg-subtle aria-invalid:outline-danger aria-invalid:ring-danger-weak aria-invalid:focus:outline-danger-strong aria-invalid:focus:ring-4 aria-invalid:placeholder:text-text-positive-weak`,e),...r,onChange:o})},De=({label:e,description:t,placeholder:n,orientation:r=`responsive`,helperText:s,showErrorMessage:l=!0,maxLength:u})=>{let{form:d,name:f,state:p,handleBlur:m,handleChange:h}=Q(),g=B(d.store,({isSubmitting:e})=>e),_=D(()=>p.meta.isTouched&&!p.meta.isValid,[p.meta.isTouched,p.meta.isValid]),v=T(({target:{value:e}})=>{g||u&&e.length>u||h(e||null)},[g,u,h]),y=T(()=>{g||h(null)},[g,h]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{"data-invalid":_,orientation:r,children:[o(U,{children:[a(G,{htmlFor:f,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:f,name:f,value:p.value===null?``:p.value,"aria-invalid":_,autoComplete:`email`,placeholder:n,className:i(`pl-9`,g&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:m,onChange:v}),a(`div`,{className:`absolute top-0 left-0 flex size-9 items-center justify-center text-muted`,children:a(c,{size:14})}),a(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-y-0 end-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:y,children:a(C,{size:14,"aria-hidden":`true`})}),a(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:l&&a(X,{errors:p.meta.errors})}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})},Oe=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,ke=e=>Number(e).toLocaleString(),Ae=(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}},je=({disabled:e=!1,readOnly:t=!1,allowNegative:n=!1,numberAfterDecimalPoint:r=2,roundingRule:s=`none`,value:c=null,unitText:l,decimal:u,placeholder:d,precision:f,wrapperClassName:p,className:m,onChange:h,onValueChange:g,onFocus:_,onBlur:v,...y})=>{let b=O(null),x=O(null),[S,C]=k(c?.toString()??null),w=D(()=>u?.[1]??r,[u,r]),A=D(()=>u&&u[0]-u[1],[u]),j=D(()=>Oe(n),[n]),M=T(e=>{if(!w||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length;return n.length<=w&&r<=(A??1/0)},[w,A]),N=T(e=>{if(e===`0`)return`0`;if(!Number(e))return null;let[t,n=``]=Ae(parseFloat(e),Math.min(w-1,f||0),s).toString().split(`.`),r=ke(t);return n?`${r}.${n}`:r},[w,f,s]),P=T(e=>{let t=e===`0`,n=e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e);if(t){g?.(0),C(e);return}if(n){C(()=>(g?.(0),e));return}},[g]),ee=T(e=>{h?.(e);let{value:t}=e.target;if(t===``||t===void 0){g?.(null),C(null);return}P(t),!(!j.test(t)||!M(t))&&(g?.(parseFloat(t)||0),C(t))},[M,h,g,P,j]),te=T(e=>{t||(_?.(e),C(e=>typeof e==`string`?e.replace(/,/g,``):null))},[t,_]),F=T(e=>{t||(v?.(e),C(e=>e===null?null:e===`0`||e===`-`||/^-0+(\.0+)?$/.test(e)||/^-0*\.$/.test(e)?`0`:typeof e==`string`?N(e):null))},[t,N,v]);return E(()=>{let e=document.activeElement===x.current;if(c==null||!j.test(c.toString())||!M(c.toString())){C(null);return}C(t=>e?t:N(c.toString()))},[N,c,M,j]),E(()=>{if(!b.current||!x.current||!l)return;let e=b.current.offsetWidth;x.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[l]),o(`div`,{className:i(`relative`,p),children:[a(Z,{...y,ref:x,value:S||(t?`0`:``),placeholder:d,disabled:e,readOnly:t,className:i(`text-end font-number text-sm slashed-zero lining-nums tabular-nums`,t&&`bg-muted text-muted-foreground`,m),onChange:ee,onFocus:te,onBlur:F}),l&&a(`span`,{ref:b,className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-2 text-muted-foreground text-sm`,children:l})]})},Me=({label:e,description:t,placeholder:n,helperText:r,orientation:s=`responsive`,showErrorMessage:c=!0,rounding:u,decimalPlaces:d,percision:f,unit:p,required:m,allowNegative:h})=>{let g=Q(),_=B(g.form.store,({isSubmitting:e})=>e),v=D(()=>g.state.meta.errors,[g.state.meta.errors]),b=D(()=>m?g.state.value===null:!1,[m,g.state.value]),x=T(e=>{_||g.handleChange(e)},[_,g.handleChange]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:s,"data-invalid":g.state.meta.isTouched&&!g.state.meta.isValid,children:[o(U,{children:[a(G,{htmlFor:g.name,"aria-required":b,children:e}),a(q,{children:t})]}),o(W,{children:[o(`div`,{className:`relative w-full`,children:[a(je,{id:g.name,value:g.state.value,"aria-invalid":g.state.meta.isTouched&&!g.state.meta.isValid,placeholder:n,roundingRule:u,numberAfterDecimalPoint:d,precision:f,unitText:p,allowNegative:h,className:i(_&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:g.handleBlur,onValueChange:x}),_&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.5 text-muted-weak [&>svg]:size-3.5`,children:a(y,{className:`animate-spin text-primary-strong`})}),c&&!!v.length&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:a(l,{})}),a(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:c&&a(X,{errors:v})})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})},Ne=({label:e,description:t,placeholder:n,orientation:r=`responsive`,helperText:i,showErrorMessage:s=!0})=>{let{form:c,name:l,state:u,handleBlur:d,handleChange:f}=Q(),p=B(c.store,({isSubmitting:e})=>e),[m,h]=k(!1),v=D(()=>u.meta.isTouched&&!u.meta.isValid,[u.meta.isTouched,u.meta.isValid]),y=T(()=>h(e=>!e),[]),b=T(({target:{value:e}})=>{p||f(e||null)},[p,f]);return a(V,{className:`gap-y-4 px-4`,children:o(H,{"data-invalid":v,orientation:r,children:[o(U,{children:[a(G,{htmlFor:l,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:l,type:m?`text`:`password`,placeholder:n,value:u.value??``,"aria-invalid":v,autoComplete:`new-password`,onBlur:d,onChange:b}),a(`button`,{className:`absolute inset-y-0 end-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:y,"aria-label":m?`Hide password`:`Show password`,"aria-pressed":m,"aria-controls":`password`,children:a(m?_:g,{size:16,"aria-hidden":`true`})}),a(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:s&&a(X,{errors:u.meta.errors})}),a(J,{isShow:!!i,children:i})]})]})})};function Pe({className:e,...t}){return a(R.Root,{"data-slot":`radio-group`,className:i(`grid gap-3`,e),...t})}function Fe({className:e,...t}){return a(R.Item,{"data-slot":`radio-group-item`,className:i(`aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus:border-border focus:ring-4 focus:ring-primary-weak`,`aria-invalid:border-danger-strong aria-invalid:ring-danger-weak`,`aria-readonly:pointer-events-none`,`aria-readonly:[&_div]:bg-muted`,`aria-readonly:[&_svg]:fill-muted-weak`,`aria-readonly:[&_svg]:text-muted-weak`,e),...t,children:o(R.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center bg-primary`,children:[a(`div`,{className:`absolute size-4 rounded-full bg-primary`}),a(h,{className:`-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative`})]})})}const Ie=({label:e,description:t,orientation:n,options:r,helperText:s})=>{let c=Q(),l=B(c.form.store,({isSubmitting:e})=>e);return o(V,{className:`px-4`,children:[o(H,{orientation:n,className:`flex-col gap-2`,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t}),a(J,{isShow:!!s,children:s})]}),a(W,{children:a(Pe,{defaultValue:c.state.value??void 0,className:`w-full`,onValueChange:c.handleChange,children:r.map(e=>a(G,{className:i(`h-fit`,c.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,l&&`pointer-events-none bg-muted-muted opacity-60`,c.state.value===e.value&&l&&`border-border-strong!`),children:o(H,{orientation:`horizontal`,className:`justify-between rounded p-2!`,children:[o(U,{className:`gap-1!`,children:[a(K,{children:e.label}),a(q,{className:`text-xs`,children:e.description})]}),a(Fe,{value:e.value})]})},e.value))})})]}),a(Y,{})]})};function Le({...e}){return a(z.Root,{"data-slot":`select`,...e})}function Re({...e}){return a(z.Value,{"data-slot":`select-value`,...e})}function ze({className:e,children:t,...n}){return o(z.Trigger,{"data-slot":`select-trigger`,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:text-text-positive-strong`,`focus-visible:outline-primary-strong`,`focus-visible:ring-4`,`focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`aria-invalid:data-[state=open]:outline-danger-strong`,`aria-invalid:data-[state=open]:ring-danger-weak`,`data-placeholder:text-text-positive-muted`,`*:data-[slot=select-value]:line-clamp-1`,`*:data-[slot=select-value]:flex`,`*:data-[slot=select-value]:items-center`,`*:data-[slot=select-value]:gap-2`,`aria-readonly:bg-muted-muted`,`aria-readonly:cursor-default`,`aria-readonly:focus:outline-none`,`aria-readonly:ring-0`,`aria-readonly:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,e),...n,children:[t,a(z.Icon,{asChild:!0,children:a(f,{size:16,opacity:50})})]})}function Be({className:e,children:t,position:n=`popper`,...r}){return a(z.Portal,{"data-slot":`select-portal`,children:a(z.Content,{"data-slot":`select-content`,className:i(`relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=top]:slide-in-from-bottom-8`,n===`popper`&&`data-[side=bottom]:translate-y-1`,n===`popper`&&`data-[side=left]:-translate-x-1`,n===`popper`&&`data-[side=right]:translate-x-1`,n===`popper`&&`data-[side=top]:-translate-y-1`,e),position:n,...r,children:a(z.Viewport,{className:i(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1`),children:t})})})}function Ve({className:e,children:t,...n}){return o(z.Item,{"data-slot":`select-item`,className:i(`relative flex select-none items-center`,`gap-2 rounded py-2.5 pr-8 pl-2`,`w-full`,`cursor-pointer outline-none transition-colors`,`font-medium text-sm text-text-positive-weak`,`focus:shadow-xs`,`focus:bg-muted-muted`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,`*:[span]:last:flex`,`*:[span]:last:items-center`,`*:[span]:last:gap-2`,e),...n,children:[a(z.ItemText,{children:t}),a(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:a(z.ItemIndicator,{children:a(d,{size:16})})})]})}const He=({label:e,description:t,placeholder:n,orientation:r=`responsive`,options:i,helperText:s,required:c=!1})=>{let l=Q(),u=D(()=>l.state.meta.isTouched&&!l.state.meta.isValid,[l.state.meta.isTouched,l.state.meta.isValid]),d=D(()=>c?l.state.value===null:!1,[c,l.state.value]),f=D(()=>l.state.meta.errors,[l.state.meta.errors]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:r,"data-invalid":l.state.meta.isTouched&&!l.state.meta.isValid,children:[o(U,{children:[a(G,{htmlFor:l.name,"aria-required":d,children:e}),a(q,{children:t})]}),o(W,{className:`flex flex-col`,children:[o(Le,{defaultValue:l.state.value||void 0,onValueChange:l.handleChange,children:[a(ze,{"aria-invalid":u?`true`:void 0,onBlur:l.handleBlur,children:a(Re,{placeholder:n})}),o(Be,{children:[!!i.length&&i.map(e=>a(Ve,{value:e.value,children:e.label},e.value)),!i.length&&o(`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:[a(b,{strokeWidth:1}),`No options available`]})]})]}),a(`div`,{className:`mt-1 flex w-full flex-col items-end justify-end`,children:a(X,{errors:f})}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})};function Ue({className:e,...t}){return a(ae.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:a(ae.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 We=({label:e,description:t,helperText:n})=>{let r=Q();return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:`vertical`,className:`relative justify-between gap-y-1`,children:[o(U,{children:[a(K,{className:`cursor-pointer`,children:a(`label`,{htmlFor:r.name,children:e})}),a(q,{children:t}),a(Ue,{id:r.name,checked:r.state.value??!1,className:`absolute top-1 right-1`,onBlur:r.handleBlur,onCheckedChange:r.handleChange})]}),a(J,{isShow:!!n,children:n})]}),a(Y,{})]})},Ge=({label:e,description:t,placeholder:n,helperText:r,counter:s=!1,orientation:c=`responsive`,showClearButton:u=!1,showErrorMessage:d=!0,required:f=!1,maxLength:p})=>{let{form:m,name:h,state:g,handleBlur:_,handleChange:v}=Q(),b=B(m.store,({isSubmitting:e})=>e),x=D(()=>u&&!b,[u,b]),S=D(()=>g.value?g.value.length:0,[g.value]),w=D(()=>{if(!s)return``;let e=`character${[0,1].includes(S)?``:`s`}`;return s&&p?`${S} / ${p} ${e}`:`${S} ${e}`},[S,s,p]),E=D(()=>g.meta.isTouched&&!g.meta.isValid,[g.meta.isTouched,g.meta.isValid]),O=D(()=>f?g.value===null:!1,[f,g.value]),k=T(({target:{value:e}})=>{b||s&&p&&e.length>p||v(e||null)},[b,s,p,v]),A=T(()=>{b||v(``)},[b,v]);return o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:c,"data-invalid":E,children:[o(U,{children:[a(G,{"aria-required":O,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Z,{id:h,name:h,value:g.value===null?``:g.value,"aria-invalid":E,autoComplete:`off`,placeholder:n,className:i(`pr-6`,b&&`pointer-events-none bg-muted-muted opacity-60`),onBlur:_,onChange:k}),x&&!g.meta.errors.length&&a(`button`,{type:`button`,"aria-label":`Clear`,className:`absolute inset-y-0 end-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:A,children:a(C,{"aria-hidden":`true`})}),b&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-muted-weak`,children:a(y,{size:14,className:`animate-spin text-primary-strong`})}),d&&!!g.meta.errors.length&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-danger-strong`,children:a(l,{size:14})}),o(`div`,{className:`mt-1 flex w-full items-start gap-x-2`,children:[d&&a(X,{className:`flex-1`,errors:g.meta.errors}),!!s&&a(`p`,{className:`h-4 flex-0 text-nowrap text-end text-text-positive-weak text-xs tabular-nums`,children:w})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})};function Ke({className:e,onChange:t,onValueChange:n,...r}){let o=T(e=>{t?.(e),n?.(e.target.value)},[t,n]);return a(`textarea`,{"data-slot":`textarea`,className:i(`flex min-h-24 w-full bg-transparent px-3 py-2`,`rounded shadow-input transition-[color,box-shadow] duration-200`,`resize-y text-sm text-text-positive-weak tabular-nums caret-primary`,`-outline-offset-1 outline-1 outline-border`,`placeholder:text-text-positive-muted`,`focus:text-text-positive focus:outline-primary-strong focus:ring-4 focus:ring-primary-weak`,`read-only:pointer-events-none read-only:bg-muted-muted read-only:placeholder:text-text-positive-weak`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`disabled:cursor-not-allowed disabled:opacity-50`,`disabled:pointer-events-none`,`disabled:border-border-weak/50 disabled:bg-secondary-muted/10`,e),...r,onChange:o})}const qe=({label:e,description:t,placeholder:n,helperText:r,counter:s=!1,orientation:c=`responsive`,showErrorMessage:u=!0,required:d=!1,maxLength:f})=>{let{form:p,state:m,name:h,handleBlur:g,handleChange:_}=Q(),v=B(p.store,({isSubmitting:e})=>e),b=D(()=>m.value?m.value.length:0,[m.value]),x=D(()=>{if(!s)return``;let e=`character${[0,1].includes(b)?``:`s`}`;return s&&f?`${b} / ${f} ${e}`:`${b} ${e}`},[b,s,f]),S=D(()=>m.meta.isTouched&&!m.meta.isValid,[m.meta.isTouched,m.meta.isValid]),C=D(()=>m.meta.errors,[m.meta.errors]),w=D(()=>d?m.value===null:!1,[d,m.value]),E=T(({target:{value:e}})=>{v||s&&f&&e.length>f||_(e||null)},[v,s,f,_]);return o(V,{className:`px-4`,children:[o(H,{orientation:c,"data-invalid":S,children:[o(U,{children:[a(G,{"aria-required":w,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Ke,{id:h,name:h,value:m.value===null?``:m.value,"aria-invalid":S,autoComplete:`off`,placeholder:n,className:i(v&&`pointer-events-none bg-muted-muted opacity-60`),onChange:E,onBlur:g}),v&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-muted-weak`,children:a(y,{size:14,className:`animate-spin text-primary-strong`})}),u&&!!C.length&&a(`div`,{className:`absolute inset-y-0 end-2 top-2.5 text-danger-strong`,children:a(l,{size:14})}),o(`div`,{className:`mt-1 flex w-full items-start gap-x-2`,children:[u&&a(X,{className:`flex-1`,errors:C}),!!s&&a(`p`,{className:`h-4 flex-0 text-nowrap text-end text-text-positive-weak text-xs tabular-nums`,children:x})]}),a(J,{isShow:!!r,children:r})]})]}),a(Y,{})]})},Je=({label:e,className:n})=>{let r=$(),o=T(async()=>{await r.handleSubmit({submitAction:`submit`}),r.state.isSubmitSuccessful&&r.reset()},[r]);return a(r.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:r,isSubmitting:s})=>a(t,{type:`button`,size:`md`,disabled:r,isLoading:s,className:i(`min-h-8 min-w-32`,n),onClick:o,children:e??`Submit`})})},Ye=({type:e=`create`})=>{let n=$();return o(`div`,{className:`flex h-8 items-center justify-between`,children:[a(n.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(t,{color:`muted`,variant:`outline`,type:`button`,size:`md`,disabled:e,className:`h-full min-w-32`,onClick:()=>n.reset(),children:`Cancel`})}),e===`create`&&a(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>o(t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`create`}),n.state.isSubmitSuccessful&&n.reset()},children:[a(x,{}),`Add New`]})}),e===`update`&&a(n.Subscribe,{selector:e=>({disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit||e.isDefaultValue,isSubmitting:e.isSubmitting}),children:({disabled:e,isSubmitting:r})=>o(t,{type:`submit`,size:`md`,disabled:e,isLoading:r,className:`h-full min-w-32`,onClick:async()=>{await n.handleSubmit({submitAction:`update`}),n.state.isSubmitSuccessful&&n.reset()},children:[a(s,{}),`Update`]})})]})};function Xe({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return a(ie.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 Ze=({title:e,description:n,onDelete:r,children:i})=>o(`section`,{"data-slot":`card-form`,className:`relative flex flex-col rounded-md bg-card pb-4 shadow-card ring-4 ring-border-weak`,children:[o(`div`,{"data-slot":`card-form-header`,className:`flex flex-col space-y-1 p-4`,children:[a(`p`,{className:`font-semibold text-lg`,children:e}),!!n&&a(`p`,{className:`text-muted text-sm`,children:n})]}),a(Xe,{}),a(`div`,{"data-slot":`card-form-main`,className:`flex flex-col space-y-4 py-4`,children:i}),!!r&&o(t,{color:`danger`,variant:`outline`,size:`sm`,className:`absolute top-2 right-2`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[a(S,{}),`Remove`]})]}),Qe=({children:e})=>a(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),$e=({...e})=>a(`button`,{...e,type:`button`,className:`min-w-40 cursor-pointer rounded-sm border border-border bg-card px-4 py-2 font-semibold text-sm text-text-positive shadow-xs outline-none transition-all hover:opacity-90 focus:border-border focus:ring-3 focus:ring-border/80 focus:ring-offset-2 focus:drop-shadow-none disabled:pointer-events-none disabled:opacity-60 disabled:drop-shadow-none`,children:`Cancel`}),et=({isSubmitting:e,submitText:t=`Submit`,...n})=>a(`button`,{...n,type:`button`,"data-loading":e?`true`:void 0,className:`relative min-h-9.5 min-w-40 cursor-pointer rounded-sm border border-primary-strong bg-primary px-4 py-2 font-semibold text-sm text-text-negative shadow-card outline-none transition-all hover:opacity-90 focus:border-transparent focus:ring-3 focus:ring-primary/80 focus:ring-offset-2 focus:drop-shadow-none disabled:pointer-events-none disabled:opacity-60 disabled:drop-shadow-none data-[loading=true]:pointer-events-none data-[loading=true]:opacity-80`,children:e?a(v,{size:16,strokeWidth:3,className:`absolute top-1/2 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2 animate-spin`}):t}),tt=({title:e,submitText:t,open:r,onOpenChange:i,children:s})=>{let c=$(),l=T(e=>{e||c.reset(),i?.(e)},[c.reset,i]);return a(I.Root,{open:r,onOpenChange:l,children:o(I.DialogPortal,{"data-slot":`dialog-portal`,children:[a(I.DialogOverlay,{"data-slot":`dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in`}),o(I.Content,{className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 fixed top-1/2 left-1/2 z-50 flex size-full max-h-dvh max-w-dvw -translate-x-1/2 -translate-y-1/2 flex-col gap-0 overflow-y-auto bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:h-auto sm:max-h-[85dvh] sm:max-w-2xl sm:rounded-sm`,children:[a(`div`,{"data-slot":`dialog-header`,className:`flex flex-col items-center justify-center gap-2 px-4 py-6 text-center shadow-sm sm:text-left`,children:a(I.Title,{"data-slot":`dialog-title`,className:`font-medium text-lg text-text-positive-strong leading-none`,children:e})}),a(n,{}),a(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col space-y-4 overflow-y-auto p-0 pt-6 max-sm:flex-1 sm:p-4`,children:s}),a(n,{}),o(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-between gap-2 px-6 py-4 shadow-sm sm:flex-row sm:justify-end max-sm:[&>button]:w-full`,children:[a(c.Subscribe,{selector:e=>({disabled:e.isSubmitting}),children:({disabled:e})=>a($e,{disabled:e,onClick:()=>{c.reset(),l(!1)}})}),a(c.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:n})=>a(et,{isSubmitting:e,disabled:n,submitText:t,onClick:()=>c.handleSubmit()})})]})]})]})})},nt=({label:e,description:t,helperText:n,orientation:r=`responsive`,children:i})=>o(V,{className:`gap-y-4 px-4`,children:[o(H,{orientation:r,children:[o(U,{children:[a(G,{children:e}),a(q,{children:t})]}),o(W,{children:[i,a(J,{isShow:!!n,children:n})]})]}),a(Y,{})]}),rt=({title:e,open:t,onOpenChange:n,children:s})=>{let c=$();return a(I.Root,{"data-slot":`dialog`,open:t,onOpenChange:n,children:o(I.Portal,{"data-slot":`dialog-portal`,children:[a(I.Overlay,{"data-slot":`dialog-overlay`,className:i(`fixed inset-0 z-40 bg-black/50 backdrop-blur-sm`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`)}),a(I.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 drop-shadow-lg`,`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:o(`section`,{className:`relative flex size-full flex-col`,children:[a(`header`,{className:`flex h-14 items-center border-border border-b px-4`,children:a(`h2`,{className:`font-semibold text-lg text-primary-strong`,children:e})}),a(`div`,{className:`flex-1 overflow-y-auto py-4`,children:s}),o(`div`,{className:`flex flex-col space-y-4 border-border border-t px-4 py-2`,children:[a(c.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(et,{isSubmitting:e,disabled:t,className:`w-full`})}),a(c.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a($e,{disabled:e,className:`w-full`,onClick:()=>{c.reset(),n?.(!1)}})})]}),a(I.Close,{asChild:!0,children:a(r,{className:`absolute top-2 right-2`})})]})})]})})},it=({children:e})=>a(`header`,{"data-slot":`section-header`,className:`px-4 pt-2.5 pb-2 font-medium text-base text-primary-strong`,children:e}),at=({children:e})=>a(`main`,{"data-slot":`section-main`,className:`relative flex flex-col space-y-4 py-4`,children:e}),ot=({title:e,children:t})=>o(`section`,{"data-slot":`section-form`,className:`flex flex-col rounded-md bg-background shadow-card ring-4 ring-border-weak`,children:[a(it,{children:e}),a(Xe,{}),a(at,{children:t})]}),st=({title:e,description:t,helperText:n})=>o(V,{className:`gap-y-4 px-4`,children:[o(H,{className:`gap-0`,children:[o(U,{children:[a(ge,{className:`mb-1`,children:e}),a(q,{children:t})]}),a(J,{isShow:!!n,children:n})]}),a(Y,{})]}),{fieldContext:ct,formContext:lt,useFieldContext:Q,useFormContext:$}=se(),{useAppForm:ut,withForm:dt,withFieldGroup:ft}=oe({fieldContext:ct,formContext:lt,fieldComponents:{TextField:Ge,TextareaField:qe,NumberField:Me,EmailField:De,PasswordField:Ne,SelectField:He,DateField:Ee,SwitchField:We,RadioGroupField:Ie,CheckboxField:_e},formComponents:{TanStackDialogForm:tt,TanStackPopoverForm:rt,TanStackContainerForm:Qe,TanStackSectionForm:ot,TanStackCardForm:Ze,TanStackFieldGroup:nt,TanStackTitleField:st,TanStackActionsForm:Ye,TanStackActionSubmit:Je}});export{Q as useTanStackFieldContext,ut as useTanStackForm,$ as useTanStackFormContext,ft as withTanStackFieldGroup,dt as withTanStackForm};
2
2
  //# sourceMappingURL=index.mjs.map