@customafk/lunas-ui 0.1.49 → 0.1.51
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-C9Fox_eY.d.cts → button-DSIRUDkr.d.mts} +7 -7
- package/dist/{button-BXSZPuyu.d.mts → button-Dnv6snSX.d.cts} +6 -6
- package/dist/cards/simple-card.d.mts +2 -2
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.mjs +1 -1
- package/dist/data-display/empty.d.mts +2 -2
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.mjs +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.mjs +1 -1
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/{dialog-BCf1xwX2.d.mts → dialog-CSfCtj6U.d.cts} +12 -12
- package/dist/{dialog-CXelGCBo.d.cts → dialog-D059JHZf.d.mts} +12 -12
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +28 -28
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
- package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.mjs +1 -1
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/index.d.mts +2 -2
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.cjs.map +1 -1
- package/dist/features/tables/index.d.cts +11 -6
- package/dist/features/tables/index.d.mts +11 -6
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tables/index.mjs.map +1 -1
- package/dist/{input-Uu2SnxGU.d.cts → input-B2BPTk7v.d.mts} +4 -4
- package/dist/{input-Z4jZBjdJ.d.mts → input-DmchpCKC.d.cts} +4 -4
- package/dist/layouts/app-layout/index.cjs +1 -1
- package/dist/layouts/app-layout/index.d.cts +28 -28
- package/dist/layouts/app-layout/index.d.mts +3 -3
- package/dist/layouts/app-layout/index.mjs +1 -1
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/flex.d.mts +2 -2
- package/dist/layouts/service-layout/index.cjs +1 -1
- package/dist/layouts/service-layout/index.d.cts +13 -13
- package/dist/layouts/service-layout/index.d.mts +3 -3
- package/dist/layouts/service-layout/index.mjs +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.mts +2 -2
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/FeatureFixing.d.mts +2 -2
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotAuthorized.d.mts +2 -2
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.mts +2 -2
- package/dist/{separator-0M83lSK8.d.cts → separator-BSHoyMyN.d.mts} +3 -3
- package/dist/{separator-DJOq3oK_.d.mts → separator-aPjAYbm-.d.cts} +3 -3
- package/dist/{tooltip-CaWjms1V.d.mts → tooltip-CT8tMc9R.d.cts} +6 -6
- package/dist/{tooltip-NVcIKyMB.d.cts → tooltip-CV1g0GdH.d.mts} +6 -6
- package/dist/tooltip-DfGh67sm.mjs +2 -0
- package/dist/tooltip-DfGh67sm.mjs.map +1 -0
- package/dist/tooltip-a3HDmxog.cjs +2 -0
- package/dist/tooltip-a3HDmxog.cjs.map +1 -0
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.mts +2 -2
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.d.cts +5 -5
- package/dist/ui/alert.d.mts +7 -7
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.mts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.mts +4 -4
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.mts +8 -8
- package/dist/ui/button-group.d.cts +7 -7
- package/dist/ui/button-group.d.mts +7 -7
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.mts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.d.cts +13 -13
- package/dist/ui/field.d.mts +24 -24
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/form.d.cts +11 -11
- package/dist/ui/form.d.mts +7 -7
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.mts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.mts +5 -5
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.mts +3 -3
- package/dist/ui/item.d.cts +17 -17
- package/dist/ui/item.d.mts +17 -17
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.mts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.mts +3 -3
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.mts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.mts +9 -9
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.mts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.mts +4 -4
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.mts +11 -11
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.mts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.mts +30 -30
- package/dist/ui/sidebar.mjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.mts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.mts +2 -2
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +18 -18
- package/dist/ui/table.d.mts +18 -18
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/toggle.d.mts +4 -4
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.mts +1 -1
- package/dist/ui/tooltip.mjs +1 -1
- package/package.json +1 -1
- package/dist/tooltip-BDaKTFKI.mjs +0 -2
- package/dist/tooltip-BDaKTFKI.mjs.map +0 -1
- package/dist/tooltip-BimfNium.cjs +0 -2
- package/dist/tooltip-BimfNium.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as Button } from "../../../button-
|
|
2
|
-
import { t as Separator } from "../../../separator-
|
|
3
|
-
import { n as TooltipContent } from "../../../tooltip-
|
|
4
|
-
import * as
|
|
1
|
+
import { t as Button } from "../../../button-DSIRUDkr.mjs";
|
|
2
|
+
import { t as Separator } from "../../../separator-BSHoyMyN.mjs";
|
|
3
|
+
import { n as TooltipContent } from "../../../tooltip-CV1g0GdH.mjs";
|
|
4
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
@@ -28,7 +28,7 @@ declare function SidebarProvider({
|
|
|
28
28
|
defaultOpen?: boolean;
|
|
29
29
|
open?: boolean;
|
|
30
30
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
}):
|
|
31
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
32
32
|
declare function Sidebar({
|
|
33
33
|
side,
|
|
34
34
|
variant,
|
|
@@ -40,66 +40,66 @@ declare function Sidebar({
|
|
|
40
40
|
side?: 'left' | 'right';
|
|
41
41
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
42
42
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
43
|
-
}):
|
|
43
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
44
44
|
declare function DetailDialogSidebarTrigger({
|
|
45
45
|
className,
|
|
46
46
|
onClick,
|
|
47
47
|
...props
|
|
48
|
-
}: React.ComponentProps<typeof Button>):
|
|
48
|
+
}: React.ComponentProps<typeof Button>): react_jsx_runtime6.JSX.Element;
|
|
49
49
|
declare function DetailDialogSidebarRail({
|
|
50
50
|
className,
|
|
51
51
|
...props
|
|
52
|
-
}: React.ComponentProps<'button'>):
|
|
52
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime6.JSX.Element;
|
|
53
53
|
declare function SidebarInset({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<'main'>):
|
|
56
|
+
}: React.ComponentProps<'main'>): react_jsx_runtime6.JSX.Element;
|
|
57
57
|
declare function DetailDialogSidebarHeader({
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React.ComponentProps<'div'>):
|
|
60
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
61
61
|
declare function DetailDialogSidebarFooter({
|
|
62
62
|
className,
|
|
63
63
|
...props
|
|
64
|
-
}: React.ComponentProps<'div'>):
|
|
64
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
65
65
|
declare function DetailDialogSidebarSeparator({
|
|
66
66
|
className,
|
|
67
67
|
...props
|
|
68
|
-
}: React.ComponentProps<typeof Separator>):
|
|
68
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime6.JSX.Element;
|
|
69
69
|
declare function DetailDialogSidebarContent({
|
|
70
70
|
className,
|
|
71
71
|
...props
|
|
72
|
-
}: React.ComponentProps<'div'>):
|
|
72
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
73
73
|
declare function DetailDialogSidebarGroup({
|
|
74
74
|
className,
|
|
75
75
|
...props
|
|
76
|
-
}: React.ComponentProps<'div'>):
|
|
76
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
77
77
|
declare function DetailDialogSidebarGroupLabel({
|
|
78
78
|
className,
|
|
79
79
|
asChild,
|
|
80
80
|
...props
|
|
81
81
|
}: React.ComponentProps<'div'> & {
|
|
82
82
|
asChild?: boolean;
|
|
83
|
-
}):
|
|
83
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
84
84
|
declare function DetailDialogSidebarGroupAction({
|
|
85
85
|
className,
|
|
86
86
|
asChild,
|
|
87
87
|
...props
|
|
88
88
|
}: React.ComponentProps<'button'> & {
|
|
89
89
|
asChild?: boolean;
|
|
90
|
-
}):
|
|
90
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
91
91
|
declare function DetailDialogSidebarGroupContent({
|
|
92
92
|
className,
|
|
93
93
|
...props
|
|
94
|
-
}: React.ComponentProps<'div'>):
|
|
94
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
95
95
|
declare function DetailDialogSidebarMenu({
|
|
96
96
|
className,
|
|
97
97
|
...props
|
|
98
|
-
}: React.ComponentProps<'ul'>):
|
|
98
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime6.JSX.Element;
|
|
99
99
|
declare function DetailDialogSidebarMenuItem({
|
|
100
100
|
className,
|
|
101
101
|
...props
|
|
102
|
-
}: React.ComponentProps<'li'>):
|
|
102
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime6.JSX.Element;
|
|
103
103
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
104
104
|
variant?: "default" | "outline" | null | undefined;
|
|
105
105
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
@@ -116,7 +116,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
116
116
|
asChild?: boolean;
|
|
117
117
|
isActive?: boolean;
|
|
118
118
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
119
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
119
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime6.JSX.Element;
|
|
120
120
|
declare function DetailDialogSidebarMenuAction({
|
|
121
121
|
className,
|
|
122
122
|
asChild,
|
|
@@ -125,26 +125,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
125
125
|
}: React.ComponentProps<'button'> & {
|
|
126
126
|
asChild?: boolean;
|
|
127
127
|
showOnHover?: boolean;
|
|
128
|
-
}):
|
|
128
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
129
129
|
declare function DetailDialogSidebarMenuBadge({
|
|
130
130
|
className,
|
|
131
131
|
...props
|
|
132
|
-
}: React.ComponentProps<'div'>):
|
|
132
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime6.JSX.Element;
|
|
133
133
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
134
134
|
className,
|
|
135
135
|
showIcon,
|
|
136
136
|
...props
|
|
137
137
|
}: React.ComponentProps<'div'> & {
|
|
138
138
|
showIcon?: boolean;
|
|
139
|
-
}):
|
|
139
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
140
140
|
declare function DetailDialogSidebarMenuSub({
|
|
141
141
|
className,
|
|
142
142
|
...props
|
|
143
|
-
}: React.ComponentProps<'ul'>):
|
|
143
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime6.JSX.Element;
|
|
144
144
|
declare function DetailDialogSidebarMenuSubItem({
|
|
145
145
|
className,
|
|
146
146
|
...props
|
|
147
|
-
}: React.ComponentProps<'li'>):
|
|
147
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime6.JSX.Element;
|
|
148
148
|
declare function DetailDialogSidebarMenuSubButton({
|
|
149
149
|
asChild,
|
|
150
150
|
size,
|
|
@@ -155,7 +155,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
155
155
|
asChild?: boolean;
|
|
156
156
|
size?: 'sm' | 'md';
|
|
157
157
|
isActive?: boolean;
|
|
158
|
-
}):
|
|
158
|
+
}): react_jsx_runtime6.JSX.Element;
|
|
159
159
|
//#endregion
|
|
160
160
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
|
|
161
161
|
//# sourceMappingURL=sidebar.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../../../button.variants-DmUzMbB8.mjs";import{t as e}from"../../../button-DIEXNBpi.mjs";import{t}from"../../../skeleton-CvZncisJ.mjs";import{i as n,n as r,r as i,t as a}from"../../../tooltip-BDaKTFKI.mjs";import{t as o}from"../../../separator-CZM2q-Ac.mjs";import{i as s,o as c,r as l,s as u,t as d}from"../../../sheet-CUMpo5F_.mjs";import{cn as f}from"@customafk/react-toolkit/utils";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{MenuIcon as h}from"lucide-react";import{createContext as g,use as _,useCallback as v,useEffect as y,useMemo as b,useState as x}from"react";import{cva as S}from"class-variance-authority";import{Slot as C}from"radix-ui";import{useIsMobile as w}from"@customafk/react-toolkit/hooks/useMobile";const T=g(null);function E(){let e=_(T);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function D({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=w(),[l,u]=x(!1),[d,m]=x(e),h=t??d,g=v(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`detai_dialog_sidebar_state=${t}; path=/; max-age=604800`},[n,h]),_=v(()=>c?u(e=>!e):g(e=>!e),[c,g]);y(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_]);let S=h?`expanded`:`collapsed`,C=b(()=>({state:S,isMobile:c,toggleSidebar:_,open:h,setOpen:g,openMobile:l,setOpenMobile:u}),[S,c,h,g,l,_]);return p(T.Provider,{value:C,children:p(i,{delayDuration:0,children:p(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`20rem`,"--sidebar-width-icon":`3rem`,...a},className:f(`group/sidebar-wrapper flex h-full min-h-[85dvh] w-full items-start has-data-[variant=inset]:bg-sidebar`,r),...s,children:o})})})}function O({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{state:o,isMobile:h,openMobile:g,setOpenMobile:_}=E();return n===`none`?p(`div`,{"data-slot":`sidebar`,className:f(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):h?p(d,{open:g,onOpenChange:_,...a,children:m(l,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`z-20 hidden w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground shadow-nav md:flex [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[m(c,{className:`sr-only`,children:[p(u,{children:`Sidebar`}),p(s,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):m(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":o,"data-collapsible":o===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[p(`div`,{"data-slot":`sidebar-gap`,className:f(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),p(`div`,{"data-slot":`sidebar-container`,className:f(`absolute inset-y-0 z-20 hidden w-(--sidebar-width) shadow-nav transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,r),...a,children:p(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:f(`flex size-full flex-col shadow-nav`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function k({className:t,onClick:n,...r}){let{toggleSidebar:i}=E();return m(e,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`secondary`,size:`icon`,className:f(`size-10 rounded-full [&_svg]:size-6!`,t),onClick:e=>{n?.(e),i()},...r,children:[p(h,{}),p(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function A({className:e,...t}){let{toggleSidebar:n}=E();return p(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:f(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear sm:flex`,`after:absolute`,`after:inset-y-0`,`after:left-1/2 after:w-0.5`,`hover:after:bg-sidebar-border`,`group-data-[side=left]:-right-4`,`group-data-[side=right]:left-0`,`in-data-[side=left]:cursor-w-resize`,`in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize`,`[[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`group-data-[collapsible=offcanvas]:translate-x-0`,`group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function j({className:e,...t}){return p(`main`,{"data-slot":`sidebar-inset`,className:f(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2`,`md:peer-data-[variant=inset]:ml-0`,`md:peer-data-[variant=inset]:rounded-xl`,`md:peer-data-[variant=inset]:shadow-sm`,`md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function M({className:e,...t}){return p(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:f(`flex flex-col gap-2 p-2`,e),...t})}function N({className:e,...t}){return p(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:f(`flex flex-col gap-2 p-2`,e),...t})}function P({className:e,...t}){return p(o,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:f(`mx-2 w-auto bg-sidebar-border`,e),...t})}function F({className:e,...t}){return p(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:f(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,`group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return p(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:f(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function L({className:e,asChild:t=!1,...n}){return p(t?C.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:f(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,asChild:t=!1,...n}){return p(t?C.Slot:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:f(`absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform`,`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute`,`after:-inset-2`,`md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n})}function z({className:e,...t}){return p(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:f(`w-full text-sm`,e),...t})}function B({className:e,...t}){return p(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:f(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function V({className:e,...t}){return p(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:f(`group/menu-item relative`,e),...t})}const H=S([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:font-medium`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-8!`,`group-data-[collapsible=icon]:p-2!`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function U({asChild:e=!1,isActive:t=!1,variant:i=`default`,size:o=`default`,tooltip:s,className:c,...l}){let u=e?C.Slot:`button`,{state:d}=E(),h=p(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":o,"data-active":t,className:f(H({variant:i,size:o}),c),...l});return s?(typeof s==`string`&&(s={children:s}),m(a,{children:[p(n,{asChild:!0,children:h}),p(r,{side:`right`,align:`center`,hidden:d!==`collapsed`,...s})]})):h}function W({className:e,asChild:t=!1,showOnHover:n=!1,...r}){return p(t?C.Slot:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:f(`text-sidebar-foreground ring-sidebar-ring`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,n&&`$group-focus-within/menu-item:opacity-100`,n&&`group-hover/menu-item:opacity-100`,n&&`data-[state=open]:opacity-100 md:opacity-0`,e),...r})}function G({className:e,...t}){return p(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:f(`pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums`,`peer-hover/menu-button:text-sidebar-accent-foreground`,`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function K({className:e,showIcon:n=!1,...r}){let i=b(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return m(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:f(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[n&&p(t,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),p(t,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function q({className:e,...t}){return p(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:f(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function J({className:e,...t}){return p(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:f(`group/menu-sub-item relative`,e),...t})}function Y({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return p(e?C.Slot:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:f(`text-sidebar-foreground ring-sidebar-ring`,`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`disabled:pointer-events-none`,`disabled:opacity-50`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`[&>span:last-child]:truncate`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>svg]:text-sidebar-accent-foreground`,`data-[active=true]:bg-sidebar-accent`,`data-[active=true]:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:hidden`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}export{F as DetailDialogSidebarContent,N as DetailDialogSidebarFooter,I as DetailDialogSidebarGroup,R as DetailDialogSidebarGroupAction,z as DetailDialogSidebarGroupContent,L as DetailDialogSidebarGroupLabel,M as DetailDialogSidebarHeader,B as DetailDialogSidebarMenu,W as DetailDialogSidebarMenuAction,G as DetailDialogSidebarMenuBadge,U as DetailDialogSidebarMenuButton,V as DetailDialogSidebarMenuItem,K as DetailDialogSidebarMenuSkeleton,q as DetailDialogSidebarMenuSub,Y as DetailDialogSidebarMenuSubButton,J as DetailDialogSidebarMenuSubItem,A as DetailDialogSidebarRail,P as DetailDialogSidebarSeparator,k as DetailDialogSidebarTrigger,O as Sidebar,j as SidebarInset,D as SidebarProvider,E as useSidebar};
|
|
1
|
+
"use client";import"../../../button.variants-DmUzMbB8.mjs";import{t as e}from"../../../button-DIEXNBpi.mjs";import{t}from"../../../skeleton-CvZncisJ.mjs";import{i as n,n as r,r as i,t as a}from"../../../tooltip-DfGh67sm.mjs";import{t as o}from"../../../separator-CZM2q-Ac.mjs";import{i as s,o as c,r as l,s as u,t as d}from"../../../sheet-CUMpo5F_.mjs";import{cn as f}from"@customafk/react-toolkit/utils";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{MenuIcon as h}from"lucide-react";import{createContext as g,use as _,useCallback as v,useEffect as y,useMemo as b,useState as x}from"react";import{cva as S}from"class-variance-authority";import{Slot as C}from"radix-ui";import{useIsMobile as w}from"@customafk/react-toolkit/hooks/useMobile";const T=g(null);function E(){let e=_(T);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function D({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=w(),[l,u]=x(!1),[d,m]=x(e),h=t??d,g=v(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`detai_dialog_sidebar_state=${t}; path=/; max-age=604800`},[n,h]),_=v(()=>c?u(e=>!e):g(e=>!e),[c,g]);y(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_]);let S=h?`expanded`:`collapsed`,C=b(()=>({state:S,isMobile:c,toggleSidebar:_,open:h,setOpen:g,openMobile:l,setOpenMobile:u}),[S,c,h,g,l,_]);return p(T.Provider,{value:C,children:p(i,{delayDuration:0,children:p(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`20rem`,"--sidebar-width-icon":`3rem`,...a},className:f(`group/sidebar-wrapper flex h-full min-h-[85dvh] w-full items-start has-data-[variant=inset]:bg-sidebar`,r),...s,children:o})})})}function O({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{state:o,isMobile:h,openMobile:g,setOpenMobile:_}=E();return n===`none`?p(`div`,{"data-slot":`sidebar`,className:f(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):h?p(d,{open:g,onOpenChange:_,...a,children:m(l,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`z-20 hidden w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground shadow-nav md:flex [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[m(c,{className:`sr-only`,children:[p(u,{children:`Sidebar`}),p(s,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):m(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":o,"data-collapsible":o===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[p(`div`,{"data-slot":`sidebar-gap`,className:f(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),p(`div`,{"data-slot":`sidebar-container`,className:f(`absolute inset-y-0 z-20 hidden w-(--sidebar-width) shadow-nav transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,r),...a,children:p(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:f(`flex size-full flex-col shadow-nav`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function k({className:t,onClick:n,...r}){let{toggleSidebar:i}=E();return m(e,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`secondary`,size:`icon`,className:f(`size-10 rounded-full [&_svg]:size-6!`,t),onClick:e=>{n?.(e),i()},...r,children:[p(h,{}),p(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function A({className:e,...t}){let{toggleSidebar:n}=E();return p(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:f(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear sm:flex`,`after:absolute`,`after:inset-y-0`,`after:left-1/2 after:w-0.5`,`hover:after:bg-sidebar-border`,`group-data-[side=left]:-right-4`,`group-data-[side=right]:left-0`,`in-data-[side=left]:cursor-w-resize`,`in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize`,`[[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`group-data-[collapsible=offcanvas]:translate-x-0`,`group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function j({className:e,...t}){return p(`main`,{"data-slot":`sidebar-inset`,className:f(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2`,`md:peer-data-[variant=inset]:ml-0`,`md:peer-data-[variant=inset]:rounded-xl`,`md:peer-data-[variant=inset]:shadow-sm`,`md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function M({className:e,...t}){return p(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:f(`flex flex-col gap-2 p-2`,e),...t})}function N({className:e,...t}){return p(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:f(`flex flex-col gap-2 p-2`,e),...t})}function P({className:e,...t}){return p(o,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:f(`mx-2 w-auto bg-sidebar-border`,e),...t})}function F({className:e,...t}){return p(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:f(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,`group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return p(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:f(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function L({className:e,asChild:t=!1,...n}){return p(t?C.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:f(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,asChild:t=!1,...n}){return p(t?C.Slot:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:f(`absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform`,`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute`,`after:-inset-2`,`md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n})}function z({className:e,...t}){return p(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:f(`w-full text-sm`,e),...t})}function B({className:e,...t}){return p(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:f(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function V({className:e,...t}){return p(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:f(`group/menu-item relative`,e),...t})}const H=S([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:font-medium`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-8!`,`group-data-[collapsible=icon]:p-2!`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function U({asChild:e=!1,isActive:t=!1,variant:i=`default`,size:o=`default`,tooltip:s,className:c,...l}){let u=e?C.Slot:`button`,{state:d}=E(),h=p(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":o,"data-active":t,className:f(H({variant:i,size:o}),c),...l});return s?(typeof s==`string`&&(s={children:s}),m(a,{children:[p(n,{asChild:!0,children:h}),p(r,{side:`right`,align:`center`,hidden:d!==`collapsed`,...s})]})):h}function W({className:e,asChild:t=!1,showOnHover:n=!1,...r}){return p(t?C.Slot:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:f(`text-sidebar-foreground ring-sidebar-ring`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,n&&`$group-focus-within/menu-item:opacity-100`,n&&`group-hover/menu-item:opacity-100`,n&&`data-[state=open]:opacity-100 md:opacity-0`,e),...r})}function G({className:e,...t}){return p(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:f(`pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums`,`peer-hover/menu-button:text-sidebar-accent-foreground`,`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function K({className:e,showIcon:n=!1,...r}){let i=b(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return m(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:f(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[n&&p(t,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),p(t,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function q({className:e,...t}){return p(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:f(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function J({className:e,...t}){return p(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:f(`group/menu-sub-item relative`,e),...t})}function Y({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return p(e?C.Slot:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:f(`text-sidebar-foreground ring-sidebar-ring`,`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`focus-visible:ring-2`,`disabled:pointer-events-none`,`disabled:opacity-50`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`[&>span:last-child]:truncate`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`[&>svg]:text-sidebar-accent-foreground`,`data-[active=true]:bg-sidebar-accent`,`data-[active=true]:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:hidden`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}export{F as DetailDialogSidebarContent,N as DetailDialogSidebarFooter,I as DetailDialogSidebarGroup,R as DetailDialogSidebarGroupAction,z as DetailDialogSidebarGroupContent,L as DetailDialogSidebarGroupLabel,M as DetailDialogSidebarHeader,B as DetailDialogSidebarMenu,W as DetailDialogSidebarMenuAction,G as DetailDialogSidebarMenuBadge,U as DetailDialogSidebarMenuButton,V as DetailDialogSidebarMenuItem,K as DetailDialogSidebarMenuSkeleton,q as DetailDialogSidebarMenuSub,Y as DetailDialogSidebarMenuSubButton,J as DetailDialogSidebarMenuSubItem,A as DetailDialogSidebarRail,P as DetailDialogSidebarSeparator,k as DetailDialogSidebarTrigger,O as Sidebar,j as SidebarInset,D as SidebarProvider,E as useSidebar};
|
|
2
2
|
//# sourceMappingURL=sidebar.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`),require(`../../button-DtFiUaY7.cjs`),require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../flex-BYj-xYaw.cjs`),n=require(`../../date-DU8xM0hQ.cjs`);require(`../../tooltip-
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`),require(`../../button-DtFiUaY7.cjs`),require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../flex-BYj-xYaw.cjs`),n=require(`../../date-DU8xM0hQ.cjs`);require(`../../tooltip-a3HDmxog.cjs`);const r=require(`../../typography/title.cjs`);require(`../../separator-C3ip6sbh.cjs`),require(`../../sheet-5MJRtrfG.cjs`);const i=require(`./components/sidebar.cjs`);let a=require(`react/jsx-runtime`),o=require(`lucide-react`),s=require(`radix-ui`);const c=({open:e,isLoading:c,title:l,createdAt:u,onOpenChange:d,sidebar:f,children:p})=>{let{content:m,footer:h}=f||{};return(0,a.jsx)(s.Dialog.Root,{"data-slot":`detail-dialog`,open:e,onOpenChange:d,children:(0,a.jsxs)(s.Dialog.Portal,{"data-slot":`detail-dialog-portal`,children:[(0,a.jsx)(s.Dialog.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),(0,a.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:(0,a.jsxs)(s.Dialog.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,a.jsxs)(i.SidebarProvider,{children:[(0,a.jsxs)(i.Sidebar,{collapsible:`icon`,children:[(0,a.jsx)(i.DetailDialogSidebarHeader,{children:(0,a.jsx)(i.DetailDialogSidebarMenu,{children:(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsxs)(i.DetailDialogSidebarMenuButton,{size:`lg`,tabIndex:-1,children:[(0,a.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,a.jsx)(o.CatIcon,{size:16})}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsx)(`span`,{className:`truncate font-medium`,children:f?.title||`Detail Dialog`}),(0,a.jsx)(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),(0,a.jsx)(i.DetailDialogSidebarContent,{children:m}),(0,a.jsx)(i.DetailDialogSidebarFooter,{children:(0,a.jsxs)(i.DetailDialogSidebarMenu,{children:[(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:h}),(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),(0,a.jsx)(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:(0,a.jsxs)(t.t,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[(0,a.jsxs)(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[(0,a.jsx)(i.DetailDialogSidebarTrigger,{}),(0,a.jsxs)(t.t,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[(0,a.jsx)(r.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:l||`Detail Dialog`}),!!u&&(0,a.jsxs)(t.t,{padding:`none`,className:`relative text-text-positive-weak`,children:[(0,a.jsx)(o.CalendarIcon,{size:12,className:`absolute top-0.5 md:top-1`}),(0,a.jsx)(n.t,{showTime:!0,showHoliday:!0,date:u,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),c?(0,a.jsx)(t.t,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:(0,a.jsx)(`div`,{className:`loader`})}):(0,a.jsx)(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted`,children:p})]})})]}),(0,a.jsx)(s.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,a.jsx)(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:(0,a.jsx)(o.XIcon,{size:24})})})]})})]})})};exports.DetailDialog=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../button.variants-DmUzMbB8.mjs";import"../../button-DIEXNBpi.mjs";import"../../skeleton-CvZncisJ.mjs";import{t as e}from"../../flex-BGQqaHKh.mjs";import{t}from"../../date-Vl-tZLuD.mjs";import"../../tooltip-
|
|
1
|
+
import"../../button.variants-DmUzMbB8.mjs";import"../../button-DIEXNBpi.mjs";import"../../skeleton-CvZncisJ.mjs";import{t as e}from"../../flex-BGQqaHKh.mjs";import{t}from"../../date-Vl-tZLuD.mjs";import"../../tooltip-DfGh67sm.mjs";import{Title as n}from"../../typography/title.mjs";import"../../separator-CZM2q-Ac.mjs";import"../../sheet-CUMpo5F_.mjs";import{DetailDialogSidebarContent as r,DetailDialogSidebarFooter as i,DetailDialogSidebarHeader as a,DetailDialogSidebarMenu as o,DetailDialogSidebarMenuButton as s,DetailDialogSidebarMenuItem as c,DetailDialogSidebarTrigger as l,Sidebar as u,SidebarProvider as d}from"./components/sidebar.mjs";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CalendarIcon as m,CatIcon as h,XIcon as g}from"lucide-react";import{Dialog as _}from"radix-ui";const v=({open:v,isLoading:y,title:b,createdAt:x,onOpenChange:S,sidebar:C,children:w})=>{let{content:T,footer:E}=C||{};return f(_.Root,{"data-slot":`detail-dialog`,open:v,onOpenChange:S,children:p(_.Portal,{"data-slot":`detail-dialog-portal`,children:[f(_.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),f(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:p(_.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[p(d,{children:[p(u,{collapsible:`icon`,children:[f(a,{children:f(o,{children:f(c,{children:p(s,{size:`lg`,tabIndex:-1,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:16})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:C?.title||`Detail Dialog`}),f(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),f(r,{children:T}),f(i,{children:p(o,{children:[f(c,{children:E}),f(c,{children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),f(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:p(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[p(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[f(l,{}),p(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[f(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:b||`Detail Dialog`}),!!x&&p(e,{padding:`none`,className:`relative text-text-positive-weak`,children:[f(m,{size:12,className:`absolute top-0.5 md:top-1`}),f(t,{showTime:!0,showHoliday:!0,date:x,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),y?f(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:f(`div`,{className:`loader`})}):f(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted`,children:w})]})})]}),f(_.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:f(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:f(g,{size:24})})})]})})]})})};export{v as DetailDialog};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/features/search-modal/index.d.ts
|
|
4
|
-
declare const SearchModal: () =>
|
|
4
|
+
declare const SearchModal: () => react_jsx_runtime2.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchModal };
|
|
7
7
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/features/search-modal/index.d.ts
|
|
4
|
-
declare const SearchModal: () =>
|
|
4
|
+
declare const SearchModal: () => react_jsx_runtime4.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchModal };
|
|
7
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-BimfNium.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../separator-C3ip6sbh.cjs`),l=require(`../../dropdown-menu-BuyuU6uF.cjs`),u=require(`../../resizable-BS63Xwia.cjs`),d=require(`../../input-qnlHzDDm.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=({date:e})=>(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),x=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 whitespace-pre-line text-wrap break-keep`,children:e})]}),S=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),C=({title:e,onClick:n})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(t.t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:(0,h.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,p.jsx)(m.Trash2Icon,{})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(`p`,{children:e||`Remove item from list table`})})]}),w=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l})=>{let u=(0,h.useCallback)((e,t)=>{let n=10**t;switch(o){case`floor`:return Math.floor(e*n)/n;case`ceil`:return Math.ceil(e*n)/n;default:return Math.round(e*n)/n}},[o]),d=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&(s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a),e},[a,s]),m=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=u(e,a)),t.toLocaleString(`en-US`,d)},[u,d,a]),g=(0,h.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:m(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:m(t)}return`N/A`},[l,m]),_=(0,h.useMemo)(()=>e===`.`&&t===`,`?g:g.replace(/,/g,t).replace(/\./g,e),[g,e,t]);return(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:_}),i]})});w.displayName=`UITableStatisticDisplay`;const T=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function E({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const D=(0,h.createContext)(null),O=()=>{let e=(0,h.use)(D);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},k=(0,h.createContext)(null),A=()=>{let e=(0,h.use)(k);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},j=60,M=20,N=20,P=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0}},F=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),I=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));I.displayName=`TableHeader`;const L=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));L.displayName=`TableHeaderRow`;const R=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=P(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:(0,f.cn)(t?`sticky`:`relative`),...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(E,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`,t?`sticky`:`relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(z,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},z=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(l.t,{children:[(0,p.jsx)(l.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(l.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(l.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(l.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(l.u,{}),(0,p.jsx)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(l.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},B=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),V=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=A(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(H,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});V.displayName=`TableRow`;const H=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=A(),a=e.column.getIsPinned(),o=P(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`,c=e.column.columnDef.meta?.position??`start`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,a?`sticky`:`relative`,n),...r,children:(0,p.jsx)(`div`,{"data-slot":`table-cell-inner`,className:`inline-flex items-center justify-center align-middle text-center bg-transparent w-full`,children:(0,p.jsx)(E,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,a&&`sticky`,!a&&`relative`,n),...r,children:(0,p.jsx)(`div`,{"data-slot":`table-cell-inner`,className:(0,f.cn)(`inline-flex items-center align-middle text-center bg-transparent w-full`,c===`start`&&`justify-start`,c===`center`&&`justify-center`,c===`end`&&`justify-end`),children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})})});H.displayName=`TableCell`;const U=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),W=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),G=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=A(),{keyOfClickRow:s,onClickRow:c}=O(),l=(0,h.useRef)(null),d=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:s}=e;t-n-s<500&&!r&&a&&i.length<a&&o?.()},[r,i.length,a,o]);(0,h.useEffect)(()=>{f(l.current)},[f]);let{rows:m}=t.getRowModel(),g=(0,y.useVirtualizer)({count:m.length,estimateSize:()=>40,getScrollElement:()=>l.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2});return(0,p.jsxs)(u.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(u.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...d,width:t.getTotalSize()},className:`grid w-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(I,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(L,{children:e.headers.map(e=>(0,p.jsx)(R,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(B,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(V,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(U,{})]})}),(0,p.jsx)(u.t,{}),e]})},K=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(E,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),q=()=>{let{table:e}=A(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(u.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(c.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(K,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(c.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(c.t,{})]})]})})},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,leftPinnedColumns:a,rightPinnedColumns:o,keyOfClickRow:s,onClickRow:c,fetchMoreData:l,children:u})=>{let[d,f]=(0,h.useState)({}),[m,g]=(0,h.useState)({right:o,left:a}),[_,y]=(0,h.useState)({}),b=(0,v.useReactTable)({data:n,columns:r,state:{rowSelection:d,columnPinning:m,columnVisibility:_},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:f,onColumnPinningChange:g,onColumnVisibilityChange:y}),x=(0,h.useMemo)(()=>{let{rows:e}=b.getRowModel();return e},[b.getRowModel().rows,b.getState().columnPinning]),S=(0,h.useMemo)(()=>!t&&x.length===0,[x,t]),C=(0,h.useMemo)(()=>({title:e,table:b,data:n,isEmpty:S,isFetching:t,totalRows:i,fetchMoreData:l,rowSelection:b.getState().rowSelection,columnPinning:b.getState().columnPinning}),[e,b,n,S,t,i,l,b.getState().columnVisibility,b.getState().rowSelection,b.getState().columnPinning]),w=(0,h.useMemo)(()=>({keyOfClickRow:s,onClickRow:c}),[s,c]);return(0,p.jsx)(k.Provider,{value:C,children:(0,p.jsx)(D.Provider,{value:w,children:u})})},Y=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(d.t,{...t,size:`lg`,type:`search`,placeholder:`Search records...`,className:`ps-9 pe-9`}),(0,p.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,p.jsx)(m.SearchIcon,{size:16})}),(0,p.jsx)(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,p.jsx)(m.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]}),X=({children:e,onClick:t})=>(0,p.jsx)(`button`,{type:`button`,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive [&_svg]:size-3.5`,onClick:t,children:e}),Z=({onCreate:e,onDownload:t,onRefresh:n})=>(0,p.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,p.jsx)(X,{onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(X,{onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(X,{onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.DownloadIcon,{})})]}),Q=({children:e})=>{let{title:t}=A();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};Q.displayName=`TableTooltip`,exports.UITableContainer=G,exports.UITableDateDisplay=b,exports.UITableFilter=q,exports.UITableFooter=W,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableRemoveButton=C,exports.UITableStatisticDisplay=w,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,exports.UITableUserDataDisplay=T,exports.UITableWrapper=F;
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-a3HDmxog.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../separator-C3ip6sbh.cjs`),l=require(`../../dropdown-menu-BuyuU6uF.cjs`),u=require(`../../resizable-BS63Xwia.cjs`),d=require(`../../input-qnlHzDDm.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=()=>(0,p.jsxs)(`div`,{className:`flex gap-0 text-text-positive-weak`,children:[(0,p.jsx)(m.MinusIcon,{size:16}),(0,p.jsx)(m.MinusIcon,{size:16})]}),x=({date:e})=>e==null?(0,p.jsx)(b,{}):(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),S=({content:e})=>e==null?(0,p.jsx)(b,{}):(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`div`,{className:`line-clamp-2 whitespace-pre-line break-all text-sm text-text-positive-weak`,children:e})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`div`,{className:`whitespace-pre-line break-all text-sm text-text-negative-weak`,children:e})})]}),C=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 pt-4`,children:(0,p.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,p.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,p.jsxs)(`p`,{className:`w-full text-end`,children:[e.length,` characters`]})]})})]}),w=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),T=({title:e,onClick:n})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(t.t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:(0,h.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,p.jsx)(m.Trash2Icon,{})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(`p`,{children:e||`Remove item from list table`})})]}),E=(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}},D=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l=0})=>{let u=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),d=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=E(e,a,o)),t.toLocaleString(`en-US`,u)},[o,u,a]),m=(0,h.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]),g=(0,h.useMemo)(()=>e===`.`&&t===`,`?m:m.replace(/,/g,t).replace(/\./g,e),[m,e,t]);return g===`0`||g===`N/A`||!g?(0,p.jsx)(b,{}):(console.log(`final formatted`,g),(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:g}),i]}))});D.displayName=`UITableStatisticDisplay`;const O=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function k({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const A=(0,h.createContext)(null),j=()=>{let e=(0,h.use)(A);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},M=(0,h.createContext)(null),N=()=>{let e=(0,h.use)(M);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},P=60,ee=20,te=20,F=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0}},I=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),L=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));L.displayName=`TableHeader`;const R=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));R.displayName=`TableHeaderRow`;const z=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=F(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:(0,f.cn)(t?`sticky`:`relative`),...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(k,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`,t?`sticky`:`relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(B,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},B=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(l.t,{children:[(0,p.jsx)(l.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(l.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(l.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(l.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(l.u,{}),(0,p.jsx)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(l.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},V=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),H=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=N(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(U,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});H.displayName=`TableRow`;const U=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=N(),a=e.column.getIsPinned(),o=F(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`,c=e.column.columnDef.meta?.position??`start`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,a?`sticky`:`relative`,n),...r,children:(0,p.jsx)(`div`,{"data-slot":`table-cell-inner`,className:`inline-flex items-center justify-center align-middle text-center bg-transparent w-full`,children:(0,p.jsx)(k,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,a&&`sticky`,!a&&`relative`,n),...r,children:(0,p.jsx)(`div`,{"data-slot":`table-cell-inner`,className:(0,f.cn)(`inline-flex items-center align-middle text-center bg-transparent w-full`,c===`start`&&`justify-start`,c===`center`&&`justify-center`,c===`end`&&`justify-end`),children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})})});U.displayName=`TableCell`;const W=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),G=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),K=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=N(),{keyOfClickRow:s,onClickRow:c}=j(),l=(0,h.useRef)(null),d=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:s}=e;t-n-s<500&&!r&&a&&i.length<a&&o?.()},[r,i.length,a,o]);(0,h.useEffect)(()=>{f(l.current)},[f]);let{rows:m}=t.getRowModel(),g=(0,y.useVirtualizer)({count:m.length,estimateSize:()=>40,getScrollElement:()=>l.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2});return(0,p.jsxs)(u.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(u.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...d,width:t.getTotalSize()},className:`grid w-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(L,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(R,{children:e.headers.map(e=>(0,p.jsx)(z,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(V,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(H,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(W,{})]})}),(0,p.jsx)(u.t,{}),e]})},q=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(k,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),J=()=>{let{table:e}=N(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(u.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(c.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(q,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(c.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(c.t,{})]})]})})},Y=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,leftPinnedColumns:a,rightPinnedColumns:o,keyOfClickRow:s,onClickRow:c,fetchMoreData:l,children:u})=>{let[d,f]=(0,h.useState)({}),[m,g]=(0,h.useState)({right:o,left:a}),[_,y]=(0,h.useState)({}),b=(0,v.useReactTable)({data:n,columns:r,state:{rowSelection:d,columnPinning:m,columnVisibility:_},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:f,onColumnPinningChange:g,onColumnVisibilityChange:y}),x=(0,h.useMemo)(()=>{let{rows:e}=b.getRowModel();return e},[b.getRowModel().rows,b.getState().columnPinning]),S=(0,h.useMemo)(()=>!t&&x.length===0,[x,t]),C=(0,h.useMemo)(()=>({title:e,table:b,data:n,isEmpty:S,isFetching:t,totalRows:i,fetchMoreData:l,rowSelection:b.getState().rowSelection,columnPinning:b.getState().columnPinning}),[e,b,n,S,t,i,l,b.getState().columnVisibility,b.getState().rowSelection,b.getState().columnPinning]),w=(0,h.useMemo)(()=>({keyOfClickRow:s,onClickRow:c}),[s,c]);return(0,p.jsx)(M.Provider,{value:C,children:(0,p.jsx)(A.Provider,{value:w,children:u})})},X=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(d.t,{...t,size:`lg`,type:`search`,placeholder:`Search records...`,className:`ps-9 pe-9`}),(0,p.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,p.jsx)(m.SearchIcon,{size:16})}),(0,p.jsx)(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,p.jsx)(m.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]}),Z=({children:e,onClick:t})=>(0,p.jsx)(`button`,{type:`button`,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive [&_svg]:size-3.5`,onClick:t,children:e}),Q=({onCreate:e,onDownload:t,onRefresh:n})=>(0,p.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,p.jsx)(Z,{onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,p.jsx)(m.CirclePlus,{})}),(0,p.jsx)(Z,{onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.RefreshCwIcon,{})}),(0,p.jsx)(Z,{onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:(0,p.jsx)(m.DownloadIcon,{})})]}),$=({children:e})=>{let{title:t}=N();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};$.displayName=`TableTooltip`,exports.UITableContainer=K,exports.UITableDateDisplay=x,exports.UITableDescriptionDisplay=S,exports.UITableFilter=J,exports.UITableFooter=G,exports.UITableNameDisplay=C,exports.UITablePhoneNumberDisplay=w,exports.UITableProvider=Y,exports.UITableRemoveButton=T,exports.UITableStatisticDisplay=D,exports.UITableTooltip=$,exports.UITableTooltipActions=Q,exports.UITableTooltipFilter=X,exports.UITableUserDataDisplay=O,exports.UITableWrapper=I;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|