@customafk/lunas-ui 0.0.61 → 0.0.62
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.
- package/dist/{button-tIBg0Orc.d.ts → button-CwL7dO-u.d.ts} +3 -3
- package/dist/{button-CiiRwPo0.d.cts → button-DmNWC9JF.d.cts} +3 -3
- package/dist/{command-tdSE_rEO.d.cts → command-BQPzYASM.d.cts} +12 -12
- package/dist/{command-C3v9zAXg.d.ts → command-USUF3JZz.d.ts} +12 -12
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/{dialog-CIrv1yaX.d.cts → dialog-Bw_T5aco.d.cts} +12 -12
- package/dist/{dialog-B10MbJD8.d.ts → dialog-DRDVtDc5.d.ts} +12 -12
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +4 -4
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +4 -4
- package/dist/dialogs/form-dialog.d.ts +2 -2
- package/dist/dropdown-menu-CfHXIhdy.cjs +2 -0
- package/dist/dropdown-menu-CfHXIhdy.cjs.map +1 -0
- package/dist/dropdown-menu-t-SeMS1_.js +2 -0
- package/dist/dropdown-menu-t-SeMS1_.js.map +1 -0
- package/dist/forms/combobox-field.d.cts +2 -2
- package/dist/forms/date-field.d.cts +2 -2
- package/dist/forms/date-field.d.ts +2 -2
- package/dist/forms/form-wrapper.d.cts +2 -2
- package/dist/forms/form-wrapper.d.ts +2 -2
- package/dist/forms/multi-select-field.d.cts +2 -2
- package/dist/forms/multi-select-field.d.ts +2 -2
- package/dist/forms/number-field.d.cts +2 -2
- package/dist/forms/number-field.d.ts +2 -2
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.d.ts +2 -2
- package/dist/forms/select-field.d.cts +2 -2
- package/dist/forms/select-field.d.ts +2 -2
- package/dist/forms/switch-field.d.cts +2 -2
- package/dist/forms/switch-field.d.ts +2 -2
- package/dist/forms/text-field.d.cts +2 -2
- package/dist/forms/text-field.d.ts +2 -2
- package/dist/forms/textarea-field.d.cts +2 -2
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/{input-Btkk-D-H.d.cts → input-DRU216h-.d.cts} +3 -3
- package/dist/{input-CyBgjNII.d.ts → input-vLuNZody.d.ts} +3 -3
- package/dist/layouts/app-layout/index.d.cts +3 -3
- package/dist/layouts/app-layout/index.d.ts +3 -3
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/flex.d.ts +2 -2
- package/dist/{separator-B-yN9e9m.d.ts → separator-0LK1LCy9.d.ts} +3 -3
- package/dist/{separator-de4423bu.d.cts → separator-BJoqBpEK.d.cts} +3 -3
- package/dist/systems/google.cjs +2 -0
- package/dist/systems/google.cjs.map +1 -0
- package/dist/systems/google.d.cts +17 -0
- package/dist/systems/google.d.ts +17 -0
- package/dist/systems/google.js +2 -0
- package/dist/systems/google.js.map +1 -0
- package/dist/table/index.cjs +1 -1
- package/dist/table/index.d.cts +2 -2
- package/dist/table/index.d.ts +2 -2
- package/dist/table/index.js +1 -1
- package/dist/{toggle-DvJddJPj.d.cts → toggle-BLlf4Xgl.d.cts} +3 -3
- package/dist/{toggle-SBkrA8Qk.d.ts → toggle-CYHeyOUa.d.ts} +5 -5
- package/dist/{tooltip-DE_eohyj.d.cts → tooltip-Bj9r2ENW.d.ts} +2 -2
- package/dist/{tooltip-C30oHuY9.d.ts → tooltip-etVeWcFC.d.cts} +7 -7
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.ts +2 -2
- package/dist/typography/title.d.cts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.ts +4 -4
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/command.d.cts +2 -2
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/inputs/search-input.d.cts +1 -1
- package/dist/ui/inputs/search-input.d.ts +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.ts +2 -2
- package/dist/ui/navigation-menu.d.cts +9 -9
- package/dist/ui/navigation-menu.d.ts +9 -9
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/scroll-area.d.cts +3 -3
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sidebar.d.cts +28 -28
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/package.json +6 -1
- package/dist/dropdown-menu-B06fE_Uj.js +0 -2
- package/dist/dropdown-menu-B06fE_Uj.js.map +0 -1
- package/dist/dropdown-menu-BupXTsCa.cjs +0 -2
- package/dist/dropdown-menu-BupXTsCa.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/select-field.d.ts
|
|
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
27
27
|
isShowErrorMsg,
|
|
28
28
|
description,
|
|
29
29
|
className
|
|
30
|
-
}: Props<TFieldValues>) =>
|
|
30
|
+
}: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SelectField };
|
|
33
33
|
//# sourceMappingURL=select-field.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime43.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/text-field.d.ts
|
|
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
25
25
|
description,
|
|
26
26
|
className,
|
|
27
27
|
onValueChange
|
|
28
|
-
}: Props<TFieldValues>) =>
|
|
28
|
+
}: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { TextField };
|
|
31
31
|
//# sourceMappingURL=text-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/text-field.d.ts
|
|
@@ -25,7 +25,7 @@ declare const TextField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
25
25
|
description,
|
|
26
26
|
className,
|
|
27
27
|
onValueChange
|
|
28
|
-
}: Props<TFieldValues>) =>
|
|
28
|
+
}: Props<TFieldValues>) => react_jsx_runtime9.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { TextField };
|
|
31
31
|
//# sourceMappingURL=text-field.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/textarea-field.d.ts
|
|
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
21
21
|
description,
|
|
22
22
|
rows,
|
|
23
23
|
onValueChange
|
|
24
|
-
}: Props<TFieldValues>) =>
|
|
24
|
+
}: Props<TFieldValues>) => react_jsx_runtime4.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { TextareaField };
|
|
27
27
|
//# sourceMappingURL=textarea-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/textarea-field.d.ts
|
|
@@ -21,7 +21,7 @@ declare const TextareaField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
21
21
|
description,
|
|
22
22
|
rows,
|
|
23
23
|
onValueChange
|
|
24
|
-
}: Props<TFieldValues>) =>
|
|
24
|
+
}: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { TextareaField };
|
|
27
27
|
//# sourceMappingURL=textarea-field.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime125 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/input.d.ts
|
|
@@ -9,7 +9,7 @@ declare function Input({
|
|
|
9
9
|
...props
|
|
10
10
|
}: React.ComponentProps<'input'> & {
|
|
11
11
|
onValueChange?: (value: string) => void;
|
|
12
|
-
}):
|
|
12
|
+
}): react_jsx_runtime125.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Input };
|
|
15
|
-
//# sourceMappingURL=input-
|
|
15
|
+
//# sourceMappingURL=input-DRU216h-.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime116 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/input.d.ts
|
|
@@ -9,7 +9,7 @@ declare function Input({
|
|
|
9
9
|
...props
|
|
10
10
|
}: React.ComponentProps<'input'> & {
|
|
11
11
|
onValueChange?: (value: string) => void;
|
|
12
|
-
}):
|
|
12
|
+
}): react_jsx_runtime116.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Input };
|
|
15
|
-
//# sourceMappingURL=input-
|
|
15
|
+
//# sourceMappingURL=input-vLuNZody.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from "../../button-
|
|
2
|
-
import { Separator } from "../../separator-
|
|
3
|
-
import { TooltipContent } from "../../tooltip-
|
|
1
|
+
import { Button } from "../../button-DmNWC9JF.cjs";
|
|
2
|
+
import { Separator } from "../../separator-BJoqBpEK.cjs";
|
|
3
|
+
import { TooltipContent } from "../../tooltip-etVeWcFC.cjs";
|
|
4
4
|
import * as react_jsx_runtime259 from "react/jsx-runtime";
|
|
5
5
|
import React$1 from "react";
|
|
6
6
|
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from "../../button-
|
|
2
|
-
import { Separator } from "../../separator-
|
|
3
|
-
import { TooltipContent } from "../../tooltip-
|
|
1
|
+
import { Button } from "../../button-CwL7dO-u.js";
|
|
2
|
+
import { Separator } from "../../separator-0LK1LCy9.js";
|
|
3
|
+
import { TooltipContent } from "../../tooltip-Bj9r2ENW.js";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as react_jsx_runtime259 from "react/jsx-runtime";
|
|
6
6
|
import React$1 from "react";
|
package/dist/layouts/flex.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -28,7 +28,7 @@ declare const Flex: ({
|
|
|
28
28
|
align,
|
|
29
29
|
className,
|
|
30
30
|
children
|
|
31
|
-
}: React.PropsWithChildren<Props>) =>
|
|
31
|
+
}: React.PropsWithChildren<Props>) => react_jsx_runtime13.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Flex };
|
|
34
34
|
//# sourceMappingURL=flex.d.cts.map
|
package/dist/layouts/flex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@ declare const Flex: ({
|
|
|
28
28
|
align,
|
|
29
29
|
className,
|
|
30
30
|
children
|
|
31
|
-
}: React.PropsWithChildren<Props>) =>
|
|
31
|
+
}: React.PropsWithChildren<Props>) => react_jsx_runtime11.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Flex };
|
|
34
34
|
//# sourceMappingURL=flex.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Separator } from "radix-ui";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime169 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/separator.d.ts
|
|
5
5
|
declare function Separator$1({
|
|
@@ -7,7 +7,7 @@ declare function Separator$1({
|
|
|
7
7
|
orientation,
|
|
8
8
|
decorative,
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Separator.Root>):
|
|
10
|
+
}: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime169.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Separator$1 as Separator };
|
|
13
|
-
//# sourceMappingURL=separator-
|
|
13
|
+
//# sourceMappingURL=separator-0LK1LCy9.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime146 from "react/jsx-runtime";
|
|
2
2
|
import { Separator } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/separator.d.ts
|
|
@@ -7,7 +7,7 @@ declare function Separator$1({
|
|
|
7
7
|
orientation,
|
|
8
8
|
decorative,
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Separator.Root>):
|
|
10
|
+
}: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime146.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Separator$1 as Separator };
|
|
13
|
-
//# sourceMappingURL=separator-
|
|
13
|
+
//# sourceMappingURL=separator-BJoqBpEK.d.cts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`../chunk-CUT6urMc.cjs`),t=e.__toESM(require(`react/jsx-runtime`)),n=e.__toESM(require(`react`)),r=e.__toESM(require(`@react-oauth/google`)),i=({isDisabled:e,onGoogleLoginSuccess:t})=>{let i=(0,n.useCallback)(async e=>{!e.clientId||!e.credential||!e.select_by||await t?.({clientId:e.clientId,credential:e.credential,select_by:e.select_by})},[t]);return(0,r.useGoogleOneTapLogin)({disabled:e,use_fedcm_for_prompt:!1,onSuccess:i}),null},a=({clientId:e,isDisabled:n,onGoogleLoginSuccess:a,children:o})=>(0,t.jsxs)(r.GoogleOAuthProvider,{clientId:e,children:[o,(0,t.jsx)(i,{isDisabled:n,onGoogleLoginSuccess:a})]});var o=a;exports.Google=i,exports.default=o;
|
|
2
|
+
//# sourceMappingURL=google.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google.cjs","names":["Google: React.FC<GoogleProps>","ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>>","GoogleOAuthProvider"],"sources":["../../packages/components/systems/google.tsx"],"sourcesContent":["import { useCallback } from 'react'\n\nimport { type CredentialResponse, GoogleOAuthProvider, useGoogleOneTapLogin } from '@react-oauth/google'\n\ntype GoogleProps = {\n isDisabled: boolean\n onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>\n}\nexport const Google: React.FC<GoogleProps> = ({ isDisabled, onGoogleLoginSuccess }) => {\n const handleSignIn = useCallback(\n async (response: CredentialResponse) => {\n if (!response.clientId || !response.credential || !response.select_by) return\n await onGoogleLoginSuccess?.({\n clientId: response.clientId,\n credential: response.credential,\n select_by: response.select_by,\n })\n },\n [onGoogleLoginSuccess],\n )\n useGoogleOneTapLogin({\n disabled: isDisabled,\n use_fedcm_for_prompt: false,\n onSuccess: handleSignIn,\n })\n return null\n}\n\ntype ReactOAuthProps = {\n clientId: string\n isDisabled: boolean\n onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>\n}\nconst ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>> = ({ clientId, isDisabled, onGoogleLoginSuccess, children }) => {\n return (\n <GoogleOAuthProvider clientId={clientId}>\n {children}\n <Google isDisabled={isDisabled} onGoogleLoginSuccess={onGoogleLoginSuccess} />\n </GoogleOAuthProvider>\n )\n}\n\nexport default ReactOAuth\n"],"mappings":"oNAQaA,GAAiC,CAAE,aAAY,0BAA2B,CACrF,IAAM,GAAA,EAAA,EAAA,aACJ,KAAO,IAAiC,CAClC,CAAC,EAAS,UAAY,CAAC,EAAS,YAAc,CAAC,EAAS,WAC5D,MAAM,IAAuB,CAC3B,SAAU,EAAS,SACnB,WAAY,EAAS,WACrB,UAAW,EAAS,aAGxB,CAAC,IAOH,OALA,EAAA,EAAA,sBAAqB,CACnB,SAAU,EACV,qBAAsB,GACtB,UAAW,IAEN,MAQHC,GAAkE,CAAE,WAAU,aAAY,uBAAsB,eAElH,EAAA,EAAA,MAACC,EAAAA,oBAAAA,CAA8B,qBAC5B,GACD,EAAA,EAAA,KAAC,EAAA,CAAmB,aAAkC,4BAK5D,IAAA,EAAe"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CredentialResponse } from "@react-oauth/google";
|
|
2
|
+
|
|
3
|
+
//#region packages/components/systems/google.d.ts
|
|
4
|
+
type GoogleProps = {
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
declare const Google: React.FC<GoogleProps>;
|
|
9
|
+
type ReactOAuthProps = {
|
|
10
|
+
clientId: string;
|
|
11
|
+
isDisabled: boolean;
|
|
12
|
+
onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
declare const ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Google, ReactOAuth as default };
|
|
17
|
+
//# sourceMappingURL=google.d.cts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CredentialResponse } from "@react-oauth/google";
|
|
2
|
+
|
|
3
|
+
//#region packages/components/systems/google.d.ts
|
|
4
|
+
type GoogleProps = {
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
declare const Google: React.FC<GoogleProps>;
|
|
9
|
+
type ReactOAuthProps = {
|
|
10
|
+
clientId: string;
|
|
11
|
+
isDisabled: boolean;
|
|
12
|
+
onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
declare const ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Google, ReactOAuth as default };
|
|
17
|
+
//# sourceMappingURL=google.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useCallback as n}from"react";import{GoogleOAuthProvider as r,useGoogleOneTapLogin as i}from"@react-oauth/google";const a=({isDisabled:e,onGoogleLoginSuccess:t})=>{let r=n(async e=>{!e.clientId||!e.credential||!e.select_by||await t?.({clientId:e.clientId,credential:e.credential,select_by:e.select_by})},[t]);return i({disabled:e,use_fedcm_for_prompt:!1,onSuccess:r}),null},o=({clientId:n,isDisabled:i,onGoogleLoginSuccess:o,children:s})=>t(r,{clientId:n,children:[s,e(a,{isDisabled:i,onGoogleLoginSuccess:o})]});var s=o;export{a as Google,s as default};
|
|
2
|
+
//# sourceMappingURL=google.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google.js","names":["Google: React.FC<GoogleProps>","ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>>"],"sources":["../../packages/components/systems/google.tsx"],"sourcesContent":["import { useCallback } from 'react'\n\nimport { type CredentialResponse, GoogleOAuthProvider, useGoogleOneTapLogin } from '@react-oauth/google'\n\ntype GoogleProps = {\n isDisabled: boolean\n onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>\n}\nexport const Google: React.FC<GoogleProps> = ({ isDisabled, onGoogleLoginSuccess }) => {\n const handleSignIn = useCallback(\n async (response: CredentialResponse) => {\n if (!response.clientId || !response.credential || !response.select_by) return\n await onGoogleLoginSuccess?.({\n clientId: response.clientId,\n credential: response.credential,\n select_by: response.select_by,\n })\n },\n [onGoogleLoginSuccess],\n )\n useGoogleOneTapLogin({\n disabled: isDisabled,\n use_fedcm_for_prompt: false,\n onSuccess: handleSignIn,\n })\n return null\n}\n\ntype ReactOAuthProps = {\n clientId: string\n isDisabled: boolean\n onGoogleLoginSuccess?: (params: CredentialResponse) => void | Promise<void>\n}\nconst ReactOAuth: React.FC<React.PropsWithChildren<ReactOAuthProps>> = ({ clientId, isDisabled, onGoogleLoginSuccess, children }) => {\n return (\n <GoogleOAuthProvider clientId={clientId}>\n {children}\n <Google isDisabled={isDisabled} onGoogleLoginSuccess={onGoogleLoginSuccess} />\n </GoogleOAuthProvider>\n )\n}\n\nexport default ReactOAuth\n"],"mappings":"0KAQA,MAAaA,GAAiC,CAAE,aAAY,0BAA2B,CACrF,IAAM,EAAe,EACnB,KAAO,IAAiC,CAClC,CAAC,EAAS,UAAY,CAAC,EAAS,YAAc,CAAC,EAAS,WAC5D,MAAM,IAAuB,CAC3B,SAAU,EAAS,SACnB,WAAY,EAAS,WACrB,UAAW,EAAS,aAGxB,CAAC,IAOH,OALA,EAAqB,CACnB,SAAU,EACV,qBAAsB,GACtB,UAAW,IAEN,MAQHC,GAAkE,CAAE,WAAU,aAAY,uBAAsB,cAElH,EAAC,EAAA,CAA8B,qBAC5B,EACD,EAAC,EAAA,CAAmB,aAAkC,4BAK5D,IAAA,EAAe"}
|
package/dist/table/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../button-119IIVCy.cjs`),n=require(`../flex-C-4TxUDe.cjs`);require(`../paragraph-CI28eVP0.cjs`),require(`../input-Bt7b3-NW.cjs`);const r=require(`../select-S75hVYoR.cjs`),i=require(`../dropdown-menu-BupXTsCa.cjs`);require(`../scroll-area-CbABlDpy.cjs`);const a=require(`../table-Bz4GB66J.cjs`),o=require(`../add-new-LGex5x9J.cjs`),s=require(`../refresh-B2wYinm5.cjs`),c=require(`../search-input-BsnMUPtZ.cjs`),l=e.__toESM(require(`lucide-react`)),u=e.__toESM(require(`@customafk/react-toolkit/utils`)),d=e.__toESM(require(`react/jsx-runtime`)),f=e.__toESM(require(`react`)),p=e.__toESM(require(`@tanstack/react-table`)),m=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},h=({column:e})=>{let t=e.getIsSorted(),n={asc:(0,d.jsx)(l.ChevronUp,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:(0,d.jsx)(l.ChevronDown,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},g=({column:e})=>{let n=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?(0,d.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${n} column`,title:`Unpin ${n} column`,onClick:()=>e.pin(!1),children:(0,d.jsx)(l.PinOffIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):(0,d.jsxs)(i.DropdownMenu,{children:[(0,d.jsx)(i.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${n} column`,title:`Pin options for ${n} column`,children:(0,d.jsx)(l.EllipsisIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),(0,d.jsxs)(i.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`left`),children:[(0,d.jsx)(l.ArrowLeftToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`right`),children:[(0,d.jsx)(l.ArrowRightToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},_=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&(0,d.jsxs)(`div`,{className:(0,u.cn)(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[(0,d.jsx)(`span`,{className:`truncate`,children:(0,p.flexRender)(t.columnDef.header,e.getContext())}),(0,d.jsx)(h,{column:t})]}),!e.isPlaceholder&&(0,d.jsx)(g,{column:t})]})},v=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return(0,d.jsxs)(a.Table,{className:(0,u.cn)(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[(0,d.jsx)(a.TableHeader,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>(0,d.jsx)(a.TableRow,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableHead,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...m(e.column)},children:(0,d.jsx)(_,{header:e})},e.id)})},e.id))}),(0,d.jsx)(a.TableBody,{className:(0,u.cn)(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:`loading...`})}):(0,d.jsx)(f.default.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>(0,d.jsx)(a.TableRow,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableCell,{style:{...m(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:(0,p.flexRender)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:(0,d.jsxs)(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[(0,d.jsx)(l.PackagePlusIcon,{size:48,strokeWidth:2}),(0,d.jsx)(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})},y=({onAdd:e,onRefresh:t})=>(0,d.jsxs)(n.Flex,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[(0,d.jsx)(`div`,{className:`max-sm:flex-1`,children:(0,d.jsx)(c.SearchInput,{placeholder:`Search...`})}),(0,d.jsxs)(n.Flex,{wrap:!1,className:`flex-0 px-0`,children:[!!e&&(0,d.jsx)(o.AddNewBtn,{onClick:e}),(0,d.jsx)(s.RefreshBtn,{onClick:t})]})]});function b({filteredSelectedRowsLength:e,filteredRowsLength:n,pageSize:i,setPageSize:a,pageIndex:o=0,setPageIndex:s,previousPage:c,nextPage:u,canPreviousPage:f,canNextPage:p,pageCount:m=1}){"use no memo";return(0,d.jsxs)(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[(0,d.jsxs)(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,n,` row(s) selected.`]}),(0,d.jsxs)(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[(0,d.jsx)(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),(0,d.jsxs)(r.Select,{value:`${i}`,onValueChange:e=>{a?.(Number(e))},children:[(0,d.jsx)(r.SelectTrigger,{className:`h-8 w-18`,children:(0,d.jsx)(r.SelectValue,{placeholder:i})}),(0,d.jsx)(r.SelectContent,{side:`top`,children:[10,20,30,40,50].map(e=>(0,d.jsx)(r.SelectItem,{value:`${e}`,children:e},e))})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,o+1,` of `,m]})]}),(0,d.jsxs)(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:()=>s?.(0),disabled:!f,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to first page`}),(0,d.jsx)(l.ChevronsLeft,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:c,disabled:!f,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to previous page`}),(0,d.jsx)(l.ChevronLeft,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:u,disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to next page`}),(0,d.jsx)(l.ChevronRight,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:()=>{s?.(m-1)},disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to last page`}),(0,d.jsx)(l.ChevronsRight,{})]})]})]})]})}function x({data:e,totalCount:t,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:l}){"use no memo";let[u,m]=f.default.useState({}),[h,g]=f.default.useState([]),[_,x]=f.default.useState([]),[S,C]=f.default.useState({}),w=f.default.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),T=(0,p.useReactTable)({initialState:w,data:e,columns:i,rowCount:t,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:(0,p.getCoreRowModel)(),getPaginationRowModel:(0,p.getPaginationRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getFilteredRowModel:(0,p.getFilteredRowModel)(),getFacetedRowModel:(0,p.getFacetedRowModel)(),getFacetedUniqueValues:(0,p.getFacetedUniqueValues)(),getRowId:e=>e.id||e.uuid,state:{rowSelection:u,sorting:h,columnVisibility:S,columnFilters:_,...a?{pagination:a}:{}},onRowSelectionChange:m,onSortingChange:g,onColumnVisibilityChange:C,onColumnFiltersChange:x,...l?{onPaginationChange:l}:{}});return(0,d.jsxs)(n.Flex,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[(0,d.jsx)(y,{onAdd:o,onRefresh:s}),(0,d.jsxs)(n.Flex,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[(0,d.jsx)(v,{table:T,isLoading:r,onClickRow:c}),(0,d.jsx)(b,{pageSize:T.getState().pagination.pageSize,setPageSize:T.setPageSize,filteredSelectedRowsLength:T.getFilteredSelectedRowModel().rows.length,filteredRowsLength:T.getFilteredRowModel().rows.length,pageIndex:T.getState().pagination.pageIndex,setPageIndex:T.setPageIndex,previousPage:T.previousPage,nextPage:T.nextPage,canPreviousPage:T.getCanPreviousPage(),canNextPage:T.getCanNextPage(),pageCount:T.getPageCount()})]})]})}exports.Table=x;
|
|
1
|
+
const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../button-119IIVCy.cjs`),n=require(`../flex-C-4TxUDe.cjs`);require(`../paragraph-CI28eVP0.cjs`),require(`../input-Bt7b3-NW.cjs`);const r=require(`../select-S75hVYoR.cjs`),i=require(`../dropdown-menu-CfHXIhdy.cjs`);require(`../scroll-area-CbABlDpy.cjs`);const a=require(`../table-Bz4GB66J.cjs`),o=require(`../add-new-LGex5x9J.cjs`),s=require(`../refresh-B2wYinm5.cjs`),c=require(`../search-input-BsnMUPtZ.cjs`),l=e.__toESM(require(`lucide-react`)),u=e.__toESM(require(`@customafk/react-toolkit/utils`)),d=e.__toESM(require(`react/jsx-runtime`)),f=e.__toESM(require(`react`)),p=e.__toESM(require(`@tanstack/react-table`)),m=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},h=({column:e})=>{let t=e.getIsSorted(),n={asc:(0,d.jsx)(l.ChevronUp,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:(0,d.jsx)(l.ChevronDown,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},g=({column:e})=>{let n=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?(0,d.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${n} column`,title:`Unpin ${n} column`,onClick:()=>e.pin(!1),children:(0,d.jsx)(l.PinOffIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):(0,d.jsxs)(i.DropdownMenu,{children:[(0,d.jsx)(i.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(t.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${n} column`,title:`Pin options for ${n} column`,children:(0,d.jsx)(l.EllipsisIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),(0,d.jsxs)(i.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`left`),children:[(0,d.jsx)(l.ArrowLeftToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`right`),children:[(0,d.jsx)(l.ArrowRightToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},_=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&(0,d.jsxs)(`div`,{className:(0,u.cn)(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[(0,d.jsx)(`span`,{className:`truncate`,children:(0,p.flexRender)(t.columnDef.header,e.getContext())}),(0,d.jsx)(h,{column:t})]}),!e.isPlaceholder&&(0,d.jsx)(g,{column:t})]})},v=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return(0,d.jsxs)(a.Table,{className:(0,u.cn)(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[(0,d.jsx)(a.TableHeader,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>(0,d.jsx)(a.TableRow,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableHead,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...m(e.column)},children:(0,d.jsx)(_,{header:e})},e.id)})},e.id))}),(0,d.jsx)(a.TableBody,{className:(0,u.cn)(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:`loading...`})}):(0,d.jsx)(f.default.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>(0,d.jsx)(a.TableRow,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableCell,{style:{...m(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:(0,p.flexRender)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:(0,d.jsxs)(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[(0,d.jsx)(l.PackagePlusIcon,{size:48,strokeWidth:2}),(0,d.jsx)(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})},y=({onAdd:e,onRefresh:t})=>(0,d.jsxs)(n.Flex,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[(0,d.jsx)(`div`,{className:`max-sm:flex-1`,children:(0,d.jsx)(c.SearchInput,{placeholder:`Search...`})}),(0,d.jsxs)(n.Flex,{wrap:!1,className:`flex-0 px-0`,children:[!!e&&(0,d.jsx)(o.AddNewBtn,{onClick:e}),(0,d.jsx)(s.RefreshBtn,{onClick:t})]})]});function b({filteredSelectedRowsLength:e,filteredRowsLength:n,pageSize:i,setPageSize:a,pageIndex:o=0,setPageIndex:s,previousPage:c,nextPage:u,canPreviousPage:f,canNextPage:p,pageCount:m=1}){"use no memo";return(0,d.jsxs)(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[(0,d.jsxs)(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,n,` row(s) selected.`]}),(0,d.jsxs)(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[(0,d.jsx)(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),(0,d.jsxs)(r.Select,{value:`${i}`,onValueChange:e=>{a?.(Number(e))},children:[(0,d.jsx)(r.SelectTrigger,{className:`h-8 w-18`,children:(0,d.jsx)(r.SelectValue,{placeholder:i})}),(0,d.jsx)(r.SelectContent,{side:`top`,children:[10,20,30,40,50].map(e=>(0,d.jsx)(r.SelectItem,{value:`${e}`,children:e},e))})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,o+1,` of `,m]})]}),(0,d.jsxs)(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:()=>s?.(0),disabled:!f,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to first page`}),(0,d.jsx)(l.ChevronsLeft,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:c,disabled:!f,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to previous page`}),(0,d.jsx)(l.ChevronLeft,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:u,disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to next page`}),(0,d.jsx)(l.ChevronRight,{})]}),(0,d.jsxs)(t.Button,{variant:`outline`,color:`muted`,onClick:()=>{s?.(m-1)},disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to last page`}),(0,d.jsx)(l.ChevronsRight,{})]})]})]})]})}function x({data:e,totalCount:t,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:l}){"use no memo";let[u,m]=f.default.useState({}),[h,g]=f.default.useState([]),[_,x]=f.default.useState([]),[S,C]=f.default.useState({}),w=f.default.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),T=(0,p.useReactTable)({initialState:w,data:e,columns:i,rowCount:t,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:(0,p.getCoreRowModel)(),getPaginationRowModel:(0,p.getPaginationRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getFilteredRowModel:(0,p.getFilteredRowModel)(),getFacetedRowModel:(0,p.getFacetedRowModel)(),getFacetedUniqueValues:(0,p.getFacetedUniqueValues)(),getRowId:e=>e.id||e.uuid,state:{rowSelection:u,sorting:h,columnVisibility:S,columnFilters:_,...a?{pagination:a}:{}},onRowSelectionChange:m,onSortingChange:g,onColumnVisibilityChange:C,onColumnFiltersChange:x,...l?{onPaginationChange:l}:{}});return(0,d.jsxs)(n.Flex,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[(0,d.jsx)(y,{onAdd:o,onRefresh:s}),(0,d.jsxs)(n.Flex,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[(0,d.jsx)(v,{table:T,isLoading:r,onClickRow:c}),(0,d.jsx)(b,{pageSize:T.getState().pagination.pageSize,setPageSize:T.setPageSize,filteredSelectedRowsLength:T.getFilteredSelectedRowModel().rows.length,filteredRowsLength:T.getFilteredRowModel().rows.length,pageIndex:T.getState().pagination.pageIndex,setPageIndex:T.setPageIndex,previousPage:T.previousPage,nextPage:T.nextPage,canPreviousPage:T.getCanPreviousPage(),canNextPage:T.getCanNextPage(),pageCount:T.getPageCount()})]})]})}exports.Table=x;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/table/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ColumnDef, PaginationState } from "@tanstack/react-table";
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ declare function Table<T extends Record<string, unknown>>({
|
|
|
24
24
|
onRefresh,
|
|
25
25
|
onClickRow,
|
|
26
26
|
onPaginationChange
|
|
27
|
-
}: Props<T>):
|
|
27
|
+
}: Props<T>): react_jsx_runtime11.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Table };
|
|
30
30
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/table/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ColumnDef, PaginationState } from "@tanstack/react-table";
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ declare function Table<T extends Record<string, unknown>>({
|
|
|
24
24
|
onRefresh,
|
|
25
25
|
onClickRow,
|
|
26
26
|
onPaginationChange
|
|
27
|
-
}: Props<T>):
|
|
27
|
+
}: Props<T>): react_jsx_runtime12.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Table };
|
|
30
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/table/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as e}from"../button-CvQQTSka.js";import{Flex as t}from"../flex-BxBmZCWh.js";import"../paragraph-BwSskqDY.js";import"../input-i5Nm0R1X.js";import{Select as n,SelectContent as r,SelectItem as i,SelectTrigger as a,SelectValue as o}from"../select-_oIGH0ax.js";import{DropdownMenu as s,DropdownMenuContent as c,DropdownMenuItem as l,DropdownMenuTrigger as u}from"../dropdown-menu-
|
|
1
|
+
import{Button as e}from"../button-CvQQTSka.js";import{Flex as t}from"../flex-BxBmZCWh.js";import"../paragraph-BwSskqDY.js";import"../input-i5Nm0R1X.js";import{Select as n,SelectContent as r,SelectItem as i,SelectTrigger as a,SelectValue as o}from"../select-_oIGH0ax.js";import{DropdownMenu as s,DropdownMenuContent as c,DropdownMenuItem as l,DropdownMenuTrigger as u}from"../dropdown-menu-t-SeMS1_.js";import"../scroll-area-F3yESo8d.js";import{Table as d,TableBody as f,TableCell as p,TableHead as m,TableHeader as h,TableRow as g}from"../table-Fby8ksbK.js";import{AddNewBtn as _}from"../add-new-VnpqRAAB.js";import{RefreshBtn as v}from"../refresh-BMR_jPST.js";import{SearchInput as y}from"../search-input-tivZy8LE.js";import{ArrowLeftToLineIcon as b,ArrowRightToLineIcon as x,ChevronDown as S,ChevronLeft as C,ChevronRight as w,ChevronUp as T,ChevronsLeft as E,ChevronsRight as D,EllipsisIcon as O,PackagePlusIcon as k,PinOffIcon as A}from"lucide-react";import{cn as j}from"@customafk/react-toolkit/utils";import{jsx as M,jsxs as N}from"react/jsx-runtime";import P from"react";import{flexRender as F,getCoreRowModel as I,getFacetedRowModel as L,getFacetedUniqueValues as R,getFilteredRowModel as z,getPaginationRowModel as B,getSortedRowModel as V,useReactTable as H}from"@tanstack/react-table";const U=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},W=({column:e})=>{let t=e.getIsSorted(),n={asc:M(T,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:M(S,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},G=({column:t})=>{let n=t.columnDef.header;return t.getCanPin()?t.getIsPinned()?M(e,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${n} column`,title:`Unpin ${n} column`,onClick:()=>t.pin(!1),children:M(A,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):N(s,{children:[M(u,{asChild:!0,children:M(e,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${n} column`,title:`Pin options for ${n} column`,children:M(O,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),N(c,{align:`end`,children:[N(l,{onClick:()=>t.pin(`left`),children:[M(b,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),N(l,{onClick:()=>t.pin(`right`),children:[M(x,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},K=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return N(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&N(`div`,{className:j(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[M(`span`,{className:`truncate`,children:F(t.columnDef.header,e.getContext())}),M(W,{column:t})]}),!e.isPlaceholder&&M(G,{column:t})]})},q=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return N(d,{className:j(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[M(h,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>M(g,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return M(m,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:j(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...U(e.column)},children:M(K,{header:e})},e.id)})},e.id))}),M(f,{className:j(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?M(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:M(p,{children:`loading...`})}):M(P.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>M(g,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return M(p,{style:{...U(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:j(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:F(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):M(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:M(p,{children:N(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[M(k,{size:48,strokeWidth:2}),M(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})},J=({onAdd:e,onRefresh:n})=>N(t,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[M(`div`,{className:`max-sm:flex-1`,children:M(y,{placeholder:`Search...`})}),N(t,{wrap:!1,className:`flex-0 px-0`,children:[!!e&&M(_,{onClick:e}),M(v,{onClick:n})]})]});function Y({filteredSelectedRowsLength:t,filteredRowsLength:s,pageSize:c,setPageSize:l,pageIndex:u=0,setPageIndex:d,previousPage:f,nextPage:p,canPreviousPage:m,canNextPage:h,pageCount:g=1}){"use no memo";return N(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[N(`div`,{className:`text-text-positive flex-1 text-sm`,children:[t,` of `,s,` row(s) selected.`]}),N(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[N(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[M(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),N(n,{value:`${c}`,onValueChange:e=>{l?.(Number(e))},children:[M(a,{className:`h-8 w-18`,children:M(o,{placeholder:c})}),M(r,{side:`top`,children:[10,20,30,40,50].map(e=>M(i,{value:`${e}`,children:e},e))})]}),N(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,u+1,` of `,g]})]}),N(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[N(e,{variant:`outline`,color:`muted`,onClick:()=>d?.(0),disabled:!m,children:[M(`span`,{className:`sr-only`,children:`Go to first page`}),M(E,{})]}),N(e,{variant:`outline`,color:`muted`,onClick:f,disabled:!m,children:[M(`span`,{className:`sr-only`,children:`Go to previous page`}),M(C,{})]}),N(e,{variant:`outline`,color:`muted`,onClick:p,disabled:!h,children:[M(`span`,{className:`sr-only`,children:`Go to next page`}),M(w,{})]}),N(e,{variant:`outline`,color:`muted`,onClick:()=>{d?.(g-1)},disabled:!h,children:[M(`span`,{className:`sr-only`,children:`Go to last page`}),M(D,{})]})]})]})]})}function X({data:e,totalCount:n,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:l}){"use no memo";let[u,d]=P.useState({}),[f,p]=P.useState([]),[m,h]=P.useState([]),[g,_]=P.useState({}),v=P.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),y=H({initialState:v,data:e,columns:i,rowCount:n,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:I(),getPaginationRowModel:B(),getSortedRowModel:V(),getFilteredRowModel:z(),getFacetedRowModel:L(),getFacetedUniqueValues:R(),getRowId:e=>e.id||e.uuid,state:{rowSelection:u,sorting:f,columnVisibility:g,columnFilters:m,...a?{pagination:a}:{}},onRowSelectionChange:d,onSortingChange:p,onColumnVisibilityChange:_,onColumnFiltersChange:h,...l?{onPaginationChange:l}:{}});return N(t,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[M(J,{onAdd:o,onRefresh:s}),N(t,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[M(q,{table:y,isLoading:r,onClickRow:c}),M(Y,{pageSize:y.getState().pagination.pageSize,setPageSize:y.setPageSize,filteredSelectedRowsLength:y.getFilteredSelectedRowModel().rows.length,filteredRowsLength:y.getFilteredRowModel().rows.length,pageIndex:y.getState().pagination.pageIndex,setPageIndex:y.setPageIndex,previousPage:y.previousPage,nextPage:y.nextPage,canPreviousPage:y.getCanPreviousPage(),canNextPage:y.getCanNextPage(),pageCount:y.getPageCount()})]})]})}export{X as Table};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime230 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -14,7 +14,7 @@ declare function Toggle$1({
|
|
|
14
14
|
variant,
|
|
15
15
|
size,
|
|
16
16
|
...props
|
|
17
|
-
}: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>):
|
|
17
|
+
}: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime230.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { Toggle$1 as Toggle, toggleVariants };
|
|
20
|
-
//# sourceMappingURL=toggle-
|
|
20
|
+
//# sourceMappingURL=toggle-BLlf4Xgl.d.cts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
2
|
import { Toggle } from "radix-ui";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime211 from "react/jsx-runtime";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as class_variance_authority_types4 from "class-variance-authority/types";
|
|
6
6
|
|
|
7
7
|
//#region packages/components/ui/toggle.d.ts
|
|
8
8
|
declare const toggleVariants: (props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
11
|
-
} &
|
|
11
|
+
} & class_variance_authority_types4.ClassProp) | undefined) => string;
|
|
12
12
|
declare function Toggle$1({
|
|
13
13
|
className,
|
|
14
14
|
variant,
|
|
15
15
|
size,
|
|
16
16
|
...props
|
|
17
|
-
}: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>):
|
|
17
|
+
}: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime211.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { Toggle$1 as Toggle, toggleVariants };
|
|
20
|
-
//# sourceMappingURL=toggle-
|
|
20
|
+
//# sourceMappingURL=toggle-CYHeyOUa.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Tooltip } from "radix-ui";
|
|
1
2
|
import * as react_jsx_runtime206 from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import { Tooltip } from "radix-ui";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/tooltip.d.ts
|
|
6
6
|
declare function TooltipProvider({
|
|
@@ -21,4 +21,4 @@ declare function TooltipContent({
|
|
|
21
21
|
}: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime206.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
24
|
-
//# sourceMappingURL=tooltip-
|
|
24
|
+
//# sourceMappingURL=tooltip-Bj9r2ENW.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as react_jsx_runtime229 from "react/jsx-runtime";
|
|
1
|
+
import * as react_jsx_runtime231 from "react/jsx-runtime";
|
|
3
2
|
import React from "react";
|
|
3
|
+
import { Tooltip } from "radix-ui";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/tooltip.d.ts
|
|
6
6
|
declare function TooltipProvider({
|
|
7
7
|
delayDuration,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof Tooltip.Provider>):
|
|
9
|
+
}: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime231.JSX.Element;
|
|
10
10
|
declare function Tooltip$1({
|
|
11
11
|
...props
|
|
12
|
-
}: React.ComponentProps<typeof Tooltip.Root>):
|
|
12
|
+
}: React.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime231.JSX.Element;
|
|
13
13
|
declare function TooltipTrigger({
|
|
14
14
|
...props
|
|
15
|
-
}: React.ComponentProps<typeof Tooltip.Trigger>):
|
|
15
|
+
}: React.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime231.JSX.Element;
|
|
16
16
|
declare function TooltipContent({
|
|
17
17
|
className,
|
|
18
18
|
sideOffset,
|
|
19
19
|
children,
|
|
20
20
|
...props
|
|
21
|
-
}: React.ComponentProps<typeof Tooltip.Content>):
|
|
21
|
+
}: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime231.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
24
|
-
//# sourceMappingURL=tooltip-
|
|
24
|
+
//# sourceMappingURL=tooltip-etVeWcFC.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/paragraph.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Paragraph: ({
|
|
|
10
10
|
variant,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime14.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Paragraph };
|
|
16
16
|
//# sourceMappingURL=paragraph.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/paragraph.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Paragraph: ({
|
|
|
10
10
|
variant,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime29.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Paragraph };
|
|
16
16
|
//# sourceMappingURL=paragraph.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/title.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Title: ({
|
|
|
10
10
|
level,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime12.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Title };
|
|
16
16
|
//# sourceMappingURL=title.d.cts.map
|