@customafk/lunas-ui 0.1.40 → 0.1.42
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-CPSR8ewr.d.mts → button-BP-PJSUy.d.mts} +3 -3
- package/dist/{button-DM5NJ-7F.d.cts → button-CriZT4R8.d.cts} +5 -5
- package/dist/{close-BuQ2DHur.mjs → close-CCf5pMYu.mjs} +1 -1
- package/dist/{close-BuQ2DHur.mjs.map → close-CCf5pMYu.mjs.map} +1 -1
- package/dist/{close-DvsVM8lM.cjs → close-D_Ge7gnP.cjs} +1 -1
- package/dist/{close-DvsVM8lM.cjs.map → close-D_Ge7gnP.cjs.map} +1 -1
- package/dist/{command-BKiAU1oU.mjs → command-CLjGZB-7.mjs} +2 -2
- package/dist/{command-BKiAU1oU.mjs.map → command-CLjGZB-7.mjs.map} +1 -1
- package/dist/{command-BqSzRw6j.cjs → command-D5zGkxau.cjs} +2 -2
- package/dist/{command-BqSzRw6j.cjs.map → command-D5zGkxau.cjs.map} +1 -1
- package/dist/data-display/country.d.mts +1 -1
- package/dist/data-display/empty.d.mts +2 -2
- package/dist/data-display/role-badge.d.mts +1 -1
- package/dist/data-display/statistic.d.mts +2 -2
- package/dist/{dialog-bd77jxcu.mjs → dialog-BbNb9Lr8.mjs} +2 -2
- package/dist/{dialog-bd77jxcu.mjs.map → dialog-BbNb9Lr8.mjs.map} +1 -1
- package/dist/{dialog-EzJiDxrJ.d.mts → dialog-DDBe8xR1.d.cts} +12 -12
- package/dist/{dialog-B2-c4OTw.d.cts → dialog-DbG76rtt.d.mts} +12 -12
- package/dist/{dialog-DVwvHuQB.cjs → dialog-DeIMaQO0.cjs} +2 -2
- package/dist/{dialog-DVwvHuQB.cjs.map → dialog-DeIMaQO0.cjs.map} +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +2 -0
- package/dist/dialogs/detail-dialog/components/sidebar.cjs.map +1 -0
- package/dist/dialogs/detail-dialog/{component/sidebar.d.mts → components/sidebar.d.cts} +30 -35
- package/dist/dialogs/detail-dialog/{component/sidebar.d.cts → components/sidebar.d.mts} +31 -36
- package/dist/dialogs/detail-dialog/components/sidebar.mjs +2 -0
- package/dist/dialogs/detail-dialog/components/sidebar.mjs.map +1 -0
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.d.cts +9 -8
- package/dist/dialogs/detail-dialog/index.d.mts +9 -8
- package/dist/dialogs/detail-dialog/index.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.mjs +1 -1
- package/dist/{drawer-ClbO_Gt0.mjs → drawer-272Fecsq.mjs} +1 -1
- package/dist/{drawer-ClbO_Gt0.mjs.map → drawer-272Fecsq.mjs.map} +1 -1
- package/dist/{drawer-DluJOnDX.cjs → drawer-y-Yrqskp.cjs} +1 -1
- package/dist/{drawer-DluJOnDX.cjs.map → drawer-y-Yrqskp.cjs.map} +1 -1
- package/dist/{dropdown-menu-DQs_Lvq7.cjs → dropdown-menu-BuyuU6uF.cjs} +1 -1
- package/dist/{dropdown-menu-DQs_Lvq7.cjs.map → dropdown-menu-BuyuU6uF.cjs.map} +1 -1
- package/dist/{dropdown-menu-DPhbyDEo.mjs → dropdown-menu-DsWYP0bL.mjs} +1 -1
- package/dist/{dropdown-menu-DPhbyDEo.mjs.map → dropdown-menu-DsWYP0bL.mjs.map} +1 -1
- package/dist/features/search-modal/index.cjs +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/search-modal/index.mjs +1 -1
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.d.cts +7 -7
- package/dist/features/tables/index.d.mts +5 -5
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tables/index.mjs.map +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.d.cts +42 -42
- package/dist/features/tanstack-form/index.d.mts +42 -42
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/{input-LDpzfNmy.d.mts → input-6wEnu5ug.d.mts} +5 -5
- package/dist/{input-C1K2wbv1.mjs → input-DD17n9Bv.mjs} +1 -1
- package/dist/{input-C1K2wbv1.mjs.map → input-DD17n9Bv.mjs.map} +1 -1
- package/dist/{input-CMXa_99w.d.cts → input-DwS_ovem.d.cts} +5 -5
- package/dist/{input-C1BXP8dd.cjs → input-qnlHzDDm.cjs} +1 -1
- package/dist/{input-C1BXP8dd.cjs.map → input-qnlHzDDm.cjs.map} +1 -1
- package/dist/{label-CkTb259R.cjs → label-CaBktIhh.cjs} +1 -1
- package/dist/{label-CkTb259R.cjs.map → label-CaBktIhh.cjs.map} +1 -1
- package/dist/{label-DwmJnk4H.mjs → label-DVfxfyG5.mjs} +1 -1
- package/dist/{label-DwmJnk4H.mjs.map → label-DVfxfyG5.mjs.map} +1 -1
- 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 +28 -28
- 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 +11 -11
- package/dist/layouts/service-layout/index.d.mts +15 -15
- package/dist/layouts/service-layout/index.mjs +1 -1
- package/dist/layouts/service-layout/index.mjs.map +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/{resizable-C2-dXaDM.cjs → resizable-BS63Xwia.cjs} +1 -1
- package/dist/{resizable-C2-dXaDM.cjs.map → resizable-BS63Xwia.cjs.map} +1 -1
- package/dist/{resizable-LConLbS6.mjs → resizable-Dp4eTFXj.mjs} +1 -1
- package/dist/{resizable-LConLbS6.mjs.map → resizable-Dp4eTFXj.mjs.map} +1 -1
- package/dist/{scroll-area-6xusEFm6.mjs → scroll-area-CiMS2UY7.mjs} +1 -1
- package/dist/{scroll-area-6xusEFm6.mjs.map → scroll-area-CiMS2UY7.mjs.map} +1 -1
- package/dist/{scroll-area-D61j6n8I.cjs → scroll-area-qE6GqGkn.cjs} +1 -1
- package/dist/{scroll-area-D61j6n8I.cjs.map → scroll-area-qE6GqGkn.cjs.map} +1 -1
- package/dist/{separator-D9m7b_32.d.mts → separator-B5vn3HO4.d.cts} +3 -3
- package/dist/{separator-Crr30ZHa.cjs → separator-C3ip6sbh.cjs} +1 -1
- package/dist/{separator-Crr30ZHa.cjs.map → separator-C3ip6sbh.cjs.map} +1 -1
- package/dist/{separator-yTKDuMWb.mjs → separator-CZM2q-Ac.mjs} +1 -1
- package/dist/{separator-yTKDuMWb.mjs.map → separator-CZM2q-Ac.mjs.map} +1 -1
- package/dist/{separator-HDjiaARy.d.cts → separator-tIFjtAPC.d.mts} +3 -3
- package/dist/{sheet-BYKV6xT_.cjs → sheet-5MJRtrfG.cjs} +1 -1
- package/dist/{sheet-BYKV6xT_.cjs.map → sheet-5MJRtrfG.cjs.map} +1 -1
- package/dist/{sheet-BSeiP8S8.mjs → sheet-CUMpo5F_.mjs} +1 -1
- package/dist/{sheet-BSeiP8S8.mjs.map → sheet-CUMpo5F_.mjs.map} +1 -1
- package/dist/{tabs-XrUcxpL1.mjs → tabs-Cjh2jtUZ.mjs} +1 -1
- package/dist/{tabs-XrUcxpL1.mjs.map → tabs-Cjh2jtUZ.mjs.map} +1 -1
- package/dist/{tabs-DldSJjLy.cjs → tabs-DSofRReg.cjs} +1 -1
- package/dist/{tabs-DldSJjLy.cjs.map → tabs-DSofRReg.cjs.map} +1 -1
- package/dist/{tooltip-B5gO2RGs.d.cts → tooltip-CT8tMc9R.d.cts} +6 -6
- package/dist/{tooltip-WI0fJ7gP.d.mts → tooltip-D0lZdG0v.d.mts} +6 -6
- package/dist/{types-DWnJKJ5r.d.mts → types-D2kMOc_b.d.mts} +1 -1
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.mts +2 -2
- package/dist/typography/title.cjs +2 -1
- package/dist/typography/title.cjs.map +1 -0
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/typography/title.mjs +2 -1
- package/dist/typography/title.mjs.map +1 -0
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.mts +6 -6
- 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 +2 -2
- 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.cjs +1 -1
- package/dist/ui/button-group.d.cts +5 -5
- package/dist/ui/button-group.d.mts +5 -5
- package/dist/ui/button-group.mjs +1 -1
- 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/collapsible.d.mts +4 -4
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/command.mjs +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/dialog.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/dropdown-menu.mjs +1 -1
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.cjs +1 -1
- package/dist/ui/field.d.cts +13 -13
- package/dist/ui/field.d.mts +24 -24
- package/dist/ui/field.mjs +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.mts +11 -11
- package/dist/ui/form.mjs +1 -1
- 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.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/inputs/search-input.cjs +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/inputs/search-input.mjs +1 -1
- package/dist/ui/item.cjs +1 -1
- package/dist/ui/item.d.cts +16 -16
- package/dist/ui/item.d.mts +16 -16
- package/dist/ui/item.mjs +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.mts +17 -17
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.mts +1 -1
- package/dist/ui/multi-select.mjs +1 -1
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.mts +9 -9
- 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.cjs +1 -1
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.mts +4 -4
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/scroll-area.mjs +1 -1
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.mts +11 -11
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.mts +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.mts +28 -28
- 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.cjs +1 -1
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/tabs.mjs +1 -1
- 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 +2 -2
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.mts +1 -1
- package/package.json +4 -4
- package/dist/dialogs/detail-dialog/component/sidebar.cjs +0 -2
- package/dist/dialogs/detail-dialog/component/sidebar.cjs.map +0 -1
- package/dist/dialogs/detail-dialog/component/sidebar.mjs +0 -2
- package/dist/dialogs/detail-dialog/component/sidebar.mjs.map +0 -1
- package/dist/title-BK1YcXjX.mjs +0 -2
- package/dist/title-BK1YcXjX.mjs.map +0 -1
- package/dist/title-BNv6aAfA.cjs +0 -2
- package/dist/title-BNv6aAfA.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n>","DialogPrimitive"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\nexport const DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n 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\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n 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]\"\n onInteractOutside={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>{SidebarFooter}</DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuItem>\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <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\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative text-text-positive-weak\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section\n data-slot=\"detail-dialog-body-loading\"\n className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted\"\n >\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <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\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"+xBAkBA,MAAaA,GAgBR,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC9E,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CACxE,OACE,EAACC,EAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,wBACxE,EAACA,EAAgB,OAAA,CAAO,YAAU,iCAChC,EAACA,EAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,CACF,EAAC,MAAA,CAAI,UAAU,+DACb,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAU,udACV,kBAAmB,GAAK,CACtB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,YAGrB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAQ,YAAY,iBACnB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC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,SAAA,CAAW,EACrB,CAEP,EAAC,UAAA,CACC,YAAU,6BACV,UAAU,4FAET,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,CAElB,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,SAAA,CAAO,UAAU,8QAChB,EAAC,EAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../close-
|
|
1
|
+
const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../close-D_Ge7gnP.cjs`);const t=require(`../dialog-DeIMaQO0.cjs`);let n=require(`react/jsx-runtime`);const r=({open:e,onOpenChange:r})=>(0,n.jsx)(t.t,{open:e,onOpenChange:r,children:(0,n.jsxs)(t.r,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[(0,n.jsx)(t.l,{}),(0,n.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,n.jsx)(`div`,{className:`loader opacity-60`})})]})});exports.LoadingDialog=r;
|
|
2
2
|
//# sourceMappingURL=loading-dialog.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../close-
|
|
1
|
+
import"../close-CCf5pMYu.mjs";import{l as e,r as t,t as n}from"../dialog-BbNb9Lr8.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({open:a,onOpenChange:o})=>r(n,{open:a,onOpenChange:o,children:i(t,{showCloseButton:!1,className:`pointer-events-none border-none bg-transparent shadow-none outline-0 [&>div]:bg-transparent`,children:[r(e,{}),r(`div`,{className:`flex items-center justify-center`,children:r(`div`,{className:`loader opacity-60`})})]})});export{a as LoadingDialog};
|
|
2
2
|
//# sourceMappingURL=loading-dialog.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{Drawer as r}from"vaul";function i({...e}){return t(r.Root,{"data-slot":`drawer`,...e})}function a({...e}){return t(r.Trigger,{"data-slot":`drawer-trigger`,...e})}function o({...e}){return t(r.Portal,{"data-slot":`drawer-portal`,...e})}function s({...e}){return t(r.Close,{"data-slot":`drawer-close`,...e})}function c({className:n,...i}){return t(r.Overlay,{"data-slot":`drawer-overlay`,className:e(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,n),...i})}function l({className:i,children:a,...s}){return n(o,{"data-slot":`drawer-portal`,children:[t(c,{}),n(r.Content,{"data-slot":`drawer-content`,className:e(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,i),...s,children:[t(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),a]})]})}function u({className:n,...r}){return t(`div`,{"data-slot":`drawer-header`,className:e(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,n),...r})}function d({className:n,...r}){return t(`div`,{"data-slot":`drawer-footer`,className:e(`mt-auto flex flex-col gap-2 p-4`,n),...r})}function f({className:n,...i}){return t(r.Title,{"data-slot":`drawer-title`,className:e(`text-text-positive font-semibold`,n),...i})}function p({className:n,...i}){return t(r.Description,{"data-slot":`drawer-description`,className:e(`text-text-positive-weak text-sm`,n),...i})}export{d as a,o as c,p as i,f as l,s as n,u as o,l as r,c as s,i as t,a as u};
|
|
2
|
-
//# sourceMappingURL=drawer-
|
|
2
|
+
//# sourceMappingURL=drawer-272Fecsq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-
|
|
1
|
+
{"version":3,"file":"drawer-272Fecsq.mjs","names":["Drawer","DrawerPrimitive"],"sources":["../packages/components/ui/drawer.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />;\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />;\n}\n\nexport { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };\n"],"mappings":"oIAKA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAG/D,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAgB,QAAA,CAAQ,YAAU,iBAAiB,GAAI,GAAS,CAG1E,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAA,CAAO,YAAU,gBAAgB,GAAI,GAAS,CAGxE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAGtE,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iCACA,+BACA,kCACA,8BACA,iCACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAc,CAAE,YAAW,WAAU,GAAG,GAA+D,CAC9G,OACE,EAAC,EAAA,CAAa,YAAU,0BACtB,EAAC,EAAA,EAAA,CAAgB,CACjB,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,iFAEA,6CACA,yCACA,yCACA,gDACA,gDAEA,gDACA,+CACA,4CACA,mDACA,mDAEA,+CACA,6CACA,2CACA,iDAEA,8CACA,2CACA,0CACA,gDACA,EACD,CACD,GAAI,YAEJ,EAAC,MAAA,CAAI,UAAU,mIAAA,CAAqI,CACnJ,EAAA,EACuB,CAAA,EACb,CAInB,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OACE,EAAC,MAAA,CACC,YAAU,gBACV,UAAW,EACT,4BACA,0BACA,uEACA,oEACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,kCAAmC,EAAU,CAAE,GAAI,GAAS,CAGlH,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAGpI,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAgB,YAAA,CAAY,YAAU,qBAAqB,UAAW,EAAG,kCAAmC,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`vaul`);function i({...e}){return(0,n.jsx)(r.Drawer.Root,{"data-slot":`drawer`,...e})}function a({...e}){return(0,n.jsx)(r.Drawer.Trigger,{"data-slot":`drawer-trigger`,...e})}function o({...e}){return(0,n.jsx)(r.Drawer.Portal,{"data-slot":`drawer-portal`,...e})}function s({...e}){return(0,n.jsx)(r.Drawer.Close,{"data-slot":`drawer-close`,...e})}function c({className:e,...i}){return(0,n.jsx)(r.Drawer.Overlay,{"data-slot":`drawer-overlay`,className:(0,t.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=open]:fade-in-0`,`data-[state=closed]:fade-out-0`,e),...i})}function l({className:e,children:i,...a}){return(0,n.jsxs)(o,{"data-slot":`drawer-portal`,children:[(0,n.jsx)(c,{}),(0,n.jsxs)(r.Drawer.Content,{"data-slot":`drawer-content`,className:(0,t.cn)(`group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0`,`data-[vaul-drawer-direction=top]:top-0`,`data-[vaul-drawer-direction=top]:mb-24`,`data-[vaul-drawer-direction=top]:max-h-[80vh]`,`data-[vaul-drawer-direction=top]:rounded-b-lg`,`data-[vaul-drawer-direction=bottom]:inset-x-0`,`data-[vaul-drawer-direction=bottom]:bottom-0`,`data-[vaul-drawer-direction=bottom]:mt-24`,`data-[vaul-drawer-direction=bottom]:max-h-[80vh]`,`data-[vaul-drawer-direction=bottom]:rounded-t-lg`,`data-[vaul-drawer-direction=right]:inset-y-0`,`data-[vaul-drawer-direction=right]:right-0`,`data-[vaul-drawer-direction=right]:w-3/4`,`data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0`,`data-[vaul-drawer-direction=left]:left-0`,`data-[vaul-drawer-direction=left]:w-3/4`,`data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...a,children:[(0,n.jsx)(`div`,{className:`bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),i]})]})}function u({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`drawer-header`,className:(0,t.cn)(`flex flex-col gap-0.5 p-4`,`md:gap-1.5 md:text-left`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center`,e),...r})}function d({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`drawer-footer`,className:(0,t.cn)(`mt-auto flex flex-col gap-2 p-4`,e),...r})}function f({className:e,...i}){return(0,n.jsx)(r.Drawer.Title,{"data-slot":`drawer-title`,className:(0,t.cn)(`text-text-positive font-semibold`,e),...i})}function p({className:e,...i}){return(0,n.jsx)(r.Drawer.Description,{"data-slot":`drawer-description`,className:(0,t.cn)(`text-text-positive-weak text-sm`,e),...i})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=drawer-
|
|
2
|
+
//# sourceMappingURL=drawer-y-Yrqskp.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-
|
|
1
|
+
{"version":3,"file":"drawer-y-Yrqskp.cjs","names":["DrawerPrimitive"],"sources":["../packages/components/ui/drawer.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0',\n 'data-[state=closed]:fade-out-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background shadow-card fixed z-50 flex h-auto flex-col',\n\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:w-3/4',\n 'data-[vaul-drawer-direction=right]:sm:max-w-sm',\n\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:w-3/4',\n 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className\n )}\n {...props}\n >\n <div className=\"bg-border-weak mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'flex flex-col gap-0.5 p-4',\n 'md:gap-1.5 md:text-left',\n 'group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center',\n 'group-data-[vaul-drawer-direction=top]/drawer-content:text-center',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"drawer-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot=\"drawer-title\" className={cn('text-text-positive font-semibold', className)} {...props} />;\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" className={cn('text-text-positive-weak text-sm', className)} {...props} />;\n}\n\nexport { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };\n"],"mappings":"yIAKA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAG/D,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA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C,EAAU,CAAE,GAAI,GAAS,CAGlH,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,WAAA,EAAA,EAAA,IAAc,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAGpI,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,YAAA,CAAY,YAAU,qBAAqB,WAAA,EAAA,EAAA,IAAc,kCAAmC,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`radix-ui`);function a({...e}){return(0,n.jsx)(i.DropdownMenu.Root,{"data-slot":`dropdown-menu`,...e})}function o({...e}){return(0,n.jsx)(i.DropdownMenu.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function s({...e}){return(0,n.jsx)(i.DropdownMenu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function c({className:e,sideOffset:r=4,align:a=`start`,...o}){return(0,n.jsx)(i.DropdownMenu.Portal,{children:(0,n.jsx)(i.DropdownMenu.Content,{"data-slot":`dropdown-menu-content`,sideOffset:r,className:(0,t.cn)(`bg-popover text-text-positive`,`z-50`,`min-w-32`,`overflow-y-auto overflow-x-hidden`,`rounded-md p-1.5 shadow-dropdown`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...o,align:a})})}function l({...e}){return(0,n.jsx)(i.DropdownMenu.Group,{"data-slot":`dropdown-menu-group`,...e})}function u({className:e,inset:r,variant:a=`default`,...o}){return(0,n.jsx)(i.DropdownMenu.Item,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":a,className:(0,t.cn)(`relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-inset:pl-8`,`data-disabled:pointer-events-none`,`data-disabled:opacity-50`,`data-[variant=destructive]:text-danger`,`data-[variant=destructive]:focus:bg-danger-muted`,`data-[variant=destructive]:focus:text-danger-strong`,`data-[variant=destructive]:*:[svg]:text-danger!`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,e),...o})}function d({className:e,children:a,checked:o,...s}){return(0,n.jsxs)(i.DropdownMenu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:(0,t.cn)(`relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),checked:o,...s,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(i.DropdownMenu.ItemIndicator,{children:(0,n.jsx)(r.CheckIcon,{size:16})})}),a]})}function f({...e}){return(0,n.jsx)(i.DropdownMenu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function p({className:e,children:a,...o}){return(0,n.jsxs)(i.DropdownMenu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:(0,t.cn)(`relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-disabled:pointer-events-none`,`data-disabled:opacity-50`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,e),...o,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(i.DropdownMenu.ItemIndicator,{children:(0,n.jsx)(r.CircleIcon,{className:`size-2 fill-current`})})}),a]})}function m({className:e,inset:r,...a}){return(0,n.jsx)(i.DropdownMenu.Label,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:(0,t.cn)(`px-2 py-1.5 font-medium text-sm data-inset:pl-8`,e),...a})}function h({className:e,...r}){return(0,n.jsx)(i.DropdownMenu.Separator,{"data-slot":`dropdown-menu-separator`,className:(0,t.cn)(`-mx-1 my-1 h-px bg-border-weak`,e),...r})}function g({className:e,...r}){return(0,n.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:(0,t.cn)(`ml-auto text-text-positive-muted text-xs tracking-widest`,e),...r})}function _({...e}){return(0,n.jsx)(i.DropdownMenu.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function v({className:e,inset:a,children:o,...s}){return(0,n.jsxs)(i.DropdownMenu.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:(0,t.cn)(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[state=open]:bg-muted-muted`,`data-[state=open]:text-text-positive-strong`,`data-inset:pl-8`,e),...s,children:[o,(0,n.jsx)(r.ChevronRightIcon,{className:`ml-auto size-4`})]})}function y({className:e,...r}){return(0,n.jsx)(i.DropdownMenu.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:(0,t.cn)(`bg-popover text-text-positive`,`z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:zoom-out-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...r})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return h}});
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-
|
|
2
|
+
//# sourceMappingURL=dropdown-menu-BuyuU6uF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-DQs_Lvq7.cjs","names":["DropdownMenuPrimitive","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-y-auto overflow-x-hidden',\n 'rounded-md p-1.5 shadow-dropdown',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-inset:pl-8',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:text-danger!',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 font-medium text-sm data-inset:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('-mx-1 my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('ml-auto text-text-positive-muted text-xs tracking-widest', className)} {...props} />;\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-inset:pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n Dropdown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,YAAW,GAAG,GAAuC,CACnF,OAAO,EAAA,EAAA,KAAC,OAAA,CAAK,YAAU,yBAAyB,WAAA,EAAA,EAAA,IAAc,2DAA4D,EAAU,CAAE,GAAI,GAAS,CAGrJ,SAAS,EAAgB,CAAE,GAAG,GAAiE,CAC7F,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,IAAA,CAAI,YAAU,oBAAoB,GAAI,GAAS,CAG/E,SAAS,EAAuB,CAC9B,YACA,QACA,WACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAACA,EAAAA,aAAsB,WAAA,CACrB,YAAU,4BACV,aAAY,EACZ,WAAA,EAAA,EAAA,IACE,6FACA,wBACA,kCACA,mCACA,8CACA,kBACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAACG,EAAAA,iBAAAA,CAAiB,UAAU,iBAAA,CAAmB,CAAA,EACd,CAIvC,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAAA,EAAA,KAACH,EAAAA,aAAsB,WAAA,CACrB,YAAU,4BACV,WAAA,EAAA,EAAA,IACE,gCACA,uHACA,+BACA,8BACA,+BACA,kCACA,kCACA,iCACA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,GACJ"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu-BuyuU6uF.cjs","names":["DropdownMenuPrimitive","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-y-auto overflow-x-hidden',\n 'rounded-md p-1.5 shadow-dropdown',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-inset:pl-8',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:text-danger!',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 font-medium text-sm data-inset:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('-mx-1 my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('ml-auto text-text-positive-muted text-xs tracking-widest', className)} {...props} />;\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-inset:pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"mappings":"uKAQA,SAAS,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAAA,aAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,GAAS,CAG5E,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAAA,E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AAAA,aAAsB,IAAA,CAAI,YAAU,oBAAoB,GAAI,GAAS,CAG/E,SAAS,EAAuB,CAC9B,YACA,QACA,WACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAACA,EAAAA,aAAsB,WAAA,CACrB,YAAU,4BACV,aAAY,EACZ,WAAA,EAAA,EAAA,IACE,6FACA,wBACA,kCACA,mCACA,8CACA,kBACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAACG,EAAAA,iBAAAA,CAAiB,UAAU,iBAAA,CAAmB,CAAA,EACd,CAIvC,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAAA,EAAA,KAACH,EAAAA,aAAsB,WAAA,CACrB,YAAU,4BACV,WAAA,EAAA,EAAA,IACE,gCACA,uHACA,+BACA,8BACA,+BACA,kCACA,kCACA,iCACA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,GACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{CheckIcon as r,ChevronRightIcon as i,CircleIcon as a}from"lucide-react";import{DropdownMenu as o}from"radix-ui";function s({...e}){return t(o.Root,{"data-slot":`dropdown-menu`,...e})}function c({...e}){return t(o.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function l({...e}){return t(o.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function u({className:n,sideOffset:r=4,align:i=`start`,...a}){return t(o.Portal,{children:t(o.Content,{"data-slot":`dropdown-menu-content`,sideOffset:r,className:e(`bg-popover text-text-positive`,`z-50`,`min-w-32`,`overflow-y-auto overflow-x-hidden`,`rounded-md p-1.5 shadow-dropdown`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n),...a,align:i})})}function d({...e}){return t(o.Group,{"data-slot":`dropdown-menu-group`,...e})}function f({className:n,inset:r,variant:i=`default`,...a}){return t(o.Item,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":i,className:e(`relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-inset:pl-8`,`data-disabled:pointer-events-none`,`data-disabled:opacity-50`,`data-[variant=destructive]:text-danger`,`data-[variant=destructive]:focus:bg-danger-muted`,`data-[variant=destructive]:focus:text-danger-strong`,`data-[variant=destructive]:*:[svg]:text-danger!`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,n),...a})}function p({className:i,children:a,checked:s,...c}){return n(o.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden`,`focus:bg-muted-muted`,`focus:text-text-positive-strong`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,i),checked:s,...c,children:[t(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:t(o.ItemIndicator,{children:t(r,{size:16})})}),a]})}function m({...e}){return t(o.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function h({className:r,children:i,...s}){return n(o.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-disabled:pointer-events-none`,`data-disabled:opacity-50`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,r),...s,children:[t(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:t(o.ItemIndicator,{children:t(a,{className:`size-2 fill-current`})})}),i]})}function g({className:n,inset:r,...i}){return t(o.Label,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:e(`px-2 py-1.5 font-medium text-sm data-inset:pl-8`,n),...i})}function _({className:n,...r}){return t(o.Separator,{"data-slot":`dropdown-menu-separator`,className:e(`-mx-1 my-1 h-px bg-border-weak`,n),...r})}function v({className:n,...r}){return t(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-text-positive-muted text-xs tracking-widest`,n),...r})}function y({...e}){return t(o.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function b({className:r,inset:a,children:s,...c}){return n(o.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:e(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden`,`focus:bg-accent-muted`,`focus:text-text-positive-strong`,`data-[state=open]:bg-muted-muted`,`data-[state=open]:text-text-positive-strong`,`data-inset:pl-8`,r),...c,children:[s,t(i,{className:`ml-auto size-4`})]})}function x({className:n,...r}){return t(o.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`bg-popover text-text-positive`,`z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:zoom-out-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n),...r})}export{f as a,m as c,v as d,y as f,l as h,d as i,h as l,b as m,p as n,g as o,x as p,u as r,c as s,s as t,_ as u};
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-
|
|
2
|
+
//# sourceMappingURL=dropdown-menu-DsWYP0bL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-DPhbyDEo.mjs","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-y-auto overflow-x-hidden',\n 'rounded-md p-1.5 shadow-dropdown',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-inset:pl-8',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:text-danger!',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 font-medium text-sm data-inset:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('-mx-1 my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('ml-auto text-text-positive-muted text-xs tracking-widest', className)} {...props} />;\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-inset:pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"mappings":"6NAQA,SAASA,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAACC,EAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,GAAS,CAG5E,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAsB,OAAA,CAAO,YAAU,uBAAuB,GAAI,GAAS,CAGrF,SAAS,EAAoB,CAAE,GAAG,GAAqE,CACrG,OAAO,EAACA,EAAsB,QAAA,CAAQ,YAAU,wBAAwB,GAAI,GAAS,CAGvF,SAAS,EAAoB,CAAE,YAAW,aAAa,EAAG,QAAQ,QAAS,GAAG,GAAqE,CACjJ,OACE,EAACA,EAAsB,OAAA,CAAA,SACrB,EAACA,EAAsB,QAAA,CACrB,YAAU,wBACE,aACZ,UAAW,EACT,gCACA,OACA,WACA,oCACA,mCACA,yDACA,0DACA,+BACA,8BACA,+BACA,kCACA,iCACA,kCACA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,EACG,SACP,CAAA,CAC2B,CAInC,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAACA,EAAsB,MAAA,CAAM,YAAU,sBAAsB,GAAI,GAAS,CAGnF,SAAS,EAAiB,CACxB,YACA,QACA,UAAU,UACV,GAAG,GAIF,CACD,OACE,EAACA,EAAsB,KAAA,CACrB,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AAuC,CACnF,OAAO,EAAC,OAAA,CAAK,YAAU,yBAAyB,UAAW,EAAG,2DAA4D,EAAU,CAAE,GAAI,GAAS,CAGrJ,SAAS,EAAgB,CAAE,GAAG,GAAiE,CAC7F,OAAO,EAACA,EAAsB,IAAA,CAAI,YAAU,oBAAoB,GAAI,GAAS,CAG/E,SAAS,EAAuB,CAC9B,YACA,QACA,WACA,GAAG,GAGF,CACD,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,aAAY,EACZ,UAAW,EACT,6FACA,wBACA,kCACA,mCACA,8CACA,kBACA,EACD,CACD,GAAI,YAEH,EACD,EAAC,EAAA,CAAiB,UAAU,iBAAA,CAAmB,CAAA,EACd,CAIvC,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,UAAW,EACT,gCACA,uHACA,+BACA,8BACA,+BACA,kCACA,kCACA,iCACA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,GACJ"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu-DsWYP0bL.mjs","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../packages/components/ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({ className, sideOffset = 4, align = 'start', ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50',\n 'min-w-32',\n 'overflow-y-auto overflow-x-hidden',\n 'rounded-md p-1.5 shadow-dropdown',\n 'max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n align={align}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2.5 text-sm outline-hidden transition-all',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-inset:pl-8',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n 'data-[variant=destructive]:text-danger',\n 'data-[variant=destructive]:focus:bg-danger-muted',\n 'data-[variant=destructive]:focus:text-danger-strong',\n 'data-[variant=destructive]:*:[svg]:text-danger!',\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-muted-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-disabled:pointer-events-none',\n 'data-disabled:opacity-50',\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 font-medium text-sm data-inset:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot=\"dropdown-menu-separator\" className={cn('-mx-1 my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span data-slot=\"dropdown-menu-shortcut\" className={cn('ml-auto text-text-positive-muted text-xs tracking-widest', className)} {...props} />;\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden',\n 'focus:bg-accent-muted',\n 'focus:text-text-positive-strong',\n 'data-[state=open]:bg-muted-muted',\n 'data-[state=open]:text-text-positive-strong',\n 'data-inset:pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-text-positive',\n 'z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md p-1 shadow-dropdown',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"mappings":"6NAQA,SAASA,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAACC,EAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,GAAS,CAG5E,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAsB,OAAA,CAAO,YAAU,uBAAuB,GAAI,GAAS,CAGrF,SAAS,EAAoB,CAAE,GAAG,GAAqE,CACrG,OAAO,EAACA,EAAsB,QAAA,CAAQ,YAAU,wBAAwB,GAAI,GAAS,CAGvF,SAAS,EAAoB,CAAE,YAAW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s`);require(`../../close-D_Ge7gnP.cjs`);const t=require(`../../dialog-DeIMaQO0.cjs`),n=require(`../../command-D5zGkxau.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`);const a=({value:e})=>(0,r.jsx)(n.o,{value:e,children:(0,r.jsxs)(`div`,{className:`size-full flex space-x-2 items-center`,children:[(0,r.jsx)(`div`,{className:`size-12 border border-border rounded-lg bg-card`}),(0,r.jsxs)(`div`,{className:`flex flex-col grow text-sm`,children:[(0,r.jsxs)(`p`,{className:`font-semibold`,children:[`Content Item for `,e]}),(0,r.jsx)(`p`,{className:`font-medium text-text-positive-weak`,children:`100.000VND`})]}),(0,r.jsx)(`button`,{className:`size-8 flex items-center justify-center grow-0`,children:(0,r.jsx)(i.ForwardIcon,{size:20,className:`text-text-positive-weak`})})]})}),o=()=>(0,r.jsxs)(n.t,{children:[(0,r.jsx)(n.a,{placeholder:`Type a command or search...`}),(0,r.jsxs)(n.s,{children:[(0,r.jsxs)(n.r,{className:`h-80 flex flex-col items-center justify-center space-y-2`,children:[(0,r.jsx)(i.Package2Icon,{strokeWidth:1,size:64,className:`text-text-positive-weak`}),(0,r.jsx)(`span`,{className:`ml-2`,children:`No results found.`})]}),(0,r.jsxs)(n.i,{heading:`Search Results`,children:[(0,r.jsx)(a,{value:`example-item-1`}),(0,r.jsx)(a,{value:`example-item-2`}),(0,r.jsx)(a,{value:`example-item-3`})]})]})]}),s=()=>(0,r.jsx)(t.t,{open:!0,children:(0,r.jsx)(t.r,{showCloseButton:!1,className:`sm:max-w-3xl`,children:(0,r.jsx)(o,{})})});exports.SearchModal=s;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime24 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_runtime24.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_runtime0 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_runtime0.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchModal };
|
|
7
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../close-
|
|
1
|
+
import"../../close-CCf5pMYu.mjs";import{r as e,t}from"../../dialog-BbNb9Lr8.mjs";import{a as n,i as r,o as i,r as a,s as o,t as s}from"../../command-CLjGZB-7.mjs";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{ForwardIcon as u,Package2Icon as d}from"lucide-react";const f=({value:e})=>c(i,{value:e,children:l(`div`,{className:`size-full flex space-x-2 items-center`,children:[c(`div`,{className:`size-12 border border-border rounded-lg bg-card`}),l(`div`,{className:`flex flex-col grow text-sm`,children:[l(`p`,{className:`font-semibold`,children:[`Content Item for `,e]}),c(`p`,{className:`font-medium text-text-positive-weak`,children:`100.000VND`})]}),c(`button`,{className:`size-8 flex items-center justify-center grow-0`,children:c(u,{size:20,className:`text-text-positive-weak`})})]})}),p=()=>l(s,{children:[c(n,{placeholder:`Type a command or search...`}),l(o,{children:[l(a,{className:`h-80 flex flex-col items-center justify-center space-y-2`,children:[c(d,{strokeWidth:1,size:64,className:`text-text-positive-weak`}),c(`span`,{className:`ml-2`,children:`No results found.`})]}),l(r,{heading:`Search Results`,children:[c(f,{value:`example-item-1`}),c(f,{value:`example-item-2`}),c(f,{value:`example-item-3`})]})]})]}),m=()=>c(t,{open:!0,children:c(e,{showCloseButton:!1,className:`sm:max-w-3xl`,children:c(p,{})})});export{m as SearchModal};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-BimfNium.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../input-C1BXP8dd.cjs`),l=require(`../../separator-Crr30ZHa.cjs`),u=require(`../../dropdown-menu-DQs_Lvq7.cjs`),d=require(`../../resizable-C2-dXaDM.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=({date:e})=>(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),x=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 whitespace-pre-line text-wrap break-keep`,children:e})]}),S=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),C=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l})=>{let u=(0,h.useCallback)((e,t)=>{let n=10**t;switch(o){case`floor`:return Math.floor(e*n)/n;case`ceil`:return Math.ceil(e*n)/n;default:return Math.round(e*n)/n}},[o]),d=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&(s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a),e},[a,s]),m=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=u(e,a)),t.toLocaleString(`en-US`,d)},[u,d,a]),g=(0,h.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:m(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:m(t)}return`N/A`},[l,m]),_=(0,h.useMemo)(()=>e===`.`&&t===`,`?g:g.replace(/,/g,t).replace(/\./g,e),[g,e,t]);return(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:_}),i]})});C.displayName=`UITableStatisticDisplay`;const w=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function T({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const E=(0,h.createContext)(null),D=()=>{let e=(0,h.use)(E);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},O=(0,h.createContext)(null),k=()=>{let e=(0,h.use)(O);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},A=60,j=20,M=20,N=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`}},P=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),F=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));F.displayName=`TableHeader`;const I=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));I.displayName=`TableHeaderRow`;const L=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=N(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:`relative`,...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(T,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(R,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},R=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(u.t,{children:[(0,p.jsx)(u.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(u.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(u.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(u.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(u.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(u.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(u.u,{}),(0,p.jsx)(u.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(u.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(u.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},z=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),B=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=k(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(V,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});B.displayName=`TableRow`;const V=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=k(),a=e.column.getIsPinned(),o=N(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,n),...r,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-transparent`,children:(0,p.jsx)(T,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,n),...r,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})});V.displayName=`TableCell`;const H=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),U=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),W=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=k(),{keyOfClickRow:s,onClickRow:c}=D(),l=(0,h.useRef)(null),u=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,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)(d.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(d.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...u,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(F,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(I,{children:e.headers.map(e=>(0,p.jsx)(L,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(z,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(B,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(H,{})]})}),(0,p.jsx)(d.t,{}),e]})},G=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(T,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),K=()=>{let{table:e}=k(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(d.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(l.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(G,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(l.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(l.t,{})]})]})})},q={columnPinning:{right:[`actions`]}},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,keyOfClickRow:a,onClickRow:o,fetchMoreData:s,children:c})=>{let[l,u]=(0,h.useState)({}),[d,f]=(0,h.useState)({right:[`actions`]}),[m,g]=(0,h.useState)({}),_=(0,v.useReactTable)({initialState:q,data:n,columns:r,state:{rowSelection:l,columnPinning:d,columnVisibility:m},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:u,onColumnPinningChange:f,onColumnVisibilityChange:g}),y=(0,h.useMemo)(()=>{let{rows:e}=_.getRowModel();return e},[_.getRowModel().rows,_.getState().columnPinning]),b=(0,h.useMemo)(()=>!t&&y.length===0,[y,t]),x=(0,h.useMemo)(()=>({title:e,table:_,data:n,isEmpty:b,isFetching:t,totalRows:i,fetchMoreData:s,rowSelection:_.getState().rowSelection,columnPinning:_.getState().columnPinning}),[e,_,n,b,t,i,s,_.getState().columnVisibility,_.getState().rowSelection,_.getState().columnPinning]),S=(0,h.useMemo)(()=>({keyOfClickRow:a,onClickRow:o}),[a,o]);return(0,p.jsx)(O.Provider,{value:x,children:(0,p.jsx)(E.Provider,{value:S,children:c})})},Y=({className:e,...t})=>(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(c.t,{...t,size:`lg`,type:`search`,placeholder:`Search records...`,className:`ps-9 pe-9`}),(0,p.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,p.jsx)(m.SearchIcon,{size:16})}),(0,p.jsx)(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,p.jsx)(m.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]}),X=({children:e,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}=k();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};Q.displayName=`TableTooltip`,exports.UITableContainer=W,exports.UITableDateDisplay=b,exports.UITableFilter=K,exports.UITableFooter=U,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableStatisticDisplay=C,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,exports.UITableUserDataDisplay=w,exports.UITableWrapper=P;
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const t=require(`../../button-DtFiUaY7.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-0_oMnSMM.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../badge-xKNC7uv3.cjs`),o=require(`../../tooltip-BimfNium.cjs`),s=require(`../../avatar-aVxo69zP.cjs`),c=require(`../../separator-C3ip6sbh.cjs`),l=require(`../../dropdown-menu-BuyuU6uF.cjs`),u=require(`../../resizable-BS63Xwia.cjs`),d=require(`../../input-qnlHzDDm.cjs`);let f=require(`@customafk/react-toolkit/utils`),p=require(`react/jsx-runtime`),m=require(`lucide-react`),h=require(`react`),g=require(`radix-ui`),_=require(`@customafk/react-toolkit/color-hash`),v=require(`@tanstack/react-table`),y=require(`@tanstack/react-virtual`);const b=({date:e})=>(0,p.jsx)(o.r,{children:(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(a.t,{className:`h-fit`,children:(0,p.jsx)(i.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,p.jsx)(o.n,{children:(0,p.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-[Inter]! font-medium text-xs`})})]})}),x=({name:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{children:(0,p.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,p.jsx)(o.n,{align:`start`,className:`h-fit max-w-80 whitespace-pre-line text-wrap break-keep`,children:e})]}),S=({value:e})=>(0,p.jsxs)(o.t,{children:[(0,p.jsx)(o.i,{asChild:!0,children:(0,p.jsx)(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,p.jsx)(o.n,{align:`start`,children:(0,p.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),C=(0,h.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l})=>{let u=(0,h.useCallback)((e,t)=>{let n=10**t;switch(o){case`floor`:return Math.floor(e*n)/n;case`ceil`:return Math.ceil(e*n)/n;default:return Math.round(e*n)/n}},[o]),d=(0,h.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&(s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a),e},[a,s]),m=(0,h.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=u(e,a)),t.toLocaleString(`en-US`,d)},[u,d,a]),g=(0,h.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:m(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:m(t)}return`N/A`},[l,m]),_=(0,h.useMemo)(()=>e===`.`&&t===`,`?g:g.replace(/,/g,t).replace(/\./g,e),[g,e,t]);return(0,p.jsxs)(n.t,{padding:`none`,className:(0,f.cn)(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,p.jsx)(`p`,{children:_}),i]})});C.displayName=`UITableStatisticDisplay`;const w=({uuid:e,username:t,email:i})=>(0,p.jsxs)(n.t,{wrap:!1,gap:`sm`,padding:`none`,children:[(0,p.jsx)(s.t,{className:`size-10 shadow-card`,children:(0,p.jsx)(s.n,{style:{backgroundColor:_.colorHashLight.hex(e)},children:(0,p.jsx)(m.UserRoundIcon,{size:28,className:`text-white`})})}),(0,p.jsxs)(n.t,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,p.jsx)(r.t,{className:`font-medium text-sm text-text-positive`,children:t}),(0,p.jsx)(r.t,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]});function T({className:e,...t}){return(0,p.jsx)(g.Checkbox.Root,{"data-slot":`checkbox`,className:(0,f.cn)(`peer border-border`,`size-4 shrink-0 cursor-pointer rounded border shadow-xs outline-none transition-shadow`,`data-[state=checked]:bg-primary`,`data-[state=checked]:text-text-negative-strong`,`data-[state=checked]:border-primary`,`focus-visible:border-primary-strong`,`focus-visible:ring-primary-weak`,`focus-visible:ring-3`,`aria-invalid:ring-danger-weak`,`aria-invalid:border-danger`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(g.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,p.jsx)(m.CheckIcon,{size:14})})})}const E=(0,h.createContext)(null),D=()=>{let e=(0,h.use)(E);if(!e)throw Error(`useUITableClickRowContext must be used within a TableClickRowProvider`);return e},O=(0,h.createContext)(null),k=()=>{let e=(0,h.use)(O);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},A=60,j=20,M=20,N=e=>{let t=e.getIsPinned();return{zIndex:t?20:void 0,left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`}},P=({className:e,children:t,...n})=>(0,p.jsx)(`div`,{"data-slot":`table-wrapper`,className:`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2 py-2.5 text-sm`,...n,children:t}),F=(0,h.memo)(({children:e})=>(0,p.jsx)(`thead`,{"data-slot":`table-header`,style:{zIndex:20},className:(0,f.cn)(`sticky top-0 grid bg-muted-bg-subtle text-sm text-text-positive`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:flex`,`[&_th]:h-10`,`[&_th]:select-none`,`[&_th]:items-center`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:font-normal`,`[&_th]:border-r`,`[&_th]:border-b-border`,`[&_th]:text-left`,`[&_th]:align-middle`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_th]:data-[pinned=right]:border-l`,`[&_th]:data-[pinned=right]:border-r-0`,`[&_th]:data-[pinned=left]:border-r`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`),children:e}));F.displayName=`TableHeader`;const I=(0,h.memo)(({children:e})=>(0,p.jsx)(`tr`,{"data-slot":`table-header-row`,className:`flex w-full border-border border-b shadow`,children:e}));I.displayName=`TableHeaderRow`;const L=({header:e,isPinned:t,isResizing:n,isAllRowsSelected:r,children:i,...a})=>{let o=N(e.column),s=`calc(var(--header-${e.id}-size) * 1px)`;return e.id===`select`?(0,p.jsx)(`th`,{"data-slot":`table-header-cell`,style:{...o,width:60},className:`relative`,...a,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,p.jsx)(T,{"aria-label":`Select All Rows`,checked:r,onCheckedChange:t=>{e.getContext().table.toggleAllRowsSelected(!!t)}})})}):(0,p.jsxs)(`th`,{"data-slot":`table-header-cell`,"data-pinned":t,style:{...o,width:s},colSpan:e.colSpan,className:(0,f.cn)(`group relative`),...a,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 gap-1 truncate`,children:(0,p.jsx)(`div`,{className:`flex h-full flex-1 cursor-pointer select-none items-center justify-between`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-1 items-center truncate pl-4`,children:(0,v.flexRender)(e.column.columnDef.header,e.getContext())})})}),![`select`,`actions`].includes(e.id)&&(0,p.jsx)(R,{isPinned:t,isVisible:e.column.getIsVisible(),className:`invisible absolute right-2 z-10 group-hover:visible`,onLeftPin:e.column.pin,onRightPin:e.column.pin,onUnpin:e.column.pin,onToggleVisibilityHandler:e.column.toggleVisibility}),(0,p.jsx)(h.Activity,{mode:t?`hidden`:`visible`,children:(0,p.jsx)(`div`,{onDoubleClick:e.column.resetSize,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:(0,f.cn)(`absolute inset-y-0 -right-0.5 w-1 cursor-e-resize bg-transparent hover:bg-border`,n&&`bg-border`)})})]})},R=({isPinned:e,className:t,onLeftPin:n,onRightPin:r,onUnpin:i,onToggleVisibilityHandler:a})=>{let o=(0,h.useCallback)(()=>{n(`left`)},[n]),s=(0,h.useCallback)(()=>{r(`right`)},[r]),c=(0,h.useCallback)(()=>{i(!1)},[i]);return(0,p.jsxs)(l.t,{children:[(0,p.jsx)(l.h,{asChild:!0,children:(0,p.jsx)(`button`,{className:(0,f.cn)(`cursor-pointer rounded-full p-0.5 text-text-positive-weak hover:bg-muted-muted hover:text-text-positive [&>svg]:size-4`,t),children:(0,p.jsx)(m.EllipsisVerticalIcon,{})})}),(0,p.jsxs)(l.r,{align:`end`,className:`w-64 p-4`,children:[(0,p.jsxs)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,p.jsx)(h.Activity,{mode:e?`visible`:`hidden`,children:(0,p.jsxs)(l.a,{onClick:c,children:[!!e&&`Unpin`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.PinOffIcon,{className:`size-4`})})]})}),(0,p.jsxs)(h.Activity,{mode:e?`hidden`:`visible`,children:[(0,p.jsxs)(l.a,{onClick:o,children:[e?`Unpin`:`Pin to Left`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveLeftIcon,{className:`size-4`})})]}),(0,p.jsxs)(l.a,{onClick:s,children:[e?`Unpin`:`Pin to Right`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.MoveRightIcon,{className:`size-4`})})]})]})]}),(0,p.jsx)(l.u,{}),(0,p.jsx)(l.i,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:(0,p.jsxs)(l.a,{onClick:()=>a(!1),children:[`Hide Field`,(0,p.jsx)(l.d,{children:(0,p.jsx)(m.EyeOffIcon,{className:`size-4`})})]})})]})]})},z=({height:e,children:t,...n})=>(0,p.jsx)(`tbody`,{"data-slot":`table-body`,style:{height:`${e}px`},className:(0,f.cn)(`relative grid w-full bg-card`,`[&_tr]:absolute [&_tr]:flex [&_tr]:w-full [&_tr]:cursor-pointer [&_tr]:border-b [&_tr]:border-b-border [&_tr]:focus:outline-none`,`[&_td]:z-10`,`[&_td]:flex`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[pinned=right]:border-l`,`[&_td]:data-[pinned=left]:border-r`,`[&_td:not([data-pinned=false])]:bg-card`,`[&_td:not([data-pinned=false])]:shadow-xs`),...n,children:t}),B=(0,h.memo)(({children:e,keyOfClickRow:t,row:n,virtualRow:r,rowVirtualizer:i,onClickRow:a,className:o,...s})=>{let{columnPinning:c}=k(),l=(0,h.useCallback)(e=>{let i=t?n.original?.[t]:void 0;typeof i==`string`||typeof i==`number`?a?.(r.index,i):a?.(r.index),e.preventDefault(),e.stopPropagation()},[t,a,n.original,r.index]);return(0,p.jsx)(`tr`,{"data-slot":`table-row`,"data-index":r.index,ref:e=>i.measureElement(e),style:{transform:`translateY(${r.start}px)`},className:(0,f.cn)(`group`,o),onClick:l,...s,children:n.getVisibleCells().map(e=>(0,p.jsx)(V,{cell:e,className:`group-hover:bg-muted-bg-subtle!`},e.id))})});B.displayName=`TableRow`;const V=(0,h.memo)(({cell:e,children:t,className:n,...r})=>{let{rowSelection:i}=k(),a=e.column.getIsPinned(),o=N(e.column),s=`calc(var(--col-${e.column.id}-size) * 1px)`;return e.column.id===`select`?(0,p.jsx)(`td`,{"data-slot":`table-cell`,style:{...o,width:60},className:(0,f.cn)(`border-none! bg-transparent! shadow-none!`,n),...r,children:(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-transparent`,children:(0,p.jsx)(T,{"aria-label":`Select Row`,checked:e.row.getIsSelected(),onCheckedChange:t=>{e.row.toggleSelected(!!t)}})})}):(0,p.jsx)(`td`,{"data-slot":`table-cell`,"data-pinned":a,style:{...o,width:s},className:(0,f.cn)(a&&e.column.getPinnedIndex()===0&&`shadow!`,n),...r,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())})});V.displayName=`TableCell`;const H=()=>(0,p.jsx)(`div`,{className:`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,p.jsx)(m.BoxIcon,{strokeWidth:1,size:48}),(0,p.jsx)(`p`,{children:`No data available`})]})}),U=({children:e})=>(0,p.jsx)(`tfoot`,{"data-slot":`table-footer`,className:`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,children:e}),W=({children:e})=>{let{table:t,isEmpty:n,isFetching:r,data:i,totalRows:a,fetchMoreData:o}=k(),{keyOfClickRow:s,onClickRow:c}=D(),l=(0,h.useRef)(null),d=(0,h.useMemo)(()=>{let e=t.getFlatHeaders(),n={};return e.forEach(e=>{n[`--header-${e.id}-size`]=e.getSize()||0,n[`--col-${e.column.id}-size`]=e.column.getSize()||0}),n},[t.getState().columnSizingInfo,t.getState().columnSizing]),f=(0,h.useCallback)(async e=>{if(!e)return null;let{scrollHeight:t,scrollTop:n,clientHeight:s}=e;t-n-s<500&&!r&&a&&i.length<a&&o?.()},[r,i.length,a,o]);(0,h.useEffect)(()=>{f(l.current)},[f]);let{rows:m}=t.getRowModel(),g=(0,y.useVirtualizer)({count:m.length,estimateSize:()=>40,getScrollElement:()=>l.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2});return(0,p.jsxs)(u.r,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border bg-slate-50 p-0 text-sm`,children:[(0,p.jsx)(u.n,{className:`overflow-auto`,children:(0,p.jsxs)(`div`,{ref:l,className:`relative size-full overflow-auto`,onScroll:e=>f(e.currentTarget),children:[(0,p.jsxs)(`table`,{"data-slot":`table`,style:{...d,width:t.getTotalSize()},className:`grid size-full max-w-full caption-bottom border-collapse border-spacing-0 flex-col content-start bg-card text-sm tabular-nums [&_tfoot_td]:border-t`,children:[(0,p.jsx)(F,{children:t.getHeaderGroups().map(e=>(0,p.jsx)(I,{children:e.headers.map(e=>(0,p.jsx)(L,{header:e,isPinned:e.column.getIsPinned(),isResizing:e.column.getIsResizing(),isAllRowsSelected:t.getIsAllRowsSelected()},e.id))},e.id))}),(0,p.jsx)(z,{"data-slot":`table-body`,height:g.getTotalSize(),children:g.getVirtualItems().map(e=>{let t=m[e.index];return(0,p.jsx)(B,{"data-index":e.index,keyOfClickRow:s,row:t,virtualRow:e,rowVirtualizer:g,onClickRow:c},t.id)})})]}),n&&(0,p.jsx)(H,{})]})}),(0,p.jsx)(u.t,{}),e]})},G=({checked:e,title:t,onCheckedChange:n})=>(0,p.jsxs)(`div`,{className:`flex h-fit items-center gap-2`,children:[(0,p.jsx)(T,{checked:e,onCheckedChange:n}),(0,p.jsx)(`p`,{className:`text-sm`,children:t})]}),K=()=>{let{table:e}=k(),[n,r]=(0,h.useState)(null);return(0,p.jsx)(u.n,{defaultSize:25,className:(0,f.cn)(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:(0,p.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsx)(h.Activity,{mode:n===`columns`?`visible`:`hidden`,children:(0,p.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,p.jsx)(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),(0,p.jsx)(c.t,{}),(0,p.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:(0,p.jsx)(G,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),(0,p.jsx)(h.Activity,{mode:n===`filters`?`visible`:`hidden`,children:(0,p.jsx)(`div`,{className:`flex size-full flex-col p-2`,children:(0,p.jsxs)(t.t,{variant:`outline`,color:`muted`,children:[(0,p.jsx)(m.ListFilterPlus,{}),`Add Filter`]})})})]}),(0,p.jsxs)(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[(0,p.jsx)(m.Columns4Icon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),(0,p.jsx)(c.t,{}),(0,p.jsxs)(`button`,{className:(0,f.cn)(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[(0,p.jsx)(m.ListFilterIcon,{size:18}),(0,p.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),(0,p.jsx)(c.t,{})]})]})})},q={columnPinning:{right:[`actions`]}},J=({title:e,isFetching:t=!1,data:n,columns:r,totalRows:i,keyOfClickRow:a,onClickRow:o,fetchMoreData:s,children:c})=>{let[l,u]=(0,h.useState)({}),[d,f]=(0,h.useState)({right:[`actions`]}),[m,g]=(0,h.useState)({}),_=(0,v.useReactTable)({initialState:q,data:n,columns:r,state:{rowSelection:l,columnPinning:d,columnVisibility:m},defaultColumn:{minSize:40,size:150,maxSize:800},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,getCoreRowModel:(0,v.getCoreRowModel)(),onRowSelectionChange:u,onColumnPinningChange:f,onColumnVisibilityChange:g}),y=(0,h.useMemo)(()=>{let{rows:e}=_.getRowModel();return e},[_.getRowModel().rows,_.getState().columnPinning]),b=(0,h.useMemo)(()=>!t&&y.length===0,[y,t]),x=(0,h.useMemo)(()=>({title:e,table:_,data:n,isEmpty:b,isFetching:t,totalRows:i,fetchMoreData:s,rowSelection:_.getState().rowSelection,columnPinning:_.getState().columnPinning}),[e,_,n,b,t,i,s,_.getState().columnVisibility,_.getState().rowSelection,_.getState().columnPinning]),S=(0,h.useMemo)(()=>({keyOfClickRow:a,onClickRow:o}),[a,o]);return(0,p.jsx)(O.Provider,{value:x,children:(0,p.jsx)(E.Provider,{value:S,children:c})})},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}=k();return(0,p.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[(0,p.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),(0,p.jsx)(`div`,{className:`flex w-full flex-1 justify-between`,children:e})]})};Q.displayName=`TableTooltip`,exports.UITableContainer=W,exports.UITableDateDisplay=b,exports.UITableFilter=K,exports.UITableFooter=U,exports.UITableNameDisplay=x,exports.UITablePhoneNumberDisplay=S,exports.UITableProvider=J,exports.UITableStatisticDisplay=C,exports.UITableTooltip=Q,exports.UITableTooltipActions=Z,exports.UITableTooltipFilter=Y,exports.UITableUserDataDisplay=w,exports.UITableWrapper=P;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Input } from "../../input-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { t as Input } from "../../input-DwS_ovem.cjs";
|
|
2
|
+
import * as react_jsx_runtime337 from "react/jsx-runtime";
|
|
3
|
+
import * as react176 from "react";
|
|
4
4
|
import { AccessorKeyColumnDef, ColumnPinningState, RowData, RowSelectionState, Table } from "@tanstack/react-table";
|
|
5
5
|
import { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ type Props$1 = {
|
|
|
33
33
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
34
34
|
value: number | string;
|
|
35
35
|
};
|
|
36
|
-
declare const UITableStatisticDisplay:
|
|
36
|
+
declare const UITableStatisticDisplay: react176.MemoExoticComponent<({
|
|
37
37
|
decimalSeparator,
|
|
38
38
|
groupSeparator,
|
|
39
39
|
prefix: Prefix,
|
|
@@ -43,7 +43,7 @@ declare const UITableStatisticDisplay: react174.MemoExoticComponent<({
|
|
|
43
43
|
showTrailingZeros,
|
|
44
44
|
size,
|
|
45
45
|
value
|
|
46
|
-
}: Props$1) =>
|
|
46
|
+
}: Props$1) => react_jsx_runtime337.JSX.Element>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region packages/components/features/tables/components/atoms/user.d.ts
|
|
49
49
|
type Props = {
|
|
@@ -59,7 +59,7 @@ declare const UITableFooter: React.FC<React.PropsWithChildren>;
|
|
|
59
59
|
declare const UITableContainer: React.FC<React.PropsWithChildren>;
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region packages/components/features/tables/components/table/filter.d.ts
|
|
62
|
-
declare const UITableFilter: () =>
|
|
62
|
+
declare const UITableFilter: () => react_jsx_runtime337.JSX.Element;
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region packages/components/features/tables/types.d.ts
|
|
65
65
|
type TUITableColumn<TData extends RowData> = Pick<AccessorKeyColumnDef<TData, unknown>, 'accessorKey' | 'size' | 'maxSize' | 'minSize' | 'header' | 'cell'>;
|
|
@@ -104,7 +104,7 @@ declare const UITableProvider: <TData extends RowData, TKey extends keyof TData>
|
|
|
104
104
|
onClickRow,
|
|
105
105
|
fetchMoreData,
|
|
106
106
|
children
|
|
107
|
-
}: React.PropsWithChildren<TableProviderProps<TData, TKey>>) =>
|
|
107
|
+
}: React.PropsWithChildren<TableProviderProps<TData, TKey>>) => react_jsx_runtime337.JSX.Element;
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region packages/components/features/tables/components/table/tooltip.d.ts
|
|
110
110
|
declare const UITableTooltipFilter: React.FC<React.ComponentProps<typeof Input>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Input } from "../../input-
|
|
2
|
-
import * as
|
|
1
|
+
import { t as Input } from "../../input-6wEnu5ug.mjs";
|
|
2
|
+
import * as react_jsx_runtime337 from "react/jsx-runtime";
|
|
3
3
|
import * as react174 from "react";
|
|
4
4
|
import { AccessorKeyColumnDef, ColumnPinningState, RowData, RowSelectionState, Table } from "@tanstack/react-table";
|
|
5
5
|
import { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
@@ -43,7 +43,7 @@ declare const UITableStatisticDisplay: react174.MemoExoticComponent<({
|
|
|
43
43
|
showTrailingZeros,
|
|
44
44
|
size,
|
|
45
45
|
value
|
|
46
|
-
}: Props$1) =>
|
|
46
|
+
}: Props$1) => react_jsx_runtime337.JSX.Element>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region packages/components/features/tables/components/atoms/user.d.ts
|
|
49
49
|
type Props = {
|
|
@@ -59,7 +59,7 @@ declare const UITableFooter: React.FC<React.PropsWithChildren>;
|
|
|
59
59
|
declare const UITableContainer: React.FC<React.PropsWithChildren>;
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region packages/components/features/tables/components/table/filter.d.ts
|
|
62
|
-
declare const UITableFilter: () =>
|
|
62
|
+
declare const UITableFilter: () => react_jsx_runtime337.JSX.Element;
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region packages/components/features/tables/types.d.ts
|
|
65
65
|
type TUITableColumn<TData extends RowData> = Pick<AccessorKeyColumnDef<TData, unknown>, 'accessorKey' | 'size' | 'maxSize' | 'minSize' | 'header' | 'cell'>;
|
|
@@ -104,7 +104,7 @@ declare const UITableProvider: <TData extends RowData, TKey extends keyof TData>
|
|
|
104
104
|
onClickRow,
|
|
105
105
|
fetchMoreData,
|
|
106
106
|
children
|
|
107
|
-
}: React.PropsWithChildren<TableProviderProps<TData, TKey>>) =>
|
|
107
|
+
}: React.PropsWithChildren<TableProviderProps<TData, TKey>>) => react_jsx_runtime337.JSX.Element;
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region packages/components/features/tables/components/table/tooltip.d.ts
|
|
110
110
|
declare const UITableTooltipFilter: React.FC<React.ComponentProps<typeof Input>>;
|