@customafk/lunas-ui 0.1.38 → 0.1.40

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 (143) hide show
  1. package/dist/{button-BfD1nnu2.d.mts → button-CPSR8ewr.d.mts} +6 -6
  2. package/dist/{button-D3D_wI9S.d.cts → button-DM5NJ-7F.d.cts} +6 -6
  3. package/dist/cards/simple-card.d.mts +2 -2
  4. package/dist/data-display/statistic.d.cts +2 -2
  5. package/dist/data-display/statistic.d.mts +2 -2
  6. package/dist/{dialog-rzSsCBX_.d.mts → dialog-B2-c4OTw.d.cts} +12 -12
  7. package/dist/{dialog-Bs94A-jH.d.cts → dialog-EzJiDxrJ.d.mts} +12 -12
  8. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
  9. package/dist/dialogs/detail-dialog/component/sidebar.d.mts +30 -30
  10. package/dist/features/search-modal/index.d.cts +2 -2
  11. package/dist/features/search-modal/index.d.mts +2 -2
  12. package/dist/features/tables/index.d.cts +3 -3
  13. package/dist/features/tables/index.d.mts +1 -1
  14. package/dist/features/tanstack-form/index.cjs +1 -1
  15. package/dist/features/tanstack-form/index.cjs.map +1 -1
  16. package/dist/features/tanstack-form/index.d.cts +42 -42
  17. package/dist/features/tanstack-form/index.d.mts +42 -42
  18. package/dist/features/tanstack-form/index.mjs +1 -1
  19. package/dist/features/tanstack-form/index.mjs.map +1 -1
  20. package/dist/{input-B8J25del.d.mts → input-CMXa_99w.d.cts} +4 -4
  21. package/dist/{input-BxB2kOtA.d.cts → input-LDpzfNmy.d.mts} +4 -4
  22. package/dist/layouts/app-layout/index.d.cts +26 -26
  23. package/dist/layouts/app-layout/index.d.mts +3 -3
  24. package/dist/layouts/flex.d.cts +6 -6
  25. package/dist/layouts/flex.d.mts +4 -4
  26. package/dist/layouts/service-layout/index.d.cts +11 -11
  27. package/dist/layouts/service-layout/index.d.mts +3 -3
  28. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  29. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  30. package/dist/pages/FeatureFixing.d.cts +2 -2
  31. package/dist/pages/FeatureFixing.d.mts +2 -2
  32. package/dist/pages/NotAuthorized.d.cts +2 -2
  33. package/dist/pages/NotFound.d.mts +2 -2
  34. package/dist/{separator-Bs_kYqPR.d.mts → separator-D9m7b_32.d.mts} +3 -3
  35. package/dist/{separator-CEprBJmo.d.cts → separator-HDjiaARy.d.cts} +3 -3
  36. package/dist/{tooltip-D0W6tiZr.d.cts → tooltip-B5gO2RGs.d.cts} +6 -6
  37. package/dist/{tooltip-wRJCjob_.d.mts → tooltip-WI0fJ7gP.d.mts} +6 -6
  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 +4 -4
  51. package/dist/ui/badge.d.mts +4 -4
  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 +7 -7
  55. package/dist/ui/button-group.d.mts +5 -5
  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/collapsible.d.cts +4 -4
  65. package/dist/ui/collapsible.d.mts +4 -4
  66. package/dist/ui/command.d.cts +11 -11
  67. package/dist/ui/command.d.mts +11 -11
  68. package/dist/ui/context-menu.d.cts +16 -16
  69. package/dist/ui/context-menu.d.mts +16 -16
  70. package/dist/ui/dialog.d.cts +1 -1
  71. package/dist/ui/dialog.d.mts +1 -1
  72. package/dist/ui/drawer.d.cts +11 -11
  73. package/dist/ui/drawer.d.mts +11 -11
  74. package/dist/ui/dropdown-menu.d.cts +16 -16
  75. package/dist/ui/dropdown-menu.d.mts +16 -16
  76. package/dist/ui/empty.d.cts +9 -9
  77. package/dist/ui/empty.d.mts +9 -9
  78. package/dist/ui/field.d.cts +24 -24
  79. package/dist/ui/field.d.mts +24 -24
  80. package/dist/ui/file-uploader.d.cts +2 -2
  81. package/dist/ui/file-uploader.d.mts +2 -2
  82. package/dist/ui/form.d.cts +11 -11
  83. package/dist/ui/form.d.mts +7 -7
  84. package/dist/ui/hover-card.d.cts +4 -4
  85. package/dist/ui/hover-card.d.mts +4 -4
  86. package/dist/ui/input-otp.d.cts +5 -5
  87. package/dist/ui/input-otp.d.mts +5 -5
  88. package/dist/ui/input.d.cts +1 -1
  89. package/dist/ui/input.d.mts +1 -1
  90. package/dist/ui/inputs/search-input.d.cts +3 -3
  91. package/dist/ui/inputs/search-input.d.mts +3 -3
  92. package/dist/ui/item.d.cts +16 -16
  93. package/dist/ui/item.d.mts +16 -16
  94. package/dist/ui/label.d.cts +2 -2
  95. package/dist/ui/label.d.mts +2 -2
  96. package/dist/ui/menubar.d.cts +17 -17
  97. package/dist/ui/menubar.d.mts +17 -17
  98. package/dist/ui/multi-select.d.mts +3 -3
  99. package/dist/ui/navigation-menu.d.cts +11 -11
  100. package/dist/ui/navigation-menu.d.mts +11 -11
  101. package/dist/ui/pagination.d.cts +9 -9
  102. package/dist/ui/pagination.d.mts +9 -9
  103. package/dist/ui/popover.d.cts +5 -5
  104. package/dist/ui/popover.d.mts +5 -5
  105. package/dist/ui/progress.d.cts +2 -2
  106. package/dist/ui/progress.d.mts +2 -2
  107. package/dist/ui/radio-group.d.cts +3 -3
  108. package/dist/ui/radio-group.d.mts +3 -3
  109. package/dist/ui/resizable.d.cts +4 -4
  110. package/dist/ui/resizable.d.mts +4 -4
  111. package/dist/ui/scroll-area.d.cts +6 -6
  112. package/dist/ui/scroll-area.d.mts +6 -6
  113. package/dist/ui/select.d.cts +11 -11
  114. package/dist/ui/select.d.mts +11 -11
  115. package/dist/ui/separator.d.cts +1 -1
  116. package/dist/ui/separator.d.mts +1 -1
  117. package/dist/ui/sheet.d.cts +9 -9
  118. package/dist/ui/sheet.d.mts +9 -9
  119. package/dist/ui/sidebar.d.cts +28 -28
  120. package/dist/ui/sidebar.d.mts +30 -30
  121. package/dist/ui/skeleton.d.cts +2 -2
  122. package/dist/ui/skeleton.d.mts +2 -2
  123. package/dist/ui/slider.d.cts +2 -2
  124. package/dist/ui/slider.d.mts +2 -2
  125. package/dist/ui/sonner.d.cts +2 -2
  126. package/dist/ui/sonner.d.mts +2 -2
  127. package/dist/ui/spinner.d.cts +2 -2
  128. package/dist/ui/spinner.d.mts +2 -2
  129. package/dist/ui/switch.d.cts +2 -2
  130. package/dist/ui/switch.d.mts +2 -2
  131. package/dist/ui/table.d.cts +18 -18
  132. package/dist/ui/table.d.mts +9 -9
  133. package/dist/ui/tabs.d.cts +5 -5
  134. package/dist/ui/tabs.d.mts +5 -5
  135. package/dist/ui/textarea.d.cts +2 -2
  136. package/dist/ui/textarea.d.mts +2 -2
  137. package/dist/ui/toggle-group.d.cts +3 -3
  138. package/dist/ui/toggle-group.d.mts +3 -3
  139. package/dist/ui/toggle.d.cts +4 -4
  140. package/dist/ui/toggle.d.mts +4 -4
  141. package/dist/ui/tooltip.d.cts +1 -1
  142. package/dist/ui/tooltip.d.mts +1 -1
  143. package/package.json +1 -1
@@ -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" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
34
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "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" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
62
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "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" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
102
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "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" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
122
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "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;
128
129
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
129
130
  tooltip?: string | 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" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
159
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "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" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
180
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
181
181
  required?: boolean;
182
182
  minDate?: Date;
183
183
  maxDate?: Date;
@@ -271,7 +271,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
271
271
  showClearButton?: boolean | undefined;
272
272
  description?: string | undefined;
273
273
  placeholder?: string | undefined;
274
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
274
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
275
275
  required?: boolean;
276
276
  maxLength?: number;
277
277
  }>;
@@ -299,7 +299,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
299
299
  counter?: boolean | undefined;
300
300
  description?: string | undefined;
301
301
  placeholder?: string | undefined;
302
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
302
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
303
303
  required?: boolean;
304
304
  maxLength?: number;
305
305
  }>;
@@ -339,7 +339,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
339
339
  unit?: string | undefined;
340
340
  description?: string | undefined;
341
341
  placeholder?: string | undefined;
342
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
342
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
343
343
  required?: boolean;
344
344
  allowNegative?: boolean;
345
345
  }>;
@@ -359,15 +359,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
359
359
  showErrorMessage?: boolean | undefined;
360
360
  description?: string | undefined;
361
361
  placeholder?: string | undefined;
362
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
362
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
363
363
  maxLength?: number;
364
364
  }>;
365
365
  readonly PasswordField: react26.FC<{
366
366
  description?: string | undefined;
367
367
  label: string;
368
+ placeholder?: string | undefined;
368
369
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
369
370
  tooltip?: string | undefined;
370
- placeholder?: string | undefined;
371
371
  helperText?: string | undefined;
372
372
  showErrorMessage?: boolean | undefined;
373
373
  }>;
@@ -396,7 +396,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
396
396
  defaultValue?: string | undefined;
397
397
  description?: string | undefined;
398
398
  placeholder?: string | undefined;
399
- }, "description" | "label" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
399
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
400
400
  required?: boolean;
401
401
  }>;
402
402
  readonly DateField: react26.FC<Pick<{
@@ -417,7 +417,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
417
417
  defaultValue?: string | undefined;
418
418
  description?: string | undefined;
419
419
  placeholder?: string | undefined;
420
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
420
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
421
421
  required?: boolean;
422
422
  minDate?: Date;
423
423
  maxDate?: Date;
@@ -509,7 +509,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
509
509
  showClearButton?: boolean | undefined;
510
510
  description?: string | undefined;
511
511
  placeholder?: string | undefined;
512
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
512
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
513
513
  required?: boolean;
514
514
  maxLength?: number;
515
515
  }>;
@@ -537,7 +537,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
537
537
  counter?: boolean | undefined;
538
538
  description?: string | undefined;
539
539
  placeholder?: string | undefined;
540
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
540
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
541
541
  required?: boolean;
542
542
  maxLength?: number;
543
543
  }>;
@@ -577,7 +577,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
577
577
  unit?: string | undefined;
578
578
  description?: string | undefined;
579
579
  placeholder?: string | undefined;
580
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
580
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
581
581
  required?: boolean;
582
582
  allowNegative?: boolean;
583
583
  }>;
@@ -597,15 +597,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
597
597
  showErrorMessage?: boolean | undefined;
598
598
  description?: string | undefined;
599
599
  placeholder?: string | undefined;
600
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
600
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
601
601
  maxLength?: number;
602
602
  }>;
603
603
  readonly PasswordField: react26.FC<{
604
604
  description?: string | undefined;
605
605
  label: string;
606
+ placeholder?: string | undefined;
606
607
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
607
608
  tooltip?: string | undefined;
608
- placeholder?: string | undefined;
609
609
  helperText?: string | undefined;
610
610
  showErrorMessage?: boolean | undefined;
611
611
  }>;
@@ -634,7 +634,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
634
634
  defaultValue?: string | undefined;
635
635
  description?: string | undefined;
636
636
  placeholder?: string | undefined;
637
- }, "description" | "label" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
637
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
638
638
  required?: boolean;
639
639
  }>;
640
640
  readonly DateField: react26.FC<Pick<{
@@ -655,7 +655,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
655
655
  defaultValue?: string | undefined;
656
656
  description?: string | undefined;
657
657
  placeholder?: string | undefined;
658
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
658
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
659
659
  required?: boolean;
660
660
  minDate?: Date;
661
661
  maxDate?: Date;
@@ -751,7 +751,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
751
751
  showClearButton?: boolean | undefined;
752
752
  description?: string | undefined;
753
753
  placeholder?: string | undefined;
754
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
754
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
755
755
  required?: boolean;
756
756
  maxLength?: number;
757
757
  }>;
@@ -779,7 +779,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
779
779
  counter?: boolean | undefined;
780
780
  description?: string | undefined;
781
781
  placeholder?: string | undefined;
782
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
782
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
783
783
  required?: boolean;
784
784
  maxLength?: number;
785
785
  }>;
@@ -819,7 +819,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
819
819
  unit?: string | undefined;
820
820
  description?: string | undefined;
821
821
  placeholder?: string | undefined;
822
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
822
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
823
823
  required?: boolean;
824
824
  allowNegative?: boolean;
825
825
  }>;
@@ -839,15 +839,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
839
839
  showErrorMessage?: boolean | undefined;
840
840
  description?: string | undefined;
841
841
  placeholder?: string | undefined;
842
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
842
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
843
843
  maxLength?: number;
844
844
  }>;
845
845
  readonly PasswordField: react26.FC<{
846
846
  description?: string | undefined;
847
847
  label: string;
848
+ placeholder?: string | undefined;
848
849
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
849
850
  tooltip?: string | undefined;
850
- placeholder?: string | undefined;
851
851
  helperText?: string | undefined;
852
852
  showErrorMessage?: boolean | undefined;
853
853
  }>;
@@ -876,7 +876,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
876
876
  defaultValue?: string | undefined;
877
877
  description?: string | undefined;
878
878
  placeholder?: string | undefined;
879
- }, "description" | "label" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
879
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
880
880
  required?: boolean;
881
881
  }>;
882
882
  readonly DateField: react26.FC<Pick<{
@@ -897,7 +897,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
897
897
  defaultValue?: string | undefined;
898
898
  description?: string | undefined;
899
899
  placeholder?: string | undefined;
900
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
900
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
901
901
  required?: boolean;
902
902
  minDate?: Date;
903
903
  maxDate?: Date;
@@ -989,7 +989,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
989
989
  showClearButton?: boolean | undefined;
990
990
  description?: string | undefined;
991
991
  placeholder?: string | undefined;
992
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
992
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
993
993
  required?: boolean;
994
994
  maxLength?: number;
995
995
  }>;
@@ -1017,7 +1017,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1017
1017
  counter?: boolean | undefined;
1018
1018
  description?: string | undefined;
1019
1019
  placeholder?: string | undefined;
1020
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
1020
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
1021
1021
  required?: boolean;
1022
1022
  maxLength?: number;
1023
1023
  }>;
@@ -1057,7 +1057,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1057
1057
  unit?: string | undefined;
1058
1058
  description?: string | undefined;
1059
1059
  placeholder?: string | undefined;
1060
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1060
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1061
1061
  required?: boolean;
1062
1062
  allowNegative?: boolean;
1063
1063
  }>;
@@ -1077,15 +1077,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1077
1077
  showErrorMessage?: boolean | undefined;
1078
1078
  description?: string | undefined;
1079
1079
  placeholder?: string | undefined;
1080
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
1080
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1081
1081
  maxLength?: number;
1082
1082
  }>;
1083
1083
  readonly PasswordField: react26.FC<{
1084
1084
  description?: string | undefined;
1085
1085
  label: string;
1086
+ placeholder?: string | undefined;
1086
1087
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1087
1088
  tooltip?: string | undefined;
1088
- placeholder?: string | undefined;
1089
1089
  helperText?: string | undefined;
1090
1090
  showErrorMessage?: boolean | undefined;
1091
1091
  }>;
@@ -1114,7 +1114,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1114
1114
  defaultValue?: string | undefined;
1115
1115
  description?: string | undefined;
1116
1116
  placeholder?: string | undefined;
1117
- }, "description" | "label" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
1117
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
1118
1118
  required?: boolean;
1119
1119
  }>;
1120
1120
  readonly DateField: react26.FC<Pick<{
@@ -1135,7 +1135,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1135
1135
  defaultValue?: string | undefined;
1136
1136
  description?: string | undefined;
1137
1137
  placeholder?: string | undefined;
1138
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
1138
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1139
1139
  required?: boolean;
1140
1140
  minDate?: Date;
1141
1141
  maxDate?: Date;
@@ -1226,7 +1226,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1226
1226
  showClearButton?: boolean | undefined;
1227
1227
  description?: string | undefined;
1228
1228
  placeholder?: string | undefined;
1229
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1229
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "showClearButton" | "helperText" | "showErrorMessage"> & {
1230
1230
  required?: boolean;
1231
1231
  maxLength?: number;
1232
1232
  }>;
@@ -1254,7 +1254,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1254
1254
  counter?: boolean | undefined;
1255
1255
  description?: string | undefined;
1256
1256
  placeholder?: string | undefined;
1257
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "counter" | "helperText" | "showErrorMessage"> & {
1257
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "counter" | "helperText" | "showErrorMessage"> & {
1258
1258
  required?: boolean;
1259
1259
  maxLength?: number;
1260
1260
  }>;
@@ -1294,7 +1294,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1294
1294
  unit?: string | undefined;
1295
1295
  description?: string | undefined;
1296
1296
  placeholder?: string | undefined;
1297
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1297
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage" | "rounding" | "decimalPlaces" | "percision" | "unit"> & {
1298
1298
  required?: boolean;
1299
1299
  allowNegative?: boolean;
1300
1300
  }>;
@@ -1314,15 +1314,15 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1314
1314
  showErrorMessage?: boolean | undefined;
1315
1315
  description?: string | undefined;
1316
1316
  placeholder?: string | undefined;
1317
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
1317
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1318
1318
  maxLength?: number;
1319
1319
  }>;
1320
1320
  readonly PasswordField: react26.FC<{
1321
1321
  description?: string | undefined;
1322
1322
  label: string;
1323
+ placeholder?: string | undefined;
1323
1324
  orientation?: "vertical" | "horizontal" | "responsive" | undefined;
1324
1325
  tooltip?: string | undefined;
1325
- placeholder?: string | undefined;
1326
1326
  helperText?: string | undefined;
1327
1327
  showErrorMessage?: boolean | undefined;
1328
1328
  }>;
@@ -1351,7 +1351,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1351
1351
  defaultValue?: string | undefined;
1352
1352
  description?: string | undefined;
1353
1353
  placeholder?: string | undefined;
1354
- }, "description" | "label" | "orientation" | "defaultValue" | "tooltip" | "placeholder" | "options" | "helperText" | "clearable"> & {
1354
+ }, "description" | "label" | "placeholder" | "defaultValue" | "orientation" | "tooltip" | "options" | "helperText" | "clearable"> & {
1355
1355
  required?: boolean;
1356
1356
  }>;
1357
1357
  readonly DateField: react26.FC<Pick<{
@@ -1372,7 +1372,7 @@ declare const useTanStackForm: <TFormData, TOnMount extends _tanstack_form_core0
1372
1372
  defaultValue?: string | undefined;
1373
1373
  description?: string | undefined;
1374
1374
  placeholder?: string | undefined;
1375
- }, "description" | "label" | "orientation" | "tooltip" | "placeholder" | "helperText" | "showErrorMessage"> & {
1375
+ }, "description" | "label" | "placeholder" | "orientation" | "tooltip" | "helperText" | "showErrorMessage"> & {
1376
1376
  required?: boolean;
1377
1377
  minDate?: Date;
1378
1378
  maxDate?: Date;
@@ -1,2 +1,2 @@
1
- import{n as e}from"../../button.variants-DmUzMbB8.mjs";import{t}from"../../button-DIEXNBpi.mjs";import{t as n}from"../../close-BuQ2DHur.mjs";import{t as r}from"../../separator-yTKDuMWb.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,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-normal 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 [[data-variant=legend]+&]:-mt-1.5 font-normal text-sm text-text-positive-weak leading-normal last:mt-0 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,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-linear-to-b from-primary-bg-subtle to-primary-bg-subtle/50 p-2 text-text-positive-weak text-xs`,t),...n}));J.displayName=`FieldNote`;const Y=w(({children:e,className:t,...n})=>o(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:i(`-my-2 group-data-[variant=outline]/field-group:-mb-2 relative h-5 text-sm`,t),...n,children:[a(r,{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,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,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]),y=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":y,children:e}),a(q,{children:t})]}),a(W,{className:`flex justify-end`,children:o(`div`,{className:`relative flex w-full flex-col items-end`,children:[o(`div`,{className:`relative w-full max-w-120`,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`,children:a(b,{size:14,className:`animate-spin text-primary-strong`})}),c&&!!v.length&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.75 text-danger-strong`,children:a(l,{size:14})}),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),g=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":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 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(g,{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-offset-1 outline-1 outline-border`,`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:o(z.Content,{"data-slot":`select-content`,className:i(`relative z-50 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`max-h-(--radix-select-content-available-height)`,`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,style:{maxHeight:`var(--radix-select-content-available-height)`},...r,children:[a(He,{}),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(Ue,{})]})})}function Ve({className:e,children:t,...n}){return o(z.Item,{"data-slot":`select-item`,className:i(`relative flex select-none items-center border border-transparent`,`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:border-border-weak`,`focus:bg-linear-to-b`,`focus:from-muted-bg-subtle`,`focus:to-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 He({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 Ue({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 We=({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(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 Ge({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 Ke=({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(Ge,{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,{})]})},qe=({label:e,description:t,placeholder:n,counter:r=!1,helperText:s,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=D(()=>u&&!y,[u,y]),S=D(()=>g.value?g.value.length:0,[g.value]),w=D(()=>{if(!r)return``;let e=`character${[0,1].includes(S)?``:`s`}`;return r&&p?`${S} / ${p} ${e}`:`${S} ${e}`},[S,r,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}})=>{y||r&&p&&e.length>p||v(e||null)},[y,r,p,v]),A=T(()=>{y||v(``)},[y,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(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-strong`,onClick:A,children:a(C,{size:14,"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 justify-end *:basis-1/2`,children:[d&&a(X,{errors:g.meta.errors}),!!r&&a(`p`,{className:`text-end text-text-positive-weak text-xs tabular-nums leading-3.5`,children:w})]}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})};function Je({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 Ye=({label:e,description:t,placeholder:n,orientation:r=`responsive`,counter:s,helperText:c,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=D(()=>m.value?m.value.length:0,[m.value]),x=D(()=>{if(!s)return``;let e=`character${[0,1].includes(y)?``:`s`}`;return s&&f?`${y} / ${f} ${e}`:`${y} ${e}`},[y,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:r,"data-invalid":S,children:[o(U,{children:[a(G,{"aria-required":w,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Je,{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(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 justify-end *:basis-1/2`,children:[u&&a(X,{errors:C}),!!s&&a(`p`,{className:`text-end text-text-positive-weak text-xs`,children:x})]}),a(J,{isShow:!!c,children:c})]})]}),a(Y,{})]})},Xe=({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-w-32`,n),onClick:o,children:e??`Submit`})})},Ze=({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 Qe({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 $e=({title:e,description:t,children:n})=>o(`section`,{"data-slot":`card-form`,className:`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}),!!t&&a(`p`,{className:`text-muted text-sm`,children:t})]}),a(Qe,{}),a(`div`,{"data-slot":`card-form-main`,className:`flex flex-col space-y-4 py-4`,children:n})]}),et=({children:e})=>a(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),tt=({...e})=>a(`button`,{...e,type:`button`,style:{"corner-shape":`squircle`},className:`min-w-40 cursor-pointer rounded-xl border border-border bg-linear-to-b from-white/80 to-white px-4 py-2 font-semibold text-sm text-text-positive shadow-[0_2px_4px_var(--border)] 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`});function nt({...e}){return a(I.Root,{"data-slot":`dialog`,...e})}function rt({...e}){return a(I.Portal,{"data-slot":`dialog-portal`,...e})}function it({className:e,...t}){return a(I.Overlay,{"data-slot":`dialog-overlay`,className:i(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,e),...t})}function at({className:e,children:t,showCloseButton:r=!0,...s}){return o(rt,{"data-slot":`dialog-portal`,children:[a(it,{className:`backdrop-blur-sm`}),o(I.Content,{"data-slot":`dialog-content`,className:i(`relative z-50 grid bg-background`,`gap-4 p-6 shadow-dialog outline-none`,`max-h-[85dvh] w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`rounded-2xl duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-80`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-80`,`-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2`,e),...s,children:[t,r&&a(I.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:a(n,{})})]})]})}function ot({className:e,...t}){return a(`div`,{"data-slot":`dialog-header`,className:i(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function st({className:e,...t}){return a(`div`,{"data-slot":`dialog-footer`,className:i(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ct({className:e,...t}){return a(I.Title,{"data-slot":`dialog-title`,className:i(`font-semibold text-lg text-text-positive-strong leading-none`,e),...t})}const lt=({isSubmitting:e,...t})=>a(`button`,{...t,type:`button`,"data-loading":e?`true`:void 0,style:{"corner-shape":`squircle`},className:`relative min-h-9.5 min-w-40 cursor-pointer rounded-xl border border-primary-strong bg-linear-to-b from-primary/60 to-primary px-4 py-2 font-semibold text-sm text-text-negative outline-none drop-shadow-[0_2px_4px_var(--primary)] 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:`-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 z-10 animate-spin`}):`Submit`}),ut=({title:e,open:t,onOpenChange:n,children:i})=>{let s=$(),c=T(e=>{e||s.reset(),n?.(e)},[s.reset,n]);return a(nt,{open:t,onOpenChange:c,children:o(at,{className:`gap-0 rounded-sm p-0 sm:max-w-2xl`,children:[a(ot,{className:`flex items-center justify-center px-4 py-6`,children:a(ct,{className:`font-medium`,children:e})}),a(r,{}),a(`div`,{className:`relative flex flex-col space-y-4 p-4 pt-6`,children:i}),a(r,{}),o(st,{className:`justify-between! flex items-center px-6 py-4`,children:[a(s.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(tt,{disabled:e,onClick:()=>{s.reset(),c(!1)}})}),a(s.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(lt,{isSubmitting:e,disabled:t})})]})]})})},dt=({title:e,open:t,onOpenChange:r,children:s})=>{let c=$();return a(nt,{open:t,onOpenChange:r,children:o(rt,{"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(lt,{isSubmitting:e,disabled:t,className:`w-full`})}),a(c.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(tt,{disabled:e,className:`w-full`,onClick:()=>{c.reset(),r?.(!1)}})})]}),a(I.Close,{asChild:!0,children:a(n,{className:`absolute top-2 right-2`})})]})})]})})},ft=({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}),pt=({children:e})=>a(`main`,{"data-slot":`section-main`,className:`relative flex flex-col space-y-4 py-4`,children:e}),mt=({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(ft,{children:e}),a(Qe,{}),a(pt,{children:t})]}),ht=({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:gt,formContext:_t,useFieldContext:Q,useFormContext:$}=se(),{useAppForm:vt,withForm:yt,withFieldGroup:bt}=oe({fieldContext:gt,formContext:_t,fieldComponents:{TextField:qe,TextareaField:Ye,NumberField:Me,EmailField:De,PasswordField:Ne,SelectField:We,DateField:Ee,SwitchField:Ke,RadioGroupField:Ie,CheckboxField:_e},formComponents:{TanStackDialogForm:ut,TanStackPopoverForm:dt,TanStackContainerForm:et,TanStackSectionForm:mt,TanStackCardForm:$e,TanStackTitleField:ht,TanStackActionsForm:Ze,TanStackActionSubmit:Xe}});export{Q as useTanStackFieldContext,vt as useTanStackForm,$ as useTanStackFormContext,bt as withTanStackFieldGroup,yt as withTanStackForm};
1
+ import{n as e}from"../../button.variants-DmUzMbB8.mjs";import{t}from"../../button-DIEXNBpi.mjs";import{t as n}from"../../close-BuQ2DHur.mjs";import{t as r}from"../../separator-yTKDuMWb.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,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-normal 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 [[data-variant=legend]+&]:-mt-1.5 font-normal text-sm text-text-positive-weak leading-normal last:mt-0 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,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-linear-to-b from-primary-bg-subtle to-primary-bg-subtle/50 p-2 text-text-positive-weak text-xs`,t),...n}));J.displayName=`FieldNote`;const Y=w(({children:e,className:t,...n})=>o(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:i(`-my-2 group-data-[variant=outline]/field-group:-mb-2 relative h-5 text-sm`,t),...n,children:[a(r,{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,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,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]),y=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":y,children:e}),a(q,{children:t})]}),a(W,{className:`flex justify-end`,children:o(`div`,{className:`relative flex w-full flex-col items-end`,children:[o(`div`,{className:`relative w-full max-w-120`,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`,children:a(b,{size:14,className:`animate-spin text-primary-strong`})}),c&&!!v.length&&a(`div`,{className:`absolute inset-y-0 start-2 top-2.75 text-danger-strong`,children:a(l,{size:14})}),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),g=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":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 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(g,{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-offset-1 outline-1 outline-border`,`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:o(z.Content,{"data-slot":`select-content`,className:i(`relative z-50 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`max-h-(--radix-select-content-available-height)`,`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,style:{maxHeight:`var(--radix-select-content-available-height)`},...r,children:[a(He,{}),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(Ue,{})]})})}function Ve({className:e,children:t,...n}){return o(z.Item,{"data-slot":`select-item`,className:i(`relative flex select-none items-center border border-transparent`,`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:border-border-weak`,`focus:bg-linear-to-b`,`focus:from-muted-bg-subtle`,`focus:to-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 He({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 Ue({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 We=({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(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 Ge({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 Ke=({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(Ge,{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,{})]})},qe=({label:e,description:t,placeholder:n,counter:r=!1,helperText:s,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=D(()=>u&&!y,[u,y]),S=D(()=>g.value?g.value.length:0,[g.value]),w=D(()=>{if(!r)return``;let e=`character${[0,1].includes(S)?``:`s`}`;return r&&p?`${S} / ${p} ${e}`:`${S} ${e}`},[S,r,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}})=>{y||r&&p&&e.length>p||v(e||null)},[y,r,p,v]),A=T(()=>{y||v(``)},[y,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(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-strong`,onClick:A,children:a(C,{size:14,"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 justify-end *:basis-1/2`,children:[d&&a(X,{errors:g.meta.errors}),!!r&&a(`p`,{className:`text-end text-text-positive-weak text-xs tabular-nums leading-3.5`,children:w})]}),a(J,{isShow:!!s,children:s})]})]}),a(Y,{})]})};function Je({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 Ye=({label:e,description:t,placeholder:n,orientation:r=`responsive`,counter:s,helperText:c,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=D(()=>m.value?m.value.length:0,[m.value]),x=D(()=>{if(!s)return``;let e=`character${[0,1].includes(y)?``:`s`}`;return s&&f?`${y} / ${f} ${e}`:`${y} ${e}`},[y,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:r,"data-invalid":S,children:[o(U,{children:[a(G,{"aria-required":w,htmlFor:h,children:e}),a(q,{children:t})]}),o(W,{children:[a(Je,{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(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 justify-end *:basis-1/2`,children:[u&&a(X,{errors:C}),!!s&&a(`p`,{className:`text-end text-text-positive-weak text-xs`,children:x})]}),a(J,{isShow:!!c,children:c})]})]}),a(Y,{})]})},Xe=({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-w-32`,n),onClick:o,children:e??`Submit`})})},Ze=({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 Qe({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 $e=({title:e,description:t,children:n})=>o(`section`,{"data-slot":`card-form`,className:`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}),!!t&&a(`p`,{className:`text-muted text-sm`,children:t})]}),a(Qe,{}),a(`div`,{"data-slot":`card-form-main`,className:`flex flex-col space-y-4 py-4`,children:n})]}),et=({children:e})=>a(`div`,{"data-slot":`section-form`,className:`flex flex-col space-y-4`,children:e}),tt=({...e})=>a(`button`,{...e,type:`button`,style:{"corner-shape":`squircle`},className:`min-w-40 cursor-pointer rounded-xl border border-border bg-linear-to-b from-white/80 to-white px-4 py-2 font-semibold text-sm text-text-positive shadow-[0_2px_4px_var(--border)] 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`}),nt=({isSubmitting:e,...t})=>a(`button`,{...t,type:`button`,"data-loading":e?`true`:void 0,style:{"corner-shape":`squircle`},className:`relative min-h-9.5 min-w-40 cursor-pointer rounded-xl border border-primary-strong bg-linear-to-b from-primary/60 to-primary px-4 py-2 font-semibold text-sm text-text-negative outline-none drop-shadow-[0_2px_4px_var(--primary)] 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`}):`Submit`}),rt=({title:e,open:t,onOpenChange:n,children:i})=>{let s=$(),c=T(e=>{e||s.reset(),n?.(e)},[s.reset,n]);return a(I.Root,{open:t,onOpenChange:c,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 max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-0 overflow-y-auto rounded-sm bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-2xl`,children:[a(`div`,{"data-slot":`dialog-header`,className:`flex flex-col items-center justify-center gap-2 px-4 py-6 text-center 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(r,{}),a(`div`,{"data-slot":`dialog-content`,className:`relative flex flex-col space-y-4 overflow-y-auto p-4 pt-6`,children:i}),a(r,{}),o(`div`,{"data-slot":`dialog-footer`,className:`flex flex-col-reverse items-center justify-between gap-2 px-6 py-4 sm:flex-row sm:justify-end`,children:[a(s.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(tt,{disabled:e,onClick:()=>{s.reset(),c(!1)}})}),a(s.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(nt,{isSubmitting:e,disabled:t,onClick:()=>s.handleSubmit()})})]})]})]})})},it=({title:e,open:t,onOpenChange:r,children:s})=>{let c=$();return a(I.Root,{"data-slot":`dialog`,open:t,onOpenChange:r,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(nt,{isSubmitting:e,disabled:t,className:`w-full`})}),a(c.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(tt,{disabled:e,className:`w-full`,onClick:()=>{c.reset(),r?.(!1)}})})]}),a(I.Close,{asChild:!0,children:a(n,{className:`absolute top-2 right-2`})})]})})]})})},at=({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}),ot=({children:e})=>a(`main`,{"data-slot":`section-main`,className:`relative flex flex-col space-y-4 py-4`,children:e}),st=({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(at,{children:e}),a(Qe,{}),a(ot,{children:t})]}),ct=({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:lt,formContext:ut,useFieldContext:Q,useFormContext:$}=se(),{useAppForm:dt,withForm:ft,withFieldGroup:pt}=oe({fieldContext:lt,formContext:ut,fieldComponents:{TextField:qe,TextareaField:Ye,NumberField:Me,EmailField:De,PasswordField:Ne,SelectField:We,DateField:Ee,SwitchField:Ke,RadioGroupField:Ie,CheckboxField:_e},formComponents:{TanStackDialogForm:rt,TanStackPopoverForm:it,TanStackContainerForm:et,TanStackSectionForm:st,TanStackCardForm:$e,TanStackTitleField:ct,TanStackActionsForm:Ze,TanStackActionSubmit:Xe}});export{Q as useTanStackFieldContext,dt as useTanStackForm,$ as useTanStackFormContext,pt as withTanStackFieldGroup,ft as withTanStackForm};
2
2
  //# sourceMappingURL=index.mjs.map