@customafk/lunas-ui 0.1.31 → 0.1.33

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 (141) hide show
  1. package/dist/{button-Bdho6nta.d.mts → button-BswqS0f_.d.mts} +4 -4
  2. package/dist/{button-Lj2yxcJA.d.cts → button-WJ1DPRNP.d.cts} +6 -6
  3. package/dist/data-display/empty.d.mts +2 -2
  4. package/dist/{dialog-BNnxC6Vz.d.cts → dialog-C1fYq5rO.d.cts} +12 -12
  5. package/dist/{dialog-BsoV1rES.d.mts → dialog-DLO4JM1i.d.mts} +12 -12
  6. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +28 -28
  7. package/dist/dialogs/detail-dialog/component/sidebar.d.mts +28 -28
  8. package/dist/features/search-modal/index.d.cts +2 -2
  9. package/dist/features/search-modal/index.d.mts +2 -2
  10. package/dist/features/tables/index.cjs +1 -1
  11. package/dist/features/tables/index.cjs.map +1 -1
  12. package/dist/features/tables/index.d.cts +3 -3
  13. package/dist/features/tables/index.d.mts +3 -3
  14. package/dist/features/tables/index.mjs +1 -1
  15. package/dist/features/tables/index.mjs.map +1 -1
  16. package/dist/{input-BNQPWIcl.d.mts → input-BW-WzhMQ.d.mts} +4 -4
  17. package/dist/{input-DhNpQc6T.d.cts → input-DtSax5Ry.d.cts} +6 -6
  18. package/dist/layouts/app-layout/index.d.cts +3 -3
  19. package/dist/layouts/app-layout/index.d.mts +28 -28
  20. package/dist/layouts/flex.d.cts +4 -4
  21. package/dist/layouts/flex.d.mts +4 -4
  22. package/dist/layouts/service-layout/index.d.cts +13 -13
  23. package/dist/layouts/service-layout/index.d.mts +15 -15
  24. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  25. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  26. package/dist/pages/FeatureFixing.d.cts +2 -2
  27. package/dist/pages/FeatureFixing.d.mts +2 -2
  28. package/dist/pages/NotAuthorized.d.cts +2 -2
  29. package/dist/pages/NotAuthorized.d.mts +2 -2
  30. package/dist/pages/NotFound.d.cts +2 -2
  31. package/dist/pages/NotFound.d.mts +2 -2
  32. package/dist/{separator-BroixQVF.d.mts → separator-Cmk1niwo.d.cts} +3 -3
  33. package/dist/{separator-CT6d80i2.d.cts → separator-CxM9dP1p.d.mts} +3 -3
  34. package/dist/{tooltip-B2Nd6KbB.d.mts → tooltip-BNrT3hko.d.mts} +6 -6
  35. package/dist/{tooltip-szcBtW8t.d.cts → tooltip-pz_E40VF.d.cts} +6 -6
  36. package/dist/typography/paragraph.d.cts +2 -2
  37. package/dist/typography/paragraph.d.mts +2 -2
  38. package/dist/typography/title.d.cts +2 -2
  39. package/dist/typography/title.d.mts +2 -2
  40. package/dist/ui/alert-dialog.d.cts +12 -12
  41. package/dist/ui/alert-dialog.d.mts +12 -12
  42. package/dist/ui/alert.d.cts +6 -6
  43. package/dist/ui/alert.d.mts +4 -4
  44. package/dist/ui/aspect-ratio.d.cts +2 -2
  45. package/dist/ui/aspect-ratio.d.mts +2 -2
  46. package/dist/ui/avatar.d.cts +4 -4
  47. package/dist/ui/avatar.d.mts +4 -4
  48. package/dist/ui/badge.d.cts +4 -4
  49. package/dist/ui/badge.d.mts +4 -4
  50. package/dist/ui/breadcrumb.d.cts +8 -8
  51. package/dist/ui/breadcrumb.d.mts +8 -8
  52. package/dist/ui/button-group.d.cts +5 -5
  53. package/dist/ui/button-group.d.mts +7 -7
  54. package/dist/ui/button.d.cts +1 -1
  55. package/dist/ui/button.d.mts +1 -1
  56. package/dist/ui/calendar.d.cts +4 -4
  57. package/dist/ui/calendar.d.mts +4 -4
  58. package/dist/ui/card.d.cts +8 -8
  59. package/dist/ui/card.d.mts +8 -8
  60. package/dist/ui/carousel.d.cts +7 -7
  61. package/dist/ui/carousel.d.mts +7 -7
  62. package/dist/ui/collapsible.d.cts +4 -4
  63. package/dist/ui/collapsible.d.mts +4 -4
  64. package/dist/ui/command.d.cts +11 -11
  65. package/dist/ui/command.d.mts +11 -11
  66. package/dist/ui/context-menu.d.cts +16 -16
  67. package/dist/ui/context-menu.d.mts +16 -16
  68. package/dist/ui/dialog.d.cts +1 -1
  69. package/dist/ui/dialog.d.mts +1 -1
  70. package/dist/ui/drawer.d.cts +11 -11
  71. package/dist/ui/drawer.d.mts +11 -11
  72. package/dist/ui/dropdown-menu.d.cts +16 -16
  73. package/dist/ui/dropdown-menu.d.mts +16 -16
  74. package/dist/ui/empty.d.cts +9 -9
  75. package/dist/ui/empty.d.mts +7 -7
  76. package/dist/ui/field.d.cts +24 -24
  77. package/dist/ui/field.d.mts +24 -24
  78. package/dist/ui/file-uploader.d.cts +2 -2
  79. package/dist/ui/file-uploader.d.mts +2 -2
  80. package/dist/ui/form.d.cts +11 -11
  81. package/dist/ui/form.d.mts +11 -11
  82. package/dist/ui/hover-card.d.cts +4 -4
  83. package/dist/ui/hover-card.d.mts +4 -4
  84. package/dist/ui/input-otp.d.cts +5 -5
  85. package/dist/ui/input-otp.d.mts +5 -5
  86. package/dist/ui/input.d.cts +1 -1
  87. package/dist/ui/input.d.mts +1 -1
  88. package/dist/ui/inputs/search-input.d.cts +3 -3
  89. package/dist/ui/inputs/search-input.d.mts +3 -3
  90. package/dist/ui/item.d.cts +16 -16
  91. package/dist/ui/item.d.mts +16 -16
  92. package/dist/ui/label.d.cts +2 -2
  93. package/dist/ui/label.d.mts +2 -2
  94. package/dist/ui/menubar.d.cts +17 -17
  95. package/dist/ui/multi-select.d.cts +2 -2
  96. package/dist/ui/multi-select.d.mts +3 -3
  97. package/dist/ui/navigation-menu.d.cts +11 -11
  98. package/dist/ui/navigation-menu.d.mts +11 -11
  99. package/dist/ui/pagination.d.cts +9 -9
  100. package/dist/ui/pagination.d.mts +9 -9
  101. package/dist/ui/popover.d.cts +5 -5
  102. package/dist/ui/popover.d.mts +5 -5
  103. package/dist/ui/progress.d.cts +2 -2
  104. package/dist/ui/progress.d.mts +2 -2
  105. package/dist/ui/radio-group.d.cts +3 -3
  106. package/dist/ui/radio-group.d.mts +3 -3
  107. package/dist/ui/resizable.d.cts +4 -4
  108. package/dist/ui/resizable.d.mts +4 -4
  109. package/dist/ui/scroll-area.d.cts +3 -3
  110. package/dist/ui/scroll-area.d.mts +6 -6
  111. package/dist/ui/select.d.cts +11 -11
  112. package/dist/ui/select.d.mts +11 -11
  113. package/dist/ui/separator.d.cts +1 -1
  114. package/dist/ui/separator.d.mts +1 -1
  115. package/dist/ui/sheet.d.cts +9 -9
  116. package/dist/ui/sheet.d.mts +9 -9
  117. package/dist/ui/sidebar.d.cts +30 -30
  118. package/dist/ui/sidebar.d.mts +30 -30
  119. package/dist/ui/skeleton.d.cts +2 -2
  120. package/dist/ui/skeleton.d.mts +2 -2
  121. package/dist/ui/slider.d.cts +2 -2
  122. package/dist/ui/slider.d.mts +2 -2
  123. package/dist/ui/sonner.d.cts +2 -2
  124. package/dist/ui/sonner.d.mts +2 -2
  125. package/dist/ui/spinner.d.cts +2 -2
  126. package/dist/ui/spinner.d.mts +2 -2
  127. package/dist/ui/switch.d.cts +2 -2
  128. package/dist/ui/switch.d.mts +2 -2
  129. package/dist/ui/table.d.cts +9 -9
  130. package/dist/ui/table.d.mts +18 -18
  131. package/dist/ui/tabs.d.cts +5 -5
  132. package/dist/ui/tabs.d.mts +5 -5
  133. package/dist/ui/textarea.d.cts +2 -2
  134. package/dist/ui/textarea.d.mts +2 -2
  135. package/dist/ui/toggle-group.d.cts +3 -3
  136. package/dist/ui/toggle-group.d.mts +3 -3
  137. package/dist/ui/toggle.d.cts +4 -4
  138. package/dist/ui/toggle.d.mts +4 -4
  139. package/dist/ui/tooltip.d.cts +1 -1
  140. package/dist/ui/tooltip.d.mts +1 -1
  141. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime194 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime138 from "react/jsx-runtime";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import * as class_variance_authority_types11 from "class-variance-authority/types";
4
4
 
@@ -8,7 +8,7 @@ import * as class_variance_authority_types11 from "class-variance-authority/type
8
8
  * Button variants definition for styling using class-variance-authority
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
- variant?: "link" | "default" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
11
+ variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
12
  color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
14
  } & class_variance_authority_types11.ClassProp) | undefined) => string;
@@ -51,7 +51,7 @@ declare function Button({
51
51
  disabled,
52
52
  type,
53
53
  ...props
54
- }: ButtonProps): react_jsx_runtime194.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime138.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-Bdho6nta.d.mts.map
57
+ //# sourceMappingURL=button-BswqS0f_.d.mts.map
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime48 from "react/jsx-runtime";
2
- import * as class_variance_authority_types14 from "class-variance-authority/types";
1
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
2
+ import * as class_variance_authority_types13 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,10 +8,10 @@ import { VariantProps } from "class-variance-authority";
8
8
  * Button variants definition for styling using class-variance-authority
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
- variant?: "link" | "default" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
11
+ variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
12
  color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
- } & class_variance_authority_types14.ClassProp) | undefined) => string;
14
+ } & class_variance_authority_types13.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_runtime48.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime36.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-Lj2yxcJA.d.cts.map
57
+ //# sourceMappingURL=button-WJ1DPRNP.d.cts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/data-display/empty.d.ts
4
- declare const EmptyDisplay: () => react_jsx_runtime0.JSX.Element;
4
+ declare const EmptyDisplay: () => react_jsx_runtime1.JSX.Element;
5
5
  //#endregion
6
6
  export { EmptyDisplay };
7
7
  //# sourceMappingURL=empty.d.mts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime213 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime105 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_runtime213.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime105.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime213.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime105.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime213.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime105.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime213.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime105.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime213.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime105.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_runtime213.JSX.Element;
28
+ }): react_jsx_runtime105.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime213.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime105.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime213.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime105.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime213.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime105.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime213.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime105.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-BNnxC6Vz.d.cts.map
47
+ //# sourceMappingURL=dialog-C1fYq5rO.d.cts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime281 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime70 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_runtime281.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime70.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime281.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime70.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime281.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime70.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime281.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime70.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime281.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime70.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_runtime281.JSX.Element;
28
+ }): react_jsx_runtime70.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime70.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime70.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime281.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime70.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime281.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime70.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-BsoV1rES.d.mts.map
47
+ //# sourceMappingURL=dialog-DLO4JM1i.d.mts.map
@@ -1,8 +1,8 @@
1
- import { t as Button } from "../../../button-Lj2yxcJA.cjs";
2
- import { t as Input } from "../../../input-DhNpQc6T.cjs";
3
- import { t as Separator } from "../../../separator-CT6d80i2.cjs";
4
- import { n as TooltipContent } from "../../../tooltip-szcBtW8t.cjs";
5
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import { t as Button } from "../../../button-WJ1DPRNP.cjs";
2
+ import { t as Input } from "../../../input-DtSax5Ry.cjs";
3
+ import { t as Separator } from "../../../separator-Cmk1niwo.cjs";
4
+ import { n as TooltipContent } from "../../../tooltip-pz_E40VF.cjs";
5
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
6
6
  import * as class_variance_authority_types0 from "class-variance-authority/types";
7
7
  import { VariantProps } from "class-variance-authority";
8
8
 
@@ -29,7 +29,7 @@ declare function SidebarProvider({
29
29
  defaultOpen?: boolean;
30
30
  open?: boolean;
31
31
  onOpenChange?: (open: boolean) => void;
32
- }): react_jsx_runtime9.JSX.Element;
32
+ }): react_jsx_runtime3.JSX.Element;
33
33
  declare function Sidebar({
34
34
  side,
35
35
  variant,
@@ -41,70 +41,70 @@ declare function Sidebar({
41
41
  side?: 'left' | 'right';
42
42
  variant?: 'sidebar' | 'floating' | 'inset';
43
43
  collapsible?: 'offcanvas' | 'icon' | 'none';
44
- }): react_jsx_runtime9.JSX.Element;
44
+ }): react_jsx_runtime3.JSX.Element;
45
45
  declare function DetailDialogSidebarTrigger({
46
46
  className,
47
47
  onClick,
48
48
  ...props
49
- }: React.ComponentProps<typeof Button>): react_jsx_runtime9.JSX.Element;
49
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime3.JSX.Element;
50
50
  declare function DetailDialogSidebarRail({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<'button'>): react_jsx_runtime9.JSX.Element;
53
+ }: React.ComponentProps<'button'>): react_jsx_runtime3.JSX.Element;
54
54
  declare function SidebarInset({
55
55
  className,
56
56
  ...props
57
- }: React.ComponentProps<'main'>): react_jsx_runtime9.JSX.Element;
57
+ }: React.ComponentProps<'main'>): react_jsx_runtime3.JSX.Element;
58
58
  declare function SidebarInput({
59
59
  className,
60
60
  ...props
61
- }: React.ComponentProps<typeof Input>): react_jsx_runtime9.JSX.Element;
61
+ }: React.ComponentProps<typeof Input>): react_jsx_runtime3.JSX.Element;
62
62
  declare function DetailDialogSidebarHeader({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
65
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
66
66
  declare function DetailDialogSidebarFooter({
67
67
  className,
68
68
  ...props
69
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
69
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
70
70
  declare function DetailDialogSidebarSeparator({
71
71
  className,
72
72
  ...props
73
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime9.JSX.Element;
73
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime3.JSX.Element;
74
74
  declare function DetailDialogSidebarContent({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
78
78
  declare function DetailDialogSidebarGroup({
79
79
  className,
80
80
  ...props
81
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
81
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
82
82
  declare function DetailDialogSidebarGroupLabel({
83
83
  className,
84
84
  asChild,
85
85
  ...props
86
86
  }: React.ComponentProps<'div'> & {
87
87
  asChild?: boolean;
88
- }): react_jsx_runtime9.JSX.Element;
88
+ }): react_jsx_runtime3.JSX.Element;
89
89
  declare function DetailDialogSidebarGroupAction({
90
90
  className,
91
91
  asChild,
92
92
  ...props
93
93
  }: React.ComponentProps<'button'> & {
94
94
  asChild?: boolean;
95
- }): react_jsx_runtime9.JSX.Element;
95
+ }): react_jsx_runtime3.JSX.Element;
96
96
  declare function DetailDialogSidebarGroupContent({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
99
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
100
100
  declare function DetailDialogSidebarMenu({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'ul'>): react_jsx_runtime9.JSX.Element;
103
+ }: React.ComponentProps<'ul'>): react_jsx_runtime3.JSX.Element;
104
104
  declare function DetailDialogSidebarMenuItem({
105
105
  className,
106
106
  ...props
107
- }: React.ComponentProps<'li'>): react_jsx_runtime9.JSX.Element;
107
+ }: React.ComponentProps<'li'>): react_jsx_runtime3.JSX.Element;
108
108
  declare const sidebarMenuButtonVariants: (props?: ({
109
109
  variant?: "default" | "outline" | null | undefined;
110
110
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -121,7 +121,7 @@ declare function DetailDialogSidebarMenuButton({
121
121
  asChild?: boolean;
122
122
  isActive?: boolean;
123
123
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
124
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime9.JSX.Element;
124
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime3.JSX.Element;
125
125
  declare function DetailDialogSidebarMenuAction({
126
126
  className,
127
127
  asChild,
@@ -130,26 +130,26 @@ declare function DetailDialogSidebarMenuAction({
130
130
  }: React.ComponentProps<'button'> & {
131
131
  asChild?: boolean;
132
132
  showOnHover?: boolean;
133
- }): react_jsx_runtime9.JSX.Element;
133
+ }): react_jsx_runtime3.JSX.Element;
134
134
  declare function DetailDialogSidebarMenuBadge({
135
135
  className,
136
136
  ...props
137
- }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
137
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
138
138
  declare function DetailDialogSidebarMenuSkeleton({
139
139
  className,
140
140
  showIcon,
141
141
  ...props
142
142
  }: React.ComponentProps<'div'> & {
143
143
  showIcon?: boolean;
144
- }): react_jsx_runtime9.JSX.Element;
144
+ }): react_jsx_runtime3.JSX.Element;
145
145
  declare function DetailDialogSidebarMenuSub({
146
146
  className,
147
147
  ...props
148
- }: React.ComponentProps<'ul'>): react_jsx_runtime9.JSX.Element;
148
+ }: React.ComponentProps<'ul'>): react_jsx_runtime3.JSX.Element;
149
149
  declare function DetailDialogSidebarMenuSubItem({
150
150
  className,
151
151
  ...props
152
- }: React.ComponentProps<'li'>): react_jsx_runtime9.JSX.Element;
152
+ }: React.ComponentProps<'li'>): react_jsx_runtime3.JSX.Element;
153
153
  declare function DetailDialogSidebarMenuSubButton({
154
154
  asChild,
155
155
  size,
@@ -160,7 +160,7 @@ declare function DetailDialogSidebarMenuSubButton({
160
160
  asChild?: boolean;
161
161
  size?: 'sm' | 'md';
162
162
  isActive?: boolean;
163
- }): react_jsx_runtime9.JSX.Element;
163
+ }): react_jsx_runtime3.JSX.Element;
164
164
  //#endregion
165
165
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInput, SidebarInset, SidebarProvider, useSidebar };
166
166
  //# sourceMappingURL=sidebar.d.cts.map
@@ -1,8 +1,8 @@
1
- import { t as Button } from "../../../button-Bdho6nta.mjs";
2
- import { t as Input } from "../../../input-BNQPWIcl.mjs";
3
- import { t as Separator } from "../../../separator-BroixQVF.mjs";
4
- import { n as TooltipContent } from "../../../tooltip-B2Nd6KbB.mjs";
5
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import { t as Button } from "../../../button-BswqS0f_.mjs";
2
+ import { t as Input } from "../../../input-BW-WzhMQ.mjs";
3
+ import { t as Separator } from "../../../separator-CxM9dP1p.mjs";
4
+ import { n as TooltipContent } from "../../../tooltip-BNrT3hko.mjs";
5
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
6
6
  import { VariantProps } from "class-variance-authority";
7
7
  import * as class_variance_authority_types0 from "class-variance-authority/types";
8
8
 
@@ -29,7 +29,7 @@ declare function SidebarProvider({
29
29
  defaultOpen?: boolean;
30
30
  open?: boolean;
31
31
  onOpenChange?: (open: boolean) => void;
32
- }): react_jsx_runtime6.JSX.Element;
32
+ }): react_jsx_runtime8.JSX.Element;
33
33
  declare function Sidebar({
34
34
  side,
35
35
  variant,
@@ -41,70 +41,70 @@ declare function Sidebar({
41
41
  side?: 'left' | 'right';
42
42
  variant?: 'sidebar' | 'floating' | 'inset';
43
43
  collapsible?: 'offcanvas' | 'icon' | 'none';
44
- }): react_jsx_runtime6.JSX.Element;
44
+ }): react_jsx_runtime8.JSX.Element;
45
45
  declare function DetailDialogSidebarTrigger({
46
46
  className,
47
47
  onClick,
48
48
  ...props
49
- }: React.ComponentProps<typeof Button>): react_jsx_runtime6.JSX.Element;
49
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime8.JSX.Element;
50
50
  declare function DetailDialogSidebarRail({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<'button'>): react_jsx_runtime6.JSX.Element;
53
+ }: React.ComponentProps<'button'>): react_jsx_runtime8.JSX.Element;
54
54
  declare function SidebarInset({
55
55
  className,
56
56
  ...props
57
- }: React.ComponentProps<'main'>): react_jsx_runtime6.JSX.Element;
57
+ }: React.ComponentProps<'main'>): react_jsx_runtime8.JSX.Element;
58
58
  declare function SidebarInput({
59
59
  className,
60
60
  ...props
61
- }: React.ComponentProps<typeof Input>): react_jsx_runtime6.JSX.Element;
61
+ }: React.ComponentProps<typeof Input>): react_jsx_runtime8.JSX.Element;
62
62
  declare function DetailDialogSidebarHeader({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
65
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
66
66
  declare function DetailDialogSidebarFooter({
67
67
  className,
68
68
  ...props
69
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
69
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
70
70
  declare function DetailDialogSidebarSeparator({
71
71
  className,
72
72
  ...props
73
- }: React.ComponentProps<typeof Separator>): react_jsx_runtime6.JSX.Element;
73
+ }: React.ComponentProps<typeof Separator>): react_jsx_runtime8.JSX.Element;
74
74
  declare function DetailDialogSidebarContent({
75
75
  className,
76
76
  ...props
77
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
78
78
  declare function DetailDialogSidebarGroup({
79
79
  className,
80
80
  ...props
81
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
81
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
82
82
  declare function DetailDialogSidebarGroupLabel({
83
83
  className,
84
84
  asChild,
85
85
  ...props
86
86
  }: React.ComponentProps<'div'> & {
87
87
  asChild?: boolean;
88
- }): react_jsx_runtime6.JSX.Element;
88
+ }): react_jsx_runtime8.JSX.Element;
89
89
  declare function DetailDialogSidebarGroupAction({
90
90
  className,
91
91
  asChild,
92
92
  ...props
93
93
  }: React.ComponentProps<'button'> & {
94
94
  asChild?: boolean;
95
- }): react_jsx_runtime6.JSX.Element;
95
+ }): react_jsx_runtime8.JSX.Element;
96
96
  declare function DetailDialogSidebarGroupContent({
97
97
  className,
98
98
  ...props
99
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
99
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
100
100
  declare function DetailDialogSidebarMenu({
101
101
  className,
102
102
  ...props
103
- }: React.ComponentProps<'ul'>): react_jsx_runtime6.JSX.Element;
103
+ }: React.ComponentProps<'ul'>): react_jsx_runtime8.JSX.Element;
104
104
  declare function DetailDialogSidebarMenuItem({
105
105
  className,
106
106
  ...props
107
- }: React.ComponentProps<'li'>): react_jsx_runtime6.JSX.Element;
107
+ }: React.ComponentProps<'li'>): react_jsx_runtime8.JSX.Element;
108
108
  declare const sidebarMenuButtonVariants: (props?: ({
109
109
  variant?: "default" | "outline" | null | undefined;
110
110
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -121,7 +121,7 @@ declare function DetailDialogSidebarMenuButton({
121
121
  asChild?: boolean;
122
122
  isActive?: boolean;
123
123
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
124
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime6.JSX.Element;
124
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime8.JSX.Element;
125
125
  declare function DetailDialogSidebarMenuAction({
126
126
  className,
127
127
  asChild,
@@ -130,26 +130,26 @@ declare function DetailDialogSidebarMenuAction({
130
130
  }: React.ComponentProps<'button'> & {
131
131
  asChild?: boolean;
132
132
  showOnHover?: boolean;
133
- }): react_jsx_runtime6.JSX.Element;
133
+ }): react_jsx_runtime8.JSX.Element;
134
134
  declare function DetailDialogSidebarMenuBadge({
135
135
  className,
136
136
  ...props
137
- }: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
137
+ }: React.ComponentProps<'div'>): react_jsx_runtime8.JSX.Element;
138
138
  declare function DetailDialogSidebarMenuSkeleton({
139
139
  className,
140
140
  showIcon,
141
141
  ...props
142
142
  }: React.ComponentProps<'div'> & {
143
143
  showIcon?: boolean;
144
- }): react_jsx_runtime6.JSX.Element;
144
+ }): react_jsx_runtime8.JSX.Element;
145
145
  declare function DetailDialogSidebarMenuSub({
146
146
  className,
147
147
  ...props
148
- }: React.ComponentProps<'ul'>): react_jsx_runtime6.JSX.Element;
148
+ }: React.ComponentProps<'ul'>): react_jsx_runtime8.JSX.Element;
149
149
  declare function DetailDialogSidebarMenuSubItem({
150
150
  className,
151
151
  ...props
152
- }: React.ComponentProps<'li'>): react_jsx_runtime6.JSX.Element;
152
+ }: React.ComponentProps<'li'>): react_jsx_runtime8.JSX.Element;
153
153
  declare function DetailDialogSidebarMenuSubButton({
154
154
  asChild,
155
155
  size,
@@ -160,7 +160,7 @@ declare function DetailDialogSidebarMenuSubButton({
160
160
  asChild?: boolean;
161
161
  size?: 'sm' | 'md';
162
162
  isActive?: boolean;
163
- }): react_jsx_runtime6.JSX.Element;
163
+ }): react_jsx_runtime8.JSX.Element;
164
164
  //#endregion
165
165
  export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInput, SidebarInset, SidebarProvider, useSidebar };
166
166
  //# sourceMappingURL=sidebar.d.mts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime4 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_runtime4.JSX.Element;
4
+ declare const SearchModal: () => react_jsx_runtime2.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_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/features/search-modal/index.d.ts
4
- declare const SearchModal: () => react_jsx_runtime1.JSX.Element;
4
+ declare const SearchModal: () => react_jsx_runtime0.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(`../../input-C1BXP8dd.cjs`),l=require(`../../separator-Crr30ZHa.cjs`),u=require(`../../dropdown-menu-DQs_Lvq7.cjs`),d=require(`../../resizable-C2-dXaDM.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:`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(`useTableContext must be used within a TableProvider`);return e},O=(0,h.createContext)(null),k=()=>{let e=(0,h.use)(O);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);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)(u.t,{children:[(0,p.jsx)(u.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)(u.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(u.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)(u.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(u.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(u.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(u.u,{}),(0,p.jsx)(u.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(u.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(u.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`,`[&_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,row:t,virtualRow:n,rowVirtualizer:r,className:i,...a})=>{let{columnPinning:o}=D();return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":n.index,ref:e=>r.measureElement(e),style:{transform:`translateY(${n.start}px)`},className:(0,f.cn)(`group`,i),...a,children:t.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}=D(),a=e.column.getIsPinned(),o=N(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return a&&console.log(`Pinned Cell Rendered:`,e.column.getPinnedIndex()),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,totalRows:i,fetchMoreData:a}=D(),{rows:o,rowsLength:s}=k(),c=(0,h.useRef)(null),l=(0,h.useRef)(null),u=(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,y.useVirtualizer)({count:s,getScrollElement:()=>l.current,estimateSize:()=>40,measureElement:e=>e?.getBoundingClientRect().height,overscan:2}),m=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:o}=e;t-n-o<200&&!r&&i&&s<i&&a?.()},[r,s,i,a]);return(0,h.useEffect)(()=>{m(c.current)},[m]),(0,p.jsxs)(d.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)(d.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:c,className:`size-full overflow-auto`,children:[(0,p.jsxs)(`table`,{ref:l,"data-slot":`table`,style:{...u,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start overflow-auto 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:f.getTotalSize(),children:f.getVirtualItems().map(e=>{let t=o[e.index];return(0,p.jsx)(B,{"data-index":e.index,row:t,virtualRow:e,rowVirtualizer:f},t.id)})})]}),n&&(0,p.jsx)(H,{})]})}),(0,p.jsx)(d.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}=D(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(d.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)(l.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)(l.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)(l.t,{})]})]})})},q={columnPinning:{right:[`actions`]}},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,fetchMoreData:a,children:o})=>{let[s,c]=(0,h.useState)({}),[l,u]=(0,h.useState)({right:[`actions`]}),[d,f]=(0,h.useState)({}),m=(0,v.useReactTable)({initialState:q,data:n,columns:r,state:{rowSelection:s,columnPinning:l,columnVisibility:d},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:c,onColumnPinningChange:u,onColumnVisibilityChange:f}),g=(0,h.useMemo)(()=>m.getRowModel().rows,[n,m.getState().columnPinning]),_=(0,h.useMemo)(()=>!t&&m.getRowModel().rows.length===0,[m,t]),y=(0,h.useMemo)(()=>({table:m,title:e,isEmpty:_,isFetching:t,totalRows:i,rowSelection:m.getState().rowSelection,columnPinning:m.getState().columnPinning,fetchMoreData:a}),[m,e,_,t,i,a,m.getState().columnVisibility,m.getState().rowSelection,m.getState().columnPinning]),b=(0,h.useMemo)(()=>({rowsLength:g.length,rows:g}),[g,m.getState().rowSelection,m.getState().columnPinning,m.getState().columnSizing]);return(0,p.jsx)(E.Provider,{value:y,children:(0,p.jsx)(O.Provider,{value:b,children:o})})},Y=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(c.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})=>(0,p.jsx)(`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`,children:e}),Z=()=>(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,{children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(X,{children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(X,{children:(0,p.jsx)(m.DownloadIcon,{})})]}),Q=({children:e})=>{let{title:t}=D();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=W,exports.UITableDateDisplay=b,exports.UITableFilter=K,exports.UITableFooter=U,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableStatisticDisplay=C,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,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(`../../input-C1BXP8dd.cjs`),l=require(`../../separator-Crr30ZHa.cjs`),u=require(`../../dropdown-menu-DQs_Lvq7.cjs`),d=require(`../../resizable-C2-dXaDM.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:`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(`useTableContext must be used within a TableProvider`);return e},O=(0,h.createContext)(null),k=()=>{let e=(0,h.use)(O);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);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)(u.t,{children:[(0,p.jsx)(u.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)(u.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(u.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)(u.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(u.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(u.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(u.u,{}),(0,p.jsx)(u.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(u.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(u.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`,`[&_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,row:t,virtualRow:n,rowVirtualizer:r,className:i,...a})=>{let{columnPinning:o}=D();return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":n.index,ref:e=>r.measureElement(e),style:{transform:`translateY(${n.start}px)`},className:(0,f.cn)(`group`,i),...a,children:t.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}=D(),a=e.column.getIsPinned(),o=N(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return a&&console.log(`Pinned Cell Rendered:`,e.column.getPinnedIndex()),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,totalRows:i,fetchMoreData:a}=D(),{rows:o,rowsLength:s}=k(),c=(0,h.useRef)(null),l=(0,h.useRef)(null),u=(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,y.useVirtualizer)({count:s,getScrollElement:()=>l.current,estimateSize:()=>40,measureElement:e=>e?.getBoundingClientRect().height,overscan:2}),m=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:o}=e;t-n-o<500&&!r&&i&&s<i&&a?.()},[r,s,i,a]);return(0,h.useEffect)(()=>{m(c.current)},[m]),(0,p.jsxs)(d.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)(d.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:c,className:`size-full overflow-auto`,onScroll:e=>m(e.currentTarget),children:[(0,p.jsxs)(`table`,{ref:l,"data-slot":`table`,style:{...u,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start overflow-auto 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:f.getTotalSize(),children:f.getVirtualItems().map(e=>{let t=o[e.index];return(0,p.jsx)(B,{"data-index":e.index,row:t,virtualRow:e,rowVirtualizer:f},t.id)})})]}),n&&(0,p.jsx)(H,{})]})}),(0,p.jsx)(d.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}=D(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(d.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)(l.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)(l.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)(l.t,{})]})]})})},q={columnPinning:{right:[`actions`]}},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,fetchMoreData:a,children:o})=>{let[s,c]=(0,h.useState)({}),[l,u]=(0,h.useState)({right:[`actions`]}),[d,f]=(0,h.useState)({}),m=(0,v.useReactTable)({initialState:q,data:n,columns:r,state:{rowSelection:s,columnPinning:l,columnVisibility:d},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:c,onColumnPinningChange:u,onColumnVisibilityChange:f}),g=(0,h.useMemo)(()=>m.getRowModel().rows,[n,m.getState().columnPinning]),_=(0,h.useMemo)(()=>!t&&m.getRowModel().rows.length===0,[m,t]),y=(0,h.useMemo)(()=>({table:m,title:e,isEmpty:_,isFetching:t,totalRows:i,rowSelection:m.getState().rowSelection,columnPinning:m.getState().columnPinning,fetchMoreData:a}),[m,e,_,t,i,a,m.getState().columnVisibility,m.getState().rowSelection,m.getState().columnPinning]),b=(0,h.useMemo)(()=>({rowsLength:g.length,rows:g}),[g,m.getState().rowSelection,m.getState().columnPinning,m.getState().columnSizing]);return(0,p.jsx)(E.Provider,{value:y,children:(0,p.jsx)(O.Provider,{value:b,children:o})})},Y=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(c.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})=>(0,p.jsx)(`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`,children:e}),Z=()=>(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,{children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(X,{children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(X,{children:(0,p.jsx)(m.DownloadIcon,{})})]}),Q=({children:e})=>{let{title:t}=D();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=W,exports.UITableDateDisplay=b,exports.UITableFilter=K,exports.UITableFooter=U,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableStatisticDisplay=C,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,exports.UITableUserDataDisplay=w,exports.UITableWrapper=P;
2
2
  //# sourceMappingURL=index.cjs.map