@customafk/lunas-ui 0.1.44 → 0.1.46

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 (153) hide show
  1. package/dist/{button-CSlIniPy.d.mts → button-CsdEruoX.d.cts} +5 -5
  2. package/dist/{button-DPIxmKl6.d.cts → button-DVseUDj4.d.mts} +6 -6
  3. package/dist/data-display/empty.d.cts +2 -2
  4. package/dist/data-display/statistic.d.cts +2 -2
  5. package/dist/{dialog-CVn1weYD.d.mts → dialog-B1vJI8z1.d.mts} +12 -12
  6. package/dist/{dialog-COljUqkA.d.cts → dialog-eNVy-E39.d.cts} +12 -12
  7. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +28 -28
  8. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
  9. package/dist/features/search-modal/index.d.cts +2 -2
  10. package/dist/features/search-modal/index.d.mts +2 -2
  11. package/dist/features/tables/index.cjs +1 -1
  12. package/dist/features/tables/index.cjs.map +1 -1
  13. package/dist/features/tables/index.d.cts +10 -4
  14. package/dist/features/tables/index.d.mts +8 -2
  15. package/dist/features/tables/index.mjs +1 -1
  16. package/dist/features/tables/index.mjs.map +1 -1
  17. package/dist/features/tanstack-form/index.cjs +1 -1
  18. package/dist/features/tanstack-form/index.cjs.map +1 -1
  19. package/dist/features/tanstack-form/index.d.cts +48 -48
  20. package/dist/features/tanstack-form/index.d.mts +48 -48
  21. package/dist/features/tanstack-form/index.mjs +1 -1
  22. package/dist/features/tanstack-form/index.mjs.map +1 -1
  23. package/dist/{input-6dw8Hn1a.d.mts → input-CRu1d87i.d.mts} +3 -3
  24. package/dist/{input-CUgZor87.d.cts → input-DmchpCKC.d.cts} +5 -5
  25. package/dist/layouts/app-layout/index.d.cts +28 -28
  26. package/dist/layouts/app-layout/index.d.mts +26 -26
  27. package/dist/layouts/flex.d.cts +6 -6
  28. package/dist/layouts/flex.d.mts +4 -4
  29. package/dist/layouts/service-layout/index.d.cts +13 -13
  30. package/dist/layouts/service-layout/index.d.mts +3 -3
  31. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  32. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  33. package/dist/pages/FeatureFixing.d.cts +2 -2
  34. package/dist/pages/FeatureFixing.d.mts +2 -2
  35. package/dist/pages/NotAuthorized.d.cts +2 -2
  36. package/dist/pages/NotAuthorized.d.mts +2 -2
  37. package/dist/pages/NotFound.d.cts +2 -2
  38. package/dist/pages/NotFound.d.mts +2 -2
  39. package/dist/{separator-BZcvxEyl.d.cts → separator-aPjAYbm-.d.cts} +3 -3
  40. package/dist/{separator-ImLEjGpm.d.mts → separator-qK_n36yS.d.mts} +3 -3
  41. package/dist/{tooltip-B0tCGGm9.d.cts → tooltip-CV1g0GdH.d.mts} +6 -6
  42. package/dist/{tooltip-CUgVVSrb.d.mts → tooltip-D-YS7gu3.d.cts} +6 -6
  43. package/dist/typography/paragraph.d.cts +2 -2
  44. package/dist/typography/paragraph.d.mts +2 -2
  45. package/dist/typography/title.d.cts +2 -2
  46. package/dist/typography/title.d.mts +2 -2
  47. package/dist/ui/alert-dialog.d.cts +12 -12
  48. package/dist/ui/alert-dialog.d.mts +12 -12
  49. package/dist/ui/alert.d.cts +7 -7
  50. package/dist/ui/alert.d.mts +5 -5
  51. package/dist/ui/aspect-ratio.d.cts +2 -2
  52. package/dist/ui/aspect-ratio.d.mts +2 -2
  53. package/dist/ui/avatar.d.cts +4 -4
  54. package/dist/ui/avatar.d.mts +4 -4
  55. package/dist/ui/badge.d.cts +4 -4
  56. package/dist/ui/badge.d.mts +4 -4
  57. package/dist/ui/breadcrumb.d.cts +8 -8
  58. package/dist/ui/breadcrumb.d.mts +8 -8
  59. package/dist/ui/button-group.d.cts +7 -7
  60. package/dist/ui/button-group.d.mts +7 -7
  61. package/dist/ui/button.d.cts +1 -1
  62. package/dist/ui/button.d.mts +1 -1
  63. package/dist/ui/calendar.d.cts +4 -4
  64. package/dist/ui/calendar.d.mts +4 -4
  65. package/dist/ui/card.d.cts +8 -8
  66. package/dist/ui/card.d.mts +8 -8
  67. package/dist/ui/carousel.d.cts +7 -7
  68. package/dist/ui/carousel.d.mts +7 -7
  69. package/dist/ui/collapsible.d.cts +4 -4
  70. package/dist/ui/collapsible.d.mts +4 -4
  71. package/dist/ui/command.d.cts +11 -11
  72. package/dist/ui/command.d.mts +11 -11
  73. package/dist/ui/context-menu.d.cts +16 -16
  74. package/dist/ui/context-menu.d.mts +16 -16
  75. package/dist/ui/dialog.d.cts +1 -1
  76. package/dist/ui/dialog.d.mts +1 -1
  77. package/dist/ui/drawer.d.cts +11 -11
  78. package/dist/ui/drawer.d.mts +11 -11
  79. package/dist/ui/dropdown-menu.d.cts +16 -16
  80. package/dist/ui/dropdown-menu.d.mts +16 -16
  81. package/dist/ui/empty.d.cts +9 -9
  82. package/dist/ui/empty.d.mts +9 -9
  83. package/dist/ui/field.d.cts +13 -13
  84. package/dist/ui/field.d.mts +24 -24
  85. package/dist/ui/file-uploader.d.cts +2 -2
  86. package/dist/ui/file-uploader.d.mts +2 -2
  87. package/dist/ui/form.d.cts +11 -11
  88. package/dist/ui/form.d.mts +11 -11
  89. package/dist/ui/hover-card.d.cts +4 -4
  90. package/dist/ui/hover-card.d.mts +4 -4
  91. package/dist/ui/input-otp.d.cts +5 -5
  92. package/dist/ui/input-otp.d.mts +5 -5
  93. package/dist/ui/input.d.cts +1 -1
  94. package/dist/ui/input.d.mts +1 -1
  95. package/dist/ui/inputs/search-input.d.cts +3 -3
  96. package/dist/ui/inputs/search-input.d.mts +3 -3
  97. package/dist/ui/item.d.cts +15 -15
  98. package/dist/ui/item.d.mts +15 -15
  99. package/dist/ui/label.d.cts +2 -2
  100. package/dist/ui/label.d.mts +2 -2
  101. package/dist/ui/menubar.d.cts +17 -17
  102. package/dist/ui/menubar.d.mts +17 -17
  103. package/dist/ui/multi-select.d.cts +2 -2
  104. package/dist/ui/multi-select.d.mts +3 -3
  105. package/dist/ui/navigation-menu.d.cts +11 -11
  106. package/dist/ui/navigation-menu.d.mts +9 -9
  107. package/dist/ui/pagination.d.cts +9 -9
  108. package/dist/ui/pagination.d.mts +9 -9
  109. package/dist/ui/popover.d.cts +5 -5
  110. package/dist/ui/popover.d.mts +5 -5
  111. package/dist/ui/progress.d.cts +2 -2
  112. package/dist/ui/progress.d.mts +2 -2
  113. package/dist/ui/radio-group.d.cts +3 -3
  114. package/dist/ui/radio-group.d.mts +3 -3
  115. package/dist/ui/resizable.d.cts +4 -4
  116. package/dist/ui/resizable.d.mts +4 -4
  117. package/dist/ui/scroll-area.d.cts +6 -6
  118. package/dist/ui/scroll-area.d.mts +6 -6
  119. package/dist/ui/select.d.cts +11 -11
  120. package/dist/ui/select.d.mts +11 -11
  121. package/dist/ui/separator.d.cts +1 -1
  122. package/dist/ui/separator.d.mts +1 -1
  123. package/dist/ui/sheet.d.cts +9 -9
  124. package/dist/ui/sheet.d.mts +9 -9
  125. package/dist/ui/sidebar.d.cts +28 -28
  126. package/dist/ui/sidebar.d.mts +28 -28
  127. package/dist/ui/skeleton.d.cts +2 -2
  128. package/dist/ui/skeleton.d.mts +2 -2
  129. package/dist/ui/slider.d.cts +2 -2
  130. package/dist/ui/slider.d.mts +2 -2
  131. package/dist/ui/sonner.cjs +1 -1
  132. package/dist/ui/sonner.cjs.map +1 -1
  133. package/dist/ui/sonner.d.cts +4 -3
  134. package/dist/ui/sonner.d.mts +4 -3
  135. package/dist/ui/sonner.mjs +1 -1
  136. package/dist/ui/sonner.mjs.map +1 -1
  137. package/dist/ui/spinner.d.cts +2 -2
  138. package/dist/ui/spinner.d.mts +2 -2
  139. package/dist/ui/switch.d.cts +2 -2
  140. package/dist/ui/switch.d.mts +2 -2
  141. package/dist/ui/table.d.cts +18 -18
  142. package/dist/ui/table.d.mts +18 -18
  143. package/dist/ui/tabs.d.cts +5 -5
  144. package/dist/ui/tabs.d.mts +5 -5
  145. package/dist/ui/textarea.d.cts +2 -2
  146. package/dist/ui/textarea.d.mts +2 -2
  147. package/dist/ui/toggle-group.d.cts +3 -3
  148. package/dist/ui/toggle-group.d.mts +3 -3
  149. package/dist/ui/toggle.d.cts +4 -4
  150. package/dist/ui/toggle.d.mts +4 -4
  151. package/dist/ui/tooltip.d.cts +1 -1
  152. package/dist/ui/tooltip.d.mts +1 -1
  153. package/package.json +1 -4
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime148 from "react/jsx-runtime";
2
- import { VariantProps } from "class-variance-authority";
1
+ import * as react_jsx_runtime51 from "react/jsx-runtime";
3
2
  import * as class_variance_authority_types12 from "class-variance-authority/types";
3
+ import { VariantProps } from "class-variance-authority";
4
4
 
5
5
  //#region packages/components/ui/button.variants.d.ts
6
6
 
@@ -9,7 +9,7 @@ import * as class_variance_authority_types12 from "class-variance-authority/type
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
11
  variant?: "link" | "default" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
12
+ color?: "muted" | "success" | "warning" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
14
  } & class_variance_authority_types12.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
@@ -51,7 +51,7 @@ declare function Button({
51
51
  disabled,
52
52
  type,
53
53
  ...props
54
- }: ButtonProps): react_jsx_runtime148.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime51.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-CSlIniPy.d.mts.map
57
+ //# sourceMappingURL=button-CsdEruoX.d.cts.map
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime204 from "react/jsx-runtime";
2
- import * as class_variance_authority_types13 from "class-variance-authority/types";
1
+ import * as react_jsx_runtime33 from "react/jsx-runtime";
3
2
  import { VariantProps } from "class-variance-authority";
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
 
@@ -9,9 +9,9 @@ import { VariantProps } from "class-variance-authority";
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
11
  variant?: "link" | "default" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
12
+ color?: "muted" | "success" | "warning" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
- } & class_variance_authority_types13.ClassProp) | undefined) => string;
14
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
16
16
  //#endregion
17
17
  //#region packages/components/ui/button.d.ts
@@ -51,7 +51,7 @@ declare function Button({
51
51
  disabled,
52
52
  type,
53
53
  ...props
54
- }: ButtonProps): react_jsx_runtime204.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime33.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-DPIxmKl6.d.cts.map
57
+ //# sourceMappingURL=button-DVseUDj4.d.mts.map
@@ -1,7 +1,7 @@
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/data-display/empty.d.ts
4
- declare const EmptyDisplay: () => react_jsx_runtime1.JSX.Element;
4
+ declare const EmptyDisplay: () => react_jsx_runtime0.JSX.Element;
5
5
  //#endregion
6
6
  export { EmptyDisplay };
7
7
  //# sourceMappingURL=empty.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 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_runtime4.JSX.Element>;
27
27
  //#endregion
28
28
  export { Statistic };
29
29
  //# sourceMappingURL=statistic.d.cts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime247 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime148 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_runtime247.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime148.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime247.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime148.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime247.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime148.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime247.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime148.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime247.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime148.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_runtime247.JSX.Element;
28
+ }): react_jsx_runtime148.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime247.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime148.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime247.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime148.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime247.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime148.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime247.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime148.JSX.Element;
45
45
  //#endregion
46
46
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
47
- //# sourceMappingURL=dialog-CVn1weYD.d.mts.map
47
+ //# sourceMappingURL=dialog-B1vJI8z1.d.mts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime68 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime135 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_runtime68.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime135.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime68.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime135.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime68.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime135.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime68.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime135.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime68.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime135.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_runtime68.JSX.Element;
28
+ }): react_jsx_runtime135.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime68.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime135.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime68.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime135.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime68.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime135.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime68.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime135.JSX.Element;
45
45
  //#endregion
46
46
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
47
- //# sourceMappingURL=dialog-COljUqkA.d.cts.map
47
+ //# sourceMappingURL=dialog-eNVy-E39.d.cts.map
@@ -1,8 +1,8 @@
1
- import { t as Button } from "../../../button-DPIxmKl6.cjs";
2
- import { t as Separator } from "../../../separator-BZcvxEyl.cjs";
3
- import { n as TooltipContent } from "../../../tooltip-B0tCGGm9.cjs";
4
- import * as react_jsx_runtime96 from "react/jsx-runtime";
5
- import * as class_variance_authority_types3 from "class-variance-authority/types";
1
+ import { t as Button } from "../../../button-CsdEruoX.cjs";
2
+ import { t as Separator } from "../../../separator-aPjAYbm-.cjs";
3
+ import { n as TooltipContent } from "../../../tooltip-D-YS7gu3.cjs";
4
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
5
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
6
6
  import { VariantProps } from "class-variance-authority";
7
7
 
8
8
  //#region packages/components/dialogs/detail-dialog/components/sidebar.d.ts
@@ -28,7 +28,7 @@ declare function SidebarProvider({
28
28
  defaultOpen?: boolean;
29
29
  open?: boolean;
30
30
  onOpenChange?: (open: boolean) => void;
31
- }): react_jsx_runtime96.JSX.Element;
31
+ }): react_jsx_runtime10.JSX.Element;
32
32
  declare function Sidebar({
33
33
  side,
34
34
  variant,
@@ -40,70 +40,70 @@ declare function Sidebar({
40
40
  side?: 'left' | 'right';
41
41
  variant?: 'sidebar' | 'floating' | 'inset';
42
42
  collapsible?: 'offcanvas' | 'icon' | 'none';
43
- }): react_jsx_runtime96.JSX.Element;
43
+ }): react_jsx_runtime10.JSX.Element;
44
44
  declare function DetailDialogSidebarTrigger({
45
45
  className,
46
46
  onClick,
47
47
  ...props
48
- }: React.ComponentProps<typeof Button>): react_jsx_runtime96.JSX.Element;
48
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime10.JSX.Element;
49
49
  declare function DetailDialogSidebarRail({
50
50
  className,
51
51
  ...props
52
- }: React.ComponentProps<'button'>): react_jsx_runtime96.JSX.Element;
52
+ }: React.ComponentProps<'button'>): react_jsx_runtime10.JSX.Element;
53
53
  declare function SidebarInset({
54
54
  className,
55
55
  ...props
56
- }: React.ComponentProps<'main'>): react_jsx_runtime96.JSX.Element;
56
+ }: React.ComponentProps<'main'>): react_jsx_runtime10.JSX.Element;
57
57
  declare function DetailDialogSidebarHeader({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
60
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
61
61
  declare function DetailDialogSidebarFooter({
62
62
  className,
63
63
  ...props
64
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
64
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
65
65
  declare function DetailDialogSidebarSeparator({
66
66
  className,
67
67
  ...props
68
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime96.JSX.Element;
68
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime10.JSX.Element;
69
69
  declare function DetailDialogSidebarContent({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
73
73
  declare function DetailDialogSidebarGroup({
74
74
  className,
75
75
  ...props
76
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
76
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
77
77
  declare function DetailDialogSidebarGroupLabel({
78
78
  className,
79
79
  asChild,
80
80
  ...props
81
81
  }: React.ComponentProps<'div'> & {
82
82
  asChild?: boolean;
83
- }): react_jsx_runtime96.JSX.Element;
83
+ }): react_jsx_runtime10.JSX.Element;
84
84
  declare function DetailDialogSidebarGroupAction({
85
85
  className,
86
86
  asChild,
87
87
  ...props
88
88
  }: React.ComponentProps<'button'> & {
89
89
  asChild?: boolean;
90
- }): react_jsx_runtime96.JSX.Element;
90
+ }): react_jsx_runtime10.JSX.Element;
91
91
  declare function DetailDialogSidebarGroupContent({
92
92
  className,
93
93
  ...props
94
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
94
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
95
95
  declare function DetailDialogSidebarMenu({
96
96
  className,
97
97
  ...props
98
- }: React.ComponentProps<'ul'>): react_jsx_runtime96.JSX.Element;
98
+ }: React.ComponentProps<'ul'>): react_jsx_runtime10.JSX.Element;
99
99
  declare function DetailDialogSidebarMenuItem({
100
100
  className,
101
101
  ...props
102
- }: React.ComponentProps<'li'>): react_jsx_runtime96.JSX.Element;
102
+ }: React.ComponentProps<'li'>): react_jsx_runtime10.JSX.Element;
103
103
  declare const sidebarMenuButtonVariants: (props?: ({
104
104
  variant?: "default" | "outline" | null | undefined;
105
105
  size?: "sm" | "lg" | "default" | null | undefined;
106
- } & class_variance_authority_types3.ClassProp) | undefined) => string;
106
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
107
107
  declare function DetailDialogSidebarMenuButton({
108
108
  asChild,
109
109
  isActive,
@@ -116,7 +116,7 @@ declare function DetailDialogSidebarMenuButton({
116
116
  asChild?: boolean;
117
117
  isActive?: boolean;
118
118
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
119
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime96.JSX.Element;
119
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime10.JSX.Element;
120
120
  declare function DetailDialogSidebarMenuAction({
121
121
  className,
122
122
  asChild,
@@ -125,26 +125,26 @@ declare function DetailDialogSidebarMenuAction({
125
125
  }: React.ComponentProps<'button'> & {
126
126
  asChild?: boolean;
127
127
  showOnHover?: boolean;
128
- }): react_jsx_runtime96.JSX.Element;
128
+ }): react_jsx_runtime10.JSX.Element;
129
129
  declare function DetailDialogSidebarMenuBadge({
130
130
  className,
131
131
  ...props
132
- }: React.ComponentProps<'div'>): react_jsx_runtime96.JSX.Element;
132
+ }: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
133
133
  declare function DetailDialogSidebarMenuSkeleton({
134
134
  className,
135
135
  showIcon,
136
136
  ...props
137
137
  }: React.ComponentProps<'div'> & {
138
138
  showIcon?: boolean;
139
- }): react_jsx_runtime96.JSX.Element;
139
+ }): react_jsx_runtime10.JSX.Element;
140
140
  declare function DetailDialogSidebarMenuSub({
141
141
  className,
142
142
  ...props
143
- }: React.ComponentProps<'ul'>): react_jsx_runtime96.JSX.Element;
143
+ }: React.ComponentProps<'ul'>): react_jsx_runtime10.JSX.Element;
144
144
  declare function DetailDialogSidebarMenuSubItem({
145
145
  className,
146
146
  ...props
147
- }: React.ComponentProps<'li'>): react_jsx_runtime96.JSX.Element;
147
+ }: React.ComponentProps<'li'>): react_jsx_runtime10.JSX.Element;
148
148
  declare function DetailDialogSidebarMenuSubButton({
149
149
  asChild,
150
150
  size,
@@ -155,7 +155,7 @@ declare function DetailDialogSidebarMenuSubButton({
155
155
  asChild?: boolean;
156
156
  size?: 'sm' | 'md';
157
157
  isActive?: boolean;
158
- }): react_jsx_runtime96.JSX.Element;
158
+ }): react_jsx_runtime10.JSX.Element;
159
159
  //#endregion
160
160
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
161
161
  //# sourceMappingURL=sidebar.d.cts.map
@@ -1,7 +1,7 @@
1
- import { t as Button } from "../../../button-CSlIniPy.mjs";
2
- import { t as Separator } from "../../../separator-ImLEjGpm.mjs";
3
- import { n as TooltipContent } from "../../../tooltip-CUgVVSrb.mjs";
4
- import * as react_jsx_runtime30 from "react/jsx-runtime";
1
+ import { t as Button } from "../../../button-DVseUDj4.mjs";
2
+ import { t as Separator } from "../../../separator-qK_n36yS.mjs";
3
+ import { n as TooltipContent } from "../../../tooltip-CV1g0GdH.mjs";
4
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
5
5
  import { VariantProps } from "class-variance-authority";
6
6
  import * as class_variance_authority_types0 from "class-variance-authority/types";
7
7
 
@@ -28,7 +28,7 @@ declare function SidebarProvider({
28
28
  defaultOpen?: boolean;
29
29
  open?: boolean;
30
30
  onOpenChange?: (open: boolean) => void;
31
- }): react_jsx_runtime30.JSX.Element;
31
+ }): react_jsx_runtime4.JSX.Element;
32
32
  declare function Sidebar({
33
33
  side,
34
34
  variant,
@@ -40,66 +40,66 @@ declare function Sidebar({
40
40
  side?: 'left' | 'right';
41
41
  variant?: 'sidebar' | 'floating' | 'inset';
42
42
  collapsible?: 'offcanvas' | 'icon' | 'none';
43
- }): react_jsx_runtime30.JSX.Element;
43
+ }): react_jsx_runtime4.JSX.Element;
44
44
  declare function DetailDialogSidebarTrigger({
45
45
  className,
46
46
  onClick,
47
47
  ...props
48
- }: React.ComponentProps<typeof Button>): react_jsx_runtime30.JSX.Element;
48
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime4.JSX.Element;
49
49
  declare function DetailDialogSidebarRail({
50
50
  className,
51
51
  ...props
52
- }: React.ComponentProps<'button'>): react_jsx_runtime30.JSX.Element;
52
+ }: React.ComponentProps<'button'>): react_jsx_runtime4.JSX.Element;
53
53
  declare function SidebarInset({
54
54
  className,
55
55
  ...props
56
- }: React.ComponentProps<'main'>): react_jsx_runtime30.JSX.Element;
56
+ }: React.ComponentProps<'main'>): react_jsx_runtime4.JSX.Element;
57
57
  declare function DetailDialogSidebarHeader({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
60
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
61
61
  declare function DetailDialogSidebarFooter({
62
62
  className,
63
63
  ...props
64
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
64
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
65
65
  declare function DetailDialogSidebarSeparator({
66
66
  className,
67
67
  ...props
68
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime30.JSX.Element;
68
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime4.JSX.Element;
69
69
  declare function DetailDialogSidebarContent({
70
70
  className,
71
71
  ...props
72
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
73
73
  declare function DetailDialogSidebarGroup({
74
74
  className,
75
75
  ...props
76
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
76
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
77
77
  declare function DetailDialogSidebarGroupLabel({
78
78
  className,
79
79
  asChild,
80
80
  ...props
81
81
  }: React.ComponentProps<'div'> & {
82
82
  asChild?: boolean;
83
- }): react_jsx_runtime30.JSX.Element;
83
+ }): react_jsx_runtime4.JSX.Element;
84
84
  declare function DetailDialogSidebarGroupAction({
85
85
  className,
86
86
  asChild,
87
87
  ...props
88
88
  }: React.ComponentProps<'button'> & {
89
89
  asChild?: boolean;
90
- }): react_jsx_runtime30.JSX.Element;
90
+ }): react_jsx_runtime4.JSX.Element;
91
91
  declare function DetailDialogSidebarGroupContent({
92
92
  className,
93
93
  ...props
94
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
94
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
95
95
  declare function DetailDialogSidebarMenu({
96
96
  className,
97
97
  ...props
98
- }: React.ComponentProps<'ul'>): react_jsx_runtime30.JSX.Element;
98
+ }: React.ComponentProps<'ul'>): react_jsx_runtime4.JSX.Element;
99
99
  declare function DetailDialogSidebarMenuItem({
100
100
  className,
101
101
  ...props
102
- }: React.ComponentProps<'li'>): react_jsx_runtime30.JSX.Element;
102
+ }: React.ComponentProps<'li'>): react_jsx_runtime4.JSX.Element;
103
103
  declare const sidebarMenuButtonVariants: (props?: ({
104
104
  variant?: "default" | "outline" | null | undefined;
105
105
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -116,7 +116,7 @@ declare function DetailDialogSidebarMenuButton({
116
116
  asChild?: boolean;
117
117
  isActive?: boolean;
118
118
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
119
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime30.JSX.Element;
119
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime4.JSX.Element;
120
120
  declare function DetailDialogSidebarMenuAction({
121
121
  className,
122
122
  asChild,
@@ -125,26 +125,26 @@ declare function DetailDialogSidebarMenuAction({
125
125
  }: React.ComponentProps<'button'> & {
126
126
  asChild?: boolean;
127
127
  showOnHover?: boolean;
128
- }): react_jsx_runtime30.JSX.Element;
128
+ }): react_jsx_runtime4.JSX.Element;
129
129
  declare function DetailDialogSidebarMenuBadge({
130
130
  className,
131
131
  ...props
132
- }: React.ComponentProps<'div'>): react_jsx_runtime30.JSX.Element;
132
+ }: React.ComponentProps<'div'>): react_jsx_runtime4.JSX.Element;
133
133
  declare function DetailDialogSidebarMenuSkeleton({
134
134
  className,
135
135
  showIcon,
136
136
  ...props
137
137
  }: React.ComponentProps<'div'> & {
138
138
  showIcon?: boolean;
139
- }): react_jsx_runtime30.JSX.Element;
139
+ }): react_jsx_runtime4.JSX.Element;
140
140
  declare function DetailDialogSidebarMenuSub({
141
141
  className,
142
142
  ...props
143
- }: React.ComponentProps<'ul'>): react_jsx_runtime30.JSX.Element;
143
+ }: React.ComponentProps<'ul'>): react_jsx_runtime4.JSX.Element;
144
144
  declare function DetailDialogSidebarMenuSubItem({
145
145
  className,
146
146
  ...props
147
- }: React.ComponentProps<'li'>): react_jsx_runtime30.JSX.Element;
147
+ }: React.ComponentProps<'li'>): react_jsx_runtime4.JSX.Element;
148
148
  declare function DetailDialogSidebarMenuSubButton({
149
149
  asChild,
150
150
  size,
@@ -155,7 +155,7 @@ declare function DetailDialogSidebarMenuSubButton({
155
155
  asChild?: boolean;
156
156
  size?: 'sm' | 'md';
157
157
  isActive?: boolean;
158
- }): react_jsx_runtime30.JSX.Element;
158
+ }): react_jsx_runtime4.JSX.Element;
159
159
  //#endregion
160
160
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
161
161
  //# sourceMappingURL=sidebar.d.mts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/features/search-modal/index.d.ts
4
- declare const SearchModal: () => react_jsx_runtime2.JSX.Element;
4
+ declare const SearchModal: () => react_jsx_runtime1.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchModal };
7
7
  //# sourceMappingURL=index.d.cts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/features/search-modal/index.d.ts
4
- declare const SearchModal: () => react_jsx_runtime14.JSX.Element;
4
+ declare const SearchModal: () => react_jsx_runtime2.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchModal };
7
7
  //# sourceMappingURL=index.d.mts.map
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-BimfNium.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../separator-C3ip6sbh.cjs`),l=require(`../../dropdown-menu-BuyuU6uF.cjs`),u=require(`../../resizable-BS63Xwia.cjs`),d=require(`../../input-qnlHzDDm.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=({date:e})=>(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),x=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 whitespace-pre-line text-wrap break-keep`,children:e})]}),S=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),C=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l})=>{let u=(0,h.useCallback)((e,t)=>{let n=10**t;switch(o){case`floor`:return Math.floor(e*n)/n;case`ceil`:return Math.ceil(e*n)/n;default:return Math.round(e*n)/n}},[o]),d=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&(s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a),e},[a,s]),m=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=u(e,a)),t.toLocaleString(`en-US`,d)},[u,d,a]),g=(0,h.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:m(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:m(t)}return`N/A`},[l,m]),_=(0,h.useMemo)(()=>e===`.`&&t===`,`?g:g.replace(/,/g,t).replace(/\./g,e),[g,e,t]);return(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:_}),i]})});C.displayName=`UITableStatisticDisplay`;const w=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function T({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const E=(0,h.createContext)(null),D=()=>{let e=(0,h.use)(E);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},O=(0,h.createContext)(null),k=()=>{let e=(0,h.use)(O);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},A=60,j=20,M=20,N=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`}},P=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),F=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));F.displayName=`TableHeader`;const I=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));I.displayName=`TableHeaderRow`;const L=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=N(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:`relative`,...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(T,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(R,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},R=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(l.t,{children:[(0,p.jsx)(l.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(l.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(l.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(l.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(l.u,{}),(0,p.jsx)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(l.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},z=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),B=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=k(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(V,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});B.displayName=`TableRow`;const V=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=k(),a=e.column.getIsPinned(),o=N(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,n),...r,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-transparent`,children:(0,p.jsx)(T,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,n),...r,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})});V.displayName=`TableCell`;const H=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),U=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),W=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=k(),{keyOfClickRow:s,onClickRow:c}=D(),l=(0,h.useRef)(null),d=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:s}=e;t-n-s<500&&!r&&a&&i.length<a&&o?.()},[r,i.length,a,o]);(0,h.useEffect)(()=>{f(l.current)},[f]);let{rows:m}=t.getRowModel(),g=(0,y.useVirtualizer)({count:m.length,estimateSize:()=>40,getScrollElement:()=>l.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2});return(0,p.jsxs)(u.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(u.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...d,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(F,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(I,{children:e.headers.map(e=>(0,p.jsx)(L,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(z,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(B,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(H,{})]})}),(0,p.jsx)(u.t,{}),e]})},G=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(T,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),K=()=>{let{table:e}=k(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(u.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(c.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(G,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(c.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(c.t,{})]})]})})},q=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,leftPinnedColumns:a,rightPinnedColumns:o,keyOfClickRow:s,onClickRow:c,fetchMoreData:l,children:u})=>{let[d,f]=(0,h.useState)({}),[m,g]=(0,h.useState)({right:o,left:a}),[_,y]=(0,h.useState)({}),b=(0,v.useReactTable)({data:n,columns:r,state:{rowSelection:d,columnPinning:m,columnVisibility:_},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:f,onColumnPinningChange:g,onColumnVisibilityChange:y}),x=(0,h.useMemo)(()=>{let{rows:e}=b.getRowModel();return e},[b.getRowModel().rows,b.getState().columnPinning]),S=(0,h.useMemo)(()=>!t&&x.length===0,[x,t]),C=(0,h.useMemo)(()=>({title:e,table:b,data:n,isEmpty:S,isFetching:t,totalRows:i,fetchMoreData:l,rowSelection:b.getState().rowSelection,columnPinning:b.getState().columnPinning}),[e,b,n,S,t,i,l,b.getState().columnVisibility,b.getState().rowSelection,b.getState().columnPinning]),w=(0,h.useMemo)(()=>({keyOfClickRow:s,onClickRow:c}),[s,c]);return(0,p.jsx)(O.Provider,{value:C,children:(0,p.jsx)(E.Provider,{value:w,children:u})})},J=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(d.t,{...t,size:`lg`,type:`search`,placeholder:`Search records...`,className:`ps-9 pe-9`}),(0,p.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,p.jsx)(m.SearchIcon,{size:16})}),(0,p.jsx)(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,p.jsx)(m.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]}),Y=({children:e,onClick:t})=>(0,p.jsx)(`button`,{type:`button`,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive [&_svg]:size-3.5`,onClick:t,children:e}),X=({onCreate:e,onDownload:t,onRefresh:n})=>(0,p.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,p.jsx)(Y,{onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(Y,{onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(Y,{onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.DownloadIcon,{})})]}),Z=({children:e})=>{let{title:t}=k();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};Z.displayName=`TableTooltip`,exports.UITableContainer=W,exports.UITableDateDisplay=b,exports.UITableFilter=K,exports.UITableFooter=U,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=q,exports.UITableStatisticDisplay=C,exports.UITableTooltip=Z,exports.UITableTooltipActions=X,exports.UITableTooltipFilter=J,exports.UITableUserDataDisplay=w,exports.UITableWrapper=P;
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-BimfNium.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../separator-C3ip6sbh.cjs`),l=require(`../../dropdown-menu-BuyuU6uF.cjs`),u=require(`../../resizable-BS63Xwia.cjs`),d=require(`../../input-qnlHzDDm.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=({date:e})=>(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),x=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 whitespace-pre-line text-wrap break-keep`,children:e})]}),S=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),C=({title:e,onClick:n})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(t.t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:(0,h.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,p.jsx)(m.Trash2Icon,{})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(`p`,{children:e||`Remove item from list table`})})]}),w=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l})=>{let u=(0,h.useCallback)((e,t)=>{let n=10**t;switch(o){case`floor`:return Math.floor(e*n)/n;case`ceil`:return Math.ceil(e*n)/n;default:return Math.round(e*n)/n}},[o]),d=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&(s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a),e},[a,s]),m=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=u(e,a)),t.toLocaleString(`en-US`,d)},[u,d,a]),g=(0,h.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:m(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:m(t)}return`N/A`},[l,m]),_=(0,h.useMemo)(()=>e===`.`&&t===`,`?g:g.replace(/,/g,t).replace(/\./g,e),[g,e,t]);return(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:_}),i]})});w.displayName=`UITableStatisticDisplay`;const T=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function E({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const D=(0,h.createContext)(null),O=()=>{let e=(0,h.use)(D);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},k=(0,h.createContext)(null),A=()=>{let e=(0,h.use)(k);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},j=60,M=20,N=20,P=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`}},F=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),I=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));I.displayName=`TableHeader`;const L=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));L.displayName=`TableHeaderRow`;const R=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=P(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:`relative`,...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(E,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(z,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},z=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(l.t,{children:[(0,p.jsx)(l.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(l.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(l.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(l.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(l.u,{}),(0,p.jsx)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(l.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},B=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),V=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=A(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(H,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});V.displayName=`TableRow`;const H=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=A(),a=e.column.getIsPinned(),o=P(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,n),...r,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-transparent`,children:(0,p.jsx)(E,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,n),...r,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})});H.displayName=`TableCell`;const U=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),W=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),G=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=A(),{keyOfClickRow:s,onClickRow:c}=O(),l=(0,h.useRef)(null),d=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:s}=e;t-n-s<500&&!r&&a&&i.length<a&&o?.()},[r,i.length,a,o]);(0,h.useEffect)(()=>{f(l.current)},[f]);let{rows:m}=t.getRowModel(),g=(0,y.useVirtualizer)({count:m.length,estimateSize:()=>40,getScrollElement:()=>l.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2});return(0,p.jsxs)(u.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(u.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...d,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(I,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(L,{children:e.headers.map(e=>(0,p.jsx)(R,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(B,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(V,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(U,{})]})}),(0,p.jsx)(u.t,{}),e]})},K=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(E,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),q=()=>{let{table:e}=A(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(u.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(c.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(K,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(c.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(c.t,{})]})]})})},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,leftPinnedColumns:a,rightPinnedColumns:o,keyOfClickRow:s,onClickRow:c,fetchMoreData:l,children:u})=>{let[d,f]=(0,h.useState)({}),[m,g]=(0,h.useState)({right:o,left:a}),[_,y]=(0,h.useState)({}),b=(0,v.useReactTable)({data:n,columns:r,state:{rowSelection:d,columnPinning:m,columnVisibility:_},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:f,onColumnPinningChange:g,onColumnVisibilityChange:y}),x=(0,h.useMemo)(()=>{let{rows:e}=b.getRowModel();return e},[b.getRowModel().rows,b.getState().columnPinning]),S=(0,h.useMemo)(()=>!t&&x.length===0,[x,t]),C=(0,h.useMemo)(()=>({title:e,table:b,data:n,isEmpty:S,isFetching:t,totalRows:i,fetchMoreData:l,rowSelection:b.getState().rowSelection,columnPinning:b.getState().columnPinning}),[e,b,n,S,t,i,l,b.getState().columnVisibility,b.getState().rowSelection,b.getState().columnPinning]),w=(0,h.useMemo)(()=>({keyOfClickRow:s,onClickRow:c}),[s,c]);return(0,p.jsx)(k.Provider,{value:C,children:(0,p.jsx)(D.Provider,{value:w,children:u})})},Y=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(d.t,{...t,size:`lg`,type:`search`,placeholder:`Search records...`,className:`ps-9 pe-9`}),(0,p.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,p.jsx)(m.SearchIcon,{size:16})}),(0,p.jsx)(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,p.jsx)(m.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]}),X=({children:e,onClick:t})=>(0,p.jsx)(`button`,{type:`button`,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive [&_svg]:size-3.5`,onClick:t,children:e}),Z=({onCreate:e,onDownload:t,onRefresh:n})=>(0,p.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,p.jsx)(X,{onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(X,{onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(X,{onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.DownloadIcon,{})})]}),Q=({children:e})=>{let{title:t}=A();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};Q.displayName=`TableTooltip`,exports.UITableContainer=G,exports.UITableDateDisplay=b,exports.UITableFilter=q,exports.UITableFooter=W,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableRemoveButton=C,exports.UITableStatisticDisplay=w,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,exports.UITableUserDataDisplay=T,exports.UITableWrapper=F;
2
2
  //# sourceMappingURL=index.cjs.map