@customafk/lunas-ui 0.2.9 → 0.2.11

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 (169) hide show
  1. package/dist/{alert-D3OOxNtK.d.mts → alert-C1YY0oUh.d.mts} +5 -5
  2. package/dist/{alert-W_Q1Gsld.d.cts → alert-CI3ANQHC.d.cts} +7 -7
  3. package/dist/{badge-YFen8D8o.d.mts → badge-DXeJVvRU.d.mts} +6 -6
  4. package/dist/{badge-Dm1IEgtT.d.cts → badge-PKOZAtox.d.cts} +6 -6
  5. package/dist/{button-Ckjev2AT.d.cts → button-BuQ09ya9.d.mts} +5 -5
  6. package/dist/{button-BnbtzQAN.d.mts → button-BwvdZSJE.d.cts} +5 -5
  7. package/dist/data-display/statistic.d.cts +2 -2
  8. package/dist/data-display/statistic.d.mts +4 -4
  9. package/dist/{dialog-DW1Axqio.d.cts → dialog-CRVNgVZU.d.cts} +12 -12
  10. package/dist/{dialog-DTtlGouy.d.mts → dialog-CiCeXhAu.d.mts} +12 -12
  11. package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
  12. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +24 -24
  13. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
  14. package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
  15. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  16. package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
  17. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  18. package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
  19. package/dist/features/descriptions/index.cjs +1 -1
  20. package/dist/features/descriptions/index.cjs.map +1 -1
  21. package/dist/features/descriptions/index.d.cts +34 -2
  22. package/dist/features/descriptions/index.d.mts +40 -8
  23. package/dist/features/descriptions/index.mjs +1 -1
  24. package/dist/features/descriptions/index.mjs.map +1 -1
  25. package/dist/features/search-modal/index.d.cts +2 -2
  26. package/dist/features/search-modal/index.d.mts +2 -2
  27. package/dist/features/tables/index.cjs +1 -1
  28. package/dist/features/tables/index.d.cts +45 -28
  29. package/dist/features/tables/index.d.mts +45 -28
  30. package/dist/features/tables/index.mjs +1 -1
  31. package/dist/features/tanstack-form/index.d.cts +1 -1
  32. package/dist/features/tanstack-form/index.d.mts +1 -1
  33. package/dist/{index-BIT9bkka.d.mts → index-C3SKVvaI.d.cts} +22 -22
  34. package/dist/{index-CO4_ENw7.d.cts → index-Dm0lp7bT.d.mts} +258 -258
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.cts +8 -8
  37. package/dist/index.d.mts +8 -8
  38. package/dist/index.mjs +1 -1
  39. package/dist/{input-CigimPoX.d.cts → input-BpZ_mAuD.d.cts} +2 -2
  40. package/dist/{input-BrM6EExy.d.mts → input-CoHHwUwI.d.mts} +4 -4
  41. package/dist/layouts/flex.d.cts +4 -4
  42. package/dist/layouts/flex.d.mts +2 -2
  43. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  44. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  45. package/dist/pages/FeatureFixing.d.cts +2 -2
  46. package/dist/pages/FeatureFixing.d.mts +2 -2
  47. package/dist/pages/NotAuthorized.d.cts +2 -2
  48. package/dist/pages/NotAuthorized.d.mts +2 -2
  49. package/dist/pages/NotFound.d.cts +2 -2
  50. package/dist/pages/NotFound.d.mts +2 -2
  51. package/dist/{sidebar-C27_pwLR.cjs → sidebar-CcJCnqLb.cjs} +2 -2
  52. package/dist/{sidebar-C27_pwLR.cjs.map → sidebar-CcJCnqLb.cjs.map} +1 -1
  53. package/dist/{sidebar-meLttL0V.mjs → sidebar-QmCQFs8h.mjs} +2 -2
  54. package/dist/{sidebar-meLttL0V.mjs.map → sidebar-QmCQFs8h.mjs.map} +1 -1
  55. package/dist/tables-Chn2pQSc.cjs +4 -0
  56. package/dist/tables-Chn2pQSc.cjs.map +1 -0
  57. package/dist/tables-eLIhswqW.mjs +4 -0
  58. package/dist/tables-eLIhswqW.mjs.map +1 -0
  59. package/dist/typography/paragraph.d.cts +4 -4
  60. package/dist/typography/paragraph.d.mts +4 -4
  61. package/dist/typography/title.d.cts +2 -2
  62. package/dist/typography/title.d.mts +2 -2
  63. package/dist/ui/alert-dialog.d.cts +12 -12
  64. package/dist/ui/alert-dialog.d.mts +12 -12
  65. package/dist/ui/alert.d.cts +1 -1
  66. package/dist/ui/alert.d.mts +1 -1
  67. package/dist/ui/aspect-ratio.d.cts +2 -2
  68. package/dist/ui/aspect-ratio.d.mts +2 -2
  69. package/dist/ui/avatar.d.cts +4 -4
  70. package/dist/ui/avatar.d.mts +4 -4
  71. package/dist/ui/badge.d.cts +1 -1
  72. package/dist/ui/badge.d.mts +1 -1
  73. package/dist/ui/breadcrumb.d.cts +8 -8
  74. package/dist/ui/breadcrumb.d.mts +8 -8
  75. package/dist/ui/button-group.d.cts +6 -6
  76. package/dist/ui/button-group.d.mts +6 -6
  77. package/dist/ui/button.d.cts +1 -1
  78. package/dist/ui/button.d.mts +1 -1
  79. package/dist/ui/calendar.d.cts +4 -4
  80. package/dist/ui/calendar.d.mts +4 -4
  81. package/dist/ui/card.d.cts +8 -8
  82. package/dist/ui/card.d.mts +8 -8
  83. package/dist/ui/carousel.d.cts +7 -7
  84. package/dist/ui/carousel.d.mts +7 -7
  85. package/dist/ui/checkbox.d.cts +2 -2
  86. package/dist/ui/checkbox.d.mts +2 -2
  87. package/dist/ui/collapsible.d.cts +4 -4
  88. package/dist/ui/collapsible.d.mts +4 -4
  89. package/dist/ui/command.d.cts +11 -11
  90. package/dist/ui/command.d.mts +11 -11
  91. package/dist/ui/context-menu.d.cts +16 -16
  92. package/dist/ui/context-menu.d.mts +16 -16
  93. package/dist/ui/dialog.d.cts +1 -1
  94. package/dist/ui/dialog.d.mts +1 -1
  95. package/dist/ui/drawer.d.cts +11 -11
  96. package/dist/ui/drawer.d.mts +11 -11
  97. package/dist/ui/dropdown-menu.d.cts +16 -16
  98. package/dist/ui/dropdown-menu.d.mts +16 -16
  99. package/dist/ui/empty.d.cts +9 -9
  100. package/dist/ui/empty.d.mts +9 -9
  101. package/dist/ui/field.d.cts +24 -24
  102. package/dist/ui/field.d.mts +24 -24
  103. package/dist/ui/file-uploader.d.cts +2 -2
  104. package/dist/ui/file-uploader.d.mts +2 -2
  105. package/dist/ui/form.d.cts +11 -11
  106. package/dist/ui/form.d.mts +11 -11
  107. package/dist/ui/hover-card.d.cts +4 -4
  108. package/dist/ui/hover-card.d.mts +4 -4
  109. package/dist/ui/input-otp.d.cts +5 -5
  110. package/dist/ui/input-otp.d.mts +5 -5
  111. package/dist/ui/input.d.cts +1 -1
  112. package/dist/ui/input.d.mts +1 -1
  113. package/dist/ui/inputs/search-input.d.cts +3 -3
  114. package/dist/ui/inputs/search-input.d.mts +3 -3
  115. package/dist/ui/item.d.mts +14 -14
  116. package/dist/ui/label.d.cts +2 -2
  117. package/dist/ui/menubar.d.cts +17 -17
  118. package/dist/ui/menubar.d.mts +17 -17
  119. package/dist/ui/multi-select.d.cts +2 -2
  120. package/dist/ui/multi-select.d.mts +3 -3
  121. package/dist/ui/navigation-menu.d.cts +11 -11
  122. package/dist/ui/navigation-menu.d.mts +9 -9
  123. package/dist/ui/pagination.d.cts +9 -9
  124. package/dist/ui/pagination.d.mts +9 -9
  125. package/dist/ui/popover.d.cts +6 -6
  126. package/dist/ui/popover.d.mts +6 -6
  127. package/dist/ui/progress.d.cts +2 -2
  128. package/dist/ui/progress.d.mts +2 -2
  129. package/dist/ui/radio-group.d.cts +3 -3
  130. package/dist/ui/radio-group.d.mts +3 -3
  131. package/dist/ui/resizable.d.cts +9 -9
  132. package/dist/ui/resizable.d.mts +9 -9
  133. package/dist/ui/scroll-area.d.cts +6 -6
  134. package/dist/ui/scroll-area.d.mts +6 -6
  135. package/dist/ui/select.d.cts +9 -9
  136. package/dist/ui/select.d.mts +9 -9
  137. package/dist/ui/separator.d.cts +2 -2
  138. package/dist/ui/separator.d.mts +2 -2
  139. package/dist/ui/sheet.d.cts +9 -9
  140. package/dist/ui/sheet.d.mts +9 -9
  141. package/dist/ui/sidebar.d.cts +26 -26
  142. package/dist/ui/sidebar.d.mts +26 -26
  143. package/dist/ui/skeleton.d.cts +2 -2
  144. package/dist/ui/skeleton.d.mts +2 -2
  145. package/dist/ui/slider.d.cts +2 -2
  146. package/dist/ui/slider.d.mts +2 -2
  147. package/dist/ui/sonner.d.cts +2 -2
  148. package/dist/ui/sonner.d.mts +2 -2
  149. package/dist/ui/spinner.d.cts +2 -2
  150. package/dist/ui/spinner.d.mts +2 -2
  151. package/dist/ui/switch.d.cts +2 -2
  152. package/dist/ui/switch.d.mts +2 -2
  153. package/dist/ui/table.d.cts +18 -18
  154. package/dist/ui/table.d.mts +18 -18
  155. package/dist/ui/tabs.d.cts +5 -5
  156. package/dist/ui/tabs.d.mts +5 -5
  157. package/dist/ui/textarea.d.cts +2 -2
  158. package/dist/ui/textarea.d.mts +2 -2
  159. package/dist/ui/toggle-group.d.cts +3 -3
  160. package/dist/ui/toggle-group.d.mts +3 -3
  161. package/dist/ui/toggle.d.cts +2 -2
  162. package/dist/ui/toggle.d.mts +4 -4
  163. package/dist/ui/tooltip.d.cts +5 -5
  164. package/dist/ui/tooltip.d.mts +5 -5
  165. package/package.json +1 -1
  166. package/dist/tables-D1JyNmcV.cjs +0 -2
  167. package/dist/tables-D1JyNmcV.cjs.map +0 -1
  168. package/dist/tables-DTazQIyy.mjs +0 -2
  169. package/dist/tables-DTazQIyy.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import * as react28 from "react";
2
- import * as react_jsx_runtime279 from "react/jsx-runtime";
1
+ import * as react1 from "react";
2
+ import * as react_jsx_runtime139 from "react/jsx-runtime";
3
3
 
4
4
  //#region packages/components/ui/table.d.ts
5
5
 
@@ -30,45 +30,45 @@ import * as react_jsx_runtime279 from "react/jsx-runtime";
30
30
  * </Table>
31
31
  * ```
32
32
  */
33
- declare const Table: react28.MemoExoticComponent<({
33
+ declare const Table: react1.MemoExoticComponent<({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<"table">) => react_jsx_runtime279.JSX.Element>;
36
+ }: React.ComponentProps<"table">) => react_jsx_runtime139.JSX.Element>;
37
37
  /** The `<thead>` element containing one or more header rows. */
38
- declare const TableHeader: react28.MemoExoticComponent<({
38
+ declare const TableHeader: react1.MemoExoticComponent<({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<"thead">) => react_jsx_runtime279.JSX.Element>;
41
+ }: React.ComponentProps<"thead">) => react_jsx_runtime139.JSX.Element>;
42
42
  /** The `<tbody>` element containing data rows with hover and selection styling. */
43
- declare const TableBody: react28.MemoExoticComponent<({
43
+ declare const TableBody: react1.MemoExoticComponent<({
44
44
  className,
45
45
  ...props
46
- }: React.ComponentProps<"tbody">) => react_jsx_runtime279.JSX.Element>;
46
+ }: React.ComponentProps<"tbody">) => react_jsx_runtime139.JSX.Element>;
47
47
  /** The `<tfoot>` element for summary or aggregate rows at the bottom of the table. */
48
- declare const TableFooter: react28.MemoExoticComponent<({
48
+ declare const TableFooter: react1.MemoExoticComponent<({
49
49
  className,
50
50
  ...props
51
- }: React.ComponentProps<"tfoot">) => react_jsx_runtime279.JSX.Element>;
51
+ }: React.ComponentProps<"tfoot">) => react_jsx_runtime139.JSX.Element>;
52
52
  /** A single `<tr>` row used inside TableHeader, TableBody, or TableFooter. */
53
- declare const TableRow: react28.MemoExoticComponent<({
53
+ declare const TableRow: react1.MemoExoticComponent<({
54
54
  className,
55
55
  ...props
56
- }: React.ComponentProps<"tr">) => react_jsx_runtime279.JSX.Element>;
56
+ }: React.ComponentProps<"tr">) => react_jsx_runtime139.JSX.Element>;
57
57
  /** A `<th>` column header cell with medium-weight text and left alignment. */
58
- declare const TableHead: react28.MemoExoticComponent<({
58
+ declare const TableHead: react1.MemoExoticComponent<({
59
59
  className,
60
60
  ...props
61
- }: React.ComponentProps<"th">) => react_jsx_runtime279.JSX.Element>;
61
+ }: React.ComponentProps<"th">) => react_jsx_runtime139.JSX.Element>;
62
62
  /** A standard `<td>` data cell used inside a TableRow. */
63
- declare const TableCell: react28.MemoExoticComponent<({
63
+ declare const TableCell: react1.MemoExoticComponent<({
64
64
  className,
65
65
  ...props
66
- }: React.ComponentProps<"td">) => react_jsx_runtime279.JSX.Element>;
66
+ }: React.ComponentProps<"td">) => react_jsx_runtime139.JSX.Element>;
67
67
  /** An accessible `<caption>` element displayed below the table. */
68
- declare const TableCaption: react28.MemoExoticComponent<({
68
+ declare const TableCaption: react1.MemoExoticComponent<({
69
69
  className,
70
70
  ...props
71
- }: React.ComponentProps<"caption">) => react_jsx_runtime279.JSX.Element>;
71
+ }: React.ComponentProps<"caption">) => react_jsx_runtime139.JSX.Element>;
72
72
  //#endregion
73
73
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
74
74
  //# sourceMappingURL=table.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime223 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime244 from "react/jsx-runtime";
2
2
  import { Tabs as Tabs$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tabs.d.ts
@@ -23,22 +23,22 @@ import { Tabs as Tabs$1 } from "radix-ui";
23
23
  declare function Tabs({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime223.JSX.Element;
26
+ }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime244.JSX.Element;
27
27
  /** Container that holds the row of `TabsTrigger` buttons with a muted background pill style. */
28
28
  declare function TabsList({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime223.JSX.Element;
31
+ }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime244.JSX.Element;
32
32
  /** Individual tab button that activates its associated `TabsContent` panel when clicked. */
33
33
  declare function TabsTrigger({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime223.JSX.Element;
36
+ }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime244.JSX.Element;
37
37
  /** Panel whose visibility is controlled by the active `TabsTrigger`; each panel must have a matching `value`. */
38
38
  declare function TabsContent({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime223.JSX.Element;
41
+ }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime244.JSX.Element;
42
42
  //#endregion
43
43
  export { Tabs, TabsContent, TabsList, TabsTrigger };
44
44
  //# sourceMappingURL=tabs.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime240 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime203 from "react/jsx-runtime";
2
2
  import { Tabs as Tabs$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tabs.d.ts
@@ -23,22 +23,22 @@ import { Tabs as Tabs$1 } from "radix-ui";
23
23
  declare function Tabs({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime240.JSX.Element;
26
+ }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime203.JSX.Element;
27
27
  /** Container that holds the row of `TabsTrigger` buttons with a muted background pill style. */
28
28
  declare function TabsList({
29
29
  className,
30
30
  ...props
31
- }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime240.JSX.Element;
31
+ }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime203.JSX.Element;
32
32
  /** Individual tab button that activates its associated `TabsContent` panel when clicked. */
33
33
  declare function TabsTrigger({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime240.JSX.Element;
36
+ }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime203.JSX.Element;
37
37
  /** Panel whose visibility is controlled by the active `TabsTrigger`; each panel must have a matching `value`. */
38
38
  declare function TabsContent({
39
39
  className,
40
40
  ...props
41
- }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime240.JSX.Element;
41
+ }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime203.JSX.Element;
42
42
  //#endregion
43
43
  export { Tabs, TabsContent, TabsList, TabsTrigger };
44
44
  //# sourceMappingURL=tabs.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime120 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime262 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/ui/textarea.d.ts
4
4
 
@@ -24,7 +24,7 @@ declare function Textarea({
24
24
  }: React.ComponentProps<'textarea'> & {
25
25
  /** Convenience callback that receives the raw string value on every change, bypassing the synthetic event. */
26
26
  onValueChange?: (value: string) => void;
27
- }): react_jsx_runtime120.JSX.Element;
27
+ }): react_jsx_runtime262.JSX.Element;
28
28
  //#endregion
29
29
  export { Textarea };
30
30
  //# sourceMappingURL=textarea.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime245 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime92 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/ui/textarea.d.ts
4
4
 
@@ -24,7 +24,7 @@ declare function Textarea({
24
24
  }: React.ComponentProps<'textarea'> & {
25
25
  /** Convenience callback that receives the raw string value on every change, bypassing the synthetic event. */
26
26
  onValueChange?: (value: string) => void;
27
- }): react_jsx_runtime245.JSX.Element;
27
+ }): react_jsx_runtime92.JSX.Element;
28
28
  //#endregion
29
29
  export { Textarea };
30
30
  //# sourceMappingURL=textarea.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { toggleVariants } from "./toggle.cjs";
2
- import * as react_jsx_runtime126 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime260 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { ToggleGroup as ToggleGroup$1 } from "radix-ui";
5
5
 
@@ -25,7 +25,7 @@ declare function ToggleGroup({
25
25
  size,
26
26
  children,
27
27
  ...props
28
- }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime126.JSX.Element;
28
+ }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime260.JSX.Element;
29
29
  /** A single item/button within a ToggleGroup that inherits the group's variant and size. */
30
30
  declare function ToggleGroupItem({
31
31
  className,
@@ -33,7 +33,7 @@ declare function ToggleGroupItem({
33
33
  variant,
34
34
  size,
35
35
  ...props
36
- }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime126.JSX.Element;
36
+ }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime260.JSX.Element;
37
37
  //#endregion
38
38
  export { ToggleGroup, ToggleGroupItem };
39
39
  //# sourceMappingURL=toggle-group.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import { toggleVariants } from "./toggle.mjs";
2
- import * as react_jsx_runtime275 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime243 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { ToggleGroup as ToggleGroup$1 } from "radix-ui";
5
5
 
@@ -25,7 +25,7 @@ declare function ToggleGroup({
25
25
  size,
26
26
  children,
27
27
  ...props
28
- }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime275.JSX.Element;
28
+ }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime243.JSX.Element;
29
29
  /** A single item/button within a ToggleGroup that inherits the group's variant and size. */
30
30
  declare function ToggleGroupItem({
31
31
  className,
@@ -33,7 +33,7 @@ declare function ToggleGroupItem({
33
33
  variant,
34
34
  size,
35
35
  ...props
36
- }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime275.JSX.Element;
36
+ }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime243.JSX.Element;
37
37
  //#endregion
38
38
  export { ToggleGroup, ToggleGroupItem };
39
39
  //# sourceMappingURL=toggle-group.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime199 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime263 from "react/jsx-runtime";
2
2
  import * as class_variance_authority_types11 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Toggle as Toggle$1 } from "radix-ui";
@@ -26,7 +26,7 @@ declare function Toggle({
26
26
  variant,
27
27
  size,
28
28
  ...props
29
- }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime199.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime263.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.cts.map
@@ -1,13 +1,13 @@
1
- import * as react_jsx_runtime244 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 { Toggle as Toggle$1 } from "radix-ui";
4
- import * as class_variance_authority_types11 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types8 from "class-variance-authority/types";
5
5
 
6
6
  //#region packages/components/ui/toggle.d.ts
7
7
  declare const toggleVariants: (props?: ({
8
8
  variant?: "default" | "outline" | null | undefined;
9
9
  size?: "sm" | "lg" | "default" | null | undefined;
10
- } & class_variance_authority_types11.ClassProp) | undefined) => string;
10
+ } & class_variance_authority_types8.ClassProp) | undefined) => string;
11
11
  /**
12
12
  * A two-state button that switches between pressed (`on`) and unpressed (`off`).
13
13
  *
@@ -26,7 +26,7 @@ declare function Toggle({
26
26
  variant,
27
27
  size,
28
28
  ...props
29
- }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime244.JSX.Element;
29
+ }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime138.JSX.Element;
30
30
  //#endregion
31
31
  export { Toggle, toggleVariants };
32
32
  //# sourceMappingURL=toggle.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime163 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime256 from "react/jsx-runtime";
2
2
  import { Tooltip as Tooltip$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tooltip.d.ts
@@ -19,7 +19,7 @@ import { Tooltip as Tooltip$1 } from "radix-ui";
19
19
  declare function TooltipProvider({
20
20
  delayDuration,
21
21
  ...props
22
- }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime163.JSX.Element;
22
+ }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime256.JSX.Element;
23
23
  /**
24
24
  * Floating label that reveals supplementary text when the user hovers or focuses its trigger element.
25
25
  *
@@ -38,18 +38,18 @@ declare function TooltipProvider({
38
38
  */
39
39
  declare function Tooltip({
40
40
  ...props
41
- }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime163.JSX.Element;
41
+ }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime256.JSX.Element;
42
42
  /** Element that opens the tooltip on hover/focus; use `asChild` to forward props to a custom child element. */
43
43
  declare function TooltipTrigger({
44
44
  ...props
45
- }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime163.JSX.Element;
45
+ }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime256.JSX.Element;
46
46
  /** Floating panel rendered in a portal that displays the tooltip text with a directional arrow. */
47
47
  declare function TooltipContent({
48
48
  className,
49
49
  sideOffset,
50
50
  children,
51
51
  ...props
52
- }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime163.JSX.Element;
52
+ }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime256.JSX.Element;
53
53
  //#endregion
54
54
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
55
55
  //# sourceMappingURL=tooltip.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime246 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime134 from "react/jsx-runtime";
2
2
  import { Tooltip as Tooltip$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/tooltip.d.ts
@@ -19,7 +19,7 @@ import { Tooltip as Tooltip$1 } from "radix-ui";
19
19
  declare function TooltipProvider({
20
20
  delayDuration,
21
21
  ...props
22
- }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime246.JSX.Element;
22
+ }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime134.JSX.Element;
23
23
  /**
24
24
  * Floating label that reveals supplementary text when the user hovers or focuses its trigger element.
25
25
  *
@@ -38,18 +38,18 @@ declare function TooltipProvider({
38
38
  */
39
39
  declare function Tooltip({
40
40
  ...props
41
- }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime246.JSX.Element;
41
+ }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime134.JSX.Element;
42
42
  /** Element that opens the tooltip on hover/focus; use `asChild` to forward props to a custom child element. */
43
43
  declare function TooltipTrigger({
44
44
  ...props
45
- }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime246.JSX.Element;
45
+ }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime134.JSX.Element;
46
46
  /** Floating panel rendered in a portal that displays the tooltip text with a directional arrow. */
47
47
  declare function TooltipContent({
48
48
  className,
49
49
  sideOffset,
50
50
  children,
51
51
  ...props
52
- }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime246.JSX.Element;
52
+ }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime134.JSX.Element;
53
53
  //#endregion
54
54
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
55
55
  //# sourceMappingURL=tooltip.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "UI library for Lunas Enterprise",
5
5
  "type": "module",
6
6
  "author": {
@@ -1,2 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./button-CwDT3m4m.cjs`),n=require(`./paragraph-DN85Huc4.cjs`),r=require(`./flex-BbbogTsZ.cjs`),i=require(`./date-a3RI5Pwo.cjs`),a=require(`./badge-uQ0pIZbQ.cjs`),o=require(`./tooltip-itUmYz9k.cjs`),s=require(`./avatar-CTS9-raY.cjs`),c=require(`./separator-BwZb12bh.cjs`),l=require(`./dropdown-menu-Ct9BLGfa.cjs`),u=require(`./progress-DE1FdQ1J.cjs`),d=require(`./checkbox-Di7ACavC.cjs`),f=require(`./spinner-rA8pMY6v.cjs`),p=require(`./resizable-DDPMwd28.cjs`),m=require(`./input-BMOYFJYM.cjs`);let h=require(`lucide-react`),g=require(`react`),_=require(`react/jsx-runtime`),v=require(`@customafk/react-toolkit/utils`),y=require(`@customafk/react-toolkit/color-hash`),b=require(`@tanstack/react-table`),x=require(`@tanstack/react-virtual`),ee=require(`@customafk/react-toolkit/hooks/useDebounceCallback`);const S=()=>(0,_.jsxs)(`div`,{className:`flex gap-0 text-text-positive-weak`,children:[(0,_.jsx)(h.MinusIcon,{size:16}),(0,_.jsx)(h.MinusIcon,{size:16})]}),te=({label:e,onClick:t,onRemove:n})=>e?n?(0,_.jsxs)(`div`,{className:`flex w-fit gap-x-0.5 rounded-full border border-border py-1 pr-2 pl-3 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:[e,(0,_.jsx)(`button`,{className:`cursor-pointer text-text-positive-weak hover:text-text-positive-strong`,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,_.jsx)(h.XIcon,{size:12})})]}):(0,_.jsx)(`button`,{className:`w-fit rounded-full border border-border px-3 py-1 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:e}):(0,_.jsx)(S,{}),ne=({value:e})=>e==null?(0,_.jsx)(S,{}):e===!1?(0,_.jsx)(`div`,{className:`text-danger-strong`,children:(0,_.jsx)(h.XIcon,{})}):(0,_.jsx)(`div`,{className:`text-success-strong`,children:(0,_.jsx)(h.CheckIcon,{})}),C=(0,g.memo)(({value:e,currency:t=`USD`,locale:n=`en-US`,display:r=`symbol`,size:i=`md`,colorize:a=!1})=>{let o=(0,g.useMemo)(()=>{let i=typeof e==`string`?Number(e.trim()):e;return i==null||Number.isNaN(i)||!Number.isFinite(i)?null:new Intl.NumberFormat(n,{style:`currency`,currency:t,currencyDisplay:r,minimumFractionDigits:2,maximumFractionDigits:2}).format(i)},[e,t,n,r]),s=(0,g.useMemo)(()=>{let t=typeof e==`string`?Number(e.trim()):e;return typeof t==`number`&&t<0},[e]);return o?(0,_.jsx)(`p`,{className:(0,v.cn)(`font-number tabular-nums`,i===`xs`&&`text-xs`,i===`sm`&&`text-sm`,i===`md`&&`text-base`,i===`lg`&&`text-lg`,i===`xl`&&`text-xl`,!a&&`text-text-positive`,a&&s&&`text-danger-strong`,a&&!s&&`text-success-strong`),children:o}):(0,_.jsx)(S,{})});C.displayName=`UITableCurrencyDisplay`;const w=({date:e})=>e==null?(0,_.jsx)(S,{}):(0,_.jsx)(o.r,{children:(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{asChild:!0,children:(0,_.jsx)(a.t,{className:`h-fit`,children:(0,_.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,_.jsx)(o.n,{className:`rounded px-2`,children:(0,_.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-medium text-text-negative text-xs`})})]})}),T=({content:e})=>e==null?(0,_.jsx)(S,{}):(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{children:(0,_.jsx)(n.t,{variant:`sm`,className:`line-clamp-2 whitespace-pre-line break-all`,children:e})}),(0,_.jsx)(o.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,_.jsx)(n.t,{variant:`xs`,className:`whitespace-pre-line text-wrap break-keep text-text-negative-weak`,children:e}),(0,_.jsxs)(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),E=({email:e,linkable:t=!0})=>{let[n,r]=(0,g.useState)(!1);return e?(0,_.jsx)(o.r,{children:(0,_.jsxs)(`div`,{className:`group flex items-center gap-x-1.5`,children:[(0,_.jsx)(h.MailIcon,{size:13,className:`shrink-0 text-text-positive-weak`}),t?(0,_.jsx)(`a`,{href:`mailto:${e}`,className:`truncate text-primary text-sm underline-offset-2 hover:underline`,onClick:e=>e.stopPropagation(),children:e}):(0,_.jsx)(`span`,{className:`truncate text-text-positive text-sm`,children:e}),(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{asChild:!0,children:(0,_.jsx)(`button`,{onClick:t=>{t.stopPropagation(),t.preventDefault(),navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},className:`shrink-0 cursor-pointer text-text-positive-weak opacity-0 transition-opacity group-hover:opacity-100 hover:text-text-positive`,children:n?(0,_.jsx)(h.CheckIcon,{size:13,className:`text-success-strong`}):(0,_.jsx)(h.CopyIcon,{size:13})})}),(0,_.jsx)(o.n,{children:n?`Copied!`:`Copy email`})]})]})}):(0,_.jsx)(S,{})},re=({items:e,maxVisible:t=3})=>{if(!e||e.length===0)return(0,_.jsx)(S,{});let n=e.slice(0,t),r=e.slice(t);return(0,_.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[n.map((e,t)=>(0,_.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border bg-muted-weak px-2 py-0.5 text-text-positive text-xs`,children:e},t)),r.length>0&&(0,_.jsx)(o.r,{children:(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{asChild:!0,children:(0,_.jsxs)(`span`,{className:`inline-flex cursor-default items-center rounded-full bg-primary-bg-subtle px-2 py-0.5 text-primary-intense text-xs`,children:[`+`,r.length,` more`]})}),(0,_.jsx)(o.n,{align:`start`,className:`flex max-w-64 flex-wrap gap-1 p-2`,children:r.map((e,t)=>(0,_.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border px-2 py-0.5 text-text-negative text-xs`,children:e},t))})]})})]})},D=({items:e=[]})=>(0,_.jsxs)(l.t,{children:[(0,_.jsx)(l.h,{asChild:!0,children:(0,_.jsx)(t.t,{size:`sm`,variant:`ghost`,color:`secondary`,className:`size-9 rounded-full`,children:(0,_.jsx)(h.MoreVerticalIcon,{})})}),(0,_.jsx)(l.r,{children:(0,_.jsx)(l.i,{children:e.map(e=>(0,_.jsx)(l.a,{className:`px-3`,onSelect:t=>{e.onClick(e.id),t.stopPropagation()},children:e.label},e.id))})})]}),O=({name:e})=>e?(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{children:(0,_.jsx)(n.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,_.jsx)(o.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,_.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,_.jsxs)(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):(0,_.jsx)(S,{}),ie=({href:e,label:t})=>(0,_.jsxs)(`a`,{href:e,target:`_blank`,className:`inline-flex items-center gap-1 truncate text-primary text-sm underline`,rel:`noopener noreferrer`,children:[(0,_.jsx)(`span`,{children:t||e}),(0,_.jsx)(h.ExternalLinkIcon,{size:14})]}),k=({value:e})=>(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{asChild:!0,children:(0,_.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,_.jsx)(o.n,{align:`start`,children:(0,_.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),A=(0,g.memo)(({value:e,showLabel:t=!0,successThreshold:n=70,warningThreshold:r=40})=>{if(e==null)return(0,_.jsx)(S,{});let i=Math.min(100,Math.max(0,e));return(0,_.jsxs)(`div`,{className:`flex w-full min-w-24 items-center gap-x-2`,children:[(0,_.jsx)(u.t,{value:i,className:(0,v.cn)(`flex-1`,i>=n?`[&>[data-slot=progress-indicator]]:bg-success`:i>=r?`[&>[data-slot=progress-indicator]]:bg-warning`:`[&>[data-slot=progress-indicator]]:bg-danger`)}),t&&(0,_.jsxs)(`span`,{className:`w-9 shrink-0 text-right font-number text-text-positive-weak text-xs tabular-nums`,children:[i,`%`]})]})});A.displayName=`UITableProgressDisplay`;const j=({title:e,onClick:n})=>(0,_.jsxs)(o.t,{children:[(0,_.jsx)(o.i,{children:(0,_.jsx)(t.t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:(0,g.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,_.jsx)(h.Trash2Icon,{})})}),(0,_.jsx)(o.n,{children:(0,_.jsx)(`p`,{children:e||`Remove item from list table`})})]}),ae=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},oe=(0,g.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:n,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l=0})=>{let u=(0,g.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),d=(0,g.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=ae(e,a,o)),t.toLocaleString(`en-US`,u)},[o,u,a]),f=(0,g.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:d(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`:d(t)}return`N/A`},[l,d]),p=(0,g.useMemo)(()=>e===`.`&&t===`,`?f:f.replace(/,/g,t).replace(/\./g,e),[f,e,t]);return p===`0`||p===`N/A`||!p?(0,_.jsx)(S,{}):(0,_.jsxs)(r.t,{padding:`none`,className:(0,v.cn)(`font-number text-lg text-text-positive tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[n,(0,_.jsx)(`p`,{children:p}),i]})});oe.displayName=`UITableStatisticDisplay`;const se=({value:e,colorMap:t,defaultColor:n=`muted`,variant:r=`soft`})=>e==null||e===``?(0,_.jsx)(S,{}):(0,_.jsx)(a.t,{variant:r,color:(t&&t[e])??n,className:`min-w-16 justify-center capitalize`,children:e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g,` `)}),ce=({uuid:e,username:t,email:i})=>(0,_.jsxs)(r.t,{wrap:!1,gap:`sm`,padding:`none`,children:[!e&&(0,_.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,_.jsx)(s.n,{className:`bg-muted-weak`,children:(0,_.jsx)(h.UserRoundIcon,{size:28,className:`text-text-negative`})})}),e&&(0,_.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,_.jsx)(s.n,{style:{backgroundColor:y.colorHashLight.hex(e)},children:(0,_.jsx)(h.UserRoundIcon,{size:28,className:`text-white`})})}),(0,_.jsxs)(r.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,_.jsx)(n.t,{className:`font-medium text-sm text-text-positive-weak`,children:t??`Unknown User`}),(0,_.jsx)(n.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]}),le=60,ue=60,de=20,fe=20,pe=(0,g.createContext)(null),me=()=>{let e=(0,g.use)(pe);if(!e)throw Error(`useTableInnerWrapperContext must be used within a TableInnerWrapperProvider`);return e},he=(0,g.createContext)(null),ge=()=>{let e=(0,g.use)(he);if(!e)throw Error(`useTableInnerTableContext must be used within a TableInnerTableProvider`);return e},_e=(0,g.createContext)(null),ve=()=>{let e=(0,g.use)(_e);if(!e)throw Error(`useTableHeaderRowContext must be used within a TableHeaderRowProvider`);return e},M=(0,g.createContext)(null),N=()=>{let e=(0,g.use)(M);if(!e)throw Error(`useTableBodyContext must be used within a TableBodyProvider`);return e},P=(0,g.createContext)(null),ye=()=>{let e=(0,g.use)(P);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);return e},F=(0,g.createContext)(null),I=()=>{let e=(0,g.use)(F);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},L=(0,g.memo)(({isPinned:e,onLeftPin:t,onRightPin:n,onUnpin:r,className:i})=>{let a=(0,g.useCallback)(()=>{t?.(`left`)},[t]),o=(0,g.useCallback)(()=>{n?.(`right`)},[n]),s=(0,g.useCallback)(()=>{r?.(!1)},[r]);return(0,_.jsxs)(l.t,{children:[(0,_.jsx)(l.h,{asChild:!0,children:(0,_.jsx)(`button`,{className:(0,v.cn)(`absolute right-2 z-10 p-0.5 opacity-0 bg-card`,`cursor-pointer rounded-full transition-all`,`text-text-positive-weak`,`[&>svg]:size-4`,`group-hover:opacity-100`,`hover:bg-muted-muted hover:text-text-positive`,i),children:(0,_.jsx)(h.EllipsisVerticalIcon,{})})}),(0,_.jsx)(l.r,{align:`end`,className:`w-64 p-4`,children:(0,_.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,_.jsx)(g.Activity,{mode:e?`visible`:`hidden`,children:(0,_.jsxs)(l.a,{onClick:s,children:[!!e&&`Unpin`,(0,_.jsx)(l.d,{children:(0,_.jsx)(h.PinOffIcon,{className:`size-4`})})]})}),(0,_.jsxs)(g.Activity,{mode:e?`hidden`:`visible`,children:[(0,_.jsxs)(l.a,{onClick:a,children:[e?`Unpin`:`Pin to Left`,(0,_.jsx)(l.d,{children:(0,_.jsx)(h.MoveLeftIcon,{className:`size-4`})})]}),(0,_.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Right`,(0,_.jsx)(l.d,{children:(0,_.jsx)(h.MoveRightIcon,{className:`size-4`})})]})]})]})})]})});L.displayName=`UITableHeadCellOption`;const R=(0,g.memo)(({isPinned:e,isAllRowsSelected:t,style:n,onToggleAllRowsSelected:r,...i})=>{let a=(0,g.useCallback)(e=>{r?.(!!e)},[r]);return(0,_.jsx)(`th`,{slot:`table-header-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:(0,v.cn)(e?`sticky`:`relative`),...i,children:(0,_.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,_.jsx)(d.t,{"aria-label":`Select All Rows`,checked:t,onCheckedChange:a})})})});R.displayName=`UITableHeadCellSelect`;const z=(0,g.memo)(({isEmpty:e,isFetching:t})=>!e&&!t?null:(0,_.jsxs)(`div`,{className:`sticky left-0 flex min-h-96 flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:[t&&(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,_.jsx)(f.t,{className:`size-12`}),(0,_.jsx)(`p`,{children:`Loading data...`})]}),e&&!t&&(0,_.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,_.jsx)(h.BoxIcon,{strokeWidth:1,size:48}),(0,_.jsx)(`p`,{children:`No data available`})]})]}));z.displayName=`UITableEmptyDisplay`;const be=(0,g.memo)(({className:e,children:t,...n})=>(0,_.jsx)(`div`,{slot:`table-wrapper`,className:(0,v.cn)(`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2`,e),...n,children:t}));be.displayName=`UITableWrapper`;const B=(0,g.memo)(({children:e,...t})=>{let{innerWrapperId:n}=me();return(0,_.jsx)(`div`,{id:n,slot:`table-inner-wrapper`,className:`relative size-full overflow-auto border-b border-b-border border-l border-l-border bg-card`,...t,children:e})});B.displayName=`UITableInnerWrapper`;const V=(0,g.memo)(({children:e,...t})=>{let{table:n,innerTableId:r,totalSize:i}=ge(),a=(0,g.useRef)(null);return(0,g.useEffect)(()=>{if(!a.current)return;let e=n.getFlatHeaders(),t=new ResizeObserver(t=>{requestAnimationFrame(()=>{let r=t[0].target;if(r instanceof HTMLTableElement){let i=t[0];if(!i)return;let a=i.contentRect.width,{left:o=[],right:s=[]}=n.getState().columnPinning,c=0,l=0,u=0,d=e.map(e=>{let{id:t}=e,n=t===`select`||t===`actions`,r=o.includes(t)||s.includes(t),i=e.getSize(),a=e.column.columnDef.maxSize;return n?(c+=60,{id:t,isFlex:!1,width:60}):r?(c+=i,{id:t,isFlex:!1,width:i}):e.column.columnDef.size||i!==150?(u+=i,{id:t,isFlex:!1,width:i}):(l++,{id:t,isFlex:!0,maxSize:a})}),f=a-c-u,p=l>0?Math.max(0,Math.floor(f/l)):0;d.forEach(e=>{if(e.isFlex){let t=e.maxSize?Math.min(p,e.maxSize):p;r.style.setProperty(`--header-${e.id}-size`,`${t}`),r.style.setProperty(`--col-${e.id}-size`,`${t}`),e.maxSize&&r.style.setProperty(`--col-${e.id}-maxSize`,`${e.maxSize}`)}else r.style.setProperty(`--header-${e.id}-size`,`${e.width}`),r.style.setProperty(`--col-${e.id}-size`,`${e.width}`)})}})});return t.observe(a.current),()=>t.disconnect()},[n.getState().columnSizingInfo,n.getState().columnSizing,n.getState().columnPinning]),(0,_.jsx)(`table`,{id:r,ref:a,slot:`table-inner-table`,className:`grid w-full table-fixed caption-bottom border-collapse border-spacing-0 flex-col content-start [&_tfoot_td]:border-t`,style:{minWidth:i},...t,children:e})});V.displayName=`UITableInnerTable`;const H=(0,g.memo)(({className:e,children:t,...n})=>(0,_.jsx)(`thead`,{slot:`table-head`,className:(0,v.cn)(`sticky top-0 z-20 h-9 w-full`,`grid select-none bg-muted-bg-subtle`,`border-b border-b-border shadow`,`font-medium text-[13px] text-text-positive-weak`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:inline-flex`,`[&_th]:items-center`,`[&_th]:transition-all`,`[&_th]:duration-300`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:border-r`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`,e),...n,children:t}));H.displayName=`UITableHead`;const U=(0,g.memo)(({headerGroup:e,className:t,...n})=>{let{isAllRowsSelected:r,columnPinningState:i,leftPinnedHeaders:a,rightPinnedHeaders:o,onToggleAllRowsSelected:s}=ve(),c=o[0]?.id,l=a[a.length-1]?.id;return(0,_.jsx)(`tr`,{slot:`table-head-row`,className:(0,v.cn)(`flex`,t),...n,children:e.headers.map((e,t)=>{let n=e.column.getIsVisible(),a=i.left?.includes(e.id)?`left`:i.right?.includes(e.id)?`right`:!1;return e.id===`select`?(0,_.jsx)(R,{isPinned:a,isAllRowsSelected:r,onToggleAllRowsSelected:s},e.id):(0,_.jsx)(W,{isVisible:n,isPinned:a,isFirstCell:e.id===c,isLastCell:e.id===l,isOptionsVisible:![`select`,`actions`].includes(e.id),headerId:e.id,headerColumn:e.column,colSpan:e.colSpan,onColumnPin:e.column.pin,onToggleVisibility:e.column.toggleVisibility,children:(0,b.flexRender)(e.column.columnDef.header,e.getContext())},`${e.id}-${t}`)})})});U.displayName=`UITableHeadRow`;const W=(0,g.memo)(({isVisible:e=!0,isPinned:t=!1,isFirstCell:n=!1,isLastCell:r=!1,isOptionsVisible:i=!0,headerId:a,headerColumn:o,className:s,children:c,onColumnPin:l,onToggleVisibility:u,...d})=>{let f=(0,g.useMemo)(()=>t?20:void 0,[t]),p=(0,g.useMemo)(()=>{let e=o?.getStart?.(`left`);return t===`left`&&typeof e==`number`?`${e}px`:void 0},[t,o]),m=(0,g.useMemo)(()=>{let e=o?.getAfter?.(`right`);return t===`right`&&typeof e==`number`?`${e}px`:void 0},[t,o]),h=(0,g.useMemo)(()=>`calc(var(--header-${a}-size) * 1px)`,[a]),y=(0,g.useMemo)(()=>o?.columnDef.minSize?`calc(var(--col-${a}-minSize) * 1px)`:void 0,[a,o]),b=(0,g.useMemo)(()=>o?.columnDef.maxSize?`calc(var(--col-${a}-maxSize) * 1px)`:void 0,[a,o]);return(0,_.jsxs)(`th`,{slot:`table-head-cell`,"data-pinned":t,"data-header":a,style:{zIndex:f,left:p,right:m,width:h,minWidth:y,maxWidth:b},className:(0,v.cn)(`group flex`,a===`actions`&&`border-r-0!`,t?`sticky`:`relative`,t===`left`&&r&&`border-r border-r-border`,t===`right`&&n&&`border-l border-l-border`,o?.columnDef.meta?.position===`center`&&`justify-center`,o?.columnDef.meta?.position===`end`&&`justify-end`,o?.columnDef.meta?.position===`start`&&`justify-start`,s),...d,children:[(0,_.jsx)(`div`,{className:`truncate px-4`,children:c}),i&&(0,_.jsx)(L,{isPinned:t,isVisible:e,onLeftPin:l,onRightPin:l,onUnpin:l})]})});W.displayName=`UITableHeadCell`;const G=(0,g.memo)(({height:e,className:t,children:n,...r})=>{let{isFetching:i,isEmpty:a}=N();return a||i?null:(0,_.jsx)(`tbody`,{slot:`table-body`,style:{height:e},className:(0,v.cn)(`relative w-full`,`grid`,`[&_tr]:absolute`,`[&_tr]:flex`,`[&_tr]:flex-none`,`[&_tr]:w-full`,`[&_tr]:cursor-pointer [&_tr]:focus:outline-none`,`[&_tr]:border-b [&_tr]:border-b-border`,`[&_td]:z-10`,`[&_td]:transition-all`,`[&_td]:duration-300`,`[&_td]:flex`,`[&_td]:flex-none`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[selected=true]:bg-muted-muted!`,`[&_td]:data-[selected=true]:hover:bg-muted-muted!`,`[&_td>div]:inline-flex`,`[&_td>div]:items-center`,`[&_td>div]:w-full`,`[&_td:not([data-pinned=false])]:z-20`,`[&_td:not([data-pinned=false])]:sticky`,`[&_td:not([data-pinned=false])]:bg-card`,t),...r,children:n})});G.displayName=`UITableBody`;const K=(0,g.memo)(({row:e,isSelected:t,virtualRowIndex:n,virtualRowStart:r,children:i,...a})=>{let{keyOfClickRow:o,isAllRowsSelected:s,columnPinningState:c,leftPinnedHeaders:l,rightPinnedHeaders:u,onClickRow:d}=ye(),f=(0,g.useMemo)(()=>c.left??[],[c]),p=(0,g.useMemo)(()=>c.right??[],[c]),m=(0,g.useMemo)(()=>u?.[0]?.id,[u]),h=(0,g.useMemo)(()=>l?.[l.length-1]?.id,[l]),v=(0,g.useCallback)(t=>{let r=o?e.original?.[o]:void 0;d?.(n,typeof r==`string`||typeof r==`number`?r:void 0),t.preventDefault(),t.stopPropagation()},[o,d,e,n]);return(0,_.jsx)(`tr`,{slot:`table-row`,"data-index":n,style:{transform:`translateY(${r}px)`},className:`group [&_td]:border-r [&_td]:border-r-border [&_td]:last:border-r-0`,onClick:v,...a,children:e.getVisibleCells().map((e,r)=>{let i=f.includes(e.column.id),a=p.includes(e.column.id),o=i?`left`:a?`right`:!1;return e.column.id===`actions`?(0,_.jsx)(J,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,virtualRowIndex:n,column:e.column,getContext:e.getContext},`${e.id}-${r}`):e.column.id===`select`?(0,_.jsx)(q,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isSelected:s||t,onToggleRowSelected:e.row.toggleSelected},`${e.id}-${r}`):(0,_.jsx)(Y,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isFirstCell:e.column.id===m,isLastCell:e.column.id===h,colId:e.column.id,position:e.column.columnDef.meta?.position??`start`,column:e.column,getContext:e.getContext},`${e.id}-${r}`)})})});K.displayName=`UITableRow`;const q=(0,g.memo)(({isPinned:e,isSelected:t=!1,className:n,onToggleRowSelected:r,...i})=>{let a=(0,g.useCallback)(e=>{r?.(!!e)},[r]);return(0,_.jsx)(`td`,{slot:`table-body-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:(0,v.cn)(`group-hover:bg-muted-bg-subtle!`,e?`sticky`:`relative`,n),...i,children:(0,_.jsx)(`div`,{"data-slot":`table-cell-inner`,className:`flex! w-full! items-center justify-center bg-transparent text-center align-middle`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,_.jsx)(d.t,{"aria-label":`Select Row`,checked:t,onCheckedChange:a})})})});q.displayName=`UITableCellSelect`;const J=(0,g.memo)(({virtualRowIndex:e,column:t,getContext:n,className:r,...i})=>{let a=(0,g.useMemo)(()=>(0,b.flexRender)(t?.columnDef.cell,n()),[t,n]);return(0,_.jsx)(`td`,{"data-col":`actions`,"data-cell":e,className:`sticky border-r-0! inset-y-0 right-0 z-50 flex items-center pr-4 group-hover:bg-muted-bg-subtle!`,...i,children:a})});J.displayName=`UITableCellActions`;const Y=(0,g.memo)(({isPinned:e=!1,isFirstCell:t=!1,isLastCell:n=!1,colId:r,position:i=`start`,column:a,getContext:o,...s})=>{let{innerTableId:c,table:l}=ge(),u=(0,g.useRef)(document.querySelector(`table[id="${c}"]`)),d=(0,g.useRef)(null),f=(0,g.useMemo)(()=>{let t=a?.getStart(`left`);return e===`left`&&typeof t==`number`?`${t}px`:void 0},[e,a]),p=(0,g.useMemo)(()=>{let t=a?.getAfter(`right`);return e===`right`&&typeof t==`number`?`${t}px`:void 0},[e,a]),m=(0,g.useMemo)(()=>`calc(var(--col-${r}-size) * 1px)`,[r]),h=(0,g.useMemo)(()=>a?.columnDef.minSize?`calc(var(--col-${r}-minSize) * 1px)`:void 0,[r,a]),y=(0,g.useMemo)(()=>a?.columnDef.maxSize?`calc(var(--col-${r}-maxSize) * 1px)`:void 0,[r,a]),x=(0,g.useMemo)(()=>(0,b.flexRender)(a?.columnDef.cell,o()),[a,o]);return(0,g.useEffect)(()=>{if(!d.current)return;let e=d.current.scrollWidth,t=a?.getSize();t&&e>t&&u.current instanceof HTMLTableElement&&typeof r==`string`&&a?.columnDef.meta?.fitContent&&l.setColumnSizing(t=>({...t,[r]:e+32}))},[r,a,l]),(0,_.jsx)(`td`,{slot:`table-body-cell`,"data-pinned":e,"data-lastcell":n||void 0,"data-firstcell":t||void 0,style:{left:f,right:p,width:m,minWidth:h,maxWidth:y},className:(0,v.cn)(`group-hover:bg-muted-bg-subtle!`,e===`left`&&n&&`border-r border-r-border`,e===`right`&&t&&`border-l border-l-border`),...s,children:(0,_.jsx)(`div`,{ref:d,slot:`table-body-cell-inner`,className:(0,v.cn)(`overflow-x-hidden`,i===`start`&&`justify-start`,i===`center`&&`justify-center`,i===`end`&&`justify-end`),children:x})})});Y.displayName=`UITableCell`;const xe=(0,g.memo)(({className:e,children:t,...n})=>(0,_.jsx)(`tfoot`,{slot:`table-footer`,className:(0,v.cn)(`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,e),...n,children:t}));xe.displayName=`UITableFooter`;const X=(0,g.memo)(({virtualRowIndex:e,virtualRowStart:t,fetchMoreData:n})=>{let{innerWrapperId:r}=me(),i=(0,g.useRef)(document.querySelector(`div[id="${r}"]`)),a=(0,g.useRef)(null),[o,s]=(0,g.useState)(`idle`),[c,l]=(0,g.useState)(0),u=(0,g.useCallback)(async()=>{try{s(`fetching`),await n?.(),s(`idle`)}catch(e){console.error(`Error fetching more data:`,e),s(`error`)}},[n]);return(0,g.useEffect)(()=>{if(!i.current)return;let e=new ResizeObserver(e=>{l(e[0].contentRect.width)});return e.observe(i.current),()=>e.disconnect()},[]),n?(0,_.jsx)(`tr`,{ref:a,"data-index":e,style:{transform:`translateY(${t}px)`,width:c},className:`sticky! left-0 h-10`,children:(0,_.jsx)(`td`,{className:`absolute left-0 flex w-full items-center justify-center text-xs`,children:(0,_.jsxs)(`button`,{type:`button`,disabled:o===`fetching`,className:(0,v.cn)(`flex cursor-pointer gap-x-0.5`,o===`fetching`&&`cursor-not-allowed`,o===`idle`&&`text-text-positive-weak hover:text-text-positive`,o===`error`&&`text-danger hover:text-danger-strong`),onClick:u,children:[o===`idle`&&(0,_.jsx)(h.ChevronDown,{className:`size-4`}),o===`fetching`&&(0,_.jsx)(f.t,{className:`size-4 animate-spin`}),o===`error`&&(0,_.jsx)(h.AlertTriangle,{className:`size-4 text-danger`}),o===`idle`&&`Load More`,o===`fetching`&&`Loading...`,o===`error`&&`Error! Retry?`]})})}):null});X.displayName=`UITableLoadMore`;const Se=()=>{let{table:e,isEmpty:t,isFetching:n,fetchMoreData:r}=I(),{rowSelectionState:i}=N(),a=(0,g.useRef)(null),{rows:o}=e.getRowModel(),s=(0,x.useVirtualizer)({count:o.length+1,estimateSize:()=>40,getScrollElement:()=>a.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2}),c=(0,g.useMemo)(()=>{let e=s.getTotalSize(),t=a.current?.clientHeight||0;return e<t?`${t}px`:`${e}px`},[s.getTotalSize()]);return(0,_.jsx)(p.r,{direction:`horizontal`,style:{direction:e.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border border-r border-r-border bg-slate-50 p-0 text-sm`,children:(0,_.jsx)(p.n,{className:`relative`,children:(0,_.jsxs)(B,{ref:a,children:[(0,_.jsxs)(V,{children:[(0,_.jsx)(H,{children:e.getHeaderGroups().map(e=>(0,_.jsx)(U,{headerGroup:e},e.id))}),(0,_.jsx)(G,{height:c,children:s.getVirtualItems().map(e=>{let t=o[e.index],n=Object.entries(i).some(([e,n])=>e===`${t?.id}`&&n);return t?(0,_.jsx)(K,{ref:s.measureElement,row:t,isSelected:n,virtualRowIndex:e.index,virtualRowStart:e.start},e.index):(0,_.jsx)(X,{virtualRowIndex:e.index,virtualRowStart:e.start,fetchMoreData:r},e.index)})})]}),(0,_.jsx)(z,{isEmpty:t,isFetching:n})]})})})},Ce=({checked:e,title:t,onCheckedChange:n})=>(0,_.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,_.jsx)(d.t,{checked:e,onCheckedChange:n}),(0,_.jsx)(`p`,{className:`text-sm`,children:t})]}),we=()=>{let{table:e}=I(),[n,r]=(0,g.useState)(null);return(0,_.jsx)(p.n,{defaultSize:25,className:(0,v.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,_.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,_.jsxs)(`div`,{className:`flex-1`,children:[(0,_.jsx)(g.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,_.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,_.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,_.jsx)(c.t,{}),(0,_.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,_.jsx)(Ce,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,_.jsx)(g.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,_.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,_.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,_.jsx)(h.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,_.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,_.jsxs)(`button`,{className:(0,v.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,_.jsx)(h.Columns4Icon,{size:18}),(0,_.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,_.jsx)(c.t,{}),(0,_.jsxs)(`button`,{className:(0,v.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,_.jsx)(h.ListFilterIcon,{size:18}),(0,_.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,_.jsx)(c.t,{})]})]})})},Te=(0,g.memo)(({innerWrapperId:e,children:t})=>{let n=(0,g.useMemo)(()=>({innerWrapperId:e}),[e]);return(0,_.jsx)(pe.Provider,{value:n,children:t})});Te.displayName=`UITableInnerWrapperProvider`;const Z=(0,g.memo)(({table:e,innerTableId:t,totalSize:n,children:r})=>{let i=(0,g.useMemo)(()=>({table:e,innerTableId:t,totalSize:n}),[e,t,n]);return(0,_.jsx)(he.Provider,{value:i,children:r})});Z.displayName=`UITableInnerTableProvider`;const Ee=(0,g.memo)(({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i,children:a})=>{let o=(0,g.useMemo)(()=>({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i}),[e,t,n,r,i]);return(0,_.jsx)(_e.Provider,{value:o,children:a})});Ee.displayName=`UITableHeadRowProvider`;const De=(0,g.memo)(({isFetching:e,isEmpty:t,rowSelectionState:n,children:r})=>{let i=(0,g.useMemo)(()=>({isFetching:e,isEmpty:t,rowSelectionState:n}),[e,t,n]);return(0,_.jsx)(M.Provider,{value:i,children:r})});De.displayName=`UITableBodyProvider`;const Oe=(0,g.memo)(({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a,children:o})=>{let s=(0,g.useMemo)(()=>({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a}),[e,t,n,r,i,a]);return(0,_.jsx)(P.Provider,{value:s,children:o})});Oe.displayName=`UITableRowProvider`;const ke=({title:e,isFetching:t=!1,isRefetching:n=!1,data:r,columns:i,totalRows:a,leftPinnedColumns:o=[],rightPinnedColumns:s=[],keyOfClickRow:c,onClickRow:l,onRowSelection:u,onColumnPinning:d,fetchMoreData:f,children:p})=>{let m=(0,g.useId)(),h=(0,g.useId)(),[v,y]=(0,g.useState)({}),[x,ee]=(0,g.useState)({right:s,left:[`select`,...o]}),[S,te]=(0,g.useState)({}),ne=(0,g.useCallback)(e=>(y(e),u?.(e instanceof Function?e(v):e),e),[v,u]),C=(0,g.useCallback)(e=>{ee(e),d?.(e instanceof Function?e(x):e)},[x,d]),w=(0,b.useReactTable)({data:r,columns:i,state:{rowSelection:v,columnPinning:x,expanded:S},defaultColumn:{enableResizing:!1,size:void 0,minSize:void 0,maxSize:void 0},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,autoResetAll:!1,autoResetExpanded:!1,autoResetPageIndex:!1,getSubRows:e=>e.subRows,getCoreRowModel:(0,b.getCoreRowModel)(),getGroupedRowModel:(0,b.getGroupedRowModel)(),getExpandedRowModel:(0,b.getExpandedRowModel)(),onRowSelectionChange:ne,onColumnPinningChange:C,onExpandedChange:te}),T=(0,g.useMemo)(()=>{let{rows:e}=w.getRowModel();return e},[w.getRowModel().rows,w.getState().columnPinning]),E=(0,g.useMemo)(()=>!t&&T.length===0,[T,t]),re=(0,g.useMemo)(()=>({title:e,table:w,isEmpty:E,isFetching:t,isRefetching:n,totalRows:a,fetchMoreData:f}),[e,w,E,n,t,a,f,w.getState().columnPinning,w.getState().expanded]),D=(0,g.useMemo)(()=>w.getState(),[w.getState()]),O=(0,g.useMemo)(()=>w.getIsAllRowsSelected(),[w.getIsAllRowsSelected()]),ie=(0,g.useMemo)(()=>D.rowSelection,[D.rowSelection]),k=(0,g.useMemo)(()=>D.columnPinning,[D.columnPinning]),A=(0,g.useMemo)(()=>w.getLeftHeaderGroups()[0]?.headers||[],[w.getState().columnPinning]),j=(0,g.useMemo)(()=>w.getRightHeaderGroups()[0]?.headers||[],[w.getState().columnPinning]),ae=(0,g.useMemo)(()=>w.getTotalSize(),[w.getTotalSize()]);return(0,_.jsx)(F.Provider,{value:re,children:(0,_.jsx)(Te,{innerWrapperId:m,children:(0,_.jsx)(Z,{table:w,innerTableId:h,totalSize:ae,children:(0,_.jsx)(Ee,{isAllRowsSelected:O,columnPinningState:k,leftPinnedHeaders:A,rightPinnedHeaders:j,onToggleAllRowsSelected:w.toggleAllRowsSelected,children:(0,_.jsx)(De,{isFetching:t,isEmpty:E,rowSelectionState:ie,children:(0,_.jsx)(Oe,{keyOfClickRow:c,isAllRowsSelected:O,columnPinningState:k,leftPinnedHeaders:A,rightPinnedHeaders:j,onClickRow:l,children:p})})})})})})},Ae=({onSearch:e,onChange:t,...n})=>{let r=(0,ee.useDebounceCallback)(t=>{e?.(t)},500);return(0,_.jsxs)(`div`,{className:`relative w-full max-w-80 flex-1`,children:[(0,_.jsx)(m.t,{...n,size:`lg`,type:`search`,placeholder:`Search records...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{t?.(e),r(e.target.value??``)}}),(0,_.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,_.jsx)(h.SearchIcon,{size:16})}),(0,_.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,_.jsx)(h.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]})},Q=({children:e,disabled:t,onClick:n})=>(0,_.jsx)(`button`,{type:`button`,disabled:t,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 disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,onClick:n,children:e}),je=({onCreate:e,onDownload:t,onRefresh:n})=>(0,_.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,_.jsx)(Q,{disabled:!e,onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,_.jsx)(h.CirclePlus,{})}),(0,_.jsx)(Q,{disabled:!n,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,_.jsx)(h.RefreshCwIcon,{})}),(0,_.jsx)(Q,{disabled:!t,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:(0,_.jsx)(h.DownloadIcon,{})})]}),$=({children:e})=>{let{title:t}=I();return(0,_.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,_.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,_.jsx)(`div`,{className:`flex w-full flex-1 justify-between gap-x-2`,children:e})]})};$.displayName=`TableTooltip`,Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return B}});
2
- //# sourceMappingURL=tables-D1JyNmcV.cjs.map