@lssm/lib.ui-kit-web 1.7.3 → 1.9.0
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/README.md +80 -0
- package/dist/node_modules/sonner/dist/index.js +1 -2
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.d.ts +5 -5
- package/dist/ui/accordion.js +3 -4
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.js +8 -9
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +3 -3
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/aspect-ratio.js +0 -1
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +3 -4
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -3
- package/dist/ui/badge.js +1 -1
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +6 -6
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button.d.ts +6 -6
- package/dist/ui/button.js +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/calendar.d.ts +3 -3
- package/dist/ui/calendar.js +5 -6
- package/dist/ui/calendar.js.map +1 -1
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/card.js +7 -7
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/carousel.d.ts +6 -6
- package/dist/ui/carousel.js +5 -6
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -2
- package/dist/ui/checkbox.js +1 -2
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/collapsible.js +0 -1
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/command.d.ts +10 -10
- package/dist/ui/command.js +8 -9
- package/dist/ui/command.js.map +1 -1
- package/dist/ui/confirm-dialog.d.ts +2 -2
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +9 -10
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/cta.d.ts +1 -1
- package/dist/ui/cta.js +1 -1
- package/dist/ui/cta.js.map +1 -1
- package/dist/ui/date-picker.d.ts +2 -2
- package/dist/ui/date-picker.js +0 -1
- package/dist/ui/date-picker.js.map +1 -1
- package/dist/ui/date-range-picker.d.ts +2 -2
- package/dist/ui/date-range-picker.js +0 -1
- package/dist/ui/date-range-picker.js.map +1 -1
- package/dist/ui/datetime-picker.d.ts +2 -2
- package/dist/ui/datetime-picker.d.ts.map +1 -1
- package/dist/ui/datetime-picker.js +0 -1
- package/dist/ui/datetime-picker.js.map +1 -1
- package/dist/ui/dialog.d.ts +11 -11
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +6 -7
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/drawer.d.ts +11 -11
- package/dist/ui/drawer.js +6 -7
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/dropdown-menu.js +9 -10
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/empty-state.d.ts +4 -4
- package/dist/ui/empty.d.ts +9 -9
- package/dist/ui/empty.js +6 -6
- package/dist/ui/empty.js.map +1 -1
- package/dist/ui/field.d.ts +11 -11
- package/dist/ui/field.js +10 -11
- package/dist/ui/field.js.map +1 -1
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/form.js +4 -5
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/hover-card.js +1 -2
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/input-group.d.ts +11 -11
- package/dist/ui/input-group.js +6 -7
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +3 -4
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts +2 -2
- package/dist/ui/input.js +1 -1
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/label.js +1 -2
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/link.d.ts +3 -3
- package/dist/ui/link.js +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/live-region.d.ts +2 -2
- package/dist/ui/live-region.js +0 -1
- package/dist/ui/live-region.js.map +1 -1
- package/dist/ui/loading-button.d.ts +2 -2
- package/dist/ui/loading-button.js +1 -1
- package/dist/ui/loading-button.js.map +1 -1
- package/dist/ui/map/MapBase.d.ts +2 -2
- package/dist/ui/map/MapBase.js +0 -1
- package/dist/ui/map/MapBase.js.map +1 -1
- package/dist/ui/map/MapGeoJsonOverlay.d.ts +2 -2
- package/dist/ui/map/MapGeoJsonOverlay.js +0 -1
- package/dist/ui/map/MapGeoJsonOverlay.js.map +1 -1
- package/dist/ui/map/MapHeatmapH3.d.ts +2 -2
- package/dist/ui/map/MapHeatmapH3.js +0 -1
- package/dist/ui/map/MapHeatmapH3.js.map +1 -1
- package/dist/ui/map/MapMarkers.d.ts +2 -2
- package/dist/ui/map/MapMarkers.js +0 -1
- package/dist/ui/map/MapMarkers.js.map +1 -1
- package/dist/ui/marketing/FeatureGrid.d.ts +2 -2
- package/dist/ui/marketing/Hero.d.ts +2 -2
- package/dist/ui/marketing/PricingTable.d.ts +2 -2
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +11 -12
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts +2 -2
- package/dist/ui/molecules/Autocomplete/index.js +0 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +1 -1
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -1
- package/dist/ui/molecules/SkeletonList.d.ts +2 -2
- package/dist/ui/nav-layout.d.ts +9 -9
- package/dist/ui/nav-layout.d.ts.map +1 -1
- package/dist/ui/nav-layout.js +1 -1
- package/dist/ui/nav-layout.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +8 -8
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -2
- package/dist/ui/page-header.d.ts +5 -5
- package/dist/ui/pagination.d.ts +6 -6
- package/dist/ui/pagination.js +7 -7
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/popover.js +1 -2
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/progress.js +1 -2
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/radio-group.js +2 -3
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/resizable.d.ts +7 -7
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +2 -3
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/route-announcer.d.ts +2 -2
- package/dist/ui/route-announcer.js +0 -1
- package/dist/ui/route-announcer.js.map +1 -1
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/scroll-area.js +2 -3
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/section.d.ts +7 -7
- package/dist/ui/section.d.ts.map +1 -1
- package/dist/ui/section.js +1 -1
- package/dist/ui/section.js.map +1 -1
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/select.js +7 -8
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +2 -2
- package/dist/ui/separator.js +1 -2
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sheet.js +6 -7
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.d.ts +28 -28
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +23 -24
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/skip-link.d.ts +2 -2
- package/dist/ui/skip-link.js +1 -1
- package/dist/ui/skip-link.js.map +1 -1
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.js +1 -2
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/sonner.js +0 -1
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/stack.d.ts +13 -13
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +3 -3
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card-group.d.ts +2 -2
- package/dist/ui/stepper.d.ts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.js +1 -2
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/table.js +8 -9
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/tabs.js +4 -5
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.d.ts +2 -2
- package/dist/ui/text.js +1 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/time-picker.d.ts +2 -2
- package/dist/ui/time-picker.js +0 -1
- package/dist/ui/time-picker.js.map +1 -1
- package/dist/ui/toast.d.ts +2 -2
- package/dist/ui/toast.js +6 -7
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toaster.d.ts +2 -2
- package/dist/ui/toaster.js +1 -2
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +3 -3
- package/dist/ui/toggle-group.js +2 -3
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +4 -4
- package/dist/ui/toggle.js +1 -2
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts +5 -5
- package/dist/ui/tooltip.js +2 -3
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/typography.d.ts +12 -12
- package/dist/ui/typography.js +11 -11
- package/dist/ui/typography.js.map +1 -1
- package/dist/ui/use-toast.js +0 -1
- package/dist/ui/use-toast.js.map +1 -1
- package/dist/ui/usecases/UseCaseCard.d.ts +2 -2
- package/dist/ui/usecases/UserStoryCard.d.ts +2 -2
- package/dist/ui/visually-hidden.js +1 -1
- package/dist/ui/visually-hidden.js.map +1 -1
- package/package.json +9 -10
- package/dist/ui/sidebar-right.d.ts +0 -165
- package/dist/ui/sidebar-right.d.ts.map +0 -1
- package/dist/ui/sidebar-right.js +0 -380
- package/dist/ui/sidebar-right.js.map +0 -1
package/dist/ui/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","names":["DrawerPrimitive"],"sources":["../../ui/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from './utils';\n\nfunction Drawer({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: 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 fixed z-50 flex h-auto flex-col',\n '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=top]:border-b',\n '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=bottom]:border-t',\n '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]:border-l sm:data-[vaul-drawer-direction=right]:max-w-sm',\n '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]:border-r sm:data-[vaul-drawer-direction=left]:max-w-sm',\n className\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] 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 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer.js","names":["DrawerPrimitive"],"sources":["../../ui/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from './utils';\n\nfunction Drawer({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: 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 fixed z-50 flex h-auto flex-col',\n '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=top]:border-b',\n '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=bottom]:border-t',\n '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]:border-l sm:data-[vaul-drawer-direction=right]:max-w-sm',\n '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]:border-r sm:data-[vaul-drawer-direction=left]:max-w-sm',\n className\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] 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 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":";;;;;;;;AAOA,SAAS,OAAO,EACd,GAAG,SACiD;AACpD,QAAO,oBAACA,SAAgB;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAACA,SAAgB;EAAQ,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QAAO,oBAACA,SAAgB;EAAO,aAAU;EAAgB,GAAI;GAAS;;AAGxE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAACA,SAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;AACvD,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GACT,0JACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,cAAc,EACrB,WACA,UACA,GAAG,SACoD;AACvD,QACE,qBAAC;EAAa,aAAU;aACtB,oBAAC,kBAAgB,EACjB,qBAACA,SAAgB;GACf,aAAU;GACV,WAAW,GACT,sEACA,kQACA,uRACA,+NACA,yNACA,UACD;GACD,GAAI;cAEJ,oBAAC,SAAI,WAAU,oIAAoI,EAClJ;IACuB;GACb;;AAInB,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,4LACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;AAC3D,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime48 from "react/jsx-runtime";
|
|
3
3
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
|
|
5
5
|
//#region ui/dropdown-menu.d.ts
|
|
6
6
|
declare function DropdownMenu({
|
|
7
7
|
...props
|
|
8
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>):
|
|
8
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime48.JSX.Element;
|
|
9
9
|
declare function DropdownMenuPortal({
|
|
10
10
|
...props
|
|
11
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>):
|
|
11
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime48.JSX.Element;
|
|
12
12
|
declare function DropdownMenuTrigger({
|
|
13
13
|
...props
|
|
14
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>):
|
|
14
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime48.JSX.Element;
|
|
15
15
|
declare function DropdownMenuContent({
|
|
16
16
|
className,
|
|
17
17
|
sideOffset,
|
|
18
18
|
...props
|
|
19
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>):
|
|
19
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime48.JSX.Element;
|
|
20
20
|
declare function DropdownMenuGroup({
|
|
21
21
|
...props
|
|
22
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>):
|
|
22
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime48.JSX.Element;
|
|
23
23
|
declare function DropdownMenuItem({
|
|
24
24
|
className,
|
|
25
25
|
inset,
|
|
@@ -28,39 +28,39 @@ declare function DropdownMenuItem({
|
|
|
28
28
|
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
29
29
|
inset?: boolean;
|
|
30
30
|
variant?: 'default' | 'destructive';
|
|
31
|
-
}):
|
|
31
|
+
}): react_jsx_runtime48.JSX.Element;
|
|
32
32
|
declare function DropdownMenuCheckboxItem({
|
|
33
33
|
className,
|
|
34
34
|
children,
|
|
35
35
|
checked,
|
|
36
36
|
...props
|
|
37
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>):
|
|
37
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime48.JSX.Element;
|
|
38
38
|
declare function DropdownMenuRadioGroup({
|
|
39
39
|
...props
|
|
40
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>):
|
|
40
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime48.JSX.Element;
|
|
41
41
|
declare function DropdownMenuRadioItem({
|
|
42
42
|
className,
|
|
43
43
|
children,
|
|
44
44
|
...props
|
|
45
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>):
|
|
45
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime48.JSX.Element;
|
|
46
46
|
declare function DropdownMenuLabel({
|
|
47
47
|
className,
|
|
48
48
|
inset,
|
|
49
49
|
...props
|
|
50
50
|
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
51
51
|
inset?: boolean;
|
|
52
|
-
}):
|
|
52
|
+
}): react_jsx_runtime48.JSX.Element;
|
|
53
53
|
declare function DropdownMenuSeparator({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>):
|
|
56
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime48.JSX.Element;
|
|
57
57
|
declare function DropdownMenuShortcut({
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React$1.ComponentProps<'span'>):
|
|
60
|
+
}: React$1.ComponentProps<'span'>): react_jsx_runtime48.JSX.Element;
|
|
61
61
|
declare function DropdownMenuSub({
|
|
62
62
|
...props
|
|
63
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>):
|
|
63
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime48.JSX.Element;
|
|
64
64
|
declare function DropdownMenuSubTrigger({
|
|
65
65
|
className,
|
|
66
66
|
inset,
|
|
@@ -68,11 +68,11 @@ declare function DropdownMenuSubTrigger({
|
|
|
68
68
|
...props
|
|
69
69
|
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
70
70
|
inset?: boolean;
|
|
71
|
-
}):
|
|
71
|
+
}): react_jsx_runtime48.JSX.Element;
|
|
72
72
|
declare function DropdownMenuSubContent({
|
|
73
73
|
className,
|
|
74
74
|
...props
|
|
75
|
-
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>):
|
|
75
|
+
}: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime48.JSX.Element;
|
|
76
76
|
//#endregion
|
|
77
77
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
78
78
|
//# sourceMappingURL=dropdown-menu.d.ts.map
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import "react";
|
|
6
5
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
@@ -26,7 +25,7 @@ function DropdownMenuTrigger({ ...props }) {
|
|
|
26
25
|
...props
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
function DropdownMenuContent({ className, sideOffset = 4
|
|
28
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
30
29
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
31
30
|
"data-slot": "dropdown-menu-content",
|
|
32
31
|
sideOffset,
|
|
@@ -40,7 +39,7 @@ function DropdownMenuGroup({ ...props }) {
|
|
|
40
39
|
...props
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
|
-
function DropdownMenuItem({ className, inset, variant = "default"
|
|
42
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
44
43
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
45
44
|
"data-slot": "dropdown-menu-item",
|
|
46
45
|
"data-inset": inset,
|
|
@@ -49,7 +48,7 @@ function DropdownMenuItem({ className, inset, variant = "default",...props }) {
|
|
|
49
48
|
...props
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
function DropdownMenuCheckboxItem({ className, children, checked
|
|
51
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
53
52
|
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
54
53
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
55
54
|
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -67,7 +66,7 @@ function DropdownMenuRadioGroup({ ...props }) {
|
|
|
67
66
|
...props
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
|
-
function DropdownMenuRadioItem({ className, children
|
|
69
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
71
70
|
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
72
71
|
"data-slot": "dropdown-menu-radio-item",
|
|
73
72
|
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -78,7 +77,7 @@ function DropdownMenuRadioItem({ className, children,...props }) {
|
|
|
78
77
|
}), children]
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
function DropdownMenuLabel({ className, inset
|
|
80
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
82
81
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
83
82
|
"data-slot": "dropdown-menu-label",
|
|
84
83
|
"data-inset": inset,
|
|
@@ -86,14 +85,14 @@ function DropdownMenuLabel({ className, inset,...props }) {
|
|
|
86
85
|
...props
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
|
-
function DropdownMenuSeparator({ className
|
|
88
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
90
89
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
91
90
|
"data-slot": "dropdown-menu-separator",
|
|
92
91
|
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
93
92
|
...props
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
|
-
function DropdownMenuShortcut({ className
|
|
95
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
97
96
|
return /* @__PURE__ */ jsx("span", {
|
|
98
97
|
"data-slot": "dropdown-menu-shortcut",
|
|
99
98
|
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
@@ -106,7 +105,7 @@ function DropdownMenuSub({ ...props }) {
|
|
|
106
105
|
...props
|
|
107
106
|
});
|
|
108
107
|
}
|
|
109
|
-
function DropdownMenuSubTrigger({ className, inset, children
|
|
108
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
110
109
|
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
111
110
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
112
111
|
"data-inset": inset,
|
|
@@ -115,7 +114,7 @@ function DropdownMenuSubTrigger({ className, inset, children,...props }) {
|
|
|
115
114
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
116
115
|
});
|
|
117
116
|
}
|
|
118
|
-
function DropdownMenuSubContent({ className
|
|
117
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
119
118
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
120
119
|
"data-slot": "dropdown-menu-sub-content",
|
|
121
120
|
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","names":[],"sources":["../../ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from './utils';\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: 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-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\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 \"data-[variant=destructive]:*:[svg]:text-destructive! focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_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 className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_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(\n 'px-2 py-1.5 text-sm font-medium data-inset:pl-8',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: 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 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none 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({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":";;;;;;;;;;AAQA,SAAS,aAAa,EACpB,GAAG,SACuD;AAC1D,QAAO,oBAAC,sBAAsB;EAAK,aAAU;EAAgB,GAAI;GAAS;;AAG5E,SAAS,mBAAmB,EAC1B,GAAG,SACyD;AAC5D,QACE,oBAAC,sBAAsB;EAAO,aAAU;EAAuB,GAAI;GAAS;;AAIhF,SAAS,oBAAoB,EAC3B,GAAG,SAC0D;AAC7D,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,GAAI;GACJ;;AAIN,SAAS,oBAAoB,EAC3B,WACA,aAAa,EACb,GAAG,SAC0D;AAC7D,QACE,oBAAC,sBAAsB,oBACrB,oBAAC,sBAAsB;EACrB,aAAU;EACE;EACZ,WAAW,GACT,sjBACA,UACD;EACD,GAAI;GACJ,GAC2B;;AAInC,SAAS,kBAAkB,EACzB,GAAG,SACwD;AAC3D,QACE,oBAAC,sBAAsB;EAAM,aAAU;EAAsB,GAAI;GAAS;;AAI9E,SAAS,iBAAiB,EACxB,WACA,OACA,UAAU,UACV,GAAG,SAIF;AACD,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,gBAAc;EACd,WAAW,GACT,ymBACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,yBAAyB,EAChC,WACA,UACA,QACA,GAAG,SAC+D;AAClE,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,4SACA,UACD;EACQ;EACT,GAAI;aAEJ,oBAAC;GAAK,WAAU;aACd,oBAAC,sBAAsB,2BACrB,oBAAC,aAAU,WAAU,WAAW,GACI;IACjC,EACN;GACkC;;AAIzC,SAAS,uBAAuB,EAC9B,GAAG,SAC6D;AAChE,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,GAAI;GACJ;;AAIN,SAAS,sBAAsB,EAC7B,WACA,SACA,GAAG,SAC4D;AAC/D,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,4SACA,UACD;EACD,GAAI;aAEJ,oBAAC;GAAK,WAAU;aACd,oBAAC,sBAAsB,2BACrB,oBAAC,cAAW,WAAU,wBAAwB,GACV;IACjC,EACN;GAC+B;;AAItC,SAAS,kBAAkB,EACzB,WACA,MACA,GAAG,SAGF;AACD,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,WAAW,GACT,mDACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,sBAAsB,EAC7B,UACA,GAAG,SAC4D;AAC/D,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GAAG,6BAA6B,UAAU;EACrD,GAAI;GACJ;;AAIN,SAAS,qBAAqB,EAC5B,UACA,GAAG,SAC4B;AAC/B,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,GAAG,SACsD;AACzD,QAAO,oBAAC,sBAAsB;EAAI,aAAU;EAAoB,GAAI;GAAS;;AAG/E,SAAS,uBAAuB,EAC9B,WACA,OACA,SACA,GAAG,SAGF;AACD,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,WAAW,GACT,gOACA,UACD;EACD,GAAI;aAEH,UACD,oBAAC,oBAAiB,WAAU,mBAAmB;GACd;;AAIvC,SAAS,uBAAuB,EAC9B,UACA,GAAG,SAC6D;AAChE,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,6eACA,UACD;EACD,GAAI;GACJ"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","names":[],"sources":["../../ui/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from './utils';\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: 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-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\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 \"data-[variant=destructive]:*:[svg]:text-destructive! focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_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 className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_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(\n 'px-2 py-1.5 text-sm font-medium data-inset:pl-8',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: 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 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none 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({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":";;;;;;;;;AAQA,SAAS,aAAa,EACpB,GAAG,SACuD;AAC1D,QAAO,oBAAC,sBAAsB;EAAK,aAAU;EAAgB,GAAI;GAAS;;AAG5E,SAAS,mBAAmB,EAC1B,GAAG,SACyD;AAC5D,QACE,oBAAC,sBAAsB;EAAO,aAAU;EAAuB,GAAI;GAAS;;AAIhF,SAAS,oBAAoB,EAC3B,GAAG,SAC0D;AAC7D,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,GAAI;GACJ;;AAIN,SAAS,oBAAoB,EAC3B,WACA,aAAa,GACb,GAAG,SAC0D;AAC7D,QACE,oBAAC,sBAAsB,oBACrB,oBAAC,sBAAsB;EACrB,aAAU;EACE;EACZ,WAAW,GACT,sjBACA,UACD;EACD,GAAI;GACJ,GAC2B;;AAInC,SAAS,kBAAkB,EACzB,GAAG,SACwD;AAC3D,QACE,oBAAC,sBAAsB;EAAM,aAAU;EAAsB,GAAI;GAAS;;AAI9E,SAAS,iBAAiB,EACxB,WACA,OACA,UAAU,WACV,GAAG,SAIF;AACD,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,gBAAc;EACd,WAAW,GACT,ymBACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,yBAAyB,EAChC,WACA,UACA,SACA,GAAG,SAC+D;AAClE,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,4SACA,UACD;EACQ;EACT,GAAI;aAEJ,oBAAC;GAAK,WAAU;aACd,oBAAC,sBAAsB,2BACrB,oBAAC,aAAU,WAAU,WAAW,GACI;IACjC,EACN;GACkC;;AAIzC,SAAS,uBAAuB,EAC9B,GAAG,SAC6D;AAChE,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,GAAI;GACJ;;AAIN,SAAS,sBAAsB,EAC7B,WACA,UACA,GAAG,SAC4D;AAC/D,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,4SACA,UACD;EACD,GAAI;aAEJ,oBAAC;GAAK,WAAU;aACd,oBAAC,sBAAsB,2BACrB,oBAAC,cAAW,WAAU,wBAAwB,GACV;IACjC,EACN;GAC+B;;AAItC,SAAS,kBAAkB,EACzB,WACA,OACA,GAAG,SAGF;AACD,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,WAAW,GACT,mDACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,sBAAsB,EAC7B,WACA,GAAG,SAC4D;AAC/D,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GAAG,6BAA6B,UAAU;EACrD,GAAI;GACJ;;AAIN,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC4B;AAC/B,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,GAAG,SACsD;AACzD,QAAO,oBAAC,sBAAsB;EAAI,aAAU;EAAoB,GAAI;GAAS;;AAG/E,SAAS,uBAAuB,EAC9B,WACA,OACA,UACA,GAAG,SAGF;AACD,QACE,qBAAC,sBAAsB;EACrB,aAAU;EACV,cAAY;EACZ,WAAW,GACT,gOACA,UACD;EACD,GAAI;aAEH,UACD,oBAAC,oBAAiB,WAAU,mBAAmB;GACd;;AAIvC,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;AAChE,QACE,oBAAC,sBAAsB;EACrB,aAAU;EACV,WAAW,GACT,6eACA,UACD;EACD,GAAI;GACJ"}
|
package/dist/ui/empty-state.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime90 from "react/jsx-runtime";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region ui/empty-state.d.ts
|
|
7
7
|
declare const containerVariants: (props?: ({
|
|
8
8
|
density?: "default" | "compact" | null | undefined;
|
|
9
|
-
} &
|
|
9
|
+
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
10
10
|
interface EmptyStateProps extends VariantProps<typeof containerVariants> {
|
|
11
11
|
icon?: React$1.ReactNode;
|
|
12
12
|
title: React$1.ReactNode;
|
|
@@ -23,7 +23,7 @@ declare function EmptyState({
|
|
|
23
23
|
secondaryAction,
|
|
24
24
|
className,
|
|
25
25
|
density
|
|
26
|
-
}: EmptyStateProps):
|
|
26
|
+
}: EmptyStateProps): react_jsx_runtime90.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { EmptyState, EmptyStateProps };
|
|
29
29
|
//# sourceMappingURL=empty-state.d.ts.map
|
package/dist/ui/empty.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime73 from "react/jsx-runtime";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as
|
|
3
|
+
import * as class_variance_authority_types3 from "class-variance-authority/types";
|
|
4
4
|
|
|
5
5
|
//#region ui/empty.d.ts
|
|
6
6
|
declare function Empty({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<'div'>):
|
|
9
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime73.JSX.Element;
|
|
10
10
|
declare function EmptyHeader({
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
|
-
}: React.ComponentProps<'div'>):
|
|
13
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime73.JSX.Element;
|
|
14
14
|
declare const emptyMediaVariants: (props?: ({
|
|
15
15
|
variant?: "default" | "icon" | null | undefined;
|
|
16
|
-
} &
|
|
16
|
+
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
17
17
|
declare function EmptyMedia({
|
|
18
18
|
className,
|
|
19
19
|
variant,
|
|
20
20
|
...props
|
|
21
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>):
|
|
21
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime73.JSX.Element;
|
|
22
22
|
declare function EmptyTitle({
|
|
23
23
|
className,
|
|
24
24
|
...props
|
|
25
|
-
}: React.ComponentProps<'div'>):
|
|
25
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime73.JSX.Element;
|
|
26
26
|
declare function EmptyDescription({
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: React.ComponentProps<'p'>):
|
|
29
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime73.JSX.Element;
|
|
30
30
|
declare function EmptyContent({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<'div'>):
|
|
33
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime73.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
36
36
|
//# sourceMappingURL=empty.d.ts.map
|
package/dist/ui/empty.js
CHANGED
|
@@ -3,14 +3,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
//#region ui/empty.tsx
|
|
6
|
-
function Empty({ className
|
|
6
|
+
function Empty({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", {
|
|
8
8
|
"data-slot": "empty",
|
|
9
9
|
className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function EmptyHeader({ className
|
|
13
|
+
function EmptyHeader({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx("div", {
|
|
15
15
|
"data-slot": "empty-header",
|
|
16
16
|
className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
|
|
@@ -24,7 +24,7 @@ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [
|
|
|
24
24
|
} },
|
|
25
25
|
defaultVariants: { variant: "default" }
|
|
26
26
|
});
|
|
27
|
-
function EmptyMedia({ className, variant = "default"
|
|
27
|
+
function EmptyMedia({ className, variant = "default", ...props }) {
|
|
28
28
|
return /* @__PURE__ */ jsx("div", {
|
|
29
29
|
"data-slot": "empty-icon",
|
|
30
30
|
"data-variant": variant,
|
|
@@ -35,21 +35,21 @@ function EmptyMedia({ className, variant = "default",...props }) {
|
|
|
35
35
|
...props
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function EmptyTitle({ className
|
|
38
|
+
function EmptyTitle({ className, ...props }) {
|
|
39
39
|
return /* @__PURE__ */ jsx("div", {
|
|
40
40
|
"data-slot": "empty-title",
|
|
41
41
|
className: cn("text-lg font-medium tracking-tight", className),
|
|
42
42
|
...props
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
function EmptyDescription({ className
|
|
45
|
+
function EmptyDescription({ className, ...props }) {
|
|
46
46
|
return /* @__PURE__ */ jsx("div", {
|
|
47
47
|
"data-slot": "empty-description",
|
|
48
48
|
className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", className),
|
|
49
49
|
...props
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function EmptyContent({ className
|
|
52
|
+
function EmptyContent({ className, ...props }) {
|
|
53
53
|
return /* @__PURE__ */ jsx("div", {
|
|
54
54
|
"data-slot": "empty-content",
|
|
55
55
|
className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
|
package/dist/ui/empty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.js","names":[],"sources":["../../ui/empty.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\n\nfunction Empty({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n 'flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\n 'flex max-w-sm flex-col items-center gap-2 text-center',\n className\n )}\n {...props}\n />\n );\n}\n\nconst emptyMediaVariants = cva(\n 'flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n icon: \"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction EmptyMedia({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn('text-lg font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n 'text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n 'flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Empty,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyContent,\n EmptyMedia,\n};\n"],"mappings":";;;;;AAIA,SAAS,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"empty.js","names":[],"sources":["../../ui/empty.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\n\nfunction Empty({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n 'flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\n 'flex max-w-sm flex-col items-center gap-2 text-center',\n className\n )}\n {...props}\n />\n );\n}\n\nconst emptyMediaVariants = cva(\n 'flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n icon: \"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction EmptyMedia({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn('text-lg font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n 'text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n 'flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Empty,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyContent,\n EmptyMedia,\n};\n"],"mappings":";;;;;AAIA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAsC;AACnE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,gIACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;AACzE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,qBAAqB,IACzB,+FACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,MAAM;EACP,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,SAAS,WAAW,EAClB,WACA,UAAU,WACV,GAAG,SACqE;AACxE,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,mBAAmB;GAAE;GAAS;GAAW,CAAC,CAAC;EACzD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACxE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,sCAAsC,UAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAoC;AAC5E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,2GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,iFACA,UACD;EACD,GAAI;GACJ"}
|
package/dist/ui/field.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Label } from "./label.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime63 from "react/jsx-runtime";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
5
5
|
|
|
@@ -7,18 +7,18 @@ import * as class_variance_authority_types2 from "class-variance-authority/types
|
|
|
7
7
|
declare function FieldSet({
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<'fieldset'>):
|
|
10
|
+
}: React.ComponentProps<'fieldset'>): react_jsx_runtime63.JSX.Element;
|
|
11
11
|
declare function FieldLegend({
|
|
12
12
|
className,
|
|
13
13
|
variant,
|
|
14
14
|
...props
|
|
15
15
|
}: React.ComponentProps<'legend'> & {
|
|
16
16
|
variant?: 'legend' | 'label';
|
|
17
|
-
}):
|
|
17
|
+
}): react_jsx_runtime63.JSX.Element;
|
|
18
18
|
declare function FieldGroup({
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
|
-
}: React.ComponentProps<'div'>):
|
|
21
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime63.JSX.Element;
|
|
22
22
|
declare const fieldVariants: (props?: ({
|
|
23
23
|
orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
|
|
24
24
|
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
@@ -26,30 +26,30 @@ declare function Field({
|
|
|
26
26
|
className,
|
|
27
27
|
orientation,
|
|
28
28
|
...props
|
|
29
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>):
|
|
29
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): react_jsx_runtime63.JSX.Element;
|
|
30
30
|
declare function FieldContent({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<'div'>):
|
|
33
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime63.JSX.Element;
|
|
34
34
|
declare function FieldLabel({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof Label>):
|
|
37
|
+
}: React.ComponentProps<typeof Label>): react_jsx_runtime63.JSX.Element;
|
|
38
38
|
declare function FieldTitle({
|
|
39
39
|
className,
|
|
40
40
|
...props
|
|
41
|
-
}: React.ComponentProps<'div'>):
|
|
41
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime63.JSX.Element;
|
|
42
42
|
declare function FieldDescription({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: React.ComponentProps<'p'>):
|
|
45
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime63.JSX.Element;
|
|
46
46
|
declare function FieldSeparator({
|
|
47
47
|
children,
|
|
48
48
|
className,
|
|
49
49
|
...props
|
|
50
50
|
}: React.ComponentProps<'div'> & {
|
|
51
51
|
children?: React.ReactNode;
|
|
52
|
-
}):
|
|
52
|
+
}): react_jsx_runtime63.JSX.Element;
|
|
53
53
|
declare function FieldError({
|
|
54
54
|
className,
|
|
55
55
|
children,
|
|
@@ -59,7 +59,7 @@ declare function FieldError({
|
|
|
59
59
|
errors?: ({
|
|
60
60
|
message?: string;
|
|
61
61
|
} | undefined)[];
|
|
62
|
-
}):
|
|
62
|
+
}): react_jsx_runtime63.JSX.Element | null;
|
|
63
63
|
//#endregion
|
|
64
64
|
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
65
65
|
//# sourceMappingURL=field.d.ts.map
|
package/dist/ui/field.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import { Label } from "./label.js";
|
|
6
5
|
import { Separator } from "./separator.js";
|
|
@@ -9,14 +8,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
8
|
import { cva } from "class-variance-authority";
|
|
10
9
|
|
|
11
10
|
//#region ui/field.tsx
|
|
12
|
-
function FieldSet({ className
|
|
11
|
+
function FieldSet({ className, ...props }) {
|
|
13
12
|
return /* @__PURE__ */ jsx("fieldset", {
|
|
14
13
|
"data-slot": "field-set",
|
|
15
14
|
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
16
15
|
...props
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function FieldLegend({ className, variant = "legend"
|
|
18
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
20
19
|
return /* @__PURE__ */ jsx("legend", {
|
|
21
20
|
"data-slot": "field-legend",
|
|
22
21
|
"data-variant": variant,
|
|
@@ -24,7 +23,7 @@ function FieldLegend({ className, variant = "legend",...props }) {
|
|
|
24
23
|
...props
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
function FieldGroup({ className
|
|
26
|
+
function FieldGroup({ className, ...props }) {
|
|
28
27
|
return /* @__PURE__ */ jsx("div", {
|
|
29
28
|
"data-slot": "field-group",
|
|
30
29
|
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4", className),
|
|
@@ -47,7 +46,7 @@ const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:tex
|
|
|
47
46
|
} },
|
|
48
47
|
defaultVariants: { orientation: "vertical" }
|
|
49
48
|
});
|
|
50
|
-
function Field({ className, orientation = "vertical"
|
|
49
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
51
50
|
return /* @__PURE__ */ jsx("div", {
|
|
52
51
|
role: "group",
|
|
53
52
|
"data-slot": "field",
|
|
@@ -56,35 +55,35 @@ function Field({ className, orientation = "vertical",...props }) {
|
|
|
56
55
|
...props
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
|
-
function FieldContent({ className
|
|
58
|
+
function FieldContent({ className, ...props }) {
|
|
60
59
|
return /* @__PURE__ */ jsx("div", {
|
|
61
60
|
"data-slot": "field-content",
|
|
62
61
|
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
63
62
|
...props
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
|
-
function FieldLabel({ className
|
|
65
|
+
function FieldLabel({ className, ...props }) {
|
|
67
66
|
return /* @__PURE__ */ jsx(Label, {
|
|
68
67
|
"data-slot": "field-label",
|
|
69
68
|
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
|
|
70
69
|
...props
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
|
-
function FieldTitle({ className
|
|
72
|
+
function FieldTitle({ className, ...props }) {
|
|
74
73
|
return /* @__PURE__ */ jsx("div", {
|
|
75
74
|
"data-slot": "field-label",
|
|
76
75
|
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
77
76
|
...props
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
|
-
function FieldDescription({ className
|
|
79
|
+
function FieldDescription({ className, ...props }) {
|
|
81
80
|
return /* @__PURE__ */ jsx("p", {
|
|
82
81
|
"data-slot": "field-description",
|
|
83
82
|
className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
|
|
84
83
|
...props
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
|
-
function FieldSeparator({ children, className
|
|
86
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
88
87
|
return /* @__PURE__ */ jsxs("div", {
|
|
89
88
|
"data-slot": "field-separator",
|
|
90
89
|
"data-content": !!children,
|
|
@@ -97,7 +96,7 @@ function FieldSeparator({ children, className,...props }) {
|
|
|
97
96
|
})]
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
|
-
function FieldError({ className, children, errors
|
|
99
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
101
100
|
const content = useMemo(() => {
|
|
102
101
|
if (children) return children;
|
|
103
102
|
if (!errors?.length) return null;
|
package/dist/ui/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":";;;;;;;;;;AASA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;AAC3E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uBACA,gFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,UAAU,UACV,GAAG,SACiE;AACpE,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GACT,oBACA,mCACA,gCACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACxE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,wIACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,gBAAgB,IACpB,sEACA;CACE,UAAU,EACR,aAAa;EACX,UAAU,CAAC,wCAAwC;EACnD,YAAY;GACV;GACA;GACA;GACD;EACD,YAAY;GACV;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,aAAa,YACd;CACF,CACF;AAED,SAAS,MAAM,EACb,WACA,cAAc,YACd,GAAG,SACgE;AACnE,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,cAAc,EAAE,aAAa,CAAC,EAAE,UAAU;EACxD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,iEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,GAAG,SACkC;AACrC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,gHACA,iKACA,6HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACxE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAoC;AAC5E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uHACA,gEACA,qEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,eAAe,EACtB,UACA,WACA,GAAG,SAGF;AACD,QACE,qBAAC;EACC,aAAU;EACV,gBAAc,CAAC,CAAC;EAChB,WAAW,GACT,6EACA,UACD;EACD,GAAI;aAEJ,oBAAC,aAAU,WAAU,6BAA6B,EACjD,YACC,oBAAC;GACC,WAAU;GACV,aAAU;GAET;IACI;GAEL;;AAIV,SAAS,WAAW,EAClB,WACA,UACA,QACA,GAAG,SAGF;CACD,MAAM,UAAU,cAAc;AAC5B,MAAI,SACF,QAAO;AAGT,MAAI,CAAC,QAAQ,OACX,QAAO;AAGT,MAAI,QAAQ,UAAU,EACpB,QAAO,OAAO,IAAI;AAGpB,SACE,oBAAC;GAAG,WAAU;aACX,OAAO,KACL,OAAO,UACN,OAAO,WAAW,oBAAC,kBAAgB,MAAM,WAAd,MAA2B,CACzD;IACE;IAEN,CAAC,UAAU,OAAO,CAAC;AAEtB,KAAI,CAAC,QACH,QAAO;AAGT,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,WAAW,GAAG,wCAAwC,UAAU;EAChE,GAAI;YAEH;GACG"}
|