@customafk/lunas-ui 0.0.65 → 0.0.67

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 (162) hide show
  1. package/dist/{button-st5plaQt.d.cts → button-NPRxTW9Y.d.cts} +6 -6
  2. package/dist/{button-DUWg-QPz.d.ts → button-ld6DUDGr.d.ts} +4 -4
  3. package/dist/cards/grid-product-card.cjs +1 -1
  4. package/dist/cards/grid-product-card.js +1 -1
  5. package/dist/cards/product-card.cjs +1 -1
  6. package/dist/cards/product-card.js +1 -1
  7. package/dist/cards/simple-card.d.cts +2 -2
  8. package/dist/{command-zikueR7l.d.ts → command-BL20khiI.d.ts} +12 -12
  9. package/dist/{command-CL9pytMx.d.cts → command-CgW_wSCe.d.cts} +12 -12
  10. package/dist/data-display/empty.d.cts +2 -2
  11. package/dist/data-display/empty.d.ts +2 -2
  12. package/dist/data-display/statistic.d.cts +2 -2
  13. package/dist/data-display/statistic.d.ts +2 -2
  14. package/dist/{dialog-Dease_8R.d.ts → dialog-BfrTUQrJ.d.ts} +12 -12
  15. package/dist/{dialog-oAOedasX.d.cts → dialog-CTwMjrks.d.cts} +12 -12
  16. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
  17. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +28 -28
  18. package/dist/dialogs/form-dialog.d.cts +2 -2
  19. package/dist/dialogs/form-dialog.d.ts +2 -2
  20. package/dist/forms/combobox-field.d.cts +2 -2
  21. package/dist/forms/combobox-field.d.ts +2 -2
  22. package/dist/forms/date-field.d.cts +2 -2
  23. package/dist/forms/date-field.d.ts +2 -2
  24. package/dist/forms/form-wrapper.d.cts +2 -2
  25. package/dist/forms/form-wrapper.d.ts +2 -2
  26. package/dist/forms/multi-select-field.d.cts +2 -2
  27. package/dist/forms/multi-select-field.d.ts +2 -2
  28. package/dist/forms/number-field.d.cts +2 -2
  29. package/dist/forms/number-field.d.ts +2 -2
  30. package/dist/forms/password-field.cjs +1 -1
  31. package/dist/forms/password-field.cjs.map +1 -1
  32. package/dist/forms/password-field.d.cts +2 -2
  33. package/dist/forms/password-field.d.ts +2 -2
  34. package/dist/forms/password-field.js +1 -1
  35. package/dist/forms/password-field.js.map +1 -1
  36. package/dist/forms/select-field.d.cts +2 -2
  37. package/dist/forms/switch-field.d.cts +2 -2
  38. package/dist/forms/switch-field.d.ts +2 -2
  39. package/dist/forms/text-field.d.cts +2 -2
  40. package/dist/forms/text-field.d.ts +2 -2
  41. package/dist/forms/textarea-field.d.cts +2 -2
  42. package/dist/forms/textarea-field.d.ts +2 -2
  43. package/dist/{image-Cm4vJeHx.cjs → image-D3D8dE6s.cjs} +2 -2
  44. package/dist/image-D3D8dE6s.cjs.map +1 -0
  45. package/dist/{image-BdTzYp1S.js → image-Dm3jT9QX.js} +2 -2
  46. package/dist/{image-BdTzYp1S.js.map → image-Dm3jT9QX.js.map} +1 -1
  47. package/dist/{input-DO3Z69kK.d.ts → input-CWzkJbaD.d.ts} +3 -3
  48. package/dist/{input-BXxtPvIa.d.cts → input-Dx2DxNMy.d.cts} +3 -3
  49. package/dist/layouts/app-layout/index.d.cts +28 -28
  50. package/dist/layouts/app-layout/index.d.ts +28 -28
  51. package/dist/layouts/flex.d.cts +4 -4
  52. package/dist/layouts/flex.d.ts +2 -2
  53. package/dist/layouts/service-layout/index.cjs +1 -1
  54. package/dist/layouts/service-layout/index.d.cts +15 -15
  55. package/dist/layouts/service-layout/index.d.ts +15 -15
  56. package/dist/layouts/service-layout/index.js +1 -1
  57. package/dist/{separator-CO0oTpOK.d.ts → separator-9s0ppov1.d.ts} +3 -3
  58. package/dist/{separator-B-TIckT4.d.cts → separator-ZGvcRkrl.d.cts} +3 -3
  59. package/dist/table/index.d.cts +2 -2
  60. package/dist/table/index.d.ts +2 -2
  61. package/dist/{toggle-BHyG321X.d.ts → toggle-DIRRdVOx.d.ts} +3 -3
  62. package/dist/{toggle-DdY6X9AI.d.cts → toggle-DpUG0EqP.d.cts} +5 -5
  63. package/dist/{tooltip-C0_WxGo5.d.cts → tooltip-BZDwRKZ6.d.cts} +6 -6
  64. package/dist/{tooltip-BURz5fQL.d.ts → tooltip-ChyvXWdm.d.ts} +6 -6
  65. package/dist/typography/paragraph.d.cts +2 -2
  66. package/dist/typography/paragraph.d.ts +2 -2
  67. package/dist/typography/title.d.cts +2 -2
  68. package/dist/typography/title.d.ts +2 -2
  69. package/dist/ui/alert-dialog.d.cts +12 -12
  70. package/dist/ui/alert-dialog.d.ts +12 -12
  71. package/dist/ui/alert.d.cts +4 -4
  72. package/dist/ui/alert.d.ts +4 -4
  73. package/dist/ui/aspect-ratio.d.cts +2 -2
  74. package/dist/ui/aspect-ratio.d.ts +2 -2
  75. package/dist/ui/avatar.d.cts +4 -4
  76. package/dist/ui/avatar.d.ts +4 -4
  77. package/dist/ui/badge.d.cts +2 -2
  78. package/dist/ui/badge.d.ts +2 -2
  79. package/dist/ui/breadcrumb.d.cts +8 -8
  80. package/dist/ui/breadcrumb.d.ts +8 -8
  81. package/dist/ui/button.d.cts +1 -1
  82. package/dist/ui/button.d.ts +1 -1
  83. package/dist/ui/calendar.d.cts +4 -4
  84. package/dist/ui/calendar.d.ts +4 -4
  85. package/dist/ui/card.d.cts +8 -8
  86. package/dist/ui/card.d.ts +8 -8
  87. package/dist/ui/carousel.d.cts +7 -7
  88. package/dist/ui/carousel.d.ts +7 -7
  89. package/dist/ui/collapsible.d.cts +4 -4
  90. package/dist/ui/collapsible.d.ts +4 -4
  91. package/dist/ui/command.d.cts +2 -2
  92. package/dist/ui/command.d.ts +2 -2
  93. package/dist/ui/context-menu.d.cts +16 -16
  94. package/dist/ui/context-menu.d.ts +16 -16
  95. package/dist/ui/dialog.d.cts +1 -1
  96. package/dist/ui/dialog.d.ts +1 -1
  97. package/dist/ui/dropdown-menu.d.cts +16 -16
  98. package/dist/ui/dropdown-menu.d.ts +16 -16
  99. package/dist/ui/file-uploader.d.cts +2 -2
  100. package/dist/ui/file-uploader.d.ts +2 -2
  101. package/dist/ui/form.d.cts +7 -7
  102. package/dist/ui/form.d.ts +7 -7
  103. package/dist/ui/hover-card.d.cts +4 -4
  104. package/dist/ui/hover-card.d.ts +4 -4
  105. package/dist/ui/image.cjs +1 -1
  106. package/dist/ui/image.js +1 -1
  107. package/dist/ui/input-otp.d.cts +5 -5
  108. package/dist/ui/input-otp.d.ts +5 -5
  109. package/dist/ui/input.d.cts +1 -1
  110. package/dist/ui/input.d.ts +1 -1
  111. package/dist/ui/inputs/search-input.d.cts +1 -1
  112. package/dist/ui/inputs/search-input.d.ts +3 -3
  113. package/dist/ui/label.d.cts +2 -2
  114. package/dist/ui/label.d.ts +2 -2
  115. package/dist/ui/menubar.d.cts +17 -17
  116. package/dist/ui/menubar.d.ts +17 -17
  117. package/dist/ui/multi-select.d.cts +2 -2
  118. package/dist/ui/multi-select.d.ts +2 -2
  119. package/dist/ui/navigation-menu.d.cts +9 -9
  120. package/dist/ui/navigation-menu.d.ts +9 -9
  121. package/dist/ui/pagination.d.cts +9 -9
  122. package/dist/ui/pagination.d.ts +9 -9
  123. package/dist/ui/popover.d.cts +5 -5
  124. package/dist/ui/popover.d.ts +5 -5
  125. package/dist/ui/progress.d.cts +2 -2
  126. package/dist/ui/progress.d.ts +2 -2
  127. package/dist/ui/radio-group.d.cts +3 -3
  128. package/dist/ui/radio-group.d.ts +3 -3
  129. package/dist/ui/resizable.d.cts +4 -4
  130. package/dist/ui/resizable.d.ts +4 -4
  131. package/dist/ui/scroll-area.d.cts +3 -3
  132. package/dist/ui/scroll-area.d.ts +3 -3
  133. package/dist/ui/select.d.cts +11 -11
  134. package/dist/ui/select.d.ts +11 -11
  135. package/dist/ui/separator.d.cts +1 -1
  136. package/dist/ui/separator.d.ts +1 -1
  137. package/dist/ui/sheet.d.cts +9 -9
  138. package/dist/ui/sheet.d.ts +9 -9
  139. package/dist/ui/sidebar.d.cts +28 -28
  140. package/dist/ui/sidebar.d.ts +28 -28
  141. package/dist/ui/skeleton.d.cts +2 -2
  142. package/dist/ui/skeleton.d.ts +2 -2
  143. package/dist/ui/slider.d.cts +2 -2
  144. package/dist/ui/slider.d.ts +2 -2
  145. package/dist/ui/sonner.d.cts +2 -2
  146. package/dist/ui/sonner.d.ts +2 -2
  147. package/dist/ui/switch.d.cts +2 -2
  148. package/dist/ui/switch.d.ts +2 -2
  149. package/dist/ui/table.d.cts +9 -9
  150. package/dist/ui/table.d.ts +9 -9
  151. package/dist/ui/tabs.d.cts +5 -5
  152. package/dist/ui/tabs.d.ts +5 -5
  153. package/dist/ui/textarea.d.cts +2 -2
  154. package/dist/ui/textarea.d.ts +2 -2
  155. package/dist/ui/toggle-group.d.cts +4 -4
  156. package/dist/ui/toggle-group.d.ts +4 -4
  157. package/dist/ui/toggle.d.cts +1 -1
  158. package/dist/ui/toggle.d.ts +1 -1
  159. package/dist/ui/tooltip.d.cts +1 -1
  160. package/dist/ui/tooltip.d.ts +1 -1
  161. package/package.json +1 -1
  162. package/dist/image-Cm4vJeHx.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
- import { Button } from "../../../button-DUWg-QPz.js";
2
- import { Input } from "../../../input-DO3Z69kK.js";
3
- import { Separator } from "../../../separator-CO0oTpOK.js";
4
- import { TooltipContent } from "../../../tooltip-BURz5fQL.js";
1
+ import { Button } from "../../../button-ld6DUDGr.js";
2
+ import { Input } from "../../../input-CWzkJbaD.js";
3
+ import { Separator } from "../../../separator-9s0ppov1.js";
4
+ import { TooltipContent } from "../../../tooltip-ChyvXWdm.js";
5
5
  import { VariantProps } from "class-variance-authority";
6
- import * as react_jsx_runtime236 from "react/jsx-runtime";
6
+ import * as react_jsx_runtime235 from "react/jsx-runtime";
7
7
  import * as class_variance_authority_types6 from "class-variance-authority/types";
8
8
 
9
9
  //#region packages/components/dialogs/detail-dialog/component/sidebar.d.ts
@@ -29,7 +29,7 @@ declare function SidebarProvider({
29
29
  defaultOpen?: boolean;
30
30
  open?: boolean;
31
31
  onOpenChange?: (open: boolean) => void;
32
- }): react_jsx_runtime236.JSX.Element;
32
+ }): react_jsx_runtime235.JSX.Element;
33
33
  declare function Sidebar({
34
34
  side,
35
35
  variant,
@@ -41,70 +41,70 @@ declare function Sidebar({
41
41
  side?: 'left' | 'right';
42
42
  variant?: 'sidebar' | 'floating' | 'inset';
43
43
  collapsible?: 'offcanvas' | 'icon' | 'none';
44
- }): react_jsx_runtime236.JSX.Element;
44
+ }): react_jsx_runtime235.JSX.Element;
45
45
  declare function DetailDialogSidebarTrigger({
46
46
  className,
47
47
  onClick,
48
48
  ...props
49
- }: React.ComponentProps<typeof Button>): react_jsx_runtime236.JSX.Element;
49
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime235.JSX.Element;
50
50
  declare function DetailDialogSidebarRail({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<'button'>): react_jsx_runtime236.JSX.Element;
53
+ }: React.ComponentProps<'button'>): react_jsx_runtime235.JSX.Element;
54
54
  declare function SidebarInset({
55
55
  className,
56
56
  ...props
57
- }: React.ComponentProps<'main'>): react_jsx_runtime236.JSX.Element;
57
+ }: React.ComponentProps<'main'>): react_jsx_runtime235.JSX.Element;
58
58
  declare function SidebarInput({
59
59
  className,
60
60
  ...props
61
- }: React.ComponentProps<typeof Input>): react_jsx_runtime236.JSX.Element;
61
+ }: React.ComponentProps<typeof Input>): react_jsx_runtime235.JSX.Element;
62
62
  declare function DetailDialogSidebarHeader({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
65
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
66
66
  declare function DetailDialogSidebarFooter({
67
67
  className,
68
68
  ...props
69
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
69
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
70
70
  declare function DetailDialogSidebarSeparator({
71
71
  className,
72
72
  ...props
73
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime236.JSX.Element;
73
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime235.JSX.Element;
74
74
  declare function DetailDialogSidebarContent({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
78
78
  declare function DetailDialogSidebarGroup({
79
79
  className,
80
80
  ...props
81
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
81
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
82
82
  declare function DetailDialogSidebarGroupLabel({
83
83
  className,
84
84
  asChild,
85
85
  ...props
86
86
  }: React.ComponentProps<'div'> & {
87
87
  asChild?: boolean;
88
- }): react_jsx_runtime236.JSX.Element;
88
+ }): react_jsx_runtime235.JSX.Element;
89
89
  declare function DetailDialogSidebarGroupAction({
90
90
  className,
91
91
  asChild,
92
92
  ...props
93
93
  }: React.ComponentProps<'button'> & {
94
94
  asChild?: boolean;
95
- }): react_jsx_runtime236.JSX.Element;
95
+ }): react_jsx_runtime235.JSX.Element;
96
96
  declare function DetailDialogSidebarGroupContent({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
99
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
100
100
  declare function DetailDialogSidebarMenu({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'ul'>): react_jsx_runtime236.JSX.Element;
103
+ }: React.ComponentProps<'ul'>): react_jsx_runtime235.JSX.Element;
104
104
  declare function DetailDialogSidebarMenuItem({
105
105
  className,
106
106
  ...props
107
- }: React.ComponentProps<'li'>): react_jsx_runtime236.JSX.Element;
107
+ }: React.ComponentProps<'li'>): react_jsx_runtime235.JSX.Element;
108
108
  declare const sidebarMenuButtonVariants: (props?: ({
109
109
  variant?: "default" | "outline" | null | undefined;
110
110
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -121,7 +121,7 @@ declare function DetailDialogSidebarMenuButton({
121
121
  asChild?: boolean;
122
122
  isActive?: boolean;
123
123
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
124
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime236.JSX.Element;
124
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime235.JSX.Element;
125
125
  declare function DetailDialogSidebarMenuAction({
126
126
  className,
127
127
  asChild,
@@ -130,26 +130,26 @@ declare function DetailDialogSidebarMenuAction({
130
130
  }: React.ComponentProps<'button'> & {
131
131
  asChild?: boolean;
132
132
  showOnHover?: boolean;
133
- }): react_jsx_runtime236.JSX.Element;
133
+ }): react_jsx_runtime235.JSX.Element;
134
134
  declare function DetailDialogSidebarMenuBadge({
135
135
  className,
136
136
  ...props
137
- }: React.ComponentProps<'div'>): react_jsx_runtime236.JSX.Element;
137
+ }: React.ComponentProps<'div'>): react_jsx_runtime235.JSX.Element;
138
138
  declare function DetailDialogSidebarMenuSkeleton({
139
139
  className,
140
140
  showIcon,
141
141
  ...props
142
142
  }: React.ComponentProps<'div'> & {
143
143
  showIcon?: boolean;
144
- }): react_jsx_runtime236.JSX.Element;
144
+ }): react_jsx_runtime235.JSX.Element;
145
145
  declare function DetailDialogSidebarMenuSub({
146
146
  className,
147
147
  ...props
148
- }: React.ComponentProps<'ul'>): react_jsx_runtime236.JSX.Element;
148
+ }: React.ComponentProps<'ul'>): react_jsx_runtime235.JSX.Element;
149
149
  declare function DetailDialogSidebarMenuSubItem({
150
150
  className,
151
151
  ...props
152
- }: React.ComponentProps<'li'>): react_jsx_runtime236.JSX.Element;
152
+ }: React.ComponentProps<'li'>): react_jsx_runtime235.JSX.Element;
153
153
  declare function DetailDialogSidebarMenuSubButton({
154
154
  asChild,
155
155
  size,
@@ -160,7 +160,7 @@ declare function DetailDialogSidebarMenuSubButton({
160
160
  asChild?: boolean;
161
161
  size?: 'sm' | 'md';
162
162
  isActive?: boolean;
163
- }): react_jsx_runtime236.JSX.Element;
163
+ }): react_jsx_runtime235.JSX.Element;
164
164
  //#endregion
165
165
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInput, SidebarInset, SidebarProvider, useSidebar };
166
166
  //# sourceMappingURL=sidebar.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime40 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/dialogs/form-dialog.d.ts
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
30
30
  onError,
31
31
  onReset,
32
32
  children
33
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime1.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime40.JSX.Element;
34
34
  //#endregion
35
35
  export { FormDialog };
36
36
  //# sourceMappingURL=form-dialog.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/dialogs/form-dialog.d.ts
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
30
30
  onError,
31
31
  onReset,
32
32
  children
33
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime8.JSX.Element;
33
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime1.JSX.Element;
34
34
  //#endregion
35
35
  export { FormDialog };
36
36
  //# sourceMappingURL=form-dialog.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime31 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime75 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/combobox-field.d.ts
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  description,
23
23
  options,
24
24
  onAddNewItem
25
- }: Props<TFieldValues>) => react_jsx_runtime31.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime75.JSX.Element;
26
26
  //#endregion
27
27
  export { ComboboxField };
28
28
  //# sourceMappingURL=combobox-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime7 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/combobox-field.d.ts
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  description,
23
23
  options,
24
24
  onAddNewItem
25
- }: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
26
26
  //#endregion
27
27
  export { ComboboxField };
28
28
  //# sourceMappingURL=combobox-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/date-field.d.ts
@@ -16,7 +16,7 @@ declare const DateField: <TFieldValues extends FieldValues = FieldValues>({
16
16
  placeholder,
17
17
  description,
18
18
  isShowErrorMsg
19
- }: Props<TFieldValues>) => react_jsx_runtime2.JSX.Element;
19
+ }: Props<TFieldValues>) => react_jsx_runtime1.JSX.Element;
20
20
  //#endregion
21
21
  export { DateField };
22
22
  //# sourceMappingURL=date-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/date-field.d.ts
@@ -16,7 +16,7 @@ declare const DateField: <TFieldValues extends FieldValues = FieldValues>({
16
16
  placeholder,
17
17
  description,
18
18
  isShowErrorMsg
19
- }: Props<TFieldValues>) => react_jsx_runtime1.JSX.Element;
19
+ }: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
20
20
  //#endregion
21
21
  export { DateField };
22
22
  //# sourceMappingURL=date-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/form-wrapper.d.ts
@@ -18,7 +18,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
18
18
  onError,
19
19
  onSubcribe,
20
20
  children
21
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime4.JSX.Element;
21
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime3.JSX.Element;
22
22
  //#endregion
23
23
  export { FormWrapper };
24
24
  //# sourceMappingURL=form-wrapper.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
2
2
  import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/form-wrapper.d.ts
@@ -18,7 +18,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
18
18
  onError,
19
19
  onSubcribe,
20
20
  children
21
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime3.JSX.Element;
21
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime9.JSX.Element;
22
22
  //#endregion
23
23
  export { FormWrapper };
24
24
  //# sourceMappingURL=form-wrapper.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/multi-select-field.d.ts
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
24
24
  description,
25
25
  options,
26
26
  onAdd
27
- }: Props<TFieldValues>) => react_jsx_runtime9.JSX.Element;
27
+ }: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
28
28
  //#endregion
29
29
  export { MultiSelectField };
30
30
  //# sourceMappingURL=multi-select-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/multi-select-field.d.ts
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
24
24
  description,
25
25
  options,
26
26
  onAdd
27
- }: Props<TFieldValues>) => react_jsx_runtime2.JSX.Element;
27
+ }: Props<TFieldValues>) => react_jsx_runtime3.JSX.Element;
28
28
  //#endregion
29
29
  export { MultiSelectField };
30
30
  //# sourceMappingURL=multi-select-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/number-field.d.ts
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  unitText,
23
23
  description,
24
24
  onValueChange
25
- }: Props<TFieldValues>) => react_jsx_runtime0.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
26
26
  //#endregion
27
27
  export { NumberField };
28
28
  //# sourceMappingURL=number-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/number-field.d.ts
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
22
22
  unitText,
23
23
  description,
24
24
  onValueChange
25
- }: Props<TFieldValues>) => react_jsx_runtime18.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
26
26
  //#endregion
27
27
  export { NumberField };
28
28
  //# sourceMappingURL=number-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../input-DgtTVBtN.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react/jsx-runtime`)),o=({className:e,...t})=>{let o=React.useId(),[s,c]=React.useState(!1),l=React.useCallback(()=>c(e=>!e),[]);return(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(n.Input,{...t,id:o,placeholder:`Password`,type:s?`text`:`password`,className:(0,i.cn)(`pe-9`,e)}),(0,a.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:l,"aria-label":s?`Hide password`:`Show password`,"aria-pressed":s,"aria-controls":`password`,children:s?(0,a.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})})]})},s=({name:e,label:n=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:s,onValueChange:c})=>(0,a.jsx)(t.FormField,{name:e,render:({field:e})=>(0,a.jsxs)(t.FormItem,{className:`w-full`,children:[(0,a.jsx)(t.FormLabel,{children:n}),(0,a.jsx)(t.FormControl,{children:(0,a.jsx)(o,{placeholder:r,...e,onValueChange:c})}),!!s&&(0,a.jsx)(t.FormDescription,{children:s}),i&&(0,a.jsx)(t.FormMessage,{})]})});exports.PasswordField=s;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../label-BZqk7MPJ.cjs`);const t=require(`../form-CtpHZKmh.cjs`),n=require(`../input-DgtTVBtN.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react/jsx-runtime`)),o=e.__toESM(require(`react`)),s=({className:e,...t})=>{let s=(0,o.useId)(),[c,l]=(0,o.useState)(!1),u=(0,o.useCallback)(()=>l(e=>!e),[]);return(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(n.Input,{...t,id:s,placeholder:`Password`,type:c?`text`:`password`,className:(0,i.cn)(`pe-9`,e)}),(0,a.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:u,"aria-label":c?`Hide password`:`Show password`,"aria-pressed":c,"aria-controls":`password`,children:c?(0,a.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})})]})},c=({name:e,label:n=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:o,onValueChange:c})=>(0,a.jsx)(t.FormField,{name:e,render:({field:e})=>(0,a.jsxs)(t.FormItem,{className:`w-full`,children:[(0,a.jsx)(t.FormLabel,{children:n}),(0,a.jsx)(t.FormControl,{children:(0,a.jsx)(s,{placeholder:r,...e,onValueChange:c})}),!!o&&(0,a.jsx)(t.FormDescription,{children:o}),i&&(0,a.jsx)(t.FormMessage,{})]})});exports.PasswordField=c;
2
2
  //# sourceMappingURL=password-field.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"password-field.cjs","names":["PasswordInput: React.FC<Props>","Input","EyeOffIcon","EyeIcon","FormField","FormItem","FormLabel","FormControl","FormDescription","FormMessage"],"sources":["../../packages/components/ui/inputs/password-input.tsx","../../packages/components/forms/password-field.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react'\n\nimport { Input } from '../input'\n\ntype Props = React.ComponentPropsWithoutRef<typeof Input>\nexport const PasswordInput: React.FC<Props> = ({ className, ...rest }) => {\n const id = React.useId()\n const [isVisible, setIsVisible] = React.useState<boolean>(false)\n const toggleVisibility = React.useCallback(() => setIsVisible((prevState) => !prevState), [])\n return (\n <div className=\"relative\">\n <Input {...rest} id={id} placeholder=\"Password\" type={isVisible ? 'text' : 'password'} className={cn('pe-9', className)} />\n <button\n className=\"text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Hide password' : 'Show password'}\n aria-pressed={isVisible}\n aria-controls=\"password\"\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n </div>\n )\n}\n","'use client'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\n\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'\nimport { PasswordInput } from '../ui/inputs/password-input'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>\n label?: string\n description?: string\n placeholder?: string\n isShowErrorMsg?: boolean\n onValueChange?: (value: string) => void\n}\nexport const PasswordField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Text Field',\n placeholder = 'Enter text here',\n isShowErrorMsg = false,\n description,\n onValueChange,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => (\n <FormItem className=\"w-full\">\n <FormLabel>{label}</FormLabel>\n <FormControl>\n <PasswordInput placeholder={placeholder} {...field} onValueChange={onValueChange} />\n </FormControl>\n {!!description && <FormDescription>{description}</FormDescription>}\n {isShowErrorMsg && <FormMessage />}\n </FormItem>\n )}\n />\n )\n}\n"],"mappings":"wSAQaA,GAAkC,CAAE,YAAW,GAAG,KAAW,CACxE,IAAM,EAAK,MAAM,QACX,CAAC,EAAW,GAAgB,MAAM,SAAkB,IACpD,EAAmB,MAAM,gBAAkB,EAAc,GAAc,CAAC,GAAY,IAC1F,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,sBACb,EAAA,EAAA,KAACC,EAAAA,MAAAA,CAAM,GAAI,EAAU,KAAI,YAAY,WAAW,KAAM,EAAY,OAAS,WAAY,WAAA,EAAA,EAAA,IAAc,OAAQ,MAC7G,EAAA,EAAA,KAAC,SAAA,CACC,UAAU,oVACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,gBAAkB,gBAC1C,eAAc,EACd,gBAAc,oBAEb,GAAY,EAAA,EAAA,KAACC,EAAAA,WAAAA,CAAW,KAAM,GAAI,cAAY,UAAY,EAAA,EAAA,KAACC,EAAAA,QAAAA,CAAQ,KAAM,GAAI,cAAY,eCTrF,GAAiE,CAC5E,OACA,QAAQ,aACR,cAAc,kBACd,iBAAiB,GACjB,cACA,oBAGE,EAAA,EAAA,KAACC,EAAAA,UAAAA,CACO,OACN,QAAS,CAAE,YACT,EAAA,EAAA,MAACC,EAAAA,SAAAA,CAAS,UAAU,oBAClB,EAAA,EAAA,KAACC,EAAAA,UAAAA,CAAAA,SAAW,KACZ,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAAA,UACC,EAAA,EAAA,KAAC,EAAA,CAA2B,cAAa,GAAI,EAAsB,oBAEpE,CAAC,CAAC,IAAe,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAAA,SAAiB,IACnC,IAAkB,EAAA,EAAA,KAACC,EAAAA,YAAAA"}
1
+ {"version":3,"file":"password-field.cjs","names":["PasswordInput: React.FC<Props>","Input","EyeOffIcon","EyeIcon","FormField","FormItem","FormLabel","FormControl","FormDescription","FormMessage"],"sources":["../../packages/components/ui/inputs/password-input.tsx","../../packages/components/forms/password-field.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { EyeIcon, EyeOffIcon } from 'lucide-react'\nimport { useCallback, useId, useState } from 'react'\n\nimport { Input } from '../input'\n\ntype Props = React.ComponentPropsWithoutRef<typeof Input>\nexport const PasswordInput: React.FC<Props> = ({ className, ...rest }) => {\n const id = useId()\n const [isVisible, setIsVisible] = useState<boolean>(false)\n const toggleVisibility = useCallback(() => setIsVisible((prevState) => !prevState), [])\n return (\n <div className=\"relative\">\n <Input {...rest} id={id} placeholder=\"Password\" type={isVisible ? 'text' : 'password'} className={cn('pe-9', className)} />\n <button\n className=\"text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Hide password' : 'Show password'}\n aria-pressed={isVisible}\n aria-controls=\"password\"\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n </div>\n )\n}\n","'use client'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\n\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'\nimport { PasswordInput } from '../ui/inputs/password-input'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>\n label?: string\n description?: string\n placeholder?: string\n isShowErrorMsg?: boolean\n onValueChange?: (value: string) => void\n}\nexport const PasswordField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Text Field',\n placeholder = 'Enter text here',\n isShowErrorMsg = false,\n description,\n onValueChange,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => (\n <FormItem className=\"w-full\">\n <FormLabel>{label}</FormLabel>\n <FormControl>\n <PasswordInput placeholder={placeholder} {...field} onValueChange={onValueChange} />\n </FormControl>\n {!!description && <FormDescription>{description}</FormDescription>}\n {isShowErrorMsg && <FormMessage />}\n </FormItem>\n )}\n />\n )\n}\n"],"mappings":"sUAQaA,GAAkC,CAAE,YAAW,GAAG,KAAW,CACxE,IAAM,GAAA,EAAA,EAAA,SACA,CAAC,EAAW,IAAA,EAAA,EAAA,UAAkC,IAC9C,GAAA,EAAA,EAAA,iBAAqC,EAAc,GAAc,CAAC,GAAY,IACpF,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,sBACb,EAAA,EAAA,KAACC,EAAAA,MAAAA,CAAM,GAAI,EAAU,KAAI,YAAY,WAAW,KAAM,EAAY,OAAS,WAAY,WAAA,EAAA,EAAA,IAAc,OAAQ,MAC7G,EAAA,EAAA,KAAC,SAAA,CACC,UAAU,oVACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,gBAAkB,gBAC1C,eAAc,EACd,gBAAc,oBAEb,GAAY,EAAA,EAAA,KAACC,EAAAA,WAAAA,CAAW,KAAM,GAAI,cAAY,UAAY,EAAA,EAAA,KAACC,EAAAA,QAAAA,CAAQ,KAAM,GAAI,cAAY,eCTrF,GAAiE,CAC5E,OACA,QAAQ,aACR,cAAc,kBACd,iBAAiB,GACjB,cACA,oBAGE,EAAA,EAAA,KAACC,EAAAA,UAAAA,CACO,OACN,QAAS,CAAE,YACT,EAAA,EAAA,MAACC,EAAAA,SAAAA,CAAS,UAAU,oBAClB,EAAA,EAAA,KAACC,EAAAA,UAAAA,CAAAA,SAAW,KACZ,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAAA,UACC,EAAA,EAAA,KAAC,EAAA,CAA2B,cAAa,GAAI,EAAsB,oBAEpE,CAAC,CAAC,IAAe,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAAA,SAAiB,IACnC,IAAkB,EAAA,EAAA,KAACC,EAAAA,YAAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime13 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/password-field.d.ts
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
17
17
  isShowErrorMsg,
18
18
  description,
19
19
  onValueChange
20
- }: Props<TFieldValues>) => react_jsx_runtime13.JSX.Element;
20
+ }: Props<TFieldValues>) => react_jsx_runtime25.JSX.Element;
21
21
  //#endregion
22
22
  export { PasswordField };
23
23
  //# sourceMappingURL=password-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/password-field.d.ts
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
17
17
  isShowErrorMsg,
18
18
  description,
19
19
  onValueChange
20
- }: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
20
+ }: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
21
21
  //#endregion
22
22
  export { PasswordField };
23
23
  //# sourceMappingURL=password-field.d.ts.map
@@ -1,2 +1,2 @@
1
- "use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Input as o}from"../input-BUYJ4_aj.js";import{EyeIcon as s,EyeOffIcon as c}from"lucide-react";import{cn as l}from"@customafk/react-toolkit/utils";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({className:e,...t})=>{let n=React.useId(),[r,i]=React.useState(!1),a=React.useCallback(()=>i(e=>!e),[]);return d(`div`,{className:`relative`,children:[u(o,{...t,id:n,placeholder:`Password`,type:r?`text`:`password`,className:l(`pe-9`,e)}),u(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:a,"aria-label":r?`Hide password`:`Show password`,"aria-pressed":r,"aria-controls":`password`,children:u(r?c:s,{size:16,"aria-hidden":`true`})})]})},p=({name:o,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:l=!1,description:p,onValueChange:m})=>u(n,{name:o,render:({field:n})=>d(r,{className:`w-full`,children:[u(i,{children:s}),u(e,{children:u(f,{placeholder:c,...n,onValueChange:m})}),!!p&&u(t,{children:p}),l&&u(a,{})]})});export{p as PasswordField};
1
+ "use client";import"../label-HVpeECNr.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-B-KLKj5u.js";import{Input as o}from"../input-BUYJ4_aj.js";import{EyeIcon as s,EyeOffIcon as c}from"lucide-react";import{cn as l}from"@customafk/react-toolkit/utils";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useCallback as f,useId as p,useState as m}from"react";const h=({className:e,...t})=>{let n=p(),[r,i]=m(!1),a=f(()=>i(e=>!e),[]);return d(`div`,{className:`relative`,children:[u(o,{...t,id:n,placeholder:`Password`,type:r?`text`:`password`,className:l(`pe-9`,e)}),u(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:a,"aria-label":r?`Hide password`:`Show password`,"aria-pressed":r,"aria-controls":`password`,children:u(r?c:s,{size:16,"aria-hidden":`true`})})]})},g=({name:o,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:l=!1,description:f,onValueChange:p})=>u(n,{name:o,render:({field:n})=>d(r,{className:`w-full`,children:[u(i,{children:s}),u(e,{children:u(h,{placeholder:c,...n,onValueChange:p})}),!!f&&u(t,{children:f}),l&&u(a,{})]})});export{g as PasswordField};
2
2
  //# sourceMappingURL=password-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"password-field.js","names":["PasswordInput: React.FC<Props>"],"sources":["../../packages/components/ui/inputs/password-input.tsx","../../packages/components/forms/password-field.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react'\n\nimport { Input } from '../input'\n\ntype Props = React.ComponentPropsWithoutRef<typeof Input>\nexport const PasswordInput: React.FC<Props> = ({ className, ...rest }) => {\n const id = React.useId()\n const [isVisible, setIsVisible] = React.useState<boolean>(false)\n const toggleVisibility = React.useCallback(() => setIsVisible((prevState) => !prevState), [])\n return (\n <div className=\"relative\">\n <Input {...rest} id={id} placeholder=\"Password\" type={isVisible ? 'text' : 'password'} className={cn('pe-9', className)} />\n <button\n className=\"text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Hide password' : 'Show password'}\n aria-pressed={isVisible}\n aria-controls=\"password\"\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n </div>\n )\n}\n","'use client'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\n\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'\nimport { PasswordInput } from '../ui/inputs/password-input'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>\n label?: string\n description?: string\n placeholder?: string\n isShowErrorMsg?: boolean\n onValueChange?: (value: string) => void\n}\nexport const PasswordField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Text Field',\n placeholder = 'Enter text here',\n isShowErrorMsg = false,\n description,\n onValueChange,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => (\n <FormItem className=\"w-full\">\n <FormLabel>{label}</FormLabel>\n <FormControl>\n <PasswordInput placeholder={placeholder} {...field} onValueChange={onValueChange} />\n </FormControl>\n {!!description && <FormDescription>{description}</FormDescription>}\n {isShowErrorMsg && <FormMessage />}\n </FormItem>\n )}\n />\n )\n}\n"],"mappings":"wXAQA,MAAaA,GAAkC,CAAE,YAAW,GAAG,KAAW,CACxE,IAAM,EAAK,MAAM,QACX,CAAC,EAAW,GAAgB,MAAM,SAAkB,IACpD,EAAmB,MAAM,gBAAkB,EAAc,GAAc,CAAC,GAAY,IAC1F,OACE,EAAC,MAAA,CAAI,UAAU,qBACb,EAAC,EAAA,CAAM,GAAI,EAAU,KAAI,YAAY,WAAW,KAAM,EAAY,OAAS,WAAY,UAAW,EAAG,OAAQ,KAC7G,EAAC,SAAA,CACC,UAAU,oVACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,gBAAkB,gBAC1C,eAAc,EACd,gBAAc,oBAED,EAAZ,EAAa,EAA8C,EAA9C,CAAW,KAAM,GAAI,cAAY,eCT1C,GAAiE,CAC5E,OACA,QAAQ,aACR,cAAc,kBACd,iBAAiB,GACjB,cACA,mBAGE,EAAC,EAAA,CACO,OACN,QAAS,CAAE,WACT,EAAC,EAAA,CAAS,UAAU,mBAClB,EAAC,EAAA,CAAA,SAAW,IACZ,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAA2B,cAAa,GAAI,EAAsB,oBAEpE,CAAC,CAAC,GAAe,EAAC,EAAA,CAAA,SAAiB,IACnC,GAAkB,EAAC,EAAA"}
1
+ {"version":3,"file":"password-field.js","names":["PasswordInput: React.FC<Props>"],"sources":["../../packages/components/ui/inputs/password-input.tsx","../../packages/components/forms/password-field.tsx"],"sourcesContent":["'use client'\nimport { cn } from '@customafk/react-toolkit/utils'\nimport { EyeIcon, EyeOffIcon } from 'lucide-react'\nimport { useCallback, useId, useState } from 'react'\n\nimport { Input } from '../input'\n\ntype Props = React.ComponentPropsWithoutRef<typeof Input>\nexport const PasswordInput: React.FC<Props> = ({ className, ...rest }) => {\n const id = useId()\n const [isVisible, setIsVisible] = useState<boolean>(false)\n const toggleVisibility = useCallback(() => setIsVisible((prevState) => !prevState), [])\n return (\n <div className=\"relative\">\n <Input {...rest} id={id} placeholder=\"Password\" type={isVisible ? 'text' : 'password'} className={cn('pe-9', className)} />\n <button\n className=\"text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Hide password' : 'Show password'}\n aria-pressed={isVisible}\n aria-controls=\"password\"\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n </div>\n )\n}\n","'use client'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\n\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'\nimport { PasswordInput } from '../ui/inputs/password-input'\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>\n label?: string\n description?: string\n placeholder?: string\n isShowErrorMsg?: boolean\n onValueChange?: (value: string) => void\n}\nexport const PasswordField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Text Field',\n placeholder = 'Enter text here',\n isShowErrorMsg = false,\n description,\n onValueChange,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => (\n <FormItem className=\"w-full\">\n <FormLabel>{label}</FormLabel>\n <FormControl>\n <PasswordInput placeholder={placeholder} {...field} onValueChange={onValueChange} />\n </FormControl>\n {!!description && <FormDescription>{description}</FormDescription>}\n {isShowErrorMsg && <FormMessage />}\n </FormItem>\n )}\n />\n )\n}\n"],"mappings":"qbAQA,MAAaA,GAAkC,CAAE,YAAW,GAAG,KAAW,CACxE,IAAM,EAAK,IACL,CAAC,EAAW,GAAgB,EAAkB,IAC9C,EAAmB,MAAkB,EAAc,GAAc,CAAC,GAAY,IACpF,OACE,EAAC,MAAA,CAAI,UAAU,qBACb,EAAC,EAAA,CAAM,GAAI,EAAU,KAAI,YAAY,WAAW,KAAM,EAAY,OAAS,WAAY,UAAW,EAAG,OAAQ,KAC7G,EAAC,SAAA,CACC,UAAU,oVACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,gBAAkB,gBAC1C,eAAc,EACd,gBAAc,oBAED,EAAZ,EAAa,EAA8C,EAA9C,CAAW,KAAM,GAAI,cAAY,eCT1C,GAAiE,CAC5E,OACA,QAAQ,aACR,cAAc,kBACd,iBAAiB,GACjB,cACA,mBAGE,EAAC,EAAA,CACO,OACN,QAAS,CAAE,WACT,EAAC,EAAA,CAAS,UAAU,mBAClB,EAAC,EAAA,CAAA,SAAW,IACZ,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAA2B,cAAa,GAAI,EAAsB,oBAEpE,CAAC,CAAC,GAAe,EAAC,EAAA,CAAA,SAAiB,IACnC,GAAkB,EAAC,EAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/select-field.d.ts
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
27
27
  isShowErrorMsg,
28
28
  description,
29
29
  className
30
- }: Props<TFieldValues>) => react_jsx_runtime14.JSX.Element;
30
+ }: Props<TFieldValues>) => react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
32
  export { SelectField };
33
33
  //# sourceMappingURL=select-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime38 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime54 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/switch-field.d.ts
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
13
13
  label,
14
14
  description,
15
15
  isShowErrorMsg
16
- }: Props<TFieldValues>) => react_jsx_runtime38.JSX.Element;
16
+ }: Props<TFieldValues>) => react_jsx_runtime54.JSX.Element;
17
17
  //#endregion
18
18
  export { SwitchField };
19
19
  //# sourceMappingURL=switch-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/switch-field.d.ts
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
13
13
  label,
14
14
  description,
15
15
  isShowErrorMsg
16
- }: Props<TFieldValues>) => react_jsx_runtime23.JSX.Element;
16
+ }: Props<TFieldValues>) => react_jsx_runtime12.JSX.Element;
17
17
  //#endregion
18
18
  export { SwitchField };
19
19
  //# sourceMappingURL=switch-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime57 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime87 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/text-field.d.ts
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
25
25
  description,
26
26
  className,
27
27
  onValueChange
28
- }: Props<TFieldValues>) => react_jsx_runtime57.JSX.Element;
28
+ }: Props<TFieldValues>) => react_jsx_runtime87.JSX.Element;
29
29
  //#endregion
30
30
  export { TextField };
31
31
  //# sourceMappingURL=text-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/text-field.d.ts
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
25
25
  description,
26
26
  className,
27
27
  onValueChange
28
- }: Props<TFieldValues>) => react_jsx_runtime9.JSX.Element;
28
+ }: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
29
29
  //#endregion
30
30
  export { TextField };
31
31
  //# sourceMappingURL=text-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime41 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/textarea-field.d.ts
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
21
21
  description,
22
22
  rows,
23
23
  onValueChange
24
- }: Props<TFieldValues>) => react_jsx_runtime12.JSX.Element;
24
+ }: Props<TFieldValues>) => react_jsx_runtime41.JSX.Element;
25
25
  //#endregion
26
26
  export { TextareaField };
27
27
  //# sourceMappingURL=textarea-field.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
  import { FieldPath, FieldValues } from "react-hook-form";
3
3
 
4
4
  //#region packages/components/forms/textarea-field.d.ts
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
21
21
  description,
22
22
  rows,
23
23
  onValueChange
24
- }: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
24
+ }: Props<TFieldValues>) => react_jsx_runtime11.JSX.Element;
25
25
  //#endregion
26
26
  export { TextareaField };
27
27
  //# sourceMappingURL=textarea-field.d.ts.map
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./skeleton-CmGSyYRm.cjs`),n=e.__toESM(require(`lucide-react`)),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`react`)),o=({src:e,alt:o,width:s,height:c,maxRetries:l=3,retryDelay:u=500,className:d,onClick:f})=>{let p=(0,a.useRef)(null),[m,h]=(0,a.useState)(e),[g,_]=(0,a.useState)(0),[v,y]=(0,a.useState)(!1),[b,x]=(0,a.useState)(!1),S=(0,a.useCallback)(()=>{y(!0)},[]),C=(0,a.useCallback)(()=>{if(g<l){x(!1);let t=g+1;_(t),setTimeout(()=>{let n=`?retry=${Date.now()}&attempt=${t}`;h(e+n)},u*t);return}x(!0),y(!0),h(e)},[l,g,u,e]);return b?(0,i.jsx)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`@container relative inline-block`,d),children:(0,i.jsxs)(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[(0,i.jsx)(n.AlertCircleIcon,{className:`text-danger size-8 @max-[52px]:size-6`}),(0,i.jsx)(`span`,{className:`text-danger-weak y ml-2 text-sm @max-[96px]:sr-only`,children:`Image failed to load`})]})}):(0,i.jsxs)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`relative inline-block`,d),onClick:f,children:[!v&&(0,i.jsx)(t.Skeleton,{className:`absolute inset-0 flex size-full items-center justify-center`,children:(0,i.jsx)(`div`,{className:`loader`})}),(0,i.jsx)(`img`,{id:m,ref:p,src:m,alt:o,loading:`lazy`,className:(0,r.cn)(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,v&&`opacity-100`,!v&&`pointer-events-none opacity-0`),onLoad:S,onError:C})]})};Object.defineProperty(exports,`Image`,{enumerable:!0,get:function(){return o}});
2
- //# sourceMappingURL=image-Cm4vJeHx.cjs.map
1
+ const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./skeleton-CmGSyYRm.cjs`),n=e.__toESM(require(`lucide-react`)),r=e.__toESM(require(`@customafk/react-toolkit/utils`)),i=e.__toESM(require(`react/jsx-runtime`)),a=e.__toESM(require(`react`)),o=({src:e,alt:o,width:s,height:c,maxRetries:l=3,retryDelay:u=500,className:d,onClick:f})=>{let p=(0,a.useRef)(null),[m,h]=(0,a.useState)(e),[g,_]=(0,a.useState)(0),[v,y]=(0,a.useState)(!1),[b,x]=(0,a.useState)(!1),S=(0,a.useCallback)(()=>{y(!0)},[]),C=(0,a.useCallback)(()=>{if(g<l){x(!1);let t=g+1;_(t),setTimeout(()=>{let n=`?retry=${Date.now()}&attempt=${t}`;h(e+n)},u*t);return}x(!0),y(!0),h(e)},[l,g,u,e]);return b?(0,i.jsx)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`@container relative inline-block`,d),children:(0,i.jsxs)(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[(0,i.jsx)(n.AlertCircleIcon,{className:`text-danger size-8 @max-[52px]:size-6`}),(0,i.jsx)(`span`,{className:`text-danger-weak text-xs @max-[96px]:sr-only text-center`,children:`Image failed to load`})]})}):(0,i.jsxs)(`div`,{style:{width:s,height:c},className:(0,r.cn)(`relative inline-block`,d),onClick:f,children:[!v&&(0,i.jsx)(t.Skeleton,{className:`absolute inset-0 flex size-full items-center justify-center animate-pulse`}),(0,i.jsx)(`img`,{id:m,ref:p,src:m,alt:o,loading:`lazy`,className:(0,r.cn)(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,v&&`opacity-100`,!v&&`pointer-events-none opacity-0`),onLoad:S,onError:C})]})};Object.defineProperty(exports,`Image`,{enumerable:!0,get:function(){return o}});
2
+ //# sourceMappingURL=image-D3D8dE6s.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-D3D8dE6s.cjs","names":["Image: React.FC<Props>","AlertCircleIcon","Skeleton"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport { Skeleton } from './skeleton'\n\ntype Props = {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n maxRetries?: number\n retryDelay?: number\n className?: string\n onClick?: () => void\n}\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, onClick }) => {\n const imageRef = useRef<HTMLImageElement>(null)\n const [currentSrc, setCurrentSrc] = useState<string | undefined>(src)\n const [retryCount, setRetryCount] = useState<number>(0)\n const [isLoaded, setIsLoaded] = useState<boolean>(false)\n const [hasError, setHasError] = useState<boolean>(false)\n\n const handleLoad = useCallback(() => {\n setIsLoaded(true)\n }, [])\n\n const handleError = useCallback(() => {\n if (retryCount < maxRetries) {\n // imageRef.current?.style.setProperty('display', 'none')\n setHasError(false)\n const newRetryCount = retryCount + 1\n setRetryCount(newRetryCount)\n\n // Retry with exponential backoff and cache busting\n setTimeout(() => {\n const cacheBuster = `?retry=${Date.now()}&attempt=${newRetryCount}`\n setCurrentSrc(src + cacheBuster)\n }, retryDelay * newRetryCount)\n return\n }\n\n setHasError(true)\n setIsLoaded(true)\n setCurrentSrc(src)\n }, [maxRetries, retryCount, retryDelay, src])\n\n if (hasError) {\n return (\n <div style={{ width, height }} className={cn('@container relative inline-block', className)}>\n <div className=\"bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md\">\n <AlertCircleIcon className=\"text-danger size-8 @max-[52px]:size-6\" />\n <span className=\"text-danger-weak text-xs @max-[96px]:sr-only text-center\">Image failed to load</span>\n </div>\n </div>\n )\n }\n\n return (\n <div style={{ width, height }} className={cn('relative inline-block', className)} onClick={onClick}>\n {!isLoaded && (\n <Skeleton className=\"absolute inset-0 flex size-full items-center justify-center animate-pulse\"/>\n )}\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'shadow-card size-full rounded-md object-cover transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n )\n}\n"],"mappings":"iPAiBaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,aAAc,CAC3H,IAAM,GAAA,EAAA,EAAA,QAAoC,MACpC,CAAC,EAAY,IAAA,EAAA,EAAA,UAA8C,GAC3D,CAAC,EAAY,IAAA,EAAA,EAAA,UAAkC,GAC/C,CAAC,EAAU,IAAA,EAAA,EAAA,UAAiC,IAC5C,CAAC,EAAU,IAAA,EAAA,EAAA,UAAiC,IAE5C,GAAA,EAAA,EAAA,iBAA+B,CACnC,EAAY,KACX,IAEG,GAAA,EAAA,EAAA,iBAAgC,CACpC,GAAI,EAAa,EAAY,CAE3B,EAAY,IACZ,IAAM,EAAgB,EAAa,EACnC,EAAc,GAGd,eAAiB,CACf,IAAM,EAAc,UAAU,KAAK,MAAM,WAAW,IACpD,EAAc,EAAM,IACnB,EAAa,GAChB,OAGF,EAAY,IACZ,EAAY,IACZ,EAAc,IACb,CAAC,EAAY,EAAY,EAAY,IAaxC,OAXI,GAEA,EAAA,EAAA,KAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,WAAA,EAAA,EAAA,IAAc,mCAAoC,aAC/E,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,gHACb,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,UAAU,2CAC3B,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,oEAA2D,+BAOjF,EAAA,EAAA,MAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,WAAA,EAAA,EAAA,IAAc,wBAAyB,GAAqB,oBACxF,CAAC,IACA,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,UAAU,+EAEtB,EAAA,EAAA,KAAC,MAAA,CACC,GAAI,EACJ,IAAK,EACL,IAAK,EACA,MACL,QAAQ,OACR,WAAA,EAAA,EAAA,IACE,gFACA,GAAY,cACZ,CAAC,GAAY,iCAEf,OAAQ,EACR,QAAS"}
@@ -1,2 +1,2 @@
1
- import{Skeleton as e}from"./skeleton-DFF0w4en.js";import{AlertCircleIcon as t}from"lucide-react";import{cn as n}from"@customafk/react-toolkit/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useCallback as a,useRef as o,useState as s}from"react";const c=({src:c,alt:l,width:u,height:d,maxRetries:f=3,retryDelay:p=500,className:m,onClick:h})=>{let g=o(null),[_,v]=s(c),[y,b]=s(0),[x,S]=s(!1),[C,w]=s(!1),T=a(()=>{S(!0)},[]),E=a(()=>{if(y<f){w(!1);let e=y+1;b(e),setTimeout(()=>{let t=`?retry=${Date.now()}&attempt=${e}`;v(c+t)},p*e);return}w(!0),S(!0),v(c)},[f,y,p,c]);return C?r(`div`,{style:{width:u,height:d},className:n(`@container relative inline-block`,m),children:i(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[r(t,{className:`text-danger size-8 @max-[52px]:size-6`}),r(`span`,{className:`text-danger-weak y ml-2 text-sm @max-[96px]:sr-only`,children:`Image failed to load`})]})}):i(`div`,{style:{width:u,height:d},className:n(`relative inline-block`,m),onClick:h,children:[!x&&r(e,{className:`absolute inset-0 flex size-full items-center justify-center`,children:r(`div`,{className:`loader`})}),r(`img`,{id:_,ref:g,src:_,alt:l,loading:`lazy`,className:n(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,x&&`opacity-100`,!x&&`pointer-events-none opacity-0`),onLoad:T,onError:E})]})};export{c as Image};
2
- //# sourceMappingURL=image-BdTzYp1S.js.map
1
+ import{Skeleton as e}from"./skeleton-DFF0w4en.js";import{AlertCircleIcon as t}from"lucide-react";import{cn as n}from"@customafk/react-toolkit/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useCallback as a,useRef as o,useState as s}from"react";const c=({src:c,alt:l,width:u,height:d,maxRetries:f=3,retryDelay:p=500,className:m,onClick:h})=>{let g=o(null),[_,v]=s(c),[y,b]=s(0),[x,S]=s(!1),[C,w]=s(!1),T=a(()=>{S(!0)},[]),E=a(()=>{if(y<f){w(!1);let e=y+1;b(e),setTimeout(()=>{let t=`?retry=${Date.now()}&attempt=${e}`;v(c+t)},p*e);return}w(!0),S(!0),v(c)},[f,y,p,c]);return C?r(`div`,{style:{width:u,height:d},className:n(`@container relative inline-block`,m),children:i(`div`,{className:`bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md`,children:[r(t,{className:`text-danger size-8 @max-[52px]:size-6`}),r(`span`,{className:`text-danger-weak text-xs @max-[96px]:sr-only text-center`,children:`Image failed to load`})]})}):i(`div`,{style:{width:u,height:d},className:n(`relative inline-block`,m),onClick:h,children:[!x&&r(e,{className:`absolute inset-0 flex size-full items-center justify-center animate-pulse`}),r(`img`,{id:_,ref:g,src:_,alt:l,loading:`lazy`,className:n(`shadow-card size-full rounded-md object-cover transition-opacity duration-300`,x&&`opacity-100`,!x&&`pointer-events-none opacity-0`),onLoad:T,onError:E})]})};export{c as Image};
2
+ //# sourceMappingURL=image-Dm3jT9QX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-BdTzYp1S.js","names":["Image: React.FC<Props>"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport { Skeleton } from './skeleton'\n\ntype Props = {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n maxRetries?: number\n retryDelay?: number\n className?: string\n onClick?: () => void\n}\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, onClick }) => {\n const imageRef = useRef<HTMLImageElement>(null)\n const [currentSrc, setCurrentSrc] = useState<string | undefined>(src)\n const [retryCount, setRetryCount] = useState<number>(0)\n const [isLoaded, setIsLoaded] = useState<boolean>(false)\n const [hasError, setHasError] = useState<boolean>(false)\n\n const handleLoad = useCallback(() => {\n setIsLoaded(true)\n }, [])\n\n const handleError = useCallback(() => {\n if (retryCount < maxRetries) {\n // imageRef.current?.style.setProperty('display', 'none')\n setHasError(false)\n const newRetryCount = retryCount + 1\n setRetryCount(newRetryCount)\n\n // Retry with exponential backoff and cache busting\n setTimeout(() => {\n const cacheBuster = `?retry=${Date.now()}&attempt=${newRetryCount}`\n setCurrentSrc(src + cacheBuster)\n }, retryDelay * newRetryCount)\n return\n }\n\n setHasError(true)\n setIsLoaded(true)\n setCurrentSrc(src)\n }, [maxRetries, retryCount, retryDelay, src])\n\n if (hasError) {\n return (\n <div style={{ width, height }} className={cn('@container relative inline-block', className)}>\n <div className=\"bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md\">\n <AlertCircleIcon className=\"text-danger size-8 @max-[52px]:size-6\" />\n <span className=\"text-danger-weak y ml-2 text-sm @max-[96px]:sr-only\">Image failed to load</span>\n </div>\n </div>\n )\n }\n\n return (\n <div style={{ width, height }} className={cn('relative inline-block', className)} onClick={onClick}>\n {!isLoaded && (\n <Skeleton className=\"absolute inset-0 flex size-full items-center justify-center\">\n <div className=\"loader\" />\n </Skeleton>\n )}\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'shadow-card size-full rounded-md object-cover transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n )\n}\n"],"mappings":"qQAiBA,MAAaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,aAAc,CAC3H,IAAM,EAAW,EAAyB,MACpC,CAAC,EAAY,GAAiB,EAA6B,GAC3D,CAAC,EAAY,GAAiB,EAAiB,GAC/C,CAAC,EAAU,GAAe,EAAkB,IAC5C,CAAC,EAAU,GAAe,EAAkB,IAE5C,EAAa,MAAkB,CACnC,EAAY,KACX,IAEG,EAAc,MAAkB,CACpC,GAAI,EAAa,EAAY,CAE3B,EAAY,IACZ,IAAM,EAAgB,EAAa,EACnC,EAAc,GAGd,eAAiB,CACf,IAAM,EAAc,UAAU,KAAK,MAAM,WAAW,IACpD,EAAc,EAAM,IACnB,EAAa,GAChB,OAGF,EAAY,IACZ,EAAY,IACZ,EAAc,IACb,CAAC,EAAY,EAAY,EAAY,IAaxC,OAXI,EAEA,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,mCAAoC,YAC/E,EAAC,MAAA,CAAI,UAAU,+GACb,EAAC,EAAA,CAAgB,UAAU,0CAC3B,EAAC,OAAA,CAAK,UAAU,+DAAsD,8BAO5E,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,wBAAyB,GAAqB,oBACxF,CAAC,GACA,EAAC,EAAA,CAAS,UAAU,uEAClB,EAAC,MAAA,CAAI,UAAU,aAGnB,EAAC,MAAA,CACC,GAAI,EACJ,IAAK,EACL,IAAK,EACA,MACL,QAAQ,OACR,UAAW,EACT,gFACA,GAAY,cACZ,CAAC,GAAY,iCAEf,OAAQ,EACR,QAAS"}
1
+ {"version":3,"file":"image-Dm3jT9QX.js","names":["Image: React.FC<Props>"],"sources":["../packages/components/ui/image.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\nimport { cn } from '@customafk/react-toolkit/utils'\n\nimport { AlertCircleIcon } from 'lucide-react'\n\nimport { Skeleton } from './skeleton'\n\ntype Props = {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n maxRetries?: number\n retryDelay?: number\n className?: string\n onClick?: () => void\n}\nexport const Image: React.FC<Props> = ({ src, alt, width, height, maxRetries = 3, retryDelay = 500, className, onClick }) => {\n const imageRef = useRef<HTMLImageElement>(null)\n const [currentSrc, setCurrentSrc] = useState<string | undefined>(src)\n const [retryCount, setRetryCount] = useState<number>(0)\n const [isLoaded, setIsLoaded] = useState<boolean>(false)\n const [hasError, setHasError] = useState<boolean>(false)\n\n const handleLoad = useCallback(() => {\n setIsLoaded(true)\n }, [])\n\n const handleError = useCallback(() => {\n if (retryCount < maxRetries) {\n // imageRef.current?.style.setProperty('display', 'none')\n setHasError(false)\n const newRetryCount = retryCount + 1\n setRetryCount(newRetryCount)\n\n // Retry with exponential backoff and cache busting\n setTimeout(() => {\n const cacheBuster = `?retry=${Date.now()}&attempt=${newRetryCount}`\n setCurrentSrc(src + cacheBuster)\n }, retryDelay * newRetryCount)\n return\n }\n\n setHasError(true)\n setIsLoaded(true)\n setCurrentSrc(src)\n }, [maxRetries, retryCount, retryDelay, src])\n\n if (hasError) {\n return (\n <div style={{ width, height }} className={cn('@container relative inline-block', className)}>\n <div className=\"bg-danger-muted shadow-card flex size-full flex-col items-center justify-center gap-y-2 rounded-md\">\n <AlertCircleIcon className=\"text-danger size-8 @max-[52px]:size-6\" />\n <span className=\"text-danger-weak text-xs @max-[96px]:sr-only text-center\">Image failed to load</span>\n </div>\n </div>\n )\n }\n\n return (\n <div style={{ width, height }} className={cn('relative inline-block', className)} onClick={onClick}>\n {!isLoaded && (\n <Skeleton className=\"absolute inset-0 flex size-full items-center justify-center animate-pulse\"/>\n )}\n <img\n id={currentSrc}\n ref={imageRef}\n src={currentSrc}\n alt={alt}\n loading=\"lazy\"\n className={cn(\n 'shadow-card size-full rounded-md object-cover transition-opacity duration-300',\n isLoaded && 'opacity-100',\n !isLoaded && 'pointer-events-none opacity-0',\n )}\n onLoad={handleLoad}\n onError={handleError}\n />\n </div>\n )\n}\n"],"mappings":"qQAiBA,MAAaA,GAA0B,CAAE,MAAK,MAAK,QAAO,SAAQ,aAAa,EAAG,aAAa,IAAK,YAAW,aAAc,CAC3H,IAAM,EAAW,EAAyB,MACpC,CAAC,EAAY,GAAiB,EAA6B,GAC3D,CAAC,EAAY,GAAiB,EAAiB,GAC/C,CAAC,EAAU,GAAe,EAAkB,IAC5C,CAAC,EAAU,GAAe,EAAkB,IAE5C,EAAa,MAAkB,CACnC,EAAY,KACX,IAEG,EAAc,MAAkB,CACpC,GAAI,EAAa,EAAY,CAE3B,EAAY,IACZ,IAAM,EAAgB,EAAa,EACnC,EAAc,GAGd,eAAiB,CACf,IAAM,EAAc,UAAU,KAAK,MAAM,WAAW,IACpD,EAAc,EAAM,IACnB,EAAa,GAChB,OAGF,EAAY,IACZ,EAAY,IACZ,EAAc,IACb,CAAC,EAAY,EAAY,EAAY,IAaxC,OAXI,EAEA,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,mCAAoC,YAC/E,EAAC,MAAA,CAAI,UAAU,+GACb,EAAC,EAAA,CAAgB,UAAU,0CAC3B,EAAC,OAAA,CAAK,UAAU,oEAA2D,8BAOjF,EAAC,MAAA,CAAI,MAAO,CAAE,QAAO,UAAU,UAAW,EAAG,wBAAyB,GAAqB,oBACxF,CAAC,GACA,EAAC,EAAA,CAAS,UAAU,8EAEtB,EAAC,MAAA,CACC,GAAI,EACJ,IAAK,EACL,IAAK,EACA,MACL,QAAQ,OACR,UAAW,EACT,gFACA,GAAY,cACZ,CAAC,GAAY,iCAEf,OAAQ,EACR,QAAS"}