@customafk/lunas-ui 0.0.95 → 0.0.97

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 (172) hide show
  1. package/dist/{button-BJr39-E1.d.ts → button-D9BFe499.d.ts} +6 -6
  2. package/dist/{button-CkwiAMe_.d.cts → button-Dm2SLvNi.d.cts} +6 -6
  3. package/dist/cards/simple-card.d.cts +2 -2
  4. package/dist/cards/simple-card.d.ts +2 -2
  5. package/dist/{command-DMBJSFJb.d.cts → command-CPfyi3lV.d.cts} +12 -12
  6. package/dist/{command-CsybdMF0.d.ts → command-Cjk7aLRb.d.ts} +12 -12
  7. package/dist/data-display/empty.d.ts +2 -2
  8. package/dist/data-display/statistic.d.cts +2 -2
  9. package/dist/data-display/statistic.d.ts +2 -2
  10. package/dist/{dialog-C8Scjvgn.d.ts → dialog-Dx46kqvb.d.cts} +12 -12
  11. package/dist/{dialog-mmKN6bMZ.d.cts → dialog-ghUnYeay.d.ts} +12 -12
  12. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +4 -4
  13. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +4 -4
  14. package/dist/dialogs/form-dialog.d.ts +2 -2
  15. package/dist/forms/combobox-field.cjs +1 -1
  16. package/dist/forms/combobox-field.cjs.map +1 -1
  17. package/dist/forms/combobox-field.d.cts +2 -2
  18. package/dist/forms/combobox-field.d.ts +2 -2
  19. package/dist/forms/combobox-field.js +1 -1
  20. package/dist/forms/combobox-field.js.map +1 -1
  21. package/dist/forms/date-field.d.ts +2 -2
  22. package/dist/forms/form-wrapper.d.cts +2 -2
  23. package/dist/forms/form-wrapper.d.ts +2 -2
  24. package/dist/forms/multi-select-field.d.cts +2 -2
  25. package/dist/forms/number-field.d.cts +2 -2
  26. package/dist/forms/number-field.d.ts +2 -2
  27. package/dist/forms/password-field.d.cts +2 -2
  28. package/dist/forms/password-field.d.ts +2 -2
  29. package/dist/forms/select-field.d.cts +2 -2
  30. package/dist/forms/select-field.d.ts +2 -2
  31. package/dist/forms/switch-field.d.cts +2 -2
  32. package/dist/forms/switch-field.d.ts +2 -2
  33. package/dist/forms/text-field.d.cts +2 -2
  34. package/dist/forms/text-field.d.ts +2 -2
  35. package/dist/forms/textarea-field.d.cts +2 -2
  36. package/dist/forms/textarea-field.d.ts +2 -2
  37. package/dist/{input-CD0idRrj.d.ts → input-6c2vBe4o.d.ts} +3 -3
  38. package/dist/{input-C5NrcQAm.d.cts → input-qIwUgqQ9.d.cts} +3 -3
  39. package/dist/label-DG2t1Ucl.d.ts +11 -0
  40. package/dist/{label-CTkgyZqy.d.cts → label-DpJBMAXm.d.cts} +3 -3
  41. package/dist/layouts/app-layout/index.d.cts +3 -3
  42. package/dist/layouts/app-layout/index.d.ts +28 -28
  43. package/dist/layouts/flex.d.cts +2 -2
  44. package/dist/layouts/flex.d.ts +2 -2
  45. package/dist/layouts/service-layout/index.d.cts +5 -5
  46. package/dist/layouts/service-layout/index.d.ts +13 -13
  47. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  48. package/dist/pages/FeatureDeveloping.d.ts +2 -2
  49. package/dist/pages/FeatureFixing.d.cts +2 -2
  50. package/dist/pages/FeatureFixing.d.ts +2 -2
  51. package/dist/pages/NotAuthorized.d.cts +2 -2
  52. package/dist/pages/NotAuthorized.d.ts +2 -2
  53. package/dist/pages/NotFound.d.cts +2 -2
  54. package/dist/pages/NotFound.d.ts +2 -2
  55. package/dist/products/product-quantity-control.d.cts +2 -2
  56. package/dist/products/product-quantity-control.d.ts +2 -2
  57. package/dist/{separator-D_c8h0Aq.d.cts → separator-B9LriCbJ.d.cts} +3 -3
  58. package/dist/{separator-B4drkRIA.d.ts → separator-DXiCorAO.d.ts} +3 -3
  59. package/dist/table/index.d.cts +2 -2
  60. package/dist/table/index.d.ts +2 -2
  61. package/dist/{toggle-CMYTXtd1.d.cts → toggle-DbK_eiCh.d.cts} +5 -5
  62. package/dist/{toggle-53uTUqXx.d.ts → toggle-DpbtNgX8.d.ts} +5 -5
  63. package/dist/{tooltip-_5h9HHwj.d.cts → tooltip-BXubLsHv.d.ts} +6 -6
  64. package/dist/{tooltip-DTDkf-An.d.ts → tooltip-CSwy3a18.d.cts} +1 -1
  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 +7 -7
  72. package/dist/ui/alert.d.ts +7 -7
  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 +4 -4
  78. package/dist/ui/badge.d.ts +4 -4
  79. package/dist/ui/breadcrumb.d.cts +8 -8
  80. package/dist/ui/breadcrumb.d.ts +8 -8
  81. package/dist/ui/button-group.d.cts +8 -8
  82. package/dist/ui/button-group.d.ts +8 -8
  83. package/dist/ui/button.d.cts +1 -1
  84. package/dist/ui/button.d.ts +1 -1
  85. package/dist/ui/calendar.d.cts +4 -4
  86. package/dist/ui/calendar.d.ts +4 -4
  87. package/dist/ui/card.d.cts +8 -8
  88. package/dist/ui/card.d.ts +8 -8
  89. package/dist/ui/carousel.d.cts +7 -7
  90. package/dist/ui/carousel.d.ts +7 -7
  91. package/dist/ui/collapsible.d.cts +4 -4
  92. package/dist/ui/collapsible.d.ts +4 -4
  93. package/dist/ui/command.d.cts +2 -2
  94. package/dist/ui/command.d.ts +2 -2
  95. package/dist/ui/context-menu.d.cts +16 -16
  96. package/dist/ui/context-menu.d.ts +16 -16
  97. package/dist/ui/dialog.d.cts +1 -1
  98. package/dist/ui/dialog.d.ts +1 -1
  99. package/dist/ui/drawer.d.cts +11 -11
  100. package/dist/ui/drawer.d.ts +11 -11
  101. package/dist/ui/dropdown-menu.d.cts +16 -16
  102. package/dist/ui/dropdown-menu.d.ts +16 -16
  103. package/dist/ui/empty.d.cts +7 -7
  104. package/dist/ui/empty.d.ts +7 -7
  105. package/dist/ui/field.d.cts +15 -15
  106. package/dist/ui/field.d.ts +13 -13
  107. package/dist/ui/file-uploader.d.cts +2 -2
  108. package/dist/ui/file-uploader.d.ts +2 -2
  109. package/dist/ui/form.d.cts +7 -7
  110. package/dist/ui/form.d.ts +7 -7
  111. package/dist/ui/hover-card.d.cts +4 -4
  112. package/dist/ui/hover-card.d.ts +4 -4
  113. package/dist/ui/input-otp.d.cts +5 -5
  114. package/dist/ui/input-otp.d.ts +5 -5
  115. package/dist/ui/input.d.cts +1 -1
  116. package/dist/ui/input.d.ts +1 -1
  117. package/dist/ui/inputs/search-input.d.cts +3 -3
  118. package/dist/ui/inputs/search-input.d.ts +1 -1
  119. package/dist/ui/item.d.cts +15 -15
  120. package/dist/ui/item.d.ts +15 -15
  121. package/dist/ui/label.d.cts +1 -1
  122. package/dist/ui/label.d.ts +1 -1
  123. package/dist/ui/menubar.d.cts +17 -17
  124. package/dist/ui/menubar.d.ts +17 -17
  125. package/dist/ui/multi-select.d.cts +2 -2
  126. package/dist/ui/multi-select.d.ts +2 -2
  127. package/dist/ui/navigation-menu.d.cts +9 -9
  128. package/dist/ui/navigation-menu.d.ts +11 -11
  129. package/dist/ui/pagination.d.cts +9 -9
  130. package/dist/ui/pagination.d.ts +9 -9
  131. package/dist/ui/popover.d.cts +5 -5
  132. package/dist/ui/popover.d.ts +5 -5
  133. package/dist/ui/progress.d.cts +2 -2
  134. package/dist/ui/progress.d.ts +2 -2
  135. package/dist/ui/radio-group.d.cts +3 -3
  136. package/dist/ui/radio-group.d.ts +3 -3
  137. package/dist/ui/resizable.d.cts +4 -4
  138. package/dist/ui/resizable.d.ts +4 -4
  139. package/dist/ui/scroll-area.d.cts +3 -3
  140. package/dist/ui/scroll-area.d.ts +3 -3
  141. package/dist/ui/select.d.cts +11 -11
  142. package/dist/ui/select.d.ts +11 -11
  143. package/dist/ui/separator.d.cts +1 -1
  144. package/dist/ui/separator.d.ts +1 -1
  145. package/dist/ui/sheet.d.cts +9 -9
  146. package/dist/ui/sheet.d.ts +9 -9
  147. package/dist/ui/sidebar.d.cts +30 -30
  148. package/dist/ui/sidebar.d.ts +30 -30
  149. package/dist/ui/skeleton.d.cts +2 -2
  150. package/dist/ui/skeleton.d.ts +2 -2
  151. package/dist/ui/slider.d.cts +2 -2
  152. package/dist/ui/slider.d.ts +2 -2
  153. package/dist/ui/sonner.d.cts +2 -2
  154. package/dist/ui/sonner.d.ts +2 -2
  155. package/dist/ui/spinner.d.cts +2 -2
  156. package/dist/ui/spinner.d.ts +2 -2
  157. package/dist/ui/switch.d.cts +2 -2
  158. package/dist/ui/switch.d.ts +2 -2
  159. package/dist/ui/table.d.cts +9 -9
  160. package/dist/ui/table.d.ts +9 -9
  161. package/dist/ui/tabs.d.cts +5 -5
  162. package/dist/ui/tabs.d.ts +5 -5
  163. package/dist/ui/textarea.d.cts +2 -2
  164. package/dist/ui/textarea.d.ts +2 -2
  165. package/dist/ui/toggle-group.d.cts +4 -4
  166. package/dist/ui/toggle-group.d.ts +4 -4
  167. package/dist/ui/toggle.d.cts +1 -1
  168. package/dist/ui/toggle.d.ts +1 -1
  169. package/dist/ui/tooltip.d.cts +1 -1
  170. package/dist/ui/tooltip.d.ts +1 -1
  171. package/package.json +1 -1
  172. package/dist/label-F0vlSMj2.d.ts +0 -11
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime50 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime41 from "react/jsx-runtime";
2
2
  import { VariantProps } from "class-variance-authority";
3
- import * as class_variance_authority_types13 from "class-variance-authority/types";
3
+ import * as class_variance_authority_types12 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/button-variants.d.ts
6
6
  /**
@@ -8,9 +8,9 @@ import * as class_variance_authority_types13 from "class-variance-authority/type
8
8
  */
9
9
  declare const buttonVariants: (props?: ({
10
10
  variant?: "default" | "outline" | "link" | "ghost" | null | undefined;
11
- color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
11
+ color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
12
12
  size?: "sm" | "lg" | "default" | "icon" | null | undefined;
13
- } & class_variance_authority_types13.ClassProp) | undefined) => string;
13
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
14
14
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
15
15
  //#endregion
16
16
  //#region packages/components/ui/button.d.ts
@@ -50,7 +50,7 @@ declare function Button({
50
50
  disabled,
51
51
  type,
52
52
  ...props
53
- }: ButtonProps): react_jsx_runtime50.JSX.Element;
53
+ }: ButtonProps): react_jsx_runtime41.JSX.Element;
54
54
  //#endregion
55
55
  export { Button, ButtonProps };
56
- //# sourceMappingURL=button-BJr39-E1.d.ts.map
56
+ //# sourceMappingURL=button-D9BFe499.d.ts.map
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime24 from "react/jsx-runtime";
2
- import * as class_variance_authority_types11 from "class-variance-authority/types";
1
+ import * as react_jsx_runtime34 from "react/jsx-runtime";
2
+ import * as class_variance_authority_types12 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
 
5
5
  //#region packages/components/ui/button-variants.d.ts
@@ -8,9 +8,9 @@ import { VariantProps } from "class-variance-authority";
8
8
  */
9
9
  declare const buttonVariants: (props?: ({
10
10
  variant?: "default" | "outline" | "link" | "ghost" | null | undefined;
11
- color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
11
+ color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
12
12
  size?: "sm" | "lg" | "default" | "icon" | null | undefined;
13
- } & class_variance_authority_types11.ClassProp) | undefined) => string;
13
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
14
14
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
15
15
  //#endregion
16
16
  //#region packages/components/ui/button.d.ts
@@ -50,7 +50,7 @@ declare function Button({
50
50
  disabled,
51
51
  type,
52
52
  ...props
53
- }: ButtonProps): react_jsx_runtime24.JSX.Element;
53
+ }: ButtonProps): react_jsx_runtime34.JSX.Element;
54
54
  //#endregion
55
55
  export { Button, ButtonProps };
56
- //# sourceMappingURL=button-CkwiAMe_.d.cts.map
56
+ //# sourceMappingURL=button-Dm2SLvNi.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/cards/simple-card.d.ts
4
4
  type Props = {
@@ -13,7 +13,7 @@ declare const SimpleCard: ({
13
13
  action,
14
14
  footer,
15
15
  children
16
- }: React.PropsWithChildren<Props>) => react_jsx_runtime2.JSX.Element;
16
+ }: React.PropsWithChildren<Props>) => react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { SimpleCard };
19
19
  //# sourceMappingURL=simple-card.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/cards/simple-card.d.ts
4
4
  type Props = {
@@ -13,7 +13,7 @@ declare const SimpleCard: ({
13
13
  action,
14
14
  footer,
15
15
  children
16
- }: React.PropsWithChildren<Props>) => react_jsx_runtime1.JSX.Element;
16
+ }: React.PropsWithChildren<Props>) => react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { SimpleCard };
19
19
  //# sourceMappingURL=simple-card.d.ts.map
@@ -1,12 +1,12 @@
1
- import { Dialog } from "./dialog-mmKN6bMZ.cjs";
2
- import * as react_jsx_runtime83 from "react/jsx-runtime";
1
+ import { Dialog } from "./dialog-Dx46kqvb.cjs";
2
+ import * as react_jsx_runtime78 from "react/jsx-runtime";
3
3
  import { Command } from "cmdk";
4
4
 
5
5
  //#region packages/components/ui/command.d.ts
6
6
  declare function Command$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof Command>): react_jsx_runtime83.JSX.Element;
9
+ }: React.ComponentProps<typeof Command>): react_jsx_runtime78.JSX.Element;
10
10
  declare function CommandDialog({
11
11
  title,
12
12
  description,
@@ -19,34 +19,34 @@ declare function CommandDialog({
19
19
  description?: string;
20
20
  className?: string;
21
21
  showCloseButton?: boolean;
22
- }): react_jsx_runtime83.JSX.Element;
22
+ }): react_jsx_runtime78.JSX.Element;
23
23
  declare function CommandInput({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Command.Input>): react_jsx_runtime83.JSX.Element;
26
+ }: React.ComponentProps<typeof Command.Input>): react_jsx_runtime78.JSX.Element;
27
27
  declare function CommandList({
28
28
  className,
29
29
  ...props
30
- }: React.ComponentProps<typeof Command.List>): react_jsx_runtime83.JSX.Element;
30
+ }: React.ComponentProps<typeof Command.List>): react_jsx_runtime78.JSX.Element;
31
31
  declare function CommandEmpty({
32
32
  ...props
33
- }: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime83.JSX.Element;
33
+ }: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime78.JSX.Element;
34
34
  declare function CommandGroup({
35
35
  className,
36
36
  ...props
37
- }: React.ComponentProps<typeof Command.Group>): react_jsx_runtime83.JSX.Element;
37
+ }: React.ComponentProps<typeof Command.Group>): react_jsx_runtime78.JSX.Element;
38
38
  declare function CommandSeparator({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime83.JSX.Element;
41
+ }: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime78.JSX.Element;
42
42
  declare function CommandItem({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<typeof Command.Item>): react_jsx_runtime83.JSX.Element;
45
+ }: React.ComponentProps<typeof Command.Item>): react_jsx_runtime78.JSX.Element;
46
46
  declare function CommandShortcut({
47
47
  className,
48
48
  ...props
49
- }: React.ComponentProps<'span'>): react_jsx_runtime83.JSX.Element;
49
+ }: React.ComponentProps<'span'>): react_jsx_runtime78.JSX.Element;
50
50
  //#endregion
51
51
  export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
52
- //# sourceMappingURL=command-DMBJSFJb.d.cts.map
52
+ //# sourceMappingURL=command-CPfyi3lV.d.cts.map
@@ -1,12 +1,12 @@
1
- import { Dialog } from "./dialog-C8Scjvgn.js";
2
- import * as react_jsx_runtime68 from "react/jsx-runtime";
1
+ import { Dialog } from "./dialog-ghUnYeay.js";
2
+ import * as react_jsx_runtime60 from "react/jsx-runtime";
3
3
  import { Command } from "cmdk";
4
4
 
5
5
  //#region packages/components/ui/command.d.ts
6
6
  declare function Command$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof Command>): react_jsx_runtime68.JSX.Element;
9
+ }: React.ComponentProps<typeof Command>): react_jsx_runtime60.JSX.Element;
10
10
  declare function CommandDialog({
11
11
  title,
12
12
  description,
@@ -19,34 +19,34 @@ declare function CommandDialog({
19
19
  description?: string;
20
20
  className?: string;
21
21
  showCloseButton?: boolean;
22
- }): react_jsx_runtime68.JSX.Element;
22
+ }): react_jsx_runtime60.JSX.Element;
23
23
  declare function CommandInput({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Command.Input>): react_jsx_runtime68.JSX.Element;
26
+ }: React.ComponentProps<typeof Command.Input>): react_jsx_runtime60.JSX.Element;
27
27
  declare function CommandList({
28
28
  className,
29
29
  ...props
30
- }: React.ComponentProps<typeof Command.List>): react_jsx_runtime68.JSX.Element;
30
+ }: React.ComponentProps<typeof Command.List>): react_jsx_runtime60.JSX.Element;
31
31
  declare function CommandEmpty({
32
32
  ...props
33
- }: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime68.JSX.Element;
33
+ }: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime60.JSX.Element;
34
34
  declare function CommandGroup({
35
35
  className,
36
36
  ...props
37
- }: React.ComponentProps<typeof Command.Group>): react_jsx_runtime68.JSX.Element;
37
+ }: React.ComponentProps<typeof Command.Group>): react_jsx_runtime60.JSX.Element;
38
38
  declare function CommandSeparator({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime68.JSX.Element;
41
+ }: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime60.JSX.Element;
42
42
  declare function CommandItem({
43
43
  className,
44
44
  ...props
45
- }: React.ComponentProps<typeof Command.Item>): react_jsx_runtime68.JSX.Element;
45
+ }: React.ComponentProps<typeof Command.Item>): react_jsx_runtime60.JSX.Element;
46
46
  declare function CommandShortcut({
47
47
  className,
48
48
  ...props
49
- }: React.ComponentProps<'span'>): react_jsx_runtime68.JSX.Element;
49
+ }: React.ComponentProps<'span'>): react_jsx_runtime60.JSX.Element;
50
50
  //#endregion
51
51
  export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
52
- //# sourceMappingURL=command-CsybdMF0.d.ts.map
52
+ //# sourceMappingURL=command-Cjk7aLRb.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/data-display/empty.d.ts
4
- declare const EmptyDisplay: () => react_jsx_runtime2.JSX.Element;
4
+ declare const EmptyDisplay: () => react_jsx_runtime12.JSX.Element;
5
5
  //#endregion
6
6
  export { EmptyDisplay };
7
7
  //# sourceMappingURL=empty.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
  import * as react0 from "react";
3
3
 
4
4
  //#region packages/components/data-display/statistic.d.ts
@@ -23,7 +23,7 @@ declare const Statistic: react0.MemoExoticComponent<({
23
23
  showTrailingZeros,
24
24
  size,
25
25
  value
26
- }: Props) => react_jsx_runtime0.JSX.Element>;
26
+ }: Props) => react_jsx_runtime11.JSX.Element>;
27
27
  //#endregion
28
28
  export { Statistic };
29
29
  //# sourceMappingURL=statistic.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import * as react0 from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region packages/components/data-display/statistic.d.ts
5
5
  type Props = {
@@ -23,7 +23,7 @@ declare const Statistic: react0.MemoExoticComponent<({
23
23
  showTrailingZeros,
24
24
  size,
25
25
  value
26
- }: Props) => react_jsx_runtime0.JSX.Element>;
26
+ }: Props) => react_jsx_runtime3.JSX.Element>;
27
27
  //#endregion
28
28
  export { Statistic };
29
29
  //# sourceMappingURL=statistic.d.ts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime123 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime93 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime123.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime93.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime123.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime93.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime123.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime93.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime123.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime93.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime123.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime93.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime123.JSX.Element;
28
+ }): react_jsx_runtime93.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime123.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime93.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime123.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime93.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime123.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime93.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime123.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime93.JSX.Element;
45
45
  //#endregion
46
46
  export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
47
- //# sourceMappingURL=dialog-C8Scjvgn.d.ts.map
47
+ //# sourceMappingURL=dialog-Dx46kqvb.d.cts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime103 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime86 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime103.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime86.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime103.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime86.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime103.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime86.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime103.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime86.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime103.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime86.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime103.JSX.Element;
28
+ }): react_jsx_runtime86.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime103.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime86.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime103.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime86.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime103.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime86.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime103.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime86.JSX.Element;
45
45
  //#endregion
46
46
  export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
47
- //# sourceMappingURL=dialog-mmKN6bMZ.d.cts.map
47
+ //# sourceMappingURL=dialog-ghUnYeay.d.ts.map
@@ -1,7 +1,7 @@
1
- import { Button } from "../../../button-CkwiAMe_.cjs";
2
- import { Input } from "../../../input-C5NrcQAm.cjs";
3
- import { Separator } from "../../../separator-D_c8h0Aq.cjs";
4
- import { TooltipContent } from "../../../tooltip-_5h9HHwj.cjs";
1
+ import { Button } from "../../../button-Dm2SLvNi.cjs";
2
+ import { Input } from "../../../input-qIwUgqQ9.cjs";
3
+ import { Separator } from "../../../separator-B9LriCbJ.cjs";
4
+ import { TooltipContent } from "../../../tooltip-CSwy3a18.cjs";
5
5
  import * as react_jsx_runtime281 from "react/jsx-runtime";
6
6
  import * as class_variance_authority_types9 from "class-variance-authority/types";
7
7
  import { VariantProps } from "class-variance-authority";
@@ -1,7 +1,7 @@
1
- import { Button } from "../../../button-BJr39-E1.js";
2
- import { Input } from "../../../input-CD0idRrj.js";
3
- import { Separator } from "../../../separator-B4drkRIA.js";
4
- import { TooltipContent } from "../../../tooltip-DTDkf-An.js";
1
+ import { Button } from "../../../button-D9BFe499.js";
2
+ import { Input } from "../../../input-6c2vBe4o.js";
3
+ import { Separator } from "../../../separator-DXiCorAO.js";
4
+ import { TooltipContent } from "../../../tooltip-BXubLsHv.js";
5
5
  import * as react_jsx_runtime280 from "react/jsx-runtime";
6
6
  import { VariantProps } from "class-variance-authority";
7
7
  import * as class_variance_authority_types9 from "class-variance-authority/types";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime303 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_runtime303.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,2 +1,2 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-CAevLI5t.cjs`),require(`../button-variants-BHDyMRNh.cjs`);const t=require(`../button-BCahPWI8.cjs`);require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`);const n=require(`../field-DWOm17T1.cjs`),r=require(`../form-rN5ezSn5.cjs`);require(`../dialog-BBODhbxh.cjs`);const i=require(`../command-C13pL2M3.cjs`),a=require(`../popover-D6vyPDKA.cjs`);let o=require(`lucide-react`);o=e.__toESM(o);let s=require(`@customafk/react-toolkit/utils`);s=e.__toESM(s);let c=require(`react`);c=e.__toESM(c);let l=require(`react/jsx-runtime`);l=e.__toESM(l);const u=({name:e,label:u=`Combobox`,placeholder:d=`Chọn một mục`,description:f,options:p,onAddNewItem:m})=>(0,l.jsx)(r.FormField,{name:e,render:({field:e})=>(0,l.jsxs)(r.FormItem,{className:`w-full`,children:[(0,l.jsx)(c.Activity,{mode:u||f?`visible`:`hidden`,children:(0,l.jsxs)(n.FieldContent,{children:[(0,l.jsx)(r.FormLabel,{children:u}),!!f&&(0,l.jsx)(r.FormDescription,{children:f})]})}),(0,l.jsxs)(a.Popover,{modal:!0,children:[(0,l.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,l.jsx)(r.FormControl,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:(0,s.cn)(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[e.value?(0,l.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:p?.find(({value:t})=>t===e.value)?.label}):(0,l.jsx)(`span`,{className:`text-text-positive-muted`,children:d}),(0,l.jsx)(o.ChevronDownIcon,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),(0,l.jsx)(a.PopoverContent,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,l.jsxs)(i.Command,{className:`border-none`,children:[(0,l.jsx)(i.CommandInput,{placeholder:d??`Tìm kiếm`}),(0,l.jsxs)(i.CommandList,{children:[(0,l.jsx)(i.CommandGroup,{className:`max-h-40 overflow-y-auto`,children:p?.map(({value:t,label:n})=>(0,l.jsx)(i.CommandItem,{value:n,onSelect:()=>e.onChange(t),children:n},t))}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.CommandSeparator,{}),(0,l.jsx)(i.CommandGroup,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[(0,l.jsx)(o.PlusIcon,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),(0,l.jsx)(i.CommandEmpty,{children:`Không có kết quả`})]})})]})]})});exports.ComboboxField=u;
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-CAevLI5t.cjs`),require(`../button-variants-BHDyMRNh.cjs`);const t=require(`../button-BCahPWI8.cjs`);require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`);const n=require(`../field-DWOm17T1.cjs`),r=require(`../form-rN5ezSn5.cjs`);require(`../dialog-BBODhbxh.cjs`);const i=require(`../command-C13pL2M3.cjs`),a=require(`../popover-D6vyPDKA.cjs`);let o=require(`lucide-react`);o=e.__toESM(o);let s=require(`@customafk/react-toolkit/utils`);s=e.__toESM(s);let c=require(`react`);c=e.__toESM(c);let l=require(`react/jsx-runtime`);l=e.__toESM(l);const u=({name:e,label:u=`Combobox`,placeholder:d=`Chọn một mục`,description:f,options:p,onAddNewItem:m})=>(0,l.jsx)(r.FormField,{name:e,render:({field:e})=>(0,l.jsxs)(r.FormItem,{className:`w-full`,children:[(0,l.jsx)(c.Activity,{mode:u||f?`visible`:`hidden`,children:(0,l.jsxs)(n.FieldContent,{children:[(0,l.jsx)(r.FormLabel,{children:u}),!!f&&(0,l.jsx)(r.FormDescription,{children:f})]})}),(0,l.jsx)(`div`,{className:`basis-3/5 flex justify-end`,children:(0,l.jsxs)(a.Popover,{modal:!0,children:[(0,l.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,l.jsx)(r.FormControl,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:(0,s.cn)(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[e.value?(0,l.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:p?.find(({value:t})=>t===e.value)?.label}):(0,l.jsx)(`span`,{className:`text-text-positive-muted`,children:d}),(0,l.jsx)(o.ChevronDownIcon,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),(0,l.jsx)(a.PopoverContent,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,l.jsxs)(i.Command,{className:`border-none`,children:[(0,l.jsx)(i.CommandInput,{placeholder:d??`Tìm kiếm`}),(0,l.jsxs)(i.CommandList,{children:[(0,l.jsx)(i.CommandGroup,{className:`max-h-40 overflow-y-auto`,children:p?.map(({value:t,label:n})=>(0,l.jsx)(i.CommandItem,{value:n,onSelect:()=>e.onChange(t),children:n},t))}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.CommandSeparator,{}),(0,l.jsx)(i.CommandGroup,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[(0,l.jsx)(o.PlusIcon,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),(0,l.jsx)(i.CommandEmpty,{children:`Không có kết quả`})]})})]})})]})});exports.ComboboxField=u;
2
2
  //# sourceMappingURL=combobox-field.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-field.cjs","names":["FormField","FormItem","Activity","FieldContent","FormLabel","FormDescription","Popover","PopoverTrigger","FormControl","Button","ChevronDownIcon","PopoverContent","Command","CommandInput","CommandList","CommandGroup","CommandItem","label","CommandSeparator","PlusIcon","CommandEmpty"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <Popover modal={true}>\n <PopoverTrigger asChild>\n <FormControl>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n color=\"muted\"\n className={cn(\n 'w-full md:max-w-80',\n 'shadow-input flex justify-between rounded-md px-3',\n 'outline-border-weak font-normal',\n '[&_div]:w-full',\n '[&_div]:justify-between',\n 'hover:outline-border',\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-1',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-primary-weak',\n 'data-[state=open]:ring-4',\n 'focus:border-primary-strong',\n 'focus:ring-4',\n 'focus:ring-primary-weak',\n 'focus:outline-1',\n 'focus:outline-primary-strong'\n )}\n >\n {field.value ? (\n <span className=\"flex min-w-0 items-center gap-2\">{options?.find(({ value }) => value === field.value)?.label}</span>\n ) : (\n <span className=\"text-text-positive-muted\">{placeholder}</span>\n )}\n <ChevronDownIcon size={16} className=\"text-text-positive-weak shrink-0\" aria-hidden=\"true\" />\n </Button>\n </FormControl>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\">\n <Command className=\"border-none\">\n <CommandInput placeholder={placeholder ?? 'Tìm kiếm'} />\n <CommandList>\n <CommandGroup className=\"max-h-40 overflow-y-auto\">\n {options?.map(({ value, label }) => (\n <CommandItem key={value} value={label} onSelect={() => field.onChange(value)}>\n {label}\n </CommandItem>\n ))}\n </CommandGroup>\n {onAddNewItem && (\n <>\n <CommandSeparator />\n <CommandGroup>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full justify-start font-normal\">\n <PlusIcon size={14} className=\"-ms-2 opacity-60\" aria-hidden=\"true\" />\n Thêm mới\n </Button>\n </CommandGroup>\n </>\n )}\n </CommandList>\n <CommandEmpty>Không có kết quả</CommandEmpty>\n </Command>\n </PopoverContent>\n </Popover>\n </FormItem>\n );\n }}\n />\n );\n};\n"],"mappings":"knBAyBA,MAAa,GAAiE,CAC5E,OACA,QAAQ,WACR,cAAc,eACd,cACA,UACA,mBAGE,EAAA,EAAA,KAACA,EAAAA,UAAAA,CACO,OACN,QAAS,CAAE,YAEP,EAAA,EAAA,MAACC,EAAAA,SAAAA,CAAS,UAAU,oBAClB,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,KAAM,GAAS,EAAc,UAAY,mBACjD,EAAA,EAAA,MAACC,EAAAA,aAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,UAAAA,CAAAA,SAAW,EAAA,CAAkB,CAC7B,CAAC,CAAC,IAAe,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAAA,SAAiB,EAAA,CAA8B,CAAA,CAAA,CACrD,EACN,EACX,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,MAAO,cACd,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,QAAA,aACd,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,OAAAA,CACC,KAAK,SACL,QAAQ,UACR,KAAK,WACL,MAAM,QACN,WAAA,EAAA,EAAA,IACE,qBACA,oDACA,kCACA,iBACA,0BACA,uBACA,6CACA,8BACA,2CACA,sCACA,2BACA,8BACA,eACA,0BACA,kBACA,+BACD,WAEA,EAAM,OACL,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2CAAmC,GAAS,MAAM,CAAE,WAAY,IAAU,EAAM,MAAM,EAAE,OAAa,EAErH,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,oCAA4B,GAAmB,EAEjE,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,KAAM,GAAI,UAAU,mCAAmC,cAAY,QAAS,CAAA,EACtF,CAAA,CACG,EACC,EACjB,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,UAAU,uDACxB,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,UAAU,yBACjB,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,YAAa,GAAe,WAAA,CAAc,EACxD,EAAA,EAAA,MAACC,EAAAA,YAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,UAAU,oCACrB,GAAS,KAAK,CAAE,QAAO,MAAA,MACtB,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAwB,MAAOC,EAAO,aAAgB,EAAM,SAAS,EAAM,UACzEA,GADe,EAEJ,CACd,EACW,CACd,IACC,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAACC,EAAAA,iBAAAA,EAAAA,CAAmB,EACpB,EAAA,EAAA,KAACH,EAAAA,aAAAA,CAAAA,UACC,EAAA,EAAA,MAACN,EAAAA,OAAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,UAAU,8CAC9C,EAAA,EAAA,KAACU,EAAAA,SAAAA,CAAS,KAAM,GAAI,UAAU,mBAAmB,cAAY,QAAS,CAAA,WAAA,EAE/D,CAAA,CACI,CAAA,CAAA,CACd,CAAA,CAAA,CAEO,EACd,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAAA,SAAa,mBAAA,CAA+B,GACrC,EACK,CAAA,EACT,CAAA,EACD,EAGf"}
1
+ {"version":3,"file":"combobox-field.cjs","names":["FormField","FormItem","Activity","FieldContent","FormLabel","FormDescription","Popover","PopoverTrigger","FormControl","Button","ChevronDownIcon","PopoverContent","Command","CommandInput","CommandList","CommandGroup","CommandItem","label","CommandSeparator","PlusIcon","CommandEmpty"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <div className='basis-3/5 flex justify-end'>\n <Popover modal={true}>\n <PopoverTrigger asChild>\n <FormControl>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n color=\"muted\"\n className={cn(\n 'w-full md:max-w-80',\n 'shadow-input flex justify-between rounded-md px-3',\n 'outline-border-weak font-normal',\n '[&_div]:w-full',\n '[&_div]:justify-between',\n 'hover:outline-border',\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-1',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-primary-weak',\n 'data-[state=open]:ring-4',\n 'focus:border-primary-strong',\n 'focus:ring-4',\n 'focus:ring-primary-weak',\n 'focus:outline-1',\n 'focus:outline-primary-strong'\n )}\n >\n {field.value ? (\n <span className=\"flex min-w-0 items-center gap-2\">{options?.find(({ value }) => value === field.value)?.label}</span>\n ) : (\n <span className=\"text-text-positive-muted\">{placeholder}</span>\n )}\n <ChevronDownIcon size={16} className=\"text-text-positive-weak shrink-0\" aria-hidden=\"true\" />\n </Button>\n </FormControl>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\">\n <Command className=\"border-none\">\n <CommandInput placeholder={placeholder ?? 'Tìm kiếm'} />\n <CommandList>\n <CommandGroup className=\"max-h-40 overflow-y-auto\">\n {options?.map(({ value, label }) => (\n <CommandItem key={value} value={label} onSelect={() => field.onChange(value)}>\n {label}\n </CommandItem>\n ))}\n </CommandGroup>\n {onAddNewItem && (\n <>\n <CommandSeparator />\n <CommandGroup>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full justify-start font-normal\">\n <PlusIcon size={14} className=\"-ms-2 opacity-60\" aria-hidden=\"true\" />\n Thêm mới\n </Button>\n </CommandGroup>\n </>\n )}\n </CommandList>\n <CommandEmpty>Không có kết quả</CommandEmpty>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n </FormItem>\n );\n }}\n />\n );\n};\n"],"mappings":"knBAyBA,MAAa,GAAiE,CAC5E,OACA,QAAQ,WACR,cAAc,eACd,cACA,UACA,mBAGE,EAAA,EAAA,KAACA,EAAAA,UAAAA,CACO,OACN,QAAS,CAAE,YAEP,EAAA,EAAA,MAACC,EAAAA,SAAAA,CAAS,UAAU,oBAClB,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,KAAM,GAAS,EAAc,UAAY,mBACjD,EAAA,EAAA,MAACC,EAAAA,aAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,UAAAA,CAAAA,SAAW,EAAA,CAAkB,CAC7B,CAAC,CAAC,IAAe,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAAA,SAAiB,EAAA,CAA8B,CAAA,CAAA,CACrD,EACN,EACX,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,uCACb,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,MAAO,cACd,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,QAAA,aACd,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,OAAAA,CACC,KAAK,SACL,QAAQ,UACR,KAAK,WACL,MAAM,QACN,WAAA,EAAA,EAAA,IACE,qBACA,oDACA,kCACA,iBACA,0BACA,uBACA,6CACA,8BACA,2CACA,sCACA,2BACA,8BACA,eACA,0BACA,kBACA,+BACD,WAEA,EAAM,OACL,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2CAAmC,GAAS,MAAM,CAAE,WAAY,IAAU,EAAM,MAAM,EAAE,OAAa,EAErH,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,oCAA4B,GAAmB,EAEjE,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,KAAM,GAAI,UAAU,mCAAmC,cAAY,QAAS,CAAA,EACtF,CAAA,CACG,EACC,EACjB,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,UAAU,uDACxB,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,UAAU,yBACjB,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,YAAa,GAAe,WAAA,CAAc,EACxD,EAAA,EAAA,MAACC,EAAAA,YAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,UAAU,oCACrB,GAAS,KAAK,CAAE,QAAO,MAAA,MACtB,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAwB,MAAOC,EAAO,aAAgB,EAAM,SAAS,EAAM,UACzEA,GADe,EAEJ,CACd,EACW,CACd,IACC,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAACC,EAAAA,iBAAAA,EAAAA,CAAmB,EACpB,EAAA,EAAA,KAACH,EAAAA,aAAAA,CAAAA,UACC,EAAA,EAAA,MAACN,EAAAA,OAAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,UAAU,8CAC9C,EAAA,EAAA,KAACU,EAAAA,SAAAA,CAAS,KAAM,GAAI,UAAU,mBAAmB,cAAY,QAAS,CAAA,WAAA,EAE/D,CAAA,CACI,CAAA,CAAA,CACd,CAAA,CAAA,CAEO,EACd,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAAA,SAAa,mBAAA,CAA+B,GACrC,EACK,CAAA,EACT,EACN,CAAA,EACG,EAGf"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime14 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_runtime5.JSX.Element;
25
+ }: Props<TFieldValues>) => react_jsx_runtime14.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_runtime4 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_runtime4.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,2 +1,2 @@
1
- "use client";import"../dist-BgkALM7U.js";import"../button-variants-aFWCWUvu.js";import{Button as e}from"../button-CriBqo8S.js";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import{FieldContent as t}from"../field-GVRRZiSk.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-De64-oXe.js";import"../dialog-BAlJ18xi.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-UXLmHGja.js";import{Popover as m,PopoverContent as h,PopoverTrigger as g}from"../popover-BnzoeyDG.js";import{ChevronDownIcon as _,PlusIcon as v}from"lucide-react";import{cn as y}from"@customafk/react-toolkit/utils";import{Activity as b}from"react";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";const w=({name:w,label:T=`Combobox`,placeholder:E=`Chọn một mục`,description:D,options:O,onAddNewItem:k})=>S(i,{name:w,render:({field:i})=>C(a,{className:`w-full`,children:[S(b,{mode:T||D?`visible`:`hidden`,children:C(t,{children:[S(o,{children:T}),!!D&&S(r,{children:D})]})}),C(m,{modal:!0,children:[S(g,{asChild:!0,children:S(n,{children:C(e,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:y(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[i.value?S(`span`,{className:`flex min-w-0 items-center gap-2`,children:O?.find(({value:e})=>e===i.value)?.label}):S(`span`,{className:`text-text-positive-muted`,children:E}),S(_,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),S(h,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:C(s,{className:`border-none`,children:[S(u,{placeholder:E??`Tìm kiếm`}),C(f,{children:[S(l,{className:`max-h-40 overflow-y-auto`,children:O?.map(({value:e,label:t})=>S(d,{value:t,onSelect:()=>i.onChange(e),children:t},e))}),k&&C(x,{children:[S(p,{}),S(l,{children:C(e,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[S(v,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),S(c,{children:`Không có kết quả`})]})})]})]})});export{w as ComboboxField};
1
+ "use client";import"../dist-BgkALM7U.js";import"../button-variants-aFWCWUvu.js";import{Button as e}from"../button-CriBqo8S.js";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import{FieldContent as t}from"../field-GVRRZiSk.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-De64-oXe.js";import"../dialog-BAlJ18xi.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-UXLmHGja.js";import{Popover as m,PopoverContent as h,PopoverTrigger as g}from"../popover-BnzoeyDG.js";import{ChevronDownIcon as _,PlusIcon as v}from"lucide-react";import{cn as y}from"@customafk/react-toolkit/utils";import{Activity as b}from"react";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";const w=({name:w,label:T=`Combobox`,placeholder:E=`Chọn một mục`,description:D,options:O,onAddNewItem:k})=>S(i,{name:w,render:({field:i})=>C(a,{className:`w-full`,children:[S(b,{mode:T||D?`visible`:`hidden`,children:C(t,{children:[S(o,{children:T}),!!D&&S(r,{children:D})]})}),S(`div`,{className:`basis-3/5 flex justify-end`,children:C(m,{modal:!0,children:[S(g,{asChild:!0,children:S(n,{children:C(e,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:y(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[i.value?S(`span`,{className:`flex min-w-0 items-center gap-2`,children:O?.find(({value:e})=>e===i.value)?.label}):S(`span`,{className:`text-text-positive-muted`,children:E}),S(_,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),S(h,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:C(s,{className:`border-none`,children:[S(u,{placeholder:E??`Tìm kiếm`}),C(f,{children:[S(l,{className:`max-h-40 overflow-y-auto`,children:O?.map(({value:e,label:t})=>S(d,{value:t,onSelect:()=>i.onChange(e),children:t},e))}),k&&C(x,{children:[S(p,{}),S(l,{children:C(e,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[S(v,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),S(c,{children:`Không có kết quả`})]})})]})})]})});export{w as ComboboxField};
2
2
  //# sourceMappingURL=combobox-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-field.js","names":["label"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <Popover modal={true}>\n <PopoverTrigger asChild>\n <FormControl>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n color=\"muted\"\n className={cn(\n 'w-full md:max-w-80',\n 'shadow-input flex justify-between rounded-md px-3',\n 'outline-border-weak font-normal',\n '[&_div]:w-full',\n '[&_div]:justify-between',\n 'hover:outline-border',\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-1',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-primary-weak',\n 'data-[state=open]:ring-4',\n 'focus:border-primary-strong',\n 'focus:ring-4',\n 'focus:ring-primary-weak',\n 'focus:outline-1',\n 'focus:outline-primary-strong'\n )}\n >\n {field.value ? (\n <span className=\"flex min-w-0 items-center gap-2\">{options?.find(({ value }) => value === field.value)?.label}</span>\n ) : (\n <span className=\"text-text-positive-muted\">{placeholder}</span>\n )}\n <ChevronDownIcon size={16} className=\"text-text-positive-weak shrink-0\" aria-hidden=\"true\" />\n </Button>\n </FormControl>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\">\n <Command className=\"border-none\">\n <CommandInput placeholder={placeholder ?? 'Tìm kiếm'} />\n <CommandList>\n <CommandGroup className=\"max-h-40 overflow-y-auto\">\n {options?.map(({ value, label }) => (\n <CommandItem key={value} value={label} onSelect={() => field.onChange(value)}>\n {label}\n </CommandItem>\n ))}\n </CommandGroup>\n {onAddNewItem && (\n <>\n <CommandSeparator />\n <CommandGroup>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full justify-start font-normal\">\n <PlusIcon size={14} className=\"-ms-2 opacity-60\" aria-hidden=\"true\" />\n Thêm mới\n </Button>\n </CommandGroup>\n </>\n )}\n </CommandList>\n <CommandEmpty>Không có kết quả</CommandEmpty>\n </Command>\n </PopoverContent>\n </Popover>\n </FormItem>\n );\n }}\n />\n );\n};\n"],"mappings":"40BAyBA,MAAa,GAAiE,CAC5E,OACA,QAAQ,WACR,cAAc,eACd,cACA,UACA,kBAGE,EAAC,EAAA,CACO,OACN,QAAS,CAAE,WAEP,EAAC,EAAA,CAAS,UAAU,mBAClB,EAAC,EAAA,CAAS,KAAM,GAAS,EAAc,UAAY,kBACjD,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAW,EAAA,CAAkB,CAC7B,CAAC,CAAC,GAAe,EAAC,EAAA,CAAA,SAAiB,EAAA,CAA8B,CAAA,CAAA,CACrD,EACN,CACX,EAAC,EAAA,CAAQ,MAAO,aACd,EAAC,EAAA,CAAe,QAAA,YACd,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,KAAK,SACL,QAAQ,UACR,KAAK,WACL,MAAM,QACN,UAAW,EACT,qBACA,oDACA,kCACA,iBACA,0BACA,uBACA,6CACA,8BACA,2CACA,sCACA,2BACA,8BACA,eACA,0BACA,kBACA,+BACD,WAEA,EAAM,MACL,EAAC,OAAA,CAAK,UAAU,2CAAmC,GAAS,MAAM,CAAE,WAAY,IAAU,EAAM,MAAM,EAAE,OAAa,CAErH,EAAC,OAAA,CAAK,UAAU,oCAA4B,GAAmB,CAEjE,EAAC,EAAA,CAAgB,KAAM,GAAI,UAAU,mCAAmC,cAAY,QAAS,CAAA,EACtF,CAAA,CACG,EACC,CACjB,EAAC,EAAA,CAAe,UAAU,sDACxB,EAAC,EAAA,CAAQ,UAAU,wBACjB,EAAC,EAAA,CAAa,YAAa,GAAe,WAAA,CAAc,CACxD,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAa,UAAU,oCACrB,GAAS,KAAK,CAAE,QAAO,MAAA,KACtB,EAAC,EAAA,CAAwB,MAAOA,EAAO,aAAgB,EAAM,SAAS,EAAM,UACzEA,GADe,EAEJ,CACd,EACW,CACd,GACC,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,EAAA,EAAA,CAAmB,CACpB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,UAAU,6CAC9C,EAAC,EAAA,CAAS,KAAM,GAAI,UAAU,mBAAmB,cAAY,QAAS,CAAA,WAAA,EAE/D,CAAA,CACI,CAAA,CAAA,CACd,CAAA,CAAA,CAEO,CACd,EAAC,EAAA,CAAA,SAAa,mBAAA,CAA+B,GACrC,EACK,CAAA,EACT,CAAA,EACD,EAGf"}
1
+ {"version":3,"file":"combobox-field.js","names":["label"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <div className='basis-3/5 flex justify-end'>\n <Popover modal={true}>\n <PopoverTrigger asChild>\n <FormControl>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n color=\"muted\"\n className={cn(\n 'w-full md:max-w-80',\n 'shadow-input flex justify-between rounded-md px-3',\n 'outline-border-weak font-normal',\n '[&_div]:w-full',\n '[&_div]:justify-between',\n 'hover:outline-border',\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-1',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-primary-weak',\n 'data-[state=open]:ring-4',\n 'focus:border-primary-strong',\n 'focus:ring-4',\n 'focus:ring-primary-weak',\n 'focus:outline-1',\n 'focus:outline-primary-strong'\n )}\n >\n {field.value ? (\n <span className=\"flex min-w-0 items-center gap-2\">{options?.find(({ value }) => value === field.value)?.label}</span>\n ) : (\n <span className=\"text-text-positive-muted\">{placeholder}</span>\n )}\n <ChevronDownIcon size={16} className=\"text-text-positive-weak shrink-0\" aria-hidden=\"true\" />\n </Button>\n </FormControl>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\">\n <Command className=\"border-none\">\n <CommandInput placeholder={placeholder ?? 'Tìm kiếm'} />\n <CommandList>\n <CommandGroup className=\"max-h-40 overflow-y-auto\">\n {options?.map(({ value, label }) => (\n <CommandItem key={value} value={label} onSelect={() => field.onChange(value)}>\n {label}\n </CommandItem>\n ))}\n </CommandGroup>\n {onAddNewItem && (\n <>\n <CommandSeparator />\n <CommandGroup>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full justify-start font-normal\">\n <PlusIcon size={14} className=\"-ms-2 opacity-60\" aria-hidden=\"true\" />\n Thêm mới\n </Button>\n </CommandGroup>\n </>\n )}\n </CommandList>\n <CommandEmpty>Không có kết quả</CommandEmpty>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n </FormItem>\n );\n }}\n />\n );\n};\n"],"mappings":"40BAyBA,MAAa,GAAiE,CAC5E,OACA,QAAQ,WACR,cAAc,eACd,cACA,UACA,kBAGE,EAAC,EAAA,CACO,OACN,QAAS,CAAE,WAEP,EAAC,EAAA,CAAS,UAAU,mBAClB,EAAC,EAAA,CAAS,KAAM,GAAS,EAAc,UAAY,kBACjD,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAW,EAAA,CAAkB,CAC7B,CAAC,CAAC,GAAe,EAAC,EAAA,CAAA,SAAiB,EAAA,CAA8B,CAAA,CAAA,CACrD,EACN,CACX,EAAC,MAAA,CAAI,UAAU,sCACb,EAAC,EAAA,CAAQ,MAAO,aACd,EAAC,EAAA,CAAe,QAAA,YACd,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,KAAK,SACL,QAAQ,UACR,KAAK,WACL,MAAM,QACN,UAAW,EACT,qBACA,oDACA,kCACA,iBACA,0BACA,uBACA,6CACA,8BACA,2CACA,sCACA,2BACA,8BACA,eACA,0BACA,kBACA,+BACD,WAEA,EAAM,MACL,EAAC,OAAA,CAAK,UAAU,2CAAmC,GAAS,MAAM,CAAE,WAAY,IAAU,EAAM,MAAM,EAAE,OAAa,CAErH,EAAC,OAAA,CAAK,UAAU,oCAA4B,GAAmB,CAEjE,EAAC,EAAA,CAAgB,KAAM,GAAI,UAAU,mCAAmC,cAAY,QAAS,CAAA,EACtF,CAAA,CACG,EACC,CACjB,EAAC,EAAA,CAAe,UAAU,sDACxB,EAAC,EAAA,CAAQ,UAAU,wBACjB,EAAC,EAAA,CAAa,YAAa,GAAe,WAAA,CAAc,CACxD,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAa,UAAU,oCACrB,GAAS,KAAK,CAAE,QAAO,MAAA,KACtB,EAAC,EAAA,CAAwB,MAAOA,EAAO,aAAgB,EAAM,SAAS,EAAM,UACzEA,GADe,EAEJ,CACd,EACW,CACd,GACC,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,EAAA,EAAA,CAAmB,CACpB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,UAAU,6CAC9C,EAAC,EAAA,CAAS,KAAM,GAAI,UAAU,mBAAmB,cAAY,QAAS,CAAA,WAAA,EAE/D,CAAA,CACI,CAAA,CAAA,CACd,CAAA,CAAA,CAEO,CACd,EAAC,EAAA,CAAA,SAAa,mBAAA,CAA+B,GACrC,EACK,CAAA,EACT,EACN,CAAA,EACG,EAGf"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 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_runtime3.JSX.Element;
19
+ }: Props<TFieldValues>) => react_jsx_runtime4.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_runtime2 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
@@ -22,7 +22,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
22
22
  onError,
23
23
  onSubcribe,
24
24
  children
25
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime4.JSX.Element;
25
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime2.JSX.Element;
26
26
  //#endregion
27
27
  export { FormWrapper };
28
28
  //# sourceMappingURL=form-wrapper.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 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
@@ -22,7 +22,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
22
22
  onError,
23
23
  onSubcribe,
24
24
  children
25
- }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime5.JSX.Element;
25
+ }: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime6.JSX.Element;
26
26
  //#endregion
27
27
  export { FormWrapper };
28
28
  //# sourceMappingURL=form-wrapper.d.ts.map